This is gtkada_rm.info, produced by makeinfo version 4.5 from
gtkada_rm.texi.

INFO-DIR-SECTION User Interface Toolkit
START-INFO-DIR-ENTRY
* GtkAda_Rm: (gtkada_rm).           Ada95 graphical tookit based on GTK+ (Reference Manual)
END-INFO-DIR-ENTRY


File: gtkada_rm.info,  Node: Top,  Up: (dir)

GtkAda Reference Manual
***********************

* Menu:

* Package_Canvas_Link::
* Package_GObject::
* Package_Gdk::
* Package_Gdk.Bitmap::
* Package_Gdk.Color::
* Package_Gdk.Cursor::
* Package_Gdk.Drawable::
* Package_Gdk.Event::
* Package_Gdk.Font::
* Package_Gdk.GC::
* Package_Gdk.Main::
* Package_Gdk.Pixbuf::
* Package_Gdk.Pixmap::
* Package_Gdk.Rgb::
* Package_Gdk.Threads::
* Package_Glade::
* Package_Glade.XML::
* Package_Glade_XML::
* Package_Glib::
* Package_Glib.Convert::
* Package_Glib.Error::
* Package_Glib.GSlist::
* Package_Glib.Generic_Properties::
* Package_Glib.Glist::
* Package_Glib.Messages::
* Package_Glib.Module::
* Package_Glib.Object::
* Package_Glib.Properties::
* Package_Glib.Properties.Creation::
* Package_Glib.Type_Conversion_Hooks::
* Package_Glib.Unicode::
* Package_Glib.Values::
* Package_Glib.XML::
* Package_Gtk::
* Package_Gtk.Accel_Label::
* Package_Gtk.Adjustment::
* Package_Gtk.Alignment::
* Package_Gtk.Arguments::
* Package_Gtk.Arrow::
* Package_Gtk.Aspect_Frame::
* Package_Gtk.Bin::
* Package_Gtk.Box::
* Package_Gtk.Button::
* Package_Gtk.Button_Box::
* Package_Gtk.Calendar::
* Package_Gtk.Check_Button::
* Package_Gtk.Check_Menu_Item::
* Package_Gtk.Clist::
* Package_Gtk.Color_Selection::
* Package_Gtk.Color_Selection_Dialog::
* Package_Gtk.Combo::
* Package_Gtk.Container::
* Package_Gtk.Ctree::
* Package_Gtk.Curve::
* Package_Gtk.Dialog::
* Package_Gtk.Dnd::
* Package_Gtk.Drawing_Area::
* Package_Gtk.Editable::
* Package_Gtk.Event_Box::
* Package_Gtk.Extra::
* Package_Gtk.Extra.Border_Combo::
* Package_Gtk.Extra.Color_Combo::
* Package_Gtk.Extra.Combo_Box::
* Package_Gtk.Extra.Font_Combo::
* Package_Gtk.Extra.Item_Entry::
* Package_Gtk.Extra.Plot::
* Package_Gtk.Extra.Plot_3D::
* Package_Gtk.Extra.Plot_Bar::
* Package_Gtk.Extra.Plot_Box::
* Package_Gtk.Extra.Plot_Canvas::
* Package_Gtk.Extra.Plot_Data::
* Package_Gtk.Extra.Plot_Polar::
* Package_Gtk.Extra.Plot_Ps::
* Package_Gtk.Extra.Plot_Surface::
* Package_Gtk.Extra.Sheet::
* Package_Gtk.File_Selection::
* Package_Gtk.Fixed::
* Package_Gtk.Font_Selection::
* Package_Gtk.Font_Selection_Dialog::
* Package_Gtk.Frame::
* Package_Gtk.GEntry::
* Package_Gtk.GLArea::
* Package_Gtk.GRange::
* Package_Gtk.Gamma_Curve::
* Package_Gtk.Grange::
* Package_Gtk.Handle_Box::
* Package_Gtk.Handlers::
* Package_Gtk.Hbutton_Box::
* Package_Gtk.Image::
* Package_Gtk.Image_Menu_Item::
* Package_Gtk.Item::
* Package_Gtk.Label::
* Package_Gtk.Layout::
* Package_Gtk.Main::
* Package_Gtk.Marshallers::
* Package_Gtk.Menu::
* Package_Gtk.Menu_Bar::
* Package_Gtk.Menu_Item::
* Package_Gtk.Menu_Shell::
* Package_Gtk.Misc::
* Package_Gtk.Notebook::
* Package_Gtk.Object::
* Package_Gtk.Old_Editable::
* Package_Gtk.Option_Menu::
* Package_Gtk.Paned::
* Package_Gtk.Plug::
* Package_Gtk.Progress::
* Package_Gtk.Progress_Bar::
* Package_Gtk.Radio_Button::
* Package_Gtk.Scrolled_Window::
* Package_Gtk.Selection::
* Package_Gtk.Separator_Menu_Item::
* Package_Gtk.Size_Group::
* Package_Gtk.Socket::
* Package_Gtk.Spin_Button::
* Package_Gtk.Status_Bar::
* Package_Gtk.Stock::
* Package_Gtk.Table::
* Package_Gtk.Text::
* Package_Gtk.Text_Attributes::
* Package_Gtk.Text_Buffer::
* Package_Gtk.Text_Iter::
* Package_Gtk.Text_Mark::
* Package_Gtk.Text_Tag::
* Package_Gtk.Text_Tag_Table::
* Package_Gtk.Text_View::
* Package_Gtk.Toggle_Button::
* Package_Gtk.Toolbar::
* Package_Gtk.Tooltips::
* Package_Gtk.Tree_Model::
* Package_Gtk.Tree_Store::
* Package_Gtk.Tree_View::
* Package_Gtk.Tree_View_Column::
* Package_Gtk.Type_Conversion::
* Package_Gtk.Vbutton_Box::
* Package_Gtk.Widget::
* Package_Gtk.Window::
* Package_Gtkada::
* Package_Gtkada.Canvas::
* Package_Gtkada.Dialogs::
* Package_Gtkada.File_Selection::
* Package_Gtkada.Handlers::
* Package_Gtkada.Intl::
* Package_Gtkada.Pixmaps::
* Package_Gtkada.Types::
* Package_Pango::
* Package_Pango.Attributes::
* Package_Pango.Font::
* Package_Pango.Layout::
* Package_Pango_Layout::
* Index::


