2
0

gmessages.inc 4.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110
  1. // included by glib2.pas
  2. {$IFDEF read_forward_definitions}
  3. {$ENDIF read_forward_definitions}
  4. //------------------------------------------------------------------------------
  5. {$IFDEF read_interface_types}
  6. PGLogLevelFlags = ^TGLogLevelFlags;
  7. TGLogLevelFlags = longint;
  8. TGLogFunc = procedure (log_domain:Pgchar; log_level:TGLogLevelFlags; TheMessage:Pgchar; user_data:gpointer);cdecl;
  9. TGPrintFunc = procedure (_string: pgchar);
  10. {$ENDIF read_interface_types}
  11. //------------------------------------------------------------------------------
  12. {$IFDEF read_interface_rest}
  13. {$IFNDEF KYLIX}
  14. function g_printf_string_upper_bound(format:Pgchar; args:array of const):gsize;cdecl;external gliblib name 'g_printf_string_upper_bound';
  15. {$ELSE}
  16. function g_printf_string_upper_bound(format:Pgchar):gsize;varargs;cdecl;external gliblib name 'g_printf_string_upper_bound';
  17. {$ENDIF}
  18. { Log level shift offset for user defined log levels (0-7 are used by GLib). }
  19. const
  20. G_LOG_LEVEL_USER_SHIFT = 8;
  21. { Glib log levels and flags. }
  22. const
  23. G_LOG_FLAG_RECURSION = 1 shl 0;
  24. G_LOG_FLAG_FATAL = 1 shl 1;
  25. G_LOG_LEVEL_ERROR = 1 shl 2;
  26. G_LOG_LEVEL_CRITICAL = 1 shl 3;
  27. G_LOG_LEVEL_WARNING = 1 shl 4;
  28. G_LOG_LEVEL_MESSAGE = 1 shl 5;
  29. G_LOG_LEVEL_INFO = 1 shl 6;
  30. G_LOG_LEVEL_DEBUG = 1 shl 7;
  31. G_LOG_LEVEL_MASK = not 3;
  32. // G_LOG_LEVEL_MASK = not (G_LOG_FLAG_RECURSION or G_LOG_FLAG_FATAL);
  33. { GLib log levels that are considered fatal by default }
  34. const
  35. G_LOG_FATAL_MASK = 5;
  36. { Logging mechanism }
  37. function g_log_set_handler(log_domain:Pgchar; log_levels:TGLogLevelFlags; log_func:TGLogFunc; user_data:gpointer):guint;cdecl;external gliblib name 'g_log_set_handler';
  38. procedure g_log_remove_handler(log_domain:Pgchar; handler_id:guint);cdecl;external gliblib name 'g_log_remove_handler';
  39. procedure g_log_default_handler(log_domain:Pgchar; log_level:TGLogLevelFlags; TheMessage:Pgchar; unused_data:gpointer);cdecl;external gliblib name 'g_log_default_handler';
  40. {$IFNDEF KYLIX}
  41. procedure g_log(log_domain:Pgchar; log_level:TGLogLevelFlags; format:Pgchar; args:array of const);cdecl;overload;external gliblib name 'g_log';
  42. procedure g_log(log_domain:Pgchar; log_level:TGLogLevelFlags; format:Pgchar);cdecl;overload;varargs;external gliblib name 'g_log';
  43. procedure g_logv(log_domain:Pgchar; log_level:TGLogLevelFlags; format:Pgchar; args:array of const);cdecl;overload;external gliblib name 'g_logv';
  44. procedure g_logv(log_domain:Pgchar; log_level:TGLogLevelFlags; format:Pgchar);cdecl;overload;varargs;external gliblib name 'g_logv';
  45. {$ELSE}
  46. procedure g_log(log_domain:Pgchar; log_level:TGLogLevelFlags; format:Pgchar);varargs;cdecl;external gliblib name 'g_log';
  47. procedure g_logv(log_domain:Pgchar; log_level:TGLogLevelFlags; format:Pgchar);varargs;cdecl;external gliblib name 'g_logv';
  48. {$ENDIF}
  49. function g_log_set_fatal_mask(log_domain:Pgchar; fatal_mask:TGLogLevelFlags):TGLogLevelFlags;cdecl;external gliblib name 'g_log_set_fatal_mask';
  50. function g_log_set_always_fatal(fatal_mask:TGLogLevelFlags):TGLogLevelFlags;cdecl;external gliblib name 'g_log_set_always_fatal';
  51. { internal }
  52. procedure _g_log_fallback_handler(log_domain:Pgchar; log_level:TGLogLevelFlags; message:Pgchar; unused_data:gpointer);cdecl;external gliblib name '_g_log_fallback_handler';
  53. const
  54. G_LOG_DOMAIN = nil;
  55. procedure g_error (format:Pgchar; args: array of const); overload;
  56. procedure g_error (format:Pgchar); overload;
  57. procedure g_message (format:Pgchar; args: array of const); overload;
  58. procedure g_message (format:Pgchar); overload;
  59. procedure g_critical (format:Pgchar; args: array of const); overload;
  60. procedure g_critical (format:Pgchar); overload;
  61. procedure g_warning (format:Pgchar; args: array of const); overload;
  62. procedure g_warning (format:Pgchar); overload;
  63. {$IFNDEF KYLIX}
  64. procedure g_print(format:Pgchar; args:array of const);cdecl;overload;external gliblib name 'g_print';
  65. procedure g_print(format:Pgchar);cdecl;overload;varargs;external gliblib name 'g_print';
  66. {$ELSE}
  67. procedure g_print(format:Pgchar);varargs;cdecl;external gliblib name 'g_print';
  68. {$ENDIF}
  69. function g_set_print_handler(func:TGPrintFunc):TGPrintFunc;cdecl;external gliblib name 'g_set_print_handler';
  70. {$IFNDEF KYLIX}
  71. procedure g_printerr(format:Pgchar; args:array of const);cdecl;overload;external gliblib name 'g_printerr';
  72. procedure g_printerr(format:Pgchar);cdecl;overload;varargs;external gliblib name 'g_printerr';
  73. {$ELSE}
  74. procedure g_printerr(format:Pgchar);varargs;cdecl;external gliblib name 'g_printerr';
  75. {$ENDIF}
  76. function g_set_printerr_handler(func:TGPrintFunc):TGPrintFunc;cdecl;external gliblib name 'g_set_printerr_handler';
  77. {$ENDIF read_interface_rest}
  78. // included by glib2.pas