glib.pp 82 KB

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