File: gtkada_rm.info,  Node: Package_Glib,  Next: Package_Glib.Convert,  Prev: Package_Glade_XML,  Up: Top

Package Glib
************

This package provides definitions for the basic types used in Glib,
Gdk and Gtk.

* Menu:

* Glib Types::
* Glib Subprograms::


File: gtkada_rm.info,  Node: Glib Types,  Next: Glib Subprograms,  Up: Package_Glib

Types
=====

subtype Allocation_Int is Gint;


Provided for better compatibility between GtkAda 1.2 and 2.0
type Boolean_Array is array (Natural range <>) of Boolean;


type Boxed_Copy is access function
         (Boxed : System.Address) return System.Address;

type Boxed_Free is access procedure
         (Boxed : System.Address);

type C_Proxy is access C_Dummy;


General proxy for C structures.   This type is used instead of
System.Address so that the variables are  automatically initialized to
'null'.   The value pointed to is irrelevant, and in fact should not be
accessed.   It has thus been made limited private with no subprogram to
access it.   C_Proxy is a public type so that one can compare directly
the value  of the variables with 'null'.
type GQuark is new Guint32;


Represents a string internally in GtkAda. Once you know the  equivalent
for a string, you can always use it instead of the string,  which
provides a faster access for all the functions that use htables  in
GtkAda.   There is a global htable that contains all the quarks defined
in  your application and GtkAda itself.
type GTime_Val is record
         TV_Sec  : Glong;
         TV_Usec : Glong;
         end record;

type GTime_Val_Access is access all GTime_Val;


type GType is new Gsize;


This type describes an internal type in Glib.   You shouldn't have to
use it in your own applications, however it might  be useful sometimes.
Every object type is associated with a specific value, created
dynamically at run time the first time you instantiate an object of that
type (thus if you have never used e.g a Gtk_File_Selection, it won't
have any GType associated with it).   You can get the exact type value
for each type by using the functions  Get_Type provided in all the
packages in GtkAda.   You can get the specific value for an existing
widget by using the  function Gtk.Object.Get_Type.
type GType_Array is array (Guint range <>) of Glib.GType;


type G_Destroy_Notify is access procedure
         (Data : Glib.C_Proxy);

type Gboolean is new Gint;


type Gboolean_Array is array (Natural range <>) of Gboolean;


type Gchar is new C.char;


subtype Gcolor_Int is Guint16;


Provided for better compatibility between GtkAda 1.2 and 2.0
type Gdouble is new C.double;


type Gdouble_Array is array (Natural range <>) of Gdouble;


type Gfloat is new C.C_float;


type Gfloat_Array is array (Natural range <>) of Gfloat;


type Gint is new C.int;


type Gint16 is range -(2 ** 15) .. (2 ** 15 - 1);


type Gint32 is range -(2 ** 31) .. (2 ** 31 - 1);


type Gint64 is range -(2 ** 63) .. (2 ** 63 - 1);


type Gint8 is range -(2 ** 7) .. (2 ** 7 - 1);


type Gint_Array is array (Natural range <>) of Gint;


type Glong is new C.long;


type Glong_Array is array (Natural range <>) of Glong;


subtype Grange_Float is Gdouble;


Needed for better compatibility between GtkAda 1.2 and 2.0
type Gshort is new C.short;


type Gshort_Array is array (Natural range <>) of Gshort;


type Gsize is new C.size_t;


type Guchar is new C.unsigned_char;


type Guchar_Array is array (Natural range <>) of Guchar;


