gsimpleactiongroup.h 4.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697
  1. /*
  2. * Copyright © 2010 Codethink Limited
  3. *
  4. * This program is free software: you can redistribute it and/or modify
  5. * it under the terms of the GNU Lesser General Public License as published
  6. * by the Free Software Foundation; either version 2 of the licence or (at
  7. * your option) any later version.
  8. *
  9. * This library is distributed in the hope that it will be useful,
  10. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  11. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  12. * Lesser General Public License for more details.
  13. *
  14. * You should have received a copy of the GNU Lesser General
  15. * Public License along with this library; if not, see <http://www.gnu.org/licenses/>.
  16. *
  17. * Authors: Ryan Lortie <[email protected]>
  18. */
  19. #ifndef __G_SIMPLE_ACTION_GROUP_H__
  20. #define __G_SIMPLE_ACTION_GROUP_H__
  21. #if !defined (__GIO_GIO_H_INSIDE__) && !defined (GIO_COMPILATION)
  22. #error "Only <gio/gio.h> can be included directly."
  23. #endif
  24. #include "gactiongroup.h"
  25. #include "gactionmap.h"
  26. G_BEGIN_DECLS
  27. #define G_TYPE_SIMPLE_ACTION_GROUP (g_simple_action_group_get_type ())
  28. #define G_SIMPLE_ACTION_GROUP(inst) (G_TYPE_CHECK_INSTANCE_CAST ((inst), \
  29. G_TYPE_SIMPLE_ACTION_GROUP, GSimpleActionGroup))
  30. #define G_SIMPLE_ACTION_GROUP_CLASS(class) (G_TYPE_CHECK_CLASS_CAST ((class), \
  31. G_TYPE_SIMPLE_ACTION_GROUP, GSimpleActionGroupClass))
  32. #define G_IS_SIMPLE_ACTION_GROUP(inst) (G_TYPE_CHECK_INSTANCE_TYPE ((inst), \
  33. G_TYPE_SIMPLE_ACTION_GROUP))
  34. #define G_IS_SIMPLE_ACTION_GROUP_CLASS(class) (G_TYPE_CHECK_CLASS_TYPE ((class), \
  35. G_TYPE_SIMPLE_ACTION_GROUP))
  36. #define G_SIMPLE_ACTION_GROUP_GET_CLASS(inst) (G_TYPE_INSTANCE_GET_CLASS ((inst), \
  37. G_TYPE_SIMPLE_ACTION_GROUP, GSimpleActionGroupClass))
  38. typedef struct _GSimpleActionGroupPrivate GSimpleActionGroupPrivate;
  39. typedef struct _GSimpleActionGroupClass GSimpleActionGroupClass;
  40. /**
  41. * GSimpleActionGroup:
  42. *
  43. * The #GSimpleActionGroup structure contains private data and should only be accessed using the provided API.
  44. *
  45. * Since: 2.28
  46. */
  47. struct _GSimpleActionGroup
  48. {
  49. /*< private >*/
  50. GObject parent_instance;
  51. GSimpleActionGroupPrivate *priv;
  52. };
  53. struct _GSimpleActionGroupClass
  54. {
  55. /*< private >*/
  56. GObjectClass parent_class;
  57. /*< private >*/
  58. gpointer padding[12];
  59. };
  60. GLIB_AVAILABLE_IN_ALL
  61. GType g_simple_action_group_get_type (void) G_GNUC_CONST;
  62. GLIB_AVAILABLE_IN_ALL
  63. GSimpleActionGroup * g_simple_action_group_new (void);
  64. GLIB_DEPRECATED_IN_2_38_FOR (g_action_map_lookup_action)
  65. GAction * g_simple_action_group_lookup (GSimpleActionGroup *simple,
  66. const gchar *action_name);
  67. GLIB_DEPRECATED_IN_2_38_FOR (g_action_map_add_action)
  68. void g_simple_action_group_insert (GSimpleActionGroup *simple,
  69. GAction *action);
  70. GLIB_DEPRECATED_IN_2_38_FOR (g_action_map_remove_action)
  71. void g_simple_action_group_remove (GSimpleActionGroup *simple,
  72. const gchar *action_name);
  73. GLIB_DEPRECATED_IN_2_38_FOR (g_action_map_add_action_entries)
  74. void g_simple_action_group_add_entries (GSimpleActionGroup *simple,
  75. const GActionEntry *entries,
  76. gint n_entries,
  77. gpointer user_data);
  78. G_END_DECLS
  79. #endif /* __G_SIMPLE_ACTION_GROUP_H__ */