p[] instead of p^
This commit is contained in:
parent
3d696c3da5
commit
46c41e4369
32 changed files with 242 additions and 346 deletions
|
|
@ -564,7 +564,7 @@ proc SetUserData*(parser: PParser, userData: pointer){.cdecl,
|
|||
# Returns the last value set by XML_SetUserData or NULL.
|
||||
|
||||
template GetUserData*(parser: expr): expr =
|
||||
(cast[ptr pointer]((parser))^ )
|
||||
(cast[ptr pointer]((parser))[] )
|
||||
|
||||
# This is equivalent to supplying an encoding argument to
|
||||
# XML_ParserCreate. On success XML_SetEncoding returns non-zero,
|
||||
|
|
|
|||
|
|
@ -3468,8 +3468,8 @@ when false:
|
|||
result = g_array_insert_vals(a, i, addr(v), 1)
|
||||
|
||||
proc g_ptr_array_index*(parray: PGPtrArray, index: guint): gpointer =
|
||||
result = cast[PGPointer](cast[int](parray ^. pdata) +
|
||||
index * SizeOf(GPointer))^
|
||||
result = cast[PGPointer](cast[int](parray []. pdata) +
|
||||
index * SizeOf(GPointer))[]
|
||||
|
||||
proc G_THREAD_ERROR*(): TGQuark =
|
||||
result = g_thread_error_quark()
|
||||
|
|
@ -3754,7 +3754,7 @@ proc TGIOChannel_set_is_seekable*(a: PGIOChannel, `is_seekable`: guint) =
|
|||
bm_TGIOChannel_is_seekable)
|
||||
|
||||
proc utf8_next_char*(p: pguchar): pguchar =
|
||||
result = cast[pguchar](cast[TAddress](p) + 1) # p + ord((g_utf8_skip + p^ )^ )
|
||||
result = cast[pguchar](cast[TAddress](p) + 1) # p + ord((g_utf8_skip + p[] )[] )
|
||||
|
||||
when false:
|
||||
proc GLIB_CHECK_VERSION*(major, minor, micro: guint): bool =
|
||||
|
|
|
|||
|
|
@ -10892,127 +10892,127 @@ proc FUNDAMENTAL_TYPE*(thetype: GType): GType =
|
|||
|
||||
proc VALUE_CHAR*(a: TArg): gchar =
|
||||
var a = a
|
||||
Result = cast[ptr gchar](addr(a.d))^
|
||||
Result = cast[ptr gchar](addr(a.d))[]
|
||||
|
||||
proc VALUE_UCHAR*(a: TArg): guchar =
|
||||
var a = a
|
||||
Result = cast[ptr guchar](addr(a.d))^
|
||||
Result = cast[ptr guchar](addr(a.d))[]
|
||||
|
||||
proc VALUE_BOOL*(a: TArg): gboolean =
|
||||
var a = a
|
||||
Result = cast[ptr gboolean](addr(a.d))^
|
||||
Result = cast[ptr gboolean](addr(a.d))[]
|
||||
|
||||
proc VALUE_INT*(a: TArg): gint =
|
||||
var a = a
|
||||
Result = cast[ptr gint](addr(a.d))^
|
||||
Result = cast[ptr gint](addr(a.d))[]
|
||||
|
||||
proc VALUE_UINT*(a: TArg): guint =
|
||||
var a = a
|
||||
Result = cast[ptr guint](addr(a.d))^
|
||||
Result = cast[ptr guint](addr(a.d))[]
|
||||
|
||||
proc VALUE_LONG*(a: TArg): glong =
|
||||
var a = a
|
||||
Result = cast[ptr glong](addr(a.d))^
|
||||
Result = cast[ptr glong](addr(a.d))[]
|
||||
|
||||
proc VALUE_ULONG*(a: TArg): gulong =
|
||||
var a = a
|
||||
Result = cast[ptr gulong](addr(a.d))^
|
||||
Result = cast[ptr gulong](addr(a.d))[]
|
||||
|
||||
proc VALUE_FLOAT*(a: TArg): gfloat =
|
||||
var a = a
|
||||
Result = cast[ptr gfloat](addr(a.d))^
|
||||
Result = cast[ptr gfloat](addr(a.d))[]
|
||||
|
||||
proc VALUE_DOUBLE*(a: TArg): gdouble =
|
||||
var a = a
|
||||
Result = cast[ptr gdouble](addr(a.d))^
|
||||
Result = cast[ptr gdouble](addr(a.d))[]
|
||||
|
||||
proc VALUE_STRING*(a: TArg): cstring =
|
||||
var a = a
|
||||
Result = cast[ptr cstring](addr(a.d))^
|
||||
Result = cast[ptr cstring](addr(a.d))[]
|
||||
|
||||
proc VALUE_ENUM*(a: TArg): gint =
|
||||
var a = a
|
||||
Result = cast[ptr gint](addr(a.d))^
|
||||
Result = cast[ptr gint](addr(a.d))[]
|
||||
|
||||
proc VALUE_FLAGS*(a: TArg): guint =
|
||||
var a = a
|
||||
Result = cast[ptr guint](addr(a.d))^
|
||||
Result = cast[ptr guint](addr(a.d))[]
|
||||
|
||||
proc VALUE_BOXED*(a: TArg): gpointer =
|
||||
var a = a
|
||||
Result = cast[ptr gpointer](addr(a.d))^
|
||||
Result = cast[ptr gpointer](addr(a.d))[]
|
||||
|
||||
proc VALUE_OBJECT*(a: TArg): PObject =
|
||||
var a = a
|
||||
Result = cast[ptr PObject](addr(a.d))^
|
||||
Result = cast[ptr PObject](addr(a.d))[]
|
||||
|
||||
proc VALUE_POINTER*(a: TArg): GPointer =
|
||||
var a = a
|
||||
Result = cast[ptr gpointer](addr(a.d))^
|
||||
Result = cast[ptr gpointer](addr(a.d))[]
|
||||
|
||||
proc VALUE_SIGNAL*(a: TArg): TArgSignalData =
|
||||
var a = a
|
||||
Result = cast[ptr TArgSignalData](addr(a.d))^
|
||||
Result = cast[ptr TArgSignalData](addr(a.d))[]
|
||||
|
||||
proc RETLOC_CHAR*(a: TArg): cstring =
|
||||
var a = a
|
||||
Result = cast[ptr cstring](addr(a.d))^
|
||||
Result = cast[ptr cstring](addr(a.d))[]
|
||||
|
||||
proc RETLOC_UCHAR*(a: TArg): Pguchar =
|
||||
var a = a
|
||||
Result = cast[ptr pguchar](addr(a.d))^
|
||||
Result = cast[ptr pguchar](addr(a.d))[]
|
||||
|
||||
proc RETLOC_BOOL*(a: TArg): Pgboolean =
|
||||
var a = a
|
||||
Result = cast[ptr pgboolean](addr(a.d))^
|
||||
Result = cast[ptr pgboolean](addr(a.d))[]
|
||||
|
||||
proc RETLOC_INT*(a: TArg): Pgint =
|
||||
var a = a
|
||||
Result = cast[ptr pgint](addr(a.d))^
|
||||
Result = cast[ptr pgint](addr(a.d))[]
|
||||
|
||||
proc RETLOC_UINT*(a: TArg): Pguint =
|
||||
var a = a
|
||||
Result = cast[ptr pguint](addr(a.d))^
|
||||
Result = cast[ptr pguint](addr(a.d))[]
|
||||
|
||||
proc RETLOC_LONG*(a: TArg): Pglong =
|
||||
var a = a
|
||||
Result = cast[ptr pglong](addr(a.d))^
|
||||
Result = cast[ptr pglong](addr(a.d))[]
|
||||
|
||||
proc RETLOC_ULONG*(a: TArg): Pgulong =
|
||||
var a = a
|
||||
Result = cast[ptr pgulong](addr(a.d))^
|
||||
Result = cast[ptr pgulong](addr(a.d))[]
|
||||
|
||||
proc RETLOC_FLOAT*(a: TArg): Pgfloat =
|
||||
var a = a
|
||||
Result = cast[ptr pgfloat](addr(a.d))^
|
||||
Result = cast[ptr pgfloat](addr(a.d))[]
|
||||
|
||||
proc RETLOC_DOUBLE*(a: TArg): Pgdouble =
|
||||
var a = a
|
||||
Result = cast[ptr pgdouble](addr(a.d))^
|
||||
Result = cast[ptr pgdouble](addr(a.d))[]
|
||||
|
||||
proc RETLOC_STRING*(a: TArg): Ppgchar =
|
||||
var a = a
|
||||
Result = cast[ptr Ppgchar](addr(a.d))^
|
||||
Result = cast[ptr Ppgchar](addr(a.d))[]
|
||||
|
||||
proc RETLOC_ENUM*(a: TArg): Pgint =
|
||||
var a = a
|
||||
Result = cast[ptr Pgint](addr(a.d))^
|
||||
Result = cast[ptr Pgint](addr(a.d))[]
|
||||
|
||||
proc RETLOC_FLAGS*(a: TArg): Pguint =
|
||||
var a = a
|
||||
Result = cast[ptr pguint](addr(a.d))^
|
||||
Result = cast[ptr pguint](addr(a.d))[]
|
||||
|
||||
proc RETLOC_BOXED*(a: TArg): Pgpointer =
|
||||
var a = a
|
||||
Result = cast[ptr pgpointer](addr(a.d))^
|
||||
Result = cast[ptr pgpointer](addr(a.d))[]
|
||||
|
||||
proc RETLOC_OBJECT*(a: TArg): PPGtkObject =
|
||||
var a = a
|
||||
Result = cast[ptr ppgtkobject](addr(a.d))^
|
||||
Result = cast[ptr ppgtkobject](addr(a.d))[]
|
||||
|
||||
proc RETLOC_POINTER*(a: TArg): Pgpointer =
|
||||
var a = a
|
||||
Result = cast[ptr pgpointer](addr(a.d))^
|
||||
Result = cast[ptr pgpointer](addr(a.d))[]
|
||||
|
||||
proc TYPE_WIDGET*(): GType =
|
||||
result = widget_get_type()
|
||||
|
|
|
|||
|
|
@ -1337,7 +1337,7 @@ proc PyImport_ExecCodeModule(name: string, codeobject: PPyObject): PPyObject =
|
|||
Py_XDECREF(v)
|
||||
modules = PyImport_GetModuleDict()
|
||||
if PyDict_GetItemString(modules, cstring(name)) == nil:
|
||||
PyErr_SetString(PyExc_ImportError^ , cstring(
|
||||
PyErr_SetString(PyExc_ImportError[] , cstring(
|
||||
"Loaded module " & name & "not found in sys.modules"))
|
||||
return nil
|
||||
Py_XINCREF(m)
|
||||
|
|
@ -1371,37 +1371,37 @@ proc PyTuple_Check(obj: PPyObject): bool =
|
|||
Result = PyObject_TypeCheck(obj, PyTuple_Type)
|
||||
|
||||
proc PyTuple_CheckExact(obj: PPyObject): bool =
|
||||
Result = (obj != nil) and (obj^ .ob_type == PyTuple_Type)
|
||||
Result = (obj != nil) and (obj[].ob_type == PyTuple_Type)
|
||||
|
||||
proc PyInstance_Check(obj: PPyObject): bool =
|
||||
Result = (obj != nil) and (obj^ .ob_type == PyInstance_Type)
|
||||
Result = (obj != nil) and (obj[].ob_type == PyInstance_Type)
|
||||
|
||||
proc PyClass_Check(obj: PPyObject): bool =
|
||||
Result = (obj != nil) and (obj^ .ob_type == PyClass_Type)
|
||||
Result = (obj != nil) and (obj[].ob_type == PyClass_Type)
|
||||
|
||||
proc PyMethod_Check(obj: PPyObject): bool =
|
||||
Result = (obj != nil) and (obj^ .ob_type == PyMethod_Type)
|
||||
Result = (obj != nil) and (obj[].ob_type == PyMethod_Type)
|
||||
|
||||
proc PyList_Check(obj: PPyObject): bool =
|
||||
Result = PyObject_TypeCheck(obj, PyList_Type)
|
||||
|
||||
proc PyList_CheckExact(obj: PPyObject): bool =
|
||||
Result = (obj != nil) and (obj^ .ob_type == PyList_Type)
|
||||
Result = (obj != nil) and (obj[].ob_type == PyList_Type)
|
||||
|
||||
proc PyDict_Check(obj: PPyObject): bool =
|
||||
Result = PyObject_TypeCheck(obj, PyDict_Type)
|
||||
|
||||
proc PyDict_CheckExact(obj: PPyObject): bool =
|
||||
Result = (obj != nil) and (obj^ .ob_type == PyDict_Type)
|
||||
Result = (obj != nil) and (obj[].ob_type == PyDict_Type)
|
||||
|
||||
proc PyModule_Check(obj: PPyObject): bool =
|
||||
Result = PyObject_TypeCheck(obj, PyModule_Type)
|
||||
|
||||
proc PyModule_CheckExact(obj: PPyObject): bool =
|
||||
Result = (obj != nil) and (obj^ .ob_type == PyModule_Type)
|
||||
Result = (obj != nil) and (obj[].ob_type == PyModule_Type)
|
||||
|
||||
proc PySlice_Check(obj: PPyObject): bool =
|
||||
Result = (obj != nil) and (obj^ .ob_type == PySlice_Type)
|
||||
Result = (obj != nil) and (obj[].ob_type == PySlice_Type)
|
||||
|
||||
proc PyFunction_Check(obj: PPyObject): bool =
|
||||
Result = (obj != nil) and
|
||||
|
|
|
|||
|
|
@ -2525,8 +2525,8 @@ proc AllocSurface(flags: int32, width, height, depth: int,
|
|||
AMask)
|
||||
|
||||
proc MustLock(Surface: PSurface): bool =
|
||||
Result = ((surface^ .offset != 0) or
|
||||
((surface^ .flags and (HWSURFACE or ASYNCBLIT or RLEACCEL)) != 0))
|
||||
Result = ((surface[] .offset != 0) or
|
||||
((surface[] .flags and (HWSURFACE or ASYNCBLIT or RLEACCEL)) != 0))
|
||||
|
||||
proc LockMutex(mutex: Pmutex): int =
|
||||
Result = mutexP(mutex)
|
||||
|
|
|
|||
|
|
@ -2065,154 +2065,154 @@ when defined(MACROS):
|
|||
|
||||
when defined(MACROS):
|
||||
proc ConnectionNumber(dpy: PDisplay): cint =
|
||||
ConnectionNumber = (PXPrivDisplay(dpy))^ .fd
|
||||
ConnectionNumber = (PXPrivDisplay(dpy))[] .fd
|
||||
|
||||
proc RootWindow(dpy: PDisplay, scr: cint): TWindow =
|
||||
RootWindow = (ScreenOfDisplay(dpy, scr))^ .root
|
||||
RootWindow = (ScreenOfDisplay(dpy, scr))[] .root
|
||||
|
||||
proc DefaultScreen(dpy: PDisplay): cint =
|
||||
DefaultScreen = (PXPrivDisplay(dpy))^ .default_screen
|
||||
DefaultScreen = (PXPrivDisplay(dpy))[] .default_screen
|
||||
|
||||
proc DefaultRootWindow(dpy: PDisplay): TWindow =
|
||||
DefaultRootWindow = (ScreenOfDisplay(dpy, DefaultScreen(dpy)))^ .root
|
||||
DefaultRootWindow = (ScreenOfDisplay(dpy, DefaultScreen(dpy)))[] .root
|
||||
|
||||
proc DefaultVisual(dpy: PDisplay, scr: cint): PVisual =
|
||||
DefaultVisual = (ScreenOfDisplay(dpy, scr))^ .root_visual
|
||||
DefaultVisual = (ScreenOfDisplay(dpy, scr))[] .root_visual
|
||||
|
||||
proc DefaultGC(dpy: PDisplay, scr: cint): TGC =
|
||||
DefaultGC = (ScreenOfDisplay(dpy, scr))^ .default_gc
|
||||
DefaultGC = (ScreenOfDisplay(dpy, scr))[] .default_gc
|
||||
|
||||
proc BlackPixel(dpy: PDisplay, scr: cint): culong =
|
||||
BlackPixel = (ScreenOfDisplay(dpy, scr))^ .black_pixel
|
||||
BlackPixel = (ScreenOfDisplay(dpy, scr))[] .black_pixel
|
||||
|
||||
proc WhitePixel(dpy: PDisplay, scr: cint): culong =
|
||||
WhitePixel = (ScreenOfDisplay(dpy, scr))^ .white_pixel
|
||||
WhitePixel = (ScreenOfDisplay(dpy, scr))[] .white_pixel
|
||||
|
||||
proc QLength(dpy: PDisplay): cint =
|
||||
QLength = (PXPrivDisplay(dpy))^ .qlen
|
||||
QLength = (PXPrivDisplay(dpy))[] .qlen
|
||||
|
||||
proc DisplayWidth(dpy: PDisplay, scr: cint): cint =
|
||||
DisplayWidth = (ScreenOfDisplay(dpy, scr))^ .width
|
||||
DisplayWidth = (ScreenOfDisplay(dpy, scr))[] .width
|
||||
|
||||
proc DisplayHeight(dpy: PDisplay, scr: cint): cint =
|
||||
DisplayHeight = (ScreenOfDisplay(dpy, scr))^ .height
|
||||
DisplayHeight = (ScreenOfDisplay(dpy, scr))[] .height
|
||||
|
||||
proc DisplayWidthMM(dpy: PDisplay, scr: cint): cint =
|
||||
DisplayWidthMM = (ScreenOfDisplay(dpy, scr))^ .mwidth
|
||||
DisplayWidthMM = (ScreenOfDisplay(dpy, scr))[] .mwidth
|
||||
|
||||
proc DisplayHeightMM(dpy: PDisplay, scr: cint): cint =
|
||||
DisplayHeightMM = (ScreenOfDisplay(dpy, scr))^ .mheight
|
||||
DisplayHeightMM = (ScreenOfDisplay(dpy, scr))[] .mheight
|
||||
|
||||
proc DisplayPlanes(dpy: PDisplay, scr: cint): cint =
|
||||
DisplayPlanes = (ScreenOfDisplay(dpy, scr))^ .root_depth
|
||||
DisplayPlanes = (ScreenOfDisplay(dpy, scr))[] .root_depth
|
||||
|
||||
proc DisplayCells(dpy: PDisplay, scr: cint): cint =
|
||||
DisplayCells = (DefaultVisual(dpy, scr))^ .map_entries
|
||||
DisplayCells = (DefaultVisual(dpy, scr))[] .map_entries
|
||||
|
||||
proc ScreenCount(dpy: PDisplay): cint =
|
||||
ScreenCount = (PXPrivDisplay(dpy))^ .nscreens
|
||||
ScreenCount = (PXPrivDisplay(dpy))[] .nscreens
|
||||
|
||||
proc ServerVendor(dpy: PDisplay): cstring =
|
||||
ServerVendor = (PXPrivDisplay(dpy))^ .vendor
|
||||
ServerVendor = (PXPrivDisplay(dpy))[] .vendor
|
||||
|
||||
proc ProtocolVersion(dpy: PDisplay): cint =
|
||||
ProtocolVersion = (PXPrivDisplay(dpy))^ .proto_major_version
|
||||
ProtocolVersion = (PXPrivDisplay(dpy))[] .proto_major_version
|
||||
|
||||
proc ProtocolRevision(dpy: PDisplay): cint =
|
||||
ProtocolRevision = (PXPrivDisplay(dpy))^ .proto_minor_version
|
||||
ProtocolRevision = (PXPrivDisplay(dpy))[] .proto_minor_version
|
||||
|
||||
proc VendorRelease(dpy: PDisplay): cint =
|
||||
VendorRelease = (PXPrivDisplay(dpy))^ .release
|
||||
VendorRelease = (PXPrivDisplay(dpy))[] .release
|
||||
|
||||
proc DisplayString(dpy: PDisplay): cstring =
|
||||
DisplayString = (PXPrivDisplay(dpy))^ .display_name
|
||||
DisplayString = (PXPrivDisplay(dpy))[] .display_name
|
||||
|
||||
proc DefaultDepth(dpy: PDisplay, scr: cint): cint =
|
||||
DefaultDepth = (ScreenOfDisplay(dpy, scr))^ .root_depth
|
||||
DefaultDepth = (ScreenOfDisplay(dpy, scr))[] .root_depth
|
||||
|
||||
proc DefaultColormap(dpy: PDisplay, scr: cint): TColormap =
|
||||
DefaultColormap = (ScreenOfDisplay(dpy, scr))^ .cmap
|
||||
DefaultColormap = (ScreenOfDisplay(dpy, scr))[] .cmap
|
||||
|
||||
proc BitmapUnit(dpy: PDisplay): cint =
|
||||
BitmapUnit = (PXPrivDisplay(dpy))^ .bitmap_unit
|
||||
BitmapUnit = (PXPrivDisplay(dpy))[] .bitmap_unit
|
||||
|
||||
proc BitmapBitOrder(dpy: PDisplay): cint =
|
||||
BitmapBitOrder = (PXPrivDisplay(dpy))^ .bitmap_bit_order
|
||||
BitmapBitOrder = (PXPrivDisplay(dpy))[] .bitmap_bit_order
|
||||
|
||||
proc BitmapPad(dpy: PDisplay): cint =
|
||||
BitmapPad = (PXPrivDisplay(dpy))^ .bitmap_pad
|
||||
BitmapPad = (PXPrivDisplay(dpy))[] .bitmap_pad
|
||||
|
||||
proc ImageByteOrder(dpy: PDisplay): cint =
|
||||
ImageByteOrder = (PXPrivDisplay(dpy))^ .byte_order
|
||||
ImageByteOrder = (PXPrivDisplay(dpy))[] .byte_order
|
||||
|
||||
proc NextRequest(dpy: PDisplay): culong =
|
||||
NextRequest = ((PXPrivDisplay(dpy))^ .request) + 1
|
||||
NextRequest = ((PXPrivDisplay(dpy))[] .request) + 1
|
||||
|
||||
proc LastKnownRequestProcessed(dpy: PDisplay): culong =
|
||||
LastKnownRequestProcessed = (PXPrivDisplay(dpy))^ .last_request_read
|
||||
LastKnownRequestProcessed = (PXPrivDisplay(dpy))[] .last_request_read
|
||||
|
||||
proc ScreenOfDisplay(dpy: PDisplay, scr: cint): PScreen =
|
||||
ScreenOfDisplay = addr((((PXPrivDisplay(dpy))^ .screens)[scr]))
|
||||
ScreenOfDisplay = addr((((PXPrivDisplay(dpy))[] .screens)[scr]))
|
||||
|
||||
proc DefaultScreenOfDisplay(dpy: PDisplay): PScreen =
|
||||
DefaultScreenOfDisplay = ScreenOfDisplay(dpy, DefaultScreen(dpy))
|
||||
|
||||
proc DisplayOfScreen(s: PScreen): PDisplay =
|
||||
DisplayOfScreen = s^ .display
|
||||
DisplayOfScreen = s[] .display
|
||||
|
||||
proc RootWindowOfScreen(s: PScreen): TWindow =
|
||||
RootWindowOfScreen = s^ .root
|
||||
RootWindowOfScreen = s[] .root
|
||||
|
||||
proc BlackPixelOfScreen(s: PScreen): culong =
|
||||
BlackPixelOfScreen = s^ .black_pixel
|
||||
BlackPixelOfScreen = s[] .black_pixel
|
||||
|
||||
proc WhitePixelOfScreen(s: PScreen): culong =
|
||||
WhitePixelOfScreen = s^ .white_pixel
|
||||
WhitePixelOfScreen = s[] .white_pixel
|
||||
|
||||
proc DefaultColormapOfScreen(s: PScreen): TColormap =
|
||||
DefaultColormapOfScreen = s^ .cmap
|
||||
DefaultColormapOfScreen = s[] .cmap
|
||||
|
||||
proc DefaultDepthOfScreen(s: PScreen): cint =
|
||||
DefaultDepthOfScreen = s^ .root_depth
|
||||
DefaultDepthOfScreen = s[] .root_depth
|
||||
|
||||
proc DefaultGCOfScreen(s: PScreen): TGC =
|
||||
DefaultGCOfScreen = s^ .default_gc
|
||||
DefaultGCOfScreen = s[] .default_gc
|
||||
|
||||
proc DefaultVisualOfScreen(s: PScreen): PVisual =
|
||||
DefaultVisualOfScreen = s^ .root_visual
|
||||
DefaultVisualOfScreen = s[] .root_visual
|
||||
|
||||
proc WidthOfScreen(s: PScreen): cint =
|
||||
WidthOfScreen = s^ .width
|
||||
WidthOfScreen = s[] .width
|
||||
|
||||
proc HeightOfScreen(s: PScreen): cint =
|
||||
HeightOfScreen = s^ .height
|
||||
HeightOfScreen = s[] .height
|
||||
|
||||
proc WidthMMOfScreen(s: PScreen): cint =
|
||||
WidthMMOfScreen = s^ .mwidth
|
||||
WidthMMOfScreen = s[] .mwidth
|
||||
|
||||
proc HeightMMOfScreen(s: PScreen): cint =
|
||||
HeightMMOfScreen = s^ .mheight
|
||||
HeightMMOfScreen = s[] .mheight
|
||||
|
||||
proc PlanesOfScreen(s: PScreen): cint =
|
||||
PlanesOfScreen = s^ .root_depth
|
||||
PlanesOfScreen = s[] .root_depth
|
||||
|
||||
proc CellsOfScreen(s: PScreen): cint =
|
||||
CellsOfScreen = (DefaultVisualOfScreen(s))^ .map_entries
|
||||
CellsOfScreen = (DefaultVisualOfScreen(s))[] .map_entries
|
||||
|
||||
proc MinCmapsOfScreen(s: PScreen): cint =
|
||||
MinCmapsOfScreen = s^ .min_maps
|
||||
MinCmapsOfScreen = s[] .min_maps
|
||||
|
||||
proc MaxCmapsOfScreen(s: PScreen): cint =
|
||||
MaxCmapsOfScreen = s^ .max_maps
|
||||
MaxCmapsOfScreen = s[] .max_maps
|
||||
|
||||
proc DoesSaveUnders(s: PScreen): TBool =
|
||||
DoesSaveUnders = s^ .save_unders
|
||||
DoesSaveUnders = s[] .save_unders
|
||||
|
||||
proc DoesBackingStore(s: PScreen): cint =
|
||||
DoesBackingStore = s^ .backing_store
|
||||
DoesBackingStore = s[] .backing_store
|
||||
|
||||
proc EventMaskOfScreen(s: PScreen): clong =
|
||||
EventMaskOfScreen = s^ .root_input_mask
|
||||
EventMaskOfScreen = s[] .root_input_mask
|
||||
|
||||
proc XAllocID(dpy: PDisplay): TXID =
|
||||
XAllocID = (PXPrivDisplay(dpy))^ .resource_alloc(dpy)
|
||||
XAllocID = (PXPrivDisplay(dpy))[] .resource_alloc(dpy)
|
||||
|
|
|
|||
|
|
@ -375,19 +375,19 @@ when defined(MACROS):
|
|||
|
||||
when defined(MACROS):
|
||||
proc XDestroyImage(ximage: PXImage): cint =
|
||||
XDestroyImage = ximage^ .f.destroy_image(ximage)
|
||||
XDestroyImage = ximage[] .f.destroy_image(ximage)
|
||||
|
||||
proc XGetPixel(ximage: PXImage, x, y: cint): culong =
|
||||
XGetPixel = ximage^ .f.get_pixel(ximage, x, y)
|
||||
XGetPixel = ximage[] .f.get_pixel(ximage, x, y)
|
||||
|
||||
proc XPutPixel(ximage: PXImage, x, y: cint, pixel: culong): cint =
|
||||
XPutPixel = ximage^ .f.put_pixel(ximage, x, y, pixel)
|
||||
XPutPixel = ximage[] .f.put_pixel(ximage, x, y, pixel)
|
||||
|
||||
proc XSubImage(ximage: PXImage, x, y: cint, width, height: cuint): PXImage =
|
||||
XSubImage = ximage^ .f.sub_image(ximage, x, y, width, height)
|
||||
XSubImage = ximage[] .f.sub_image(ximage, x, y, width, height)
|
||||
|
||||
proc XAddPixel(ximage: PXImage, value: clong): cint =
|
||||
XAddPixel = ximage^ .f.add_pixel(ximage, value)
|
||||
XAddPixel = ximage[] .f.add_pixel(ximage, value)
|
||||
|
||||
proc IsKeypadKey(keysym: TKeySym): bool =
|
||||
IsKeypadKey = (keysym >= XK_KP_Space) and (keysym <= XK_KP_Equal)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue