1 /***********************************************************************/
2 /* Open Visualization Data Explorer                                    */
3 /* (C) Copyright IBM Corp. 1989,1999                                   */
4 /* ALL RIGHTS RESERVED                                                 */
5 /* This code licensed under the                                        */
6 /*    "IBM PUBLIC LICENSE - Open Visualization Data Explorer"          */
7 /***********************************************************************/
8 
9 #include <dxconfig.h>
10 
11 
12 #ifndef _CLIPNOTIFY_H_
13 #define _CLIPNOTIFY_H_
14 #if defined(__cplusplus) || defined(c_plusplus)
15 extern "C" {
16 #endif
17 /*
18  *-----------------------------------------------------------------------------
19  */
20 int XClipNotifyGetVersion(
21     Display *dpy, int major_version_return, int minor_version_return);
22 /*
23  *      Gets the major and minor version numbers of the extension.  The return
24  *      value is zero if an error occurs or non-zero if no error happens.
25  *
26  *-----------------------------------------------------------------------------
27  */
28 int XClipNotifyGetLUN(Display *dpy, unsigned char *lun);
29 /*
30  *      Gets the number of the HPPI LUN for this display
31  *
32  *-----------------------------------------------------------------------------
33  */
34 int XClipNotifyGetTransparent(Display *dpy, unsigned char *pixel);
35 /*
36  *      Gets the number of the transparent pixel for this display
37  *
38  *-----------------------------------------------------------------------------
39  */
40 void XClipNotifyAddWin(Display *dpy, Window w);
41 /*
42  *      Request notification of any changes made in this window's cliplist.
43  *      Add this client to the list of clients to be notified when this
44  *      window's cliplist changes.
45  *
46  *-----------------------------------------------------------------------------
47  */
48 void XClipNotifyRemoveWin(Display *dpy, Window w);
49 /*
50  *      Request no further notification of any changes made in this
51  *      window's cliplist. Remove this client from the list of cleints to be
52  *      notified when this window's cliplist changes.
53  *
54  *-----------------------------------------------------------------------------
55  */
56 void XClipNotifyRemoveAll(Display *dpy);
57 /*
58  *      Request no further notification of any changes made to
59  *      all the window's cliplists previously requested. Remove this client
60  *      all windows' clipnotify lists.
61  *
62  *-----------------------------------------------------------------------------
63  */
64 void XClipNotifyInitHPPI (Display *dpy);
65 /*
66  *      Request initialization of the HPPI interface card to receive data.
67  *
68  *-----------------------------------------------------------------------------
69  */
70 
71 #define CLIPNOTIFY_PROTOCOL_NAME "ClipNotify"
72 
73 #define CLIPNOTIFY_MAJOR_VERSION        1       /* current version numbers */
74 #define CLIPNOTIFY_MINOR_VERSION        0
75 
76 /*
77  * ClipNotify request type values
78 */
79 #define X_ClipNotifyGetVersion          0
80 #define X_ClipNotifyGetLUN              1
81 #define X_ClipNotifyGetTransparent      2
82 #define X_ClipNotifyAddWin              3
83 #define X_ClipNotifyRemoveWin           4
84 #define X_ClipNotifyRemoveAll           5
85 #define X_ClipNotifyInitHPPI            6
86 #define X_ClipNotifyStopHPPI            7
87 #define X_ClipNotifyStartHPPI           8
88 
89 /*
90  * ClipNotify event type values
91 */
92 #define ClipNotifyEvent                 0
93 #define ClipNotifyHdrError              1
94 #define ClipNotifyDataErrors            2
95 #define ClipNotifyNumberEvents          (ClipNotifyDataErrors + 1)
96 
97 
98 #ifndef _CLIPNOTIFY_SERVER_
99 
100 /*
101  * Extra definitions that will only be needed in the client
102  */
103 
104 typedef struct {
105     int type;               /* of event */
106     unsigned long serial;   /* # of last request processed by server */
107     int send_event;         /* true if this came frome a SendEvent request */
108     Display *display;       /* Display the event was read from */
109     Window  window;
110     int     xorg, yorg;     /* screen adr of the window origin */
111     int     x,y;            /* box upper left corner relative to the window */
112     int     width,height;   /* box width and box height */
113     int     count;          /* if non-zero, at least this many more */
114 } XClipNotifyEvent;
115 
116 typedef struct {
117     int type;               /* of event */
118     unsigned long serial;   /* # of last request processed by server */
119     int send_event;         /* true if this came frome a SendEvent request */
120     Display *display;       /* Display the event was read from */
121     Window  window;
122 } XClipNotifyHdrErrorEvent;
123 
124 typedef struct {
125     int type;               /* of event */
126     unsigned long serial;   /* # of last request processed by server */
127     int send_event;         /* true if this came frome a SendEvent request */
128     Display *display;       /* Display the event was read from */
129     Window  window;
130     int     num_errors;     /* number of errors detected */
131     int     etime;          /* elapses time interval in seconds */
132 } XClipNotifyDataErrorsEvent;
133 
134 #endif /* _CLIPNOTIFY_SERVER_ */
135 
136 #if defined(__cplusplus) || defined(c_plusplus)
137 }
138 #endif
139 
140 #endif /* _CLIPNOTIFY_H_ */
141