KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > eclipse > swt > internal > accessibility > gtk > ATK


1 /*******************************************************************************
2  * Copyright (c) 2000, 2004 IBM Corporation and others. All rights reserved.
3  * The contents of this file are made available under the terms
4  * of the GNU Lesser General Public License (LGPL) Version 2.1 that
5  * accompanies this distribution (lgpl-v21.txt). The LGPL is also
6  * available at http://www.gnu.org/licenses/lgpl.html. If the version
7  * of the LGPL at http://www.gnu.org is different to the version of
8  * the LGPL accompanying this distribution and there is any conflict
9  * between the two license versions, the terms of the LGPL accompanying
10  * this distribution shall govern.
11  *******************************************************************************/

12 package org.eclipse.swt.internal.accessibility.gtk;
13
14
15 import org.eclipse.swt.internal.Library;
16 import org.eclipse.swt.internal.gtk.OS;
17
18 public class ATK extends OS {
19     static {
20         Library.loadLibrary("swt-atk");
21     }
22     
23     /** Constants */
24     public static final int ATK_ROLE_CHECK_BOX = 7;
25     public static final int ATK_ROLE_COMBO_BOX = 11;
26     public static final int ATK_ROLE_DIALOG = 16;
27     public static final int ATK_ROLE_DRAWING_AREA = 18;
28     public static final int ATK_ROLE_WINDOW = 68;
29     public static final int ATK_ROLE_LABEL = 28;
30     public static final int ATK_ROLE_LIST = 30;
31     public static final int ATK_ROLE_LIST_ITEM = 31;
32     public static final int ATK_ROLE_MENU = 32;
33     public static final int ATK_ROLE_MENU_BAR = 33;
34     public static final int ATK_ROLE_MENU_ITEM = 34;
35     public static final int ATK_ROLE_PAGE_TAB = 36;
36     public static final int ATK_ROLE_PAGE_TAB_LIST = 37;
37     public static final int ATK_ROLE_PROGRESS_BAR = 41;
38     public static final int ATK_ROLE_PUSH_BUTTON = 42;
39     public static final int ATK_ROLE_RADIO_BUTTON = 43;
40     public static final int ATK_ROLE_SCROLL_BAR = 47;
41     public static final int ATK_ROLE_SEPARATOR = 49;
42     public static final int ATK_ROLE_SLIDER = 50;
43     public static final int ATK_ROLE_TABLE = 54;
44     public static final int ATK_ROLE_TABLE_CELL = 55;
45     public static final int ATK_ROLE_TABLE_COLUMN_HEADER = 56;
46     public static final int ATK_ROLE_TABLE_ROW_HEADER = 57;
47     public static final int ATK_ROLE_TEXT = 60;
48     public static final int ATK_ROLE_TOOL_BAR = 62;
49     public static final int ATK_ROLE_TOOL_TIP = 63;
50     public static final int ATK_ROLE_TREE = 64;
51     public static final int ATK_STATE_ARMED = 2;
52     public static final int ATK_STATE_BUSY = 3;
53     public static final int ATK_STATE_CHECKED = 4;
54     public static final int ATK_STATE_DEFUNCT = 5;
55     public static final int ATK_STATE_EDITABLE = 6;
56     public static final int ATK_STATE_ENABLED = 7;
57     public static final int ATK_STATE_EXPANDED = 9;
58     public static final int ATK_STATE_FOCUSABLE = 10;
59     public static final int ATK_STATE_FOCUSED = 11;
60     public static final int ATK_STATE_MULTISELECTABLE = 16;
61     public static final int ATK_STATE_PRESSED = 18;
62     public static final int ATK_STATE_RESIZABLE = 19;
63     public static final int ATK_STATE_SELECTABLE = 20;
64     public static final int ATK_STATE_SELECTED = 21;
65     public static final int ATK_STATE_SHOWING = 23;
66     public static final int ATK_STATE_TRANSIENT = 26;
67     public static final int ATK_STATE_VISIBLE = 28;
68     public static final int ATK_TEXT_BOUNDARY_CHAR = 0;
69     public static final int ATK_TEXT_BOUNDARY_WORD_START = 1;
70     public static final int ATK_TEXT_BOUNDARY_WORD_END = 2;
71     public static final int ATK_TEXT_BOUNDARY_SENTENCE_START = 3;
72     public static final int ATK_TEXT_BOUNDARY_SENTENCE_END = 4;
73     public static final int ATK_TEXT_BOUNDARY_LINE_START = 5;
74     public static final int ATK_TEXT_BOUNDARY_LINE_END = 6;
75     public static final int ATK_XY_WINDOW = 1;
76     
77     /** Signals */
78     public static final byte[] selection_changed = OS.ascii ("selection_changed");
79     public static final byte[] text_changed_insert = OS.ascii ("text_changed::insert");
80     public static final byte[] text_changed_delete = OS.ascii ("text_changed::delete");
81     public static final byte[] text_caret_moved = OS.ascii ("text_caret_moved");
82     public static final byte[] text_selection_changed = OS.ascii ("text_selection_changed");
83     
84 /** 64 bit */
85 public static final native int AtkObjectFactory_sizeof ();
86 public static final native int AtkObjectFactoryClass_sizeof ();
87     
88 /** Natives */
89 public static final native int /*long*/ _ATK_ACTION_GET_IFACE (int /*long*/ obj);
90 public static final int /*long*/ ATK_ACTION_GET_IFACE (int /*long*/ obj) {
91     lock.lock();
92     try {
93         return _ATK_ACTION_GET_IFACE(obj);
94     } finally {
95         lock.unlock();
96     }
97 }
98 public static final native int /*long*/ _ATK_COMPONENT_GET_IFACE(int /*long*/ atkHandle);
99 public static final int /*long*/ ATK_COMPONENT_GET_IFACE(int /*long*/ atkHandle) {
100     lock.lock();
101     try {
102         return _ATK_COMPONENT_GET_IFACE(atkHandle);
103     } finally {
104         lock.unlock();
105     }
106 }
107 public static final native int /*long*/ _ATK_OBJECT_FACTORY_CLASS (int /*long*/ klass);
108 public static final int /*long*/ ATK_OBJECT_FACTORY_CLASS (int /*long*/ klass) {
109     lock.lock();
110     try {
111         return _ATK_OBJECT_FACTORY_CLASS(klass);
112     } finally {
113         lock.unlock();
114     }
115 }
116 public static final native int /*long*/ _ATK_SELECTION_GET_IFACE (int /*long*/ obj);
117 public static final int /*long*/ ATK_SELECTION_GET_IFACE (int /*long*/ obj) {
118     lock.lock();
119     try {
120         return _ATK_SELECTION_GET_IFACE(obj);
121     } finally {
122         lock.unlock();
123     }
124 }
125 public static final native int /*long*/ _ATK_TEXT_GET_IFACE (int /*long*/ handle);
126 public static final int /*long*/ ATK_TEXT_GET_IFACE (int /*long*/ handle) {
127     lock.lock();
128     try {
129         return _ATK_TEXT_GET_IFACE(handle);
130     } finally {
131         lock.unlock();
132     }
133 }
134 public static final native int /*long*/ _GTK_ACCESSIBLE (int /*long*/ handle);
135 public static final int /*long*/ GTK_ACCESSIBLE (int /*long*/ handle) {
136     lock.lock();
137     try {
138         return _GTK_ACCESSIBLE(handle);
139     } finally {
140         lock.unlock();
141     }
142 }
143 public static final native void _atk_focus_tracker_notify (int /*long*/ object);
144 public static final void atk_focus_tracker_notify (int /*long*/ object) {
145     lock.lock();
146     try {
147         _atk_focus_tracker_notify(object);
148     } finally {
149         lock.unlock();
150     }
151 }
152 public static final native int /*long*/ _atk_get_default_registry ();
153 public static final int /*long*/ atk_get_default_registry () {
154     lock.lock();
155     try {
156         return _atk_get_default_registry();
157     } finally {
158         lock.unlock();
159     }
160 }
161 public static final native int /*long*/ _atk_object_factory_get_accessible_type (int /*long*/ factory);
162 public static final int /*long*/ atk_object_factory_get_accessible_type (int /*long*/ factory) {
163     lock.lock();
164     try {
165         return _atk_object_factory_get_accessible_type(factory);
166     } finally {
167         lock.unlock();
168     }
169 }
170 public static final native void _atk_object_initialize (int /*long*/ accessible, int /*long*/ data);
171 public static final void atk_object_initialize (int /*long*/ accessible, int /*long*/ data) {
172     lock.lock();
173     try {
174         _atk_object_initialize(accessible, data);
175     } finally {
176         lock.unlock();
177     }
178 }
179 public static final native int /*long*/ _atk_registry_get_factory (int /*long*/ registry, int /*long*/ type);
180 public static final int /*long*/ atk_registry_get_factory (int /*long*/ registry, int /*long*/ type) {
181     lock.lock();
182     try {
183         return _atk_registry_get_factory(registry, type);
184     } finally {
185         lock.unlock();
186     }
187 }
188 public static final native void _atk_registry_set_factory_type (int /*long*/ registry, int /*long*/ type, int /*long*/ factory_type);
189 public static final void atk_registry_set_factory_type (int /*long*/ registry, int /*long*/ type, int /*long*/ factory_type) {
190     lock.lock();
191     try {
192         _atk_registry_set_factory_type(registry, type, factory_type);
193     } finally {
194         lock.unlock();
195     }
196 }
197 public static final native boolean _atk_state_set_add_state (int /*long*/ set, int type);
198 public static final boolean atk_state_set_add_state (int /*long*/ set, int type) {
199     lock.lock();
200     try {
201         return _atk_state_set_add_state(set, type);
202     } finally {
203         lock.unlock();
204     }
205 }
206 public static final native int /*long*/ _atk_state_set_new ();
207 public static final int /*long*/ atk_state_set_new () {
208     lock.lock();
209     try {
210         return _atk_state_set_new();
211     } finally {
212         lock.unlock();
213     }
214 }
215 public static final native int /*long*/ _call (int /*long*/ function, int /*long*/ arg0);
216 public static final int /*long*/ call (int /*long*/ function, int /*long*/ arg0) {
217     lock.lock();
218     try {
219         return _call(function, arg0);
220     } finally {
221         lock.unlock();
222     }
223 }
224 public static final native int /*long*/ _call (int /*long*/ function, int /*long*/ arg0, int /*long*/ arg1);
225 public static final int /*long*/ call (int /*long*/ function, int /*long*/ arg0, int /*long*/ arg1) {
226     lock.lock();
227     try {
228         return _call(function, arg0, arg1);
229     } finally {
230         lock.unlock();
231     }
232 }
233 public static final native int /*long*/ _call (int /*long*/ function, int /*long*/ arg0, int /*long*/ arg1, int /*long*/ arg2);
234 public static final int /*long*/ call (int /*long*/ function, int /*long*/ arg0, int /*long*/ arg1, int /*long*/ arg2) {
235     lock.lock();
236     try {
237         return _call(function, arg0, arg1, arg2);
238     } finally {
239         lock.unlock();
240     }
241 }
242 public static final native int /*long*/ _call (int /*long*/ function, int /*long*/ arg0, int /*long*/ arg1, int /*long*/ arg2, int /*long*/ arg3);
243 public static final int /*long*/ call (int /*long*/ function, int /*long*/ arg0, int /*long*/ arg1, int /*long*/ arg2, int /*long*/ arg3) {
244     lock.lock();
245     try {
246         return _call(function, arg0, arg1, arg2, arg3);
247     } finally {
248         lock.unlock();
249     }
250 }
251 public static final native int /*long*/ _call (int /*long*/ function, int /*long*/ arg0, int /*long*/ arg1, int /*long*/ arg2, int /*long*/ arg3, int /*long*/ arg4);
252 public static final int /*long*/ call (int /*long*/ function, int /*long*/ arg0, int /*long*/ arg1, int /*long*/ arg2, int /*long*/ arg3, int /*long*/ arg4) {
253     lock.lock();
254     try {
255         return _call(function, arg0, arg1, arg2, arg3, arg4);
256     } finally {
257         lock.unlock();
258     }
259 }
260 public static final native int /*long*/ _call (int /*long*/ function, int /*long*/ arg0, int /*long*/ arg1, int /*long*/ arg2, int /*long*/ arg3, int /*long*/ arg4, int /*long*/ arg5);
261 public static final int /*long*/ call (int /*long*/ function, int /*long*/ arg0, int /*long*/ arg1, int /*long*/ arg2, int /*long*/ arg3, int /*long*/ arg4, int /*long*/ arg5) {
262     lock.lock();
263     try {
264         return _call(function, arg0, arg1, arg2, arg3, arg4, arg5);
265     } finally {
266         lock.unlock();
267     }
268 }
269 public static final native void memmove (AtkActionIface dest, int /*long*/ src);
270 public static final native void memmove (AtkComponentIface dest, int /*long*/ src);
271 public static final native void memmove (AtkHypertextIface dest, int /*long*/ src);
272 public static final native void memmove (AtkObjectClass dest, int /*long*/ src);
273 public static final native void memmove (AtkObjectFactoryClass dest, int /*long*/ src);
274 public static final native void memmove (AtkSelectionIface dest, int /*long*/ src);
275 public static final native void memmove (AtkTextIface dest, int /*long*/ src);
276 public static final native void memmove (GtkAccessible dest, int /*long*/ src);
277 public static final native void memmove (int /*long*/ dest, AtkActionIface src);
278 public static final native void memmove (int /*long*/ dest, AtkComponentIface src);
279 public static final native void memmove (int /*long*/ dest, AtkHypertextIface src);
280 public static final native void memmove (int /*long*/ dest, AtkObjectClass src);
281 public static final native void memmove (int /*long*/ dest, AtkObjectFactoryClass src);
282 public static final native void memmove (int /*long*/ dest, AtkSelectionIface src);
283 public static final native void memmove (int /*long*/ dest, AtkTextIface src);
284 }
285
Popular Tags