glib.pp 82 KB

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