## Documentation

Table of Contents
Class Inheritance Tree
Widget Screenshots
Package groups

1.     -----------------------------------------------------------------------

2.     --               GtkAda - Ada95 binding for Gtk+/Gnome               --

3.     --                                                                   --

4.     --                   Copyright (C) 2003 ACT-Europe                   --

5.     --                                                                   --

6.     -- This library is free software; you can redistribute it and/or     --

7.     -- modify it under the terms of the GNU General Public               --

8.     -- License as published by the Free Software Foundation; either      --

9.     -- version 2 of the License, or (at your option) any later version.  --

10.     --                                                                   --

11.     -- This library is distributed in the hope that it will be useful,   --

12.     -- but WITHOUT ANY WARRANTY; without even the implied warranty of    --

13.     -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU --

14.     -- General Public License for more details.                          --

15.     --                                                                   --

16.     -- You should have received a copy of the GNU General Public         --

17.     -- License along with this library; if not, write to the             --

18.     -- Free Software Foundation, Inc., 59 Temple Place - Suite 330,      --

19.     -- Boston, MA 02111-1307, USA.                                       --

20.     --                                                                   --

21.     -- As a special exception, if other files instantiate generics from  --

22.     -- this unit, or you link this unit with other files to produce an   --

23.     -- executable, this  unit  does not  by itself cause  the resulting  --

24.     -- executable to be covered by the GNU General Public License. This  --

25.     -- exception does not however invalidate any other reasons why the   --

26.     -- executable file  might be covered by the  GNU Public License.     --

27.     -----------------------------------------------------------------------

29.     --  <description>

30.     --  This package provides low level routines for enabling, disabling

31.     --  and modifying the way log messages are handled in glib/gdk/gtk.

32.     --  </description>

33.     --  <group>Glib, the general-purpose library</group>

35.     package Glib.MessagesTo API docTo specTo body is

36.        pragma Preelaborate;

38.        type Log_Level_Flags is mod 2 ** 32;

39.        --  log levels and flags.

41.        ---------------

42.        -- log flags --

43.        ---------------

45.        Log_Flag_Recursion : constant Log_Level_FlagsTo API docTo spec := 2 ** 0;

46.        Log_Flag_Fatal     : constant Log_Level_FlagsTo API docTo spec := 2 ** 1;

48.        ----------------

49.        -- log levels --

50.        ----------------

52.        Log_Level_Error    : constant Log_Level_FlagsTo API docTo spec := 2 ** 2;

53.        --  always fatal

55.        Log_Level_Critical : constant Log_Level_FlagsTo API docTo spec := 2 ** 3;

56.        Log_Level_Warning  : constant Log_Level_FlagsTo API docTo spec := 2 ** 4;

57.        Log_Level_Message  : constant Log_Level_FlagsTo API docTo spec := 2 ** 5;

58.        Log_Level_Info     : constant Log_Level_FlagsTo API docTo spec := 2 ** 6;

59.        Log_Level_Debug    : constant Log_Level_FlagsTo API docTo spec := 2 ** 7;

61.        Log_Level_Mask     : constant Log_Level_FlagsTo API docTo spec :=

62.          not (Log_Flag_RecursionTo API docTo spec or Log_Flag_FatalTo API docTo spec);

64.        Log_Fatal_Mask     : constant Log_Level_FlagsTo API docTo spec :=

65.          Log_Flag_RecursionTo API docTo spec or Log_Level_ErrorTo API docTo spec;

66.        --  log levels that are considered fatal by default

68.        type Log_Function is access procedure

69.          (Log_Domain : String;

70.           Log_Level  : Log_Level_FlagsTo API docTo spec;

71.           Message    : UTF8_StringTo API docTo spec);

73.        type Log_Handler_Id is new GuintTo API docTo spec;

75.        --  Logging mechanism

77.        function Log_Set_HandlerTo API docTo body

78.          (Log_Domain : String;

79.           Log_Levels : Log_Level_FlagsTo API docTo spec;

80.           Log_Func   : Log_FunctionTo API docTo spec) return Log_Handler_IdTo API docTo spec;

81.        --  Set a log function for the given log levels, and return its id.

83.        procedure Log_Remove_HandlerTo API docTo body

84.          (Log_Domain : String;

85.           Handler_Id : Log_Handler_IdTo API docTo spec);

86.        --  Unset a given handler.

88.        procedure Log_Default_HandlerTo API docTo body

89.          (Log_Domain : String;

90.           Log_Levels : Log_Level_FlagsTo API docTo spec;

91.           Message    : UTF8_StringTo API docTo spec);

92.        --  The default log handler.

93.        --  Can be called e.g. within a user defined log handler.

95.        procedure LogTo API docTo body

96.          (Log_Domain : String;

97.           Log_Levels : Log_Level_FlagsTo API docTo spec;

98.           Message    : UTF8_StringTo API docTo spec);

99.        --  Log a message through the glib logging facility.

101.        function Log_Set_Fatal_MaskTo API docTo body

102.          (Log_Domain : String;

103.           Fatal_Mask : Log_Level_FlagsTo API docTo spec) return Log_Level_FlagsTo API docTo spec;

104.        --  Set the level at which messages are considered fatal for a given domain.

106.        function Log_Set_Always_FatalTo API docTo body

107.          (Fatal_Mask : Log_Level_FlagsTo API docTo spec) return Log_Level_FlagsTo API docTo spec;

108.        --  Set the level at which messages are considered fatal for any domain.

110.     private

112.        pragma Import (C, Log_Set_Always_FatalTo API docTo spec, "g_log_set_always_fatal");

114.     end Glib.MessagesTo API docTo specTo body;