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

XtGetSelectionValue(3)						   XT FUNCTIONS 					    XtGetSelectionValue(3)

NAME
XtGetSelectionValue, XtGetSelectionValues - obtain selection values SYNTAX
void XtGetSelectionValue(Widget w, Atom selection, Atom target, XtSelectionCallbackProc callback, XtPointer client_data, Time time); void XtGetSelectionValues(Widget w, Atom selection, Atom *targets, int count, XtSelectionCallbackProc callback, XtPointer client_data, Time time); ARGUMENTS
callback Specifies the callback procedure that is to be called when the selection value has been obtained. client_data Specifies the argument that is to be passed to the specified procedure when it is called. client_data Specifies the client data (one for each target type) that is passed to the callback procedure when it is called for that target. count Specifies the length of the targets and client_data lists. selection Specifies the particular selection desired (that is, primary or secondary). target Specifies the type of the information that is needed about the selection. targets Specifies the types of information that is needed about the selection. time Specifies the timestamp that indicates when the selection value is desired. w Specifies the widget that is making the request. DESCRIPTION
The XtGetSelectionValue function requests the value of the selection that has been converted to the target type. The specified callback will be called some time after XtGetSelectionValue is called; in fact, it may be called before or after XtGetSelectionValue returns. The XtGetSelectionValues function is similar to XtGetSelectionValue except that it takes a list of target types and a list of client data and obtains the current value of the selection converted to each of the targets. The effect is as if each target were specified in a sepa- rate call to XtGetSelectionValue. The callback is called once with the corresponding client data for each target. XtGetSelectionValues does guarantee that all the conversions will use the same selection value because the ownership of the selection cannot change in the mid- dle of the list, as would be when calling XtGetSelectionValue repeatedly. SEE ALSO
XtAppGetSelectionTimeout(3), XtOwnSelection(3) X Toolkit Intrinsics - C Language Interface Xlib - C Language X Interface X Version 11 libXt 1.1.4 XtGetSelectionValue(3)
Man Page