gnomeconfig.inc 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395
  1. {$IfDef read_interface}
  2. function _gnome_config_get_string_with_default(path:Pchar; def:Pgboolean; priv:gint):pchar;cdecl;external libgnomedll name '_gnome_config_get_string_with_default';
  3. function _gnome_config_get_translated_string_with_default(path:Pchar; def:Pgboolean; priv:gint):pchar;cdecl;external libgnomedll name '_gnome_config_get_translated_string_with_default';
  4. function _gnome_config_get_int_with_default(path:Pchar; def:Pgboolean; priv:gint):gint;cdecl;external libgnomedll name '_gnome_config_get_int_with_default';
  5. function _gnome_config_get_float_with_default(path:Pchar; def:Pgboolean; priv:gint):gdouble;cdecl;external libgnomedll name '_gnome_config_get_float_with_default';
  6. function _gnome_config_get_bool_with_default(path:Pchar; def:Pgboolean; priv:gint):gboolean;cdecl;external libgnomedll name '_gnome_config_get_bool_with_default';
  7. Procedure _gnome_config_get_vector_with_default(path:Pchar; argcp:Pgint; argvp:PPPchar; def:Pgboolean; priv:gint);cdecl;external libgnomedll name '_gnome_config_get_vector_with_default';
  8. function gnome_config_get_string_with_default(path:Pchar; def:Pgboolean):pchar;
  9. function gnome_config_get_translated_string_with_default(path:Pchar; def:Pgboolean):pchar;
  10. function gnome_config_get_int_with_default(path:Pchar; def:Pgboolean):gint;
  11. function gnome_config_get_float_with_default(path:Pchar; def:Pgboolean):gdouble;
  12. function gnome_config_get_bool_with_default(path:Pchar; def:Pgboolean):gboolean;
  13. Procedure gnome_config_get_vector_with_default(path:Pchar; argcp:Pgint; argvp:PPPchar; def:Pgboolean);
  14. function gnome_config_private_get_string_with_default(path:Pchar; def:Pgboolean):pchar;
  15. function gnome_config_private_get_translated_string_with_default(path:Pchar; def:Pgboolean):pchar;
  16. function gnome_config_private_get_int_with_default(path:Pchar; def:Pgboolean):gint;
  17. function gnome_config_private_get_float_with_default(path:Pchar; def:Pgboolean):gdouble;
  18. function gnome_config_private_get_bool_with_default(path:Pchar; def:Pgboolean):gboolean;
  19. procedure gnome_config_private_get_vector_with_default(path:Pchar; argcp:Pgint; argvp:PPPchar; def:Pgboolean);
  20. function gnome_config_get_string(path:Pchar):pchar;
  21. function gnome_config_get_translated_string(path:Pchar):pchar;
  22. function gnome_config_get_int(path:Pchar):gint;
  23. function gnome_config_get_float(path:Pchar):gdouble;
  24. function gnome_config_get_bool(path:Pchar):gboolean;
  25. procedure gnome_config_get_vector(path:Pchar; argcp:Pgint; argvp:PPPchar);
  26. function gnome_config_private_get_string(path:Pchar):pchar;
  27. function gnome_config_private_get_translated_string(path:Pchar):pchar;
  28. function gnome_config_private_get_int(path:Pchar):gint;
  29. function gnome_config_private_get_float(path:Pchar):gdouble;
  30. function gnome_config_private_get_bool(path:Pchar):gboolean;
  31. procedure gnome_config_private_get_vector(path:Pchar; argcp:Pgint; argvp:PPPchar);
  32. procedure _gnome_config_set_string(path:Pchar; value:Pchar; priv:gint);cdecl;external libgnomedll name '_gnome_config_set_string';
  33. procedure _gnome_config_set_translated_string(path:Pchar; value:Pchar; priv:gint);cdecl;external libgnomedll name '_gnome_config_set_translated_string';
  34. procedure _gnome_config_set_int(path:Pchar; value:longint; priv:gint);cdecl;external libgnomedll name '_gnome_config_set_int';
  35. procedure _gnome_config_set_float(path:Pchar; value:gdouble; priv:gint);cdecl;external libgnomedll name '_gnome_config_set_float';
  36. procedure _gnome_config_set_bool(path:Pchar; value:gboolean; priv:gint);cdecl;external libgnomedll name '_gnome_config_set_bool';
  37. procedure _gnome_config_set_vector(path:Pchar; argc:longint; argv:PPchar; priv:gint);cdecl;external libgnomedll name '_gnome_config_set_vector';
  38. procedure gnome_config_set_string(path,new_value : Pchar);
  39. procedure gnome_config_set_translated_string(path, new_value : PChar);
  40. procedure gnome_config_set_int(path : PChar; new_value : longint);
  41. procedure gnome_config_set_float(path : PChar; new_value : longint);
  42. procedure gnome_config_set_bool(path : PChar; new_value : gboolean);
  43. procedure gnome_config_set_vector(path:Pchar; argc:longint; argv:PPchar);
  44. procedure gnome_config_private_set_string(path,new_value : Pchar);
  45. procedure gnome_config_private_set_translated_string(path, new_value : PChar);
  46. procedure gnome_config_private_set_int(path : Pchar; new_value : longint);
  47. procedure gnome_config_private_set_float(path : PChar; new_value : longint);
  48. procedure gnome_config_private_set_bool(path : PChar; new_value : gboolean);
  49. procedure gnome_config_private_set_vector(path:Pchar; argc:longint; argv:PPchar);
  50. function _gnome_config_has_section(path:Pchar; priv:gint):gboolean;cdecl;external libgnomedll name '_gnome_config_has_section';
  51. function gnome_config_has_section(path : Pchar) : gboolean;
  52. function gnome_config_private_has_section(path : pchar) : gboolean;
  53. function _gnome_config_init_iterator(path:Pchar; priv:gint):pointer;cdecl;external libgnomedll name '_gnome_config_init_iterator';
  54. function _gnome_config_init_iterator_sections(path:Pchar; priv:gint):pointer;cdecl;external libgnomedll name '_gnome_config_init_iterator_sections';
  55. function gnome_config_iterator_next(iterator_handle:pointer; key:PPchar; value:PPchar):pointer;cdecl;external libgnomedll name 'gnome_config_iterator_next';
  56. function gnome_config_init_iterator(path : pchar) : pointer;
  57. function gnome_config_init_iterator_sections(path : Pchar) : pointer;
  58. function gnome_config_private_init_iterator(path : Pchar) : pointer;
  59. function gnome_config_private_init_iterator_sections(path : Pchar) : pointer;
  60. procedure gnome_config_drop_all;cdecl;external libgnomedll name 'gnome_config_drop_all';
  61. procedure gnome_config_sync;cdecl;external libgnomedll name 'gnome_config_sync';
  62. procedure _gnome_config_sync_file(path:Pchar; priv:longint);cdecl;external libgnomedll name '_gnome_config_sync_file';
  63. procedure gnome_config_sync_file(path : Pchar);
  64. procedure gnome_config_private_sync_file(path : Pchar);
  65. procedure _gnome_config_drop_file(path:Pchar; priv:gint);cdecl;external libgnomedll name '_gnome_config_drop_file';
  66. procedure gnome_config_drop_file(path : Pchar);
  67. procedure gnome_config_private_drop_file(path : Pchar);
  68. procedure _gnome_config_clean_file(path:Pchar; priv:gint);cdecl;external libgnomedll name '_gnome_config_clean_file';
  69. Procedure gnome_config_clean_file(path:Pchar);
  70. Procedure gnome_config_private_clean_file(path:Pchar);
  71. procedure _gnome_config_clean_section(path:Pchar; priv:gint);cdecl;external libgnomedll name '_gnome_config_clean_section';
  72. procedure gnome_config_clean_section(path:Pchar);
  73. procedure gnome_config_private_clean_section(path:Pchar);
  74. procedure _gnome_config_clean_key(path:Pchar; priv:gint);cdecl;external libgnomedll name '_gnome_config_clean_key';
  75. procedure gnome_config_clean_key(path:Pchar);
  76. procedure gnome_config_private_clean_key(path:Pchar);
  77. function gnome_config_get_real_path(path:Pchar):Pchar;
  78. function gnome_config_private_get_real_path(path:Pchar):Pchar;
  79. procedure gnome_config_push_prefix(path:Pchar);cdecl;external libgnomedll name 'gnome_config_push_prefix';
  80. procedure gnome_config_pop_prefix;cdecl;external libgnomedll name 'gnome_config_pop_prefix';
  81. procedure gnome_config_make_vector(_string:Pchar; argcp:Plongint; argvp:PPPchar);cdecl;external libgnomedll name 'gnome_config_make_vector';
  82. function gnome_config_assemble_vector(argc:longint; argv:PPchar):pchar;cdecl;external libgnomedll name 'gnome_config_assemble_vector';
  83. Type
  84. TGnomeConfigHandler = procedure (param : pointer); cdecl;
  85. procedure gnome_config_set_set_handler(func : TGnomeConfigHandler; data:pointer);cdecl;external libgnomedll name 'gnome_config_set_set_handler';
  86. procedure gnome_config_set_sync_handler(func:TGnomeConfigHandler; data:pointer);cdecl;external libgnomedll name 'gnome_config_set_sync_handler';
  87. {$EndIf read_interface}
  88. {$Ifdef read_implementation}
  89. function gnome_config_get_string_with_default(path:Pchar; def:Pgboolean):pchar;
  90. begin
  91. gnome_config_get_string_with_default:=_gnome_config_get_string_with_default(path,def,0);
  92. end;
  93. function gnome_config_get_translated_string_with_default(path:Pchar; def:Pgboolean):pchar;
  94. begin
  95. gnome_config_get_translated_string_with_default:=_gnome_config_get_translated_string_with_default(path,def,0);
  96. end;
  97. function gnome_config_get_int_with_default(path:Pchar; def:Pgboolean):gint;
  98. begin
  99. gnome_config_get_int_with_default:=_gnome_config_get_int_with_default(path,def,0);
  100. end;
  101. function gnome_config_get_float_with_default(path:Pchar; def:Pgboolean):gdouble;
  102. begin
  103. gnome_config_get_float_with_default:=_gnome_config_get_float_with_default(path,def,0);
  104. end;
  105. function gnome_config_get_bool_with_default(path:Pchar; def:Pgboolean):gboolean;
  106. begin
  107. gnome_config_get_bool_with_default:=_gnome_config_get_bool_with_default(path,def,0);
  108. end;
  109. procedure gnome_config_get_vector_with_default(path:Pchar; argcp:Pgint; argvp:PPPchar; def:Pgboolean);
  110. begin
  111. _gnome_config_get_vector_with_default(path,argcp,argvp,def,0);
  112. end;
  113. function gnome_config_private_get_string_with_default(path:Pchar; def:Pgboolean):pchar;
  114. begin
  115. gnome_config_private_get_string_with_default:=_gnome_config_get_string_with_default(path,def,1);
  116. end;
  117. function gnome_config_private_get_translated_string_with_default(path:Pchar; def:Pgboolean):pchar;
  118. begin
  119. gnome_config_private_get_translated_string_with_default:=_gnome_config_get_translated_string_with_default(path,def,1);
  120. end;
  121. function gnome_config_private_get_int_with_default(path:Pchar; def:Pgboolean):gint;
  122. begin
  123. gnome_config_private_get_int_with_default:=_gnome_config_get_int_with_default(path,def,1);
  124. end;
  125. function gnome_config_private_get_float_with_default(path:Pchar; def:Pgboolean):gdouble;
  126. begin
  127. gnome_config_private_get_float_with_default:=_gnome_config_get_float_with_default(path,def,1);
  128. end;
  129. function gnome_config_private_get_bool_with_default(path:Pchar; def:Pgboolean):gboolean;
  130. begin
  131. gnome_config_private_get_bool_with_default:=_gnome_config_get_bool_with_default(path,def,1);
  132. end;
  133. procedure gnome_config_private_get_vector_with_default(path:Pchar; argcp:Pgint; argvp:PPPchar; def:Pgboolean);
  134. begin
  135. _gnome_config_get_vector_with_default(path,argcp,argvp,def,1);
  136. end;
  137. function gnome_config_get_string(path:Pchar):pchar;
  138. begin
  139. gnome_config_get_string:=_gnome_config_get_string_with_default(path,nil,0);
  140. end;
  141. function gnome_config_get_translated_string(path:Pchar):pchar;
  142. begin
  143. gnome_config_get_translated_string:=_gnome_config_get_translated_string_with_default(path,nil,0);
  144. end;
  145. function gnome_config_get_int(path:Pchar):gint;
  146. begin
  147. gnome_config_get_int:=_gnome_config_get_int_with_default(path,nil,0);
  148. end;
  149. function gnome_config_get_float(path:Pchar):gdouble;
  150. begin
  151. gnome_config_get_float:=_gnome_config_get_float_with_default(path,nil,0);
  152. end;
  153. function gnome_config_get_bool(path:Pchar):gboolean;
  154. begin
  155. gnome_config_get_bool:=_gnome_config_get_bool_with_default(path,nil,0);
  156. end;
  157. procedure gnome_config_get_vector(path:Pchar; argcp:Pgint; argvp:PPPchar);
  158. begin
  159. _gnome_config_get_vector_with_default(path,argcp,argvp,nil,0);
  160. end;
  161. function gnome_config_private_get_string(path:Pchar):pchar;
  162. begin
  163. gnome_config_private_get_string:=_gnome_config_get_string_with_default(path,nil,1);
  164. end;
  165. function gnome_config_private_get_translated_string(path:Pchar):pchar;
  166. begin
  167. gnome_config_private_get_translated_string:=_gnome_config_get_translated_string_with_default(path,nil,1);
  168. end;
  169. function gnome_config_private_get_int(path:Pchar):gint;
  170. begin
  171. gnome_config_private_get_int:=_gnome_config_get_int_with_default(path,nil,1);
  172. end;
  173. function gnome_config_private_get_float(path:Pchar):gdouble;
  174. begin
  175. gnome_config_private_get_float:=_gnome_config_get_float_with_default(path,nil,1);
  176. end;
  177. function gnome_config_private_get_bool(path:Pchar):gboolean;
  178. begin
  179. gnome_config_private_get_bool:=_gnome_config_get_bool_with_default(path,nil,1);
  180. end;
  181. procedure gnome_config_private_get_vector(path:Pchar; argcp:Pgint; argvp:PPPchar);
  182. begin
  183. _gnome_config_get_vector_with_default(path,argcp,argvp,nil,1);
  184. end;
  185. procedure gnome_config_set_string(path,new_value : Pchar);
  186. begin
  187. _gnome_config_set_string(path,new_value,0);
  188. end;
  189. procedure gnome_config_set_translated_string(path, new_value : PChar);
  190. begin
  191. _gnome_config_set_translated_string(path,new_value,0);
  192. end;
  193. procedure gnome_config_set_int(path : PChar; new_value : longint);
  194. begin
  195. _gnome_config_set_int(path,new_value,0);
  196. end;
  197. procedure gnome_config_set_float(path : PChar; new_value : longint);
  198. begin
  199. _gnome_config_set_float(path,new_value,0);
  200. end;
  201. procedure gnome_config_set_bool(path : PChar; new_value : gboolean);
  202. begin
  203. _gnome_config_set_bool(path,new_value,0);
  204. end;
  205. procedure gnome_config_set_vector(path:Pchar; argc:longint; argv:PPchar);
  206. begin
  207. _gnome_config_set_vector(path,argc,argv,0);
  208. end;
  209. procedure gnome_config_private_set_string(path,new_value : Pchar);
  210. begin
  211. _gnome_config_set_string(path,new_value,1);
  212. end;
  213. procedure gnome_config_private_set_translated_string(path, new_value : PChar);
  214. begin
  215. _gnome_config_set_translated_string(path,new_value,1);
  216. end;
  217. procedure gnome_config_private_set_int(path : PChar; new_value : longint);
  218. begin
  219. _gnome_config_set_int(path,new_value,1);
  220. end;
  221. procedure gnome_config_private_set_float(path : PChar; new_value : longint);
  222. begin
  223. _gnome_config_set_float(path,new_value,1);
  224. end;
  225. procedure gnome_config_private_set_bool(path : PChar; new_value : gboolean);
  226. begin
  227. _gnome_config_set_bool(path,new_value,1);
  228. end;
  229. procedure gnome_config_private_set_vector(path:Pchar; argc:longint; argv:PPchar);
  230. begin
  231. _gnome_config_set_vector(path,argc,argv,1);
  232. end;
  233. function gnome_config_has_section(path : Pchar) : gboolean;
  234. begin
  235. gnome_config_has_section:=_gnome_config_has_section(path,0);
  236. end;
  237. function gnome_config_private_has_section(path : pchar) : gboolean;
  238. begin
  239. gnome_config_private_has_section:=_gnome_config_has_section(path,1);
  240. end;
  241. function gnome_config_init_iterator(path : pchar) : pointer;
  242. begin
  243. gnome_config_init_iterator:=_gnome_config_init_iterator(path,0);
  244. end;
  245. function gnome_config_init_iterator_sections(path : Pchar) : pointer;
  246. begin
  247. gnome_config_init_iterator_sections:=_gnome_config_init_iterator_sections(path,0);
  248. end;
  249. function gnome_config_private_init_iterator(path : Pchar) : pointer;
  250. begin
  251. gnome_config_private_init_iterator:=_gnome_config_init_iterator(path,1);
  252. end;
  253. function gnome_config_private_init_iterator_sections(path : Pchar) : pointer;
  254. begin
  255. gnome_config_private_init_iterator_sections:=_gnome_config_init_iterator_sections(path,1);
  256. end;
  257. procedure gnome_config_sync_file(path : Pchar);
  258. begin
  259. _gnome_config_sync_file(path,0);
  260. end;
  261. procedure gnome_config_private_sync_file(path : Pchar);
  262. begin
  263. _gnome_config_sync_file(path,1);
  264. end;
  265. procedure gnome_config_drop_file(path : Pchar);
  266. begin
  267. _gnome_config_drop_file(path,0);
  268. end;
  269. procedure gnome_config_private_drop_file(path : Pchar);
  270. begin
  271. _gnome_config_drop_file(path,1);
  272. end;
  273. Procedure gnome_config_clean_file(path:Pchar);
  274. begin
  275. _gnome_config_clean_file(path,0);
  276. end;
  277. Procedure gnome_config_private_clean_file(path:Pchar);
  278. begin
  279. _gnome_config_clean_file(path,1);
  280. end;
  281. procedure gnome_config_clean_section(path:Pchar);
  282. begin
  283. _gnome_config_clean_section(path,0);
  284. end;
  285. procedure gnome_config_private_clean_section(path:Pchar);
  286. begin
  287. _gnome_config_clean_section(path,1);
  288. end;
  289. procedure gnome_config_clean_key(path:Pchar);
  290. begin
  291. _gnome_config_clean_key(path,0);
  292. end;
  293. procedure gnome_config_private_clean_key(path:Pchar);
  294. begin
  295. _gnome_config_clean_key(path,1);
  296. end;
  297. function gnome_config_get_real_path(path : pchar) : pchar;
  298. begin
  299. gnome_config_get_real_path := g_concat_dir_and_file(gnome_user_dir, Path);
  300. end;
  301. function gnome_config_private_get_real_path(path : pchar) : pchar;
  302. begin
  303. gnome_config_private_get_real_path := g_concat_dir_and_file(gnome_user_private_dir, Path);
  304. end;
  305. {$Endif read_implementation}