/src/wrappers/gtk/library/gtk_icon_theme.e

http://github.com/tybor/Liberty · Specman e · 743 lines · 134 code · 192 blank · 417 comment · 2 complexity · 750d3ef1ed3ac199efc174fcc891857b MD5 · raw file

  1. indexing
  2. description: "GtkIconTheme -- Looking up icons by name."
  3. copyright: "[
  4. Copyright (C) 2006 Paolo Redaelli, GTK+ team
  5. This library is free software; you can redistribute it and/or
  6. modify it under the terms of the GNU Lesser General Public License
  7. as published by the Free Software Foundation; either version 2.1 of
  8. the License, or (at your option) any later version.
  9. This library is distributed in the hopeOA that it will be useful, but
  10. WITHOUT ANY WARRANTY; without even the implied warranty of
  11. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  12. Lesser General Public License for more details.
  13. You should have received a copy of the GNU Lesser General Public
  14. License along with this library; if not, write to the Free Software
  15. Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
  16. 02110-1301 USA
  17. ]"
  18. class GTK_ICON_THEME
  19. -- GtkIconTheme provides a facility for looking up icons by name
  20. -- and size. The main reason for using a name rather than simply
  21. -- providing a filename is to allow different icons to be used
  22. -- depending on what icon theme is selecetd by the user. The
  23. -- operation of icon themes on Linux and Unix follows the Icon
  24. -- Theme Specification. There is a default icon theme, named
  25. -- hicolor where applications should install their icons, but more
  26. -- additional application themes can be installed as operating
  27. -- system vendors and users choose.
  28. -- Named icons are similar to the Themeable Stock Images(3)
  29. -- facility, and the distinction between the two may be a bit
  30. -- confusing. A few things to keep in mind:
  31. -- o Stock images usually are used in conjunction with Stock
  32. -- Items(3)., such as GTK_STOCK_OK or GTK_STOCK_OPEN. Named icons
  33. -- are easier to set up and therefore are more useful for new icons
  34. -- that an application wants to add, such as application icons or
  35. -- window icons.
  36. -- o Stock images can only be loaded at the symbolic sizes defined
  37. -- by the GtkIconSize enumeration, or by custom sizes defined by
  38. -- gtk_icon_size_register(), while named icons are more flexible
  39. -- and any pixel size can be specified.
  40. -- o Because stock images are closely tied to stock items, and thus
  41. -- to actions in the user interface, stock images may come in
  42. -- multiple variants for different widget states or writing
  43. -- directions.
  44. -- A good rule of thumb is that if there is a stock image for what
  45. -- you want to use, use it, otherwise use a named icon. It turns
  46. -- out that internally stock images are generally defined in terms
  47. -- of one or more named icons. (An example of the more than one
  48. -- case is icons that depend on writing direction;
  49. -- GTK_STOCK_GO_FORWARD uses the two themed icons
  50. -- "gtk-stock-go-forward-ltr" and "gtk-stock-go-forward-rtl".)
  51. -- In many cases, named themes are used indirectly, via GtkImage or
  52. -- stock items, rather than directly, but looking up icons directly
  53. -- is also simple. The GtkIconTheme object acts as a database of
  54. -- all the icons in the current theme. You can create new
  55. -- GtkIconTheme objects, but its much more efficient to use the
  56. -- standard icon theme for the GdkScreen so that the icon
  57. -- information is shared with other people looking up icons. In the
  58. -- case where the default screen is being used, looking up an icon
  59. -- can be as simple as: (TODO: Eiffelize example)
  60. -- GError *error = NULL;
  61. -- GtkIconTheme *icon_theme;
  62. -- GdkPixbuf *pixbuf;
  63. -- icon_theme = gtk_icon_theme_get_default(); pixbuf =
  64. -- gtk_icon_theme_load_icon (icon_theme, "my-icon-name", /*
  65. -- icon name */ 48, /* size */ 0, /* flags */ &error); if
  66. -- (!pixbuf) { g_warning ("Couldn't load icon: %s",
  67. -- error->message); g_error_free (error); } else { /* Use the
  68. -- pixbuf */ g_object_unref (pixbuf); }
  69. inherit
  70. G_OBJECT
  71. insert
  72. GTK_ICON_LOOKUP_FLAGS
  73. -- TODO: enum GtkIconThemeError;
  74. creation make, from_external_pointer
  75. feature {} -- Creation
  76. make is
  77. -- Creates a new icon theme object. Icon theme objects are
  78. -- used to lookup up an icon by name in a particular icon
  79. -- theme. Usually, you'll want to use `default' or
  80. -- `from_screen' rather than creating a new icon theme object
  81. -- for scratch.
  82. do
  83. from_external_pointer(gtk_icon_theme_new)
  84. end
  85. from_screen (a_screen: GDK_SCREEN) is
  86. -- the icon theme object associated with `a_screen'; if this
  87. -- function has not previously been called for the given
  88. -- screen, a new icon theme object will be created and
  89. -- associated with the screen. Icon theme objects are fairly
  90. -- expensive to create, so using this function is usually a
  91. -- better choice than calling than `make' and setting the
  92. -- screen yourself; by using this function a single icon
  93. -- theme object will be shared between users.
  94. -- A unique GtkIconTheme associated with the given
  95. -- screen. This icon theme is associated with the screen and
  96. -- can be used as long as the screen is open. Do not ref or
  97. -- unref it.
  98. require screen_not_void: a_screen /= Void
  99. do
  100. handle := gtk_icon_theme_get_for_screen (a_screen.handle)
  101. store_eiffel_wrapper
  102. end
  103. feature
  104. set_screen (a_screen: GDK_SCREEN) is
  105. -- Sets `a_screen' for an icon theme; the screen is used to
  106. -- track the user's currently configured icon theme, which
  107. -- might be different for different screens.
  108. require screen_not_void: a_screen /= Void
  109. do
  110. gtk_icon_theme_set_screen (handle, a_screen.handle)
  111. end
  112. set_search_path (some_path: STRING_ARRAY) is
  113. -- Sets the search path for the icon theme object. When
  114. -- looking for an icon theme, GTK+ will search for a
  115. -- subdirectory of one or more of the directories in path
  116. -- with the same name as the icon theme. (Themes from
  117. -- multiple of the path elements are combined to allow themes
  118. -- to be extended by adding icons in the user's home
  119. -- directory.)
  120. -- In addition if an icon found isn't found either in the
  121. -- current icon theme or the default icon theme, and an image
  122. -- file with the right name is found directly in one of the
  123. -- elements of path, then that image will be used for the
  124. -- icon name. (This is legacy feature, and new icons should
  125. -- be put into the default icon theme, which is called
  126. -- DEFAULT_THEME_NAME, rather than directly on the icon
  127. -- path.)
  128. -- `some_path': array of directories that are searched for
  129. -- icon themes
  130. do
  131. gtk_icon_theme_set_search_path (handle, some_path.storage.to_pointer, some_path.count)
  132. end
  133. -- search_path:
  134. -- void gtk_icon_theme_get_search_path (GtkIconTheme *icon_theme,
  135. -- gchar **path[],
  136. -- gint *n_elements);
  137. -- Gets the current search path. See gtk_icon_theme_set_search_path().
  138. -- icon_theme : a GtkIconTheme
  139. -- path : location to store a list of icon theme path directories or
  140. -- NULL The stored value should be freed with g_strfreev().
  141. -- n_elements : location to store number of elements in path, or NULL
  142. -- Since 2.4
  143. -- --------------------------------------------------------------------------
  144. -- gtk_icon_theme_append_search_path ()
  145. -- void gtk_icon_theme_append_search_path
  146. -- (GtkIconTheme *icon_theme,
  147. -- const gchar *path);
  148. -- Appends a directory to the search path. See
  149. -- gtk_icon_theme_set_search_path().
  150. -- icon_theme : a GtkIconTheme
  151. -- path : directory name to append to the icon path
  152. -- Since 2.4
  153. -- --------------------------------------------------------------------------
  154. -- gtk_icon_theme_prepend_search_path ()
  155. -- void gtk_icon_theme_prepend_search_path
  156. -- (GtkIconTheme *icon_theme,
  157. -- const gchar *path);
  158. -- Prepends a directory to the search path. See
  159. -- gtk_icon_theme_set_search_path().
  160. -- icon_theme : a GtkIconTheme
  161. -- path : directory name to prepend to the icon path
  162. -- Since 2.4
  163. -- --------------------------------------------------------------------------
  164. -- gtk_icon_theme_set_custom_theme ()
  165. -- void gtk_icon_theme_set_custom_theme (GtkIconTheme *icon_theme,
  166. -- const gchar *theme_name);
  167. -- Sets the name of the icon theme that the GtkIconTheme object uses
  168. -- overriding system configuration. This function cannot be called on the
  169. -- icon theme objects returned from gtk_icon_theme_get_default() and
  170. -- gtk_icon_theme_get_for_screen().
  171. -- icon_theme : a GtkIconTheme
  172. -- theme_name : name of icon theme to use instead of configured theme, or
  173. -- NULL to unset a previously set custom theme
  174. -- Since 2.4
  175. -- --------------------------------------------------------------------------
  176. -- gtk_icon_theme_has_icon ()
  177. -- gboolean gtk_icon_theme_has_icon (GtkIconTheme *icon_theme,
  178. -- const gchar *icon_name);
  179. -- Checks whether an icon theme includes an icon for a particular name.
  180. -- icon_theme : a GtkIconTheme
  181. -- icon_name : the name of an icon
  182. -- Returns : TRUE if icon_theme includes an icon for icon_name.
  183. -- Since 2.4
  184. -- --------------------------------------------------------------------------
  185. -- gtk_icon_theme_lookup_icon ()
  186. -- GtkIconInfo* gtk_icon_theme_lookup_icon (GtkIconTheme *icon_theme,
  187. -- const gchar *icon_name,
  188. -- gint size,
  189. -- GtkIconLookupFlags flags);
  190. -- Looks up a named icon and returns a structure containing information such
  191. -- as the filename of the icon. The icon can then be rendered into a pixbuf
  192. -- using gtk_icon_info_load_icon(). (gtk_icon_theme_load_icon() combines
  193. -- these two steps if all you need is the pixbuf.)
  194. -- icon_theme : a GtkIconTheme
  195. -- icon_name : the name of the icon to lookup
  196. -- size : desired icon size
  197. -- flags : flags modifying the behavior of the icon lookup
  198. -- Returns : a GtkIconInfo structure containing information about the
  199. -- icon, or NULL if the icon wasn't found. Free with
  200. -- gtk_icon_info_free()
  201. -- Since 2.4
  202. -- --------------------------------------------------------------------------
  203. -- gtk_icon_theme_load_icon ()
  204. -- GdkPixbuf* gtk_icon_theme_load_icon (GtkIconTheme *icon_theme,
  205. -- const gchar *icon_name,
  206. -- gint size,
  207. -- GtkIconLookupFlags flags,
  208. -- GError **error);
  209. -- Looks up an icon in an icon theme, scales it to the given size and renders
  210. -- it into a pixbuf. This is a convenience function; if more details about
  211. -- the icon are needed, use gtk_icon_theme_lookup_icon() followed by
  212. -- gtk_icon_info_load_icon().
  213. -- Note that you probably want to listen for icon theme changes and update
  214. -- the icon. This is usually done by connecting to the GtkWidget::style-set
  215. -- signal. If for some reason you do not want to update the icon when the
  216. -- icon theme changes, you should consider using gdk_pixbuf_copy() to make a
  217. -- private copy of the pixbuf returned by this function. Otherwise GTK+ may
  218. -- need to keep the old icon theme loaded, which would be a waste of memory.
  219. -- icon_theme : a GtkIconTheme
  220. -- icon_name : the name of the icon to lookup
  221. -- size : the desired icon size. The resulting icon may not be exactly
  222. -- this size; see gtk_icon_info_load_icon().
  223. -- flags : flags modifying the behavior of the icon lookup
  224. -- error : Location to store error information on failure, or NULL.
  225. -- Returns : the rendered icon; this may be a newly created icon or a new
  226. -- reference to an internal icon, so you must not modify the
  227. -- icon. Use g_object_unref() to release your reference to the
  228. -- icon. NULL if the icon isn't found.
  229. -- Since 2.4
  230. -- --------------------------------------------------------------------------
  231. -- gtk_icon_theme_list_icons ()
  232. -- GList* gtk_icon_theme_list_icons (GtkIconTheme *icon_theme,
  233. -- const gchar *context);
  234. -- Lists the icons in the current icon theme. Only a subset of the icons can
  235. -- be listed by providing a context string. The set of values for the context
  236. -- string is system dependent, but will typically include such values as
  237. -- "Applications" and "MimeTypes".
  238. -- icon_theme : a GtkIconTheme
  239. -- context : a string identifying a particular type of icon, or NULL to
  240. -- list all icons.
  241. -- Returns : a GList list holding the names of all the icons in the theme.
  242. -- You must first free each element in the list with g_free(),
  243. -- then free the list itself with g_list_free().
  244. -- Since 2.4
  245. -- --------------------------------------------------------------------------
  246. -- gtk_icon_theme_get_icon_sizes ()
  247. -- gint* gtk_icon_theme_get_icon_sizes (GtkIconTheme *icon_theme,
  248. -- const gchar *icon_name);
  249. -- Returns an array of integers describing the sizes at which the icon is
  250. -- available without scaling. A size of -1 means that the icon is available
  251. -- in a scalable format. The array is zero-terminated.
  252. -- icon_theme : a GtkIconTheme
  253. -- icon_name : the name of an icon
  254. -- Returns : An newly allocated array describing the sizes at which the
  255. -- icon is available. The array should be freed with g_free()
  256. -- when it is no longer needed.
  257. -- Since 2.6
  258. -- --------------------------------------------------------------------------
  259. -- gtk_icon_theme_get_example_icon_name ()
  260. -- char* gtk_icon_theme_get_example_icon_name
  261. -- (GtkIconTheme *icon_theme);
  262. -- Gets the name of an icon that is representative of the current theme (for
  263. -- instance, to use when presenting a list of themes to the user.)
  264. -- icon_theme : a GtkIconTheme
  265. -- Returns : the name of an example icon or NULL. Free with g_free().
  266. -- Since 2.4
  267. -- --------------------------------------------------------------------------
  268. -- gtk_icon_theme_rescan_if_needed ()
  269. -- gboolean gtk_icon_theme_rescan_if_needed (GtkIconTheme *icon_theme);
  270. -- Checks to see if the icon theme has changed; if it has, any currently
  271. -- cached information is discarded and will be reloaded next time icon_theme
  272. -- is accessed.
  273. -- icon_theme : a GtkIconTheme
  274. -- Returns : TRUE if the icon theme has changed and needed to be reloaded.
  275. -- Since 2.4
  276. -- --------------------------------------------------------------------------
  277. -- gtk_icon_theme_add_builtin_icon ()
  278. -- void gtk_icon_theme_add_builtin_icon (const gchar *icon_name,
  279. -- gint size,
  280. -- GdkPixbuf *pixbuf);
  281. -- Registers a built-in icon for icon theme lookups. The idea of built-in
  282. -- icons is to allow an application or library that uses themed icons to
  283. -- function requiring files to be present in the file system. For instance,
  284. -- the default images for all of GTK+'s stock icons are registered as
  285. -- built-icons.
  286. -- In general, if you use gtk_icon_theme_add_builtin_icon() you should also
  287. -- install the icon in the icon theme, so that the icon is generally
  288. -- available.
  289. -- This function will generally be used with pixbufs loaded via
  290. -- gdk_pixbuf_new_from_inline().
  291. -- icon_name : the name of the icon to register
  292. -- size : the size at which to register the icon (different images can
  293. -- be registered for the same icon name at different sizes.)
  294. -- pixbuf : GdkPixbuf that contains the image to use for icon_name.
  295. -- Since 2.4
  296. -- --------------------------------------------------------------------------
  297. -- gtk_icon_info_copy ()
  298. -- GtkIconInfo* gtk_icon_info_copy (GtkIconInfo *icon_info);
  299. -- Make a copy of a GtkIconInfo.
  300. -- icon_info : a GtkIconInfo
  301. -- Returns : the new GtkIconInfo
  302. -- Since 2.4
  303. -- --------------------------------------------------------------------------
  304. -- gtk_icon_info_free ()
  305. -- void gtk_icon_info_free (GtkIconInfo *icon_info);
  306. -- Free a GtkIconInfo and associated information
  307. -- icon_info : a GtkIconInfo
  308. -- Since 2.4
  309. -- --------------------------------------------------------------------------
  310. -- gtk_icon_info_get_base_size ()
  311. -- gint gtk_icon_info_get_base_size (GtkIconInfo *icon_info);
  312. -- Gets the base size for the icon. The base size is a size for the icon that
  313. -- was specified by the icon theme creator. This may be different than the
  314. -- actual size of image; an example of this is small emblem icons that can be
  315. -- attached to a larger icon. These icons will be given the same base size as
  316. -- the larger icons to which they are attached.
  317. -- icon_info : a GtkIconInfo
  318. -- Returns : the base size, or 0, if no base size is known for the icon.
  319. -- Since 2.4
  320. -- --------------------------------------------------------------------------
  321. -- gtk_icon_info_get_filename ()
  322. -- const gchar* gtk_icon_info_get_filename (GtkIconInfo *icon_info);
  323. -- Gets the filename for the icon. If the GTK_ICON_LOOKUP_USE_BUILTIN flag
  324. -- was passed to gtk_icon_theme_lookup_icon(), there may be no filename if a
  325. -- builtin icon is returned; in this case, you should use
  326. -- gtk_icon_info_get_builtin_pixbuf().
  327. -- icon_info : a GtkIconInfo
  328. -- Returns : the filename for the icon, or NULL if
  329. -- gtk_icon_info_get_builtin_pixbuf() should be used instead. The
  330. -- return value is owned by GTK+ and should not be modified or
  331. -- freed.
  332. -- Since 2.4
  333. -- --------------------------------------------------------------------------
  334. -- gtk_icon_info_get_builtin_pixbuf ()
  335. -- GdkPixbuf* gtk_icon_info_get_builtin_pixbuf
  336. -- (GtkIconInfo *icon_info);
  337. -- Gets the built-in image for this icon, if any. To allow GTK+ to use built
  338. -- in icon images, you must pass the GTK_ICON_LOOKUP_USE_BUILTIN to
  339. -- gtk_icon_theme_lookup_icon().
  340. -- icon_info : a GtkIconInfo structure
  341. -- Returns : the built-in image pixbuf, or NULL. No extra reference is
  342. -- added to the returned pixbuf, so if you want to keep it
  343. -- around, you must use g_object_ref(). The returned image must
  344. -- not be modified.
  345. -- Since 2.4
  346. -- --------------------------------------------------------------------------
  347. -- gtk_icon_info_load_icon ()
  348. -- GdkPixbuf* gtk_icon_info_load_icon (GtkIconInfo *icon_info,
  349. -- GError **error);
  350. -- Renders an icon previously looked up in an icon theme using
  351. -- gtk_icon_theme_lookup_icon(); the size will be based on the size passed to
  352. -- gtk_icon_theme_lookup_icon(). Note that the resulting pixbuf may not be
  353. -- exactly this size; an icon theme may have icons that differ slightly from
  354. -- their nominal sizes, and in addition GTK+ will avoid scaling icons that it
  355. -- considers sufficiently close to the requested size or for which the source
  356. -- image would have to be scaled up too far. (This maintains sharpness.)
  357. -- icon_info : a GtkIconInfo structure from gtk_icon_theme_lookup_icon()
  358. -- error : location to store error information on failure, or NULL.
  359. -- Returns : the rendered icon; this may be a newly created icon or a new
  360. -- reference to an internal icon, so you must not modify the
  361. -- icon. Use g_object_unref() to release your reference to the
  362. -- icon.
  363. -- Since 2.4
  364. -- --------------------------------------------------------------------------
  365. -- gtk_icon_info_set_raw_coordinates ()
  366. -- void gtk_icon_info_set_raw_coordinates
  367. -- (GtkIconInfo *icon_info,
  368. -- gboolean raw_coordinates);
  369. -- Sets whether the coordinates returned by gtk_icon_info_get_embedded_rect()
  370. -- and gtk_icon_info_get_attach_points() should be returned in their original
  371. -- form as specified in the icon theme, instead of scaled appropriately for
  372. -- the pixbuf returned by gtk_icon_info_load_icon().
  373. -- Raw coordinates are somewhat strange; they are specified to be with
  374. -- respect to the unscaled pixmap for PNG and XPM icons, but for SVG icons,
  375. -- they are in a 1000x1000 coordinate space that is scaled to the final size
  376. -- of the icon. You can determine if the icon is an SVG icon by using
  377. -- gtk_icon_info_get_filename(), and seeing if it is non-NULL and ends in
  378. -- '.svg'.
  379. -- This function is provided primarily to allow compatibility wrappers for
  380. -- older API's, and is not expected to be useful for applications.
  381. -- icon_info : a GtkIconInfo
  382. -- raw_coordinates : whether the coordinates of embedded rectangles and
  383. -- attached points should be returned in their original
  384. -- (unscaled) form.
  385. -- Since 2.4
  386. -- --------------------------------------------------------------------------
  387. -- gtk_icon_info_get_embedded_rect ()
  388. -- gboolean gtk_icon_info_get_embedded_rect (GtkIconInfo *icon_info,
  389. -- GdkRectangle *rectangle);
  390. -- Gets the coordinates of a rectangle within the icon that can be used for
  391. -- display of information such as a preview of the contents of a text file.
  392. -- See gtk_icon_info_set_raw_coordinates() for further information about the
  393. -- coordinate system.
  394. -- icon_info : a GtkIconInfo
  395. -- rectangle : GdkRectangle in which to store embedded rectangle coordinates;
  396. -- coordinates are only stored when this function returns TRUE.
  397. -- Returns : TRUE if the icon has an embedded rectangle
  398. -- Since 2.4
  399. -- --------------------------------------------------------------------------
  400. -- gtk_icon_info_get_attach_points ()
  401. -- gboolean gtk_icon_info_get_attach_points (GtkIconInfo *icon_info,
  402. -- GdkPoint **points,
  403. -- gint *n_points);
  404. -- Fetches the set of attach points for an icon. An attach point is a
  405. -- location in the icon that can be used as anchor points for attaching
  406. -- emblems or overlays to the icon.
  407. -- icon_info : a GtkIconInfo
  408. -- points : location to store pointer to an array of points, or NULL free
  409. -- the array of points with g_free().
  410. -- n_points : location to store the number of points in points, or NULL
  411. -- Returns : TRUE if there are any attach points for the icon.
  412. -- Since 2.4
  413. -- --------------------------------------------------------------------------
  414. -- gtk_icon_info_get_display_name ()
  415. -- const gchar* gtk_icon_info_get_display_name (GtkIconInfo *icon_info);
  416. -- Gets the display name for an icon. A display name is a string to be used
  417. -- in place of the icon name in a user visible context like a list of icons.
  418. -- icon_info : a GtkIconInfo
  419. -- Returns : the display name for the icon or NULL, if the icon doesn't
  420. -- have a specified display name. This value is owned icon_info
  421. -- and must not be modified or free.
  422. -- Since 2.4
  423. feature -- The "changed" signal
  424. -- void user_function (GtkIconTheme *icon_theme,
  425. -- gpointer user_data) : Run last
  426. -- Emitted when the current icon theme is switched or GTK+ detects that a
  427. -- change has occurred in the contents of the current icon theme.
  428. -- icon_theme : the icon theme
  429. feature -- size
  430. struct_size: INTEGER is
  431. external "C inline use <gtk/gtk.h>"
  432. alias "sizeof(GtkIconTheme)"
  433. end
  434. feature {} -- External calls
  435. gtk_icon_theme_error: INTEGER is
  436. -- The GQuark used for GtkIconThemeError errors.
  437. external "C macro <gtk/gtk.h>"
  438. alias "GTK_ICON_THEME_ERROR"
  439. end
  440. gtk_icon_theme_new: POINTER is
  441. -- GtkIconTheme* gtk_icon_theme_new (void);
  442. external "C use <gtk/gtk.h>"
  443. end
  444. gtk_icon_theme_get_for_screen (a_screen: POINTER): POINTER is
  445. -- GtkIconTheme* gtk_icon_theme_get_for_screen (GdkScreen *screen);
  446. external "C use <gtk/gtk.h>"
  447. end
  448. gtk_icon_theme_set_screen (an_icon_theme, a_screen: POINTER) is
  449. -- void gtk_icon_theme_set_screen (GtkIconTheme *icon_theme, GdkScreen *screen);
  450. external "C use <gtk/gtk.h>"
  451. end
  452. gtk_icon_theme_set_search_path (an_icon_theme, a_path: POINTER; an_elements_n: INTEGER) is
  453. -- void gtk_icon_theme_set_search_path (GtkIconTheme
  454. -- *icon_theme, const gchar *path[], gint n_elements);
  455. external "C use <gtk/gtk.h>"
  456. end
  457. gtk_icon_theme_get_search_path (an_icon_theme, some_paths, a_n_element: POINTER) is
  458. -- void gtk_icon_theme_get_search_path (GtkIconTheme
  459. -- *icon_theme, gchar **path[], gint *n_elements);
  460. external "C use <gtk/gtk.h>"
  461. end
  462. gtk_icon_theme_append_search_path (an_icon_theme, a_path: POINTER) is
  463. -- void gtk_icon_theme_append_search_path (GtkIconTheme *icon_theme, const gchar *path);
  464. external "C use <gtk/gtk.h>"
  465. end
  466. gtk_icon_theme_prepend_search_path (an_icon_theme, a_path: POINTER) is
  467. -- void gtk_icon_theme_prepend_search_path (GtkIconTheme
  468. -- *icon_theme, const gchar *path);
  469. external "C use <gtk/gtk.h>"
  470. end
  471. gtk_icon_theme_set_custom_theme (an_icon_theme, a_theme_name: POINTER) is
  472. -- void gtk_icon_theme_set_custom_theme (GtkIconTheme
  473. -- *icon_theme, const gchar *theme_name);
  474. external "C use <gtk/gtk.h>"
  475. end
  476. gtk_icon_theme_has_icon (an_icon_theme, an_icon_name: POINTER): INTEGER is
  477. -- gboolean gtk_icon_theme_has_icon (GtkIconTheme *icon_theme, const gchar *icon_name);
  478. external "C use <gtk/gtk.h>"
  479. end
  480. gtk_icon_theme_lookup_icon (an_icon_theme, an_icon_name: POINTER; a_size, some_flags: INTEGER): POINTER is
  481. -- GtkIconInfo* gtk_icon_theme_lookup_icon (GtkIconTheme *icon_theme, const gchar *icon_name, gint size, GtkIconLookupFlags flags);
  482. external "C use <gtk/gtk.h>"
  483. end
  484. gtk_icon_theme_load_icon (an_icon_theme, an_icon_name: POINTER; a_size, some_flags: INTEGER; error_handle: POINTER): POINTER is
  485. -- GdkPixbuf* gtk_icon_theme_load_icon (GtkIconTheme *icon_theme, const gchar *icon_name, gint size, GtkIconLookupFlags flags, GError **error);
  486. external "C use <gtk/gtk.h>"
  487. end
  488. gtk_icon_theme_list_icons (an_icon_theme, a_context: POINTER): POINTER is
  489. -- GList* gtk_icon_theme_list_icons (GtkIconTheme *icon_theme, const gchar *context);
  490. external "C use <gtk/gtk.h>"
  491. end
  492. gtk_icon_theme_get_icon_sizes (an_icon_theme, an_icon_name: POINTER): POINTER is
  493. -- gint* gtk_icon_theme_get_icon_sizes (GtkIconTheme
  494. -- *icon_theme, const gchar *icon_name);
  495. external "C use <gtk/gtk.h>"
  496. end
  497. gtk_icon_theme_get_example_icon_name (an_icon_theme: POINTER): POINTER is
  498. -- char* gtk_icon_theme_get_example_icon_name (GtkIconTheme *icon_theme);
  499. external "C use <gtk/gtk.h>"
  500. end
  501. gtk_icon_theme_rescan_if_needed (an_icon_theme: POINTER): INTEGER is
  502. -- gboolean gtk_icon_theme_rescan_if_needed (GtkIconTheme *icon_theme);
  503. external "C use <gtk/gtk.h>"
  504. end
  505. gtk_icon_theme_add_builtin_icon (an_icon_name: POINTER; a_size: INTEGER; a_pixbuf: POINTER) is
  506. -- void gtk_icon_theme_add_builtin_icon (const gchar
  507. -- *icon_name, gint size, GdkPixbuf *pixbuf);
  508. external "C use <gtk/gtk.h>"
  509. end
  510. gtk_icon_info_copy (an_icon_info: POINTER): POINTER is
  511. -- GtkIconInfo* gtk_icon_info_copy (GtkIconInfo *icon_info);
  512. external "C use <gtk/gtk.h>"
  513. end
  514. gtk_icon_info_free (a_icon_info: POINTER) is
  515. -- void gtk_icon_info_free (GtkIconInfo *icon_info);
  516. external "C use <gtk/gtk.h>"
  517. end
  518. gtk_icon_info_get_base_size (a_icon_info: POINTER): INTEGER is
  519. -- gint gtk_icon_info_get_base_size (GtkIconInfo *icon_info);
  520. external "C use <gtk/gtk.h>"
  521. end
  522. gtk_icon_info_get_filename (a_icon_info: POINTER): POINTER is
  523. -- const gchar* gtk_icon_info_get_filename (GtkIconInfo *icon_info);
  524. external "C use <gtk/gtk.h>"
  525. end
  526. gtk_icon_info_get_builtin_pixbuf (a_icon_info: POINTER): POINTER is
  527. -- GdkPixbuf* gtk_icon_info_get_builtin_pixbuf (GtkIconInfo *icon_info);
  528. external "C use <gtk/gtk.h>"
  529. end
  530. gtk_icon_info_load_icon (a_icon_info, an_error_handle: POINTER): POINTER is
  531. -- GdkPixbuf* gtk_icon_info_load_icon (GtkIconInfo *icon_info, GError **error);
  532. external "C use <gtk/gtk.h>"
  533. end
  534. gtk_icon_info_set_raw_coordinates (a_icon_info: POINTER; raw_coordinates_bool: INTEGER) is
  535. -- void gtk_icon_info_set_raw_coordinates (GtkIconInfo
  536. -- *icon_info, gboolean raw_coordinates);
  537. external "C use <gtk/gtk.h>"
  538. end
  539. gtk_icon_info_get_embedded_rect (a_icon_info, a_rectangle: POINTER): INTEGER is
  540. -- gboolean gtk_icon_info_get_embedded_rect (GtkIconInfo *icon_info, GdkRectangle *rectangle);
  541. external "C use <gtk/gtk.h>"
  542. end
  543. gtk_icon_info_get_attach_points (a_icon_info, a_points_handle, a_n_points: POINTER): INTEGER is
  544. -- gboolean gtk_icon_info_get_attach_points (GtkIconInfo *icon_info, GdkPoint **points, gint *n_points);
  545. external "C use <gtk/gtk.h>"
  546. end
  547. gtk_icon_info_get_display_name (a_icon_info: POINTER): POINTER is
  548. -- const gchar* gtk_icon_info_get_display_name (GtkIconInfo *icon_info);
  549. external "C use <gtk/gtk.h>"
  550. end
  551. end