_
Conversion_
HooksThis package provides an implementation for hooks used in Gtk.Type_Conversion. These hooks should be used when you import a new C widget, so that GtkAda can recreate the Ada structure from the underlying C structure. Note that when you create a widget directly in Ada, you do not need to provide any hook.
Implementation note: This is a separate package from Gtk.Type_Conversion so that adding a hook does not necessarily mean the user has to 'with' Gtk.Type_Conversion, and thus all the packages from GtkAda.
Note that this package is not thread safe. You should call the function Add_Hook from the elaboration part of your packages.
Types |
---|
type File_Conversion_Hook_Type is access function (Type_Name : String) return Root_Type_Access; | |
This variable can be point to one of your functions.
It gets the name of a C widget (ex/ "GtkButton") and should return
a newly allocated Ada widget.
| |
type Hook_List is record Func : File_Conversion_Hook_Type; Next : Hook_List_Access := null; end record; | |
Internal structure used for the list.
| |
type Hook_List_Access is access Hook_List; | |
|
Subprograms |
---|
procedure Add_Hook (Func : File_Conversion_Hook_Type); | ||
Add a new function to the list of hooks for file conversions. | ||
function Conversion_Hooks return Hook_List_Access; | ||
Return the head of the hook list.
|