with Glib.Object;
with Gdk.Types;
with Gtk.Accel_Group;
with Gtk.Widget;
with Gtkada.Types;
package Gtk.Item_Factory is
pragma Obsolescent;
type Gtk_Item_Factory_Record is new Object.GObject_Record with private;
type Gtk_Item_Factory is access all Gtk_Item_Factory_Record'Class;
type Item_Type_Enum is
(Title,
Item,
Image_Item,
Stock_Item,
Check_Item,
Toggle_Item,
Radio_Item,
Separator,
Tearoff,
Branch,
Last_Branch
);
type Gtk_Item_Factory_Entry is private;
type Gtk_Item_Factory_Entry_Array is array (Gint range <>) of
Gtk_Item_Factory_Entry;
procedure Gtk_New
(Ifactory : out Gtk_Item_Factory;
Container_Type : Gtk_Type;
Path : UTF8_String;
Accel_Group : Gtk.Accel_Group.Gtk_Accel_Group);
procedure Initialize
(Ifactory : access Gtk_Item_Factory_Record'Class;
Container_Type : Gtk_Type;
Path : UTF8_String := "";
Accel_Group : Gtk.Accel_Group.Gtk_Accel_Group);
function Get_Type return Gtk_Type;
procedure Add_Foreign
(Accel_Widget : access Gtk.Widget.Gtk_Widget_Record'Class;
Full_Path : UTF8_String;
Accel_Group : Gtk.Accel_Group.Gtk_Accel_Group;
Keyval : Guint;
Modifiers : Gdk.Types.Gdk_Modifier_Type);
function From_Widget
(Widget : access Gtk.Widget.Gtk_Widget_Record'Class)
return Gtk_Item_Factory;
function Path_From_Widget
(Widget : access Gtk.Widget.Gtk_Widget_Record'Class) return UTF8_String;
function Get_Item
(Ifactory : access Gtk_Item_Factory_Record;
Path : UTF8_String) return Gtk.Widget.Gtk_Widget;
function Get_Widget
(Ifactory : access Gtk_Item_Factory_Record;
Path : UTF8_String) return Gtk.Widget.Gtk_Widget;
function Get_Widget_By_Action
(Ifactory : access Gtk_Item_Factory_Record;
Action : Guint) return Gtk.Widget.Gtk_Widget;
function Get_Item_By_Action
(Ifactory : access Gtk_Item_Factory_Record;
Action : Guint) return Gtk.Widget.Gtk_Widget;
procedure Delete_Item
(Ifactory : access Gtk_Item_Factory_Record;
Path : UTF8_String);
procedure Delete_Entry
(Ifactory : access Gtk_Item_Factory_Record;
Ientry : Gtk_Item_Factory_Entry);
procedure Delete_Entries
(Ifactory : access Gtk_Item_Factory_Record;
Entries : Gtk_Item_Factory_Entry_Array);
procedure Popup
(Ifactory : access Gtk_Item_Factory_Record;
X : Guint;
Y : Guint;
Mouse_Button : Guint;
Time : Guint32);
generic
type Data_Type (<>) is limited private;
package Data_Item is
type Data_Type_Access is access all Data_Type;
type Gtk_Print_Func is access procedure
(Func_Data : Data_Type_Access;
Str : String);
type Gtk_Translate_Func is access function
(Path : UTF8_String;
Func_Data : Data_Type_Access) return Gtkada.Types.Chars_Ptr;
pragma Convention (C, Gtk_Translate_Func);
type Limited_Widget is limited private;
Null_Widget : constant Limited_Widget;
function To_Widget
(Widget : Limited_Widget) return Gtk.Widget.Gtk_Widget;
type Gtk_Item_Factory_Callback is access procedure
(Callback_Data : Data_Type_Access;
Callback_Action : Guint;
Widget : Limited_Widget);
function Gtk_New
(Path : UTF8_String;
Accelerator : String := "";
Callback : Gtk_Item_Factory_Callback := null;
Item_Type : Item_Type_Enum;
Callback_Action : Guint := 0) return Gtk_Item_Factory_Entry;
function Gtk_New
(Path : UTF8_String;
Accelerator : String := "";
Callback : Gtk_Item_Factory_Callback := null;
Item_Type : String := "";
Callback_Action : Guint := 0) return Gtk_Item_Factory_Entry;
function Gtk_New
(Path : UTF8_String;
Accelerator : String := "";
Stock_Id : String;
Callback : Gtk_Item_Factory_Callback := null;
Callback_Action : Guint := 0) return Gtk_Item_Factory_Entry;
function Gtk_New
(Path : UTF8_String;
Accelerator : String := "";
Callback : Gtk_Item_Factory_Callback := null;
Pixbuf : access Guchar_Array;
Callback_Action : Guint := 0) return Gtk_Item_Factory_Entry;
procedure Free (Ientry : in out Gtk_Item_Factory_Entry);
procedure Free (Ientries : in out Gtk_Item_Factory_Entry_Array);
procedure Create_Item
(Ifactory : access Gtk_Item_Factory_Record'Class;
Ientry : Gtk_Item_Factory_Entry;
Callback_Data : Data_Type_Access;
Callback_Type : Guint);
procedure Create_Items
(Ifactory : access Gtk_Item_Factory_Record'Class;
Entries : Gtk_Item_Factory_Entry_Array;
Callback_Data : Data_Type_Access);
function Popup_Data
(Ifactory : access Gtk_Item_Factory_Record'Class)
return Data_Type_Access;
function Popup_Data_From_Widget
(Widget : access Gtk.Widget.Gtk_Widget_Record'Class)
return Data_Type_Access;
procedure Popup_With_Data
(Ifactory : access Gtk_Item_Factory_Record'Class;
Popup_Data : Data_Type_Access;
Destroy : System.Address;
X : Guint;
Y : Guint;
Mouse_Button : Guint;
Time : Guint32);
procedure Set_Translate_Func
(Ifactory : access Gtk_Item_Factory_Record'Class;
Func : Gtk_Translate_Func;
Data : Data_Type_Access;
Notify : System.Address);
private
type Limited_Widget is new System.Address;
Null_Widget : constant Limited_Widget :=
Limited_Widget (System.Null_Address);
end Data_Item;
private
type Gtk_Item_Factory_Record is new Glib.Object.GObject_Record
with null record;
type Gtk_Item_Factory_Entry is record
Path : Gtkada.Types.Chars_Ptr;
Accelerator : Gtkada.Types.Chars_Ptr;
Callback : System.Address;
Callback_Action : Guint;
Item_Type : Gtkada.Types.Chars_Ptr;
Extra_Data : Gtkada.Types.Chars_Ptr;
end record;
pragma Convention (C, Gtk_Item_Factory_Entry);
pragma Import (C, Get_Type, "gtk_item_factory_get_type");
end Gtk.Item_Factory;