> Has anyone translated the XTest xtension of XFree86 to pascal yet? I think it would look something like this:
unit XTest; interface uses x, xlib; const X_XTestGetVersion = 0; X_XTestCompareCursor = 1; X_XTestFakeInput = 2; X_XTestGrabControl = 3; XTestNumberEvents = 0; XTestNumberErrors = 0; XTestMajorVersion = 2; XTestMinorVersion = 2; XTestExtensionName = 'XTEST'; type Bool =LongInt; TXInputClassInfo = record input_class : byte; event_type_base : byte; end; PXInputClassInfo = ^TXInputClassInfo; TXDevice = record device_id : TXID; num_classes : longint; classes : PXInputClassInfo; end; PXDevice = ^TXDevice; function XTestQueryExtension(dpy:PDisplay; event_basep:Plongint; error_basep:Plongint; majorp:Plongint; minorp:Plongint):Bool;cdecl;external; function XTestCompareCursorWithWindow(dpy:PDisplay; window:TWindow; cursor:TCursor):Bool;cdecl;external; function XTestCompareCurrentCursorWithWindow(dpy:PDisplay; win:TWindow):Bool;cdecl;external; function XTestFakeKeyEvent(dpy:PDisplay; keycode:dword; is_press:Bool; delay:dword):longint;cdecl;external; function XTestFakeButtonEvent(dpy:PDisplay; button:dword; is_press:Bool; delay:dword):longint;cdecl;external; function XTestFakeMotionEvent(dpy:PDisplay; screen:longint; x:longint; y:longint; delay:dword):longint;cdecl;external; function XTestFakeRelativeMotionEvent(dpy:PDisplay; x:longint; y:longint; delay:dword):longint;cdecl;external; function XTestFakeDeviceKeyEvent(dpy:PDisplay; dev:PXDevice; keycode:dword; is_press:Bool; axes:Plongint; n_axes:longint; delay:dword):longint;cdecl;external; function XTestFakeDeviceButtonEvent(dpy:PDisplay; dev:PXDevice; button:dword; is_press:Bool; axes:Plongint; n_axes:longint; delay:dword):longint;cdecl;external; function XTestFakeProximityEvent(dpy:PDisplay; dev:PXDevice;in_prox :Bool; axes:Plongint; n_axes:longint; delay :dword):longint;cdecl;external; function XTestFakeDeviceMotionEvent(dpy:PDisplay; dev:PXDevice; is_relative:Bool; first_axis:longint; axes:Plongint; n_axes :longint; delay:dword):longint;cdecl;external; function XTestGrabControl(dpy:PDisplay; impervious:Bool):longint;cdecl;external; procedure XTestSetGContextOfGC(gc:TGC; gid:TGContext);cdecl;external; procedure XTestSetVisualIDOfVisual(visual:PVisual; visualid:TVisualID);cdecl;external; function XTestDiscard(dpy:PDisplay):TStatus;cdecl;external; implementation end. ( compiles, but not tested ) - Jeff __________________________________ Do you Yahoo!? Yahoo! Mail - More reliable, more storage, less spam http://mail.yahoo.com _______________________________________________ fpc-pascal maillist - [EMAIL PROTECTED] http://lists.freepascal.org/mailman/listinfo/fpc-pascal