diff options
author | Kaleb Keithley <kaleb@freedesktop.org> | 2003-11-17 19:03:47 +0000 |
---|---|---|
committer | Kaleb Keithley <kaleb@freedesktop.org> | 2003-11-17 19:03:47 +0000 |
commit | 3e9f89c7239ae0cf1599277cc879a03cdf33b7c8 (patch) | |
tree | 602d4a70b9731fe873a020e8adcdd0b7923a805c /Requests.h | |
parent | 0bd1f9d8ccaf46397745779f5964f3b843186896 (diff) |
merge XFree86 4.3.0.1 to -CURRENT
Diffstat (limited to 'Requests.h')
-rw-r--r-- | Requests.h | 141 |
1 files changed, 41 insertions, 100 deletions
@@ -26,121 +26,62 @@ other dealings in this Software without prior written authorization from The Open Group. */ +/* $XFree86: xc/programs/bitmap/Requests.h,v 1.5 2001/12/14 20:00:41 dawes Exp $ */ /* * Author: Davor Matic, MIT X Consortium */ +#ifndef _Requests_h +#define _Requests_h + +typedef int (*DrawOnePointProc)(Widget, Position, Position, int); +typedef int (*DrawTwoPointProc)(Widget, Position, Position, + Position, Position, int); +typedef int (*InterfaceProc)(Widget); + typedef struct { Boolean success; Position at_x, at_y; Position from_x, from_y, to_x, to_y; - void (*draw)(); + XtPointer draw; int value; Time btime; int state; } BWStatus; -void OnePointEngage(); -void OnePointTerminate(); -void OnePointTerminateTransparent(); -void DragOnePointEngage(); -void DragOnePointTerminate(); -void TwoPointsEngage(); -void TwoPointsTerminate(); -void TwoPointsTerminateTransparent(); -void TwoPointsTerminateTimed(); -void DragTwoPointsEngage(); -void DragTwoPointsTerminate(); -void Interface(); -void Paste(); +extern void OnePointEngage ( Widget w, BWStatus *status, XtPointer draw, int *state ); +extern void OnePointTerminate ( Widget w, BWStatus *status, XtPointer draw ); +extern void OnePointTerminateTransparent ( Widget w, BWStatus *status, XtPointer draw ); +extern void DragOnePointEngage ( Widget w, BWStatus *status, XtPointer draw, int *state ); +extern void DragOnePointTerminate ( Widget w, BWStatus *status, XtPointer client_data ); +extern void TwoPointsEngage ( Widget w, BWStatus *status, XtPointer draw, int *state ); +extern void TwoPointsTerminate ( Widget w, BWStatus *status, XtPointer draw ); +extern void TwoPointsTerminateTransparent ( Widget w, BWStatus *status, XtPointer draw ); +extern void TwoPointsTerminateTimed ( Widget w, BWStatus *status, XtPointer draw ); +extern void DragTwoPointsEngage ( Widget w, BWStatus *status, XtPointer draw, int *state ); +extern void DragTwoPointsTerminate ( Widget w, BWStatus *status, XtPointer draw ); +extern void Interface ( Widget w, BWStatus *status, XtPointer action ); +extern void Paste ( Widget w, Position at_x, Position at_y, int value ); -void BWMark(); -void BWUnmark(); -void BWStore(); -void BWDragMarked(); -void BWDragStored(); -void BWRestore(); -void BWCopy(); -void BWMove(); -void BWDrawPoint(); -void BWDrawLine(); -void BWBlindLine(); -void BWDrawRectangle(); -void BWDrawFilledRectangle(); -void BWDrawCircle(); -void BWDrawFilledCircle(); -void BWFloodFill(); -void BWDrawHotSpot(); -void BWChangeNotify(); -void BWZoomIn(); +extern void BWDragMarked(Widget w, Position at_x, Position at_y); +extern void BWDragStored(Widget w, Position at_x, Position at_y); +extern void BWCopy(Widget w, Position at_x, Position at_y, int value); +extern void BWMove(Widget w, Position at_x, Position at_y, int value); +extern void BWRestore(Widget w, Position at_x, Position at_y, int value); +extern void BWDrawPoint(Widget w, Position x, Position y, bit value); +extern void BWBlindLine(Widget w, Position from_x, Position from_y, + Position to_x, Position to_y, int value); +extern void BWDrawHotSpot(Widget w, Position x, Position y, int value); +extern void BWZoomIn(Widget w, Position from_x, Position from_y, + Position to_x, Position to_y); -static BWRequestRec requests[] = /* SUPPRESS 592 */ -{ -{MarkRequest, sizeof(BWStatus), - TwoPointsEngage, (XtPointer) BWDrawRectangle, - TwoPointsTerminateTimed, (XtPointer) BWSelect, - NULL, (XtPointer) NULL}, -{RestoreRequest, sizeof(BWStatus), - OnePointEngage, (XtPointer) BWDragStored, - OnePointTerminate, (XtPointer) BWRestore, - NULL, (XtPointer) NULL}, -{ImmediateCopyRequest, sizeof(BWStatus), - OnePointEngage, (XtPointer) BWDragMarked, - OnePointTerminate, (XtPointer) BWCopy, - NULL, (XtPointer) NULL}, -{ImmediateMoveRequest, sizeof(BWStatus), - OnePointEngage, (XtPointer) BWDragMarked, - OnePointTerminate, (XtPointer) BWMove, - NULL, (XtPointer) NULL}, -{CopyRequest, sizeof(BWStatus), - DragOnePointEngage, (XtPointer) Paste, - DragOnePointTerminate, (XtPointer) ImmediateCopyRequest, - Interface, (XtPointer) BWUnmark}, -{MoveRequest, sizeof(BWStatus), - DragOnePointEngage, (XtPointer) Paste, - DragOnePointTerminate, (XtPointer) ImmediateMoveRequest, - Interface, (XtPointer) BWUnmark}, -{PointRequest, sizeof(BWStatus), - DragOnePointEngage, (XtPointer) BWDrawPoint, - DragOnePointTerminate, (XtPointer) BWDrawPoint, - NULL, (XtPointer) NULL}, -{CurveRequest, sizeof(BWStatus), - DragTwoPointsEngage, (XtPointer) BWBlindLine, - DragTwoPointsTerminate, (XtPointer) BWBlindLine, - NULL, (XtPointer) NULL}, -{LineRequest, sizeof(BWStatus), - TwoPointsEngage, (XtPointer) BWDrawLine, - TwoPointsTerminate, (XtPointer) BWDrawLine, - NULL, (XtPointer) NULL}, -{RectangleRequest, sizeof(BWStatus), - TwoPointsEngage, (XtPointer) BWDrawRectangle, - TwoPointsTerminate, (XtPointer) BWDrawRectangle, - NULL, (XtPointer) NULL}, -{FilledRectangleRequest, sizeof(BWStatus), - TwoPointsEngage, (XtPointer) BWDrawRectangle, - TwoPointsTerminate, (XtPointer) BWDrawFilledRectangle, - NULL, (XtPointer) NULL}, -{CircleRequest, sizeof(BWStatus), - TwoPointsEngage, (XtPointer) BWDrawCircle, - TwoPointsTerminate, (XtPointer) BWDrawCircle, - NULL, (XtPointer) NULL}, -{FilledCircleRequest, sizeof(BWStatus), - TwoPointsEngage, (XtPointer) BWDrawCircle, - TwoPointsTerminate, (XtPointer) BWDrawFilledCircle, - NULL, (XtPointer) NULL}, -{FloodFillRequest, sizeof(BWStatus), - OnePointEngage, (XtPointer) NULL, - OnePointTerminate, (XtPointer) BWFloodFill, - NULL, (XtPointer) NULL}, -{HotSpotRequest, sizeof(BWStatus), - OnePointEngage, (XtPointer) BWDrawHotSpot, - OnePointTerminate, (XtPointer) BWDrawHotSpot, - NULL, (XtPointer) NULL}, -{ZoomInRequest, sizeof(BWStatus), - TwoPointsEngage, (XtPointer) BWDrawRectangle, - TwoPointsTerminate, (XtPointer) BWZoomIn, - NULL, (XtPointer) NULL}, -}; +extern void OnePointHandler(Widget w, XtPointer client_data, + XEvent *event, Boolean *cont); +extern void TwoPointsHandler(Widget w, XtPointer client_data, + XEvent *event, Boolean *cont); +extern void DragTwoPointsHandler(Widget w, XtPointer client_data, + XEvent *event, Boolean *cont); +#endif /* _Requests_h */ |