1XtOwnSelection(3) XT FUNCTIONS XtOwnSelection(3)
2
3
4
6 XtOwnSelection, XtOwnSelectionIncremental, XtDisownSelection - set se‐
7 lection owner
8
10 #include <X11/Intrinsic.h>
11
12 Boolean XtOwnSelection(Widget w, Atom selection, Time time, XtConvertS‐
13 electionProc convert_proc, XtLoseSelectionProc lose_selection,
14 XtSelectionDoneProc done_proc);
15
16 Boolean XtOwnSelectionIncremental(Widget w, Atom selection, Time time,
17 XtConvertSelectionIncrProc convert_callback, XtLoseSelectionIn‐
18 crProc lose_callback, XtSelectionDoneIncrProc done_callback,
19 XtCancelConvertSelectionProc cancel_callback, XtPointer
20 client_data);
21
22 void XtDisownSelection(Widget w, Atom selection, Time time);
23
25 convert_proc
26 Specifies the procedure that is to be called whenever someone
27 requests the current value of the selection.
28
29 done_proc Specifies the procedure that is called after the requestor
30 has received the selection or NULL if the owner is not inter‐
31 ested in being called back.
32
33 lose_selection
34 Specifies the procedure that is to be called whenever the
35 widget has lost selection ownership or NULL if the owner is
36 not interested in being called back.
37
38 selection Specifies an atom that describes the type of the selection
39 (for example, XA_PRIMARY, XA_SECONDARY, or XA_CLIPBOARD).
40
41 time Specifies the timestamp that indicates when the selection
42 ownership should commence or is to be relinquished.
43
44 w Specifies the widget that wishes to become the owner or to
45 relinquish ownership.
46
48 The XtOwnSelection function informs the Intrinsics selection mechanism
49 that a widget believes it owns a selection. It returns True if the
50 widget has successfully become the owner and False otherwise. The wid‐
51 get may fail to become the owner if some other widget has asserted own‐
52 ership at a time later than this widget. Note that widgets can lose
53 selection ownership either because someone else asserted later owner‐
54 ship of the selection or because the widget voluntarily gave up owner‐
55 ship of the selection. Also note that the lose_selection procedure is
56 not called if the widget fails to obtain selection ownership in the
57 first place.
58
59 The XtOwnSelectionIncremental procedure informs the Intrinsics incre‐
60 mental selection mechanism that the specified widget wishes to own the
61 selection. It returns True if the specified widget successfully be‐
62 comes the selection owner or False otherwise. For more information
63 about selection, target, and time, see Section 2.6 of the Inter-Client
64 Communication Conventions Manual.
65
66 A widget that becomes the selection owner using XtOwnSelection‐
67 Incremental may use XtDisownSelection to relinquish selection owner‐
68 ship.
69
70 The XtDisownSelection function informs the Intrinsics selection mecha‐
71 nism that the specified widget is to lose ownership of the selection.
72 If the widget does not currently own the selection either because it
73 lost the selection or because it never had the selection to begin with,
74 XtDisownSelection does nothing.
75
76 After a widget has called XtDisownSelection, its convert procedure is
77 not called even if a request arrives later with a timestamp during the
78 period that this widget owned the selection. However, its done proce‐
79 dure will be called if a conversion that started before the call to
80 XtDisownSelection finishes after the call to XtDisownSelection.
81
83 XtAppGetSelectionTimeout(3), XtGetSelectionValue(3)
84 X Toolkit Intrinsics - C Language Interface
85 Xlib - C Language X Interface
86
87
88
89X Version 11 libXt 1.2.1 XtOwnSelection(3)