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 |
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/gtkpopover.h> |
30 | |
31 | G_BEGIN_DECLS |
32 | |
33 | #define (gtk_menu_button_get_type ()) |
34 | #define (obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GTK_TYPE_MENU_BUTTON, GtkMenuButton)) |
35 | #define (obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GTK_TYPE_MENU_BUTTON)) |
36 | |
37 | typedef struct ; |
38 | |
39 | /** |
40 | * GtkMenuButtonCreatePopupFunc: |
41 | * @menu_button: the `GtkMenuButton` |
42 | * @user_data: User data passed to gtk_menu_button_set_create_popup_func() |
43 | * |
44 | * User-provided callback function to create a popup for a |
45 | * `GtkMenuButton` on demand. |
46 | * |
47 | * This function is called when the popup of @menu_button is shown, |
48 | * but none has been provided via [method@Gtk.MenuButton.set_popover] |
49 | * or [method@Gtk.MenuButton.set_menu_model]. |
50 | */ |
51 | typedef void (*) (GtkMenuButton *, |
52 | gpointer user_data); |
53 | |
54 | GDK_AVAILABLE_IN_ALL |
55 | GType (void) G_GNUC_CONST; |
56 | GDK_AVAILABLE_IN_ALL |
57 | GtkWidget * (void); |
58 | |
59 | GDK_AVAILABLE_IN_ALL |
60 | void (GtkMenuButton *, |
61 | GtkWidget *popover); |
62 | GDK_AVAILABLE_IN_ALL |
63 | GtkPopover * (GtkMenuButton *); |
64 | |
65 | GDK_AVAILABLE_IN_ALL |
66 | void (GtkMenuButton *, |
67 | GtkArrowType direction); |
68 | GDK_AVAILABLE_IN_ALL |
69 | GtkArrowType (GtkMenuButton *); |
70 | |
71 | GDK_AVAILABLE_IN_ALL |
72 | void (GtkMenuButton *, |
73 | GMenuModel *); |
74 | GDK_AVAILABLE_IN_ALL |
75 | GMenuModel * (GtkMenuButton *); |
76 | |
77 | GDK_AVAILABLE_IN_ALL |
78 | void (GtkMenuButton *, |
79 | const char *icon_name); |
80 | GDK_AVAILABLE_IN_ALL |
81 | const char * (GtkMenuButton *); |
82 | |
83 | GDK_AVAILABLE_IN_4_4 |
84 | void (GtkMenuButton *, |
85 | gboolean always_show_arrow); |
86 | GDK_AVAILABLE_IN_4_4 |
87 | gboolean (GtkMenuButton *); |
88 | |
89 | GDK_AVAILABLE_IN_ALL |
90 | void (GtkMenuButton *, |
91 | const char *label); |
92 | GDK_AVAILABLE_IN_ALL |
93 | const char * (GtkMenuButton *); |
94 | |
95 | GDK_AVAILABLE_IN_ALL |
96 | void (GtkMenuButton *, |
97 | gboolean use_underline); |
98 | GDK_AVAILABLE_IN_ALL |
99 | gboolean (GtkMenuButton *); |
100 | |
101 | GDK_AVAILABLE_IN_ALL |
102 | void (GtkMenuButton *, |
103 | gboolean has_frame); |
104 | GDK_AVAILABLE_IN_ALL |
105 | gboolean (GtkMenuButton *); |
106 | |
107 | GDK_AVAILABLE_IN_ALL |
108 | void (GtkMenuButton *); |
109 | GDK_AVAILABLE_IN_ALL |
110 | void (GtkMenuButton *); |
111 | |
112 | GDK_AVAILABLE_IN_ALL |
113 | void (GtkMenuButton *, |
114 | GtkMenuButtonCreatePopupFunc func, |
115 | gpointer user_data, |
116 | GDestroyNotify destroy_notify); |
117 | |
118 | GDK_AVAILABLE_IN_4_4 |
119 | void (GtkMenuButton *, |
120 | gboolean primary); |
121 | GDK_AVAILABLE_IN_4_4 |
122 | gboolean (GtkMenuButton *); |
123 | |
124 | GDK_AVAILABLE_IN_4_6 |
125 | void (GtkMenuButton *, |
126 | GtkWidget *child); |
127 | GDK_AVAILABLE_IN_4_6 |
128 | GtkWidget * (GtkMenuButton *); |
129 | |
130 | G_END_DECLS |
131 | |
132 | #endif /* __GTK_MENU_BUTTON_H__ */ |
133 | |