michael@0: /* ATK - Accessibility Toolkit michael@0: * Copyright 2001 Sun Microsystems Inc. michael@0: * michael@0: * This library is free software; you can redistribute it and/or michael@0: * modify it under the terms of the GNU Library General Public michael@0: * License as published by the Free Software Foundation; either michael@0: * version 2 of the License, or (at your option) any later version. michael@0: * michael@0: * This library is distributed in the hope that it will be useful, michael@0: * but WITHOUT ANY WARRANTY; without even the implied warranty of michael@0: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU michael@0: * Library General Public License for more details. michael@0: * michael@0: * You should have received a copy of the GNU Library General Public michael@0: * License along with this library; if not, write to the michael@0: * Free Software Foundation, Inc., 59 Temple Place - Suite 330, michael@0: * Boston, MA 02111-1307, USA. michael@0: */ michael@0: michael@0: #ifndef __ATK_ACTION_H__ michael@0: #define __ATK_ACTION_H__ michael@0: michael@0: #include michael@0: michael@0: #ifdef __cplusplus michael@0: extern "C" { michael@0: #endif /* __cplusplus */ michael@0: michael@0: /* michael@0: * The interface AtkAction should be supported by any object that can michael@0: * perform one or more actions. The interface provides the standard michael@0: * mechanism for an assistive technology to determine what those actions michael@0: * are as well as tell the object to perform them. Any object that can michael@0: * be manipulated should support this interface. michael@0: */ michael@0: michael@0: michael@0: #define ATK_TYPE_ACTION (atk_action_get_type ()) michael@0: #define ATK_IS_ACTION(obj) G_TYPE_CHECK_INSTANCE_TYPE ((obj), ATK_TYPE_ACTION) michael@0: #define ATK_ACTION(obj) G_TYPE_CHECK_INSTANCE_CAST ((obj), ATK_TYPE_ACTION, AtkAction) michael@0: #define ATK_ACTION_GET_IFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), ATK_TYPE_ACTION, AtkActionIface)) michael@0: michael@0: #ifndef _TYPEDEF_ATK_ACTION_ michael@0: #define _TYPEDEF_ATK_ACTION_ michael@0: typedef struct _AtkAction AtkAction; michael@0: #endif michael@0: typedef struct _AtkActionIface AtkActionIface; michael@0: michael@0: struct _AtkActionIface michael@0: { michael@0: GTypeInterface parent; michael@0: michael@0: gboolean (*do_action) (AtkAction *action, michael@0: gint i); michael@0: gint (*get_n_actions) (AtkAction *action); michael@0: G_CONST_RETURN gchar* (*get_description) (AtkAction *action, michael@0: gint i); michael@0: G_CONST_RETURN gchar* (*get_name) (AtkAction *action, michael@0: gint i); michael@0: G_CONST_RETURN gchar* (*get_keybinding) (AtkAction *action, michael@0: gint i); michael@0: gboolean (*set_description) (AtkAction *action, michael@0: gint i, michael@0: const gchar *desc); michael@0: G_CONST_RETURN gchar* (*get_localized_name)(AtkAction *action, michael@0: gint i); michael@0: AtkFunction pad2; michael@0: }; michael@0: michael@0: GType atk_action_get_type (void); michael@0: michael@0: /* michael@0: * These are the function which would be called by an application with michael@0: * the argument being a AtkObject object cast to (AtkAction). michael@0: * michael@0: * The function will just check that * the corresponding michael@0: * function pointer is not NULL and will call it. michael@0: * michael@0: * The "real" implementation of the function for accessible will be michael@0: * provided in a support library michael@0: */ michael@0: michael@0: gboolean atk_action_do_action (AtkAction *action, michael@0: gint i); michael@0: gint atk_action_get_n_actions (AtkAction *action); michael@0: G_CONST_RETURN gchar* atk_action_get_description (AtkAction *action, michael@0: gint i); michael@0: G_CONST_RETURN gchar* atk_action_get_name (AtkAction *action, michael@0: gint i); michael@0: G_CONST_RETURN gchar* atk_action_get_keybinding (AtkAction *action, michael@0: gint i); michael@0: gboolean atk_action_set_description (AtkAction *action, michael@0: gint i, michael@0: const gchar *desc); michael@0: michael@0: /* NEW in ATK 1.1: */ michael@0: michael@0: G_CONST_RETURN gchar* atk_action_get_localized_name (AtkAction *action, michael@0: gint i); michael@0: michael@0: /* michael@0: * Additional GObject properties exported by AtkAction: michael@0: * "accessible_action" michael@0: * (an accessible action, or the list of actions, has changed) michael@0: */ michael@0: michael@0: #ifdef __cplusplus michael@0: } michael@0: #endif /* __cplusplus */ michael@0: michael@0: michael@0: #endif /* __ATK_ACTION_H__ */