gsimpleaction.h 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  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 <desrt@desrt.ca>
  18. */
  19. #ifndef __G_SIMPLE_ACTION_H__
  20. #define __G_SIMPLE_ACTION_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 <gio/giotypes.h>
  25. G_BEGIN_DECLS
  26. #define G_TYPE_SIMPLE_ACTION (g_simple_action_get_type ())
  27. #define G_SIMPLE_ACTION(inst) (G_TYPE_CHECK_INSTANCE_CAST ((inst), \
  28. G_TYPE_SIMPLE_ACTION, GSimpleAction))
  29. #define G_IS_SIMPLE_ACTION(inst) (G_TYPE_CHECK_INSTANCE_TYPE ((inst), \
  30. G_TYPE_SIMPLE_ACTION))
  31. GLIB_AVAILABLE_IN_ALL
  32. GType g_simple_action_get_type (void) G_GNUC_CONST;
  33. GLIB_AVAILABLE_IN_ALL
  34. GSimpleAction * g_simple_action_new (const gchar *name,
  35. const GVariantType *parameter_type);
  36. GLIB_AVAILABLE_IN_ALL
  37. GSimpleAction * g_simple_action_new_stateful (const gchar *name,
  38. const GVariantType *parameter_type,
  39. GVariant *state);
  40. GLIB_AVAILABLE_IN_ALL
  41. void g_simple_action_set_enabled (GSimpleAction *simple,
  42. gboolean enabled);
  43. GLIB_AVAILABLE_IN_2_30
  44. void g_simple_action_set_state (GSimpleAction *simple,
  45. GVariant *value);
  46. GLIB_AVAILABLE_IN_2_44
  47. void g_simple_action_set_state_hint (GSimpleAction *simple,
  48. GVariant *state_hint);
  49. G_END_DECLS
  50. #endif /* __G_SIMPLE_ACTION_H__ */