mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-09-11 18:49:14 +02:00
* patch from Nikolay that fixes more Tboolresult issues. Fixes mants 15891
git-svn-id: trunk@14977 -
This commit is contained in:
parent
502ac4c8a5
commit
e00c47f005
@ -157,13 +157,13 @@ Function XDGAQueryExtension(
|
||||
dpy : PDisplay;
|
||||
eventBase : Pcint;
|
||||
erroBase : Pcint
|
||||
) : TBool; CDecl; External libXxf86dga;
|
||||
) : TBoolResult; CDecl; External libXxf86dga;
|
||||
|
||||
Function XDGAQueryVersion(
|
||||
dpy : PDisplay;
|
||||
majorVersion : Pcint;
|
||||
minorVersion : Pcint
|
||||
) : TBool; CDecl; External libXxf86dga;
|
||||
) : TBoolResult; CDecl; External libXxf86dga;
|
||||
|
||||
Function XDGAQueryModes(
|
||||
dpy : PDisplay;
|
||||
@ -180,7 +180,7 @@ Function XDGASetMode(
|
||||
Function XDGAOpenFramebuffer(
|
||||
dpy : PDisplay;
|
||||
screen : cint
|
||||
) : TBool; CDecl; External libXxf86dga;
|
||||
) : TBoolResult; CDecl; External libXxf86dga;
|
||||
|
||||
Procedure XDGACloseFramebuffer(
|
||||
dpy : PDisplay;
|
||||
@ -259,7 +259,7 @@ Procedure XDGASync(
|
||||
|
||||
Function XDGASetClientVersion(
|
||||
dpy : PDisplay
|
||||
) : TBool; CDecl; External libXxf86dga;
|
||||
) : TBoolResult; CDecl; External libXxf86dga;
|
||||
|
||||
Procedure XDGAChangePixmapMode(
|
||||
dpy : PDisplay;
|
||||
|
@ -38,13 +38,13 @@ Function XF86DGAQueryVersion(
|
||||
dpy : PDisplay;
|
||||
majorVersion : Pcint;
|
||||
minorVersion : Pcint
|
||||
) : TBool; CDecl; External libXxf86dga;
|
||||
) : TBoolResult; CDecl; External libXxf86dga;
|
||||
|
||||
Function XF86DGAQueryExtension(
|
||||
dpy : PDisplay;
|
||||
event_base : Pcint;
|
||||
error_base : Pcint
|
||||
) : TBool; CDecl; External libXxf86dga;
|
||||
) : TBoolResult; CDecl; External libXxf86dga;
|
||||
|
||||
Function XF86DGAGetVideoLL(
|
||||
dpy : PDisplay;
|
||||
@ -122,4 +122,4 @@ Function XF86DGAViewPortChanged(
|
||||
dpy : PDisplay;
|
||||
screen : cint;
|
||||
n : cint
|
||||
) : TBool; CDecl; External libXxf86dga;
|
||||
) : TBoolResult; CDecl; External libXxf86dga;
|
||||
|
@ -172,58 +172,58 @@ Type
|
||||
End;
|
||||
|
||||
{$IFDEF MACROS}
|
||||
Function XF86VidModeSelectNextMode(disp : PDisplay; scr : cint) : TBool;
|
||||
Function XF86VidModeSelectPrevMode(disp : PDisplay; scr : cint) : TBool;
|
||||
Function XF86VidModeSelectNextMode(disp : PDisplay; scr : cint) : TBoolResult;
|
||||
Function XF86VidModeSelectPrevMode(disp : PDisplay; scr : cint) : TBoolResult;
|
||||
{$ENDIF MACROS}
|
||||
|
||||
Function XF86VidModeQueryVersion(
|
||||
dpy : PDisplay;
|
||||
majorVersion : Pcint;
|
||||
minorVersion : Pcint
|
||||
) : TBool; CDecl; External libXxf86vm;
|
||||
) : TBoolResult; CDecl; External libXxf86vm;
|
||||
|
||||
Function XF86VidModeQueryExtension(
|
||||
dpy : PDisplay;
|
||||
event_base : Pcint;
|
||||
error_base : Pcint
|
||||
) : TBool; CDecl; External libXxf86vm;
|
||||
) : TBoolResult; CDecl; External libXxf86vm;
|
||||
|
||||
Function XF86VidModeSetClientVersion(
|
||||
dpy : PDisplay
|
||||
) : TBool; CDecl; External libXxf86vm;
|
||||
) : TBoolResult; CDecl; External libXxf86vm;
|
||||
|
||||
Function XF86VidModeGetModeLine(
|
||||
dpy : PDisplay;
|
||||
screen : cint;
|
||||
dotclock : Pcint;
|
||||
modeline : PXF86VidModeModeLine
|
||||
) : TBool; CDecl; External libXxf86vm;
|
||||
) : TBoolResult; CDecl; External libXxf86vm;
|
||||
|
||||
Function XF86VidModeGetAllModeLines(
|
||||
dpy : PDisplay;
|
||||
screen : cint;
|
||||
modecount : Pcint;
|
||||
modelinesPtr : PPPXF86VidModeModeInfo
|
||||
) : TBool; CDecl; External libXxf86vm;
|
||||
) : TBoolResult; CDecl; External libXxf86vm;
|
||||
|
||||
Function XF86VidModeAddModeLine(
|
||||
dpy : PDisplay;
|
||||
screen : cint;
|
||||
new_modeline : PXF86VidModeModeInfo;
|
||||
after_modeline : PXF86VidModeModeInfo
|
||||
) : TBool; CDecl; External libXxf86vm;
|
||||
) : TBoolResult; CDecl; External libXxf86vm;
|
||||
|
||||
Function XF86VidModeDeleteModeLine(
|
||||
dpy : PDisplay;
|
||||
screen : cint;
|
||||
modeline : PXF86VidModeModeInfo
|
||||
) : TBool; CDecl; External libXxf86vm;
|
||||
) : TBoolResult; CDecl; External libXxf86vm;
|
||||
|
||||
Function XF86VidModeModModeLine(
|
||||
dpy : PDisplay;
|
||||
screen : cint;
|
||||
modeline : PXF86VidModeModeLine
|
||||
) : TBool; CDecl; External libXxf86vm;
|
||||
) : TBoolResult; CDecl; External libXxf86vm;
|
||||
|
||||
Function XF86VidModeValidateModeLine(
|
||||
dpy : PDisplay;
|
||||
@ -235,39 +235,39 @@ Function XF86VidModeSwitchMode(
|
||||
dpy : PDisplay;
|
||||
screen : cint;
|
||||
zoom : cint
|
||||
) : TBool; CDecl; External libXxf86vm;
|
||||
) : TBoolResult; CDecl; External libXxf86vm;
|
||||
|
||||
Function XF86VidModeSwitchToMode(
|
||||
dpy : PDisplay;
|
||||
screen : cint;
|
||||
modeline : PXF86VidModeModeInfo
|
||||
) : TBool; CDecl; External libXxf86vm;
|
||||
) : TBoolResult; CDecl; External libXxf86vm;
|
||||
|
||||
Function XF86VidModeLockModeSwitch(
|
||||
dpy : PDisplay;
|
||||
screen : cint;
|
||||
lock : cint
|
||||
) : TBool; CDecl; External libXxf86vm;
|
||||
) : TBoolResult; CDecl; External libXxf86vm;
|
||||
|
||||
Function XF86VidModeGetMonitor(
|
||||
dpy : PDisplay;
|
||||
screen : cint;
|
||||
monitor : PXF86VidModeMonitor
|
||||
) : TBool; CDecl; External libXxf86vm;
|
||||
) : TBoolResult; CDecl; External libXxf86vm;
|
||||
|
||||
Function XF86VidModeGetViewPort(
|
||||
dpy : PDisplay;
|
||||
screen : cint;
|
||||
x_return : Pcint;
|
||||
y_return : Pcint
|
||||
) : TBool; CDecl; External libXxf86vm;
|
||||
) : TBoolResult; CDecl; External libXxf86vm;
|
||||
|
||||
Function XF86VidModeSetViewPort(
|
||||
dpy : PDisplay;
|
||||
screen : cint;
|
||||
x : cint;
|
||||
y : cint
|
||||
) : TBool; CDecl; External libXxf86vm;
|
||||
) : TBoolResult; CDecl; External libXxf86vm;
|
||||
|
||||
Function XF86VidModeGetDotClocks(
|
||||
dpy : PDisplay;
|
||||
@ -276,19 +276,19 @@ Function XF86VidModeGetDotClocks(
|
||||
number_of_clocks_return : Pcint;
|
||||
max_dot_clock_return : Pcint;
|
||||
clocks_return : PPcint
|
||||
) : TBool; CDecl; External libXxf86vm;
|
||||
) : TBoolResult; CDecl; External libXxf86vm;
|
||||
|
||||
Function XF86VidModeGetGamma(
|
||||
dpy : PDisplay;
|
||||
screen : cint;
|
||||
Gamma : PXF86VidModeGamma
|
||||
) : TBool; CDecl; External libXxf86vm;
|
||||
) : TBoolResult; CDecl; External libXxf86vm;
|
||||
|
||||
Function XF86VidModeSetGamma(
|
||||
dpy : PDisplay;
|
||||
screen : cint;
|
||||
Gamma : PXF86VidModeGamma
|
||||
) : TBool; CDecl; External libXxf86vm;
|
||||
) : TBoolResult; CDecl; External libXxf86vm;
|
||||
|
||||
Function XF86VidModeSetGammaRamp(
|
||||
dpy : PDisplay;
|
||||
@ -297,7 +297,7 @@ Function XF86VidModeSetGammaRamp(
|
||||
red_array : Pcushort;
|
||||
green_array : Pcushort;
|
||||
blue_array : Pcushort
|
||||
) : TBool; CDecl; External libXxf86vm;
|
||||
) : TBoolResult; CDecl; External libXxf86vm;
|
||||
|
||||
Function XF86VidModeGetGammaRamp(
|
||||
dpy : PDisplay;
|
||||
@ -306,30 +306,30 @@ Function XF86VidModeGetGammaRamp(
|
||||
red_array : Pcushort;
|
||||
green_array : Pcushort;
|
||||
blue_array : Pcushort
|
||||
) : TBool; CDecl; External libXxf86vm;
|
||||
) : TBoolResult; CDecl; External libXxf86vm;
|
||||
|
||||
Function XF86VidModeGetGammaRampSize(
|
||||
dpy : PDisplay;
|
||||
screen : cint;
|
||||
size : Pcint
|
||||
) : TBool; CDecl; External libXxf86vm;
|
||||
) : TBoolResult; CDecl; External libXxf86vm;
|
||||
|
||||
Function XF86VidModeGetPermissions(
|
||||
dpy : PDisplay;
|
||||
screen : cint;
|
||||
permissions : Pcint
|
||||
) : TBool; CDecl; External libXxf86vm;
|
||||
) : TBoolResult; CDecl; External libXxf86vm;
|
||||
|
||||
Implementation
|
||||
|
||||
{$IFDEF MACROS}
|
||||
Function XF86VidModeSelectNextMode(disp : PDisplay; scr : cint) : TBool;
|
||||
Function XF86VidModeSelectNextMode(disp : PDisplay; scr : cint) : TBoolResult;
|
||||
|
||||
Begin
|
||||
XF86VidModeSelectNextMode := XF86VidModeSwitchMode(disp, scr, 1);
|
||||
End;
|
||||
|
||||
Function XF86VidModeSelectPrevMode(disp : PDisplay; scr : cint) : TBool;
|
||||
Function XF86VidModeSelectPrevMode(disp : PDisplay; scr : cint) : TBoolResult;
|
||||
|
||||
Begin
|
||||
XF86VidModeSelectPrevMode := XF86VidModeSwitchMode(disp, scr, -1);
|
||||
|
@ -75,7 +75,7 @@ type
|
||||
function XRRQueryExtension(
|
||||
dpy : PDisplay;
|
||||
event_basep,
|
||||
error_basep : Pcint) : TBool; cdecl; external libXrandr;
|
||||
error_basep : Pcint) : TBoolResult; cdecl; external libXrandr;
|
||||
|
||||
function XRRQueryVersion(
|
||||
dpy : PDisplay;
|
||||
|
@ -206,7 +206,7 @@ type
|
||||
yOff : smallint;
|
||||
end;
|
||||
|
||||
function XRenderQueryExtension(dpy:PDisplay; event_basep:Plongint; error_basep:Plongint):TBool;cdecl;external libX11;
|
||||
function XRenderQueryExtension(dpy:PDisplay; event_basep:Plongint; error_basep:Plongint):TBoolResult;cdecl;external libX11;
|
||||
function XRenderQueryVersion(dpy:PDisplay; major_versionp:Plongint; minor_versionp:Plongint):TStatus;cdecl;external libX11;
|
||||
function XRenderQueryFormats(dpy:PDisplay):TStatus;cdecl;external libX11;
|
||||
function XRenderFindVisualFormat(dpy:PDisplay; visual:PVisual):PXRenderPictFormat;cdecl;external libX11;
|
||||
|
@ -65,9 +65,9 @@ type
|
||||
readOnly : TBool;
|
||||
end;
|
||||
|
||||
function XShmQueryExtension(para1:PDisplay):TBool;cdecl;external libX11;
|
||||
function XShmQueryExtension(para1:PDisplay):TBoolResult;cdecl;external libX11;
|
||||
function XShmGetEventBase(para1:PDisplay):cint;cdecl;external libX11;
|
||||
function XShmQueryVersion(para1:PDisplay; para2:Pcint; para3:Pcint; para4:PBool):TBool;cdecl;external libX11;
|
||||
function XShmQueryVersion(para1:PDisplay; para2:Pcint; para3:Pcint; para4:PBool):TBoolResult;cdecl;external libX11;
|
||||
function XShmPixmapFormat(para1:PDisplay):cint;cdecl;external libX11;
|
||||
function XShmAttach(para1:PDisplay; para2:PXShmSegmentInfo):TStatus;cdecl;external libX11;
|
||||
function XShmDetach(para1:PDisplay; para2:PXShmSegmentInfo):TStatus;cdecl;external libX11;
|
||||
@ -81,7 +81,18 @@ function XShmCreateImage(para1:PDisplay; para2:PVisual; para3:cuint; para4:cint;
|
||||
function XShmCreatePixmap(para1:PDisplay; para2:TDrawable; para3:Pchar; para4:PXShmSegmentInfo; para5:cuint;
|
||||
para6:cuint; para7:cuint):TPixmap;cdecl;external libX11;
|
||||
|
||||
{ overloaded functions to handle TBool parameters as actual booleans }
|
||||
function XShmPutImage(para1:PDisplay; para2:TDrawable; para3:TGC; para4:PXImage; para5:cint;
|
||||
para6:cint; para7:cint; para8:cint; para9:cuint; para10:cuint;
|
||||
para11:Boolean):TStatus;
|
||||
|
||||
implementation
|
||||
|
||||
function XShmPutImage(para1:PDisplay; para2:TDrawable; para3:TGC; para4:PXImage; para5:cint;
|
||||
para6:cint; para7:cint; para8:cint; para9:cuint; para10:cuint;
|
||||
para11:Boolean):TStatus;
|
||||
begin
|
||||
XShmPutImage := XShmPutImage(para1,para2,para3,para4,para5,para6,para7,para8,para9,para10,Ord(para11));
|
||||
end;
|
||||
|
||||
end.
|
||||
|
@ -243,7 +243,7 @@ procedure XConvertCase(para1:TKeySym; para2:PKeySym; para3:PKeySym);cdecl;extern
|
||||
function XLookupString(para1:PXKeyEvent; para2:Pchar; para3:cint; para4:PKeySym; para5:PXComposeStatus):cint;cdecl;external libX11;
|
||||
function XMatchVisualInfo(para1:PDisplay; para2:cint; para3:cint; para4:cint; para5:PXVisualInfo):TStatus;cdecl;external libX11;
|
||||
function XOffsetRegion(para1:TRegion; para2:cint; para3:cint):cint;cdecl;external libX11;
|
||||
function XPointInRegion(para1:TRegion; para2:cint; para3:cint):TBool;cdecl;external libX11;
|
||||
function XPointInRegion(para1:TRegion; para2:cint; para3:cint):TBoolResult;cdecl;external libX11;
|
||||
function XPolygonRegion(para1:PXPoint; para2:cint; para3:cint):TRegion;cdecl;external libX11;
|
||||
function XRectInRegion(para1:TRegion; para2:cint; para3:cint; para4:cuint; para5:cuint):cint;cdecl;external libX11;
|
||||
function XSaveContext(para1:PDisplay; para2:TXID; para3:TXContext; para4:Pchar):cint;cdecl;external libX11;
|
||||
|
@ -403,6 +403,32 @@ function XvShmCreateImage(
|
||||
shminfo : PXShmSegmentInfo
|
||||
) : PXvImage; cdecl; external libXv;
|
||||
|
||||
{ overloaded functions to handle TBool parameters as actual booleans }
|
||||
function XvSelectVideoNotify(display : PDisplay; drawable : TDrawable; onoff : Boolean): cint;
|
||||
function XvSelectPortNotify(display : PDisplay; port : TXvPortID; onoff : Boolean): cint;
|
||||
function XvQueryBestSize(display : PDisplay; port : TXvPortID; motion : Boolean; vid_w, vid_h, drw_w, drw_h : cuint; p_actual_width, p_actual_height : pcuint): cint;
|
||||
function XvShmPutImage(display : PDisplay; id : TXvPortID; d : TDrawable; gc : TGC; image : PXvImage; src_x, src_y : cint; src_w, src_h : cuint; dest_x, dest_y : cint; dest_w, dest_h : cuint; send_event : Boolean): cint;
|
||||
|
||||
implementation
|
||||
|
||||
function XvSelectVideoNotify(display : PDisplay; drawable : TDrawable; onoff : Boolean): cint;
|
||||
begin
|
||||
XvSelectVideoNotify := XvSelectVideoNotify(display, drawable, Ord(onoff));
|
||||
end;
|
||||
|
||||
function XvSelectPortNotify(display : PDisplay; port : TXvPortID; onoff : Boolean): cint;
|
||||
begin
|
||||
XvSelectPortNotify := XvSelectPortNotify(display, port, Ord(onoff));
|
||||
end;
|
||||
|
||||
function XvQueryBestSize(display : PDisplay; port : TXvPortID; motion : Boolean; vid_w, vid_h, drw_w, drw_h : cuint; p_actual_width, p_actual_height : pcuint): cint;
|
||||
begin
|
||||
XvQueryBestSize := XvQueryBestSize(display, port, Ord(motion), vid_w, vid_h, drw_w, drw_h, p_actual_width, p_actual_height);
|
||||
end;
|
||||
|
||||
function XvShmPutImage(display : PDisplay; id : TXvPortID; d : TDrawable; gc : TGC; image : PXvImage; src_x, src_y : cint; src_w, src_h : cuint; dest_x, dest_y : cint; dest_w, dest_h : cuint; send_event : Boolean): cint;
|
||||
begin
|
||||
XvShmPutImage := XvShmPutImage(display, id, d, gc, image, src_x, src_y, src_w, src_h, dest_x, dest_y, dest_w, dest_h, Ord(send_event));
|
||||
end;
|
||||
|
||||
end.
|
||||
|
Loading…
Reference in New Issue
Block a user