2014-10-24 03:38:09 +00:00
|
|
|
/* GTK - The GIMP Toolkit
|
|
|
|
* Copyright © 2014 Red Hat, Inc.
|
|
|
|
*
|
|
|
|
* This library is free software; you can redistribute it and/or
|
|
|
|
* modify it under the terms of the GNU Lesser General Public
|
|
|
|
* License as published by the Free Software Foundation; either
|
|
|
|
* version 2 of the License, or (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This library is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
|
|
* Lesser General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU Lesser General Public
|
|
|
|
* License along with this library. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef __GTK_POPOVER_MENU_H__
|
|
|
|
#define __GTK_POPOVER_MENU_H__
|
|
|
|
|
|
|
|
#if !defined (__GTK_H_INSIDE__) && !defined (GTK_COMPILATION)
|
|
|
|
#error "Only <gtk/gtk.h> can be included directly."
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#include <gtk/gtkpopover.h>
|
|
|
|
|
|
|
|
G_BEGIN_DECLS
|
|
|
|
|
|
|
|
#define GTK_TYPE_POPOVER_MENU (gtk_popover_menu_get_type ())
|
|
|
|
#define GTK_POPOVER_MENU(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), GTK_TYPE_POPOVER_MENU, GtkPopoverMenu))
|
|
|
|
#define GTK_IS_POPOVER_MENU(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), GTK_TYPE_POPOVER_MENU))
|
|
|
|
|
|
|
|
typedef struct _GtkPopoverMenu GtkPopoverMenu;
|
|
|
|
|
2018-02-05 19:13:20 +00:00
|
|
|
GDK_AVAILABLE_IN_ALL
|
2014-10-24 03:38:09 +00:00
|
|
|
GType gtk_popover_menu_get_type (void) G_GNUC_CONST;
|
|
|
|
|
2019-06-07 17:05:48 +00:00
|
|
|
GDK_AVAILABLE_IN_ALL
|
2020-02-24 12:21:46 +00:00
|
|
|
GtkWidget * gtk_popover_menu_new_from_model (GMenuModel *model);
|
2014-10-24 03:38:09 +00:00
|
|
|
|
2019-08-27 08:28:29 +00:00
|
|
|
/**
|
|
|
|
* GtkPopoverMenuFlags:
|
|
|
|
* @GTK_POPOVER_MENU_NESTED: Create submenus as nested
|
|
|
|
* popovers. Without this flag, submenus are created as
|
|
|
|
* sliding pages that replace the main menu.
|
|
|
|
*
|
|
|
|
* Flags that affect how popover menus are created from
|
|
|
|
* a menu model.
|
|
|
|
*/
|
|
|
|
typedef enum {
|
|
|
|
GTK_POPOVER_MENU_NESTED = 1 << 0
|
|
|
|
} GtkPopoverMenuFlags;
|
|
|
|
|
|
|
|
GDK_AVAILABLE_IN_ALL
|
2020-02-24 12:21:46 +00:00
|
|
|
GtkWidget * gtk_popover_menu_new_from_model_full (GMenuModel *model,
|
2019-08-27 08:28:29 +00:00
|
|
|
GtkPopoverMenuFlags flags);
|
|
|
|
|
2019-03-27 21:52:51 +00:00
|
|
|
GDK_AVAILABLE_IN_ALL
|
2019-11-11 10:58:43 +00:00
|
|
|
void gtk_popover_menu_set_menu_model (GtkPopoverMenu *popover,
|
|
|
|
GMenuModel *model);
|
2018-02-05 19:13:20 +00:00
|
|
|
GDK_AVAILABLE_IN_ALL
|
2019-11-11 10:58:43 +00:00
|
|
|
GMenuModel *gtk_popover_menu_get_menu_model (GtkPopoverMenu *popover);
|
2014-10-26 23:14:01 +00:00
|
|
|
|
2020-10-20 18:26:45 +00:00
|
|
|
GDK_AVAILABLE_IN_ALL
|
|
|
|
gboolean gtk_popover_menu_add_child (GtkPopoverMenu *popover,
|
|
|
|
GtkWidget *child,
|
|
|
|
const char *id);
|
|
|
|
|
|
|
|
GDK_AVAILABLE_IN_ALL
|
|
|
|
gboolean gtk_popover_menu_remove_child (GtkPopoverMenu *popover,
|
|
|
|
GtkWidget *child);
|
2014-10-26 23:14:01 +00:00
|
|
|
|
2022-09-24 01:54:15 +00:00
|
|
|
G_DEFINE_AUTOPTR_CLEANUP_FUNC(GtkPopoverMenu, g_object_unref)
|
|
|
|
|
2014-10-24 03:38:09 +00:00
|
|
|
G_END_DECLS
|
|
|
|
|
|
|
|
#endif /* __GTK_POPOVER_MENU_H__ */
|