1/* GTK - The GIMP Toolkit
2 *
3 * Copyright (C) 2003 Ricardo Fernandez Pascual
4 * Copyright (C) 2004 Paolo Borelli
5 * Copyright (C) 2012 Bastien Nocera
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, see <http://www.gnu.org/licenses/>.
19 */
20
21#ifndef __GTK_MENU_BUTTON_H__
22#define __GTK_MENU_BUTTON_H__
23
24#if !defined (__GTK_H_INSIDE__) && !defined (GTK_COMPILATION)
25#error "Only <gtk/gtk.h> can be included directly."
26#endif
27
28#include <gtk/gtktogglebutton.h>
29#include <gtk/gtkmenu.h>
30#include <gtk/gtkpopover.h>
31
32G_BEGIN_DECLS
33
34#define GTK_TYPE_MENU_BUTTON (gtk_menu_button_get_type ())
35#define GTK_MENU_BUTTON(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GTK_TYPE_MENU_BUTTON, GtkMenuButton))
36#define GTK_MENU_BUTTON_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GTK_TYPE_MENU_BUTTON, GtkMenuButtonClass))
37#define GTK_IS_MENU_BUTTON(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GTK_TYPE_MENU_BUTTON))
38#define GTK_IS_MENU_BUTTON_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GTK_TYPE_MENU_BUTTON))
39#define GTK_MENU_BUTTON_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GTK_TYPE_MENU_BUTTON, GtkMenuButtonClass))
40
41typedef struct _GtkMenuButton GtkMenuButton;
42typedef struct _GtkMenuButtonClass GtkMenuButtonClass;
43typedef struct _GtkMenuButtonPrivate GtkMenuButtonPrivate;
44
45struct _GtkMenuButton
46{
47 GtkToggleButton parent;
48
49 /*< private >*/
50 GtkMenuButtonPrivate *priv;
51};
52
53struct _GtkMenuButtonClass
54{
55 GtkToggleButtonClass parent_class;
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
64GDK_AVAILABLE_IN_3_6
65GType gtk_menu_button_get_type (void) G_GNUC_CONST;
66GDK_AVAILABLE_IN_3_6
67GtkWidget *gtk_menu_button_new (void);
68
69GDK_AVAILABLE_IN_3_6
70void gtk_menu_button_set_popup (GtkMenuButton *menu_button,
71 GtkWidget *menu);
72GDK_AVAILABLE_IN_3_6
73GtkMenu *gtk_menu_button_get_popup (GtkMenuButton *menu_button);
74
75GDK_AVAILABLE_IN_3_12
76void gtk_menu_button_set_popover (GtkMenuButton *menu_button,
77 GtkWidget *popover);
78GDK_AVAILABLE_IN_3_12
79GtkPopover *gtk_menu_button_get_popover (GtkMenuButton *menu_button);
80
81GDK_AVAILABLE_IN_3_6
82void gtk_menu_button_set_direction (GtkMenuButton *menu_button,
83 GtkArrowType direction);
84GDK_AVAILABLE_IN_3_6
85GtkArrowType gtk_menu_button_get_direction (GtkMenuButton *menu_button);
86
87GDK_AVAILABLE_IN_3_6
88void gtk_menu_button_set_menu_model (GtkMenuButton *menu_button,
89 GMenuModel *menu_model);
90GDK_AVAILABLE_IN_3_6
91GMenuModel *gtk_menu_button_get_menu_model (GtkMenuButton *menu_button);
92
93GDK_AVAILABLE_IN_3_6
94void gtk_menu_button_set_align_widget (GtkMenuButton *menu_button,
95 GtkWidget *align_widget);
96GDK_AVAILABLE_IN_3_6
97GtkWidget *gtk_menu_button_get_align_widget (GtkMenuButton *menu_button);
98
99GDK_AVAILABLE_IN_3_12
100void gtk_menu_button_set_use_popover (GtkMenuButton *menu_button,
101 gboolean use_popover);
102
103GDK_AVAILABLE_IN_3_12
104gboolean gtk_menu_button_get_use_popover (GtkMenuButton *menu_button);
105
106
107G_END_DECLS
108
109#endif /* __GTK_MENU_BUTTON_H__ */
110

source code of include/gtk-3.0/gtk/gtkmenubutton.h