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