type Guchar_Array_Access is access Guchar_Array;


type Guint is new C.unsigned;


type Guint16 is mod 2 ** 16;


type Guint32 is mod 2 ** 32;


type Guint32_Array is array (Natural range <>) of Guint32;


type Guint64 is mod 2 ** 64;


type Guint8 is mod 2 ** 8;


type Guint_Array is array (Natural range <>) of Guint;


type Gulong is new C.unsigned_long;


type Gulong_Array is array (Natural range <>) of Gulong;


type Gunichar is new Guint32;


type Gushort is new C.unsigned_short;


type Gushort_Array is array (Natural range <>) of Gushort;


type Long_Array is array (Natural range <>) of C.long;


type Param_Flags is mod 2 ** 6;


type Param_Spec is new Glib.C_Proxy;


See Glib.Properties.Creation for more information on this type
type Property is private;


type Short_Array is array (Natural range <>) of C.short;


type Signal_Id is private;


This uniquely identifies a connection widget<->signal.
type String_Ptr is access all String;


subtype UTF8_String is String;


A string that accepts only valid UTF8 sequences.   Most Gtk+ function
expect valid UTF8 strings instead of regular strings.

File: gtkada_rm.info,  Node: Glib Subprograms,  Prev: Glib Types,  Up: Package_Glib

Subprograms
===========

Conversion services
-------------------

function To_Boolean_Array
       (A                  : in     Gboolean_Array)
        return Boolean_Array;

Convert a C-style boolean array into an Ada-style array.
function To_Gint
       (Bool               : in     Boolean)
        return Gint;

Convert an Ada boolean into a C int.
Quarks
------

function Quark_From_String
       (Id                 : in     String)
        return GQuark;

Return, or create the quark associated with the string.
Note that if the quark does not already exist, an entry is created for
it in the global htable for quarks.
function Quark_Try_String
       (Id                 : in     String)
        return GQuark;

Return the quark associated with the string, if it exists.
If it does not exist, return Unknown_Quark.
Properties
----------

This is only the definition of the property types. See Glib.Properties
on how to get and set the value of properties for specific objects, or
the package Glib.Properties.Creation for information on how to create
new properties in your own widgets.

function Build
       (Name               :        String)
        return Property;

You should use this function only if you are creating new widgets, and
their properties. Normal usage of properties doesn't require the use
of this function.   An ASCII.NUL character is automatically appended if
necessary
function Property_Name
       (Prop               :        Property)
        return String;

Return the name of the property.
This name includes the trailing ASCII.Nul, and thus can be passed as is
to C.
GType
-----

function Parent
       (Typ                :        GType)
        return GType;

Return the parent type of Typ (eg if Typ is associated with a Gtk
widget, it returns the typ of its parent).
function Fundamental
       (Typ                :        GType)
        return GType;

Return the fundamental type for Type.  In gtk+, the types are organized
into several hierarchies, similar to what is done for widgets.   All of
these hierarchies are based on one of the fundamental types  defined
below.   This function returns that fundamental type.

   For instance, each enumeration type in gtk+ has its own GType.
However, Fundamental will return GType_Enum in all of these cases.
function Type_Name
       (Type_Num           : in     GType)
        return String;

Return the name of the type (enumeration,...) associated with Typ.
If Fundamental (Typ) return GType_Enum, this returns the name of  the
enumeration type that Typ represents.   This might be useful in debug
messages.
function Type_From_Name
       (Name               : in     String)
        return GType;

Convert a string to the matching type.
Name should be the C GObject name rather than the Ada name: thus,  use
names such as GtkScrollbar or GtkButton for widgets.
Boxed types
-----------

Boxed types are a convenient way to encapsulate Ada types through a C
layer. An initialization and a finalization function can be provided.
The most frequent usage of such types is in argument to signals and
handlers (See the functions in Glib.Values), or to store such types  in
a Gtk_Tree_Model.

function Boxed_Type_Register_Static
       (Name               :        String;
        Copy               :        Boxed_Copy;
        Free               :        Boxed_Free)
        return GType;

Create a new boxed type

File: gtkada_rm.info,  Node: Package_Glib.Convert,  Next: Package_Glib.Error,  Prev: Package_Glib,  Up: Top

Package Glib.Convert
********************

This package provides definitions for string conversions and i18n.
See also Glib.Unicode.

* Menu:

* Glib.Convert Subprograms::


File: gtkada_rm.info,  Node: Glib.Convert Subprograms,  Up: Package_Glib.Convert

Subprograms
===========

function Convert_Error_Domain  return GQuark;


Return the error domain associated with Glib.Convert.
procedure Convert
       (Str                :        String;
        To_Codeset         :        String;
        From_Codeset       :        String;
        Bytes_Read         : out    Natural;
        Bytes_Written      : out    Natural;
        Error              :        GError_Access := null;
        Result             : out    String);

