]> Pileus Git - ~andy/gtk/blob - gtk/gtkmenutoolbutton.h
stylecontext: Do invalidation on first resize container
[~andy/gtk] / gtk / gtkmenutoolbutton.h
1 /* GTK - The GIMP Toolkit
2  *
3  * Copyright (C) 2003 Ricardo Fernandez Pascual
4  * Copyright (C) 2004 Paolo Borelli
5  *
6  * This library is free software; you can redistribute it and/or
7  * modify it under the terms of the GNU Lesser General Public
8  * License as published by the Free Software Foundation; either
9  * version 2 of the License, or (at your option) any later version.
10  *
11  * This library is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
14  * Lesser General Public License for more details.
15  *
16  * You should have received a copy of the GNU Lesser General Public
17  * License along with this library. If not, see <http://www.gnu.org/licenses/>.
18  */
19
20 #ifndef __GTK_MENU_TOOL_BUTTON_H__
21 #define __GTK_MENU_TOOL_BUTTON_H__
22
23 #if !defined (__GTK_H_INSIDE__) && !defined (GTK_COMPILATION)
24 #error "Only <gtk/gtk.h> can be included directly."
25 #endif
26
27 #include <gtk/gtkmenu.h>
28 #include <gtk/gtktoolbutton.h>
29
30 G_BEGIN_DECLS
31
32 #define GTK_TYPE_MENU_TOOL_BUTTON         (gtk_menu_tool_button_get_type ())
33 #define GTK_MENU_TOOL_BUTTON(o)           (G_TYPE_CHECK_INSTANCE_CAST ((o), GTK_TYPE_MENU_TOOL_BUTTON, GtkMenuToolButton))
34 #define GTK_MENU_TOOL_BUTTON_CLASS(k)     (G_TYPE_CHECK_CLASS_CAST((k), GTK_TYPE_MENU_TOOL_BUTTON, GtkMenuToolButtonClass))
35 #define GTK_IS_MENU_TOOL_BUTTON(o)        (G_TYPE_CHECK_INSTANCE_TYPE ((o), GTK_TYPE_MENU_TOOL_BUTTON))
36 #define GTK_IS_MENU_TOOL_BUTTON_CLASS(k)  (G_TYPE_CHECK_CLASS_TYPE ((k), GTK_TYPE_MENU_TOOL_BUTTON))
37 #define GTK_MENU_TOOL_BUTTON_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), GTK_TYPE_MENU_TOOL_BUTTON, GtkMenuToolButtonClass))
38
39 typedef struct _GtkMenuToolButtonClass   GtkMenuToolButtonClass;
40 typedef struct _GtkMenuToolButton        GtkMenuToolButton;
41 typedef struct _GtkMenuToolButtonPrivate GtkMenuToolButtonPrivate;
42
43 struct _GtkMenuToolButton
44 {
45   GtkToolButton parent;
46
47   /*< private >*/
48   GtkMenuToolButtonPrivate *priv;
49 };
50
51 struct _GtkMenuToolButtonClass
52 {
53   GtkToolButtonClass parent_class;
54
55   void (*show_menu) (GtkMenuToolButton *button);
56
57   /* Padding for future expansion */
58   void (*_gtk_reserved1) (void);
59   void (*_gtk_reserved2) (void);
60   void (*_gtk_reserved3) (void);
61   void (*_gtk_reserved4) (void);
62 };
63
64 GType         gtk_menu_tool_button_get_type       (void) G_GNUC_CONST;
65 GtkToolItem  *gtk_menu_tool_button_new            (GtkWidget   *icon_widget,
66                                                    const gchar *label);
67 GtkToolItem  *gtk_menu_tool_button_new_from_stock (const gchar *stock_id);
68
69 void          gtk_menu_tool_button_set_menu       (GtkMenuToolButton *button,
70                                                    GtkWidget         *menu);
71 GtkWidget    *gtk_menu_tool_button_get_menu       (GtkMenuToolButton *button);
72 void          gtk_menu_tool_button_set_arrow_tooltip_text   (GtkMenuToolButton *button,
73                                                              const gchar       *text);
74 void          gtk_menu_tool_button_set_arrow_tooltip_markup (GtkMenuToolButton *button,
75                                                              const gchar       *markup);
76
77 G_END_DECLS
78
79 #endif /* __GTK_MENU_TOOL_BUTTON_H__ */