annotate semiconginev2/thirdparty/x11/xresource.nim @ 1221:000befd9479f compiletime-tests

did: remove support for git, for now
author sam <sam@basx.dev>
date Wed, 17 Jul 2024 21:05:47 +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
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
2 import
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
3 x, xlib
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
4
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
5 #const
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
6 # libX11* = "libX11.so"
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 #
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
9 # Automatically converted by H2Pas 0.99.15 from xresource.h
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
10 # The following command line parameters were used:
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
11 # -p
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
12 # -T
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
13 # -S
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
14 # -d
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
15 # -c
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
16 # xresource.h
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
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
19 proc Xpermalloc*(para1: int32): cstring{.cdecl, dynlib: libX11, importc.}
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
20
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
21 type
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
22 PXrmQuark* = ptr XrmQuark
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
23 XrmQuark* = int32
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
24
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
25 XrmQuarkList* = PXrmQuark
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
26 PXrmQuarkList* = ptr XrmQuarkList
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
27
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
28 proc NULLQUARK*(): XrmQuark
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 PXrmString* = ptr XrmString
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
32 XrmString* = ptr char
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 proc NULLSTRING*(): XrmString
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
35 proc XrmStringToQuark*(para1: cstring): XrmQuark{.cdecl, dynlib: libX11,
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
36 importc.}
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
37 proc XrmPermStringToQuark*(para1: cstring): XrmQuark{.cdecl, dynlib: libX11,
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
38 importc.}
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
39 proc XrmQuarkToString*(para1: XrmQuark): XrmString{.cdecl, dynlib: libX11,
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
40 importc.}
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
41 proc XrmUniqueQuark*(): XrmQuark{.cdecl, dynlib: libX11, importc.}
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
42 #when defined(MACROS):
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
43 proc XrmStringsEqual*(a1, a2: cstring): bool
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
44
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
45 type
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
46 PXrmBinding* = ptr XrmBinding
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
47 XrmBinding* = enum
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
48 XrmBindTightly, XrmBindLoosely
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
49
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
50 XrmBindingList* = PXrmBinding
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
51 PXrmBindingList* = ptr XrmBindingList
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 XrmStringToQuarkList*(para1: cstring, para2: XrmQuarkList){.cdecl,
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
54 dynlib: libX11, importc.}
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
55 proc XrmStringToBindingQuarkList*(para1: cstring, para2: XrmBindingList,
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
56 para3: XrmQuarkList){.cdecl, dynlib: libX11,
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
57 importc.}
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
58
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
59 type
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
60 PXrmName* = ptr XrmName
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
61 XrmName* = XrmQuark
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
62
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
63 PXrmNameList* = ptr XrmNameList
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
64 XrmNameList* = XrmQuarkList
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
65
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
66 #when defined(MACROS):
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
67 proc XrmNameToString*(name: int32): XrmString
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
68 proc XrmStringToName*(str: cstring): int32
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
69 proc XrmStringToNameList*(str: cstring, name: PXrmQuark)
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
70
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
71 type
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
72 PXrmClass* = ptr XrmClass
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
73 XrmClass* = XrmQuark
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
74
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
75 PXrmClassList* = ptr XrmClassList
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
76 XrmClassList* = XrmQuarkList
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
77
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
78 #when defined(MACROS):
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
79 proc XrmClassToString*(c_class: int32): XrmString
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
80 proc XrmStringToClass*(c_class: cstring): int32
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
81 proc XrmStringToClassList*(str: cstring, c_class: PXrmQuark)
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
82
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
83 type
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
84 PXrmRepresentation* = ptr XrmRepresentation
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
85 XrmRepresentation* = XrmQuark
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
86
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
87 #when defined(MACROS):
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
88 proc XrmStringToRepresentation*(str: cstring): int32
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
89 proc XrmRepresentationToString*(thetype: int32): XrmString
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
90
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
91 type
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
92 PXrmValue* = ptr XrmValue
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
93 XrmValue*{.final.} = object
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
94 size*: int32
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
95 address*: XPointer
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
96
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
97 PXrmValuePtr* = ptr XrmValuePtr
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
98 XrmValuePtr* = PXrmValue
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
99
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
100 PXrmHashBucketRec* = ptr XrmHashBucketRec
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
101 XrmHashBucketRec*{.final.} = object
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
102
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
103 PXrmHashBucket* = ptr XrmHashBucket
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
104 XrmHashBucket* = PXrmHashBucketRec
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
105
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
106 PXrmHashTable* = ptr XrmHashTable
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
107 XrmHashTable* = ptr XrmHashBucket
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
108
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
109 PXrmDatabase* = ptr XrmDatabase
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
110 XrmDatabase* = PXrmHashBucketRec
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
111
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
112 proc XrmDestroyDatabase*(para1: XrmDatabase){.cdecl, dynlib: libX11, importc.}
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
113 proc XrmQPutResource*(para1: PXrmDatabase, para2: XrmBindingList,
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
114 para3: XrmQuarkList, para4: XrmRepresentation,
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
115 para5: PXrmValue){.cdecl, dynlib: libX11, importc.}
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
116 proc XrmPutResource*(para1: PXrmDatabase, para2: cstring, para3: cstring,
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
117 para4: PXrmValue){.cdecl, dynlib: libX11, importc.}
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
118 proc XrmQPutStringResource*(para1: PXrmDatabase, para2: XrmBindingList,
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
119 para3: XrmQuarkList, para4: cstring){.cdecl,
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
120 dynlib: libX11, importc.}
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
121 proc XrmPutStringResource*(para1: PXrmDatabase, para2: cstring, para3: cstring){.
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
122 cdecl, dynlib: libX11, importc.}
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
123 proc XrmPutLineResource*(para1: PXrmDatabase, para2: cstring){.cdecl,
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
124 dynlib: libX11, importc.}
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
125 proc XrmQGetResource*(para1: XrmDatabase, para2: XrmNameList,
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
126 para3: XrmClassList, para4: PXrmRepresentation,
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
127 para5: PXrmValue): XBool{.cdecl, dynlib: libX11, importc.}
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
128 proc XrmGetResource*(para1: XrmDatabase, para2: cstring, para3: cstring,
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
129 para4: PPchar, para5: PXrmValue): XBool{.cdecl,
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
130 dynlib: libX11, importc.}
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
131 # There is no definition of XrmSearchList
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
132 #function XrmQGetSearchList(para1:XrmDatabase; para2:XrmNameList; para3:XrmClassList; para4:XrmSearchList; para5:longint):XBool;cdecl;external libX11;
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
133 #function XrmQGetSearchResource(para1:XrmSearchList; para2:XrmName; para3:XrmClass; para4:PXrmRepresentation; para5:PXrmValue):XBool;cdecl;external libX11;
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
134 proc XrmSetDatabase*(para1: PDisplay, para2: XrmDatabase){.cdecl,
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
135 dynlib: libX11, importc.}
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
136 proc XrmGetDatabase*(para1: PDisplay): XrmDatabase{.cdecl, dynlib: libX11,
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
137 importc.}
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
138 proc XrmGetFileDatabase*(para1: cstring): XrmDatabase{.cdecl, dynlib: libX11,
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
139 importc.}
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
140 proc XrmCombineFileDatabase*(para1: cstring, para2: PXrmDatabase, para3: XBool): Status{.
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
141 cdecl, dynlib: libX11, importc.}
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
142 proc XrmGetStringDatabase*(para1: cstring): XrmDatabase{.cdecl, dynlib: libX11,
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
143 importc.}
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
144 proc XrmPutFileDatabase*(para1: XrmDatabase, para2: cstring){.cdecl,
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
145 dynlib: libX11, importc.}
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
146 proc XrmMergeDatabases*(para1: XrmDatabase, para2: PXrmDatabase){.cdecl,
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
147 dynlib: libX11, importc.}
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
148 proc XrmCombineDatabase*(para1: XrmDatabase, para2: PXrmDatabase, para3: XBool){.
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
149 cdecl, dynlib: libX11, importc.}
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
150 const
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
151 XrmEnumAllLevels* = 0
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
152 XrmEnumOneLevel* = 1
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
153
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
154 type
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
155 funcbool* = proc (): XBool {.cdecl.}
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
156
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
157 proc XrmEnumerateDatabase*(para1: XrmDatabase, para2: XrmNameList,
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
158 para3: XrmClassList, para4: int32, para5: funcbool,
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
159 para6: XPointer): XBool{.cdecl, dynlib: libX11,
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
160 importc.}
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
161 proc XrmLocaleOfDatabase*(para1: XrmDatabase): cstring{.cdecl, dynlib: libX11,
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
162 importc.}
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
163
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
164 type
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
165 PXrmOptionKind* = ptr XrmOptionKind
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
166 XrmOptionKind* = enum
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
167 XrmoptionNoArg, XrmoptionIsArg, XrmoptionStickyArg, XrmoptionSepArg,
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
168 XrmoptionResArg, XrmoptionSkipArg, XrmoptionSkipLine, XrmoptionSkipNArgs
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
169
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
170 PXrmOptionDescRec* = ptr XrmOptionDescRec
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
171 XrmOptionDescRec*{.final.} = object
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
172 option*: cstring
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
173 specifier*: cstring
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
174 argKind*: XrmOptionKind
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
175 value*: XPointer
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
176
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
177 XrmOptionDescList* = PXrmOptionDescRec
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
178 PXrmOptionDescList* = ptr XrmOptionDescList
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
179
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
180 proc XrmParseCommand*(para1: PXrmDatabase, para2: XrmOptionDescList,
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
181 para3: int32, para4: cstring, para5: ptr int32,
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
182 para6: PPchar){.cdecl, dynlib: libX11, importc.}
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
183 # implementation
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
184
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
185 proc NULLQUARK(): XrmQuark =
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
186 result = XrmQuark(0)
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
187
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
188 proc NULLSTRING(): XrmString =
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
189 result = nil
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
190
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
191 #when defined(MACROS):
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
192 proc XrmStringsEqual(a1, a2: cstring): bool =
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
193 #result = (strcomp(a1, a2)) == 0
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
194 $a1 == $a2
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
195
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
196 proc XrmNameToString(name: int32): XrmString =
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
197 result = XrmQuarkToString(name)
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
198
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
199 proc XrmStringToName(str: cstring): int32 =
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
200 result = XrmStringToQuark(str)
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
201
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
202 proc XrmStringToNameList(str: cstring, name: PXrmQuark) =
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
203 XrmStringToQuarkList(str, name)
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
204
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
205 proc XrmClassToString(c_class: int32): XrmString =
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
206 result = XrmQuarkToString(c_class)
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
207
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
208 proc XrmStringToClass(c_class: cstring): int32 =
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
209 result = XrmStringToQuark(c_class)
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
210
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
211 proc XrmStringToClassList(str: cstring, c_class: PXrmQuark) =
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
212 XrmStringToQuarkList(str, c_class)
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
213
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
214 proc XrmStringToRepresentation(str: cstring): int32 =
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
215 result = XrmStringToQuark(str)
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
216
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
217 proc XrmRepresentationToString(thetype: int32): XrmString =
239adab121a3 sync from bedroom to office
sam <sam@basx.dev>
parents:
diff changeset
218 result = XrmQuarkToString(thetype)