From 1cea948a37bcd55d19dccbe17af7820e2de73be2 Mon Sep 17 00:00:00 2001 From: John Luke Date: Wed, 8 Dec 2004 19:24:38 +0000 Subject: [PATCH] 2004-12-08 John Luke * en/Gtk/IconLookupFlags.xml * en/Gtk/IconInfo.xml * en/Gtk/IconTheme.xml * en/Gtk/IconThemeError.xml: doc these svn path=/trunk/gtk-sharp/; revision=37410 --- doc/ChangeLog | 7 ++ doc/en/Gtk/IconInfo.xml | 75 ++++++++------- doc/en/Gtk/IconLookupFlags.xml | 10 +- doc/en/Gtk/IconTheme.xml | 167 ++++++++++++++++++++------------- doc/en/Gtk/IconThemeError.xml | 8 +- 5 files changed, 158 insertions(+), 109 deletions(-) diff --git a/doc/ChangeLog b/doc/ChangeLog index a604b8493..06cba8201 100644 --- a/doc/ChangeLog +++ b/doc/ChangeLog @@ -1,3 +1,10 @@ +2004-12-08 John Luke + + * en/Gtk/IconLookupFlags.xml + * en/Gtk/IconInfo.xml + * en/Gtk/IconTheme.xml + * en/Gtk/IconThemeError.xml: doc these + 2004-12-08 Mike Kestner * en/Art/Affine.xml : some s/int/bool changes. diff --git a/doc/en/Gtk/IconInfo.xml b/doc/en/Gtk/IconInfo.xml index 931d8ac45..24162aa3f 100644 --- a/doc/en/Gtk/IconInfo.xml +++ b/doc/en/Gtk/IconInfo.xml @@ -9,8 +9,8 @@ Gtk# is thread aware, but not thread safe; See the Gtk# Thread Programming for details. - To be added - To be added + Contains information found when looking up an icon in an icon theme. + GLib.Opaque @@ -33,11 +33,11 @@ - To be added + Fetches the set of attach points for an icon. a a - a - To be added + a , if there are any attach points for the icon. + An attach point is a location in the icon that can be used as anchor points for attaching emblems or overlays to the icon. @@ -48,8 +48,8 @@ - To be added - To be added + Free a and associated information + @@ -62,10 +62,10 @@ - To be added - a - a - To be added + Gets the coordinates of a rectangle within the icon that can be used for display of information such as a preview of the contents of a text file. + a in which to store embedded rectangle coordinates; coordinates are only stored when this function returns . + a , if the icon has an embedded rectangle + See for further information about the coordinate system. @@ -76,9 +76,9 @@ - To be added - a - To be added + Renders an icon previously looked up in an icon theme using + a , the rendered icon + The size will be based on the size passed to . Note that the resulting pixbuf may not be exactly this size; an icon theme may have icons that differ slightly from their nominal sizes, and in addition Gtk will avoid scaling icons that it considers sufficiently close to the requested size or for which the source image would have to be scaled up too far. (This maintains sharpness.) @@ -89,9 +89,9 @@ - To be added + Make a copy of a . a - To be added + @@ -102,10 +102,10 @@ - To be added + Internal constructor a a - To be added + @@ -116,9 +116,9 @@ - To be added + GType Property. a - To be added + Returns the native value for . @@ -129,9 +129,9 @@ - To be added - a - To be added + Gets the filename for the icon. + a , the filename for the icon, or + If the flag was passed to , there may be no filename if a builtin icon is returned; in this case, you should use . @@ -142,9 +142,9 @@ - To be added - a - To be added + Gets the display name for an icon. + a , the display name for the icon or , if the icon does not have a specified display name. + A display name is a string to be used in place of the icon name in a user visible context like a list of icons. @@ -155,9 +155,9 @@ - To be added - a - To be added + Gets the built-in image for this icon, if any. + a , the built-in image pixbuf, or . + To allow Gtk to use built in icon images, you must pass the to . @@ -168,9 +168,9 @@ - To be added - a - To be added + Gets the base size for the icon. + a , the base size, or 0, if no base size is known for the icon. + The base size is a size for the icon that was specified by the icon theme creator. This may be different than the actual size of image; an example of this is small emblem icons that can be attached to a larger icon. These icons will be given the same base size as the larger icons to which they are attached. @@ -180,9 +180,16 @@ System.Boolean - To be added + Sets whether the coordinates returned by and should be returned in their original form as specified in the icon theme, instead of scaled appropriately for the pixbuf returned by . a - To be added + + +Raw coordinates are somewhat strange; they are specified to be with respect to the unscaled pixmap for PNG and XPM icons, but for SVG icons, they are in a 1000x1000 coordinate space that is scaled to the final size of the icon. You can determine if the icon is an SVG icon by using , and seeing if it is non- and ends in '.svg'. + + +This function is provided primarily to allow compatibility wrappers for older API's, and is not expected to be useful for applications. + + diff --git a/doc/en/Gtk/IconLookupFlags.xml b/doc/en/Gtk/IconLookupFlags.xml index 594940e6a..b439c4623 100644 --- a/doc/en/Gtk/IconLookupFlags.xml +++ b/doc/en/Gtk/IconLookupFlags.xml @@ -9,8 +9,8 @@ Gtk# is thread aware, but not thread safe; See the Gtk# Thread Programming for details. - To be added - To be added + Used to specify options for + System.Enum @@ -41,7 +41,7 @@ - To be added + Never return SVG icons, even if gdk-pixbuf supports them. Cannot be used together with . To be added @@ -54,7 +54,7 @@ - To be added + Return SVG icons, even if gdk-pixbuf does not support them. Cannot be used together with . To be added @@ -67,7 +67,7 @@ - To be added + When passed to includes builtin icons as well as files. For a builtin icon, returns and you need to call . To be added diff --git a/doc/en/Gtk/IconTheme.xml b/doc/en/Gtk/IconTheme.xml index e0ad461a4..2028a486f 100644 --- a/doc/en/Gtk/IconTheme.xml +++ b/doc/en/Gtk/IconTheme.xml @@ -9,8 +9,29 @@ Gtk# is thread aware, but not thread safe; See the Gtk# Thread Programming for details. - To be added - To be added + Looks up icons by name + + + provides a facility for looking up icons by name and size. 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 selected by the user. The operation of icon themes on Linux and Unix follows the Icon Theme Specification. There is a default icon theme, named hicolor where applications should install their icons, but more additional application themes can be installed as operating system vendors and users choose. + + +Named icons are similar to the Themeable Stock Images(3) facility, and the distinction between the two may be a bit confusing. A few things to keep in mind: + + + Stock images usually are used in conjunction with Stock Items(3)., such as or . Named icons are easier to set up and therefore are more useful for new icons that an application wants to add, such as application icons or window icons. + + + + Stock images can only be loaded at the symbolic sizes defined by the enumeration, or by custom sizes defined by , while named icons are more flexible and any pixel size can be specified. + + + Because stock images are closely tied to stock items, and thus to actions in the user interface, stock images may come in multiple variants for different widget states or writing directions. + + + +A good rule of thumb is that if there is a stock image for what you want to use, use it, otherwise use a named icon. It turns out that internally stock images are generally defined in terms of one or more named icons. (An example of the more than one case is icons that depend on writing direction; uses the two themed icons "gtk-stock-go-forward-ltr" and "gtk-stock-go-forward-rtl".) + + GLib.Object @@ -35,10 +56,10 @@ - To be added + Gets the icon theme object associated with a - a - To be added + a . A unique associated with the given screen. This icon theme is associated with the screen and can be used as long as the screen is open. + 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 function is usually a better choice than calling than and setting the screen yourself; by using this function a single icon theme object will be shared between users. @@ -66,11 +87,18 @@ - To be added - a - a - a - To be added + Registers a built-in icon for icon theme lookups. + a , the name of the icon to register + a , the size at which to register the icon (different images can be registered for the same icon name at different sizes.) + a that contains the image to use for . + + +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 you should also install the icon in the icon theme, so that the icon is generally available. + + @@ -105,9 +133,9 @@ - To be added - a - To be added + Checks to see if the icon theme has changed; if it has, any currently cached information is discarded and will be reloaded next time the IconTheme is accessed. + a , if the icon theme has changed and needed to be reloaded. + @@ -120,10 +148,10 @@ - To be added - a - a - To be added + Checks whether an icon theme includes an icon for a particular name. + a , the name of an icon + a , if the IconTheme includes an icon for . + @@ -136,9 +164,9 @@ - To be added - a - To be added + Prepends a directory to the search path. + a , directory name to prepend to the icon path + See . @@ -151,9 +179,9 @@ - To be added - a - To be added + Appends a directory to the search path. + a , directory name to append to the icon path + See . @@ -166,9 +194,16 @@ - To be added - a - To be added + Sets the current search path. + a , array of directories that are searched for icon themes + + +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 is not 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 a 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.) + + @@ -183,12 +218,12 @@ - To be added - a - a - a - a - To be added + Looks up a named icon and returns a structure containing information such as the filename of the icon. + a , the name of the icon to lookup + a , desired icon size + a , flags modifying the behavior of the icon lookup + a containing information about the icon, or if the icon was not found. + The icon can then be rendered into a pixbuf using . ( combines these two steps if all you need is the pixbuf.) @@ -203,12 +238,12 @@ - To be added - a - a - a - a - To be added + Looks up an icon in an icon theme, scales it to the given size and renders it into a pixbuf. + a , the name of the icon to lookup + a , the desired icon size. The resulting icon may not be exactly this size; see . + a , flags modifying the behavior of the icon lookup + a the rendered icon or if the icon is not found. + This is a convenience function; if more details about the icon are needed, use followed by . @@ -221,10 +256,10 @@ - To be added - a - a - To be added + Lists the icons in the current icon theme. + a , a string identifying a particular type of icon, or to list all icons. + a holding the names of all the icons in the 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'. @@ -235,10 +270,10 @@ - To be added + Internal constructor. a a - To be added + @@ -249,10 +284,10 @@ - To be added + Internal constructor. a a - To be added + @@ -261,9 +296,9 @@ - To be added + Default constructor a - To be added + Icon theme objects are used to lookup up an icon by name in a particular icon theme. Usually, you will want to use or rather than creating a new icon theme object for scratch. @@ -274,9 +309,9 @@ - To be added - a - To be added + Gets the icon theme for the default screen. + a . A unique associated with the given screen. This icon theme is associated with the screen and can be used as long as the screen is open. + See . @@ -287,9 +322,9 @@ - To be added + GType Property. a - To be added + Returns the native value for . @@ -299,9 +334,9 @@ Gdk.Screen - To be added + Sets the screen for an icon theme a - To be added + The screen is used to track the user's currently configured icon theme, which might be different for different screens. @@ -311,9 +346,9 @@ System.String - To be added - a - To be added + Sets the name of the icon theme that the object uses overriding system configuration. + a , name of icon theme to use instead of configured theme + This cannot be used on the icon theme objects returned from . @@ -324,9 +359,9 @@ - To be added - a - To be added + 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.) + a , the name of an example icon or . + @@ -337,9 +372,9 @@ - To be added - a - To be added + The current search path + a , array of directories that are searched for icon themes + @@ -350,8 +385,8 @@ - To be added - To be added + Emitted when the current icon theme is switched or Gtk detects that a change has occurred in the contents of the current icon theme. + diff --git a/doc/en/Gtk/IconThemeError.xml b/doc/en/Gtk/IconThemeError.xml index a1e33f7e9..a091e83a7 100644 --- a/doc/en/Gtk/IconThemeError.xml +++ b/doc/en/Gtk/IconThemeError.xml @@ -9,8 +9,8 @@ Gtk# is thread aware, but not thread safe; See the Gtk# Thread Programming for details. - To be added - To be added + Error codes for operations. + System.Enum @@ -37,7 +37,7 @@ - To be added + The icon specified does not exist in the theme To be added @@ -50,7 +50,7 @@ - To be added + An unspecified error occurred. To be added