Github User Fetcher 1.0.0
C Application with Server and GUI
Loading...
Searching...
No Matches
gtkmenubutton.h
Go to the documentation of this file.
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#pragma once
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/gtktogglebutton.h>
28#include <gtk/gtkpopover.h>
29
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_IS_MENU_BUTTON(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GTK_TYPE_MENU_BUTTON))
35
36typedef struct _GtkMenuButton GtkMenuButton;
37
38/**
39 * GtkMenuButtonCreatePopupFunc:
40 * @menu_button: the `GtkMenuButton`
41 * @user_data: User data passed to gtk_menu_button_set_create_popup_func()
42 *
43 * User-provided callback function to create a popup for a
44 * `GtkMenuButton` on demand.
45 *
46 * This function is called when the popup of @menu_button is shown,
47 * but none has been provided via [method@Gtk.MenuButton.set_popover]
48 * or [method@Gtk.MenuButton.set_menu_model].
49 */
50typedef void (*GtkMenuButtonCreatePopupFunc) (GtkMenuButton *menu_button,
51 gpointer user_data);
52
57
60 GtkWidget *popover);
63
66 GtkArrowType direction);
69
72 GMenuModel *menu_model);
75
78 const char *icon_name);
80const char * gtk_menu_button_get_icon_name (GtkMenuButton *menu_button);
81
84 gboolean always_show_arrow);
87
90 const char *label);
92const char * gtk_menu_button_get_label (GtkMenuButton *menu_button);
93
96 gboolean use_underline);
99
102 gboolean has_frame);
105
110
114 gpointer user_data,
115 GDestroyNotify destroy_notify);
116
119 gboolean primary);
122
125 GtkWidget *child);
128
131 gboolean active);
134
137 gboolean can_shrink);
140
141
143
145
#define GDK_AVAILABLE_IN_4_10
#define GDK_AVAILABLE_IN_4_4
#define GDK_AVAILABLE_IN_4_12
#define GDK_AVAILABLE_IN_4_6
#define GDK_AVAILABLE_IN_ALL
#define G_END_DECLS
Definition gmacros.h:910
#define G_BEGIN_DECLS
Definition gmacros.h:909
#define G_GNUC_CONST
Definition gmacros.h:637
#define G_DEFINE_AUTOPTR_CLEANUP_FUNC(TypeName, func)
Definition gmacros.h:1400
GOBJECT_AVAILABLE_IN_ALL void g_object_unref(gpointer object)
GtkArrowType
Definition gtkenums.h:105
GDK_AVAILABLE_IN_4_10 void gtk_menu_button_set_active(GtkMenuButton *menu_button, gboolean active)
GDK_AVAILABLE_IN_ALL void gtk_menu_button_set_has_frame(GtkMenuButton *menu_button, gboolean has_frame)
GDK_AVAILABLE_IN_ALL const char * gtk_menu_button_get_icon_name(GtkMenuButton *menu_button)
GDK_AVAILABLE_IN_ALL void gtk_menu_button_popup(GtkMenuButton *menu_button)
GDK_AVAILABLE_IN_4_4 gboolean gtk_menu_button_get_always_show_arrow(GtkMenuButton *menu_button)
GDK_AVAILABLE_IN_4_12 gboolean gtk_menu_button_get_can_shrink(GtkMenuButton *menu_button)
struct _GtkMenuButton GtkMenuButton
GDK_AVAILABLE_IN_ALL const char * gtk_menu_button_get_label(GtkMenuButton *menu_button)
GDK_AVAILABLE_IN_ALL GType gtk_menu_button_get_type(void) G_GNUC_CONST
GDK_AVAILABLE_IN_4_4 void gtk_menu_button_set_always_show_arrow(GtkMenuButton *menu_button, gboolean always_show_arrow)
GDK_AVAILABLE_IN_ALL GtkArrowType gtk_menu_button_get_direction(GtkMenuButton *menu_button)
GDK_AVAILABLE_IN_ALL void gtk_menu_button_set_icon_name(GtkMenuButton *menu_button, const char *icon_name)
GDK_AVAILABLE_IN_4_4 gboolean gtk_menu_button_get_primary(GtkMenuButton *menu_button)
GDK_AVAILABLE_IN_4_6 GtkWidget * gtk_menu_button_get_child(GtkMenuButton *menu_button)
GDK_AVAILABLE_IN_ALL void gtk_menu_button_set_use_underline(GtkMenuButton *menu_button, gboolean use_underline)
void(* GtkMenuButtonCreatePopupFunc)(GtkMenuButton *menu_button, gpointer user_data)
GDK_AVAILABLE_IN_ALL GtkWidget * gtk_menu_button_new(void)
GDK_AVAILABLE_IN_ALL void gtk_menu_button_set_label(GtkMenuButton *menu_button, const char *label)
GDK_AVAILABLE_IN_ALL void gtk_menu_button_set_menu_model(GtkMenuButton *menu_button, GMenuModel *menu_model)
GDK_AVAILABLE_IN_4_4 void gtk_menu_button_set_primary(GtkMenuButton *menu_button, gboolean primary)
GDK_AVAILABLE_IN_ALL void gtk_menu_button_set_direction(GtkMenuButton *menu_button, GtkArrowType direction)
GDK_AVAILABLE_IN_ALL void gtk_menu_button_popdown(GtkMenuButton *menu_button)
GDK_AVAILABLE_IN_ALL void gtk_menu_button_set_create_popup_func(GtkMenuButton *menu_button, GtkMenuButtonCreatePopupFunc func, gpointer user_data, GDestroyNotify destroy_notify)
GDK_AVAILABLE_IN_4_12 void gtk_menu_button_set_can_shrink(GtkMenuButton *menu_button, gboolean can_shrink)
GDK_AVAILABLE_IN_ALL GMenuModel * gtk_menu_button_get_menu_model(GtkMenuButton *menu_button)
GDK_AVAILABLE_IN_4_10 gboolean gtk_menu_button_get_active(GtkMenuButton *menu_button)
GDK_AVAILABLE_IN_ALL gboolean gtk_menu_button_get_has_frame(GtkMenuButton *menu_button)
GDK_AVAILABLE_IN_ALL void gtk_menu_button_set_popover(GtkMenuButton *menu_button, GtkWidget *popover)
GDK_AVAILABLE_IN_4_6 void gtk_menu_button_set_child(GtkMenuButton *menu_button, GtkWidget *child)
GDK_AVAILABLE_IN_ALL gboolean gtk_menu_button_get_use_underline(GtkMenuButton *menu_button)
GDK_AVAILABLE_IN_ALL GtkPopover * gtk_menu_button_get_popover(GtkMenuButton *menu_button)
gsize GType
Definition gtype.h:427
gint gboolean
Definition gtypes.h:56
void * gpointer
Definition gtypes.h:109
void(* GDestroyNotify)(gpointer data)
Definition gtypes.h:140