ruby-****@sourc*****
ruby-****@sourc*****
2005年 3月 7日 (月) 20:48:40 JST
------------------------- REMOTE_ADDR = 202.96.19.49 REMOTE_HOST = REMOTE_USER = ruby-gnome2-hiki URL = http://ruby-gnome2.sourceforge.jp/cgi-bin/hiki/hiki.cgi?Gtk%3A%3AIconTheme ------------------------- @@ -22,7 +22,6 @@ puts "Couldn't load icon: #{e.message}" end - == Object Hierarchy * Object * GLib::Instantiatable @@ -31,118 +30,117 @@ == Class Methods --- Gtk::IconTheme.new - Creates a new icon theme object. Icon theme objects are used to lookup up an icon by name in a particular icon theme. Usually, you'll want to use Gtk::IconTheme.default or Gtk::IconTheme.get_for_screen rather than creating a new icon theme object for scratch. + Creates a new icon theme object. Icon theme objects are used to lookup up an icon by name in a particular icon theme. Usually, you'll want to use Gtk::IconTheme.default or Gtk::IconTheme.get_for_screen rather than creating a new icon theme object for scratch. ((* Since 2.4 *)) * Returns: the newly created Gtk::IconTheme object. --- Gtk::IconTheme.default - Gets the icon theme for the default screen. See Gtk::IconThem.get_for_screen. + Gets the icon theme for the default screen. See Gtk::IconThem.get_for_screen. ((* Since 2.4 *)) * Returns: A unique Gtk::IconTheme associated with the default screen. This icon theme is associated with the screen and can be used as long as the screen is open. --- Gtk::IconTheme.get_for_screen(screen) - Gets the icon theme object associated with screen; if this function has not previously been called for the given screen, a new icon theme object will be created and associated with the screen. Icon theme objects are fairly expensive to create, so using this method is usually a better choice than calling than Gtk::IconTheme.new and setting the screen yourself; by using this method a single icon theme object will be shared between users. + Gets the icon theme object associated with screen; if this function has not previously been called for the given screen, a new icon theme object will be created and associated with the screen. Icon theme objects are fairly expensive to create, so using this method is usually a better choice than calling than Gtk::IconTheme.new and setting the screen yourself; by using this method a single icon theme object will be shared between users. ((* Since 2.4 *)) * screen: a Gdk::Screen * Returns: A unique Gtk::IconTheme associated with the given screen. This icon theme is associated with the screen and can be used as long as the screen is open --- Gtk::IconTheme.add_builtin_icon(icon_name, size, pixbuf) Registers a built-in icon for icon theme lookups. The idea of built-in icons is to allow an application or library that uses themed icons to function requiring files to be present in the file system. For instance, the default images for all of GTK+'s stock icons are registered as built-icons. In general, if you use Gtk::IconTheme.add_builtin_icon you should also install the icon in the icon theme, so that the icon is generally available. - This method will generally be used with pixbufs loaded via Gdk::Pixbuf.new(data, copy_pixels). + This method will generally be used with pixbufs loaded via Gdk::Pixbuf.new(data, copy_pixels). ((* Since 2.4 *)) * size: the size at which to register the icon (different images can be registered for the same icon name at different sizes.) * pixbuf: Gdk::Pixbuf that contains the image to use for icon_name. * Returns: self == Instance Methods --- screen=(screen) - Sets the screen for an icon theme; the screen is used to track the user's currently configured icon theme, which might be different for different screens. + Sets the screen for an icon theme; the screen is used to track the user's currently configured icon theme, which might be different for different screens. ((* Since 2.4 *)) * screen: a Gdk::Screen * Returns: screen --- set_screen(screen) - Same as screen=. + Same as screen=. ((* Since 2.4 *)) * screen: a Gdk::Screen * Returns: self --- search_path - Gets the current search path. See Gtk::IconTheme#search_path=. + Gets the current search path. See Gtk::IconTheme#search_path=. ((* Since 2.4 *)) * Returns: an Array of icon theme path directories(String). --- search_path=(paths) Sets the search path for the icon theme object. 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. (Themes from multiple of the path elements are combined to allow themes to be extended by adding icons in the user's home directory.) - In addition if an icon found isn't found either in the current icon theme or the default icon theme, and an image file with the right name is found directly in one of the elements of path, then that image will be used for the icon name. (This is legacy feature, and new icons should be put into the default icon theme, which is called DEFAULT_THEME_NAME, rather than directly on the icon path.) + In addition if an icon found isn't found either in the current icon theme or the default icon theme, and an image file with the right name is found directly in one of the elements of path, then that image will be used for the icon name. (This is legacy feature, and new icons should be put into the default icon theme, which is called DEFAULT_THEME_NAME, rather than directly on the icon path.) ((* Since 2.4 *)) * paths: an Array of directories(String) that are searched for icon themes * Returns: paths --- set_search_path(paths) - Same as search_path=. + Same as search_path=. ((* Since 2.4 *)) * paths: an Array of directories(String) that are searched for icon themes * Returns: self --- append_search_path(path) - Appends a directory to the search path. See Gtk::IconTheme#search_path=. + Appends a directory to the search path. See Gtk::IconTheme#search_path=. ((* Since 2.4 *)) * path: A directory name(String) to append to the icon path * Returns: self --- prepend_search_path(path) - Prepends a directory to the search path. See Gtk::IconTheme#search_path=. + Prepends a directory to the search path. See Gtk::IconTheme#search_path=. ((* Since 2.4 *)) * path: A directory name(String) to append to the icon path * Returns: self --- custom_theme=(theme_name) - Sets the name of the icon theme that the Gtk::IconTheme object uses overriding system configuration. This method cannot be called on the icon theme objects returned from Gtk::IconTheme.default and Gtk::IconTheme.get_for_screen(screen). + Sets the name of the icon theme that the Gtk::IconTheme object uses overriding system configuration. This method cannot be called on the icon theme objects returned from Gtk::IconTheme.default and Gtk::IconTheme.get_for_screen(screen). ((* Since 2.4 *)) * theme_name: name of icon theme to use instead of configured theme * Returns: theme_name --- set_custom_theme(theme_name) - Same as custom_theme=. + Same as custom_theme=. ((* Since 2.4 *)) * theme_name: name of icon theme to use instead of configured theme * Returns: self --- has_icon?(icon_name) - Checks whether an icon theme includes an icon for a particular name. + Checks whether an icon theme includes an icon for a particular name. ((* Since 2.4 *)) * icon_name: the name of an icon * Returns: true if icon_theme includes an icon for icon_name. --- lookup_icon(icon_name, size, flags) - Looks up a named icon and returns a Gtk::IconInfo. The icon can then be rendered into a pixbuf using Gtk::IconInfo#load_icon. (Gtk::IconTheme#load_icon combines these two steps if all you need is the pixbuf.) + Looks up a named icon and returns a Gtk::IconInfo. The icon can then be rendered into a pixbuf using Gtk::IconInfo#load_icon. (Gtk::IconTheme#load_icon combines these two steps if all you need is the pixbuf.) ((* Since 2.4 *)) * icon_name: the name of the icon to lookup * size: desired icon size * flags: flags modifying the behavior of the icon lookup ((<GtkIconLookupFlags|Gtk::IconTheme#GtkIconLookupFlags>)) * Returns: a Gtk::IconInfo containing information about the icon, or nil if the icon wasn't found. --- load_icon(icon_name, flags) - Looks up an icon in an icon theme, scales it to the given size and renders it into a pixbuf. This is a convenience method; if more details about the icon are needed, use Gtk::IconTheme#lookup_icon followed by Gtk::IconInfo#load_icon. Gtk::IconThemeError is raised if failure. + Looks up an icon in an icon theme, scales it to the given size and renders it into a pixbuf. This is a convenience method; if more details about the icon are needed, use Gtk::IconTheme#lookup_icon followed by Gtk::IconInfo#load_icon. Gtk::IconThemeError is raised if failure. ((* Since 2.4 *)) * icon_name: the name of the icon to lookup * size: the desired icon size. The resulting icon may not be exactly this size; see Gtk::IconInfo#load_icon. * flags: flags modifying the behavior of the icon lookup ((<GtkIconLookupFlags|Gtk::IconTheme#GtkIconLookupFlags>)) * Returns: the rendered icon or nil; this may be a newly created icon or a new reference to an internal icon, so you must not modify the icon. --- icons(context = nil) - Lists the icons in the current icon theme. Only a subset of the icons can be listed by providing a context string. The set of values for the context string is system dependent, but will typically include such values as 'apps' and 'mimetypes'. + Lists the icons in the current icon theme. Only a subset of the icons can be listed by providing a context string. The set of values for the context string is system dependent, but will typically include such values as 'apps' and 'mimetypes'. ((* Since 2.4 *)) * context: a String identifying a particular type of icon, or nil to list all icons. * Returns: an Array holding the names of all the icons in the theme. --- get_icon_sizes(icon_name) - Returns an Array of Integers describing the sizes at which the icon is available without scaling. A size of -1 means that the icon is available in a scalable format. + Returns an Array of Integers describing the sizes at which the icon is available without scaling. A size of -1 means that the icon is available in a scalable format. ((* Since 2.6 *)) * icon_name: the name of an icon * Returns: An Array describing the sizes at which the icon is available. --- example_icon_name - Gets the name of an icon that is representative of the current theme (for instance, to use when presenting a list of themes to the user.) + Gets the name of an icon that is representative of the current theme (for instance, to use when presenting a list of themes to the user.) ((* Since 2.4 *)) * Returns: the name of an example icon or nil --- rescan_if_needed - Checks to see if the icon theme has changed; if it has, any currently cached information is discarded and will be reloaded next time icon_theme is accessed. + Checks to see if the icon theme has changed; if it has, any currently cached information is discarded and will be reloaded next time icon_theme is accessed. ((* Since 2.4 *)) * Returns: true if the icon theme has changed and needed to be reloaded. == Constants === GtkIconLookupFlags -Used to specify options for Gtk::IconTheme#lookup_icon. +Used to specify options for Gtk::IconTheme#lookup_icon. ((* Since 2.4 *)) --- LOOKUP_NO_SVG - Never return SVG icons, even if gdk-pixbuf supports them. Cannot be used together with Gtk::IconTheme::LOOKUP_FORCE_SVG. + Never return SVG icons, even if gdk-pixbuf supports them. Cannot be used together with Gtk::IconTheme::LOOKUP_FORCE_SVG. ((* Since 2.4 *)) --- LOOKUP_FORCE_SVG - Return SVG icons, even if gdk-pixbuf doesn't support them. Cannot be used together with Gtk::IconTheme::LOOKUP_NO_SVG. + Return SVG icons, even if gdk-pixbuf doesn't support them. Cannot be used together with Gtk::IconTheme::LOOKUP_NO_SVG. ((* Since 2.4 *)) --- LOOKUP_USE_BUILTIN - When passed to Gtk::IconTheme#lookup_icon includes builtin icons as well as files. For a builtin icon, Gtk::IconInfo#filename returns nil and you need to call Gtk::IconInfo#builtin_pixbuf. + When passed to Gtk::IconTheme#lookup_icon includes builtin icons as well as files. For a builtin icon, Gtk::IconInfo#filename returns nil and you need to call Gtk::IconInfo#builtin_pixbuf. ((* Since 2.4 *)) == Signals --- changed: self - Emitted when the current icon theme is switched or GTK+ detects that a change has occurred in the contents of the current icon theme. + Emitted when the current icon theme is switched or GTK+ detects that a change has occurred in the contents of the current icon theme. ((* Since 2.4 *)) * self: Gtk::IconTheme == ChangeLog