1 /*
2 
3 Copyright 1989, 1998  The Open Group
4 
5 Permission to use, copy, modify, distribute, and sell this software and its
6 documentation for any purpose is hereby granted without fee, provided that
7 the above copyright notice appear in all copies and that both that
8 copyright notice and this permission notice appear in supporting
9 documentation.
10 
11 The above copyright notice and this permission notice shall be included
12 in all copies or substantial portions of the Software.
13 
14 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
15 OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
16 MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
17 IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR
18 OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
19 ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
20 OTHER DEALINGS IN THE SOFTWARE.
21 
22 Except as contained in this notice, the name of The Open Group shall
23 not be used in advertising or otherwise to promote the sale, use or
24 other dealings in this Software without prior written authorization
25 from The Open Group.
26 
27 */
28 
29 /*
30  * Author:  Davor Matic, MIT X Consortium
31  */
32 
33 #ifndef _Requests_h
34 #define _Requests_h
35 
36 typedef int (*DrawOnePointProc)(Widget, Position, Position, int);
37 typedef int (*DrawTwoPointProc)(Widget, Position, Position,
38 				Position, Position, int);
39 typedef int (*InterfaceProc)(Widget);
40 
41 typedef struct {
42     Boolean  success;
43     Position at_x, at_y;
44     Position from_x, from_y,
45              to_x, to_y;
46     XtPointer draw;
47     int      value;
48     Time     btime;
49     int      state;
50 } BWStatus;
51 
52 extern void OnePointEngage ( Widget w, BWStatus *status, XtPointer draw, int *state );
53 extern void OnePointTerminate ( Widget w, BWStatus *status, XtPointer draw );
54 extern void OnePointTerminateTransparent ( Widget w, BWStatus *status, XtPointer draw );
55 extern void DragOnePointEngage ( Widget w, BWStatus *status, XtPointer draw, int *state );
56 extern void DragOnePointTerminate ( Widget w, BWStatus *status, XtPointer client_data );
57 extern void TwoPointsEngage ( Widget w, BWStatus *status, XtPointer draw, int *state );
58 extern void TwoPointsTerminate ( Widget w, BWStatus *status, XtPointer draw );
59 extern void TwoPointsTerminateTransparent ( Widget w, BWStatus *status, XtPointer draw );
60 extern void TwoPointsTerminateTimed ( Widget w, BWStatus *status, XtPointer draw );
61 extern void DragTwoPointsEngage ( Widget w, BWStatus *status, XtPointer draw, int *state );
62 extern void DragTwoPointsTerminate ( Widget w, BWStatus *status, XtPointer draw );
63 extern void Interface ( Widget w, BWStatus *status, XtPointer action );
64 extern void Paste ( Widget w, Position at_x, Position at_y, int value );
65 
66 extern void BWDragMarked(Widget w, Position at_x, Position at_y);
67 extern void BWDragStored(Widget w, Position at_x, Position at_y);
68 extern void BWCopy(Widget w, Position at_x, Position at_y, int value);
69 extern void BWMove(Widget w, Position at_x, Position at_y, int value);
70 extern void BWRestore(Widget w, Position at_x, Position at_y, int value);
71 extern void BWDrawPoint(Widget w, Position x, Position y, bit value);
72 extern void BWBlindLine(Widget w, Position from_x, Position from_y,
73 			Position to_x, Position to_y, int value);
74 extern void BWDrawHotSpot(Widget w, Position x, Position y, int value);
75 extern void BWZoomIn(Widget w, Position from_x, Position from_y,
76 		     Position to_x, Position to_y);
77 
78 extern void OnePointHandler(Widget w, XtPointer client_data,
79 			    XEvent *event, Boolean *cont);
80 extern void TwoPointsHandler(Widget w, XtPointer client_data,
81 			     XEvent *event, Boolean *cont);
82 extern void DragTwoPointsHandler(Widget w, XtPointer client_data,
83 				 XEvent *event, Boolean *cont);
84 
85 #endif /* _Requests_h */
86