+ added unit xlbx (header translation of X11/extensions/XLbx.h)

This commit is contained in:
Nikolay Nikolov 2021-08-05 23:09:40 +03:00
parent cf1d3539fe
commit 1699471b8d
4 changed files with 136 additions and 0 deletions

View File

@ -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
View 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
View 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.

View 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.