glib.pp 83 KB

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