]> Pileus Git - ~andy/gtk/blob - gtk/gtktoolitem.h
Bug 457086 - numpad does not work when the Thai-Lao input method is used
[~andy/gtk] / gtk / gtktoolitem.h
1 /* gtktoolitem.c
2  *
3  * Copyright (C) 2002 Anders Carlsson <andersca@gnome.org>
4  * Copyright (C) 2002 James Henstridge <james@daa.com.au>
5  * Copyright (C) 2003 Soeren Sandmann <sandmann@daimi.au.dk>
6  *
7  * This library is free software; you can redistribute it and/or
8  * modify it under the terms of the GNU Lesser General Public
9  * License as published by the Free Software Foundation; either
10  * version 2 of the License, or (at your option) any later version.
11  *
12  * This library is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
15  * Lesser General Public License for more details.
16  *
17  * You should have received a copy of the GNU Lesser General Public
18  * License along with this library; if not, write to the
19  * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
20  * Boston, MA 02111-1307, USA.
21  */
22
23 #if defined(GTK_DISABLE_SINGLE_INCLUDES) && !defined (__GTK_H_INSIDE__) && !defined (GTK_COMPILATION)
24 #error "Only <gtk/gtk.h> can be included directly."
25 #endif
26
27 #ifndef __GTK_TOOL_ITEM_H__
28 #define __GTK_TOOL_ITEM_H__
29
30 #include <gtk/gtkbin.h>
31 #include <gtk/gtktooltips.h>
32 #include <gtk/gtkmenuitem.h>
33
34 G_BEGIN_DECLS
35
36 #define GTK_TYPE_TOOL_ITEM            (gtk_tool_item_get_type ())
37 #define GTK_TOOL_ITEM(o)              (G_TYPE_CHECK_INSTANCE_CAST ((o), GTK_TYPE_TOOL_ITEM, GtkToolItem))
38 #define GTK_TOOL_ITEM_CLASS(klass)    (G_TYPE_CHECK_CLASS_CAST ((klass), GTK_TYPE_TOOL_ITEM, GtkToolItemClass))
39 #define GTK_IS_TOOL_ITEM(o)           (G_TYPE_CHECK_INSTANCE_TYPE ((o), GTK_TYPE_TOOL_ITEM))
40 #define GTK_IS_TOOL_ITEM_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GTK_TYPE_TOOL_ITEM))
41 #define GTK_TOOL_ITEM_GET_CLASS(o)    (G_TYPE_INSTANCE_GET_CLASS((o), GTK_TYPE_TOOL_ITEM, GtkToolItemClass))
42
43 typedef struct _GtkToolItem        GtkToolItem;
44 typedef struct _GtkToolItemClass   GtkToolItemClass;
45 typedef struct _GtkToolItemPrivate GtkToolItemPrivate;
46
47 struct _GtkToolItem
48 {
49   GtkBin parent;
50
51   /*< private >*/
52   GtkToolItemPrivate *GSEAL (priv);
53 };
54
55 struct _GtkToolItemClass
56 {
57   GtkBinClass parent_class;
58
59   /* signals */
60   gboolean   (* create_menu_proxy)    (GtkToolItem *tool_item);
61   void       (* toolbar_reconfigured) (GtkToolItem *tool_item);
62 #ifndef GTK_DISABLE_DEPRECATED
63   gboolean   (* set_tooltip)          (GtkToolItem *tool_item,
64                                        GtkTooltips *tooltips,
65                                        const gchar *tip_text,
66                                        const gchar *tip_private);
67 #else
68   gpointer _set_tooltip;
69 #endif
70
71   /* Padding for future expansion */
72   void (* _gtk_reserved1) (void);
73   void (* _gtk_reserved2) (void);
74   void (* _gtk_reserved3) (void);
75   void (* _gtk_reserved4) (void);
76 };
77
78 GType        gtk_tool_item_get_type (void) G_GNUC_CONST;
79 GtkToolItem *gtk_tool_item_new      (void);
80
81 void            gtk_tool_item_set_homogeneous          (GtkToolItem *tool_item,
82                                                         gboolean     homogeneous);
83 gboolean        gtk_tool_item_get_homogeneous          (GtkToolItem *tool_item);
84
85 void            gtk_tool_item_set_expand               (GtkToolItem *tool_item,
86                                                         gboolean     expand);
87 gboolean        gtk_tool_item_get_expand               (GtkToolItem *tool_item);
88
89 #ifndef GTK_DISABLE_DEPRECATED
90 void            gtk_tool_item_set_tooltip              (GtkToolItem *tool_item,
91                                                         GtkTooltips *tooltips,
92                                                         const gchar *tip_text,
93                                                         const gchar *tip_private);
94 #endif /* GTK_DISABLE_DEPRECATED */
95 void            gtk_tool_item_set_tooltip_text         (GtkToolItem *tool_item,
96                                                         const gchar *text);
97 void            gtk_tool_item_set_tooltip_markup       (GtkToolItem *tool_item,
98                                                         const gchar *markup);
99
100 void            gtk_tool_item_set_use_drag_window      (GtkToolItem *tool_item,
101                                                         gboolean     use_drag_window);
102 gboolean        gtk_tool_item_get_use_drag_window      (GtkToolItem *tool_item);
103
104 void            gtk_tool_item_set_visible_horizontal   (GtkToolItem *tool_item,
105                                                         gboolean     visible_horizontal);
106 gboolean        gtk_tool_item_get_visible_horizontal   (GtkToolItem *tool_item);
107
108 void            gtk_tool_item_set_visible_vertical     (GtkToolItem *tool_item,
109                                                         gboolean     visible_vertical);
110 gboolean        gtk_tool_item_get_visible_vertical     (GtkToolItem *tool_item);
111
112 gboolean        gtk_tool_item_get_is_important         (GtkToolItem *tool_item);
113 void            gtk_tool_item_set_is_important         (GtkToolItem *tool_item,
114                                                         gboolean     is_important);
115
116 GtkIconSize     gtk_tool_item_get_icon_size            (GtkToolItem *tool_item);
117 GtkOrientation  gtk_tool_item_get_orientation          (GtkToolItem *tool_item);
118 GtkToolbarStyle gtk_tool_item_get_toolbar_style        (GtkToolItem *tool_item);
119 GtkReliefStyle  gtk_tool_item_get_relief_style         (GtkToolItem *tool_item);
120
121 GtkWidget *     gtk_tool_item_retrieve_proxy_menu_item (GtkToolItem *tool_item);
122 GtkWidget *     gtk_tool_item_get_proxy_menu_item      (GtkToolItem *tool_item,
123                                                         const gchar *menu_item_id);
124 void            gtk_tool_item_set_proxy_menu_item      (GtkToolItem *tool_item,
125                                                         const gchar *menu_item_id,
126                                                         GtkWidget   *menu_item);
127 void            gtk_tool_item_rebuild_menu             (GtkToolItem *tool_item);
128
129 void            gtk_tool_item_toolbar_reconfigured     (GtkToolItem *tool_item);
130
131 /* private */
132
133 gboolean       _gtk_tool_item_create_menu_proxy        (GtkToolItem *tool_item);
134
135 G_END_DECLS
136
137 #endif /* __GTK_TOOL_ITEM_H__ */