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
30G_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
39typedef struct _GtkMenuToolButtonClass GtkMenuToolButtonClass;
40typedef struct _GtkMenuToolButton GtkMenuToolButton;
41typedef struct _GtkMenuToolButtonPrivate GtkMenuToolButtonPrivate;
42
43struct _GtkMenuToolButton
44{
45 GtkToolButton parent;
46
47 /*< private >*/
48 GtkMenuToolButtonPrivate *priv;
49};
50
51/**
52 * GtkMenuToolButtonClass:
53 * @parent_class: The parent class.
54 * @show_menu: Signal emitted before the menu is shown.
55 */
56struct _GtkMenuToolButtonClass
57{
58 GtkToolButtonClass parent_class;
59
60 /*< public >*/
61
62 void (*show_menu) (GtkMenuToolButton *button);
63
64 /*< private >*/
65
66 /* Padding for future expansion */
67 void (*_gtk_reserved1) (void);
68 void (*_gtk_reserved2) (void);
69 void (*_gtk_reserved3) (void);
70 void (*_gtk_reserved4) (void);
71};
72
73GDK_AVAILABLE_IN_ALL
74GType gtk_menu_tool_button_get_type (void) G_GNUC_CONST;
75GDK_AVAILABLE_IN_ALL
76GtkToolItem *gtk_menu_tool_button_new (GtkWidget *icon_widget,
77 const gchar *label);
78GDK_DEPRECATED_IN_3_10_FOR(gtk_menu_tool_button_new)
79GtkToolItem *gtk_menu_tool_button_new_from_stock (const gchar *stock_id);
80
81GDK_AVAILABLE_IN_ALL
82void gtk_menu_tool_button_set_menu (GtkMenuToolButton *button,
83 GtkWidget *menu);
84GDK_AVAILABLE_IN_ALL
85GtkWidget *gtk_menu_tool_button_get_menu (GtkMenuToolButton *button);
86GDK_AVAILABLE_IN_ALL
87void gtk_menu_tool_button_set_arrow_tooltip_text (GtkMenuToolButton *button,
88 const gchar *text);
89GDK_AVAILABLE_IN_ALL
90void gtk_menu_tool_button_set_arrow_tooltip_markup (GtkMenuToolButton *button,
91 const gchar *markup);
92
93G_END_DECLS
94
95#endif /* __GTK_MENU_TOOL_BUTTON_H__ */
96