Ardour  9.0-pre0-582-g084a23a80d
gtkuimanager.h
Go to the documentation of this file.
1 /*
2  * GTK - The GIMP Toolkit
3  * Copyright (C) 1998, 1999 Red Hat, Inc.
4  * All rights reserved.
5  *
6  * This Library is free software; you can redistribute it and/or
7  * modify it under the terms of the GNU Library General Public License as
8  * published by the Free Software Foundation; either version 2 of the
9  * License, or (at your option) any later version.
10  *
11  * This Library is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14  * Library General Public License for more details.
15  *
16  * You should have received a copy of the GNU Library General Public
17  * License along with the Gnome Library; see the file COPYING.LIB. If not,
18  * write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
19  * Boston, MA 02111-1307, USA.
20  */
21 
22 /*
23  * Author: James Henstridge <james@daa.com.au>
24  *
25  * Modified by the GTK+ Team and others 2003. See the AUTHORS
26  * file for a list of people on the GTK+ Team. See the ChangeLog
27  * files for a list of changes. These files are distributed with
28  * GTK+ at ftp://ftp.gtk.org/pub/gtk/.
29  */
30 
31 #ifndef __GTK_UI_MANAGER_H__
32 #define __GTK_UI_MANAGER_H__
33 
34 #if defined(GTK_DISABLE_SINGLE_INCLUDES) && !defined (__GTK_H_INSIDE__) && !defined (GTK_COMPILATION)
35 #error "Only <gtk/gtk.h> can be included directly."
36 #endif
37 
38 #include <gtk/gtkaccelgroup.h>
39 #include <gtk/gtkwidget.h>
40 #include <gtk/gtkaction.h>
41 #include <gtk/gtkactiongroup.h>
42 
43 G_BEGIN_DECLS
44 
45 #define GTK_TYPE_UI_MANAGER (gtk_ui_manager_get_type ())
46 #define GTK_UI_MANAGER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GTK_TYPE_UI_MANAGER, GtkUIManager))
47 #define GTK_UI_MANAGER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GTK_TYPE_UI_MANAGER, GtkUIManagerClass))
48 #define GTK_IS_UI_MANAGER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GTK_TYPE_UI_MANAGER))
49 #define GTK_IS_UI_MANAGER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GTK_TYPE_UI_MANAGER))
50 #define GTK_UI_MANAGER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), GTK_TYPE_UI_MANAGER, GtkUIManagerClass))
51 
52 typedef struct _GtkUIManager GtkUIManager;
54 typedef struct _GtkUIManagerPrivate GtkUIManagerPrivate;
55 
56 
57 struct _GtkUIManager {
58  GObject parent;
59 
60  /*< private >*/
61 
62  GtkUIManagerPrivate *GSEAL (private_data);
63 };
64 
66  GObjectClass parent_class;
67 
68  /* Signals */
69  void (* add_widget) (GtkUIManager *merge,
70  GtkWidget *widget);
71  void (* actions_changed) (GtkUIManager *merge);
72  void (* connect_proxy) (GtkUIManager *merge,
73  GtkAction *action,
74  GtkWidget *proxy);
75  void (* disconnect_proxy) (GtkUIManager *merge,
76  GtkAction *action,
77  GtkWidget *proxy);
78  void (* pre_activate) (GtkUIManager *merge,
79  GtkAction *action);
80  void (* post_activate) (GtkUIManager *merge,
81  GtkAction *action);
82 
83  /* Virtual functions */
84  GtkWidget * (* get_widget) (GtkUIManager *manager,
85  const gchar *path);
86  GtkAction * (* get_action) (GtkUIManager *manager,
87  const gchar *path);
88 
89  /* Padding for future expansion */
90  void (*_gtk_reserved1) (void);
91  void (*_gtk_reserved2) (void);
92 };
93 
94 typedef enum {
107 
108 #ifdef G_OS_WIN32
109 /* Reserve old name for DLL ABI backward compatibility */
110 #define gtk_ui_manager_add_ui_from_file gtk_ui_manager_add_ui_from_file_utf8
111 #endif
112 
113 GType gtk_ui_manager_get_type (void) G_GNUC_CONST;
116  gboolean add_tearoffs);
119  GtkActionGroup *action_group,
120  gint pos);
122  GtkActionGroup *action_group);
126  const gchar *path);
128  GtkUIManagerItemType types);
130  const gchar *path);
132  const gchar *buffer,
133  gssize length,
134  GError **error);
136  const gchar *filename,
137  GError **error);
139  guint merge_id,
140  const gchar *path,
141  const gchar *name,
142  const gchar *action,
144  gboolean top);
146  guint merge_id);
150 
151 G_END_DECLS
152 
153 #endif /* __GTK_UI_MANAGER_H__ */
GtkImageIconNameData name
Definition: gtkimage.h:6
GSList * gtk_ui_manager_get_toplevels(GtkUIManager *self, GtkUIManagerItemType types)
void gtk_ui_manager_set_add_tearoffs(GtkUIManager *self, gboolean add_tearoffs)
void gtk_ui_manager_insert_action_group(GtkUIManager *self, GtkActionGroup *action_group, gint pos)
gboolean gtk_ui_manager_get_add_tearoffs(GtkUIManager *self)
GtkAction * gtk_ui_manager_get_action(GtkUIManager *self, const gchar *path)
guint gtk_ui_manager_new_merge_id(GtkUIManager *self)
void gtk_ui_manager_add_ui(GtkUIManager *self, guint merge_id, const gchar *path, const gchar *name, const gchar *action, GtkUIManagerItemType type, gboolean top)
GList * gtk_ui_manager_get_action_groups(GtkUIManager *self)
void gtk_ui_manager_ensure_update(GtkUIManager *self)
void gtk_ui_manager_remove_ui(GtkUIManager *self, guint merge_id)
struct _GtkUIManagerPrivate GtkUIManagerPrivate
Definition: gtkuimanager.h:54
GType gtk_ui_manager_get_type(void) G_GNUC_CONST
GtkAccelGroup * gtk_ui_manager_get_accel_group(GtkUIManager *self)
guint gtk_ui_manager_add_ui_from_string(GtkUIManager *self, const gchar *buffer, gssize length, GError **error)
GtkUIManagerItemType
Definition: gtkuimanager.h:94
@ GTK_UI_MANAGER_POPUP_WITH_ACCELS
Definition: gtkuimanager.h:105
@ GTK_UI_MANAGER_TOOLITEM
Definition: gtkuimanager.h:102
@ GTK_UI_MANAGER_MENUBAR
Definition: gtkuimanager.h:96
@ GTK_UI_MANAGER_POPUP
Definition: gtkuimanager.h:100
@ GTK_UI_MANAGER_PLACEHOLDER
Definition: gtkuimanager.h:99
@ GTK_UI_MANAGER_TOOLBAR
Definition: gtkuimanager.h:98
@ GTK_UI_MANAGER_ACCELERATOR
Definition: gtkuimanager.h:104
@ GTK_UI_MANAGER_MENUITEM
Definition: gtkuimanager.h:101
@ GTK_UI_MANAGER_AUTO
Definition: gtkuimanager.h:95
@ GTK_UI_MANAGER_SEPARATOR
Definition: gtkuimanager.h:103
@ GTK_UI_MANAGER_MENU
Definition: gtkuimanager.h:97
guint gtk_ui_manager_add_ui_from_file(GtkUIManager *self, const gchar *filename, GError **error)
GtkWidget * gtk_ui_manager_get_widget(GtkUIManager *self, const gchar *path)
void gtk_ui_manager_remove_action_group(GtkUIManager *self, GtkActionGroup *action_group)
gchar * gtk_ui_manager_get_ui(GtkUIManager *self)
GtkUIManager * gtk_ui_manager_new(void)
PBD::PropertyDescriptor< timecnt_t > length
Transmitter error
void(* add_widget)(GtkUIManager *merge, GtkWidget *widget)
Definition: gtkuimanager.h:69
void(* _gtk_reserved2)(void)
Definition: gtkuimanager.h:91
GObjectClass parent_class
Definition: gtkuimanager.h:66
void(* connect_proxy)(GtkUIManager *merge, GtkAction *action, GtkWidget *proxy)
Definition: gtkuimanager.h:72
void(* actions_changed)(GtkUIManager *merge)
Definition: gtkuimanager.h:71
void(* post_activate)(GtkUIManager *merge, GtkAction *action)
Definition: gtkuimanager.h:80
void(* disconnect_proxy)(GtkUIManager *merge, GtkAction *action, GtkWidget *proxy)
Definition: gtkuimanager.h:75
void(* _gtk_reserved1)(void)
Definition: gtkuimanager.h:90
void(* pre_activate)(GtkUIManager *merge, GtkAction *action)
Definition: gtkuimanager.h:78
GObject parent
Definition: gtkuimanager.h:58
GtkUIManagerPrivate * GSEAL(private_data)