Convert a string from one character set to another.
Str:           String to convert  Result:        String converted, if
no error.   To_Codeset:    Name of character set into which to convert
Str  From_Codeset:  Character set of Str.   Bytes_Read:    Number of
bytes in the input string that were                 successfully
converted.                  Even if the conversion was successful, this
may be                 less than Len if there were partial characters
             at the end of the input. If the error
Illegal_Sequence occurs, the value                 stored will the byte
offset after the last valid                 input sequence.
Bytes_Written: Number of bytes stored in the output buffer.   Error:
    Location to store the error occuring, ignored if null.
    Any of the errors in Convert_Error_Domain may occur.
function Convert
       (Str                :        String;
        To_Codeset         :        String;
        From_Codeset       :        String;
        Error              :        GError_Access := null)
        return String;

Same as above, but return a String directly.
procedure Convert
       (Str                :        chars_ptr;
        Len                :        Natural;
        To_Codeset         :        String;
        From_Codeset       :        String;
        Bytes_Read         : out    Natural;
        Bytes_Written      : out    Natural;
        Error              :        GError_Access := null;
        Result             : out    String);

Same as Convert procedure, but take a C string as input.
function Convert
       (Str                :        String;
        To_Codeset         :        String;
        From_Codeset       :        String;
        Bytes_Read         : access Natural;
        Bytes_Written      : access Natural;
        Error              :        GError_Access := null)
        return chars_ptr;

Same as Convert procedure, but return the result as a C string.
function Convert
       (Str                :        chars_ptr;
        Len                :        Natural;
        To_Codeset         :        String;
        From_Codeset       :        String;
        Bytes_Read         : access Natural;
        Bytes_Written      : access Natural;
        Error              :        GError_Access := null)
        return chars_ptr;

Same as Convert procedure, but take and return the result as a C string.
procedure Locale_To_UTF8
       (OS_String          :        String;
        Bytes_Read         : out    Natural;
        Bytes_Written      : out    Natural;
        Error              :        GError_Access := null;
        Result             : out    String);

Convert a string which is in the encoding used for strings by
the C runtime (usually the same as that used by the operating  system)
in the current locale into a UTF-8 string.

   OS_String:     A string in the encoding of the current locale
Bytes_Read:    Number of bytes in the input string that were
    successfully converted.                  Even if the conversion
was successful, this may be                 less than Len if there were
partial characters                 at the end of the input. If the error
               Illegal_Sequence occurs, the value
stored will the byte offset after the last valid                 input
sequence.   Bytes_Written: Number of bytes stored in Result.   Error:
     Location to store the error occuring, ignored if null.
     Any of the errors in Convert_Error_Domain may occur.
function Locale_To_UTF8
       (OS_String          :        String;
        Bytes_Read         : access Natural;
        Bytes_Written      : access Natural;
        Error              :        GError_Access := null)
        return chars_ptr;

Same as procedure Locale_To_UTF8, but return the raw C string for
efficiency. The caller is responsible for freeing the resulting string.
function Locale_To_UTF8
       (OS_String          :        String)
        return String;

Same as procedure Locale_To_UTF8, but return only the String.
procedure Locale_From_UTF8
       (UTF8_String        :        String;
        Bytes_Read         : out    Natural;
        Bytes_Written      : out    Natural;
        Error              :        GError_Access := null;
        Result             : out    String);

Convert a string from UTF-8 to the encoding used for strings by
the C runtime (usually the same as that used by the operating  system)
in the current locale.

   UTF8_String:   A UTF-8 encoded string  Bytes_Read:    Number of
bytes in the input string that were                 successfully
converted.                  Even if the conversion was successful, this
may be                 less than Len if there were partial characters
             at the end of the input. If the error
Illegal_Sequence occurs, the value                 stored will the byte
offset after the last valid                 input sequence.
Bytes_Written: Number of bytes stored in the output buffer.   Error:
    Location to store the error occuring, ignored if null.
    Any of the errors in Convert_Error_Domain may occur.
function Locale_From_UTF8
       (UTF8_String        :        String;
        Bytes_Read         : access Natural;
        Bytes_Written      : access Natural;
        Error              :        GError_Access := null)
        return chars_ptr;

Same as procedure Locale_From_UTF8, but return the raw C string for
efficiency. The caller is responsible for freeing the resulting string.
Use the C "free" function to free this.
function Locale_From_UTF8
       (UTF8_String        :        String)
        return String;

Same as procedure Locale_From_UTF8, but return only the String.
function Filename_To_UTF8
       (OS_String          :        String;
        Error              :        GError_Access := null)
        return String;

Convert a string which is in the encoding used for filenames
into a UTF-8 string.
function Filename_From_UTF8
       (UTF8_String        :        String;
        Error              :        GError_Access := null)
        return String;

Convert a string from UTF-8 to the encoding used for filenames.
function Filename_From_URI
       (URI                :        String;
        Hostname           : access chars_ptr;
        Error              :        GError_Access := null)
        return String;

Convert an escaped UTF-8 encoded URI to a local filename in the
encoding used for filenames.

   URI:      A uri describing a filename (escaped, encoded in UTF-8).
