mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-12-28 22:41:43 +00:00
icontheme: Convert docs
This commit is contained in:
parent
3556b605c9
commit
19df22f784
@ -64,12 +64,9 @@
|
|||||||
#include "gdk/gdkarrayimpl.c"
|
#include "gdk/gdkarrayimpl.c"
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* SECTION:gtkicontheme
|
* GtkIconTheme:
|
||||||
* @Short_description: Looking up icons by name
|
|
||||||
* @Title: GtkIconTheme
|
|
||||||
*
|
*
|
||||||
* #GtkIconTheme provides a facility for looking up icons by name
|
* `GtkIconTheme` provides a facility for loading themed icons.
|
||||||
* and size.
|
|
||||||
*
|
*
|
||||||
* The main reason for using a name rather than simply providing a filename
|
* The main reason for using a name rather than simply providing a filename
|
||||||
* is to allow different icons to be used depending on what “icon theme” is
|
* is to allow different icons to be used depending on what “icon theme” is
|
||||||
@ -79,15 +76,14 @@
|
|||||||
* should install their icons, but additional icon themes can be installed
|
* should install their icons, but additional icon themes can be installed
|
||||||
* as operating system vendors and users choose.
|
* as operating system vendors and users choose.
|
||||||
*
|
*
|
||||||
* In many cases, named themes are used indirectly, via #GtkImage
|
* In many cases, named themes are used indirectly, via [class@Gtk.Image]
|
||||||
* rather than directly, but looking up icons
|
* rather than directly, but looking up icons directly is also simple. The
|
||||||
* directly is also simple. The #GtkIconTheme object acts
|
* `GtkIconTheme` object acts as a database of all the icons in the current
|
||||||
* as a database of all the icons in the current theme. You
|
* theme. You can create new `GtkIconTheme` objects, but it’s much more
|
||||||
* can create new #GtkIconTheme objects, but it’s much more
|
* efficient to use the standard icon theme of the `GtkWidget` so that the
|
||||||
* efficient to use the standard icon theme of the #GtkWidget
|
* icon information is shared with other people looking up icons.
|
||||||
* so that the icon information is shared with other people
|
*
|
||||||
* looking up icons.
|
* ```c
|
||||||
* |[<!-- language="C" -->
|
|
||||||
* GtkIconTheme *icon_theme;
|
* GtkIconTheme *icon_theme;
|
||||||
* GtkIconPaintable *icon;
|
* GtkIconPaintable *icon;
|
||||||
* GdkPaintable *paintable;
|
* GdkPaintable *paintable;
|
||||||
@ -101,7 +97,7 @@
|
|||||||
* paintable = GDK_PAINTABLE (icon);
|
* paintable = GDK_PAINTABLE (icon);
|
||||||
* // Use the paintable
|
* // Use the paintable
|
||||||
* g_object_unref (icon);
|
* g_object_unref (icon);
|
||||||
* ]|
|
* ```
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
@ -292,14 +288,11 @@ typedef struct _GtkIconThemeClass GtkIconThemeClass;
|
|||||||
|
|
||||||
typedef struct _GtkIconThemeRef GtkIconThemeRef;
|
typedef struct _GtkIconThemeRef GtkIconThemeRef;
|
||||||
|
|
||||||
/**
|
/* Acts as a database of information about an icon theme.
|
||||||
* GtkIconTheme:
|
|
||||||
*
|
|
||||||
* Acts as a database of information about an icon theme.
|
|
||||||
* Normally, you retrieve the icon theme for a particular
|
* Normally, you retrieve the icon theme for a particular
|
||||||
* display using gtk_icon_theme_get_for_display() and it
|
* display using gtk_icon_theme_get_for_display() and it
|
||||||
* will contain information about current icon theme for
|
* will contain information about current icon theme for
|
||||||
* that display, but you can also create a new #GtkIconTheme
|
* that display, but you can also create a new `GtkIconTheme`
|
||||||
* object and set the icon theme name explicitly using
|
* object and set the icon theme name explicitly using
|
||||||
* gtk_icon_theme_set_theme_name().
|
* gtk_icon_theme_set_theme_name().
|
||||||
*/
|
*/
|
||||||
@ -367,8 +360,9 @@ G_LOCK_DEFINE_STATIC(icon_cache);
|
|||||||
/**
|
/**
|
||||||
* GtkIconPaintable:
|
* GtkIconPaintable:
|
||||||
*
|
*
|
||||||
* Contains information found when looking up an icon in
|
* Contains information found when looking up an icon in `GtkIconTheme`.
|
||||||
* an icon theme and supports painting it as a #GdkPaintable.
|
*
|
||||||
|
* `GtkIconPaintable` implements `GdkPaintable`.
|
||||||
*/
|
*/
|
||||||
struct _GtkIconPaintable
|
struct _GtkIconPaintable
|
||||||
{
|
{
|
||||||
@ -799,12 +793,14 @@ G_DEFINE_TYPE (GtkIconTheme, gtk_icon_theme, G_TYPE_OBJECT)
|
|||||||
/**
|
/**
|
||||||
* gtk_icon_theme_new:
|
* gtk_icon_theme_new:
|
||||||
*
|
*
|
||||||
* Creates a new icon theme object. Icon theme objects are used
|
* Creates a new icon theme object.
|
||||||
* to lookup up an icon by name in a particular icon theme.
|
|
||||||
* Usually, you’ll want to use gtk_icon_theme_get_for_display()
|
|
||||||
* rather than creating a new icon theme object for scratch.
|
|
||||||
*
|
*
|
||||||
* Returns: the newly created #GtkIconTheme object.
|
* Icon theme objects are used to lookup up an icon by name
|
||||||
|
* in a particular icon theme. Usually, you’ll want to use
|
||||||
|
* [func@Gtk.IconTheme.get_for_display] rather than creating
|
||||||
|
* a new icon theme object for scratch.
|
||||||
|
*
|
||||||
|
* Returns: the newly created `GtkIconTheme` object.
|
||||||
*/
|
*/
|
||||||
GtkIconTheme *
|
GtkIconTheme *
|
||||||
gtk_icon_theme_new (void)
|
gtk_icon_theme_new (void)
|
||||||
@ -839,21 +835,20 @@ gtk_icon_theme_load_in_thread (GtkIconTheme *self)
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* gtk_icon_theme_get_for_display:
|
* gtk_icon_theme_get_for_display:
|
||||||
* @display: a #GdkDisplay
|
* @display: a `GdkDisplay`
|
||||||
*
|
*
|
||||||
* Gets the icon theme object associated with @display; if this
|
* Gets the icon theme object associated with @display.
|
||||||
* function has not previously been called for the given
|
|
||||||
* display, a new icon theme object will be created and
|
|
||||||
* associated with the display. Icon theme objects are
|
|
||||||
* fairly expensive to create, so using this function
|
|
||||||
* is usually a better choice than calling than gtk_icon_theme_new()
|
|
||||||
* and setting the display yourself; by using this function
|
|
||||||
* a single icon theme object will be shared between users.
|
|
||||||
*
|
*
|
||||||
* Returns: (transfer none): A unique #GtkIconTheme associated with
|
* If this function has not previously been called for the given
|
||||||
* the given display. This icon theme is associated with
|
* display, a new icon theme object will be created and associated
|
||||||
* the display and can be used as long as the display
|
* with the display. Icon theme objects are fairly expensive to create,
|
||||||
* is open. Do not ref or unref it.
|
* so using this function is usually a better choice than calling
|
||||||
|
* [ctor@Gtk.IconTheme.new] and setting the display yourself; by using
|
||||||
|
* this function a single icon theme object will be shared between users.
|
||||||
|
*
|
||||||
|
* Returns: (transfer none): A unique `GtkIconTheme` associated with
|
||||||
|
* the given display. This icon theme is associated with the display
|
||||||
|
* and can be used as long as the display is open. Do not ref or unref it.
|
||||||
*/
|
*/
|
||||||
GtkIconTheme *
|
GtkIconTheme *
|
||||||
gtk_icon_theme_get_for_display (GdkDisplay *display)
|
gtk_icon_theme_get_for_display (GdkDisplay *display)
|
||||||
@ -972,9 +967,11 @@ gtk_icon_theme_class_init (GtkIconThemeClass *klass)
|
|||||||
* GtkIconTheme::changed:
|
* GtkIconTheme::changed:
|
||||||
* @self: the icon theme
|
* @self: the icon theme
|
||||||
*
|
*
|
||||||
* Emitted when the current icon theme is switched or GTK detects
|
* Emitted when the icon theme changes.
|
||||||
* that a change has occurred in the contents of the current
|
*
|
||||||
* icon theme.
|
* This can happen becuase current icon theme is switched or
|
||||||
|
* because GTK detects that a change has occurred in the
|
||||||
|
* contents of the current icon theme.
|
||||||
*/
|
*/
|
||||||
signal_changed = g_signal_new (I_("changed"),
|
signal_changed = g_signal_new (I_("changed"),
|
||||||
G_TYPE_FROM_CLASS (klass),
|
G_TYPE_FROM_CLASS (klass),
|
||||||
@ -1437,13 +1434,14 @@ gtk_icon_theme_finalize (GObject *object)
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* gtk_icon_theme_set_search_path:
|
* gtk_icon_theme_set_search_path:
|
||||||
* @self: a #GtkIconTheme
|
* @self: a `GtkIconTheme`
|
||||||
* @path: (array zero-terminated=1) (element-type filename) (nullable): NULL-terminated
|
* @path: (array zero-terminated=1) (element-type filename) (nullable): NULL-terminated
|
||||||
* array of directories that are searched for icon themes
|
* array of directories that are searched for icon themes
|
||||||
*
|
*
|
||||||
* Sets the search path for the icon theme object. When looking
|
* Sets the search path for the icon theme object.
|
||||||
* for an icon theme, GTK will search for a subdirectory of
|
*
|
||||||
* one or more of the directories in @path with the same name
|
* When looking for an icon theme, GTK will search for a subdirectory
|
||||||
|
* of one or more of the directories in @path with the same name
|
||||||
* as the icon theme containing an index.theme file. (Themes from
|
* as the icon theme containing an index.theme file. (Themes from
|
||||||
* multiple of the path elements are combined to allow themes to be
|
* multiple of the path elements are combined to allow themes to be
|
||||||
* extended by adding icons in the user’s home directory.)
|
* extended by adding icons in the user’s home directory.)
|
||||||
@ -1479,9 +1477,11 @@ gtk_icon_theme_set_search_path (GtkIconTheme *self,
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* gtk_icon_theme_get_search_path:
|
* gtk_icon_theme_get_search_path:
|
||||||
* @self: a #GtkIconTheme
|
* @self: a `GtkIconTheme`
|
||||||
*
|
*
|
||||||
* Gets the current search path. See gtk_icon_theme_set_search_path().
|
* Gets the current search path.
|
||||||
|
*
|
||||||
|
* See [method@Gtk.IconTheme.set_search_path].
|
||||||
*
|
*
|
||||||
* Returns: (transfer full) (array zero-terminated=1) (element-type filename) (nullable):
|
* Returns: (transfer full) (array zero-terminated=1) (element-type filename) (nullable):
|
||||||
* a list of icon theme path directories or %NULL.
|
* a list of icon theme path directories or %NULL.
|
||||||
@ -1505,11 +1505,12 @@ gtk_icon_theme_get_search_path (GtkIconTheme *self)
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* gtk_icon_theme_add_search_path:
|
* gtk_icon_theme_add_search_path:
|
||||||
* @self: a #GtkIconTheme
|
* @self: a `GtkIconTheme`
|
||||||
* @path: (type filename): directory name to append to the icon path
|
* @path: (type filename): directory name to append to the icon path
|
||||||
*
|
*
|
||||||
* Appends a directory to the search path.
|
* Appends a directory to the search path.
|
||||||
* See gtk_icon_theme_set_search_path().
|
*
|
||||||
|
* See [method@Gtk.IconTheme.set_search_path].
|
||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
gtk_icon_theme_add_search_path (GtkIconTheme *self,
|
gtk_icon_theme_add_search_path (GtkIconTheme *self,
|
||||||
@ -1534,7 +1535,7 @@ gtk_icon_theme_add_search_path (GtkIconTheme *self,
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* gtk_icon_theme_set_resource_path:
|
* gtk_icon_theme_set_resource_path:
|
||||||
* @self: a #GtkIconTheme
|
* @self: a `GtkIconTheme`
|
||||||
* @path: NULL-terminated array of resource paths
|
* @path: NULL-terminated array of resource paths
|
||||||
* that are searched for icons
|
* that are searched for icons
|
||||||
*
|
*
|
||||||
@ -1573,11 +1574,11 @@ gtk_icon_theme_set_resource_path (GtkIconTheme *self,
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* gtk_icon_theme_get_resource_path:
|
* gtk_icon_theme_get_resource_path:
|
||||||
* @self: a #GtkIconTheme
|
* @self: a `GtkIconTheme`
|
||||||
*
|
*
|
||||||
* Gets the current resource path.
|
* Gets the current resource path.
|
||||||
*
|
*
|
||||||
* See gtk_icon_theme_set_resource_path().
|
* See [method@Gtk.IconTheme.set_resource_path].
|
||||||
*
|
*
|
||||||
* Returns: (transfer full) (array zero-terminated=1) (element-type utf8) (nullable):
|
* Returns: (transfer full) (array zero-terminated=1) (element-type utf8) (nullable):
|
||||||
* A list of resource paths or %NULL.
|
* A list of resource paths or %NULL.
|
||||||
@ -1601,13 +1602,13 @@ gtk_icon_theme_get_resource_path (GtkIconTheme *self)
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* gtk_icon_theme_add_resource_path:
|
* gtk_icon_theme_add_resource_path:
|
||||||
* @self: a #GtkIconTheme
|
* @self: a `GtkIconTheme`
|
||||||
* @path: a resource path
|
* @path: a resource path
|
||||||
*
|
*
|
||||||
* Adds a resource path that will be looked at when looking
|
* Adds a resource path that will be looked at when looking
|
||||||
* for icons, similar to search paths.
|
* for icons, similar to search paths.
|
||||||
*
|
*
|
||||||
* See gtk_icon_theme_set_resource_path().
|
* See [method@Gtk.IconTheme.set_resource_path].
|
||||||
*
|
*
|
||||||
* This function should be used to make application-specific icons
|
* This function should be used to make application-specific icons
|
||||||
* available as part of the icon theme.
|
* available as part of the icon theme.
|
||||||
@ -1635,13 +1636,15 @@ gtk_icon_theme_add_resource_path (GtkIconTheme *self,
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* gtk_icon_theme_set_theme_name:
|
* gtk_icon_theme_set_theme_name:
|
||||||
* @self: a #GtkIconTheme
|
* @self: a `GtkIconTheme`
|
||||||
* @theme_name: (allow-none): name of icon theme to use instead of
|
* @theme_name: (allow-none): name of icon theme to use instead of
|
||||||
* configured theme, or %NULL to unset a previously set custom theme
|
* configured theme, or %NULL to unset a previously set custom theme
|
||||||
*
|
*
|
||||||
* Sets the name of the icon theme that the #GtkIconTheme object uses
|
* Sets the name of the icon theme that the `GtkIconTheme` object uses
|
||||||
* overriding system configuration. This function cannot be called
|
* overriding system configuration.
|
||||||
* on the icon theme objects returned from gtk_icon_theme_get_for_display().
|
*
|
||||||
|
* This function cannot be called on the icon theme objects returned
|
||||||
|
* from [type_func@Gtk.IconTheme.get_for_display].
|
||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
gtk_icon_theme_set_theme_name (GtkIconTheme *self,
|
gtk_icon_theme_set_theme_name (GtkIconTheme *self,
|
||||||
@ -1679,7 +1682,7 @@ gtk_icon_theme_set_theme_name (GtkIconTheme *self,
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* gtk_icon_theme_get_theme_name:
|
* gtk_icon_theme_get_theme_name:
|
||||||
* @self: a #GtkIconTheme
|
* @self: a `GtkIconTheme`
|
||||||
*
|
*
|
||||||
* Gets the current icon theme name.
|
* Gets the current icon theme name.
|
||||||
*
|
*
|
||||||
@ -2430,7 +2433,7 @@ load_icon_thread (GTask *task,
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* gtk_icon_theme_lookup_icon:
|
* gtk_icon_theme_lookup_icon:
|
||||||
* @self: a #GtkIconTheme
|
* @self: a `GtkIconTheme`
|
||||||
* @icon_name: the name of the icon to lookup
|
* @icon_name: the name of the icon to lookup
|
||||||
* @fallbacks: (nullable) (array zero-terminated=1):
|
* @fallbacks: (nullable) (array zero-terminated=1):
|
||||||
* @size: desired icon size.
|
* @size: desired icon size.
|
||||||
@ -2438,22 +2441,24 @@ load_icon_thread (GTask *task,
|
|||||||
* @direction: text direction the icon will be displayed in
|
* @direction: text direction the icon will be displayed in
|
||||||
* @flags: flags modifying the behavior of the icon lookup
|
* @flags: flags modifying the behavior of the icon lookup
|
||||||
*
|
*
|
||||||
* Looks up a named icon for a desired size and window scale, returning a
|
* Looks up a named icon for a desired size and window scale,
|
||||||
* #GtkIconPaintable. The icon can then be rendered by using it as a #GdkPaintable,
|
* returning a `GtkIconPaintable`.
|
||||||
|
*
|
||||||
|
* The icon can then be rendered by using it as a `GdkPaintable`,
|
||||||
* or you can get information such as the filename and size.
|
* or you can get information such as the filename and size.
|
||||||
*
|
*
|
||||||
* If the available @icon_name is not available and @fallbacks are provided,
|
* If the available @icon_name is not available and @fallbacks are
|
||||||
* they will be tried in order.
|
* provided, they will be tried in order.
|
||||||
*
|
*
|
||||||
* If no matching icon is found, then a paintable that renders the
|
* If no matching icon is found, then a paintable that renders the
|
||||||
* "missing icon" icon is returned. If you need to do something else
|
* "missing icon" icon is returned. If you need to do something else
|
||||||
* for missing icons you need to use gtk_icon_theme_has_icon().
|
* for missing icons you need to use [method@Gtk.IconTheme.has_icon].
|
||||||
*
|
*
|
||||||
* Note that you probably want to listen for icon theme changes and
|
* Note that you probably want to listen for icon theme changes and
|
||||||
* update the icon. This is usually done by overriding the
|
* update the icon. This is usually done by overriding the
|
||||||
* #GtkWidgetClass.css-changed() function.
|
* GtkWidgetClass.css-changed() function.
|
||||||
*
|
*
|
||||||
* Returns: (transfer full): a #GtkIconPaintable object
|
* Returns: (transfer full): a `GtkIconPaintable` object
|
||||||
* containing the icon.
|
* containing the icon.
|
||||||
*/
|
*/
|
||||||
GtkIconPaintable *
|
GtkIconPaintable *
|
||||||
@ -2567,7 +2572,7 @@ gtk_icon_theme_lookup_symbolic_colors (GtkCssStyle *style,
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* gtk_icon_theme_has_icon:
|
* gtk_icon_theme_has_icon:
|
||||||
* @self: a #GtkIconTheme
|
* @self: a `GtkIconTheme`
|
||||||
* @icon_name: the name of an icon
|
* @icon_name: the name of an icon
|
||||||
*
|
*
|
||||||
* Checks whether an icon theme includes an icon
|
* Checks whether an icon theme includes an icon
|
||||||
@ -2619,13 +2624,14 @@ add_size (gpointer key,
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* gtk_icon_theme_get_icon_sizes:
|
* gtk_icon_theme_get_icon_sizes:
|
||||||
* @self: a #GtkIconTheme
|
* @self: a `GtkIconTheme`
|
||||||
* @icon_name: the name of an icon
|
* @icon_name: the name of an icon
|
||||||
*
|
*
|
||||||
* Returns an array of integers describing the sizes at which
|
* Returns an array of integers describing the sizes at which
|
||||||
* the icon is available without scaling. A size of -1 means
|
* the icon is available without scaling.
|
||||||
* that the icon is available in a scalable format. The array
|
*
|
||||||
* is zero-terminated.
|
* A size of -1 means that the icon is available in a scalable
|
||||||
|
* format. The array is zero-terminated.
|
||||||
*
|
*
|
||||||
* Returns: (array zero-terminated=1) (transfer full): A newly
|
* Returns: (array zero-terminated=1) (transfer full): A newly
|
||||||
* allocated array describing the sizes at which the icon is
|
* allocated array describing the sizes at which the icon is
|
||||||
@ -2693,7 +2699,7 @@ add_key_to_hash (gpointer key,
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* gtk_icon_theme_get_icon_names:
|
* gtk_icon_theme_get_icon_names:
|
||||||
* @self: a #GtkIconTheme
|
* @self: a `GtkIconTheme`
|
||||||
*
|
*
|
||||||
* Lists the names of icons in the current icon theme.
|
* Lists the names of icons in the current icon theme.
|
||||||
*
|
*
|
||||||
@ -3566,7 +3572,7 @@ gtk_icon_paintable_class_init (GtkIconPaintableClass *klass)
|
|||||||
gobject_class->finalize = gtk_icon_paintable_finalize;
|
gobject_class->finalize = gtk_icon_paintable_finalize;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* GtkIconPaintable:file:
|
* GtkIconPaintable:file: (attributes org.gtk.Property.get=gtk_icon_paintable_get_file)
|
||||||
*
|
*
|
||||||
* The file representing the icon, if any.
|
* The file representing the icon, if any.
|
||||||
*/
|
*/
|
||||||
@ -3576,8 +3582,9 @@ gtk_icon_paintable_class_init (GtkIconPaintableClass *klass)
|
|||||||
P_("The file representing the icon"),
|
P_("The file representing the icon"),
|
||||||
G_TYPE_FILE,
|
G_TYPE_FILE,
|
||||||
G_PARAM_CONSTRUCT_ONLY | G_PARAM_READWRITE | G_PARAM_STATIC_NAME | G_PARAM_STATIC_BLURB | G_PARAM_STATIC_NICK));
|
G_PARAM_CONSTRUCT_ONLY | G_PARAM_READWRITE | G_PARAM_STATIC_NAME | G_PARAM_STATIC_BLURB | G_PARAM_STATIC_NICK));
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* GtkIconPaintable:icon-name:
|
* GtkIconPaintable:icon-name: (attributes org.gtk.Property.get=gtk_icon_paintable_get_icon_name)
|
||||||
*
|
*
|
||||||
* The icon name that was chosen during lookup.
|
* The icon name that was chosen during lookup.
|
||||||
*/
|
*/
|
||||||
@ -3587,8 +3594,9 @@ gtk_icon_paintable_class_init (GtkIconPaintableClass *klass)
|
|||||||
P_("The icon name chosen during lookup"),
|
P_("The icon name chosen during lookup"),
|
||||||
NULL,
|
NULL,
|
||||||
G_PARAM_CONSTRUCT_ONLY | G_PARAM_READWRITE | G_PARAM_STATIC_NAME | G_PARAM_STATIC_BLURB | G_PARAM_STATIC_NICK));
|
G_PARAM_CONSTRUCT_ONLY | G_PARAM_READWRITE | G_PARAM_STATIC_NAME | G_PARAM_STATIC_BLURB | G_PARAM_STATIC_NICK));
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* GtkIconPaintable:is-symbolic:
|
* GtkIconPaintable:is-symbolic: (attributes org.gtk.Property.get=gtk_icon_paintable_is_symbolic)
|
||||||
*
|
*
|
||||||
* Whether the icon is symbolic or not.
|
* Whether the icon is symbolic or not.
|
||||||
*/
|
*/
|
||||||
@ -3615,11 +3623,12 @@ new_resource_file (const char *filename)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* gtk_icon_paintable_get_file:
|
* gtk_icon_paintable_get_file: (attributes org.gtk.Method.get_property=file)
|
||||||
* @self: a #GtkIconPaintable
|
* @self: a `GtkIconPaintable`
|
||||||
*
|
*
|
||||||
* Gets the #GFile that was used to load the icon, or %NULL if the icon was
|
* Gets the `GFile` that was used to load the icon.
|
||||||
* not loaded from a file.
|
*
|
||||||
|
* Returns %NULL if the icon was not loaded from a file.
|
||||||
*
|
*
|
||||||
* Returns: (nullable) (transfer full): the #GFile for the icon, or %NULL.
|
* Returns: (nullable) (transfer full): the #GFile for the icon, or %NULL.
|
||||||
* Free with g_object_unref().
|
* Free with g_object_unref().
|
||||||
@ -3639,8 +3648,8 @@ gtk_icon_paintable_get_file (GtkIconPaintable *icon)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* gtk_icon_paintable_get_icon_name:
|
* gtk_icon_paintable_get_icon_name: (attributes org.gtk.Method.get_property=icon-name)
|
||||||
* @self: a #GtkIconPaintable
|
* @self: a `GtkIconPaintable`
|
||||||
*
|
*
|
||||||
* Get the icon name being used for this icon.
|
* Get the icon name being used for this icon.
|
||||||
*
|
*
|
||||||
@ -3649,11 +3658,12 @@ gtk_icon_paintable_get_file (GtkIconPaintable *icon)
|
|||||||
* gtk_icon_theme_lookup_icon() or the always-available
|
* gtk_icon_theme_lookup_icon() or the always-available
|
||||||
* "image-missing". The icon chosen is returned by this function.
|
* "image-missing". The icon chosen is returned by this function.
|
||||||
*
|
*
|
||||||
* If the icon was created without an icon theme, this function returns %NULL.
|
* If the icon was created without an icon theme, this function
|
||||||
|
* returns %NULL.
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
* Returns: (nullable) (type filename): the themed icon-name for the icon, or %NULL
|
* Returns: (nullable) (type filename): the themed icon-name for the
|
||||||
* if its not a themed icon.
|
* icon, or %NULL if its not a themed icon.
|
||||||
*/
|
*/
|
||||||
const char *
|
const char *
|
||||||
gtk_icon_paintable_get_icon_name (GtkIconPaintable *icon)
|
gtk_icon_paintable_get_icon_name (GtkIconPaintable *icon)
|
||||||
@ -3664,15 +3674,16 @@ gtk_icon_paintable_get_icon_name (GtkIconPaintable *icon)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* gtk_icon_paintable_is_symbolic:
|
* gtk_icon_paintable_is_symbolic: (attributes org.gtk.Method.get_property=is-symbolic)
|
||||||
* @self: a #GtkIconPaintable
|
* @self: a `GtkIconPaintable`
|
||||||
*
|
*
|
||||||
* Checks if the icon is symbolic or not. This currently uses only
|
* Checks if the icon is symbolic or not.
|
||||||
* the file name and not the file contents for determining this.
|
|
||||||
* This behaviour may change in the future.
|
|
||||||
*
|
*
|
||||||
* Note that to render a symbolic #GtkIconPaintable properly (with
|
* This currently uses only the file name and not the file contents
|
||||||
* recoloring), you have to set its icon name on a #GtkImage.
|
* for determining this. This behaviour may change in the future.
|
||||||
|
*
|
||||||
|
* Note that to render a symbolic `GtkIconPaintable` properly (with
|
||||||
|
* recoloring), you have to set its icon name on a `GtkImage`.
|
||||||
*
|
*
|
||||||
* Returns: %TRUE if the icon is symbolic, %FALSE otherwise
|
* Returns: %TRUE if the icon is symbolic, %FALSE otherwise
|
||||||
*/
|
*/
|
||||||
@ -3902,21 +3913,24 @@ icon_paintable_snapshot (GdkPaintable *paintable,
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* gtk_icon_paintable_snapshot_with_colors:
|
* gtk_icon_paintable_snapshot_with_colors:
|
||||||
* @icon: a #GtkIconPaintable
|
* @icon: a `GtkIconPaintable`
|
||||||
* @snapshot: a #GdkSnapshot to snapshot to
|
* @snapshot: a `GdkSnapshot` to snapshot to
|
||||||
* @width: width to snapshot in
|
* @width: width to snapshot in
|
||||||
* @height: height to snapshot in
|
* @height: height to snapshot in
|
||||||
* @foreground_color: (allow-none): a #GdkRGBA representing the foreground color
|
* @foreground_color: (allow-none): a `GdkRGBA` representing the foreground color
|
||||||
* of the icon or %NULL to use the default color.
|
* of the icon or %NULL to use the default color.
|
||||||
* @success_color: (allow-none): a #GdkRGBA representing the warning color
|
* @success_color: (allow-none): a `GdkRGBA` representing the warning color
|
||||||
* of the icon or %NULL to use the default color
|
* of the icon or %NULL to use the default color
|
||||||
* @warning_color: (allow-none): a #GdkRGBA representing the warning color
|
* @warning_color: (allow-none): a `GdkRGBA` representing the warning color
|
||||||
* of the icon or %NULL to use the default color
|
* of the icon or %NULL to use the default color
|
||||||
* @error_color: (allow-none): a #GdkRGBA representing the error color
|
* @error_color: (allow-none): a `GdkRGBA` representing the error color
|
||||||
* of the icon or %NULL to use the default color (allow-none)
|
* of the icon or %NULL to use the default color (allow-none)
|
||||||
*
|
*
|
||||||
* This is similar to the implementation of gdk_paintable_snapshot(), but if the icon is
|
* Snapshots the `GtkIconPaintable`.
|
||||||
* symbolic it will be recolored with the specified colors (which usually comes from the theme).
|
*
|
||||||
|
* This is similar to the implementation of [method@Gdk.Paintable.snapshot],
|
||||||
|
* but if the icon is symbolic it will be recolored with the specified colors
|
||||||
|
* (which usually comes from the theme).
|
||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
gtk_icon_paintable_snapshot_with_colors (GtkIconPaintable *icon,
|
gtk_icon_paintable_snapshot_with_colors (GtkIconPaintable *icon,
|
||||||
@ -4007,14 +4021,15 @@ icon_paintable_init (GdkPaintableInterface *iface)
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* gtk_icon_paintable_new_for_file:
|
* gtk_icon_paintable_new_for_file:
|
||||||
* @file: a #GFile
|
* @file: a `GFile`
|
||||||
* @size: desired icon size
|
* @size: desired icon size
|
||||||
* @scale: the desired scale
|
* @scale: the desired scale
|
||||||
*
|
*
|
||||||
* Creates a #GtkIconPaintable for a file with a given size and scale
|
* Creates a `GtkIconPaintable` for a file with a given size and scale.
|
||||||
* #GtkIconPaintable. The icon can then be rendered by using it as a #GdkPaintable.
|
|
||||||
*
|
*
|
||||||
* Returns: (transfer full): a #GtkIconPaintable containing
|
* The icon can then be rendered by using it as a `GdkPaintable`.
|
||||||
|
*
|
||||||
|
* Returns: (transfer full): a `GtkIconPaintable` containing
|
||||||
* for the icon. Unref with g_object_unref()
|
* for the icon. Unref with g_object_unref()
|
||||||
*/
|
*/
|
||||||
GtkIconPaintable *
|
GtkIconPaintable *
|
||||||
@ -4070,18 +4085,19 @@ gtk_icon_paintable_new_for_pixbuf (GtkIconTheme *icon_theme,
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* gtk_icon_theme_lookup_by_gicon:
|
* gtk_icon_theme_lookup_by_gicon:
|
||||||
* @self: a #GtkIconTheme
|
* @self: a `GtkIconTheme`
|
||||||
* @icon: the #GIcon to look up
|
* @icon: the `GIcon` to look up
|
||||||
* @size: desired icon size
|
* @size: desired icon size
|
||||||
* @scale: the desired scale
|
* @scale: the desired scale
|
||||||
* @direction: text direction the icon will be displayed in
|
* @direction: text direction the icon will be displayed in
|
||||||
* @flags: flags modifying the behavior of the icon lookup
|
* @flags: flags modifying the behavior of the icon lookup
|
||||||
*
|
*
|
||||||
* Looks up a icon for a desired size and window scale, returning a
|
* Looks up a icon for a desired size and window scale.
|
||||||
* #GtkIconPaintable. The icon can then be rendered by using it as a #GdkPaintable,
|
*
|
||||||
|
* The icon can then be rendered by using it as a `GdkPaintable`,
|
||||||
* or you can get information such as the filename and size.
|
* or you can get information such as the filename and size.
|
||||||
*
|
*
|
||||||
* Returns: (transfer full): a #GtkIconPaintable containing
|
* Returns: (transfer full): a `GtkIconPaintable` containing
|
||||||
* information about the icon. Unref with g_object_unref()
|
* information about the icon. Unref with g_object_unref()
|
||||||
*/
|
*/
|
||||||
GtkIconPaintable *
|
GtkIconPaintable *
|
||||||
@ -4140,9 +4156,9 @@ gtk_icon_theme_lookup_by_gicon (GtkIconTheme *self,
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* gtk_icon_theme_get_display:
|
* gtk_icon_theme_get_display:
|
||||||
* @self: a #GtkIconTheme
|
* @self: a `GtkIconTheme`
|
||||||
*
|
*
|
||||||
* Returns the display that the GtkIconTheme object was
|
* Returns the display that the `GtkIconTheme` object was
|
||||||
* created for.
|
* created for.
|
||||||
*
|
*
|
||||||
* Returns: (nullable) (transfer none): the display of @icon_theme
|
* Returns: (nullable) (transfer none): the display of @icon_theme
|
||||||
|
@ -47,7 +47,7 @@ typedef struct _GtkIconTheme GtkIconTheme;
|
|||||||
* @GTK_ICON_LOOKUP_PRELOAD: Starts loading the texture in the background
|
* @GTK_ICON_LOOKUP_PRELOAD: Starts loading the texture in the background
|
||||||
* so it is ready when later needed.
|
* so it is ready when later needed.
|
||||||
*
|
*
|
||||||
* Used to specify options for gtk_icon_theme_lookup_icon()
|
* Used to specify options for gtk_icon_theme_lookup_icon().
|
||||||
*/
|
*/
|
||||||
typedef enum
|
typedef enum
|
||||||
{
|
{
|
||||||
@ -68,7 +68,7 @@ typedef enum
|
|||||||
* @GTK_ICON_THEME_NOT_FOUND: The icon specified does not exist in the theme
|
* @GTK_ICON_THEME_NOT_FOUND: The icon specified does not exist in the theme
|
||||||
* @GTK_ICON_THEME_FAILED: An unspecified error occurred.
|
* @GTK_ICON_THEME_FAILED: An unspecified error occurred.
|
||||||
*
|
*
|
||||||
* Error codes for GtkIconTheme operations.
|
* Error codes for `GtkIconTheme` operations.
|
||||||
**/
|
**/
|
||||||
typedef enum {
|
typedef enum {
|
||||||
GTK_ICON_THEME_NOT_FOUND,
|
GTK_ICON_THEME_NOT_FOUND,
|
||||||
|
Loading…
Reference in New Issue
Block a user