Ardour  9.0-pre0-582-g084a23a80d
gtkaction.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_ACTION_H__
32 #define __GTK_ACTION_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/gtkwidget.h>
39 
40 G_BEGIN_DECLS
41 
42 #define GTK_TYPE_ACTION (gtk_action_get_type ())
43 #define GTK_ACTION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GTK_TYPE_ACTION, GtkAction))
44 #define GTK_ACTION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GTK_TYPE_ACTION, GtkActionClass))
45 #define GTK_IS_ACTION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GTK_TYPE_ACTION))
46 #define GTK_IS_ACTION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GTK_TYPE_ACTION))
47 #define GTK_ACTION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), GTK_TYPE_ACTION, GtkActionClass))
48 
49 typedef struct _GtkAction GtkAction;
50 typedef struct _GtkActionClass GtkActionClass;
51 typedef struct _GtkActionPrivate GtkActionPrivate;
52 
53 struct _GtkAction
54 {
55  GObject object;
56 
57  /*< private >*/
58 
59  GtkActionPrivate *GSEAL (private_data);
60 };
61 
63 {
64  GObjectClass parent_class;
65 
66  /* activation signal */
67  void (* activate) (GtkAction *action);
68 
71 
72  /* widget creation routines (not signals) */
73  GtkWidget *(* create_menu_item) (GtkAction *action);
74  GtkWidget *(* create_tool_item) (GtkAction *action);
75  void (* connect_proxy) (GtkAction *action,
76  GtkWidget *proxy);
77  void (* disconnect_proxy) (GtkAction *action,
78  GtkWidget *proxy);
79 
80  GtkWidget *(* create_menu) (GtkAction *action);
81 
82  /* Padding for future expansion */
83  void (*_gtk_reserved2) (void);
84  void (*_gtk_reserved3) (void);
85  void (*_gtk_reserved4) (void);
86 };
87 
88 GType gtk_action_get_type (void) G_GNUC_CONST;
89 GtkAction *gtk_action_new (const gchar *name,
90  const gchar *label,
91  const gchar *tooltip,
92  const gchar *stock_id);
93 const gchar* gtk_action_get_name (GtkAction *action);
97  gboolean sensitive);
98 gboolean gtk_action_is_visible (GtkAction *action);
99 gboolean gtk_action_get_visible (GtkAction *action);
101  gboolean visible);
104  GtkIconSize icon_size);
111 const gchar *gtk_action_get_accel_path (GtkAction *action);
113 
114 #ifndef GTK_DISABLE_DEPRECATED
117  GtkWidget *proxy);
119  GtkWidget *proxy);
121  GtkWidget *proxy);
123  GtkWidget *proxy);
124 #endif /* GTK_DISABLE_DEPRECATED */
127 
128 
130  GtkWidget *proxy);
132  GtkWidget *proxy);
133 
134 /* protected ... for use by child actions */
136 
137 /* protected ... for use by action groups */
139  const gchar *accel_path);
141  GtkAccelGroup *accel_group);
143  GtkWidget *proxy,
144  gboolean empty);
145 
147  const gchar *label);
148 const gchar * gtk_action_get_label (GtkAction *action);
150  const gchar *short_label);
151 const gchar * gtk_action_get_short_label (GtkAction *action);
153  const gchar *tooltip);
154 const gchar * gtk_action_get_tooltip (GtkAction *action);
156  const gchar *stock_id);
157 const gchar * gtk_action_get_stock_id (GtkAction *action);
159  GIcon *icon);
162  const gchar *icon_name);
163 const gchar * gtk_action_get_icon_name (GtkAction *action);
165  gboolean visible_horizontal);
168  gboolean visible_vertical);
171  gboolean is_important);
174  gboolean always_show);
176 
177 
178 G_END_DECLS
179 
180 #endif /* __GTK_ACTION_H__ */
void gtk_action_set_visible(GtkAction *action, gboolean visible)
void gtk_action_set_visible_horizontal(GtkAction *action, gboolean visible_horizontal)
void gtk_action_disconnect_proxy(GtkAction *action, GtkWidget *proxy)
gboolean gtk_action_get_visible(GtkAction *action)
gboolean gtk_action_is_visible(GtkAction *action)
gboolean gtk_action_is_sensitive(GtkAction *action)
void _gtk_action_sync_menu_visible(GtkAction *action, GtkWidget *proxy, gboolean empty)
const gchar * gtk_action_get_name(GtkAction *action)
void gtk_action_block_activate_from(GtkAction *action, GtkWidget *proxy)
void _gtk_action_emit_activate(GtkAction *action)
GSList * gtk_action_get_proxies(GtkAction *action)
GType gtk_action_get_type(void) G_GNUC_CONST
GtkWidget * gtk_action_create_icon(GtkAction *action, GtkIconSize icon_size)
gboolean gtk_action_get_is_important(GtkAction *action)
GClosure * gtk_action_get_accel_closure(GtkAction *action)
void gtk_action_unblock_activate_from(GtkAction *action, GtkWidget *proxy)
void gtk_action_set_icon_name(GtkAction *action, const gchar *icon_name)
void _gtk_action_remove_from_proxy_list(GtkAction *action, GtkWidget *proxy)
GtkAction * gtk_action_new(const gchar *name, const gchar *label, const gchar *tooltip, const gchar *stock_id)
const gchar * gtk_action_get_stock_id(GtkAction *action)
void gtk_action_set_tooltip(GtkAction *action, const gchar *tooltip)
const gchar * gtk_action_get_tooltip(GtkAction *action)
const gchar * gtk_action_get_icon_name(GtkAction *action)
void gtk_action_set_accel_path(GtkAction *action, const gchar *accel_path)
const gchar * gtk_action_get_short_label(GtkAction *action)
gboolean gtk_action_get_visible_vertical(GtkAction *action)
void gtk_action_set_accel_group(GtkAction *action, GtkAccelGroup *accel_group)
void gtk_action_set_visible_vertical(GtkAction *action, gboolean visible_vertical)
void gtk_action_connect_proxy(GtkAction *action, GtkWidget *proxy)
GtkWidget * gtk_action_create_tool_item(GtkAction *action)
gboolean gtk_action_get_visible_horizontal(GtkAction *action)
GtkWidget * gtk_action_create_menu_item(GtkAction *action)
void gtk_action_set_label(GtkAction *action, const gchar *label)
const gchar * gtk_action_get_accel_path(GtkAction *action)
void gtk_action_set_short_label(GtkAction *action, const gchar *short_label)
gboolean gtk_action_get_sensitive(GtkAction *action)
GtkAction * gtk_widget_get_action(GtkWidget *widget)
void gtk_action_set_gicon(GtkAction *action, GIcon *icon)
void gtk_action_set_is_important(GtkAction *action, gboolean is_important)
const gchar * gtk_action_get_label(GtkAction *action)
void gtk_action_disconnect_accelerator(GtkAction *action)
gboolean gtk_action_get_always_show_image(GtkAction *action)
void gtk_action_connect_accelerator(GtkAction *action)
void gtk_action_set_always_show_image(GtkAction *action, gboolean always_show)
void _gtk_action_add_to_proxy_list(GtkAction *action, GtkWidget *proxy)
GtkWidget * gtk_action_create_menu(GtkAction *action)
void gtk_action_set_sensitive(GtkAction *action, gboolean sensitive)
void gtk_action_set_stock_id(GtkAction *action, const gchar *stock_id)
struct _GtkActionPrivate GtkActionPrivate
Definition: gtkaction.h:51
void gtk_action_activate(GtkAction *action)
void gtk_action_unblock_activate(GtkAction *action)
GIcon * gtk_action_get_gicon(GtkAction *action)
void gtk_action_block_activate(GtkAction *action)
GtkIconSize
Definition: gtkenums.h:143
GtkImageIconNameData name
Definition: gtkimage.h:6
void(* _gtk_reserved4)(void)
Definition: gtkaction.h:85
void(* _gtk_reserved2)(void)
Definition: gtkaction.h:83
GType menu_item_type
Definition: gtkaction.h:69
void(* activate)(GtkAction *action)
Definition: gtkaction.h:67
GType toolbar_item_type
Definition: gtkaction.h:70
void(* connect_proxy)(GtkAction *action, GtkWidget *proxy)
Definition: gtkaction.h:75
GObjectClass parent_class
Definition: gtkaction.h:64
void(* _gtk_reserved3)(void)
Definition: gtkaction.h:84
void(* disconnect_proxy)(GtkAction *action, GtkWidget *proxy)
Definition: gtkaction.h:77
GObject object
Definition: gtkaction.h:55
GtkActionPrivate * GSEAL(private_data)