/packages/gtk2/src/atk/atkaction.inc

https://github.com/slibre/freepascal · Pascal · 89 lines · 39 code · 16 blank · 34 comment · 0 complexity · df339d6d2c48a9145723b2c9e9f6705a MD5 · raw file

  1. // included by atk.pp
  2. {
  3. The interface AtkAction should be supported by any anObject that can
  4. perform one or more actions. The interface provides the standard
  5. mechanism for an assistive technology to determine what those actions
  6. are as well as tell the anObject to perform them. Any anObject that can
  7. be manipulated should support this interface.
  8. }
  9. {$IFDEF read_forward_definitions}
  10. {$ENDIF read_forward_definitions}
  11. //------------------------------------------------------------------------------
  12. {$IFDEF read_interface_types}
  13. PAtkActionIface = ^TAtkActionIface;
  14. TAtkActionIface = record
  15. parent : TGTypeInterface;
  16. do_action : function (action:PAtkAction; i:gint):gboolean; cdecl;
  17. get_n_actions : function (action:PAtkAction):gint; cdecl;
  18. get_description : function (action:PAtkAction; i:gint):Pgchar; cdecl;
  19. get_name : function (action:PAtkAction; i:gint):Pgchar; cdecl;
  20. get_keybinding : function (action:PAtkAction; i:gint):Pgchar; cdecl;
  21. set_description : function (action:PAtkAction; i:gint; desc:Pgchar):gboolean; cdecl;
  22. pad1 : TAtkFunction;
  23. pad2 : TAtkFunction;
  24. end;
  25. {$ENDIF read_interface_types}
  26. //------------------------------------------------------------------------------
  27. {$IFDEF read_interface_rest}
  28. function ATK_TYPE_ACTION : GType;
  29. function ATK_IS_ACTION(obj: pointer) : boolean;
  30. function ATK_ACTION(obj: pointer) : PAtkAction;
  31. function ATK_ACTION_GET_IFACE(obj: pointer) : PAtkActionIface;
  32. {
  33. These are the function which would be called by an application with
  34. the argument being a AtkObject anObject cast to (AtkAction).
  35. The function will just check that the corresponding
  36. function pointer is not NULL and will call it.
  37. The "real" implementation of the function for accessible will be
  38. provided in a support library
  39. }
  40. function atk_action_get_type:GType; cdecl; external atklib;
  41. function atk_action_do_action(action:PAtkAction; i:gint):gboolean; cdecl; external atklib;
  42. function atk_action_get_n_actions(action:PAtkAction):gint; cdecl; external atklib;
  43. function atk_action_get_description(action:PAtkAction; i:gint):Pgchar; cdecl; external atklib;
  44. function atk_action_get_name(action:PAtkAction; i:gint):Pgchar; cdecl; external atklib;
  45. function atk_action_get_keybinding(action:PAtkAction; i:gint):Pgchar; cdecl; external atklib;
  46. function atk_action_set_description(action:PAtkAction; i:gint; desc:Pgchar):gboolean; cdecl; external atklib;
  47. {
  48. Additional GObject properties exported by AtkAction:
  49. "accessible_action"
  50. (an accessible action, or the list of actions, has changed)
  51. }
  52. {$ENDIF read_interface_rest}
  53. //------------------------------------------------------------------------------
  54. {$IFDEF read_implementation}
  55. function ATK_TYPE_ACTION : GType;
  56. begin
  57. ATK_TYPE_ACTION:=atk_action_get_type;
  58. end;
  59. function ATK_IS_ACTION(obj: pointer) : boolean;
  60. begin
  61. ATK_IS_ACTION:=G_TYPE_CHECK_INSTANCE_TYPE(obj,ATK_TYPE_ACTION);
  62. end;
  63. function ATK_ACTION(obj: pointer) : PAtkAction;
  64. begin
  65. ATK_ACTION:=PAtkAction(G_TYPE_CHECK_INSTANCE_CAST(obj,ATK_TYPE_ACTION));
  66. end;
  67. function ATK_ACTION_GET_IFACE(obj: pointer) : PAtkActionIface;
  68. begin
  69. ATK_ACTION_GET_IFACE:=PAtkActionIface(G_TYPE_INSTANCE_GET_INTERFACE(obj,ATK_TYPE_ACTION));
  70. end;
  71. {$ENDIF read_implementation}