mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-27 11:10:23 +02:00
+ added unit xlbx (header translation of X11/extensions/XLbx.h)
This commit is contained in:
parent
cf1d3539fe
commit
1699471b8d
@ -161,6 +161,12 @@ begin
|
||||
AddUnit('x');
|
||||
AddUnit('xlib');
|
||||
end;
|
||||
T:=P.Targets.AddUnit('xlbx.pp');
|
||||
with T.Dependencies do
|
||||
begin
|
||||
AddInclude('lbx.inc');
|
||||
AddUnit('xlib');
|
||||
end;
|
||||
|
||||
{$ifndef ALLPACKAGES}
|
||||
Run;
|
||||
|
69
packages/x11/src/lbx.inc
Normal file
69
packages/x11/src/lbx.inc
Normal file
@ -0,0 +1,69 @@
|
||||
(*
|
||||
* Copyright 1992 Network Computing Devices
|
||||
*
|
||||
* Permission to use, copy, modify, distribute, and sell this software and its
|
||||
* documentation for any purpose is hereby granted without fee, provided that
|
||||
* the above copyright notice appear in all copies and that both that
|
||||
* copyright notice and this permission notice appear in supporting
|
||||
* documentation, and that the name of NCD. not be used in advertising or
|
||||
* publicity pertaining to distribution of the software without specific,
|
||||
* written prior permission. NCD. makes no representations about the
|
||||
* suitability of this software for any purpose. It is provided "as is"
|
||||
* without express or implied warranty.
|
||||
*
|
||||
* NCD. DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL NCD.
|
||||
* BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
||||
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION
|
||||
* OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
|
||||
* CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
*
|
||||
*)
|
||||
|
||||
const
|
||||
LBXNAME = 'LBX';
|
||||
|
||||
LBX_MAJOR_VERSION = 1;
|
||||
LBX_MINOR_VERSION = 0;
|
||||
|
||||
LbxNumberReqs = 44;
|
||||
LbxEvent = 0;
|
||||
LbxQuickMotionDeltaEvent = 1;
|
||||
LbxNumberEvents = 2;
|
||||
|
||||
{ This is always the master client }
|
||||
LbxMasterClientIndex = 0;
|
||||
|
||||
{ LbxEvent lbxType sub-fields }
|
||||
LbxSwitchEvent = 0;
|
||||
LbxCloseEvent = 1;
|
||||
LbxDeltaEvent = 2;
|
||||
LbxInvalidateTagEvent = 3;
|
||||
LbxSendTagDataEvent = 4;
|
||||
LbxListenToOne = 5;
|
||||
LbxListenToAll = 6;
|
||||
LbxMotionDeltaEvent = 7;
|
||||
LbxReleaseCmapEvent = 8;
|
||||
LbxFreeCellsEvent = 9;
|
||||
|
||||
(*
|
||||
* Lbx image compression methods
|
||||
*
|
||||
* No compression is always assigned the value of 0.
|
||||
*
|
||||
* The rest of the compression method opcodes are assigned dynamically
|
||||
* at option negotiation time.
|
||||
*)
|
||||
|
||||
LbxImageCompressNone = 0;
|
||||
|
||||
|
||||
BadLbxClient = 0;
|
||||
LbxNumberErrors = BadLbxClient + 1;
|
||||
|
||||
{ tagged data types }
|
||||
LbxTagTypeModmap = 1;
|
||||
LbxTagTypeKeymap = 2;
|
||||
LbxTagTypeProperty = 3;
|
||||
LbxTagTypeFont = 4;
|
||||
LbxTagTypeConnInfo = 5;
|
51
packages/x11/src/xlbx.pp
Normal file
51
packages/x11/src/xlbx.pp
Normal file
@ -0,0 +1,51 @@
|
||||
(*
|
||||
* Copyright 1992 Network Computing Devices
|
||||
*
|
||||
* Permission to use, copy, modify, distribute, and sell this software and its
|
||||
* documentation for any purpose is hereby granted without fee, provided that
|
||||
* the above copyright notice appear in all copies and that both that
|
||||
* copyright notice and this permission notice appear in supporting
|
||||
* documentation, and that the name of NCD. not be used in advertising or
|
||||
* publicity pertaining to distribution of the software without specific,
|
||||
* written prior permission. NCD. makes no representations about the
|
||||
* suitability of this software for any purpose. It is provided "as is"
|
||||
* without express or implied warranty.
|
||||
*
|
||||
* NCD. DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL NCD.
|
||||
* BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
||||
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION
|
||||
* OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
|
||||
* CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
*
|
||||
*)
|
||||
|
||||
unit xlbx;
|
||||
|
||||
interface
|
||||
|
||||
uses
|
||||
ctypes, xlib;
|
||||
|
||||
const
|
||||
libXext = 'Xext';
|
||||
|
||||
{$I lbx.inc}
|
||||
|
||||
function XLbxQueryExtension(
|
||||
dpy: PDisplay;
|
||||
requestp,
|
||||
event_basep,
|
||||
error_basep: Pcint
|
||||
): TBoolResult; cdecl; external libXext;
|
||||
|
||||
function XLbxQueryVersion(
|
||||
dpy: PDisplay;
|
||||
majorVersion,
|
||||
minorVersion: Pcint
|
||||
): TBoolResult; cdecl; external libXext;
|
||||
|
||||
function XLbxGetEventBase(dpy: PDisplay): cint; cdecl; external libXext;
|
||||
|
||||
implementation
|
||||
end.
|
10
packages/x11/tests/xlbx_linktest.pp
Normal file
10
packages/x11/tests/xlbx_linktest.pp
Normal file
@ -0,0 +1,10 @@
|
||||
{ this program just links all externals, declared in the xlbx unit }
|
||||
program xlbx_linktest;
|
||||
uses
|
||||
xlbx;
|
||||
begin
|
||||
halt(0);
|
||||
XLbxQueryExtension(nil,nil,nil,nil);
|
||||
XLbxQueryVersion(nil,nil,nil);
|
||||
XLbxGetEventBase(nil);
|
||||
end.
|
Loading…
Reference in New Issue
Block a user