Hostname: Location to store hostname for the URI.             If there
is no hostname in the URI, null will be            stored in this
location.   Error:    Location to store the error occuring, ignored if
null.             Any of the errors in Convert_Error_Domain may occur.
function Filename_To_URI
       (Filename           :        String;
        Hostname           :        String := "";
        Error              :        GError_Access := null)
        return String;

Convert an absolute filename to an escaped UTF-8 encoded URI.
Filename: An absolute filename specified in the encoding
used for filenames by the operating system.   Hostname: A UTF-8 encoded
hostname, or "" for none.   Error:    Location to store the error
occuring, ignored if null.             Any of the errors in
Convert_Error may occur.

File: gtkada_rm.info,  Node: Package_Glib.Error,  Next: Package_Glib.GSlist,  Prev: Package_Glib.Convert,  Up: Top

Package Glib.Error
******************

This package provides definitions for the error handling mechanism used
in  Glib, Gdk and Gtk.

* Menu:

* Glib.Error Types::
* Glib.Error Subprograms::


File: gtkada_rm.info,  Node: Glib.Error Types,  Next: Glib.Error Subprograms,  Up: Package_Glib.Error

Types
=====

type GError is new C_Proxy;


type GError_Access is access all GError;



File: gtkada_rm.info,  Node: Glib.Error Subprograms,  Prev: Glib.Error Types,  Up: Package_Glib.Error

Subprograms
===========

function Error_New
       (Domain             :        GQuark;
        Code               :        Gint;
        Message            :        String)
        return GError;

Create a new GError object.
procedure Error_Free
       (Error              :        GError);

Free the memory associated with a GError.
function Error_Copy
       (Error              :        GError)
        return GError;

Duplicate a GError object.
function Error_Matches
       (Error              :        GError;
        Domain             :        GQuark;
        Code               :        Gint)
        return Boolean;

Return whether a given GError matches a domain/code.
function Get_Domain
       (Error              :        GError)
        return GQuark;

Return the domain associated with a GError.
function Get_Code
       (Error              :        GError)
        return Gint;

Return the code associated with a GError.
function Get_Message
       (Error              :        GError)
        return String;

Return the message associated with a GError.

File: gtkada_rm.info,  Node: Package_Glib.GSlist,  Next: Package_Glib.Generic_Properties,  Prev: Package_Glib.Error,  Up: Top

Package Glib.GSlist
*******************

This packages provides the implementation of a generic single-linked
list.   One instantiation is found in Gtk.Widget.Widget_Slist for a
list of  widgets.

   See the documentation of Glib.Glist for more information, it provides
the same API as this package.   Single linked lists are traversed the
same way as double-linked lists,  even though most subprograms are less
efficient than their  double-linked counterparts.

* Menu:


File: gtkada_rm.info,  Node: Package_Glib.Generic_Properties,  Next: Package_Glib.Glist,  Prev: Package_Glib.GSlist,  Up: Top

