You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

112 regels
4.5 KiB

  1. /* ATK - Accessibility Toolkit
  2. * Copyright 2001 Sun Microsystems Inc.
  3. *
  4. * This library is free software; you can redistribute it and/or
  5. * modify it under the terms of the GNU Library General Public
  6. * License as published by the Free Software Foundation; either
  7. * version 2 of the License, or (at 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. * Library General Public License for more details.
  13. *
  14. * You should have received a copy of the GNU Library General Public
  15. * License along with this library; if not, write to the
  16. * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
  17. * Boston, MA 02111-1307, USA.
  18. */
  19. #if defined(ATK_DISABLE_SINGLE_INCLUDES) && !defined (__ATK_H_INSIDE__) && !defined (ATK_COMPILATION)
  20. #error "Only <atk/atk.h> can be included directly."
  21. #endif
  22. #ifndef __ATK_ACTION_H__
  23. #define __ATK_ACTION_H__
  24. #include <atk/atkobject.h>
  25. G_BEGIN_DECLS
  26. /*
  27. * The interface AtkAction should be supported by any object that can
  28. * perform one or more actions. The interface provides the standard
  29. * mechanism for an assistive technology to determine what those actions
  30. * are as well as tell the object to perform them. Any object that can
  31. * be manipulated should support this interface.
  32. */
  33. #define ATK_TYPE_ACTION (atk_action_get_type ())
  34. #define ATK_IS_ACTION(obj) G_TYPE_CHECK_INSTANCE_TYPE ((obj), ATK_TYPE_ACTION)
  35. #define ATK_ACTION(obj) G_TYPE_CHECK_INSTANCE_CAST ((obj), ATK_TYPE_ACTION, AtkAction)
  36. #define ATK_ACTION_GET_IFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), ATK_TYPE_ACTION, AtkActionIface))
  37. #ifndef _TYPEDEF_ATK_ACTION_
  38. #define _TYPEDEF_ATK_ACTION_
  39. typedef struct _AtkAction AtkAction;
  40. #endif
  41. typedef struct _AtkActionIface AtkActionIface;
  42. struct _AtkActionIface
  43. {
  44. GTypeInterface parent;
  45. gboolean (*do_action) (AtkAction *action,
  46. gint i);
  47. gint (*get_n_actions) (AtkAction *action);
  48. G_CONST_RETURN gchar* (*get_description) (AtkAction *action,
  49. gint i);
  50. G_CONST_RETURN gchar* (*get_name) (AtkAction *action,
  51. gint i);
  52. G_CONST_RETURN gchar* (*get_keybinding) (AtkAction *action,
  53. gint i);
  54. gboolean (*set_description) (AtkAction *action,
  55. gint i,
  56. const gchar *desc);
  57. G_CONST_RETURN gchar* (*get_localized_name)(AtkAction *action,
  58. gint i);
  59. AtkFunction pad2;
  60. };
  61. GType atk_action_get_type (void);
  62. /*
  63. * These are the function which would be called by an application with
  64. * the argument being a AtkObject object cast to (AtkAction).
  65. *
  66. * The function will just check that * the corresponding
  67. * function pointer is not NULL and will call it.
  68. *
  69. * The "real" implementation of the function for accessible will be
  70. * provided in a support library
  71. */
  72. gboolean atk_action_do_action (AtkAction *action,
  73. gint i);
  74. gint atk_action_get_n_actions (AtkAction *action);
  75. G_CONST_RETURN gchar* atk_action_get_description (AtkAction *action,
  76. gint i);
  77. G_CONST_RETURN gchar* atk_action_get_name (AtkAction *action,
  78. gint i);
  79. G_CONST_RETURN gchar* atk_action_get_keybinding (AtkAction *action,
  80. gint i);
  81. gboolean atk_action_set_description (AtkAction *action,
  82. gint i,
  83. const gchar *desc);
  84. /* NEW in ATK 1.1: */
  85. G_CONST_RETURN gchar* atk_action_get_localized_name (AtkAction *action,
  86. gint i);
  87. /*
  88. * Additional GObject properties exported by AtkAction:
  89. * "accessible_action"
  90. * (an accessible action, or the list of actions, has changed)
  91. */
  92. G_END_DECLS
  93. #endif /* __ATK_ACTION_H__ */