PageRenderTime 27ms CodeModel.GetById 8ms app.highlight 17ms RepoModel.GetById 1ms app.codeStats 0ms

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