Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

xtgetselecc(3) [hpux man page]

XtGetSelectionValue()													     XtGetSelectionValue()

Name
  XtGetSelectionValue - request the value of a selection.

Synopsis
  void XtGetSelectionValue(w, selection, target, callback, client_data, time)
	 Widget w;
	 Atom selection;
	 Atom target;
	 XtSelectionCallbackProc callback;
	 XtPointer client_data;
	 Time time;

Inputs
  w	    Specifies the widget that is making the request.  Must be of class Core or any subclass thereof.

  selection Specifies the particular selection desired (usually XA_PRIMARY or XA_SECONDARY).

  target    Specifies the type of information about the selection that is being requested.

  callback  Specifies  the  callback  procedure to be called when the selection value has been obtained.  Note that this is how the selection
	    value is communicated back to the client.

  client_data
	    Specifies an argument to be passed to callback when it is called.

  time	    Specifies the timestamp that indicates when the selection is desired.  This should be the timestamp of the event  that  triggered
	    this request; the value CurrentTime is not acceptable.

Description
  XtGetSelectionValue()  initiates an ICCCM-compliant request to the owner of the selection identified by selection to convert that selection
  to the type identified by target, and registers callback as the procedure to be called (with client_data as one of its arguments) when  the
  converted value is ready.

  callback  will  be called some time after XtGetSelectionValue() is called.  It may be called before or after XtGetSelectionValue() returns.
  If there is no owner for the selection or if the owner could not convert to the requested type, callback will be called  with  a  value  of
  NULL and length zero.

  If  multiple	calls  to the server are required to get all the data, this will be transparent to the widget; the Intrinsics perform all the
  necessary fragmentation and reassembly of the selection.

  See XtSelectionCallbackProc(2) for information on how to write a callback appropriate to register with this function.

Usage
  Because of the asynchronous nature of interclient communication, it is not possible to call a function that returns the value of the selec-
  tion	immediately.   When  you need the value of the selection, to paste it into a widget, for example, you must call XtGetSelectionValue()
  and supply a callback which will be called at some later time.  It is in this callback that you can actually perform your paste.

  To determine the target types that the selection owner will be willing to return, intern the string "TARGETS" using XInternAtom(), and send
  the corresponding Atom as target.

  To (atomically) request that a selection value be converted to several target types, use XtGetSelectionValues().

See Also
  XtGetSelectionValues(1), XtGetSelectionValueIncremental(1), XtOwnSelection(1),
  XtSelectionCallbackProc(2).

Xt - Selections 													     XtGetSelectionValue()

Check Out this Related Man Page

XtGetSelectionValues()													    XtGetSelectionValues()

Name
  XtGetSelectionValues - obtain selection data in multiple formats.

Synopsis
  void XtGetSelectionValues(w, selection, targets, count, callback,
  client_data, time)
	 Widget w;
	 Atom selection;
	 Atom *targets;
	 int count;
	 XtSelectionCallbackProc callback;
	 XtPointer *client_data;
	 Time time;

Inputs
  w	    Specifies the widget that is making the request.  Must be of class core or any subclass thereof.

  selection Specifies the particular selection desired (usually XA_PRIMARY or XA_SECONDARY).

  targets   Specifies the types of information about the selection that are being requested.

  count     Specifies the length of the targets and client_data arrays.

  callback  Specifies the callback procedure to be called with each selection value obtained.  Note that this is how the selection values are
	    communicated back to the client.

  client_data
	    Specifies an array of client data (one for each target type) each element of which will be passed to callback when it  is  called
	    for the corresponding element of targets.

  time	    Specifies the timestamp that indicates when the selection value is desired.  This should be the timestamp of the event that trig-
	    gered this request; the value CurrentTime is not acceptable.

Description
  XtGetSelectionValues() is similar to XtGetSelectionValue() except that it takes an array of target types and an array of  client  data  and
  requests the current value of the selection converted to each of the targets.  The callback is called once for each element of targets, and
  is passed the corresponding element of client_data.  The effect is as if each target were specified in a separate call to XtGetSelectionVa-
  lue(),  except  that	XtGetSelectionValues() guarantees that all the conversions will use the same selection value because the ownership of
  the selection cannot change in the middle of the list, as could happen when calling XtGetSelectionValue() repeatedly.

  See XtGetSelectionValue() for more information.

See Also
  XtGetSelectionValue(1), XtGetSelectionValueIncremental(1), XtGetSelectionValuesIncremental(1),
  XtSelectionCallbackProc(2).

Xt - Selections 													    XtGetSelectionValues()
Man Page