annotate semiconginev2/thirdparty/x11/xshm.nim @ 1255:2b5ca798f6d6

did: make example town loadable and renderable, yay!
author sam <sam@basx.dev>
date Sun, 28 Jul 2024 00:17:34 +0700
parents 56781cc0fc7c
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
1191
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
1 import
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
2 x, xlib
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
3
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
4 const
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
5 libXext* = "libXext.so(.6|)"
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
6
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
7 #
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
8 # Automatically converted by H2Pas 0.99.15 from xshm.h
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
9 # The following command line parameters were used:
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
10 # -p
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
11 # -T
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
12 # -S
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
13 # -d
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
14 # -c
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
15 # xshm.h
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
16 #
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
17
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
18 const
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
19 constX_ShmQueryVersion* = 0
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
20 constX_ShmAttach* = 1
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
21 constX_ShmDetach* = 2
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
22 constX_ShmPutImage* = 3
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
23 constX_ShmGetImage* = 4
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
24 constX_ShmCreatePixmap* = 5
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
25 ShmCompletion* = 0
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
26 ShmNumberEvents* = ShmCompletion + 1
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
27 BadShmSeg* = 0
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
28 ShmNumberErrors* = BadShmSeg + 1
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
29
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
30 type
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
31 PShmSeg* = ptr ShmSeg
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
32 ShmSeg* = culong
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
33
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
34 PXShmCompletionEvent* = ptr XShmCompletionEvent
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
35 XShmCompletionEvent*{.final.} = object
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
36 theType*: cint
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
37 serial*: culong
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
38 send_event*: XBool
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
39 display*: PDisplay
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
40 drawable*: Drawable
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
41 major_code*: cint
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
42 minor_code*: cint
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
43 shmseg*: ShmSeg
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
44 offset*: culong
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
45
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
46 PXShmSegmentInfo* = ptr XShmSegmentInfo
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
47 XShmSegmentInfo*{.final.} = object
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
48 shmseg*: ShmSeg
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
49 shmid*: cint
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
50 shmaddr*: cstring
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
51 readOnly*: XBool
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
52
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
53 proc XShmQueryExtension*(para1: PDisplay): XBool{.cdecl, dynlib: libXext, importc.}
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
54 proc XShmGetEventBase*(para1: PDisplay): cint{.cdecl, dynlib: libXext, importc.}
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
55 proc XShmQueryVersion*(para1: PDisplay, para2: Pcint, para3: Pcint, para4: PBool): XBool{.
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
56 cdecl, dynlib: libXext, importc.}
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
57 proc XShmPixmapFormat*(para1: PDisplay): cint{.cdecl, dynlib: libXext, importc.}
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
58 proc XShmAttach*(para1: PDisplay, para2: PXShmSegmentInfo): Status{.cdecl,
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
59 dynlib: libXext, importc.}
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
60 proc XShmDetach*(para1: PDisplay, para2: PXShmSegmentInfo): Status{.cdecl,
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
61 dynlib: libXext, importc.}
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
62 proc XShmPutImage*(para1: PDisplay, para2: Drawable, para3: GC,
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
63 para4: PXImage, para5: cint, para6: cint, para7: cint,
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
64 para8: cint, para9: cuint, para10: cuint, para11: XBool): Status{.
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
65 cdecl, dynlib: libXext, importc.}
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
66 proc XShmGetImage*(para1: PDisplay, para2: Drawable, para3: PXImage,
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
67 para4: cint, para5: cint, para6: culong): Status{.cdecl,
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
68 dynlib: libXext, importc.}
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
69 proc XShmCreateImage*(para1: PDisplay, para2: PVisual, para3: cuint,
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
70 para4: cint, para5: cstring, para6: PXShmSegmentInfo,
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
71 para7: cuint, para8: cuint): PXImage{.cdecl,
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
72 dynlib: libXext, importc.}
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
73 proc XShmCreatePixmap*(para1: PDisplay, para2: Drawable, para3: cstring,
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
74 para4: PXShmSegmentInfo, para5: cuint, para6: cuint,
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
75 para7: cuint): Pixmap{.cdecl, dynlib: libXext, importc.}
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
76 # implementation