]> Pileus Git - ~andy/gtk/blob - gtk/gtkmenubutton.h
GtkMenuButton: rename _set_menu() to _set_popup()
[~andy/gtk] / gtk / gtkmenubutton.h
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 #if !defined (__GTK_H_INSIDE__) && !defined (GTK_COMPILATION)
22 #error "Only <gtk/gtk.h> can be included directly."
23 #endif
24
25 #ifndef __GTK_MENU_BUTTON_H__
26 #define __GTK_MENU_BUTTON_H__
27
28 #include <gtk/gtk.h>
29
30 G_BEGIN_DECLS
31
32 #define GTK_TYPE_MENU_BUTTON            (gtk_menu_button_get_type ())
33 #define GTK_MENU_BUTTON(obj)            (G_TYPE_CHECK_INSTANCE_CAST ((obj), GTK_TYPE_MENU_BUTTON, GtkMenuButton))
34 #define GTK_MENU_BUTTON_CLASS(klass)    (G_TYPE_CHECK_CLASS_CAST ((klass), GTK_TYPE_MENU_BUTTON, GtkMenuButtonClass))
35 #define GTK_IS_MENU_BUTTON(obj)         (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GTK_TYPE_MENU_BUTTON))
36 #define GTK_IS_MENU_BUTTON_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GTK_TYPE_MENU_BUTTON))
37 #define GTK_MENU_BUTTON_GET_CLASS(obj)  (G_TYPE_INSTANCE_GET_CLASS ((obj), GTK_TYPE_MENU_BUTTON, GtkMenuButtonClass))
38
39 typedef struct _GtkMenuButton        GtkMenuButton;
40 typedef struct _GtkMenuButtonClass   GtkMenuButtonClass;
41 typedef struct _GtkMenuButtonPrivate GtkMenuButtonPrivate;
42
43 struct _GtkMenuButton
44 {
45   GtkToggleButton parent;
46
47   /*< private >*/
48   GtkMenuButtonPrivate *priv;
49 };
50
51 struct _GtkMenuButtonClass
52 {
53   GtkToggleButtonClass parent_class;
54
55   /* Padding for future expansion */
56   void (*_gtk_reserved1) (void);
57   void (*_gtk_reserved2) (void);
58   void (*_gtk_reserved3) (void);
59   void (*_gtk_reserved4) (void);
60 };
61
62 GDK_AVAILABLE_IN_3_6
63 GType        gtk_menu_button_get_type       (void) G_GNUC_CONST;
64 GDK_AVAILABLE_IN_3_6
65 GtkWidget   *gtk_menu_button_new            (void);
66
67 GDK_AVAILABLE_IN_3_6
68 void         gtk_menu_button_set_popup      (GtkMenuButton *menu_button,
69                                              GtkWidget     *menu);
70 GDK_AVAILABLE_IN_3_6
71 GtkMenu     *gtk_menu_button_get_popup      (GtkMenuButton *menu_button);
72
73 GDK_DEPRECATED_IN_3_6_FOR(gtk_menu_button_set_popup)
74 void         gtk_menu_button_set_menu       (GtkMenuButton *menu_button,
75                                              GtkWidget     *menu);
76 GDK_DEPRECATED_IN_3_6_FOR(gtk_menu_button_get_popup)
77 GtkMenu     *gtk_menu_button_get_menu       (GtkMenuButton *menu_button);
78
79 GDK_AVAILABLE_IN_3_6
80 void         gtk_menu_button_set_direction  (GtkMenuButton *menu_button,
81                                              GtkArrowType   direction);
82 GDK_AVAILABLE_IN_3_6
83 GtkArrowType gtk_menu_button_get_direction  (GtkMenuButton *menu_button);
84
85 GDK_AVAILABLE_IN_3_6
86 void         gtk_menu_button_set_menu_model (GtkMenuButton *menu_button,
87                                              GMenuModel    *menu_model);
88 GDK_AVAILABLE_IN_3_6
89 GMenuModel  *gtk_menu_button_get_menu_model (GtkMenuButton *menu_button);
90
91 GDK_AVAILABLE_IN_3_6
92 void         gtk_menu_button_set_align_widget (GtkMenuButton *menu_button,
93                                                GtkWidget     *align_widget);
94 GDK_AVAILABLE_IN_3_6
95 GtkWidget   *gtk_menu_button_get_align_widget (GtkMenuButton *menu_button);
96
97 G_END_DECLS
98
99 #endif /* __GTK_MENU_BUTTON_H__ */