Fixed libX11, libXrender bindings for macos and linux.
This commit is contained in:
parent
3e4dec3cf4
commit
37b660dd78
2 changed files with 29 additions and 18 deletions
|
|
@ -2,8 +2,12 @@
|
||||||
import
|
import
|
||||||
x
|
x
|
||||||
|
|
||||||
const
|
when defined(macosx):
|
||||||
libX11* = "libX11.so"
|
const
|
||||||
|
libX11* = "libX11.dylib"
|
||||||
|
else:
|
||||||
|
const
|
||||||
|
libX11* = "libX11.so"
|
||||||
|
|
||||||
type
|
type
|
||||||
cunsigned* = cint
|
cunsigned* = cint
|
||||||
|
|
|
||||||
|
|
@ -2,8 +2,15 @@
|
||||||
import
|
import
|
||||||
x, xlib
|
x, xlib
|
||||||
|
|
||||||
|
when defined(macosx):
|
||||||
|
const
|
||||||
|
libXrender* = "libXrender.dylib"
|
||||||
|
else:
|
||||||
|
const
|
||||||
|
libXrender* = "libXrender.so"
|
||||||
|
|
||||||
#const
|
#const
|
||||||
# libX11* = "libX11.so"
|
# libXrender* = "libXrender.so"
|
||||||
|
|
||||||
#
|
#
|
||||||
# Automatically converted by H2Pas 0.99.15 from xrender.h
|
# Automatically converted by H2Pas 0.99.15 from xrender.h
|
||||||
|
|
@ -188,44 +195,44 @@ type
|
||||||
|
|
||||||
proc XRenderQueryExtension*(dpy: PDisplay, event_basep: ptr int32,
|
proc XRenderQueryExtension*(dpy: PDisplay, event_basep: ptr int32,
|
||||||
error_basep: ptr int32): TBool{.cdecl,
|
error_basep: ptr int32): TBool{.cdecl,
|
||||||
dynlib: libX11, importc.}
|
dynlib: libXrender, importc.}
|
||||||
proc XRenderQueryVersion*(dpy: PDisplay, major_versionp: ptr int32,
|
proc XRenderQueryVersion*(dpy: PDisplay, major_versionp: ptr int32,
|
||||||
minor_versionp: ptr int32): TStatus{.cdecl,
|
minor_versionp: ptr int32): TStatus{.cdecl,
|
||||||
dynlib: libX11, importc.}
|
dynlib: libXrender, importc.}
|
||||||
proc XRenderQueryFormats*(dpy: PDisplay): TStatus{.cdecl, dynlib: libX11,
|
proc XRenderQueryFormats*(dpy: PDisplay): TStatus{.cdecl, dynlib: libXrender,
|
||||||
importc.}
|
importc.}
|
||||||
proc XRenderFindVisualFormat*(dpy: PDisplay, visual: PVisual): PXRenderPictFormat{.
|
proc XRenderFindVisualFormat*(dpy: PDisplay, visual: PVisual): PXRenderPictFormat{.
|
||||||
cdecl, dynlib: libX11, importc.}
|
cdecl, dynlib: libXrender, importc.}
|
||||||
proc XRenderFindFormat*(dpy: PDisplay, mask: int32,
|
proc XRenderFindFormat*(dpy: PDisplay, mask: int32,
|
||||||
`template`: PXRenderPictFormat, count: int32): PXRenderPictFormat{.
|
`template`: PXRenderPictFormat, count: int32): PXRenderPictFormat{.
|
||||||
cdecl, dynlib: libX11, importc.}
|
cdecl, dynlib: libXrender, importc.}
|
||||||
proc XRenderCreatePicture*(dpy: PDisplay, drawable: TDrawable,
|
proc XRenderCreatePicture*(dpy: PDisplay, drawable: TDrawable,
|
||||||
format: PXRenderPictFormat, valuemask: int32,
|
format: PXRenderPictFormat, valuemask: int32,
|
||||||
attributes: PXRenderPictureAttributes): TPicture{.
|
attributes: PXRenderPictureAttributes): TPicture{.
|
||||||
cdecl, dynlib: libX11, importc.}
|
cdecl, dynlib: libXrender, importc.}
|
||||||
proc XRenderChangePicture*(dpy: PDisplay, picture: TPicture, valuemask: int32,
|
proc XRenderChangePicture*(dpy: PDisplay, picture: TPicture, valuemask: int32,
|
||||||
attributes: PXRenderPictureAttributes){.cdecl,
|
attributes: PXRenderPictureAttributes){.cdecl,
|
||||||
dynlib: libX11, importc.}
|
dynlib: libXrender, importc.}
|
||||||
proc XRenderFreePicture*(dpy: PDisplay, picture: TPicture){.cdecl,
|
proc XRenderFreePicture*(dpy: PDisplay, picture: TPicture){.cdecl,
|
||||||
dynlib: libX11, importc.}
|
dynlib: libXrender, importc.}
|
||||||
proc XRenderComposite*(dpy: PDisplay, op: int32, src: TPicture, mask: TPicture,
|
proc XRenderComposite*(dpy: PDisplay, op: int32, src: TPicture, mask: TPicture,
|
||||||
dst: TPicture, src_x: int32, src_y: int32, mask_x: int32,
|
dst: TPicture, src_x: int32, src_y: int32, mask_x: int32,
|
||||||
mask_y: int32, dst_x: int32, dst_y: int32, width: int32,
|
mask_y: int32, dst_x: int32, dst_y: int32, width: int32,
|
||||||
height: int32){.cdecl, dynlib: libX11, importc.}
|
height: int32){.cdecl, dynlib: libXrender, importc.}
|
||||||
proc XRenderCreateGlyphSet*(dpy: PDisplay, format: PXRenderPictFormat): TGlyphSet{.
|
proc XRenderCreateGlyphSet*(dpy: PDisplay, format: PXRenderPictFormat): TGlyphSet{.
|
||||||
cdecl, dynlib: libX11, importc.}
|
cdecl, dynlib: libXrender, importc.}
|
||||||
proc XRenderReferenceGlyphSet*(dpy: PDisplay, existing: TGlyphSet): TGlyphSet{.
|
proc XRenderReferenceGlyphSet*(dpy: PDisplay, existing: TGlyphSet): TGlyphSet{.
|
||||||
cdecl, dynlib: libX11, importc.}
|
cdecl, dynlib: libXrender, importc.}
|
||||||
proc XRenderFreeGlyphSet*(dpy: PDisplay, glyphset: TGlyphSet){.cdecl,
|
proc XRenderFreeGlyphSet*(dpy: PDisplay, glyphset: TGlyphSet){.cdecl,
|
||||||
dynlib: libX11, importc.}
|
dynlib: libXrender, importc.}
|
||||||
proc XRenderAddGlyphs*(dpy: PDisplay, glyphset: TGlyphSet, gids: PGlyph,
|
proc XRenderAddGlyphs*(dpy: PDisplay, glyphset: TGlyphSet, gids: PGlyph,
|
||||||
glyphs: PXGlyphInfo, nglyphs: int32, images: cstring,
|
glyphs: PXGlyphInfo, nglyphs: int32, images: cstring,
|
||||||
nbyte_images: int32){.cdecl, dynlib: libX11, importc.}
|
nbyte_images: int32){.cdecl, dynlib: libXrender, importc.}
|
||||||
proc XRenderFreeGlyphs*(dpy: PDisplay, glyphset: TGlyphSet, gids: PGlyph,
|
proc XRenderFreeGlyphs*(dpy: PDisplay, glyphset: TGlyphSet, gids: PGlyph,
|
||||||
nglyphs: int32){.cdecl, dynlib: libX11, importc.}
|
nglyphs: int32){.cdecl, dynlib: libXrender, importc.}
|
||||||
proc XRenderCompositeString8*(dpy: PDisplay, op: int32, src: TPicture,
|
proc XRenderCompositeString8*(dpy: PDisplay, op: int32, src: TPicture,
|
||||||
dst: TPicture, maskFormat: PXRenderPictFormat,
|
dst: TPicture, maskFormat: PXRenderPictFormat,
|
||||||
glyphset: TGlyphSet, xSrc: int32, ySrc: int32,
|
glyphset: TGlyphSet, xSrc: int32, ySrc: int32,
|
||||||
xDst: int32, yDst: int32, str: cstring,
|
xDst: int32, yDst: int32, str: cstring,
|
||||||
nchar: int32){.cdecl, dynlib: libX11, importc.}
|
nchar: int32){.cdecl, dynlib: libXrender, importc.}
|
||||||
# implementation
|
# implementation
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue