]> Pileus Git - ~andy/gtk/blob - gtk/gtktoolitem.h
fix a type check, (#116947, Krasimir Angelov)
[~andy/gtk] / gtk / gtktoolitem.h
1 /* gtktoolitem.c
2  *
3  * Copyright (C) 2002 Anders Carlsson <andersca@codefactory.se>
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 #ifndef __GTK_TOOL_ITEM_H__
24 #define __GTK_TOOL_ITEM_H__
25
26 #include <gtk/gtkbin.h>
27 #include <gtk/gtktooltips.h>
28 #include <gtk/gtkmenuitem.h>
29
30 #define GTK_TYPE_TOOL_ITEM            (gtk_tool_item_get_type ())
31 #define GTK_TOOL_ITEM(o)              (G_TYPE_CHECK_INSTANCE_CAST ((o), GTK_TYPE_TOOL_ITEM, GtkToolItem))
32 #define GTK_TOOL_ITEM_CLASS(klass)    (G_TYPE_CHECK_CLASS_CAST ((klass), GTK_TYPE_TOOL_ITEM, GtkToolItemClass))
33 #define GTK_IS_TOOL_ITEM(o)           (G_TYPE_CHECK_INSTANCE_TYPE ((o), GTK_TYPE_TOOL_ITEM))
34 #define GTK_IS_TOOL_ITEM_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((o), GTK_TYPE_TOOL_ITEM))
35 #define GTK_TOOL_ITEM_GET_CLASS(o)    (G_TYPE_INSTANCE_GET_CLASS((o), GTK_TYPE_TOOL_ITEM, GtkToolItemClass))
36 #define GTK_TOOL_ITEM_GET_PRIVATE(o)  (G_TYPE_INSTANCE_GET_PRIVATE ((o), GTK_TYPE_TOOL_ITEM, GtkToolItemPrivate))
37
38 typedef struct _GtkToolItem        GtkToolItem;
39 typedef struct _GtkToolItemClass   GtkToolItemClass;
40 typedef struct _GtkToolItemPrivate GtkToolItemPrivate;
41
42 struct _GtkToolItem
43 {
44   GtkBin parent;
45
46   GtkToolItemPrivate *priv;
47 };
48
49 struct _GtkToolItemClass
50 {
51   GtkBinClass parent_class;
52
53   /* signals */
54   gboolean   (* create_menu_proxy)    (GtkToolItem *tool_item);
55   void       (* toolbar_reconfigured) (GtkToolItem *tool_item);
56   gboolean   (* set_tooltip)          (GtkToolItem *tool_item,
57                                        GtkTooltips *tooltips,
58                                        const gchar *tip_text,
59                                        const gchar *tip_private);
60 };
61
62 GType        gtk_tool_item_get_type (void);
63 GtkToolItem *gtk_tool_item_new      (void);
64
65 void            gtk_tool_item_toolbar_reconfigured     (GtkToolItem *tool_item);
66
67 void            gtk_tool_item_set_homogeneous          (GtkToolItem *tool_item,
68                                                         gboolean     homogeneous);
69 gboolean        gtk_tool_item_get_homogeneous          (GtkToolItem *tool_item);
70
71 void            gtk_tool_item_set_expand               (GtkToolItem *tool_item,
72                                                         gboolean     expand);
73 gboolean        gtk_tool_item_get_expand               (GtkToolItem *tool_item);
74
75 void            gtk_tool_item_set_pack_end             (GtkToolItem *tool_item,
76                                                         gboolean     pack_end);
77 gboolean        gtk_tool_item_get_pack_end             (GtkToolItem *tool_item);
78
79 void            gtk_tool_item_set_tooltip              (GtkToolItem *tool_item,
80                                                         GtkTooltips *tooltips,
81                                                         const gchar *tip_text,
82                                                         const gchar *tip_private);
83
84 void            gtk_tool_item_set_use_drag_window      (GtkToolItem *toolitem,
85                                                         gboolean     use_drag_window);
86 gboolean        gtk_tool_item_get_use_drag_window      (GtkToolItem *toolitem);
87
88 void            gtk_tool_item_set_visible_horizontal   (GtkToolItem *toolitem,
89                                                         gboolean     visible_horizontal);
90 gboolean        gtk_tool_item_get_visible_horizontal   (GtkToolItem *toolitem);
91
92 void            gtk_tool_item_set_visible_vertical     (GtkToolItem *toolitem,
93                                                         gboolean     visible_horizontal);
94 gboolean        gtk_tool_item_get_visible_vertical     (GtkToolItem *toolitem);
95
96 GtkIconSize     gtk_tool_item_get_icon_size            (GtkToolItem *tool_item);
97 GtkOrientation  gtk_tool_item_get_orientation          (GtkToolItem *tool_item);
98 GtkToolbarStyle gtk_tool_item_get_toolbar_style        (GtkToolItem *tool_item);
99 GtkReliefStyle  gtk_tool_item_get_relief_style         (GtkToolItem *tool_item);
100
101 GtkWidget *     gtk_tool_item_retrieve_proxy_menu_item (GtkToolItem *tool_item);
102 GtkWidget *     gtk_tool_item_get_proxy_menu_item      (GtkToolItem *tool_item,
103                                                         const gchar *menu_item_id);
104 void            gtk_tool_item_set_proxy_menu_item      (GtkToolItem *tool_item,
105                                                         const gchar *menu_item_id,
106                                                         GtkWidget   *menu_item);
107
108 /* internal function */
109 GdkWindow *_gtk_tool_item_get_drag_window (GtkToolItem *tool_item);
110
111
112 #endif /* __GTK_TOOL_ITEM_H__ */