summaryrefslogtreecommitdiff
path: root/gtk/gtkstock.c
diff options
context:
space:
mode:
authorJavier Jardón <jjardon@gnome.org>2009-11-08 07:04:37 +0100
committerJavier Jardón <jjardon@gnome.org>2009-11-28 03:05:09 +0100
commit2040547d967550b3debc928c16113ec3f83b7650 (patch)
treea2760b6f3fe51bf1783f87fb5920b419e9d34241 /gtk/gtkstock.c
parent869ee7f232d2afcf2c08003e4f279e21b58b9581 (diff)
downloadgtk+-2040547d967550b3debc928c16113ec3f83b7650.tar.gz
Move documentation to inline comments: GtkStock
https://bugzilla.gnome.org/show_bug.cgi?id=597865
Diffstat (limited to 'gtk/gtkstock.c')
-rw-r--r--gtk/gtkstock.c25
1 files changed, 25 insertions, 0 deletions
diff --git a/gtk/gtkstock.c b/gtk/gtkstock.c
index f896dec8f5..dfff951ba8 100644
--- a/gtk/gtkstock.c
+++ b/gtk/gtkstock.c
@@ -34,6 +34,31 @@
#include <gdk/gdkkeysyms.h>
#include "gtkalias.h"
+/**
+ * SECTION:gtkstock
+ * @Short_description:
+Prebuilt common menu/toolbar items and corresponding icons
+ * @Title: Stock Items
+ *
+ * Stock items represent commonly-used menu or toolbar items such as
+ * "Open" or "Exit". Each stock item is identified by a stock ID;
+ * stock IDs are just strings, but macros such as #GTK_STOCK_OPEN are
+ * provided to avoid typing mistakes in the strings.
+ * Applications can register their own stock items in addition to those
+ * built-in to GTK+.
+ *
+ * Each stock ID can be associated with a #GtkStockItem, which contains
+ * the user-visible label, keyboard accelerator, and translation domain
+ * of the menu or toolbar item; and/or with an icon stored in a
+ * #GtkIconFactory. See <link
+ * linkend="gtk-Themeable-Stock-Images">GtkIconFactory</link> for
+ * more information on stock icons. The connection between a
+ * #GtkStockItem and stock icons is purely conventional (by virtue of
+ * using the same stock ID); it's possible to register a stock item but
+ * no icon, and vice versa. Stock icons may have a RTL variant which gets
+ * used for right-to-left locales.
+ */
+
static GHashTable *translate_hash = NULL;
static GHashTable *stock_hash = NULL;
static void init_stock_hash (void);