gtkiconfactory.inc 7.3 KB

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