1 /* GIMP - The GNU Image Manipulation Program 2 * Copyright (C) 1995 Spencer Kimball and Peter Mattis 3 * 4 * gimptoggleaction.h 5 * Copyright (C) 2004 Michael Natterer <mitch@gimp.org> 6 * Copyright (C) 2008 Sven Neumann <sven@gimp.org> 7 * 8 * This program is free software: you can redistribute it and/or modify 9 * it under the terms of the GNU General Public License as published by 10 * the Free Software Foundation; either version 3 of the License, or 11 * (at your option) any later version. 12 * 13 * This program is distributed in the hope that it will be useful, 14 * but WITHOUT ANY WARRANTY; without even the implied warranty of 15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 * GNU General Public License for more details. 17 * 18 * You should have received a copy of the GNU General Public License 19 * along with this program. If not, see <https://www.gnu.org/licenses/>. 20 */ 21 22 #ifndef __GIMP_TOGGLE_ACTION_H__ 23 #define __GIMP_TOGGLE_ACTION_H__ 24 25 26 #define GIMP_TYPE_TOGGLE_ACTION (gimp_toggle_action_get_type ()) 27 #define GIMP_TOGGLE_ACTION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GIMP_TYPE_TOGGLE_ACTION, GimpToggleAction)) 28 #define GIMP_TOGGLE_ACTION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GIMP_TYPE_TOGGLE_ACTION, GimpToggleActionClass)) 29 #define GIMP_IS_TOGGLE_ACTION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GIMP_TYPE_TOGGLE_ACTION)) 30 #define GIMP_IS_TOGGLE_ACTION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((obj), GIMP_TYPE_ACTION)) 31 #define GIMP_TOGGLE_ACTION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), GIMP_TYPE_TOGGLE_ACTION, GimpToggleActionClass)) 32 33 34 typedef struct _GimpToggleAction GimpToggleAction; 35 typedef struct _GimpToggleActionClass GimpToggleActionClass; 36 37 struct _GimpToggleAction 38 { 39 GtkToggleAction parent_instance; 40 }; 41 42 struct _GimpToggleActionClass 43 { 44 GtkToggleActionClass parent_class; 45 }; 46 47 48 GType gimp_toggle_action_get_type (void) G_GNUC_CONST; 49 50 GtkToggleAction * gimp_toggle_action_new (const gchar *name, 51 const gchar *label, 52 const gchar *tooltip, 53 const gchar *icon_name, 54 const gchar *help_id); 55 56 void gimp_toggle_action_set_active (GimpToggleAction *action, 57 gboolean active); 58 gboolean gimp_toggle_action_get_active (GimpToggleAction *action); 59 60 61 #endif /* __GIMP_TOGGLE_ACTION_H__ */ 62