XtSelectioC man page on HP-UX

Man page or keyword search:  
man Server   10987 pages
apropos Keyword Search (all sections)
Output format
HP-UX logo
[printable version]

XtSelectionDoneProc()					 XtSelectionDoneProc()

Name
  XtSelectionDoneProc  -  interface definition for procedure called after
  selection transfer is completed.

Synopsis
  typedef void (*XtSelectionDoneProc)(Widget, Atom *, Atom *);
	 Widget w;
	 Atom *selection;
	 Atom *target;

Inputs
  w	    Specifies the widget that owns the converted selection.

  selection Specifies the atom that names the selection that  was  trans‐
	    ferred.

  target    Specifies the target type to which the conversion was done.

Description
  An  XtSelectionDoneProc  is optionally registered in a call to XtOwnSe‐
  lection(), and is called by  the  Intrinsics	after  the  corresponding
  XtConvertSelectionProc  has  been  called  and  the  data it returns is
  transferred to the requestor.

  An XtSelectionDoneProc should free the memory returned  by  the  XtCon‐
  vertSelectionProc  and  any other memory or resources allocated by that
  procedure to convert the selection value.  If no XtSelectionDoneProc is
  registered  with  XtOwnSelection(),  then the Intrinsics will automati‐
  cally free the memory returned by the XtConvertSelectionProc by calling
  XtFree().

Usage
  Most	XtConvertSelectionProc procedures will allocate a single block of
  memory with XtMalloc() and can simply rely on the  Intrinsics	 to  free
  that	block with XtFree().  In this case, there is no need for an XtSe‐
  lectionDoneProc.

  Note that an XtSelectionDoneProc is not passed a client_data	argument,
  nor  is  it  passed  a  pointer  to the memory that was returned by the
  XtConvertSelectionProc.  In a widget, the widget structure can point to
  the memory that must be freed, but in an application, you will probably
  have to rely on a global variable, as in the example below.

  The XtSelectionDoneProc and XtOwnSelection() are part of the Intrinsics
  atomic selection transfer mechanism.	For some selection values, it may
  be more convenient to transfer the selection value in pieces.	 This can
  be  done with the incremental transfer mechanism; see XtOwnSelectionIn‐
  cremental(1).

Example
  The xcalc client uses a static character string to store the	selection
  value.   Because  this is not allocated memory, it should not be freed,
  so xcalc provides a XtSelectionDoneProc which simply	sets  the  static
  buffer to contain the empty string:

     static char selstr[LCD_STR_LEN]; /* storage for selections from the LCD */

     /*ARGSUSED*/
     void done(w, selection, target)
	 Widget	     w;
	 Atom	     *selection;
	 Atom	     *target;
     {
	 selstr[0] = ' ';
     }

  This XtSelectionDoneProc is registered with this call:

	 XtOwnSelection(LCD, XA_PRIMARY, time, convert, lose, done);

See Also
  XtDisownSelection(1), XtGetSelectionValue(1), XtGetSelectionValues(1),
  XtOwnSelection(1), XtOwnSelectionIncremental(1),
  XtConvertSelectionProc(2).

Xt - Selections						 XtSelectionDoneProc()
[top]

List of man pages available for HP-UX

Copyright (c) for man pages and the logo by the respective OS vendor.

For those who want to learn more, the polarhome community provides shell access and support.

[legal] [privacy] [GNU] [policy] [cookies] [netiquette] [sponsors] [FAQ]
Tweet
Polarhome, production since 1999.
Member of Polarhome portal.
Based on Fawad Halim's script.
....................................................................
Vote for polarhome
Free Shell Accounts :: the biggest list on the net