glib.pp 82 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655
  1. {
  2. GLIB - Library of useful routines for C programming
  3. Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald
  4. This library is free software; you can redistribute it and/or
  5. modify it under the terms of the GNU Library General Public
  6. License as published by the Free Software Foundation; either
  7. version 2 of the License, or (at your option) any later version.
  8. This library is distributed in the hope that it will be useful,
  9. but WITHOUT ANY WARRANTY; without even the implied warranty of
  10. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  11. Library General Public License for more details.
  12. You should have received a copy of the GNU Library General Public
  13. License along with this library; if not, write to the
  14. Free Software Foundation, Inc., 59 Temple Place - Suite 330,
  15. Boston, MA 02111-1307, USA.
  16. }
  17. unit glib;
  18. interface
  19. {$mode objfpc}
  20. { Always use smartlinking for win32, this solves some undefined functions
  21. in the development gtk versions which change often (PFV) }
  22. {$ifdef win32}
  23. {$smartlink on}
  24. {$endif}
  25. {$ifdef win32}
  26. const
  27. glibdll='libglib-2.0-0';
  28. {$define gtkwin}
  29. {$packrecords C}
  30. {$else}
  31. {$ifdef os2}
  32. const
  33. glibdll='glib12';
  34. {$define gtkos2}
  35. {$packrecords C}
  36. {$else}
  37. const
  38. {$ifdef FreeBSD}
  39. glibdll='glib-12';
  40. {$linklib glib-12}
  41. {$else}
  42. {$ifdef darwin}
  43. glibdll='glib-1.2.0';
  44. {$linklib glib-1.2.0}
  45. {$else darwin}
  46. glibdll='glib';
  47. {$linklib glib}
  48. {$endif darwin}
  49. {$endif}
  50. {$linklib c}
  51. {$packrecords C}
  52. {$endif}
  53. {$endif}
  54. { Pointers to basic pascal types, inserted by h2pas conversion program.}
  55. Type
  56. FLoat = Single;
  57. const
  58. NULL = nil;
  59. G_DIR_SEPARATOR = '/';
  60. G_DIR_SEPARATOR_S = '/';
  61. G_SEARCHPATH_SEPARATOR = ':';
  62. G_SEARCHPATH_SEPARATOR_S = ':';
  63. type
  64. PPgchar = ^Pgchar;
  65. Pgchar = ^gchar;
  66. gchar = char;
  67. Pgshort = ^gshort;
  68. gshort = smallint;
  69. Pglong = ^glong;
  70. glong = ptrint;
  71. Pgint = ^gint;
  72. gint = longint;
  73. Pgboolean = ^gboolean;
  74. gboolean = longbool;
  75. Pguchar = ^guchar;
  76. guchar = char;
  77. Pgushort = ^gushort;
  78. gushort = word;
  79. Pgulong = ^gulong;
  80. gulong = ptruint;
  81. Pguint = ^guint;
  82. guint = cardinal;
  83. Pgfloat = ^gfloat;
  84. gfloat = float;
  85. Pgdouble = ^gdouble;
  86. gdouble = double;
  87. Pgpointer = ^gpointer;
  88. gpointer = pointer;
  89. gint8 = ShortInt;
  90. guint8 = byte;
  91. gint16 = smallint;
  92. guint16 = word;
  93. gint32 = longint;
  94. guint32 = cardinal;
  95. Pgint8 = ^ShortInt;
  96. Pguint8 = ^byte;
  97. Pgint16 = ^smallint;
  98. Pguint16 = ^word;
  99. Pgint32 = ^longint;
  100. Pguint32 = ^cardinal;
  101. PPgint8 = ^Pgint8;
  102. PPguint8 = ^Pguint8;
  103. PPgint16 = ^Pgint16;
  104. PPguint16 = ^Pguint16;
  105. PPgint32 = ^Pgint32;
  106. PPguint32 = ^Pguint32;
  107. gconstpointer = pointer;
  108. gssize = gint32;
  109. gsize = guint32;
  110. TGQuark = guint32;
  111. TGTime = gint32;
  112. {$ifndef gtkos2}
  113. var
  114. glib_major_version : guint;external glibdll name 'glib_major_version';
  115. glib_minor_version : guint;external glibdll name 'glib_minor_version';
  116. glib_micro_version : guint;external glibdll name 'glib_micro_version';
  117. glib_interface_age : guint;external glibdll name 'glib_interface_age';
  118. glib_binary_age : guint;external glibdll name 'glib_binary_age';
  119. {$endif}
  120. type
  121. PGList = ^TGList;
  122. TGList = record
  123. data : gpointer;
  124. next : PGList;
  125. prev : PGList;
  126. end;
  127. PGSList = ^TGSList;
  128. PPGSList = ^PGSList;
  129. TGSList = record
  130. data : gpointer;
  131. next : PGSList;
  132. end;
  133. PGString = ^TGString;
  134. TGString = record
  135. str : Pgchar;
  136. len : gint;
  137. end;
  138. PGArray = ^TGArray;
  139. TGArray = record
  140. data : Pgchar;
  141. len : guint;
  142. end;
  143. PGDebugKey = ^TGDebugKey;
  144. TGDebugKey = record
  145. key : Pgchar;
  146. value : guint;
  147. end;
  148. PGHashTable = ^TGHashTable;
  149. TGHashTable = record
  150. dummy : gint;
  151. end;
  152. PGCache = ^TGCache;
  153. TGCache = record
  154. dummy : gint;
  155. end;
  156. PGTree = ^TGTree;
  157. TGTree = record
  158. dummy : gint;
  159. end;
  160. PGTimer = ^TGTimer;
  161. TGTimer = record
  162. dummy : gint;
  163. end;
  164. PGMemChunk = ^TGMemChunk;
  165. TGMemChunk = record
  166. dummy : gint;
  167. end;
  168. PGStringChunk = ^TGStringChunk;
  169. TGStringChunk = record
  170. dummy : gint;
  171. end;
  172. PGByteArray = ^TGByteArray;
  173. TGByteArray = record
  174. data : Pguint8;
  175. len : guint;
  176. end;
  177. PGPtrArray = ^TGPtrArray;
  178. TGPtrArray = record
  179. pdata : Pgpointer;
  180. len : guint;
  181. end;
  182. PGTuples = ^TGTuples;
  183. TGTuples = record
  184. len : guint;
  185. end;
  186. type
  187. PGTraverseType = ^TGTraverseType;
  188. TGTraverseType = longint;
  189. const
  190. G_IN_ORDER = 0;
  191. G_PRE_ORDER = 1;
  192. G_POST_ORDER = 2;
  193. type
  194. TGTraverseFlags = longint;
  195. const
  196. G_TRAVERSE_LEAFS = 1 shl 0;
  197. G_TRAVERSE_NON_LEAFS = 1 shl 1;
  198. G_TRAVERSE_ALL = 1 shl 0 + 1 shl 1;
  199. G_TRAVERSE_MASK = 3;
  200. type
  201. TGLogLevelFlags = longint;
  202. const
  203. G_LOG_FLAG_RECURSION = 1 shl 0;
  204. G_LOG_FLAG_FATAL = 1 shl 1;
  205. G_LOG_LEVEL_ERROR = 1 shl 2;
  206. G_LOG_LEVEL_CRITICAL = 1 shl 3;
  207. G_LOG_LEVEL_WARNING = 1 shl 4;
  208. G_LOG_LEVEL_MESSAGE = 1 shl 5;
  209. G_LOG_LEVEL_INFO = 1 shl 6;
  210. G_LOG_LEVEL_DEBUG = 1 shl 7;
  211. G_LOG_LEVEL_MASK = (1 shl 8) - 2;
  212. type
  213. PGNode = ^TGNode;
  214. TGNode = record
  215. data : gpointer;
  216. next : PGNode;
  217. prev : PGNode;
  218. parent : PGNode;
  219. children : PGNode;
  220. end;
  221. const
  222. G_HOOK_FLAG_USER_SHIFT = 4;
  223. type
  224. TGHookFlagMask = longint;
  225. const
  226. G_HOOK_FLAG_ACTIVE = 1 shl 0;
  227. G_HOOK_FLAG_IN_CALL = 1 shl 1;
  228. G_HOOK_FLAG_MASK = $0f;
  229. type
  230. PGHook = ^TGHook;
  231. PGHookList = ^TGHookList;
  232. TGHookCompareFunc = function (new_hook:PGHook; sibling:PGHook):gint;cdecl;
  233. TGHookFindFunc = function (hook:PGHook; data:gpointer):gboolean;cdecl;
  234. TGHookMarshaller = procedure (hook:PGHook; data:gpointer);cdecl;
  235. TGHookCheckMarshaller = function (hook:PGHook; data:gpointer):gboolean;cdecl;
  236. TGHookFunc = procedure (data:gpointer);cdecl;
  237. TGHookCheckFunc = function (data:gpointer):gboolean;cdecl;
  238. TGHookFreeFunc = procedure (hook_list:PGHookList; hook:PGHook);cdecl;
  239. TGDestroyNotify = procedure (data:gpointer);cdecl;
  240. TGHookList = record
  241. seq_id : guint;
  242. hook_size : guint;
  243. flag0 : word;
  244. hooks : PGHook;
  245. hook_memchunk : PGMemChunk;
  246. hook_free : TGHookFreeFunc;
  247. hook_destroy : TGHookFreeFunc;
  248. end;
  249. TGHook = record
  250. data : gpointer;
  251. next : PGHook;
  252. prev : PGHook;
  253. ref_count : guint;
  254. hook_id : guint;
  255. flags : guint;
  256. func : gpointer;
  257. destroy : TGDestroyNotify;
  258. end;
  259. const
  260. bm_TGHookList_is_setup = $1;
  261. bp_TGHookList_is_setup = 0;
  262. const
  263. G_CSET_UA_2_Z = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ';
  264. G_CSET_a_2_z = 'abcdefghijklmnopqrstuvwxyz';
  265. type
  266. PGErrorType = ^TGErrorType;
  267. TGErrorType = longint;
  268. const
  269. G_ERR_UNKNOWN = 0;
  270. G_ERR_UNEXP_EOF = 1;
  271. G_ERR_UNEXP_EOF_IN_STRING = 2;
  272. G_ERR_UNEXP_EOF_IN_COMMENT = 3;
  273. G_ERR_NON_DIGIT_IN_CONST = 4;
  274. G_ERR_DIGIT_RADIX = 5;
  275. G_ERR_FLOAT_RADIX = 6;
  276. G_ERR_FLOAT_MALFORMED = 7;
  277. type
  278. PGTokenType = ^TGTokenType;
  279. TGTokenType = longint;
  280. const
  281. G_TOKEN_EOF = 0;
  282. G_TOKEN_LEFT_PAREN = ord('(');
  283. G_TOKEN_RIGHT_PAREN = ord(')');
  284. G_TOKEN_LEFT_CURLY = ord('{');
  285. G_TOKEN_RIGHT_CURLY = ord('}');
  286. G_TOKEN_LEFT_BRACE = ord('[');
  287. G_TOKEN_RIGHT_BRACE = ord(']');
  288. G_TOKEN_EQUAL_SIGN = ord('=');
  289. G_TOKEN_COMMA = ord(',');
  290. G_TOKEN_NONE = 256;
  291. G_TOKEN_ERROR = 257;
  292. G_TOKEN_CHAR = 258;
  293. G_TOKEN_BINARY = 259;
  294. G_TOKEN_OCTAL = 260;
  295. G_TOKEN_INT = 261;
  296. G_TOKEN_HEX = 262;
  297. G_TOKEN_FLOAT = 263;
  298. G_TOKEN_STRING = 264;
  299. G_TOKEN_SYMBOL = 265;
  300. G_TOKEN_IDENTIFIER = 266;
  301. G_TOKEN_IDENTIFIER_NULL = 267;
  302. G_TOKEN_COMMENT_SINGLE = 268;
  303. G_TOKEN_COMMENT_MULTI = 269;
  304. G_TOKEN_LAST = 270;
  305. type
  306. PGTokenValue = ^TGTokenValue;
  307. TGTokenValue = record
  308. case longint of
  309. 0 : ( v_symbol:gpointer );
  310. 1 : ( v_identifier:Pgchar );
  311. 2 : ( v_binary:gulong );
  312. 3 : ( v_octal:gulong );
  313. 4 : ( v_int:gulong );
  314. 5 : ( v_float:gdouble );
  315. 6 : ( v_hex:gulong );
  316. 7 : ( v_string:Pgchar );
  317. 8 : ( v_comment:Pgchar );
  318. 9 : ( v_char:guchar );
  319. 10 : ( v_error:guint );
  320. end;
  321. PGScannerConfig = ^TGScannerConfig;
  322. TGScannerConfig = Record
  323. cset_skip_characters,
  324. cset_identifier_first,
  325. cset_identifier_nth,
  326. cpair_comment_single : Pgchar;
  327. flag0 : guint;
  328. end;
  329. PGScanner = ^TGScanner;
  330. TGScannerMsgFunc = procedure (scanner:PGScanner; message:Pgchar; error:gint);cdecl;
  331. TGScanner = record
  332. user_data : gpointer;
  333. max_parse_errors : guint;
  334. parse_errors : guint;
  335. input_name : Pgchar;
  336. derived_data : gpointer;
  337. config : PGScannerConfig;
  338. token :TGTokenType;
  339. value : TGTokenValue;
  340. line : guint;
  341. position : guint;
  342. next_token :TGTokenType;
  343. next_value : TGTokenValue;
  344. next_line : guint;
  345. next_position : guint;
  346. symbol_table : PGHashTable;
  347. input_fd : gint;
  348. text : Pgchar;
  349. text_end : Pgchar;
  350. buffer : Pgchar;
  351. scope_id : guint;
  352. msg_handler :TGScannerMsgFunc;
  353. end;
  354. const
  355. bm_TGScannerConfig_case_sensitive = $1;
  356. bp_TGScannerConfig_case_sensitive = 0;
  357. bm_TGScannerConfig_skip_comment_multi = $2;
  358. bp_TGScannerConfig_skip_comment_multi = 1;
  359. bm_TGScannerConfig_skip_comment_single = $4;
  360. bp_TGScannerConfig_skip_comment_single = 2;
  361. bm_TGScannerConfig_scan_comment_multi = $8;
  362. bp_TGScannerConfig_scan_comment_multi = 3;
  363. bm_TGScannerConfig_scan_identifier = $10;
  364. bp_TGScannerConfig_scan_identifier = 4;
  365. bm_TGScannerConfig_scan_identifier_1char = $20;
  366. bp_TGScannerConfig_scan_identifier_1char = 5;
  367. bm_TGScannerConfig_scan_identifier_NULL = $40;
  368. bp_TGScannerConfig_scan_identifier_NULL = 6;
  369. bm_TGScannerConfig_scan_symbols = $80;
  370. bp_TGScannerConfig_scan_symbols = 7;
  371. bm_TGScannerConfig_scan_binary = $100;
  372. bp_TGScannerConfig_scan_binary = 8;
  373. bm_TGScannerConfig_scan_octal = $200;
  374. bp_TGScannerConfig_scan_octal = 9;
  375. bm_TGScannerConfig_scan_float = $400;
  376. bp_TGScannerConfig_scan_float = 10;
  377. bm_TGScannerConfig_scan_hex = $800;
  378. bp_TGScannerConfig_scan_hex = 11;
  379. bm_TGScannerConfig_scan_hex_dollar = $1000;
  380. bp_TGScannerConfig_scan_hex_dollar = 12;
  381. bm_TGScannerConfig_scan_string_sq = $2000;
  382. bp_TGScannerConfig_scan_string_sq = 13;
  383. bm_TGScannerConfig_scan_string_dq = $4000;
  384. bp_TGScannerConfig_scan_string_dq = 14;
  385. bm_TGScannerConfig_numbers_2_int = $8000;
  386. bp_TGScannerConfig_numbers_2_int = 15;
  387. bm_TGScannerConfig_int_2_float = $10000;
  388. bp_TGScannerConfig_int_2_float = 16;
  389. bm_TGScannerConfig_identifier_2_string = $20000;
  390. bp_TGScannerConfig_identifier_2_string = 17;
  391. bm_TGScannerConfig_char_2_token = $40000;
  392. bp_TGScannerConfig_char_2_token = 18;
  393. bm_TGScannerConfig_symbol_2_token = $80000;
  394. bp_TGScannerConfig_symbol_2_token = 19;
  395. bm_TGScannerConfig_scope_0_fallback = $100000;
  396. bp_TGScannerConfig_scope_0_fallback = 20;
  397. type
  398. PGFunc = ^TGFunc;
  399. TGFunc = procedure(data:gpointer; user_data:gpointer);cdecl;
  400. PGHFunc = ^TGHFunc;
  401. TGHFunc = procedure(key:gpointer; value:gpointer; user_data:gpointer);cdecl;
  402. PGHRFunc = ^TGHRFunc;
  403. TGHRFunc = function (key:gpointer; value:gpointer; user_data:gpointer):gboolean;cdecl;
  404. PGHashFunc = ^TGHashFunc;
  405. TGHashFunc = function(key:gpointer):guint;cdecl;
  406. PGCompareFunc = ^TGCompareFunc;
  407. TGCompareFunc = function (a:gpointer; b:gpointer):gint;cdecl;
  408. PGCacheNewFunc = ^TGCacheNewFunc;
  409. TGCacheNewFunc = function(key:gpointer):gpointer;cdecl;
  410. PGCacheDupFunc = ^TGCacheDupFunc;
  411. TGCacheDupFunc = function(value:gpointer):gpointer;cdecl;
  412. PGCacheDestroyFunc = ^TGCacheDestroyFunc;
  413. TGCacheDestroyFunc = procedure(value:gpointer);cdecl;
  414. PGTraverseFunc = ^TGTraverseFunc;
  415. TGTraverseFunc = function(key:gpointer; value:gpointer; data:gpointer):gint;cdecl;
  416. PGSearchFunc = ^TGSearchFunc;
  417. TGSearchFunc = function(key:gpointer; data:gpointer):gint;cdecl;
  418. PGErrorFunc = ^TGErrorFunc;
  419. TGErrorFunc = procedure(str:Pgchar);cdecl;
  420. PGWarningFunc = ^TGWarningFunc;
  421. TGWarningFunc = procedure(str:Pgchar);cdecl;
  422. PGPrintFunc = ^TGPrintFunc;
  423. TGPrintFunc = procedure(str:Pgchar);cdecl;
  424. TGCompletionFunc = function (_para1:gpointer):Pgchar;cdecl;
  425. TGDataForeachFunc = procedure (key_id:TGQuark; data:gpointer; user_data:gpointer);cdecl;
  426. TGFreeFunc = procedure (data:gpointer);cdecl;
  427. TGLogFunc = procedure (log_domain:Pgchar; log_level:TGLogLevelFlags; message:Pgchar; user_data:gpointer);cdecl;
  428. TGNodeTraverseFunc = function (node:PGNode; data:gpointer):gboolean;cdecl;
  429. TGNodeForeachFunc = procedure (node:PGNode; data:gpointer);cdecl;
  430. TGVoidFunc = procedure ;cdecl;
  431. PGallocator = pointer;
  432. PGrelation = pointer;
  433. PGData = pointer;
  434. PPGData = ^PGData;
  435. PTm = pointer;
  436. PGMainloop = pointer;
  437. PGMutex = pointer;
  438. {$ifndef gtkwin}
  439. procedure g_list_push_allocator(allocator:PGAllocator);cdecl;external glibdll name 'g_list_push_allocator';
  440. {$endif}
  441. procedure g_list_pop_allocator;cdecl;external glibdll name 'g_list_pop_allocator';
  442. function g_list_alloc:PGList;cdecl;external glibdll name 'g_list_alloc';
  443. procedure g_list_free(list:PGList);cdecl;external glibdll name 'g_list_free';
  444. procedure g_list_free_1(list:PGList);cdecl;external glibdll name 'g_list_free_1';
  445. function g_list_append(list:PGList; data:gpointer):PGList;cdecl;external glibdll name 'g_list_append';
  446. function g_list_prepend(list:PGList; data:gpointer):PGList;cdecl;external glibdll name 'g_list_prepend';
  447. function g_list_insert(list:PGList; data:gpointer; position:gint):PGList;cdecl;external glibdll name 'g_list_insert';
  448. function g_list_insert_sorted(list:PGList; data:gpointer; func:TGCompareFunc):PGList;cdecl;external glibdll name 'g_list_insert_sorted';
  449. function g_list_concat(list1:PGList; list2:PGList):PGList;cdecl;external glibdll name 'g_list_concat';
  450. function g_list_remove(list:PGList; data:gpointer):PGList;cdecl;external glibdll name 'g_list_remove';
  451. function g_list_remove_link(list:PGList; link:PGList):PGList;cdecl;external glibdll name 'g_list_remove_link';
  452. function g_list_reverse(list:PGList):PGList;cdecl;external glibdll name 'g_list_reverse';
  453. function g_list_copy(list:PGList):PGList;cdecl;external glibdll name 'g_list_copy';
  454. function g_list_nth(list:PGList; n:guint):PGList;cdecl;external glibdll name 'g_list_nth';
  455. function g_list_find(list:PGList; data:gpointer):PGList;cdecl;external glibdll name 'g_list_find';
  456. function g_list_find_custom(list:PGList; data:gpointer; func:TGCompareFunc):PGList;cdecl;external glibdll name 'g_list_find_custom';
  457. function g_list_index(list:PGList; data:gpointer):gint;cdecl;external glibdll name 'g_list_index';
  458. function g_list_position(list:PGList; llink:PGList):gint;cdecl;external glibdll name 'g_list_position';
  459. function g_list_last(list:PGList):PGList;cdecl;external glibdll name 'g_list_last';
  460. function g_list_first(list:PGList):PGList;cdecl;external glibdll name 'g_list_first';
  461. function g_list_length(list:PGList):guint;cdecl;external glibdll name 'g_list_length';
  462. procedure g_list_foreach(list:PGList; func:TGFunc; user_data:gpointer);cdecl;external glibdll name 'g_list_foreach';
  463. function g_list_sort(list:PGList; compare_func:TGCompareFunc):PGList;cdecl;external glibdll name 'g_list_sort';
  464. function g_list_nth_data(list:PGList; n:guint):gpointer;cdecl;external glibdll name 'g_list_nth_data';
  465. function g_list_previous(list : PGlist) : PGlist;
  466. function g_list_next(list : PGlist) : PGlist;
  467. procedure g_slist_push_allocator(allocator:PGAllocator);cdecl;external glibdll name 'g_slist_push_allocator';
  468. procedure g_slist_pop_allocator;cdecl;external glibdll name 'g_slist_pop_allocator';
  469. function g_slist_alloc:PGSList;cdecl;external glibdll name 'g_slist_alloc';
  470. procedure g_slist_free(list:PGSList);cdecl;external glibdll name 'g_slist_free';
  471. procedure g_slist_free_1(list:PGSList);cdecl;external glibdll name 'g_slist_free_1';
  472. function g_slist_append(list:PGSList; data:gpointer):PGSList;cdecl;external glibdll name 'g_slist_append';
  473. function g_slist_prepend(list:PGSList; data:gpointer):PGSList;cdecl;external glibdll name 'g_slist_prepend';
  474. function g_slist_insert(list:PGSList; data:gpointer; position:gint):PGSList;cdecl;external glibdll name 'g_slist_insert';
  475. function g_slist_insert_sorted(list:PGSList; data:gpointer; func:TGCompareFunc):PGSList;cdecl;external glibdll name 'g_slist_insert_sorted';
  476. function g_slist_concat(list1:PGSList; list2:PGSList):PGSList;cdecl;external glibdll name 'g_slist_concat';
  477. function g_slist_remove(list:PGSList; data:gpointer):PGSList;cdecl;external glibdll name 'g_slist_remove';
  478. function g_slist_remove_link(list:PGSList; link:PGSList):PGSList;cdecl;external glibdll name 'g_slist_remove_link';
  479. function g_slist_reverse(list:PGSList):PGSList;cdecl;external glibdll name 'g_slist_reverse';
  480. function g_slist_copy(list:PGSList):PGSList;cdecl;external glibdll name 'g_slist_copy';
  481. function g_slist_nth(list:PGSList; n:guint):PGSList;cdecl;external glibdll name 'g_slist_nth';
  482. function g_slist_find(list:PGSList; data:gpointer):PGSList;cdecl;external glibdll name 'g_slist_find';
  483. function g_slist_find_custom(list:PGSList; data:gpointer; func:TGCompareFunc):PGSList;cdecl;external glibdll name 'g_slist_find_custom';
  484. function g_slist_position(list:PGSList; llink:PGSList):gint;cdecl;external glibdll name 'g_slist_position';
  485. function g_slist_index(list:PGSList; data:gpointer):gint;cdecl;external glibdll name 'g_slist_index';
  486. function g_slist_last(list:PGSList):PGSList;cdecl;external glibdll name 'g_slist_last';
  487. function g_slist_length(list:PGSList):guint;cdecl;external glibdll name 'g_slist_length';
  488. procedure g_slist_foreach(list:PGSList; func:TGFunc; user_data:gpointer);cdecl;external glibdll name 'g_slist_foreach';
  489. function g_slist_sort(list:PGSList; compare_func:TGCompareFunc):PGSList;cdecl;external glibdll name 'g_slist_sort';
  490. function g_slist_nth_data(list:PGSList; n:guint):gpointer;cdecl;external glibdll name 'g_slist_nth_data';
  491. function g_slist_next(slist : PGSList) : PGSList;
  492. function g_hash_table_new(hash_func:TGHashFunc; key_compare_func:TGCompareFunc):PGHashTable;cdecl;external glibdll name 'g_hash_table_new';
  493. procedure g_hash_table_destroy(hash_table:PGHashTable);cdecl;external glibdll name 'g_hash_table_destroy';
  494. procedure g_hash_table_insert(hash_table:PGHashTable; key:gpointer; value:gpointer);cdecl;external glibdll name 'g_hash_table_insert';
  495. procedure g_hash_table_remove(hash_table:PGHashTable; key:gpointer);cdecl;external glibdll name 'g_hash_table_remove';
  496. function g_hash_table_lookup(hash_table:PGHashTable; key:gpointer):gpointer;cdecl;external glibdll name 'g_hash_table_lookup';
  497. function g_hash_table_lookup_extended(hash_table:PGHashTable; lookup_key:gconstpointer; orig_key:Pgpointer; value:Pgpointer):gboolean;cdecl;external glibdll name 'g_hash_table_lookup_extended';
  498. procedure g_hash_table_freeze(hash_table:PGHashTable);cdecl;external glibdll name 'g_hash_table_freeze';
  499. procedure g_hash_table_thaw(hash_table:PGHashTable);cdecl;external glibdll name 'g_hash_table_thaw';
  500. procedure g_hash_table_foreach(hash_table:PGHashTable; func:TGHFunc; user_data:gpointer);cdecl;external glibdll name 'g_hash_table_foreach';
  501. function g_hash_table_foreach_remove(hash_table:PGHashTable; func:TGHRFunc; user_data:gpointer):guint;cdecl;external glibdll name 'g_hash_table_foreach_remove';
  502. function g_hash_table_size(hash_table:PGHashTable):guint;cdecl;external glibdll name 'g_hash_table_size';
  503. function g_cache_new(value_new_func:TGCacheNewFunc; value_destroy_func:TGCacheDestroyFunc; key_dup_func:TGCacheDupFunc; key_destroy_func:TGCacheDestroyFunc; hash_key_func:TGHashFunc; hash_value_func:TGHashFunc; key_compare_func:TGCompareFunc):PGCache;cdecl;external glibdll name 'g_cache_new';
  504. procedure g_cache_destroy(cache:PGCache);cdecl;external glibdll name 'g_cache_destroy';
  505. function g_cache_insert(cache:PGCache; key:gpointer):gpointer;cdecl;external glibdll name 'g_cache_insert';
  506. procedure g_cache_remove(cache:PGCache; value:gpointer);cdecl;external glibdll name 'g_cache_remove';
  507. procedure g_cache_key_foreach(cache:PGCache; func:TGHFunc; user_data:gpointer);cdecl;external glibdll name 'g_cache_key_foreach';
  508. procedure g_cache_value_foreach(cache:PGCache; func:TGHFunc; user_data:gpointer);cdecl;external glibdll name 'g_cache_value_foreach';
  509. function g_tree_new(key_compare_func:TGCompareFunc):PGTree;cdecl;external glibdll name 'g_tree_new';
  510. procedure g_tree_destroy(tree:PGTree);cdecl;external glibdll name 'g_tree_destroy';
  511. procedure g_tree_insert(tree:PGTree; key:gpointer; value:gpointer);cdecl;external glibdll name 'g_tree_insert';
  512. procedure g_tree_remove(tree:PGTree; key:gpointer);cdecl;external glibdll name 'g_tree_remove';
  513. function g_tree_lookup(tree:PGTree; key:gpointer):gpointer;cdecl;external glibdll name 'g_tree_lookup';
  514. procedure g_tree_traverse(tree:PGTree; traverse_func:TGTraverseFunc; traverse_type:TGTraverseType; data:gpointer);cdecl;external glibdll name 'g_tree_traverse';
  515. function g_tree_search(tree:PGTree; search_func:TGSearchFunc; data:gpointer):gpointer;cdecl;external glibdll name 'g_tree_search';
  516. function g_tree_height(tree:PGTree):gint;cdecl;external glibdll name 'g_tree_height';
  517. function g_tree_nnodes(tree:PGTree):gint;cdecl;external glibdll name 'g_tree_nnodes';
  518. function G_NODE_IS_ROOT(node : PGNode) : boolean;
  519. function G_NODE_IS_LEAF(node : PGNode) : boolean;
  520. procedure g_node_push_allocator(allocator:PGAllocator);cdecl;external glibdll name 'g_node_push_allocator';
  521. procedure g_node_pop_allocator;cdecl;external glibdll name 'g_node_pop_allocator';
  522. function g_node_new(data:gpointer):PGNode;cdecl;external glibdll name 'g_node_new';
  523. procedure g_node_destroy(root:PGNode);cdecl;external glibdll name 'g_node_destroy';
  524. procedure g_node_unlink(node:PGNode);cdecl;external glibdll name 'g_node_unlink';
  525. function g_node_insert(parent:PGNode; position:gint; node:PGNode):PGNode;cdecl;external glibdll name 'g_node_insert';
  526. function g_node_insert_before(parent:PGNode; sibling:PGNode; node:PGNode):PGNode;cdecl;external glibdll name 'g_node_insert_before';
  527. function g_node_prepend(parent:PGNode; node:PGNode):PGNode;cdecl;external glibdll name 'g_node_prepend';
  528. function g_node_n_nodes(root:PGNode; flags:TGTraverseFlags):guint;cdecl;external glibdll name 'g_node_n_nodes';
  529. function g_node_get_root(node:PGNode):PGNode;cdecl;external glibdll name 'g_node_get_root';
  530. function g_node_is_ancestor(node:PGNode; descendant:PGNode):gboolean;cdecl;external glibdll name 'g_node_is_ancestor';
  531. function g_node_depth(node:PGNode):guint;cdecl;external glibdll name 'g_node_depth';
  532. function g_node_find(root:PGNode; order:TGTraverseType; flags:TGTraverseFlags; data:gpointer):PGNode;cdecl;external glibdll name 'g_node_find';
  533. function g_node_append(parent,node : PGNode) : PGNode;
  534. function g_node_insert_data(parent:PGNode;position:gint;data : pointer) : PGNode;
  535. function g_node_insert_data_before(parent,sibling:PGNode;data : pointer) : PGNode;
  536. function g_node_prepend_data(parent:PGNode;data : pointer) : PGNode;
  537. function g_node_append_data(parent:PGNode;data : pointer) : PGNode;
  538. procedure g_node_traverse(root:PGNode; order:TGTraverseType; flags:TGTraverseFlags; max_depth:gint; func:TGNodeTraverseFunc; data:gpointer);cdecl;external glibdll name 'g_node_traverse';
  539. function g_node_max_height(root:PGNode):guint;cdecl;external glibdll name 'g_node_max_height';
  540. procedure g_node_children_foreach(node:PGNode; flags:TGTraverseFlags; func:TGNodeForeachFunc; data:gpointer);cdecl;external glibdll name 'g_node_children_foreach';
  541. procedure g_node_reverse_children(node:PGNode);cdecl;external glibdll name 'g_node_reverse_children';
  542. function g_node_n_children(node:PGNode):guint;cdecl;external glibdll name 'g_node_n_children';
  543. function g_node_nth_child(node:PGNode; n:guint):PGNode;cdecl;external glibdll name 'g_node_nth_child';
  544. function g_node_last_child(node:PGNode):PGNode;cdecl;external glibdll name 'g_node_last_child';
  545. function g_node_find_child(node:PGNode; flags:TGTraverseFlags; data:gpointer):PGNode;cdecl;external glibdll name 'g_node_find_child';
  546. function g_node_child_position(node:PGNode; child:PGNode):gint;cdecl;external glibdll name 'g_node_child_position';
  547. function g_node_child_index(node:PGNode; data:gpointer):gint;cdecl;external glibdll name 'g_node_child_index';
  548. function g_node_first_sibling(node:PGNode):PGNode;cdecl;external glibdll name 'g_node_first_sibling';
  549. function g_node_last_sibling(node:PGNode):PGNode;cdecl;external glibdll name 'g_node_last_sibling';
  550. function g_node_prev_sibling(node : PGnode) : PGNode;
  551. function g_node_next_sibling(node : PGnode) : PGnode;
  552. function g_node_first_child(node : PGnode) : PGnode;
  553. function is_setup(var a : TGHookList) : guint;
  554. procedure set_is_setup(var a : TGHookList; __is_setup : guint);
  555. function G_HOOK_DEFERRED_DESTROY : TGHookFreeFunc;
  556. function G_HOOK_ACTIVE(hook : PGHook) : boolean;
  557. function G_HOOK_IN_CALL(hook : PGHook) : boolean;
  558. function G_HOOK_IS_VALID(hook : PGHook) : boolean;
  559. function G_HOOK_IS_UNLINKED(hook : PGHook) : boolean;
  560. procedure g_hook_list_init(hook_list:PGHookList; hook_size:guint);cdecl;external glibdll name 'g_hook_list_init';
  561. procedure g_hook_list_clear(hook_list:PGHookList);cdecl;external glibdll name 'g_hook_list_clear';
  562. function g_hook_alloc(hook_list:PGHookList):PGHook;cdecl;external glibdll name 'g_hook_alloc';
  563. procedure g_hook_free(hook_list:PGHookList; hook:PGHook);cdecl;external glibdll name 'g_hook_free';
  564. procedure g_hook_ref(hook_list:PGHookList; hook:PGHook);cdecl;external glibdll name 'g_hook_ref';
  565. procedure g_hook_unref(hook_list:PGHookList; hook:PGHook);cdecl;external glibdll name 'g_hook_unref';
  566. function g_hook_destroy(hook_list:PGHookList; hook_id:guint):gboolean;cdecl;external glibdll name 'g_hook_destroy';
  567. procedure g_hook_destroy_link(hook_list:PGHookList; hook:PGHook);cdecl;external glibdll name 'g_hook_destroy_link';
  568. procedure g_hook_prepend(hook_list:PGHookList; hook:PGHook);cdecl;external glibdll name 'g_hook_prepend';
  569. procedure g_hook_insert_before(hook_list:PGHookList; sibling:PGHook; hook:PGHook);cdecl;external glibdll name 'g_hook_insert_before';
  570. procedure g_hook_insert_sorted(hook_list:PGHookList; hook:PGHook; func:TGHookCompareFunc);cdecl;external glibdll name 'g_hook_insert_sorted';
  571. function g_hook_get(hook_list:PGHookList; hook_id:guint):PGHook;cdecl;external glibdll name 'g_hook_get';
  572. function g_hook_find(hook_list:PGHookList; need_valids:gboolean; func:TGHookFindFunc; data:gpointer):PGHook;cdecl;external glibdll name 'g_hook_find';
  573. function g_hook_find_data(hook_list:PGHookList; need_valids:gboolean; data:gpointer):PGHook;cdecl;external glibdll name 'g_hook_find_data';
  574. function g_hook_find_func(hook_list:PGHookList; need_valids:gboolean; func:gpointer):PGHook;cdecl;external glibdll name 'g_hook_find_func';
  575. function g_hook_find_func_data(hook_list:PGHookList; need_valids:gboolean; func:gpointer; data:gpointer):PGHook;cdecl;external glibdll name 'g_hook_find_func_data';
  576. function g_hook_first_valid(hook_list:PGHookList; may_be_in_call:gboolean):PGHook;cdecl;external glibdll name 'g_hook_first_valid';
  577. function g_hook_next_valid(hook_list:PGHookList; hook:PGHook; may_be_in_call:gboolean):PGHook;cdecl;external glibdll name 'g_hook_next_valid';
  578. function g_hook_compare_ids(new_hook:PGHook; sibling:PGHook):gint;cdecl;external glibdll name 'g_hook_compare_ids';
  579. procedure g_hook_append(hook_list:PGhooklist;hook : PGhook);
  580. procedure g_hook_list_invoke(hook_list:PGHookList; may_recurse:gboolean);cdecl;external glibdll name 'g_hook_list_invoke';
  581. procedure g_hook_list_invoke_check(hook_list:PGHookList; may_recurse:gboolean);cdecl;external glibdll name 'g_hook_list_invoke_check';
  582. procedure g_hook_list_marshal(hook_list:PGHookList; may_recurse:gboolean; marshaller:TGHookMarshaller; data:gpointer);cdecl;external glibdll name 'g_hook_list_marshal';
  583. procedure g_hook_list_marshal_check(hook_list:PGHookList; may_recurse:gboolean; marshaller:TGHookCheckMarshaller; data:gpointer);cdecl;external glibdll name 'g_hook_list_marshal_check';
  584. procedure g_on_error_query(prg_name:Pgchar);cdecl;external glibdll name 'g_on_error_query';
  585. procedure g_on_error_stack_trace(prg_name:Pgchar);cdecl;external glibdll name 'g_on_error_stack_trace';
  586. {$ifndef gtkwin}
  587. {$ifndef gtkos2}
  588. var
  589. g_log_domain_glib : Pgchar;external glibdll name 'g_log_domain_glib';
  590. {$endif}
  591. {$endif}
  592. function g_log_set_handler(log_domain:Pgchar; log_levels:TGLogLevelFlags; log_func:TGLogFunc; user_data:gpointer):guint;cdecl;external glibdll name 'g_log_set_handler';
  593. procedure g_log_remove_handler(log_domain:Pgchar; handler_id:guint);cdecl;external glibdll name 'g_log_remove_handler';
  594. procedure g_log_default_handler(log_domain:Pgchar; log_level:TGLogLevelFlags; message:Pgchar; unused_data:gpointer);cdecl;external glibdll name 'g_log_default_handler';
  595. procedure g_logv(log_domain:Pgchar; log_level:TGLogLevelFlags; format:Pgchar; args:array of const);cdecl;external glibdll name 'g_logv';
  596. function g_log_set_fatal_mask(log_domain:Pgchar; fatal_mask:TGLogLevelFlags):TGLogLevelFlags;cdecl;external glibdll name 'g_log_set_fatal_mask';
  597. function g_log_set_always_fatal(fatal_mask:TGLogLevelFlags):TGLogLevelFlags;cdecl;external glibdll name 'g_log_set_always_fatal';
  598. function g_set_printerr_handler(func:TGPrintFunc):TGPrintFunc;cdecl;external glibdll name 'g_set_printerr_handler';
  599. function g_set_print_handler(func:TGPrintFunc):TGPrintFunc;cdecl;external glibdll name 'g_set_print_handler';
  600. function g_set_error_handler(func:TGErrorFunc):TGErrorFunc;cdecl;external glibdll name 'g_set_error_handler';
  601. function g_set_warning_handler(func:TGWarningFunc):TGWarningFunc;cdecl;external glibdll name 'g_set_warning_handler';
  602. function g_set_message_handler(func:TGPrintFunc):TGPrintFunc;cdecl;external glibdll name 'g_set_message_handler';
  603. function g_malloc(size:gulong):gpointer;cdecl;external glibdll name 'g_malloc';
  604. function g_malloc0(size:gulong):gpointer;cdecl;external glibdll name 'g_malloc0';
  605. function g_realloc(mem:gpointer; size:gulong):gpointer;cdecl;external glibdll name 'g_realloc';
  606. procedure g_free(mem:gpointer);cdecl;external glibdll name 'g_free';
  607. procedure g_mem_profile;cdecl;external glibdll name 'g_mem_profile';
  608. procedure g_mem_check(mem:gpointer);cdecl;external glibdll name 'g_mem_check';
  609. const
  610. G_ALLOCATOR_LIST = 1;
  611. G_ALLOCATOR_SLIST = 2;
  612. G_ALLOCATOR_NODE = 3;
  613. function g_allocator_new(name:Pgchar; n_preallocs:guint):PGAllocator;cdecl;external glibdll name 'g_allocator_new';
  614. procedure g_allocator_free(allocator:PGAllocator);cdecl;external glibdll name 'g_allocator_free';
  615. const
  616. G_ALLOC_ONLY = 1;
  617. G_ALLOC_AND_FREE = 2;
  618. function g_mem_chunk_new(name:Pgchar; atom_size:gint; area_size:gulong; thetype:gint):PGMemChunk;cdecl;external glibdll name 'g_mem_chunk_new';
  619. procedure g_mem_chunk_destroy(mem_chunk:PGMemChunk);cdecl;external glibdll name 'g_mem_chunk_destroy';
  620. function g_mem_chunk_alloc(mem_chunk:PGMemChunk):gpointer;cdecl;external glibdll name 'g_mem_chunk_alloc';
  621. function g_mem_chunk_alloc0(mem_chunk:PGMemChunk):gpointer;cdecl;external glibdll name 'g_mem_chunk_alloc0';
  622. procedure g_mem_chunk_free(mem_chunk:PGMemChunk; mem:gpointer);cdecl;external glibdll name 'g_mem_chunk_free';
  623. procedure g_mem_chunk_clean(mem_chunk:PGMemChunk);cdecl;external glibdll name 'g_mem_chunk_clean';
  624. procedure g_mem_chunk_reset(mem_chunk:PGMemChunk);cdecl;external glibdll name 'g_mem_chunk_reset';
  625. procedure g_mem_chunk_print(mem_chunk:PGMemChunk);cdecl;external glibdll name 'g_mem_chunk_print';
  626. procedure g_mem_chunk_info;cdecl;external glibdll name 'g_mem_chunk_info';
  627. procedure g_blow_chunks;cdecl;external glibdll name 'g_blow_chunks';
  628. function g_timer_new:PGTimer;cdecl;external glibdll name 'g_timer_new';
  629. procedure g_timer_destroy(timer:PGTimer);cdecl;external glibdll name 'g_timer_destroy';
  630. procedure g_timer_start(timer:PGTimer);cdecl;external glibdll name 'g_timer_start';
  631. procedure g_timer_stop(timer:PGTimer);cdecl;external glibdll name 'g_timer_stop';
  632. procedure g_timer_reset(timer:PGTimer);cdecl;external glibdll name 'g_timer_reset';
  633. function g_timer_elapsed(timer:PGTimer; microseconds:Pgulong):gdouble;cdecl;external glibdll name 'g_timer_elapsed';
  634. const
  635. G_STR_DELIMITERS = '_-|> <.';
  636. function g_strdelimit(thestring:Pgchar; delimiters:Pgchar; new_delimiter:gchar):Pgchar;cdecl;external glibdll name 'g_strdelimit';
  637. function g_strtod(nptr:Pgchar; endptr:PPgchar):gdouble;cdecl;external glibdll name 'g_strtod';
  638. function g_strerror(errnum:gint):Pgchar;cdecl;external glibdll name 'g_strerror';
  639. function g_strsignal(signum:gint):Pgchar;cdecl;external glibdll name 'g_strsignal';
  640. function g_strcasecmp(s1:Pgchar; s2:Pgchar):gint;cdecl;external glibdll name 'g_strcasecmp';
  641. function g_strncasecmp(s1:Pgchar; s2:Pgchar; n:guint):gint;cdecl;external glibdll name 'g_strncasecmp';
  642. procedure g_strdown(thestring:Pgchar);cdecl;external glibdll name 'g_strdown';
  643. procedure g_strup(thestring:Pgchar);cdecl;external glibdll name 'g_strup';
  644. procedure g_strreverse(thestring:Pgchar);cdecl;external glibdll name 'g_strreverse';
  645. function g_strchug(thestring:Pgchar):Pgchar;cdecl;external glibdll name 'g_strchug';
  646. function g_strchomp(thestring:Pgchar):Pgchar;cdecl;external glibdll name 'g_strchomp';
  647. function g_strstrip(thestring : Pgchar) : Pgchar;
  648. function g_strdup(str:Pgchar):Pgchar;cdecl;external glibdll name 'g_strdup';
  649. function g_strdup_printf(format:Pgchar;args:array of const):Pgchar;cdecl;external glibdll name 'g_strdup_printf';
  650. function g_strdup_vprintf(format:Pgchar; args:array of const):Pgchar;cdecl;external glibdll name 'g_strdup_vprintf';
  651. function g_strndup(str:Pgchar; n:guint):Pgchar;cdecl;external glibdll name 'g_strndup';
  652. function g_strnfill(length:guint; fill_char:gchar):Pgchar;cdecl;external glibdll name 'g_strnfill';
  653. function g_strconcat(string1:Pgchar; args:array of const):Pgchar;cdecl;external glibdll name 'g_strconcat';
  654. function g_strjoin(separator:Pgchar; args:array of const):Pgchar;cdecl;external glibdll name 'g_strjoin';
  655. function g_strescape(thestring:Pgchar):Pgchar;cdecl;external glibdll name 'g_strescape';
  656. function g_memdup(mem:gconstpointer; byte_size:guint):gpointer;cdecl;external glibdll name 'g_memdup';
  657. function g_strsplit(thestring:Pgchar; delimiter:Pgchar; max_tokens:gint):PPgchar;cdecl;external glibdll name 'g_strsplit';
  658. function g_strjoinv(separator:Pgchar; str_array:PPgchar):Pgchar;cdecl;external glibdll name 'g_strjoinv';
  659. procedure g_strfreev(str_array:PPgchar);cdecl;external glibdll name 'g_strfreev';
  660. function g_printf_string_upper_bound(format:Pgchar; args:array of const):guint;cdecl;external glibdll name 'g_printf_string_upper_bound';
  661. function g_get_user_name:Pgchar;cdecl;external glibdll name 'g_get_user_name';
  662. function g_get_real_name:Pgchar;cdecl;external glibdll name 'g_get_real_name';
  663. function g_get_home_dir:Pgchar;cdecl;external glibdll name 'g_get_home_dir';
  664. function g_get_tmp_dir:Pgchar;cdecl;external glibdll name 'g_get_tmp_dir';
  665. function g_get_prgname:Pgchar;cdecl;external glibdll name 'g_get_prgname';
  666. procedure g_set_prgname(prgname:Pgchar);cdecl;external glibdll name 'g_set_prgname';
  667. function g_parse_debug_string(thestring:Pgchar; keys:PGDebugKey; nkeys:guint):guint;cdecl;external glibdll name 'g_parse_debug_string';
  668. function g_vsnprintf(thestring:Pgchar; n:gulong; format:Pgchar; args:array of const):gint;cdecl;external glibdll name 'g_vsnprintf';
  669. function g_basename(file_name:Pgchar):Pgchar;cdecl;external glibdll name 'g_basename';
  670. function g_path_is_absolute(file_name:Pgchar):gboolean;cdecl;external glibdll name 'g_path_is_absolute';
  671. function g_path_skip_root(file_name:Pgchar):Pgchar;cdecl;external glibdll name 'g_path_skip_root';
  672. function g_dirname(file_name:Pgchar):Pgchar;cdecl;external glibdll name 'g_dirname';
  673. function g_get_current_dir:Pgchar;cdecl;external glibdll name 'g_get_current_dir';
  674. function g_getenv(variable:Pgchar):Pgchar;cdecl;external glibdll name 'g_getenv';
  675. procedure g_atexit(func:TGVoidFunc);cdecl;external glibdll name 'g_atexit';
  676. function g_string_chunk_new(size:gint):PGStringChunk;cdecl;external glibdll name 'g_string_chunk_new';
  677. procedure g_string_chunk_free(chunk:PGStringChunk);cdecl;external glibdll name 'g_string_chunk_free';
  678. function g_string_chunk_insert(chunk:PGStringChunk; thestring:Pgchar):Pgchar;cdecl;external glibdll name 'g_string_chunk_insert';
  679. function g_string_chunk_insert_const(chunk:PGStringChunk; thestring:Pgchar):Pgchar;cdecl;external glibdll name 'g_string_chunk_insert_const';
  680. function g_string_new(init:Pgchar):PGString;cdecl;external glibdll name 'g_string_new';
  681. function g_string_sized_new(dfl_size:guint):PGString;cdecl;external glibdll name 'g_string_sized_new';
  682. procedure g_string_free(thestring:PGString; free_segment:gint);cdecl;external glibdll name 'g_string_free';
  683. function g_string_assign(lval:PGString; rval:Pgchar):PGString;cdecl;external glibdll name 'g_string_assign';
  684. function g_string_truncate(thestring:PGString; len:gint):PGString;cdecl;external glibdll name 'g_string_truncate';
  685. function g_string_append(thestring:PGString; val:Pgchar):PGString;cdecl;external glibdll name 'g_string_append';
  686. function g_string_append_c(thestring:PGString; c:gchar):PGString;cdecl;external glibdll name 'g_string_append_c';
  687. function g_string_prepend(thestring:PGString; val:Pgchar):PGString;cdecl;external glibdll name 'g_string_prepend';
  688. function g_string_prepend_c(thestring:PGString; c:gchar):PGString;cdecl;external glibdll name 'g_string_prepend_c';
  689. function g_string_insert(thestring:PGString; pos:gint; val:Pgchar):PGString;cdecl;external glibdll name 'g_string_insert';
  690. function g_string_insert_c(thestring:PGString; pos:gint; c:gchar):PGString;cdecl;external glibdll name 'g_string_insert_c';
  691. function g_string_erase(thestring:PGString; pos:gint; len:gint):PGString;cdecl;external glibdll name 'g_string_erase';
  692. function g_string_down(thestring:PGString):PGString;cdecl;external glibdll name 'g_string_down';
  693. function g_string_up(thestring:PGString):PGString;cdecl;external glibdll name 'g_string_up';
  694. procedure g_string_sprintf(thestring:PGString; fmt:Pgchar; args:array of const);cdecl;external glibdll name 'g_string_sprintf';
  695. procedure g_string_sprintfa(thestring:PGString; fmt:Pgchar; args:array of const);cdecl;external glibdll name 'g_string_sprintfa';
  696. function g_array_append_val(a:PGarray;v : longint) : PGarray;
  697. function g_array_prepend_val(a:PGarray;v : longint) : PGarray;
  698. function g_array_insert_val(a:PGarray;i:guint;v : longint) : PGarray;
  699. function g_array_new(zero_terminated:gint):PGArray;cdecl;external glibdll name 'g_array_new';
  700. procedure g_array_free(thearray:PGArray; free_segment:gint);cdecl;external glibdll name 'g_array_free';
  701. function g_array_append_vals(thearray:PGArray; data:gconstpointer; len:guint):PGArray;cdecl;external glibdll name 'g_array_append_vals';
  702. function g_array_prepend_vals(thearray:PGArray; data:gconstpointer; len:guint):PGArray;cdecl;external glibdll name 'g_array_prepend_vals';
  703. function g_array_insert_vals(thearray:PGArray; index:guint; data:gconstpointer; len:guint):PGArray;cdecl;external glibdll name 'g_array_insert_vals';
  704. function g_array_set_size(thearray:PGArray; length:guint):PGArray;cdecl;external glibdll name 'g_array_set_size';
  705. function g_array_remove_index(thearray:PGArray; index:guint):PGArray;cdecl;external glibdll name 'g_array_remove_index';
  706. function g_array_remove_index_fast(thearray:PGArray; index:guint):PGArray;cdecl;external glibdll name 'g_array_remove_index_fast';
  707. function g_ptr_array_new:PGPtrArray;cdecl;external glibdll name 'g_ptr_array_new';
  708. procedure g_ptr_array_free(thearray:PGPtrArray; free_seg:gboolean);cdecl;external glibdll name 'g_ptr_array_free';
  709. procedure g_ptr_array_set_size(thearray:PGPtrArray; length:gint);cdecl;external glibdll name 'g_ptr_array_set_size';
  710. function g_ptr_array_remove_index(thearray:PGPtrArray; index:guint):gpointer;cdecl;external glibdll name 'g_ptr_array_remove_index';
  711. function g_ptr_array_remove_index_fast(thearray:PGPtrArray; index:guint):gpointer;cdecl;external glibdll name 'g_ptr_array_remove_index_fast';
  712. function g_ptr_array_remove(thearray:PGPtrArray; data:gpointer):gboolean;cdecl;external glibdll name 'g_ptr_array_remove';
  713. function g_ptr_array_remove_fast(thearray:PGPtrArray; data:gpointer):gboolean;cdecl;external glibdll name 'g_ptr_array_remove_fast';
  714. procedure g_ptr_array_add(thearray:PGPtrArray; data:gpointer);cdecl;external glibdll name 'g_ptr_array_add';
  715. function g_byte_array_new:PGByteArray;cdecl;external glibdll name 'g_byte_array_new';
  716. procedure g_byte_array_free(thearray:PGByteArray; free_segment:gboolean);cdecl;external glibdll name 'g_byte_array_free';
  717. function g_byte_array_append(thearray:PGByteArray; data:Pguint8; len:guint):PGByteArray;cdecl;external glibdll name 'g_byte_array_append';
  718. function g_byte_array_prepend(thearray:PGByteArray; data:Pguint8; len:guint):PGByteArray;cdecl;external glibdll name 'g_byte_array_prepend';
  719. function g_byte_array_set_size(thearray:PGByteArray; length:guint):PGByteArray;cdecl;external glibdll name 'g_byte_array_set_size';
  720. function g_byte_array_remove_index(thearray:PGByteArray; index:guint):PGByteArray;cdecl;external glibdll name 'g_byte_array_remove_index';
  721. function g_byte_array_remove_index_fast(thearray:PGByteArray; index:guint):PGByteArray;cdecl;external glibdll name 'g_byte_array_remove_index_fast';
  722. function g_str_equal(v:gconstpointer; v2:gconstpointer):gint;cdecl;external glibdll name 'g_str_equal';
  723. function g_str_hash(v:gconstpointer):guint;cdecl;external glibdll name 'g_str_hash';
  724. function g_int_equal(v:gconstpointer; v2:gconstpointer):gint;cdecl;external glibdll name 'g_int_equal';
  725. function g_int_hash(v:gconstpointer):guint;cdecl;external glibdll name 'g_int_hash';
  726. function g_direct_hash(v:gconstpointer):guint;cdecl;external glibdll name 'g_direct_hash';
  727. function g_direct_equal(v:gconstpointer; v2:gconstpointer):gint;cdecl;external glibdll name 'g_direct_equal';
  728. function g_quark_try_string(thestring:Pgchar):TGQuark;cdecl;external glibdll name 'g_quark_try_string';
  729. function g_quark_from_static_string(thestring:Pgchar):TGQuark;cdecl;external glibdll name 'g_quark_from_static_string';
  730. function g_quark_from_string(thestring:Pgchar):TGQuark;cdecl;external glibdll name 'g_quark_from_string';
  731. function g_quark_to_string(quark:TGQuark):Pgchar;cdecl;external glibdll name 'g_quark_to_string';
  732. procedure g_datalist_init(datalist:PPGData);cdecl;external glibdll name 'g_datalist_init';
  733. procedure g_datalist_clear(datalist:PPGData);cdecl;external glibdll name 'g_datalist_clear';
  734. function g_datalist_id_get_data(datalist:PPGData; key_id:TGQuark):gpointer;cdecl;external glibdll name 'g_datalist_id_get_data';
  735. procedure g_datalist_id_set_data_full(datalist:PPGData; key_id:TGQuark; data:gpointer; destroy_func:TGDestroyNotify);cdecl;external glibdll name 'g_datalist_id_set_data_full';
  736. procedure g_datalist_id_remove_no_notify(datalist:PPGData; key_id:TGQuark);cdecl;external glibdll name 'g_datalist_id_remove_no_notify';
  737. procedure g_datalist_foreach(datalist:PPGData; func:TGDataForeachFunc; user_data:gpointer);cdecl;external glibdll name 'g_datalist_foreach';
  738. procedure g_datalist_id_set_data(dl:PPGdata;q:TGQuark;d : pointer);
  739. procedure g_datalist_id_remove_data(dl:PPGData;q:TGQuark);
  740. function g_datalist_Get_data(dl:PPGData;k : Pgchar):gpointer;
  741. procedure g_datalist_set_data_full(dl:PPGData;k:Pgchar;d:gpointer;f : TGDestroyNotify);
  742. procedure g_datalist_remove_no_notify(dl:PPGdata;k : Pgchar);
  743. procedure g_datalist_set_data(dl:PPGdata;k:Pgchar;d : pointer);
  744. procedure g_datalist_remove_data(dl:PPGdata;k : Pgchar);
  745. procedure g_dataset_destroy(dataset_location:gconstpointer);cdecl;external glibdll name 'g_dataset_destroy';
  746. function g_dataset_id_get_data(dataset_location:gconstpointer; key_id:TGQuark):gpointer;cdecl;external glibdll name 'g_dataset_id_get_data';
  747. procedure g_dataset_id_set_data_full(dataset_location:gconstpointer; key_id:TGQuark; data:gpointer; destroy_func:TGDestroyNotify);cdecl;external glibdll name 'g_dataset_id_set_data_full';
  748. procedure g_dataset_id_remove_no_notify(dataset_location:gconstpointer; key_id:TGQuark);cdecl;external glibdll name 'g_dataset_id_remove_no_notify';
  749. procedure g_dataset_foreach(dataset_location:gconstpointer; func:TGDataForeachFunc; user_data:gpointer);cdecl;external glibdll name 'g_dataset_foreach';
  750. procedure g_dataset_id_set_data(l:gconstpointer;k:TGQuark;d : gconstpointer);
  751. procedure g_dataset_id_remove_data(l : gconstpointer;k:TGQuark);
  752. function g_dataset_get_data(l : gconstpointer;k:Pgchar) : gconstpointer;
  753. procedure g_dataset_set_data_full(l:gconstpointer;k:Pgchar;d:pointer;f : TGDestroynotify);
  754. procedure g_dataset_remove_no_notify(l : gconstpointer;k:Pgchar);
  755. procedure g_dataset_set_data(l:gconstpointer;k:Pgchar;d:pointer);
  756. procedure g_dataset_remove_data(l : gconstpointer;k:Pgchar);
  757. function case_sensitive(var a : TGScannerConfig) : guint;
  758. procedure set_case_sensitive(var a : TGScannerConfig; __case_sensitive : guint);
  759. function skip_comment_multi(var a : TGScannerConfig) : guint;
  760. procedure set_skip_comment_multi(var a : TGScannerConfig; __skip_comment_multi : guint);
  761. function skip_comment_single(var a : TGScannerConfig) : guint;
  762. procedure set_skip_comment_single(var a : TGScannerConfig; __skip_comment_single : guint);
  763. function scan_comment_multi(var a : TGScannerConfig) : guint;
  764. procedure set_scan_comment_multi(var a : TGScannerConfig; __scan_comment_multi : guint);
  765. function scan_identifier(var a : TGScannerConfig) : guint;
  766. procedure set_scan_identifier(var a : TGScannerConfig; __scan_identifier : guint);
  767. function scan_identifier_1char(var a : TGScannerConfig) : guint;
  768. procedure set_scan_identifier_1char(var a : TGScannerConfig; __scan_identifier_1char : guint);
  769. function scan_identifier_NULL(var a : TGScannerConfig) : guint;
  770. procedure set_scan_identifier_NULL(var a : TGScannerConfig; __scan_identifier_NULL : guint);
  771. function scan_symbols(var a : TGScannerConfig) : guint;
  772. procedure set_scan_symbols(var a : TGScannerConfig; __scan_symbols : guint);
  773. function scan_binary(var a : TGScannerConfig) : guint;
  774. procedure set_scan_binary(var a : TGScannerConfig; __scan_binary : guint);
  775. function scan_octal(var a : TGScannerConfig) : guint;
  776. procedure set_scan_octal(var a : TGScannerConfig; __scan_octal : guint);
  777. function scan_float(var a : TGScannerConfig) : guint;
  778. procedure set_scan_float(var a : TGScannerConfig; __scan_float : guint);
  779. function scan_hex(var a : TGScannerConfig) : guint;
  780. procedure set_scan_hex(var a : TGScannerConfig; __scan_hex : guint);
  781. function scan_hex_dollar(var a : TGScannerConfig) : guint;
  782. procedure set_scan_hex_dollar(var a : TGScannerConfig; __scan_hex_dollar : guint);
  783. function scan_string_sq(var a : TGScannerConfig) : guint;cdecl;
  784. procedure set_scan_string_sq(var a : TGScannerConfig; __scan_string_sq : guint);cdecl;
  785. function scan_string_dq(var a : TGScannerConfig) : guint;cdecl;
  786. procedure set_scan_string_dq(var a : TGScannerConfig; __scan_string_dq : guint);cdecl;
  787. function numbers_2_int(var a : TGScannerConfig) : guint;
  788. procedure set_numbers_2_int(var a : TGScannerConfig; __numbers_2_int : guint);
  789. function int_2_float(var a : TGScannerConfig) : guint;
  790. procedure set_int_2_float(var a : TGScannerConfig; __int_2_float : guint);
  791. function identifier_2_string(var a : TGScannerConfig) : guint;
  792. procedure set_identifier_2_string(var a : TGScannerConfig; __identifier_2_string : guint);
  793. function char_2_token(var a : TGScannerConfig) : guint;
  794. procedure set_char_2_token(var a : TGScannerConfig; __char_2_token : guint);
  795. function symbol_2_token(var a : TGScannerConfig) : guint;
  796. procedure set_symbol_2_token(var a : TGScannerConfig; __symbol_2_token : guint);
  797. function scope_0_fallback(var a : TGScannerConfig) : guint;
  798. procedure set_scope_0_fallback(var a : TGScannerConfig; __scope_0_fallback : guint);
  799. function g_scanner_new(config_templ:PGScannerConfig):PGScanner;cdecl;external glibdll name 'g_scanner_new';
  800. procedure g_scanner_destroy(scanner:PGScanner);cdecl;external glibdll name 'g_scanner_destroy';
  801. procedure g_scanner_input_file(scanner:PGScanner; input_fd:gint);cdecl;external glibdll name 'g_scanner_input_file';
  802. procedure g_scanner_sync_file_offset(scanner:PGScanner);cdecl;external glibdll name 'g_scanner_sync_file_offset';
  803. procedure g_scanner_input_text(scanner:PGScanner; text:Pgchar; text_len:guint);cdecl;external glibdll name 'g_scanner_input_text';
  804. function g_scanner_get_next_token(scanner:PGScanner):TGTokenType;cdecl;external glibdll name 'g_scanner_get_next_token';
  805. function g_scanner_peek_next_token(scanner:PGScanner):TGTokenType;cdecl;external glibdll name 'g_scanner_peek_next_token';
  806. function g_scanner_cur_token(scanner:PGScanner):TGTokenType;cdecl;external glibdll name 'g_scanner_cur_token';
  807. function g_scanner_cur_value(scanner:PGScanner):TGTokenValue;cdecl;external glibdll name 'g_scanner_cur_value';
  808. function g_scanner_cur_line(scanner:PGScanner):guint;cdecl;external glibdll name 'g_scanner_cur_line';
  809. function g_scanner_cur_position(scanner:PGScanner):guint;cdecl;external glibdll name 'g_scanner_cur_position';
  810. function g_scanner_eof(scanner:PGScanner):gboolean;cdecl;external glibdll name 'g_scanner_eof';
  811. function g_scanner_set_scope(scanner:PGScanner; scope_id:guint):guint;cdecl;external glibdll name 'g_scanner_set_scope';
  812. procedure g_scanner_scope_add_symbol(scanner:PGScanner; scope_id:guint; symbol:Pgchar; value:gpointer);cdecl;external glibdll name 'g_scanner_scope_add_symbol';
  813. procedure g_scanner_scope_remove_symbol(scanner:PGScanner; scope_id:guint; symbol:Pgchar);cdecl;external glibdll name 'g_scanner_scope_remove_symbol';
  814. function g_scanner_scope_lookup_symbol(scanner:PGScanner; scope_id:guint; symbol:Pgchar):gpointer;cdecl;external glibdll name 'g_scanner_scope_lookup_symbol';
  815. procedure g_scanner_scope_foreach_symbol(scanner:PGScanner; scope_id:guint; func:TGHFunc; user_data:gpointer);cdecl;external glibdll name 'g_scanner_scope_foreach_symbol';
  816. function g_scanner_lookup_symbol(scanner:PGScanner; symbol:Pgchar):gpointer;cdecl;external glibdll name 'g_scanner_lookup_symbol';
  817. procedure g_scanner_freeze_symbol_table(scanner:PGScanner);cdecl;external glibdll name 'g_scanner_freeze_symbol_table';
  818. procedure g_scanner_thaw_symbol_table(scanner:PGScanner);cdecl;external glibdll name 'g_scanner_thaw_symbol_table';
  819. procedure g_scanner_unexp_token(scanner:PGScanner; expected_token:TGTokenType; identifier_spec:Pgchar; symbol_spec:Pgchar; symbol_name:Pgchar; message:Pgchar; is_error:gint);cdecl;external glibdll name 'g_scanner_unexp_token';
  820. function g_scanner_stat_mode(filename:Pgchar):gint;cdecl;external glibdll name 'g_scanner_stat_mode';
  821. type
  822. PGCompletion = ^TGCompletion;
  823. TGCompletion = record
  824. items : PGList;
  825. func : TGCompletionFunc;
  826. prefix : Pgchar;
  827. cache : PGList;
  828. end;
  829. function g_completion_new(func:TGCompletionFunc):PGCompletion;cdecl;external glibdll name 'g_completion_new';
  830. procedure g_completion_add_items(cmp:PGCompletion; items:PGList);cdecl;external glibdll name 'g_completion_add_items';
  831. procedure g_completion_remove_items(cmp:PGCompletion; items:PGList);cdecl;external glibdll name 'g_completion_remove_items';
  832. procedure g_completion_clear_items(cmp:PGCompletion);cdecl;external glibdll name 'g_completion_clear_items';
  833. function g_completion_complete(cmp:PGCompletion; prefix:Pgchar; new_prefix:PPgchar):PGList;cdecl;external glibdll name 'g_completion_complete';
  834. procedure g_completion_free(cmp:PGCompletion);cdecl;external glibdll name 'g_completion_free';
  835. type
  836. TGDateYear = guint16;
  837. TGDateDay = guint8;
  838. TGDateDMY = longint;
  839. const
  840. G_DATEDMY_DAY = 0;
  841. G_DATEDMY_MONTH = 1;
  842. G_DATEDMY_YEAR = 2;
  843. type
  844. TGDateWeekday = longint;
  845. const
  846. G_DATE_BAD_WEEKDAY = 0;
  847. G_DATE_MONDAY = 1;
  848. G_DATE_TUESDAY = 2;
  849. G_DATE_WEDNESDAY = 3;
  850. G_DATE_THURSDAY = 4;
  851. G_DATE_FRIDAY = 5;
  852. G_DATE_SATURDAY = 6;
  853. G_DATE_SUNDAY = 7;
  854. type
  855. TGDateMonth = longint;
  856. const
  857. G_DATE_BAD_MONTH = 0;
  858. G_DATE_JANUARY = 1;
  859. G_DATE_FEBRUARY = 2;
  860. G_DATE_MARCH = 3;
  861. G_DATE_APRIL = 4;
  862. G_DATE_MAY = 5;
  863. G_DATE_JUNE = 6;
  864. G_DATE_JULY = 7;
  865. G_DATE_AUGUST = 8;
  866. G_DATE_SEPTEMBER = 9;
  867. G_DATE_OCTOBER = 10;
  868. G_DATE_NOVEMBER = 11;
  869. G_DATE_DECEMBER = 12;
  870. const
  871. G_DATE_BAD_JULIAN = 0;
  872. G_DATE_BAD_DAY = 0;
  873. G_DATE_BAD_YEAR = 0;
  874. type
  875. PGDate = ^TGDate;
  876. TGDate = record
  877. flag0 : longint;
  878. flag1 : longint;
  879. end;
  880. const
  881. bm_TGDate_julian_days = $FFFFFFFF;
  882. bp_TGDate_julian_days = 0;
  883. bm_TGDate_julian = $1;
  884. bp_TGDate_julian = 0;
  885. bm_TGDate_dmy = $2;
  886. bp_TGDate_dmy = 1;
  887. bm_TGDate_day = $FC;
  888. bp_TGDate_day = 2;
  889. bm_TGDate_month = $F00;
  890. bp_TGDate_month = 8;
  891. bm_TGDate_year = $FFFF000;
  892. bp_TGDate_year = 12;
  893. function julian_days(var a : TGDate) : guint;
  894. procedure set_julian_days(var a : TGDate; __julian_days : guint);
  895. function julian(var a : TGDate) : guint;
  896. procedure set_julian(var a : TGDate; __julian : guint);
  897. function dmy(var a : TGDate) : guint;
  898. procedure set_dmy(var a : TGDate; __dmy : guint);
  899. function day(var a : TGDate) : guint;
  900. procedure set_day(var a : TGDate; __day : guint);
  901. function month(var a : TGDate) : guint;
  902. procedure set_month(var a : TGDate; __month : guint);
  903. function year(var a : TGDate) : guint;
  904. procedure set_year(var a : TGDate; __year : guint);
  905. function g_date_new:PGDate;cdecl;external glibdll name 'g_date_new';
  906. function g_date_new_dmy(day:TGDateDay; month:TGDateMonth; year:TGDateYear):PGDate;cdecl;external glibdll name 'g_date_new_dmy';
  907. function g_date_new_julian(julian_day:guint32):PGDate;cdecl;external glibdll name 'g_date_new_julian';
  908. procedure g_date_free(date:PGDate);cdecl;external glibdll name 'g_date_free';
  909. function g_date_valid(date:PGDate):gboolean;cdecl;external glibdll name 'g_date_valid';
  910. function g_date_valid_day(day:TGDateDay):gboolean;cdecl;external glibdll name 'g_date_valid_day';
  911. function g_date_valid_month(month:TGDateMonth):gboolean;cdecl;external glibdll name 'g_date_valid_month';
  912. function g_date_valid_year(year:TGDateYear):gboolean;cdecl;external glibdll name 'g_date_valid_year';
  913. function g_date_valid_weekday(weekday:TGDateWeekday):gboolean;cdecl;external glibdll name 'g_date_valid_weekday';
  914. function g_date_valid_julian(julian_date:guint32):gboolean;cdecl;external glibdll name 'g_date_valid_julian';
  915. function g_date_valid_dmy(day:TGDateDay; month:TGDateMonth; year:TGDateYear):gboolean;cdecl;external glibdll name 'g_date_valid_dmy';
  916. function g_date_weekday(date:PGDate):TGDateWeekday;cdecl;external glibdll name 'g_date_weekday';
  917. function g_date_month(date:PGDate):TGDateMonth;cdecl;external glibdll name 'g_date_month';
  918. function g_date_year(date:PGDate):TGDateYear;cdecl;external glibdll name 'g_date_year';
  919. function g_date_day(date:PGDate):TGDateDay;cdecl;external glibdll name 'g_date_day';
  920. function g_date_julian(date:PGDate):guint32;cdecl;external glibdll name 'g_date_julian';
  921. function g_date_day_of_year(date:PGDate):guint;cdecl;external glibdll name 'g_date_day_of_year';
  922. function g_date_monday_week_of_year(date:PGDate):guint;cdecl;external glibdll name 'g_date_monday_week_of_year';
  923. function g_date_sunday_week_of_year(date:PGDate):guint;cdecl;external glibdll name 'g_date_sunday_week_of_year';
  924. procedure g_date_clear(date:PGDate; n_dates:guint);cdecl;external glibdll name 'g_date_clear';
  925. procedure g_date_set_parse(date:PGDate; str:Pgchar);cdecl;external glibdll name 'g_date_set_parse';
  926. procedure g_date_set_time(date:PGDate; time:TGTime);cdecl;external glibdll name 'g_date_set_time';
  927. procedure g_date_set_month(date:PGDate; month:TGDateMonth);cdecl;external glibdll name 'g_date_set_month';
  928. procedure g_date_set_day(date:PGDate; day:TGDateDay);cdecl;external glibdll name 'g_date_set_day';
  929. procedure g_date_set_year(date:PGDate; year:TGDateYear);cdecl;external glibdll name 'g_date_set_year';
  930. procedure g_date_set_dmy(date:PGDate; day:TGDateDay; month:TGDateMonth; y:TGDateYear);cdecl;external glibdll name 'g_date_set_dmy';
  931. procedure g_date_set_julian(date:PGDate; julian_date:guint32);cdecl;external glibdll name 'g_date_set_julian';
  932. function g_date_is_first_of_month(date:PGDate):gboolean;cdecl;external glibdll name 'g_date_is_first_of_month';
  933. function g_date_is_last_of_month(date:PGDate):gboolean;cdecl;external glibdll name 'g_date_is_last_of_month';
  934. procedure g_date_add_days(date:PGDate; n_days:guint);cdecl;external glibdll name 'g_date_add_days';
  935. procedure g_date_subtract_days(date:PGDate; n_days:guint);cdecl;external glibdll name 'g_date_subtract_days';
  936. procedure g_date_add_months(date:PGDate; n_months:guint);cdecl;external glibdll name 'g_date_add_months';
  937. procedure g_date_subtract_months(date:PGDate; n_months:guint);cdecl;external glibdll name 'g_date_subtract_months';
  938. procedure g_date_add_years(date:PGDate; n_years:guint);cdecl;external glibdll name 'g_date_add_years';
  939. procedure g_date_subtract_years(date:PGDate; n_years:guint);cdecl;external glibdll name 'g_date_subtract_years';
  940. function g_date_is_leap_year(year:TGDateYear):gboolean;cdecl;external glibdll name 'g_date_is_leap_year';
  941. function g_date_days_in_month(month:TGDateMonth; year:TGDateYear):guint8;cdecl;external glibdll name 'g_date_days_in_month';
  942. function g_date_monday_weeks_in_year(year:TGDateYear):guint8;cdecl;external glibdll name 'g_date_monday_weeks_in_year';
  943. function g_date_sunday_weeks_in_year(year:TGDateYear):guint8;cdecl;external glibdll name 'g_date_sunday_weeks_in_year';
  944. function g_date_compare(lhs:PGDate; rhs:PGDate):gint;cdecl;external glibdll name 'g_date_compare';
  945. procedure g_date_to_struct_tm(date:PGDate; tm:ptm);cdecl;external glibdll name 'g_date_to_struct_tm';
  946. function g_date_strftime(s:Pgchar; slen:gsize; format:Pgchar; date:PGDate):gsize;cdecl;external glibdll name 'g_date_strftime';
  947. function g_relation_new(fields:gint):PGRelation;cdecl;external glibdll name 'g_relation_new';
  948. procedure g_relation_destroy(relation:PGRelation);cdecl;external glibdll name 'g_relation_destroy';
  949. procedure g_relation_index(relation:PGRelation; field:gint; hash_func:TGHashFunc; key_compare_func:TGCompareFunc);cdecl;external glibdll name 'g_relation_index';
  950. procedure g_relation_insert(relation:PGRelation; args:array of const);cdecl;external glibdll name 'g_relation_insert';
  951. function g_relation_delete(relation:PGRelation; key:gconstpointer; field:gint):gint;cdecl;external glibdll name 'g_relation_delete';
  952. function g_relation_select(relation:PGRelation; key:gconstpointer; field:gint):PGTuples;cdecl;external glibdll name 'g_relation_select';
  953. function g_relation_count(relation:PGRelation; key:gconstpointer; field:gint):gint;cdecl;external glibdll name 'g_relation_count';
  954. function g_relation_exists(relation:PGRelation; args:array of const):gboolean;cdecl;external glibdll name 'g_relation_exists';
  955. procedure g_relation_print(relation:PGRelation);cdecl;external glibdll name 'g_relation_print';
  956. procedure g_tuples_destroy(tuples:PGTuples);cdecl;external glibdll name 'g_tuples_destroy';
  957. function g_tuples_index(tuples:PGTuples; index:gint; field:gint):gpointer;cdecl;external glibdll name 'g_tuples_index';
  958. function g_spaced_primes_closest(num:guint):guint;cdecl;external glibdll name 'g_spaced_primes_closest';
  959. type
  960. TGIOError = longint;
  961. const
  962. G_IO_ERROR_NONE = 0;
  963. G_IO_ERROR_AGAIN = 1;
  964. G_IO_ERROR_INVAL = 2;
  965. G_IO_ERROR_UNKNOWN = 3;
  966. type
  967. TGSeekType = longint;
  968. const
  969. G_SEEK_CUR = 0;
  970. G_SEEK_SET = 1;
  971. G_SEEK_END = 2;
  972. G_IO_IN = 1;
  973. G_IO_OUT = 4;
  974. G_IO_PRI = 2;
  975. G_IO_ERR = 8;
  976. G_IO_HUP = 16;
  977. G_IO_NVAL = 32;
  978. type
  979. TGIOCondition = longint;
  980. PGIOFuncs = ^TGIOFuncs;
  981. PGIOChannel = ^TGIOChannel;
  982. TGIOChannel = record
  983. channel_flags : guint;
  984. ref_count : guint;
  985. funcs : PGIOFuncs;
  986. end;
  987. TGIOFunc = function (source:PGIOChannel; condition:TGIOCondition; data:gpointer):gboolean;cdecl;
  988. TGIOFuncs = record
  989. io_read : function (channel:PGIOChannel; buf:Pgchar; count:guint; bytes_read:Pguint):TGIOError;cdecl;
  990. io_write : function (channel:PGIOChannel; buf:Pgchar; count:guint; bytes_written:Pguint):TGIOError;cdecl;
  991. io_seek : function (channel:PGIOChannel; offset:gint; thetype:TGSeekType):TGIOError;cdecl;
  992. io_close : procedure (channel:PGIOChannel);cdecl;
  993. io_add_watch : function (channel:PGIOChannel; priority:gint; condition:TGIOCondition; func:TGIOFunc; user_data:gpointer; notify:TGDestroyNotify):guint;cdecl;
  994. io_free : procedure (channel:PGIOChannel);cdecl;
  995. end;
  996. procedure g_io_channel_init(channel:PGIOChannel);cdecl;external glibdll name 'g_io_channel_init';
  997. procedure g_io_channel_ref(channel:PGIOChannel);cdecl;external glibdll name 'g_io_channel_ref';
  998. procedure g_io_channel_unref(channel:PGIOChannel);cdecl;external glibdll name 'g_io_channel_unref';
  999. function g_io_channel_read(channel:PGIOChannel; buf:Pgchar; count:guint; bytes_read:Pguint):TGIOError;cdecl;external glibdll name 'g_io_channel_read';
  1000. function g_io_channel_write(channel:PGIOChannel; buf:Pgchar; count:guint; bytes_written:Pguint):TGIOError;cdecl;external glibdll name 'g_io_channel_write';
  1001. function g_io_channel_seek(channel:PGIOChannel; offset:gint; thetype:TGSeekType):TGIOError;cdecl;external glibdll name 'g_io_channel_seek';
  1002. procedure g_io_channel_close(channel:PGIOChannel);cdecl;external glibdll name 'g_io_channel_close';
  1003. function g_io_add_watch_full(channel:PGIOChannel; priority:gint; condition:TGIOCondition; func:TGIOFunc; user_data:gpointer; notify:TGDestroyNotify):guint;cdecl;external glibdll name 'g_io_add_watch_full';
  1004. function g_io_add_watch(channel:PGIOChannel; condition:TGIOCondition; func:TGIOFunc; user_data:gpointer):guint;cdecl;external glibdll name 'g_io_add_watch';
  1005. type
  1006. PGTimeVal = ^TGTimeVal;
  1007. TGTimeVal = record
  1008. tv_sec : glong;
  1009. tv_usec : glong;
  1010. end;
  1011. PGSourceFuncs = ^TGSourceFuncs;
  1012. TGSourceFuncs = record
  1013. prepare : function (source_data:gpointer; current_time:PGTimeVal; timeout:Pgint; user_data:gpointer):gboolean;cdecl;
  1014. check : function (source_data:gpointer; current_time:PGTimeVal; user_data:gpointer):gboolean;cdecl;
  1015. dispatch : function (source_data:gpointer; current_time:PGTimeVal; user_data:gpointer):gboolean;cdecl;
  1016. destroy : TGDestroyNotify;
  1017. end;
  1018. const
  1019. G_PRIORITY_HIGH = -100;
  1020. G_PRIORITY_DEFAULT = 0;
  1021. G_PRIORITY_HIGH_IDLE = 100;
  1022. G_PRIORITY_DEFAULT_IDLE = 200;
  1023. G_PRIORITY_LOW = 300;
  1024. type
  1025. TGSourceFunc = function (data:gpointer):gboolean;cdecl;
  1026. function g_source_add(priority:gint; can_recurse:gboolean; funcs:PGSourceFuncs; source_data:gpointer; user_data:gpointer; notify:TGDestroyNotify):guint;cdecl;external glibdll name 'g_source_add';
  1027. function g_source_remove(tag:guint):gboolean;cdecl;external glibdll name 'g_source_remove';
  1028. function g_source_remove_by_user_data(user_data:gpointer):gboolean;cdecl;external glibdll name 'g_source_remove_by_user_data';
  1029. function g_source_remove_by_source_data(source_data:gpointer):gboolean;cdecl;external glibdll name 'g_source_remove_by_source_data';
  1030. function g_source_remove_by_funcs_user_data(funcs:PGSourceFuncs; user_data:gpointer):gboolean;cdecl;external glibdll name 'g_source_remove_by_funcs_user_data';
  1031. procedure g_get_current_time(result:PGTimeVal);cdecl;external glibdll name 'g_get_current_time';
  1032. function g_main_new(is_running:gboolean):PGMainLoop;cdecl;external glibdll name 'g_main_new';
  1033. procedure g_main_run(loop:PGMainLoop);cdecl;external glibdll name 'g_main_run';
  1034. procedure g_main_quit(loop:PGMainLoop);cdecl;external glibdll name 'g_main_quit';
  1035. procedure g_main_destroy(loop:PGMainLoop);cdecl;external glibdll name 'g_main_destroy';
  1036. function g_main_is_running(loop:PGMainLoop):gboolean;cdecl;external glibdll name 'g_main_is_running';
  1037. function g_main_iteration(may_block:gboolean):gboolean;cdecl;external glibdll name 'g_main_iteration';
  1038. function g_main_pending:gboolean;cdecl;external glibdll name 'g_main_pending';
  1039. function g_timeout_add_full(priority:gint; interval:guint; thefunction:TGSourceFunc; data:gpointer; notify:TGDestroyNotify):guint;cdecl;external glibdll name 'g_timeout_add_full';
  1040. function g_timeout_add(interval:guint; thefunction:TGSourceFunc; data:gpointer):guint;cdecl;external glibdll name 'g_timeout_add';
  1041. function g_idle_add(thefunction:TGSourceFunc; data:gpointer):guint;cdecl;external glibdll name 'g_idle_add';
  1042. function g_idle_add_full(priority:gint; thefunction:TGSourceFunc; data:gpointer; destroy:TGDestroyNotify):guint;cdecl;external glibdll name 'g_idle_add_full';
  1043. function g_idle_remove_by_data(data:gpointer):gboolean;cdecl;external glibdll name 'g_idle_remove_by_data';
  1044. type
  1045. PGPollFD = ^TGPollFD;
  1046. TGPollFD = record
  1047. fd : gint;
  1048. events : gushort;
  1049. revents : gushort;
  1050. end;
  1051. TGPollFunc = function (ufds:PGPollFD; nfsd:guint; timeout:gint):gint;cdecl;
  1052. procedure g_main_add_poll(fd:PGPollFD; priority:gint);cdecl;external glibdll name 'g_main_add_poll';
  1053. procedure g_main_remove_poll(fd:PGPollFD);cdecl;external glibdll name 'g_main_remove_poll';
  1054. procedure g_main_set_poll_func(func:TGPollFunc);cdecl;external glibdll name 'g_main_set_poll_func';
  1055. function g_io_channel_unix_new(fd:longint):PGIOChannel;cdecl;external glibdll name 'g_io_channel_unix_new';
  1056. function g_io_channel_unix_get_fd(channel:PGIOChannel):gint;cdecl;external glibdll name 'g_io_channel_unix_get_fd';
  1057. implementation
  1058. function g_list_previous(list : PGlist) : PGlist;
  1059. begin
  1060. if list<>nil then
  1061. g_list_previous:=(PGList(list))^.prev
  1062. else
  1063. g_list_previous:=NULL;
  1064. end;
  1065. function g_list_next(list : PGlist) : PGlist;
  1066. begin
  1067. if list<>nil then
  1068. g_list_next:=(PGList(list))^.next
  1069. else
  1070. g_list_next:=NULL;
  1071. end;
  1072. function g_slist_next(slist : PGSList) : PGSList;
  1073. begin
  1074. if slist<>nil then
  1075. g_slist_next:=(PGSList(slist))^.next
  1076. else
  1077. g_slist_next:=NULL;
  1078. end;
  1079. function G_NODE_IS_ROOT(node : PGNode) : boolean;
  1080. begin
  1081. G_NODE_IS_ROOT:={((((PGNode(node))^.parent) = (NULL and (@((PGNode(node))^.prev)))) = (NULL and (@((PGNode(node))^.next)))) = NULL; }false;
  1082. end;
  1083. function G_NODE_IS_LEAF(node : PGNode) : boolean;
  1084. begin
  1085. G_NODE_IS_LEAF:=((PGNode(node))^.children) = NULL;
  1086. end;
  1087. function g_node_append(parent,node : PGNode) : PGNode;
  1088. begin
  1089. g_node_append:=g_node_insert_before(parent,NULL,node);
  1090. end;
  1091. function g_node_insert_data(parent: PGNode;position:gint;data:pointer) : PGNode;
  1092. begin
  1093. g_node_insert_data:=g_node_insert(parent,position,g_node_new(data));
  1094. end;
  1095. function g_node_insert_data_before(parent,sibling : PGNode;data:pointer) : PGNode;
  1096. begin
  1097. g_node_insert_data_before:=g_node_insert_before(parent,sibling,g_node_new(data));
  1098. end;
  1099. function g_node_prepend_data(parent:PGNode;data : pointer) : PGNode;
  1100. begin
  1101. g_node_prepend_data:=g_node_prepend(parent,g_node_new(data));
  1102. end;
  1103. function g_node_append_data(parent : PGNode;data:pointer) : PGNode;
  1104. begin
  1105. g_node_append_data:=g_node_insert_before(parent,NULL,g_node_new(data));
  1106. end;
  1107. function g_node_prev_sibling(node : PGnode) : PGNode;
  1108. begin
  1109. if node<>nil then
  1110. g_node_prev_sibling:=(PGNode(node))^.prev
  1111. else
  1112. g_node_prev_sibling:=NULL;
  1113. end;
  1114. function g_node_next_sibling(node : PGNode) : PGNode;
  1115. begin
  1116. if node<>nil then
  1117. g_node_next_sibling:=(PGNode(node))^.next
  1118. else
  1119. g_node_next_sibling:=NULL;
  1120. end;
  1121. function g_node_first_child(node : PGNode) : PGNode;
  1122. begin
  1123. if node<>nil then
  1124. g_node_first_child:=(PGNode(node))^.children
  1125. else
  1126. g_node_first_child:=NULL;
  1127. end;
  1128. function G_HOOK_DEFERRED_DESTROY : TGHookFreeFunc;
  1129. begin
  1130. G_HOOK_DEFERRED_DESTROY:=TGHookFreeFunc($01);
  1131. end;
  1132. function is_setup(var a : TGHookList) : guint;
  1133. begin
  1134. is_setup:=(a.flag0 and bm_TGHookList_is_setup) shr bp_TGHookList_is_setup;
  1135. end;
  1136. procedure set_is_setup(var a : TGHookList; __is_setup : guint);
  1137. begin
  1138. a.flag0:=a.flag0 or ((__is_setup shl bp_TGHookList_is_setup) and bm_TGHookList_is_setup);
  1139. end;
  1140. function G_HOOK_ACTIVE(hook : PGHook) : boolean;
  1141. begin
  1142. G_HOOK_ACTIVE:=(((PGHook(hook))^.flags) and cardinal(G_HOOK_FLAG_ACTIVE)) <> 0;
  1143. end;
  1144. function G_HOOK_IN_CALL(hook : PGHook) : boolean;
  1145. begin
  1146. G_HOOK_IN_CALL:=(((PGHook(hook))^.flags) and cardinal(G_HOOK_FLAG_IN_CALL)) <> 0;
  1147. end;
  1148. function G_HOOK_IS_VALID(hook : PGHook) : boolean;
  1149. begin
  1150. G_HOOK_IS_VALID:=(hook^.hook_id<>0) and G_HOOK_ACTIVE(hook);
  1151. end;
  1152. function G_HOOK_IS_UNLINKED(hook : PGHook) : boolean;
  1153. begin
  1154. G_HOOK_IS_UNLINKED:=(hook^.next=NULL) and (hook^.prev=NULL) and (hook^.hook_id=0) and (hook^.ref_count = 0);
  1155. end;
  1156. procedure g_hook_append(hook_list:PGhooklist;hook : PGHook);
  1157. begin
  1158. g_hook_insert_before(hook_list,nil,hook);
  1159. end;
  1160. function g_strstrip(thestring : Pgchar) : Pgchar;
  1161. begin
  1162. g_strstrip:=g_strchomp(g_strchug(thestring));
  1163. end;
  1164. function g_array_append_val(a:PGArray;v : longint) : PGarray;
  1165. begin
  1166. g_array_append_val:=g_array_append_vals(a,@(v),1);
  1167. end;
  1168. function g_array_prepend_val(a:PGArray;v : longint) : PGarray;
  1169. begin
  1170. g_array_prepend_val:=g_array_prepend_vals(a,@(v),1);
  1171. end;
  1172. function g_array_insert_val(a:PGArray;i:guint;v : longint) : PGarray;
  1173. begin
  1174. g_array_insert_val:=g_array_insert_vals(a,i,@(v),1);
  1175. end;
  1176. procedure g_datalist_id_set_data(dl:PPGdata;q:TGQuark;d : pointer);
  1177. begin
  1178. g_datalist_id_set_data_full(dl,q,d,NULL);
  1179. end;
  1180. procedure g_datalist_id_remove_data(dl:PPGData;q:TGQuark);
  1181. begin
  1182. g_datalist_id_set_data(dl,q,NULL);
  1183. end;
  1184. function g_datalist_Get_data(dl:PPGData;k : Pgchar):gpointer;
  1185. begin
  1186. g_datalist_Get_data:=g_datalist_id_get_data(dl,g_quark_try_string(k));
  1187. end;
  1188. procedure g_datalist_set_data_full(dl:PPGData;k:Pgchar;d:gpointer;f : TGdestroynotify);
  1189. begin
  1190. g_datalist_id_set_data_full(dl,g_quark_from_string(k),d,f);
  1191. end;
  1192. procedure g_datalist_remove_no_notify(dl:PPGdata;k : Pgchar);
  1193. begin
  1194. g_datalist_id_remove_no_notify(dl,g_quark_try_string(k));
  1195. end;
  1196. procedure g_datalist_set_data(dl:PPGdata;k:Pgchar;d : pointer);
  1197. begin
  1198. g_datalist_set_data_full(dl,k,d,NULL);
  1199. end;
  1200. procedure g_datalist_remove_data(dl:PPGdata;k : Pgchar);
  1201. begin
  1202. g_datalist_id_set_data(dl,g_quark_try_string(k),NULL);
  1203. end;
  1204. procedure g_dataset_id_set_data(l:gconstpointer;k:TGQuark;d : gconstpointer);
  1205. begin
  1206. g_dataset_id_set_data_full(l,k,d,NULL);
  1207. end;
  1208. procedure g_dataset_id_remove_data(l : gconstpointer;k:TGQuark);
  1209. begin
  1210. g_dataset_id_set_data(l,k,NULL);
  1211. end;
  1212. function g_dataset_get_data(l : gconstpointer;k:Pgchar) : gconstpointer;
  1213. begin
  1214. g_dataset_get_data:=g_dataset_id_get_data(l,g_quark_try_string(k));
  1215. end;
  1216. procedure g_dataset_set_data_full(l:gconstpointer;k:Pgchar;d:pointer;f : TGDestroynotify);
  1217. begin
  1218. g_dataset_id_set_data_full(l,g_quark_from_string(k),d,f);
  1219. end;
  1220. procedure g_dataset_remove_no_notify(l : gconstpointer;k:Pgchar);
  1221. begin
  1222. g_dataset_id_remove_no_notify(l,g_quark_try_string(k));
  1223. end;
  1224. procedure g_dataset_set_data(l:gconstpointer;k:Pgchar;d:pointer);
  1225. begin
  1226. g_dataset_set_data_full(l,k,d,NULL);
  1227. end;
  1228. procedure g_dataset_remove_data(l : gconstpointer;k:Pgchar);
  1229. begin
  1230. g_dataset_id_set_data(l,g_quark_try_string(k),NULL);
  1231. end;
  1232. function case_sensitive(var a : TGScannerConfig) : guint;
  1233. begin
  1234. case_sensitive:=(a.flag0 and bm_TGScannerConfig_case_sensitive) shr bp_TGScannerConfig_case_sensitive;
  1235. end;
  1236. procedure set_case_sensitive(var a : TGScannerConfig; __case_sensitive : guint);
  1237. begin
  1238. a.flag0:=a.flag0 or ((__case_sensitive shl bp_TGScannerConfig_case_sensitive) and bm_TGScannerConfig_case_sensitive);
  1239. end;
  1240. function skip_comment_multi(var a : TGScannerConfig) : guint;
  1241. begin
  1242. skip_comment_multi:=(a.flag0 and bm_TGScannerConfig_skip_comment_multi) shr bp_TGScannerConfig_skip_comment_multi;
  1243. end;
  1244. procedure set_skip_comment_multi(var a : TGScannerConfig; __skip_comment_multi : guint);
  1245. begin
  1246. a.flag0:=a.flag0 or ((__skip_comment_multi shl bp_TGScannerConfig_skip_comment_multi) and bm_TGScannerConfig_skip_comment_multi);
  1247. end;
  1248. function skip_comment_single(var a : TGScannerConfig) : guint;
  1249. begin
  1250. skip_comment_single:=(a.flag0 and bm_TGScannerConfig_skip_comment_single) shr bp_TGScannerConfig_skip_comment_single;
  1251. end;
  1252. procedure set_skip_comment_single(var a : TGScannerConfig; __skip_comment_single : guint);
  1253. begin
  1254. a.flag0:=a.flag0 or ((__skip_comment_single shl bp_TGScannerConfig_skip_comment_single) and bm_TGScannerConfig_skip_comment_single);
  1255. end;
  1256. function scan_comment_multi(var a : TGScannerConfig) : guint;
  1257. begin
  1258. scan_comment_multi:=(a.flag0 and bm_TGScannerConfig_scan_comment_multi) shr bp_TGScannerConfig_scan_comment_multi;
  1259. end;
  1260. procedure set_scan_comment_multi(var a : TGScannerConfig; __scan_comment_multi : guint);
  1261. begin
  1262. a.flag0:=a.flag0 or ((__scan_comment_multi shl bp_TGScannerConfig_scan_comment_multi) and bm_TGScannerConfig_scan_comment_multi);
  1263. end;
  1264. function scan_identifier(var a : TGScannerConfig) : guint;
  1265. begin
  1266. scan_identifier:=(a.flag0 and bm_TGScannerConfig_scan_identifier) shr bp_TGScannerConfig_scan_identifier;
  1267. end;
  1268. procedure set_scan_identifier(var a : TGScannerConfig; __scan_identifier : guint);
  1269. begin
  1270. a.flag0:=a.flag0 or ((__scan_identifier shl bp_TGScannerConfig_scan_identifier) and bm_TGScannerConfig_scan_identifier);
  1271. end;
  1272. function scan_identifier_1char(var a : TGScannerConfig) : guint;
  1273. begin
  1274. scan_identifier_1char:=(a.flag0 and bm_TGScannerConfig_scan_identifier_1char) shr bp_TGScannerConfig_scan_identifier_1char;
  1275. end;
  1276. procedure set_scan_identifier_1char(var a : TGScannerConfig; __scan_identifier_1char : guint);
  1277. begin
  1278. a.flag0:=a.flag0 or ((__scan_identifier_1char shl bp_TGScannerConfig_scan_identifier_1char) and bm_TGScannerConfig_scan_identifier_1char);
  1279. end;
  1280. function scan_identifier_NULL(var a : TGScannerConfig) : guint;
  1281. begin
  1282. scan_identifier_NULL:=(a.flag0 and bm_TGScannerConfig_scan_identifier_NULL) shr bp_TGScannerConfig_scan_identifier_NULL;
  1283. end;
  1284. procedure set_scan_identifier_NULL(var a : TGScannerConfig; __scan_identifier_NULL : guint);
  1285. begin
  1286. a.flag0:=a.flag0 or ((__scan_identifier_NULL shl bp_TGScannerConfig_scan_identifier_NULL) and bm_TGScannerConfig_scan_identifier_NULL);
  1287. end;
  1288. function scan_symbols(var a : TGScannerConfig) : guint;
  1289. begin
  1290. scan_symbols:=(a.flag0 and bm_TGScannerConfig_scan_symbols) shr bp_TGScannerConfig_scan_symbols;
  1291. end;
  1292. procedure set_scan_symbols(var a : TGScannerConfig; __scan_symbols : guint);
  1293. begin
  1294. a.flag0:=a.flag0 or ((__scan_symbols shl bp_TGScannerConfig_scan_symbols) and bm_TGScannerConfig_scan_symbols);
  1295. end;
  1296. function scan_binary(var a : TGScannerConfig) : guint;
  1297. begin
  1298. scan_binary:=(a.flag0 and bm_TGScannerConfig_scan_binary) shr bp_TGScannerConfig_scan_binary;
  1299. end;
  1300. procedure set_scan_binary(var a : TGScannerConfig; __scan_binary : guint);
  1301. begin
  1302. a.flag0:=a.flag0 or ((__scan_binary shl bp_TGScannerConfig_scan_binary) and bm_TGScannerConfig_scan_binary);
  1303. end;
  1304. function scan_octal(var a : TGScannerConfig) : guint;
  1305. begin
  1306. scan_octal:=(a.flag0 and bm_TGScannerConfig_scan_octal) shr bp_TGScannerConfig_scan_octal;
  1307. end;
  1308. procedure set_scan_octal(var a : TGScannerConfig; __scan_octal : guint);
  1309. begin
  1310. a.flag0:=a.flag0 or ((__scan_octal shl bp_TGScannerConfig_scan_octal) and bm_TGScannerConfig_scan_octal);
  1311. end;
  1312. function scan_float(var a : TGScannerConfig) : guint;
  1313. begin
  1314. scan_float:=(a.flag0 and bm_TGScannerConfig_scan_float) shr bp_TGScannerConfig_scan_float;
  1315. end;
  1316. procedure set_scan_float(var a : TGScannerConfig; __scan_float : guint);
  1317. begin
  1318. a.flag0:=a.flag0 or ((__scan_float shl bp_TGScannerConfig_scan_float) and bm_TGScannerConfig_scan_float);
  1319. end;
  1320. function scan_hex(var a : TGScannerConfig) : guint;
  1321. begin
  1322. scan_hex:=(a.flag0 and bm_TGScannerConfig_scan_hex) shr bp_TGScannerConfig_scan_hex;
  1323. end;
  1324. procedure set_scan_hex(var a : TGScannerConfig; __scan_hex : guint);
  1325. begin
  1326. a.flag0:=a.flag0 or ((__scan_hex shl bp_TGScannerConfig_scan_hex) and bm_TGScannerConfig_scan_hex);
  1327. end;
  1328. function scan_hex_dollar(var a : TGScannerConfig) : guint;
  1329. begin
  1330. scan_hex_dollar:=(a.flag0 and bm_TGScannerConfig_scan_hex_dollar) shr bp_TGScannerConfig_scan_hex_dollar;
  1331. end;
  1332. procedure set_scan_hex_dollar(var a : TGScannerConfig; __scan_hex_dollar : guint);
  1333. begin
  1334. a.flag0:=a.flag0 or ((__scan_hex_dollar shl bp_TGScannerConfig_scan_hex_dollar) and bm_TGScannerConfig_scan_hex_dollar);
  1335. end;
  1336. function scan_string_sq(var a : TGScannerConfig) : guint;cdecl;
  1337. begin
  1338. scan_string_sq:=(a.flag0 and bm_TGScannerConfig_scan_string_sq) shr bp_TGScannerConfig_scan_string_sq;
  1339. end;
  1340. procedure set_scan_string_sq(var a : TGScannerConfig; __scan_string_sq : guint);cdecl;
  1341. begin
  1342. a.flag0:=a.flag0 or ((__scan_string_sq shl bp_TGScannerConfig_scan_string_sq) and bm_TGScannerConfig_scan_string_sq);
  1343. end;
  1344. function scan_string_dq(var a : TGScannerConfig) : guint;cdecl;
  1345. begin
  1346. scan_string_dq:=(a.flag0 and bm_TGScannerConfig_scan_string_dq) shr bp_TGScannerConfig_scan_string_dq;
  1347. end;
  1348. procedure set_scan_string_dq(var a : TGScannerConfig; __scan_string_dq : guint);cdecl;
  1349. begin
  1350. a.flag0:=a.flag0 or ((__scan_string_dq shl bp_TGScannerConfig_scan_string_dq) and bm_TGScannerConfig_scan_string_dq);
  1351. end;
  1352. function numbers_2_int(var a : TGScannerConfig) : guint;
  1353. begin
  1354. numbers_2_int:=(a.flag0 and bm_TGScannerConfig_numbers_2_int) shr bp_TGScannerConfig_numbers_2_int;
  1355. end;
  1356. procedure set_numbers_2_int(var a : TGScannerConfig; __numbers_2_int : guint);
  1357. begin
  1358. a.flag0:=a.flag0 or ((__numbers_2_int shl bp_TGScannerConfig_numbers_2_int) and bm_TGScannerConfig_numbers_2_int);
  1359. end;
  1360. function int_2_float(var a : TGScannerConfig) : guint;
  1361. begin
  1362. int_2_float:=(a.flag0 and bm_TGScannerConfig_int_2_float) shr bp_TGScannerConfig_int_2_float;
  1363. end;
  1364. procedure set_int_2_float(var a : TGScannerConfig; __int_2_float : guint);
  1365. begin
  1366. a.flag0:=a.flag0 or ((__int_2_float shl bp_TGScannerConfig_int_2_float) and bm_TGScannerConfig_int_2_float);
  1367. end;
  1368. function identifier_2_string(var a : TGScannerConfig) : guint;
  1369. begin
  1370. identifier_2_string:=(a.flag0 and bm_TGScannerConfig_identifier_2_string) shr bp_TGScannerConfig_identifier_2_string;
  1371. end;
  1372. procedure set_identifier_2_string(var a : TGScannerConfig; __identifier_2_string : guint);
  1373. begin
  1374. a.flag0:=a.flag0 or ((__identifier_2_string shl bp_TGScannerConfig_identifier_2_string) and bm_TGScannerConfig_identifier_2_string);
  1375. end;
  1376. function char_2_token(var a : TGScannerConfig) : guint;
  1377. begin
  1378. char_2_token:=(a.flag0 and bm_TGScannerConfig_char_2_token) shr bp_TGScannerConfig_char_2_token;
  1379. end;
  1380. procedure set_char_2_token(var a : TGScannerConfig; __char_2_token : guint);
  1381. begin
  1382. a.flag0:=a.flag0 or ((__char_2_token shl bp_TGScannerConfig_char_2_token) and bm_TGScannerConfig_char_2_token);
  1383. end;
  1384. function symbol_2_token(var a : TGScannerConfig) : guint;
  1385. begin
  1386. symbol_2_token:=(a.flag0 and bm_TGScannerConfig_symbol_2_token) shr bp_TGScannerConfig_symbol_2_token;
  1387. end;
  1388. procedure set_symbol_2_token(var a : TGScannerConfig; __symbol_2_token : guint);
  1389. begin
  1390. a.flag0:=a.flag0 or ((__symbol_2_token shl bp_TGScannerConfig_symbol_2_token) and bm_TGScannerConfig_symbol_2_token);
  1391. end;
  1392. function scope_0_fallback(var a : TGScannerConfig) : guint;
  1393. begin
  1394. scope_0_fallback:=(a.flag0 and bm_TGScannerConfig_scope_0_fallback) shr bp_TGScannerConfig_scope_0_fallback;
  1395. end;
  1396. procedure set_scope_0_fallback(var a : TGScannerConfig; __scope_0_fallback : guint);
  1397. begin
  1398. a.flag0:=a.flag0 or ((__scope_0_fallback shl bp_TGScannerConfig_scope_0_fallback) and bm_TGScannerConfig_scope_0_fallback);
  1399. end;
  1400. function julian_days(var a : TGDate) : guint;
  1401. begin
  1402. julian_days:=(a.flag0 and bm_TGDate_julian_days) shr bp_TGDate_julian_days;
  1403. end;
  1404. procedure set_julian_days(var a : TGDate; __julian_days : guint);
  1405. begin
  1406. a.flag0:=a.flag0 or ((__julian_days shl bp_TGDate_julian_days) and bm_TGDate_julian_days);
  1407. end;
  1408. function julian(var a : TGDate) : guint;
  1409. begin
  1410. julian:=(a.flag0 and bm_TGDate_julian) shr bp_TGDate_julian;
  1411. end;
  1412. procedure set_julian(var a : TGDate; __julian : guint);
  1413. begin
  1414. a.flag0:=a.flag0 or ((__julian shl bp_TGDate_julian) and bm_TGDate_julian);
  1415. end;
  1416. function dmy(var a : TGDate) : guint;
  1417. begin
  1418. dmy:=(a.flag0 and bm_TGDate_dmy) shr bp_TGDate_dmy;
  1419. end;
  1420. procedure set_dmy(var a : TGDate; __dmy : guint);
  1421. begin
  1422. a.flag0:=a.flag0 or ((__dmy shl bp_TGDate_dmy) and bm_TGDate_dmy);
  1423. end;
  1424. function day(var a : TGDate) : guint;
  1425. begin
  1426. day:=(a.flag0 and bm_TGDate_day) shr bp_TGDate_day;
  1427. end;
  1428. procedure set_day(var a : TGDate; __day : guint);
  1429. begin
  1430. a.flag0:=a.flag0 or ((__day shl bp_TGDate_day) and bm_TGDate_day);
  1431. end;
  1432. function month(var a : TGDate) : guint;
  1433. begin
  1434. month:=(a.flag0 and bm_TGDate_month) shr bp_TGDate_month;
  1435. end;
  1436. procedure set_month(var a : TGDate; __month : guint);
  1437. begin
  1438. a.flag0:=a.flag0 or ((__month shl bp_TGDate_month) and bm_TGDate_month);
  1439. end;
  1440. function year(var a : TGDate) : guint;
  1441. begin
  1442. year:=(a.flag0 and bm_TGDate_year) shr bp_TGDate_year;
  1443. end;
  1444. procedure set_year(var a : TGDate; __year : guint);
  1445. begin
  1446. a.flag0:=a.flag0 or ((__year shl bp_TGDate_year) and bm_TGDate_year);
  1447. end;
  1448. end.