File indexing completed on 2025-01-18 10:14:30
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017
0018
0019
0020
0021
0022
0023
0024
0025
0026
0027
0028
0029
0030
0031
0032
0033
0034
0035
0036
0037
0038
0039
0040
0041
0042
0043
0044
0045
0046
0047
0048 #ifndef _XtselectionI_h
0049 #define _XtselectionI_h
0050
0051 #include "Intrinsic.h"
0052
0053 typedef struct _RequestRec *Request;
0054 typedef struct _SelectRec *Select;
0055
0056 typedef struct _RequestRec {
0057 Select ctx;
0058 Widget widget;
0059 Window requestor;
0060 Atom property;
0061 Atom target;
0062 Atom type;
0063 int format;
0064 XtPointer value;
0065 unsigned long bytelength;
0066 unsigned long offset;
0067 XtIntervalId timeout;
0068 XSelectionRequestEvent event;
0069 Boolean allSent;
0070 } RequestRec;
0071
0072 typedef struct {
0073 Atom prop;
0074 Boolean avail;
0075 } SelectionPropRec, *SelectionProp;
0076
0077 typedef struct {
0078 Display *dpy;
0079 Atom incr_atom, indirect_atom, timestamp_atom;
0080 int propCount;
0081 SelectionProp list;
0082 } PropListRec, *PropList;
0083
0084 typedef struct _SelectRec {
0085 Atom selection;
0086 Display *dpy;
0087 Widget widget;
0088 Time time;
0089 unsigned long serial;
0090 XtConvertSelectionProc convert;
0091 XtLoseSelectionProc loses;
0092 XtSelectionDoneProc notify;
0093 XtCancelConvertSelectionProc owner_cancel;
0094 XtPointer owner_closure;
0095 PropList prop_list;
0096 Request req;
0097 int ref_count;
0098 unsigned int incremental:1;
0099 unsigned int free_when_done:1;
0100 unsigned int was_disowned:1;
0101 } SelectRec;
0102
0103 typedef struct _ParamRec {
0104 Atom selection;
0105 Atom param;
0106 } ParamRec, *Param;
0107
0108 typedef struct _ParamInfoRec {
0109 unsigned int count;
0110 Param paramlist;
0111 } ParamInfoRec, *ParamInfo;
0112
0113 typedef struct _QueuedRequestRec {
0114 Atom selection;
0115 Atom target;
0116 Atom param;
0117 XtSelectionCallbackProc callback;
0118 XtPointer closure;
0119 Time time;
0120 Boolean incremental;
0121 } QueuedRequestRec, *QueuedRequest;
0122
0123 typedef struct _QueuedRequestInfoRec {
0124 int count;
0125 Atom *selections;
0126 QueuedRequest *requests;
0127 } QueuedRequestInfoRec, *QueuedRequestInfo;
0128
0129 typedef struct {
0130 XtSelectionCallbackProc *callbacks;
0131 XtPointer *req_closure;
0132 Atom property;
0133 Atom *target;
0134 Atom type;
0135 int format;
0136 char *value;
0137 int bytelength;
0138 int offset;
0139 XtIntervalId timeout;
0140 XtEventHandler proc;
0141 Widget widget;
0142 Time time;
0143 Select ctx;
0144 Boolean *incremental;
0145 int current;
0146 } CallBackInfoRec, *CallBackInfo;
0147
0148 typedef struct {
0149 Atom target;
0150 Atom property;
0151 } IndirectPair;
0152
0153 #define IndirectPairWordSize 2
0154
0155 typedef struct {
0156 int active_transfer_count;
0157 } RequestWindowRec;
0158
0159 #define MAX_SELECTION_INCR(dpy) (((65536 < XMaxRequestSize(dpy)) ? \
0160 (65536 << 2) : (XMaxRequestSize(dpy) << 2))-100)
0161
0162 #define MATCH_SELECT(event, info) ((event->time == info->time) && \
0163 (event->requestor == XtWindow(info->widget)) && \
0164 (event->selection == info->ctx->selection) && \
0165 (event->target == *info->target))
0166
0167 #endif
0168