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 this library. If not, see <http://www.gnu.org/licenses/>. |
18 | */ |
19 | |
20 | /* |
21 | * Author: James Henstridge <james@daa.com.au> |
22 | * |
23 | * Modified by the GTK+ Team and others 2003. See the AUTHORS |
24 | * file for a list of people on the GTK+ Team. See the ChangeLog |
25 | * files for a list of changes. These files are distributed with |
26 | * GTK+ at ftp://ftp.gtk.org/pub/gtk/. |
27 | */ |
28 | |
29 | #ifndef __GTK_TOGGLE_ACTION_H__ |
30 | #define __GTK_TOGGLE_ACTION_H__ |
31 | |
32 | #if !defined (__GTK_H_INSIDE__) && !defined (GTK_COMPILATION) |
33 | #error "Only <gtk/gtk.h> can be included directly." |
34 | #endif |
35 | |
36 | #include <gtk/deprecated/gtkaction.h> |
37 | |
38 | G_BEGIN_DECLS |
39 | |
40 | #define GTK_TYPE_TOGGLE_ACTION (gtk_toggle_action_get_type ()) |
41 | #define GTK_TOGGLE_ACTION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GTK_TYPE_TOGGLE_ACTION, GtkToggleAction)) |
42 | #define GTK_TOGGLE_ACTION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GTK_TYPE_TOGGLE_ACTION, GtkToggleActionClass)) |
43 | #define GTK_IS_TOGGLE_ACTION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GTK_TYPE_TOGGLE_ACTION)) |
44 | #define GTK_IS_TOGGLE_ACTION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GTK_TYPE_TOGGLE_ACTION)) |
45 | #define GTK_TOGGLE_ACTION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), GTK_TYPE_TOGGLE_ACTION, GtkToggleActionClass)) |
46 | |
47 | typedef struct _GtkToggleAction GtkToggleAction; |
48 | typedef struct _GtkToggleActionPrivate GtkToggleActionPrivate; |
49 | typedef struct _GtkToggleActionClass GtkToggleActionClass; |
50 | |
51 | struct _GtkToggleAction |
52 | { |
53 | GtkAction parent; |
54 | |
55 | /*< private >*/ |
56 | GtkToggleActionPrivate *private_data; |
57 | }; |
58 | |
59 | struct _GtkToggleActionClass |
60 | { |
61 | GtkActionClass parent_class; |
62 | |
63 | void (* toggled) (GtkToggleAction *action); |
64 | |
65 | /* Padding for future expansion */ |
66 | void (*_gtk_reserved1) (void); |
67 | void (*_gtk_reserved2) (void); |
68 | void (*_gtk_reserved3) (void); |
69 | void (*_gtk_reserved4) (void); |
70 | }; |
71 | |
72 | GDK_DEPRECATED_IN_3_10 |
73 | GType gtk_toggle_action_get_type (void) G_GNUC_CONST; |
74 | GDK_DEPRECATED_IN_3_10 |
75 | GtkToggleAction *gtk_toggle_action_new (const gchar *name, |
76 | const gchar *label, |
77 | const gchar *tooltip, |
78 | const gchar *stock_id); |
79 | GDK_DEPRECATED_IN_3_10 |
80 | void gtk_toggle_action_toggled (GtkToggleAction *action); |
81 | GDK_DEPRECATED_IN_3_10 |
82 | void gtk_toggle_action_set_active (GtkToggleAction *action, |
83 | gboolean is_active); |
84 | GDK_DEPRECATED_IN_3_10 |
85 | gboolean gtk_toggle_action_get_active (GtkToggleAction *action); |
86 | GDK_DEPRECATED_IN_3_10 |
87 | void gtk_toggle_action_set_draw_as_radio (GtkToggleAction *action, |
88 | gboolean draw_as_radio); |
89 | GDK_DEPRECATED_IN_3_10 |
90 | gboolean gtk_toggle_action_get_draw_as_radio (GtkToggleAction *action); |
91 | |
92 | /* private */ |
93 | void _gtk_toggle_action_set_active (GtkToggleAction *toggle_action, |
94 | gboolean is_active); |
95 | |
96 | |
97 | G_END_DECLS |
98 | |
99 | #endif /* __GTK_TOGGLE_ACTION_H__ */ |
100 | |