Package Glib.Generic`_'Properties
*********************************

Note: this package need only be used and understood by people who  want
to create their own new widgets and their associated properties.
Normal usage of properties doesn't require any deep understanding of
this package.

   This package provides two generic subpackages that make it easy to
declare properties.   Each of these packages define two types:

   * Property_RO : this type should be used for a read-only property
                  of the given type.

   * Property    : This is for read-write properties

    Each of these two types is associated with one or two primitive
operations Get_Property and Set_Property, that allows the modification
of properties of this type.

   As a user and creator of new widgets, you should always use the
Generic_Enumeration_Property package, since it also registers the
enumeration type with gtk+ for a full compatibility with C.

* Menu:

* Glib.Generic_Properties Types::
* Glib.Generic_Properties Subprograms::


File: gtkada_rm.info,  Node: Glib.Generic_Properties Types,  Next: Glib.Generic_Properties Subprograms,  Up: Package_Glib.Generic_Properties

Types
=====

type Discrete_Type is
         (<>);

type Enumeration is
         (<>);

type Property is new Properties.Property;


type Property_RO is new Properties.Property_RO;



File: gtkada_rm.info,  Node: Glib.Generic_Properties Subprograms,  Prev: Glib.Generic_Properties Types,  Up: Package_Glib.Generic_Properties

Subprograms
===========

Generic package for discrete type properties
--------------------------------------------

This package should be used to implement the
Get_Property and Set_Property subprograms for all  properties related
to enumeration types and simple  types.   This should be used only for
types defined in GtkAda  or gtk+ themselves, not for types that you
define  yourself. Use Generic_Discrete_Type instead.

procedure Set_Property
       (Object             : access Glib.Object.GObject_Record'Class;
        Name               :        Property;
        Value              :        Discrete_Type);

Set a property of Object based on Enumeration_Type.
function Get_Property
       (Object             : access Glib.Object.GObject_Record'Class;
        Name               :        Property)
        return Discrete_Type;

function Get_Property
       (Object             : access Glib.Object.GObject_Record'Class;
        Name               :        Property_RO)
        return Discrete_Type;

Get a property from Object
Types
-----

function Get_Type              return Glib.GType;


Return the internal gtk+ type associated with the Ada enumeration
Enumeration. You don't need to use such a function for the types
defined in standard in GtkAda. Use Glib.Type_From_Name  instead.
function Gnew_Enum
       (Name, Nick, Blurb  :        String;
        Default            :        Enumeration
                            := Enumeration'First;
        Flags              :        Param_Flags
                            := Param_Readable or Param_Writable)
        return Param_Spec;

Create a new param_spec (to describe properties), based on the
Ada enumeration type Enumeration. This function is used when  creating
the property with Install_Property on an object.   Name, Nick and Blurb
should describe the property, not its type.
Values
------

function Get_Enum
       (Value              :        Glib.Values.GValue)
        return Enumeration;

Return the enumeration contained in Value, assuming it is of type
Enumeration
procedure Set_Enum
       (Value              : in out Glib.Values.GValue;
        Enum               :        Enumeration);

Set the enumeration value for Value. This properly initializes the
type of Value, so you don't need to call Init yourself.
Generic package for record types properties
-------------------------------------------

This package should be used to implement the
Get_Property and Set_Property subprograms for all  properties related
to record type, like Gdk_Color and  Gdk_Rectangle.   This should be
used only for types defined in GtkAda  or gtk+ themselves, not for
types that you define  yourself.

procedure Set_Property
       (Object             : access Glib.Object.GObject_Record'Class;
        Name               :        Property;
        Value              :        Boxed_Type);

Set a property of Object based on Enumeration_Type.
function Get_Property
       (Object             : access Glib.Object.GObject_Record'Class;
        Name               :        Property)
        return Boxed_Type;

function Get_Property
       (Object             : access Glib.Object.GObject_Record'Class;
        Name               :        Property_RO)
        return Boxed_Type;

Get a property from Object

File: gtkada_rm.info,  Node: Package_Glib.Glist,  Next: Package_Glib.Messages,  Prev: Package_Glib.Generic_Properties,  Up: Top

Package Glib.Glist
******************

This package implements a generic double-linked list.   Such lists are
used throughout GtkAda to contain lists of widgets  (for the children
of containers, or for the list of selected widgets  in a Gtk_Clist for
instance), list of strings (for Gtk_Combo_Box),...

   They provide a common interface to traverse these lists.

   One useful note: you should only Free the lists that you have
allocated  yourself, and not the lists that are returned by the
subprograms in  GtkAda and should be left under GtkAda's control.

   See the example below for an example on how to traverse a list.

   Instantiating the package Generic_List requires two functions to
convert  back and forth between your data type and a System.Address
which is the  type stored at the C level.   Note that the lists used in
GtkAda already have associated packages, like  Gtk.Enums.Gint_List,
Gtk.Enums.String_List or Gtk.Widget.Widget_List.

* Menu:

* Glib.Glist Types::
* Glib.Glist Subprograms::
* Glib.Glist Example::


File: gtkada_rm.info,  Node: Glib.Glist Types,  Next: Glib.Glist Subprograms,  Up: Package_Glib.Glist

Types
=====

type Glist is private;


This type is both a list and an item in the list.   Each item points to
its successor.

File: gtkada_rm.info,  Node: Glib.Glist Subprograms,  Next: Glib.Glist Example,  Prev: Glib.Glist Types,  Up: Package_Glib.Glist

Subprograms
===========

procedure Alloc
       (List               : out    Glist);

Allocate a new item in the list.
This item isn't associated with any data.   You probably don't have to
use this subprogram, since Append,  Insert, Prepend, etc. already
handle the allocation for you and  give a new value to the item.
procedure Append
       (List               : in out Glist;
        Data               :        Gpointer);

Add a new item at the end of the list, and stores the new list
directly back in List.   The complexity of this operation is O(n)
function Concat
       (List1              :        Glist;
        List2              :        Glist)
        return Glist;

Concatenate two lists, and return the result.
List2 is added at the end of List1.   The complexity is O(n1) (depends
on the size of List1).
procedure Insert
       (List               : in out Glist;
        Data               :        Gpointer;
        Position           :        Gint);

Insert an item in the middle of a list.
If Position is 0, the item is added at the beginning of the list, if
it is negative the item is added at the end.   The complexity is
O(Position).
function Find
       (List               :        Glist;
        Data               :        Gpointer)
        return Glist;

Find a value in the list, and return the first item that contains it.
Note that this function will not work if the function Convert does  not
return the same value for two identical values.
function First
       (List               :        Glist)
        return Glist;

Return the first item in the list.
Note that if List is in fact an item of a larger list, the return
value is the first item in the larger list itself.
procedure Free
       (List               : in out Glist);

Free the list (but does not free the data in each of its elements).
This only frees the memory associated with the list itself.   You
should only use this function on the lists that  you have created
yourself, not on the list that are returned by some  functions in
GtkAda (like Gtk.Clist.Get_Selection). These functions  return directly
the list managed by the underlying C widget, and you  should never free
the result yourself.

   Note also that the memory might not be actually freed. For efficiency
reasons, GtkAda will keep the memory allocated and try to reuse it as
much as possible.
function Get_Data
       (List               :        Glist)
        return Gpointer;

Return the value pointed to by List.
The System.Address container in the C list is converted to a Gpointer
through a call to Convert.
function Get_Data_Address
       (List               :        Glist)
        return System.Address;

Return directly the System.Address contained in the C list.
This is used mainly internally in GtkAda to implement String lists,
and you should not have to use this subprogram yourself.
function Index
       (List               :        Glist;
        Data               :        Gpointer)
        return Gint;

Return the index of the first element in List that contains Data.
Note that this function is irrelevant if Convert does not return the
same value for two identical data.
function Last
       (List               :        Glist)
        return Glist;

Return the last element in the list.
function Length
       (List               :        Glist)
        return Guint;

Return the number of elements in the list.
The last item's index is Length - 1.
procedure List_Reverse
       (List               : in out Glist);

Reverse the order of the list (the last item becomes the first, etc.)
function Next
       (List               :        Glist)
        return Glist;

Returns the Item following List in the global list that contains
both.   If there is no such item, return Null_List. This is how you
stop iterating over a list.
function Nth
       (List               :        Glist;
        N                  :        Guint)
        return Glist;

Give the nth item following LIST in the global list that
contains both.   If there is no such item, return Null_List.
function Nth_Data
       (List               :        Glist;
        N                  :        Guint)
        return Gpointer;

Return the Data contained in the N-th item of List.
The result is undefined if there is no such item in the list.   The
actual result in that case is the result of      Convert
(System.Null_Address);  which might not mean anything.
function Position
       (List               :        Glist;
        Link               :        Glist)
        return Gint;

Return the position of Link in the List.
If Link is not contained in the list, -1 is returned.
procedure Prepend
       (List               : in out Glist;
        Data               :        Gpointer);

Add an item at the beginning of the list.
This operation always succeed.
function Prev
       (List               :        Glist)
        return Glist;

Return the item before List in the global list that contains both.
Return Null_List if there is no such item.
procedure Remove
       (List               : in out Glist;
        Data               :        Gpointer);

Remove the first item in List that contains Data.
Note that this operation can succeed only if Convert always return  the
same address for a given value.
procedure Remove_Link
       (List               : in out Glist;
        Link               :        Glist);

Remove Link from the list to which it belongs.
If that list is not List, no error is returned, but Link is removed
anyway.
function Is_Created
       (List               :        Glist)
        return Boolean;

Return True if there is a C widget associated with List.

File: gtkada_rm.info,  Node: Glib.Glist Example,  Prev: Glib.Glist Subprograms,  Up: Package_Glib.Glist

Example
=======


      with Glib; use Glib;
      with Gtk.Enums;
      with Ada.Text_IO; use Ada.Text_IO;
     
      procedure Glist_Traverse is
         use Gtk.Enums.Gint_List;
         List : Gtk.Enums.Gint_List.Glist;
         Temp : Gtk.Enums.Gint_List.Glist;
      begin
     
         --  First step: create a new list.
     
         Prepend (List, 2);                       -- add at the beginning of the list
         Append (List, 3);                        -- add at the end of the list
         Insert (List, Data => 1, Position => 1); -- in the middle of the list
     
         --  Traverse the list (first way)
     
         Temp := First (List);
         while Temp /= Null_List loop
            Put_Line (Gint'Image (Get_Data (Temp)));
            Temp := Next (Temp);
         end loop;
     
         --  Traverse the list (second way)
     
         for I in 1 .. Length (List) loop
            Put_Line (Gint'Image (Nth_Data (List, I - 1)));
         end loop;
     
      end Glist_Traverse;


File: gtkada_rm.info,  Node: Package_Glib.Messages,  Next: Package_Glib.Module,  Prev: Package_Glib.Glist,  Up: Top

Package Glib.Messages
*********************

This package provides low level routines for enabling, disabling  and
modifying the way log messages are handled in glib/gdk/gtk.

* Menu:

* Glib.Messages Types::
* Glib.Messages Subprograms::


File: gtkada_rm.info,  Node: Glib.Messages Types,  Next: Glib.Messages Subprograms,  Up: Package_Glib.Messages

Types
=====

type Log_Function is access procedure


type Log_Handler_Id is new Guint;


type Log_Level_Flags is mod 2 ** 32;


log levels and flags.

File: gtkada_rm.info,  Node: Glib.Messages Subprograms,  Prev: Glib.Messages Types,  Up: Package_Glib.Messages

Subprograms
===========

log levels
----------

function Log_Set_Handler
       (Log_Domain         :        String;
        Log_Levels         :        Log_Level_Flags;
        Log_Func           :        Log_Function)
        return Log_Handler_Id;

Set a log function for the given log levels, and return its id.
procedure Log_Remove_Handler
       (Log_Domain         :        String;
        Handler_Id         :        Log_Handler_Id);

Unset a given handler.
procedure Log_Default_Handler
       (Log_Domain         :        String;
        Log_Levels         :        Log_Level_Flags;
        Message            :        UTF8_String);

The default log handler.
Can be called e.g. within a user defined log handler.
procedure Log
       (Log_Domain         :        String;
        Log_Levels         :        Log_Level_Flags;
        Message            :        UTF8_String);

Log a message through the glib logging facility.
function Log_Set_Fatal_Mask
       (Log_Domain         :        String;
        Fatal_Mask         :        Log_Level_Flags)
        return Log_Level_Flags;

Set the level at which messages are considered fatal for a given domain.
function Log_Set_Always_Fatal
       (Fatal_Mask         :        Log_Level_Flags)
        return Log_Level_Flags;

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

File: gtkada_rm.info,  Node: Package_Glib.Module,  Next: Package_Glib.Object,  Prev: Package_Glib.Messages,  Up: Top

Package Glib.Module
*******************

This package provides wrapper code for dynamic module loading

* Menu:

* Glib.Module Types::
* Glib.Module Subprograms::


File: gtkada_rm.info,  Node: Glib.Module Types,  Next: Glib.Module Subprograms,  Up: Package_Glib.Module

Types
=====

type G_Module is new C_Proxy;


type Module_Flags is mod 2 ** 32;


type Pointer is private;


This is typically a pointer to procedure/function.

File: gtkada_rm.info,  Node: Glib.Module Subprograms,  Prev: Glib.Module Types,  Up: Package_Glib.Module

Subprograms
===========

function Module_Supported      return Boolean;


Return True if dynamic module loading is supported
function Module_Open
       (File_Name          :        String;
        Flags              :        Module_Flags
                            := Module_Bind_Lazy)
        return G_Module;

Open a module `file_name' and return handle, which is null on error.
function Module_Close
       (Module             :        G_Module)
        return Boolean;

