1// included by gtk2.pas 2 3{$IFDEF read_forward_definitions} 4{$ENDIF read_forward_definitions} 5 6//------------------------------------------------------------------------------ 7 8{$IFDEF read_interface_types} 9 PGtkIconFactory = ^TGtkIconFactory; 10 TGtkIconFactory = record 11 parent_instance : TGObject; 12 icons : PGHashTable; 13 end; 14 15{ Padding for future expansion } 16 PGtkIconFactoryClass = ^TGtkIconFactoryClass; 17 TGtkIconFactoryClass = record 18 parent_class : TGObjectClass; 19 _gtk_reserved1 : procedure ; cdecl; 20 _gtk_reserved2 : procedure ; cdecl; 21 _gtk_reserved3 : procedure ; cdecl; 22 _gtk_reserved4 : procedure ; cdecl; 23 end; 24 25{$ENDIF read_interface_types} 26 27//------------------------------------------------------------------------------ 28 29{$IFDEF read_interface_rest} 30function GTK_TYPE_ICON_FACTORY : GType; 31function GTK_ICON_FACTORY(anObject: pointer) : PGtkIconFactory; 32function GTK_ICON_FACTORY_CLASS(klass: pointer) : PGtkIconFactoryClass; 33function GTK_IS_ICON_FACTORY(anObject: pointer) : boolean; 34function GTK_IS_ICON_FACTORY_CLASS(klass: pointer) : boolean; 35function GTK_ICON_FACTORY_GET_CLASS(obj: pointer) : PGtkIconFactoryClass; 36 37function GTK_TYPE_ICON_SET : GType; 38function GTK_TYPE_ICON_SOURCE : GType; 39 40function gtk_icon_factory_get_type:GType; cdecl; external gtklib; 41function gtk_icon_factory_new:PGtkIconFactory; cdecl; external gtklib; 42procedure gtk_icon_factory_add(factory:PGtkIconFactory; stock_id:Pgchar; icon_set:PGtkIconSet); cdecl; external gtklib; 43function gtk_icon_factory_lookup(factory:PGtkIconFactory; stock_id:Pgchar):PGtkIconSet; cdecl; external gtklib; 44{ Manage the default icon factory stack } 45procedure gtk_icon_factory_add_default(factory:PGtkIconFactory); cdecl; external gtklib; 46procedure gtk_icon_factory_remove_default(factory:PGtkIconFactory); cdecl; external gtklib; 47function gtk_icon_factory_lookup_default(stock_id:Pgchar):PGtkIconSet; cdecl; external gtklib; 48{ Get preferred real size from registered semantic size. Note that 49 themes SHOULD use this size, but they aren't required to; for size 50 requests and such, you should get the actual pixbuf from the icon 51 set and see what size was rendered. 52 53 This function is intended for people who are scaling icons, 54 rather than for people who are displaying already-scaled icons. 55 That is, if you are displaying an icon, you should get the 56 size from the rendered pixbuf, not from here. 57 } 58function gtk_icon_size_lookup(size:TGtkIconSize; width:Pgint; height:Pgint):gboolean; cdecl; external gtklib; 59function gtk_icon_size_register(name:Pgchar; width:gint; height:gint):TGtkIconSize; cdecl; external gtklib; 60procedure gtk_icon_size_register_alias(alias:Pgchar; target:TGtkIconSize); cdecl; external gtklib; 61function gtk_icon_size_from_name(name:Pgchar):TGtkIconSize; cdecl; external gtklib; 62function gtk_icon_size_get_name(size:TGtkIconSize):Pgchar; cdecl; external gtklib; 63{ Icon sets } 64function gtk_icon_set_get_type:GType; cdecl; external gtklib; 65function gtk_icon_set_new:PGtkIconSet; cdecl; external gtklib; 66function gtk_icon_set_new_from_pixbuf(pixbuf:PGdkPixbuf):PGtkIconSet; cdecl; external gtklib; 67function gtk_icon_set_ref(icon_set:PGtkIconSet):PGtkIconSet; cdecl; external gtklib; 68procedure gtk_icon_set_unref(icon_set:PGtkIconSet); cdecl; external gtklib; 69function gtk_icon_set_copy(icon_set:PGtkIconSet):PGtkIconSet; cdecl; external gtklib; 70{ Get one of the icon variants in the set, creating the variant if 71 necessary. 72 } 73function gtk_icon_set_render_icon(icon_set:PGtkIconSet; style:PGtkStyle; direction:TGtkTextDirection; state:TGtkStateType; size:TGtkIconSize; 74 widget:PGtkWidget; detail:Pchar):PGdkPixbuf; cdecl; external gtklib; 75procedure gtk_icon_set_add_source(icon_set:PGtkIconSet; source:PGtkIconSource); cdecl; external gtklib; 76procedure gtk_icon_set_get_sizes(icon_set:PGtkIconSet; sizes:PPGtkIconSize; n_sizes:pgint); cdecl; external gtklib; 77function gtk_icon_source_get_type:GType; cdecl; external gtklib; 78function gtk_icon_source_new:PGtkIconSource; cdecl; external gtklib; 79function gtk_icon_source_copy(source:PGtkIconSource):PGtkIconSource; cdecl; external gtklib; 80procedure gtk_icon_source_free(source:PGtkIconSource); cdecl; external gtklib; 81procedure gtk_icon_source_set_filename(source:PGtkIconSource; filename:Pgchar); cdecl; external gtklib; 82procedure gtk_icon_source_set_pixbuf(source:PGtkIconSource; pixbuf:PGdkPixbuf); cdecl; external gtklib; 83function gtk_icon_source_get_filename(source:PGtkIconSource):Pgchar; cdecl; external gtklib; 84function gtk_icon_source_get_pixbuf(source:PGtkIconSource):PGdkPixbuf; cdecl; external gtklib; 85procedure gtk_icon_source_set_direction_wildcarded(source:PGtkIconSource; setting:gboolean); cdecl; external gtklib; 86procedure gtk_icon_source_set_state_wildcarded(source:PGtkIconSource; setting:gboolean); cdecl; external gtklib; 87procedure gtk_icon_source_set_size_wildcarded(source:PGtkIconSource; setting:gboolean); cdecl; external gtklib; 88function gtk_icon_source_get_size_wildcarded(source:PGtkIconSource):gboolean; cdecl; external gtklib; 89function gtk_icon_source_get_state_wildcarded(source:PGtkIconSource):gboolean; cdecl; external gtklib; 90function gtk_icon_source_get_direction_wildcarded(source:PGtkIconSource):gboolean; cdecl; external gtklib; 91procedure gtk_icon_source_set_direction(source:PGtkIconSource; direction:TGtkTextDirection); cdecl; external gtklib; 92procedure gtk_icon_source_set_state(source:PGtkIconSource; state:TGtkStateType); cdecl; external gtklib; 93procedure gtk_icon_source_set_size(source:PGtkIconSource; size:TGtkIconSize); cdecl; external gtklib; 94function gtk_icon_source_get_direction(source:PGtkIconSource):TGtkTextDirection; cdecl; external gtklib; 95function gtk_icon_source_get_state(source:PGtkIconSource):TGtkStateType; cdecl; external gtklib; 96function gtk_icon_source_get_size(source:PGtkIconSource):TGtkIconSize; cdecl; external gtklib; 97{ ignore this } 98procedure _gtk_icon_set_invalidate_caches; cdecl; external gtklib; 99function _gtk_icon_factory_list_ids:PGSList; cdecl; external gtklib; 100 101{$IFDEF HasGTK2_2} 102function gtk_icon_size_lookup_for_settings(settings: PGtkSettings; size: TGtkIconSize; width: Pgint; height: Pgint): gboolean; cdecl; external gtklib; 103{$ENDIF} 104 105{$ENDIF read_interface_rest} 106 107//------------------------------------------------------------------------------ 108 109{$IFDEF read_implementation} 110function GTK_TYPE_ICON_FACTORY : GType; 111begin 112 GTK_TYPE_ICON_FACTORY:=gtk_icon_factory_get_type; 113end; 114 115function GTK_ICON_FACTORY(anObject: pointer) : PGtkIconFactory; 116begin 117 GTK_ICON_FACTORY:=PGtkIconFactory(G_TYPE_CHECK_INSTANCE_CAST(anObject,GTK_TYPE_ICON_FACTORY)); 118end; 119 120function GTK_ICON_FACTORY_CLASS(klass: pointer) : PGtkIconFactoryClass; 121begin 122 GTK_ICON_FACTORY_CLASS:=PGtkIconFactoryClass(G_TYPE_CHECK_CLASS_CAST(klass,GTK_TYPE_ICON_FACTORY)); 123end; 124 125function GTK_IS_ICON_FACTORY(anObject: pointer) : boolean; 126begin 127 GTK_IS_ICON_FACTORY:=G_TYPE_CHECK_INSTANCE_TYPE(anObject,GTK_TYPE_ICON_FACTORY); 128end; 129 130function GTK_IS_ICON_FACTORY_CLASS(klass: pointer) : boolean; 131begin 132 GTK_IS_ICON_FACTORY_CLASS:=G_TYPE_CHECK_CLASS_TYPE(klass,GTK_TYPE_ICON_FACTORY); 133end; 134 135function GTK_ICON_FACTORY_GET_CLASS(obj: pointer) : PGtkIconFactoryClass; 136begin 137 GTK_ICON_FACTORY_GET_CLASS:=PGtkIconFactoryClass(G_TYPE_INSTANCE_GET_CLASS(obj,GTK_TYPE_ICON_FACTORY)); 138end; 139 140function GTK_TYPE_ICON_SET : GType; 141begin 142 GTK_TYPE_ICON_SET:=gtk_icon_set_get_type; 143end; 144 145function GTK_TYPE_ICON_SOURCE : GType; 146begin 147 GTK_TYPE_ICON_SOURCE:=gtk_icon_source_get_type; 148end; 149 150{$ENDIF read_implementation} 151// included by gtk2.pas 152 153