glib.pp 83 KB

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