Close a previously opened module, return True on success.
procedure Module_Make_Resident
       (Module             :        G_Module);

Make a module resident so Module_Close on it will be ignored
function Module_Error          return String;


Query the last module error as a string
procedure Generic_Module_Symbol
       (Module             :        G_Module;
        Symbol_Name        :        String;
        Symbol             : out    Pointer;
        Success            : out    Boolean);

Retrieve a symbol pointer from `module'.
Success is set to True on success.
function Module_Name
       (Module             :        G_Module)
        return String;

Retrieve the file name from an existing module
function Module_Build_Path
       (Directory          :        String;
        Module_Name        :        String)
        return String;

Build the actual file name containing a module.
`directory' is the directory where the module file is supposed to be, or
the null string in which case it should either be in the current
directory or, on some operating systems, in some standard place, for
instance on the PATH. Hence, to be absolutely sure to get the correct
module, always pass in a directory. The file name consists of the
directory, if supplied, and `module_name' suitably decorated accoring to
the operating system's conventions (for instance lib*.so or *.dll).

   No checks are made that the file exists, or is of correct type.

File: gtkada_rm.info,  Node: Package_Glib.Object,  Next: Package_Glib.Properties,  Prev: Package_Glib.Module,  Up: Top

Package Glib.Object
*******************

This package provides a minimal binding to the GObject type in Glib.
See Glib.Properties for information on how to manipulate properties

* Menu:

* Glib.Object Signals::
* Glib.Object Types::
* Glib.Object Subprograms::


File: gtkada_rm.info,  Node: Glib.Object Signals,  Next: Glib.Object Types,  Up: Package_Glib.Object

Signals
=======

   * "notify"

     procedure Handler
     (Object : access GObject_Record'Class; Name : String);
     Emitted when the property Name has been modified



File: gtkada_rm.info,  Node: Glib.Object Types,  Next: Glib.Object Subprograms,  Prev: Glib.Object Signals,  Up: Package_Glib.Object

Types
=====

type GObject_Class is private;


type Signal_Id_Array is array (Guint range <>) of Glib.Signal_Id;


type Signal_Parameter_Types is array (Natural range <>, Natural range <>) of GType;


The description of the parameters for each event. These are the
parameters that the application must provide when emitting the  signal.
The user can of course add his own parameters when connecting  the
signal in his application, through the use of
Gtk.Handlers.User_Callback.    Each event defined with
Initialize_Class_Record below should have an  entry in this table. If
Gtk_Type_None is found in the table, it is  ignored. For instance, a
Signal_Parameter_Type like:  (1 => (1 => Gdk_Type_Gdk_Event, 2 =>
GType_None),  2 => (1 => GType_Int,          2 => GType_Int));  defines
two signals, the first with a single Gdk_Event parameter, the  second
with two ints parameters.
type Signal_Query is private;


type Weak_Notify is access procedure


