diff options
| author | marco <marco@3ad0048d-3df7-0310-abae-a5850022a9f2> | 2010-03-06 10:47:29 +0000 |
|---|---|---|
| committer | marco <marco@3ad0048d-3df7-0310-abae-a5850022a9f2> | 2010-03-06 10:47:29 +0000 |
| commit | cbb2b3ed305933102b26b99e5106fd29a7336b17 (patch) | |
| tree | e9875172370f28e4082c784ae8f24bfff305f9fb /packages/x11 | |
| parent | 5130d132c3208c32316d0c1b8ebff7aea20d7b8f (diff) | |
| download | fpc-cbb2b3ed305933102b26b99e5106fd29a7336b17.tar.gz | |
* patch from Nikolay that fixes more Tboolresult issues. Fixes mants 15891
git-svn-id: http://svn.freepascal.org/svn/fpc/trunk@14977 3ad0048d-3df7-0310-abae-a5850022a9f2
Diffstat (limited to 'packages/x11')
| -rw-r--r-- | packages/x11/src/xf86dga.pp | 8 | ||||
| -rw-r--r-- | packages/x11/src/xf86dga1.inc | 6 | ||||
| -rw-r--r-- | packages/x11/src/xf86vmode.pp | 50 | ||||
| -rw-r--r-- | packages/x11/src/xrandr.pp | 2 | ||||
| -rw-r--r-- | packages/x11/src/xrender.pp | 2 | ||||
| -rw-r--r-- | packages/x11/src/xshm.pp | 15 | ||||
| -rw-r--r-- | packages/x11/src/xutil.pp | 2 | ||||
| -rw-r--r-- | packages/x11/src/xvlib.pp | 26 |
8 files changed, 74 insertions, 37 deletions
diff --git a/packages/x11/src/xf86dga.pp b/packages/x11/src/xf86dga.pp index 3510f31d12..abc31a68b3 100644 --- a/packages/x11/src/xf86dga.pp +++ b/packages/x11/src/xf86dga.pp @@ -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; diff --git a/packages/x11/src/xf86dga1.inc b/packages/x11/src/xf86dga1.inc index 3a6f3f7af6..2b53ba9673 100644 --- a/packages/x11/src/xf86dga1.inc +++ b/packages/x11/src/xf86dga1.inc @@ -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; diff --git a/packages/x11/src/xf86vmode.pp b/packages/x11/src/xf86vmode.pp index f61115e6f4..81dd63d9d6 100644 --- a/packages/x11/src/xf86vmode.pp +++ b/packages/x11/src/xf86vmode.pp @@ -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); diff --git a/packages/x11/src/xrandr.pp b/packages/x11/src/xrandr.pp index 3f173cb93d..438f38e652 100644 --- a/packages/x11/src/xrandr.pp +++ b/packages/x11/src/xrandr.pp @@ -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; diff --git a/packages/x11/src/xrender.pp b/packages/x11/src/xrender.pp index 5e16f619c7..8b4bfbb189 100644 --- a/packages/x11/src/xrender.pp +++ b/packages/x11/src/xrender.pp @@ -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; diff --git a/packages/x11/src/xshm.pp b/packages/x11/src/xshm.pp index 300d5d7413..41ad156884 100644 --- a/packages/x11/src/xshm.pp +++ b/packages/x11/src/xshm.pp @@ -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. diff --git a/packages/x11/src/xutil.pp b/packages/x11/src/xutil.pp index 28ae650d23..1ff1b26425 100644 --- a/packages/x11/src/xutil.pp +++ b/packages/x11/src/xutil.pp @@ -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; diff --git a/packages/x11/src/xvlib.pp b/packages/x11/src/xvlib.pp index 5b15df7410..d529118313 100644 --- a/packages/x11/src/xvlib.pp +++ b/packages/x11/src/xvlib.pp @@ -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. |
