|
1 /******************************************************************************* |
|
2 * Copyright (c) 2009, 2010 Nokia Corporation and/or its subsidiary(-ies). |
|
3 * All rights reserved. This program and the accompanying materials |
|
4 * are made available under the terms of the Eclipse Public License v1.0 |
|
5 * which accompanies this distribution, and is available at |
|
6 * http://www.eclipse.org/legal/epl-v10.html |
|
7 * |
|
8 * Contributors: |
|
9 * Nokia Corporation - initial implementation |
|
10 *******************************************************************************/ |
|
11 package org.eclipse.swt.internal.qt; |
|
12 |
|
13 |
|
14 import org.eclipse.swt.SWT; |
|
15 import org.eclipse.swt.graphics.Point; |
|
16 import org.eclipse.swt.graphics.Rectangle; |
|
17 import org.eclipse.swt.internal.Library; |
|
18 |
|
19 public final class OS { |
|
20 |
|
21 static { |
|
22 Library.loadLibrary("eswtqt"); |
|
23 } |
|
24 |
|
25 public static final int WS_SYMBIAN_S60 = 1; |
|
26 public static final int WS_X11 = 2; |
|
27 |
|
28 // Underlying window server. WS_X11 if X11, WS_SYMBIAN_S60 otherwise. |
|
29 public static final int windowServer = windowServer(); |
|
30 |
|
31 // QEventLoop ProcessEventsFlags |
|
32 public static final int QEVENTLOOP_ALLEVENTS = 0; |
|
33 public static final int QEVENTLOOP_EXCLUDEUSERINPUTEVENTS = 0x01; |
|
34 public static final int QEVENTLOOP_WAITFORMOREEVENTS = 0x04; |
|
35 public static final int QEVENTLOOP_X11EXCLUDETIMERS = 0x08; |
|
36 |
|
37 // QT Key Codes |
|
38 public static final int QT_KEY_ALT =0x01000023; |
|
39 public static final int QT_KEY_ALTGR = 0x01001103; |
|
40 public static final int QT_KEY_META = 0x01000022; |
|
41 public static final int QT_KEY_SHIFT = 0x01000020; |
|
42 public static final int QT_KEY_CONTROL = 0x01000021; |
|
43 public static final int QT_KEY_LEFT = 0x01000012; |
|
44 public static final int QT_KEY_UP = 0x01000013; |
|
45 public static final int QT_KEY_RIGHT = 0x01000014; |
|
46 public static final int QT_KEY_DOWN = 0x01000015; |
|
47 public static final int QT_KEY_PAGEUP = 0x01000016; |
|
48 public static final int QT_KEY_PAGEDOWN = 0x01000017; |
|
49 public static final int QT_KEY_HOME = 0x01000010; |
|
50 public static final int QT_KEY_END = 0x01000011; |
|
51 public static final int QT_KEY_INSERT = 0x01000006; |
|
52 public static final int QT_KEY_BACKSPACE = 0x01000003; |
|
53 public static final int QT_KEY_RETURN = 0x01000004; |
|
54 public static final int QT_KEY_DELETE = 0x01000007; |
|
55 public static final int QT_KEY_ESCAPE = 0x01000000; |
|
56 public static final int QT_KEY_ENTER = 0x01000005; |
|
57 public static final int QT_KEY_TAB = 0x01000001; |
|
58 public static final int QT_KEY_BACKTAB = 0x01000002; |
|
59 public static final int QT_KEY_F1 = 0x01000030; |
|
60 public static final int QT_KEY_F2 = 0x01000031; |
|
61 public static final int QT_KEY_F3 = 0x01000032; |
|
62 public static final int QT_KEY_F4 = 0x01000033; |
|
63 public static final int QT_KEY_F5 = 0x01000034; |
|
64 public static final int QT_KEY_F6 = 0x01000035; |
|
65 public static final int QT_KEY_F7 = 0x01000036; |
|
66 public static final int QT_KEY_F8 = 0x01000037; |
|
67 public static final int QT_KEY_F9 = 0x01000038; |
|
68 public static final int QT_KEY_F10 = 0x01000039; |
|
69 public static final int QT_KEY_F11 = 0x0100003a; |
|
70 public static final int QT_KEY_F12 = 0x0100003b; |
|
71 public static final int QT_KEY_F13 = 0x0100003c; |
|
72 public static final int QT_KEY_F14 = 0x0100003d; |
|
73 public static final int QT_KEY_F15 = 0x0100003e; |
|
74 public static final int QT_KEY_CAPSLOCK = 0x01000024; |
|
75 public static final int QT_KEY_NUMLOCK = 0x01000025; |
|
76 public static final int QT_KEY_SCROLLLOCK = 0x01000026; |
|
77 public static final int QT_KEY_PAUSE = 0x01000008; |
|
78 public static final int QT_KEY_PRINT = 0x01000009; |
|
79 public static final int QT_KEY_HELP = 0x01000058; |
|
80 public static final int QT_KEY_ASTERISK = 0x2a; |
|
81 public static final int QT_KEY_PLUS = 0x2b; |
|
82 public static final int QT_KEY_MINUS = 0x2d; |
|
83 public static final int QT_KEY_PERIOD = 0x2e; |
|
84 public static final int QT_KEY_SLASH = 0x2f; |
|
85 public static final int QT_KEY_0 = 0x30; |
|
86 public static final int QT_KEY_1 = 0x31; |
|
87 public static final int QT_KEY_2 = 0x32; |
|
88 public static final int QT_KEY_3 = 0x33; |
|
89 public static final int QT_KEY_4 = 0x34; |
|
90 public static final int QT_KEY_5 = 0x35; |
|
91 public static final int QT_KEY_6 = 0x36; |
|
92 public static final int QT_KEY_7 = 0x37; |
|
93 public static final int QT_KEY_8 = 0x38; |
|
94 public static final int QT_KEY_9 = 0x39; |
|
95 public static final int QT_KEY_EQUAL = 0x3d; |
|
96 public static final int QT_KEY_A = 0x41; |
|
97 public static final int QT_KEY_B = 0x42; |
|
98 public static final int QT_KEY_C = 0x43; |
|
99 public static final int QT_KEY_D = 0x44; |
|
100 public static final int QT_KEY_E = 0x45; |
|
101 public static final int QT_KEY_F = 0x46; |
|
102 public static final int QT_KEY_G = 0x47; |
|
103 public static final int QT_KEY_H = 0x48; |
|
104 public static final int QT_KEY_I = 0x49; |
|
105 public static final int QT_KEY_J = 0x4a; |
|
106 public static final int QT_KEY_K = 0x4b; |
|
107 public static final int QT_KEY_L = 0x4c; |
|
108 public static final int QT_KEY_M = 0x4d; |
|
109 public static final int QT_KEY_N = 0x4e; |
|
110 public static final int QT_KEY_O = 0x4f; |
|
111 public static final int QT_KEY_P = 0x50; |
|
112 public static final int QT_KEY_Q = 0x51; |
|
113 public static final int QT_KEY_R = 0x52; |
|
114 public static final int QT_KEY_S = 0x53; |
|
115 public static final int QT_KEY_T = 0x54; |
|
116 public static final int QT_KEY_U = 0x55; |
|
117 public static final int QT_KEY_V = 0x56; |
|
118 public static final int QT_KEY_W = 0x57; |
|
119 public static final int QT_KEY_X = 0x58; |
|
120 public static final int QT_KEY_Y = 0x59; |
|
121 public static final int QT_KEY_Z = 0x5a; |
|
122 public static final int QT_KEY_UNKNOWN = 0x01ffffff; |
|
123 |
|
124 // Mask for non-printable keys |
|
125 public static final int QT_NONPRINTABLEKEYMASK = 0x01000000; |
|
126 |
|
127 // Max widget size |
|
128 public static final int QWIDGETSIZE_MAX = 16777215; |
|
129 |
|
130 // Qt KeyboardModifiers |
|
131 public static final int QT_NOMODIFIER = 0x00000000; //No modifier key is pressed. |
|
132 public static final int QT_SHIFTMODIFIER = 0x02000000; //A Shift key on the keyboard is pressed. |
|
133 public static final int QT_CONTROLMODIFIER = 0x04000000; //A Ctrl key on the keyboard is pressed. |
|
134 public static final int QT_ALTMODIFIER = 0x08000000; // An Alt key on the keyboard is pressed. |
|
135 public static final int QT_METAMODIFIER = 0x10000000; // A Meta key on the keyboard is pressed. |
|
136 public static final int QT_KEYPADMODIFIER = 0x20000000; //A keypad button is pressed. |
|
137 public static final int QT_GROUPSWITCHMODIFIER = 0x40000000;// X11 only. A Mode_switch key on the keyboard is pressed. |
|
138 |
|
139 // Qt Event type ids |
|
140 public static final int QEVENT_NONE = 0; |
|
141 public static final int QEVENT_MOUSEBUTTONPRESS = 2; |
|
142 public static final int QEVENT_MOUSEBUTTONRELEASE = 3; |
|
143 public static final int QEVENT_MOUSEBUTTONDBLCLICK = 4; |
|
144 public static final int QEVENT_MOUSEMOVE = 5; |
|
145 public static final int QEVENT_KEYPRESS = 6; |
|
146 public static final int QEVENT_KEYRELEASE = 7; |
|
147 public static final int QEVENT_FOCUSIN = 8; // Focus is about to be gained |
|
148 public static final int QEVENT_FOCUSOUT = 9; // Focus is about to be lost |
|
149 public static final int QEVENT_PAINT = 12; |
|
150 public static final int QEVENT_MOVE = 13; |
|
151 public static final int QEVENT_RESIZE = 14; |
|
152 public static final int QEVENT_CLOSE = 19; |
|
153 public static final int QEVENT_WINDOWACTIVATE = 24; |
|
154 public static final int QEVENT_WINDOWDEACTIVATE = 25; |
|
155 public static final int QEVENT_APPLICATIONFONTCHANGE = 36; |
|
156 public static final int QEVENT_APPLICATIONLAYOUTDIRECTIONCHANGE = 37; |
|
157 public static final int QEVENT_APPLICATIONPALETTECHANGE = 38; |
|
158 public static final int QEVENT_SHORTCUTOVERRIDE = 51; |
|
159 public static final int QEVENT_DEFERREDDELETE = 52; |
|
160 public static final int QEVENT_CONTEXTMENU = 82; |
|
161 public static final int QEVENT_WINDOWSTATECHANGE = 105; |
|
162 public static final int QEVENT_SHORTCUT = 117; |
|
163 public static final int QEVENT_REQUESTSOFTWAREINPUTPANEL = 199; |
|
164 |
|
165 // QInputContextFactory key |
|
166 public static final String QINPUTCONTEXT_COEFEP = "coefep"; |
|
167 |
|
168 |
|
169 // CntServicesContact actions |
|
170 public static final String CNT_ACTIONALL = "all"; |
|
171 public static final String CNT_ACTIONCALL ="call"; |
|
172 public static final String CNT_ACTIONSMS = "sms"; |
|
173 public static final String CNT_ACTIONEMAIL= "email"; |
|
174 |
|
175 // CntServicesContact filters |
|
176 public static final String CNT_DISPLAYALL = "all"; |
|
177 public static final String CNT_FILTERDISPLAYFAVORITES = "favorites"; |
|
178 |
|
179 |
|
180 |
|
181 |
|
182 // Implementation specific codes for the signals emitted by the Qt widgets |
|
183 public static final int QSIGNAL_ID_RANGE_FIRST = 1000; |
|
184 public static final int QSIGNAL_PRESSED = QSIGNAL_ID_RANGE_FIRST; |
|
185 public static final int QSIGNAL_RELEASED = QSIGNAL_ID_RANGE_FIRST + 2; |
|
186 public static final int QSIGNAL_TIMEOUT = QSIGNAL_ID_RANGE_FIRST + 3; |
|
187 public static final int QSIGNAL_ABOUTTOSHOW = QSIGNAL_ID_RANGE_FIRST + 4; |
|
188 public static final int QSIGNAL_ABOUTTOHIDE = QSIGNAL_ID_RANGE_FIRST + 5; |
|
189 public static final int QSIGNAL_TRIGGERED = QSIGNAL_ID_RANGE_FIRST + 6; |
|
190 public static final int QSIGNAL_HOVER = QSIGNAL_ID_RANGE_FIRST + 7; |
|
191 public static final int QSIGNAL_SELECTIONCHANGED = QSIGNAL_ID_RANGE_FIRST + 8; |
|
192 public static final int QSIGNAL_TEXT_CHANGED = QSIGNAL_ID_RANGE_FIRST + 9; |
|
193 public static final int QSIGNAL_SLIDER_CHANGED = QSIGNAL_ID_RANGE_FIRST + 10; |
|
194 public static final int QSIGNAL_RETURN_PRESSED = QSIGNAL_ID_RANGE_FIRST + 11; |
|
195 public static final int QSIGNAL_LIST_ITEMSELECTION_CHANGED = QSIGNAL_ID_RANGE_FIRST + 12; |
|
196 public static final int QSIGNAL_LIST_ITEM_DOUBLECLICKED = QSIGNAL_ID_RANGE_FIRST + 13; |
|
197 public static final int QSIGNAL_LIST_ITEM_ACTIVATED = QSIGNAL_ID_RANGE_FIRST + 14; |
|
198 public static final int QSIGNAL_TABLE_ITEMSELECTION_CHANGED = QSIGNAL_ID_RANGE_FIRST + 15; |
|
199 public static final int QSIGNAL_TABLE_CURRENTCELL_CHANGED = QSIGNAL_ID_RANGE_FIRST + 16; |
|
200 public static final int QSIGNAL_TABLE_CELL_CHANGED = QSIGNAL_ID_RANGE_FIRST + 17; |
|
201 public static final int QSIGNAL_TABLE_CELL_ACTIVATED = QSIGNAL_ID_RANGE_FIRST + 18; |
|
202 public static final int QSIGNAL_SLIDER_ACTION_TRIGGERED = QSIGNAL_ID_RANGE_FIRST + 19; |
|
203 public static final int QSIGNAL_SLIDER_RELEASED = QSIGNAL_ID_RANGE_FIRST + 20; |
|
204 public static final int QSIGNAL_LINKACTIVATED = QSIGNAL_ID_RANGE_FIRST + 21; |
|
205 public static final int QSIGNAL_DATETIMEEDIT_CHANGED = QSIGNAL_ID_RANGE_FIRST + 22; |
|
206 public static final int QSIGNAL_WEBVIEW_LINKCLICKED = QSIGNAL_ID_RANGE_FIRST + 23; |
|
207 public static final int QSIGNAL_WEBVIEW_LOADSTARTED = QSIGNAL_ID_RANGE_FIRST + 24; |
|
208 public static final int QSIGNAL_WEBVIEW_LOADPROGRESS = QSIGNAL_ID_RANGE_FIRST + 25; |
|
209 public static final int QSIGNAL_WEBVIEW_LOADFINISHED = QSIGNAL_ID_RANGE_FIRST + 26; |
|
210 public static final int QSIGNAL_WEBVIEW_STATUSBARMESSAGE = QSIGNAL_ID_RANGE_FIRST + 27; |
|
211 public static final int QSIGNAL_WEBVIEW_TITLECHANGED = QSIGNAL_ID_RANGE_FIRST + 28; |
|
212 public static final int QSIGNAL_WEBVIEW_URLCHANGED = QSIGNAL_ID_RANGE_FIRST + 29; |
|
213 public static final int QSIGNAL_TRAY_ACTIVATED = QSIGNAL_ID_RANGE_FIRST + 30; |
|
214 public static final int QSIGNAL_TREE_ITEMSELECTION_CHANGED = QSIGNAL_ID_RANGE_FIRST + 31; |
|
215 public static final int QSIGNAL_TREE_ITEM_ACTIVATED = QSIGNAL_ID_RANGE_FIRST + 32; |
|
216 public static final int QSIGNAL_TREE_ITEM_EXPANDED = QSIGNAL_ID_RANGE_FIRST + 33; |
|
217 public static final int QSIGNAL_TREE_ITEM_COLLAPSED= QSIGNAL_ID_RANGE_FIRST + 34; |
|
218 public static final int QSIGNAL_CURRENT_TAB_CHANGED = QSIGNAL_ID_RANGE_FIRST + 35; |
|
219 public static final int QSIGNAL_ABSTRACTITEMVIEW_ACTIVATED = QSIGNAL_ID_RANGE_FIRST + 36; |
|
220 public static final int QSIGNAL_TEXT_CURSORPOSITIONCHANGED = QSIGNAL_ID_RANGE_FIRST + 37; |
|
221 public static final int QSIGNAL_TEXT_SELECTIONCHANGED = QSIGNAL_ID_RANGE_FIRST + 38; |
|
222 public static final int QSIGNAL_QAPPLICATION_FOCUSCHANGED = QSIGNAL_ID_RANGE_FIRST + 39; |
|
223 public static final int QSIGNAL_QAPPLICATION_FOCUSCHANGED_TO_WIDDGET = QSIGNAL_ID_RANGE_FIRST + 40; |
|
224 public static final int QSIGNAL_CLICKED = QSIGNAL_ID_RANGE_FIRST + 41; |
|
225 public static final int QSIGNAL_QDESKTOPWIDGET_SCREENCOUNTCHANGED = QSIGNAL_ID_RANGE_FIRST + 42; |
|
226 public static final int QSIGNAL_REQUESTCOMPLETED = QSIGNAL_ID_RANGE_FIRST + 43; |
|
227 |
|
228 // Implementation specific event codes, not real Qt events but only used in this implementation |
|
229 // to implement events in situations that don't have a corresponding Qt event. |
|
230 public static final int QSWTEVENT_ID_RANGE_FIRST = 2000; |
|
231 public static final int QSWTEVENT_WIDGETPAINTED = QSWTEVENT_ID_RANGE_FIRST + 1; |
|
232 public static final int QSWTEVENT_WIDGETRESIZED = QSWTEVENT_ID_RANGE_FIRST + 2; |
|
233 public static final int QSWTEVENT_WIDGETMOVED = QSWTEVENT_ID_RANGE_FIRST + 3; |
|
234 public static final int QSWTEVENT_ENDKEYCLOSE = QSWTEVENT_ID_RANGE_FIRST + 4; |
|
235 public static final int QSWTEVENT_SYSTEMSHUTDOWN = QSWTEVENT_ID_RANGE_FIRST + 5; |
|
236 public static final int QSWTEVENT_BUFFERFLUSH = QSWTEVENT_ID_RANGE_FIRST + 6; |
|
237 public static final int QSWTEVENT_RESOURCECHANGE = QSWTEVENT_ID_RANGE_FIRST + 7; |
|
238 public static final int QSWTEVENT_MOBILEDEVICEOPENED = QSWTEVENT_ID_RANGE_FIRST + 8; |
|
239 public static final int QSWTEVENT_MOBILEDEVICECLOSED = QSWTEVENT_ID_RANGE_FIRST + 9; |
|
240 public static final int QSWTEVENT_SCREENACTIVATED = QSWTEVENT_ID_RANGE_FIRST + 10; |
|
241 public static final int QSWTEVENT_SCREENDEACTIVATED = QSWTEVENT_ID_RANGE_FIRST + 11; |
|
242 |
|
243 // Qt connection types for signal-slot connections |
|
244 public static final int QT_AUTOCONNECTION = 0; |
|
245 public static final int QT_DIRECTCONNECTION = 1; |
|
246 public static final int QT_QUEUEDCONNECTION = 2; |
|
247 public static final int QT_BLOCKINGQUEUEDCONNECTION = 4; |
|
248 |
|
249 // Qt focus reasons |
|
250 public static final int QT_MOUSEFOCUSREASON = 0; |
|
251 public static final int QT_TABFOCUSREASON = 1; |
|
252 public static final int QT_BACKTABFOCUSREASON = 2; |
|
253 public static final int QT_ACTIVEWINDOWFOCUSREASON = 3; |
|
254 public static final int QT_POPUPFOCUSREASON = 4; |
|
255 public static final int QT_SHORTCUTFOCUSREASON = 5; |
|
256 public static final int QT_MENUBARFOCUSREASON = 6; |
|
257 public static final int QT_OTHERFOCUSREASON = 7; |
|
258 |
|
259 // Qt shape |
|
260 public static final int QT_NOFRAME = 0; |
|
261 public static final int QT_FRAMEBOX = 0x0001; |
|
262 public static final int QT_FRAMEPANEL = 0x0002; |
|
263 public static final int QT_FRAMESTYLEDPANEL = 0x0006; |
|
264 public static final int QT_FRAMEHLINE = 0x0004; |
|
265 public static final int QT_FRAMEVLINE = 0x0005; |
|
266 public static final int QT_FRAMEWINPANEL = 0x0003; |
|
267 |
|
268 // Qt shadow |
|
269 public static final int QT_FRAMEPLAIN = 0x0010; |
|
270 public static final int QT_FRAMERAISED = 0x0020; |
|
271 public static final int QT_FRAMESUNKEN = 0x0030; |
|
272 |
|
273 // Qt Alignment |
|
274 public static final int QT_ALIGNLEFT = 0x0001; |
|
275 public static final int QT_ALIGNRIGHT = 0x0002; |
|
276 public static final int QT_ALIGNHCENTER = 0x0004; |
|
277 public static final int QT_ALIGNJUSTIFY = 0x0008; |
|
278 public static final int QT_ALIGNTOP = 0x0020; |
|
279 public static final int QT_ALIGNBOTTOM = 0x0040; |
|
280 public static final int QT_ALIGNVCENTER = 0x0080; |
|
281 |
|
282 // Qt InputMethodHints |
|
283 public static final int QT_IMHNOAUTOUPPERCASE = 0x2; |
|
284 public static final int QT_IMHPREFERUPPERCASE = 0x8; |
|
285 public static final int QT_IMHPREFERLOWERCASE = 0x10; |
|
286 public static final int QT_IMHNOPREDICTIVETEXT = 0x20; |
|
287 public static final int QT_IMHEMAILCHARACTERSONLY = 0x200000; |
|
288 public static final int QT_IMHURLCHARACTERSONLY = 0x400000; |
|
289 public static final int QT_IMHDIGITSONLY = 0x10000; |
|
290 public static final int QT_IMHFORMATTEDNUMBERSONLY = 0x20000; |
|
291 public static final int QT_IMHDIALABLECHARACTERSONLY = 0x100000; |
|
292 |
|
293 // Qt Mouse button |
|
294 public static final int QT_NOBUTTON = 0x0000; |
|
295 public static final int QT_LEFTBUTTON = 0x0001; |
|
296 public static final int QT_RIGHTBUTTON = 0x0002; |
|
297 public static final int QT_MIDBUTTON = 0x0004; |
|
298 |
|
299 // QDateTimeEdit array indexes |
|
300 public static final int QT_DATETIME_FIELD_COUNT = 6; |
|
301 public static final int QT_DATETIME_YEAR = 0; |
|
302 public static final int QT_DATETIME_MONTH = 1; |
|
303 public static final int QT_DATETIME_DAY = 2; |
|
304 public static final int QT_DATETIME_HOUR = 3; |
|
305 public static final int QT_DATETIME_MINUTE = 4; |
|
306 public static final int QT_DATETIME_SECOND = 5; |
|
307 |
|
308 // Qt Palette::ColorGroup |
|
309 public static final int QPALETTE_COLORGROUP_NORMAL = 0; |
|
310 public static final int QPALETTE_COLORGROUP_DISABLED = 1; |
|
311 public static final int QPALETTE_COLORGROUP_INACTIVE = 2; |
|
312 |
|
313 // Qt Palette::ColorRole |
|
314 public static final int QPALETTE_COLORROLE_WINDOW = 10; |
|
315 public static final int QPALETTE_COLORROLE_WINDOWTEXT = 0; |
|
316 public static final int QPALETTE_COLORROLE_BASE = 9; |
|
317 public static final int QPALETTE_COLORROLE_TEXT = 6; |
|
318 public static final int QPALETTE_COLORROLE_BUTTON = 1; |
|
319 public static final int QPALETTE_COLORROLE_BUTTONTEXT = 8; |
|
320 public static final int QPALETTE_COLORROLE_BRIGHTTEXT = 7; |
|
321 public static final int QPALETTE_COLORROLE_HIGHLIGHT = 12; |
|
322 public static final int QPALETTE_COLORROLE_HIGHLIGHTTEXT = 13; |
|
323 public static final int QPALETTE_COLORROLE_MIDLIGHT = 3; |
|
324 public static final int QPALETTE_COLORROLE_DARK = 4; |
|
325 public static final int QPALETTE_COLORROLE_MID = 5; |
|
326 |
|
327 // Qt QFont::Weight |
|
328 public static final int QT_FONTNORMAL = 50; |
|
329 public static final int QT_FONTBOLD = 75; |
|
330 |
|
331 |
|
332 //QFont::Style |
|
333 public static final int QFONT_STYLE_NORMAL = 0; |
|
334 public static final int QFONT_STYLE_ITALIC = 1; |
|
335 public static final int QFONT_STYLE_OBLIQUE = 2; |
|
336 |
|
337 // QFont::StyleStrategy |
|
338 public static final int QFONT_STYLESTRATEGY_PREFERDEFALUT = 0x0001; |
|
339 public static final int QFONT_STYLESTRATEGY_PREFERBITMAP = 0x0002; |
|
340 public static final int QFONT_STYLESTRATEGY_PREFERDEVICE = 0x0004; |
|
341 public static final int QFONT_STYLESTRATEGY_PREFEROUTLINE = 0x0008; |
|
342 public static final int QFONT_STYLESTRATEGY_FORCEOUTLINE = 0x0010; |
|
343 public static final int QFONT_STYLESTRATEGY_NOANTIALIAS = 0x0100; |
|
344 public static final int QFONT_STYLESTRATEGY_PREFERANTIALIAS = 0x0080; |
|
345 public static final int QFONT_STYLESTRATEGY_OPENGLCOMPATIABLE = 0x0200; |
|
346 public static final int QFONT_STYLESTRATEGY_NOFONTMERGING = 0x8000; |
|
347 public static final int QFONT_STYLESTRATEGY_PREFERMATCH = 0x0020; |
|
348 public static final int QFONT_STYLESTRATEGY_PREFERQUALITY = 0x0040; |
|
349 |
|
350 // Qt QAbstractItemView::SelectionBehavior |
|
351 public static final int QT_ABSTRACTITEMVIEW_SELECTIONBEHAVIOR_ITEMS = 0; |
|
352 public static final int QT_ABSTRACTITEMVIEW_SELECTIONBEHAVIOR_ROWS = 1; |
|
353 public static final int QT_ABSTRACTITEMVIEW_SELECTIONBEHAVIOR_COLUMNS = 2; |
|
354 |
|
355 // Qt QAbstractItemView::SelectionMode |
|
356 public static final int QT_ABSTRACTITEMVIEW_SELECTIONMODE_SINGLE = 1; |
|
357 public static final int QT_ABSTRACTITEMVIEW_SELECTIONMODE_CONTIGUOUS = 4; |
|
358 public static final int QT_ABSTRACTITEMVIEW_SELECTIONMODE_EXTENDED = 3; |
|
359 public static final int QT_ABSTRACTITEMVIEW_SELECTIONMODE_MULTI = 2; |
|
360 public static final int QT_ABSTRACTITEMVIEW_SELECTIONMODE_NONE = 0; |
|
361 |
|
362 // Qt QAbstractItemView::ScrollHint |
|
363 public static final int QT_ABSTRACTITEMVIEW_SCROLLHINT_ENSUREVISIBLE = 0; |
|
364 public static final int QT_ABSTRACTITEMVIEW_SCROLLHINT_POSITIONATTOP = 1; |
|
365 public static final int QT_ABSTRACTITEMVIEW_SCROLLHINT_POSITIONATBOTTOM = 2; |
|
366 public static final int QT_ABSTRACTITEMVIEW_SCROLLHINT_POSITIONATCENTER = 3; |
|
367 |
|
368 // Qt QListView::Flow |
|
369 public static final int QT_LISTVIEW_FLOW_LEFTTORIGHT = 0; |
|
370 public static final int QT_LISTVIEW_FLOW_TOPTOBOTTOM = 1; |
|
371 |
|
372 // Qt QListView::ViewMode |
|
373 public static final int QT_LISTVIEW_VIEWMODE_LIST = 0; |
|
374 public static final int QT_LISTVIEW_VIEWMODE_ICON = 1; |
|
375 |
|
376 // Qt QListView::Movement |
|
377 public static final int QT_LISTVIEW_MOVEMENT_STATIC = 0; |
|
378 public static final int QT_LISTVIEW_MOVEMENT_FREE = 1; |
|
379 public static final int QT_LISTVIEW_MOVEMENT_SNAP = 2; |
|
380 |
|
381 // Qt QListView::ResizeMode |
|
382 public static final int QT_LISTVIEW_RESIZEMODE_FIXED = 0; |
|
383 public static final int QT_LISTVIEW_RESIZEMODE_ADJUST = 1; |
|
384 |
|
385 // Qt QItemSelectionModel::SelectionFlags |
|
386 public static final int QT_ITEMSELECTIONMODEL_SELECTIONFLAGS_NONE = 0x0000; |
|
387 public static final int QT_ITEMSELECTIONMODEL_SELECTIONFLAGS_CLEAR = 0x0001; |
|
388 public static final int QT_ITEMSELECTIONMODEL_SELECTIONFLAGS_SELECT = 0x0002; |
|
389 public static final int QT_ITEMSELECTIONMODEL_SELECTIONFLAGS_DESELECT = 0x0004; |
|
390 public static final int QT_ITEMSELECTIONMODEL_SELECTIONFLAGS_TOGGLE = 0x0008; |
|
391 public static final int QT_ITEMSELECTIONMODEL_SELECTIONFLAGS_CURRENT = 0x0010; |
|
392 public static final int QT_ITEMSELECTIONMODEL_SELECTIONFLAGS_ROWS = 0x0020; |
|
393 public static final int QT_ITEMSELECTIONMODEL_SELECTIONFLAGS_COLUMNS = 0x0040; |
|
394 |
|
395 // Qt QLineEdit::EchoMode |
|
396 public static final int QLINEEDIT_ECHOMODE_NORMAL = 0; |
|
397 public static final int QLINEEDIT_ECHOMODE_NOECHO = 1; |
|
398 public static final int QLINEEDIT_ECHOMODE_PASSWORD = 2; |
|
399 public static final int QLINEEDIT_ECHOMODE_PASSWORDECHOONEDIT = 3; |
|
400 |
|
401 // Qt::QScrollBarPolicy |
|
402 public static final int QT_SCROLLBARASNEEDED = 0; |
|
403 public static final int QT_SCROLLBARALWAYSOFF = 1; |
|
404 public static final int QT_SCROLLBARALWAYSON = 2; |
|
405 |
|
406 // Qt::LayoutDirection |
|
407 public static final int QT_LEFTTORIGHT = 0; |
|
408 public static final int QT_RIGHTTOLEFT = 1; |
|
409 |
|
410 // Qt::CheckState |
|
411 public static final int QT_UNCHECKED = 0; |
|
412 public static final int QT_PARTIALLYCHECKED = 1; |
|
413 public static final int QT_CHECKED = 2; |
|
414 |
|
415 // Qt::Orientation |
|
416 public static final int QT_HORIZONTAL = 1; |
|
417 public static final int QT_VERTICAL = 2; |
|
418 |
|
419 // Qt::SortOrder |
|
420 public static final int QT_ASCENDINGORDER = 0; |
|
421 public static final int QT_DESCENDINGORDER= 1; |
|
422 |
|
423 // QTextOption::LineWrapMode |
|
424 public static final int QTEXTEDIT_NOWRAP = 0; |
|
425 public static final int QTEXTEDIT_WIDGETWIDTH = 1; |
|
426 public static final int QTEXTEDIT_FIXEDPIXELWIDTH = 2; |
|
427 public static final int QTEXTEDIT_FIXEDCOLUMNWIDTH = 3; |
|
428 |
|
429 // Qt::ItemDataRole |
|
430 public static final int QT_DISPLAYROLE = 0; |
|
431 public static final int QT_DECORATIONROLE = 1; |
|
432 public static final int QT_EDITROLE = 2; |
|
433 public static final int QT_TOOLTIPROLE = 3; |
|
434 public static final int QT_STATUSTIPROLE = 4; |
|
435 public static final int QT_WHATSTHISROLE = 5; |
|
436 public static final int QT_SIZEHINTROLE = 13; |
|
437 public static final int QT_FONTROLE = 6; |
|
438 public static final int QT_TEXTALIGNMENTROLE = 7; |
|
439 public static final int QT_BACKGROUNDROLE = 8; |
|
440 public static final int QT_BACKGROUNDCOLORROLE = 8; |
|
441 public static final int QT_FOREGROUNDROLE = 9; |
|
442 public static final int QT_TEXTCOLORROLE = 9; |
|
443 public static final int QT_CHECKSTATEROLE = 10; |
|
444 public static final int QT_ACCESSIBLETEXTROLE = 11; |
|
445 public static final int QT_ACCESSIBLEDESCRIPTIONROLE = 12; |
|
446 public static final int QT_USERROLE = 32; |
|
447 |
|
448 // Qt::ItemFlags |
|
449 public static final int QT_NOITEMFLAGS = 0; |
|
450 public static final int QT_ITEMISSELECTABLE = 1; |
|
451 public static final int QT_ITEMISEDITABLE = 2; |
|
452 public static final int QT_ITEMISDRAGENABLED = 4; |
|
453 public static final int QT_ITEMISDROPENABLED = 8; |
|
454 public static final int QT_ITEMISUSERCHECKABLE = 16; |
|
455 public static final int QT_ITEMISENABLED = 32; |
|
456 public static final int QT_ITEMISTRISTATE = 64; |
|
457 |
|
458 // Qt::WindowStates |
|
459 public static final int QT_WINDOWNOSTATE = 0x0; |
|
460 public static final int QT_WINDOWMINIMIZED = 0x1; |
|
461 public static final int QT_WINDOWMAXIMIZED = 0x2; |
|
462 public static final int QT_WINDOWFULLSCREEN = 0x4; |
|
463 public static final int QT_WINDOWACTIVE = 0x8; |
|
464 |
|
465 // QHeaderView::ResizeMode |
|
466 public static final int QT_RESIZEMODEINTERACTIVE = 0; |
|
467 public static final int QT_RESIZEMODEFIXED = 2; |
|
468 public static final int QT_RESIZEMODESTRETCH = 1; |
|
469 public static final int QT_RESIZEMODERESIZETOCONTENTS = 3; |
|
470 |
|
471 // QMessageBox buttons |
|
472 public static final int QMESSAGEBOX_OK = 0x00000400; |
|
473 public static final int QMESSAGEBOX_CANCEL = 0x00400000; |
|
474 public static final int QMESSAGEBOX_YES = 0x00004000; |
|
475 public static final int QMESSAGEBOX_NO = 0x00010000; |
|
476 public static final int QMESSAGEBOX_ABORT = 0x00040000; |
|
477 public static final int QMESSAGEBOX_RETRY = 0x00080000; |
|
478 public static final int QMESSAGEBOX_IGNORE = 0x00100000; |
|
479 |
|
480 // QMessageBox icon |
|
481 public static final int QMESSAGEBOX_NOICON = 0; |
|
482 public static final int QMESSAGEBOX_QUESTION = 4; |
|
483 public static final int QMESSAGEBOX_INFORMATION = 1; |
|
484 public static final int QMESSAGEBOX_WARNING = 2; |
|
485 public static final int QMESSAGEBOX_CRITICAL = 3; |
|
486 |
|
487 // Qt::FocusPolicy |
|
488 public static final int QT_FOCUSPOLICY_TABFOCUS = 0x1; |
|
489 public static final int QT_FOCUSPOLICY_CLICKFOCUS = 0x2; |
|
490 public static final int QT_FOCUSPOLICY_STRONGFOCUS = QT_FOCUSPOLICY_TABFOCUS | QT_FOCUSPOLICY_CLICKFOCUS | 0x8; |
|
491 public static final int QT_FOCUSPOLICY_WHEELFOCUS = QT_FOCUSPOLICY_STRONGFOCUS | 0x4; |
|
492 public static final int QT_FOCUSPOLICY_NOFOCUS = 0x0; |
|
493 |
|
494 // QComboBox::SizeAdjustPolicy |
|
495 public static final int QT_QComboBox_AdjustToContents = 0; |
|
496 public static final int QT_QComboBox_AdjustToMinimumContentsLength = 2; |
|
497 |
|
498 // QComboBox::InsertPolicy |
|
499 public static final int QT_QComboBox_NoInsert = 0; |
|
500 |
|
501 // QAbstractSlider::SliderAction |
|
502 public static final int QT_SLIDERNOACTION = 0; |
|
503 public static final int QT_SLIDERSINGLESTEPADD = 1; |
|
504 public static final int QT_SLIDERSINGLESTEPSUB = 2; |
|
505 public static final int QT_SLIDERPAGESTEPADD = 3; |
|
506 public static final int QT_SLIDERPAGESTEPUSB = 4; |
|
507 public static final int QT_SLIDERTOMINIMUM = 5; |
|
508 public static final int QT_SLIDERTOMAXIMUM = 6; |
|
509 public static final int QT_SLIDERMOVE = 7; |
|
510 |
|
511 // Qt::TextInteractionFlags |
|
512 public static final int QT_NOTEXTINTERACTION = 0; |
|
513 public static final int QT_TEXTSELECTABLEBYMOUSE = 1; |
|
514 public static final int QT_TEXTSELECTABLEBYKEYBOARD = 2; |
|
515 public static final int QT_LINKSACCESSIBLEBYMOUSE = 4; |
|
516 public static final int QT_LINKSACCESSIBLEBYKEYBOARD = 8; |
|
517 public static final int QT_TEXTEDITABLE = 16; |
|
518 public static final int QT_TEXTEDITORINTERACTION = QT_TEXTSELECTABLEBYMOUSE | QT_TEXTSELECTABLEBYKEYBOARD | QT_TEXTEDITABLE; |
|
519 public static final int QT_TEXTBROWSERINTERACTION = QT_TEXTSELECTABLEBYMOUSE | QT_LINKSACCESSIBLEBYMOUSE | QT_LINKSACCESSIBLEBYKEYBOARD; |
|
520 |
|
521 // QSystemTrayIcon::ActivationReason |
|
522 public static final int QT_TRAY_REASON_UNKNOWN = 0; |
|
523 public static final int QT_TRAY_REASON_CONTEXT = 1; |
|
524 public static final int QT_TRAY_REASON_DOUBLECLICK = 2; |
|
525 public static final int QT_TRAY_REASON_TRIGGER = 3; |
|
526 public static final int QT_TRAY_REASON_MIDDLECLICK = 4; |
|
527 |
|
528 // Qt::WindowFlags |
|
529 public static final int QT_WINDOWFLAGS_WINDOW = 0x1; |
|
530 public static final int QT_WINDOWFLAGS_DIALOG = 0x2 | QT_WINDOWFLAGS_WINDOW; |
|
531 public static final int QT_WINDOWFLAGS_TOOLTIP = 0xc | QT_WINDOWFLAGS_WINDOW; |
|
532 public static final int QT_WINDOWFLAGS_FRAMELESSWINDOWHINT = 0x800; |
|
533 public static final int QT_WINDOWFLAGS_CUSTOMIZEWINDOWHINT = 0x2000000; |
|
534 public static final int QT_WINDOWFLAGS_WINDOWTITLEHINT = 0x1000; |
|
535 public static final int QT_WINDOWFLAGS_WINDOWSYSTEMMENUHINT = 0x2000; |
|
536 public static final int QT_WINDOWFLAGS_WINDOWMINIMIZEBUTTONHINT = 0x4000; |
|
537 public static final int QT_WINDOWFLAGS_WINDOWMAXIMIZEBUTTONHINT = 0x8000; |
|
538 public static final int QT_WINDOWFLAGS_WINDOWSTAYSONTOPHINT = 0x40000; |
|
539 public static final int QT_WINDOWFLAGS_WINDOWCLOSEBUTTONHINT = 0x8000000; |
|
540 |
|
541 // Qt::WindowModality |
|
542 public static final int QT_WINDOWMODALITY_NONMODAL = 0; |
|
543 public static final int QT_WINDOWMODALITY_WINDOWMODAL = 1; |
|
544 public static final int QT_WINDOWMODALITY_APPLICATIONMODAL = 2; |
|
545 |
|
546 // Qt::WidgetAttribute |
|
547 public static final int QT_WA_NOSYSTEMBACKGROUND = 9; |
|
548 public static final int QT_WA_STATICCONTENTS = 5; |
|
549 public static final int QT_WA_PAINTOUTSIDEPAINTEVENT = 13; |
|
550 public static final int QT_WA_PAINTONSCREEN = 8; |
|
551 public static final int QT_WA_PAINTUNCLIPPED = 52; |
|
552 public static final int QT_WA_INPUTMETHODENABLED = 14; |
|
553 |
|
554 // QStyle::StandardPixmap |
|
555 public static final int QSTYLE_SP_MESSAGEBOXINFORMATION = 9; |
|
556 public static final int QSTYLE_SP_MESSAGEBOXWARNING = 10; |
|
557 public static final int QSTYLE_SP_MESSAGEBOXCRITICAL = 11; |
|
558 public static final int QSTYLE_SP_MESSAGEBOXQUESTION = 12; |
|
559 |
|
560 // QLayout::SizeConstraint |
|
561 public static final int QLAYOUT_SIZECONSTRAINT_SETDEFAULTCONSTRAINT = 0; |
|
562 public static final int QLAYOUT_SIZECONSTRAINT_SETNOCONSTRAINT = 1; |
|
563 |
|
564 |
|
565 //QAction::SoftKeyRole |
|
566 public static final int QACTION_NOSOFTKEY=0; |
|
567 public static final int QACTION_POSITIVESOFTKEY =1; |
|
568 public static final int QACTION_NEGATIVESOFTKEY = 2; |
|
569 public static final int QACTION_SELECTSOFTKEY= 3; |
|
570 |
|
571 public static final int QCHAR_DIRAL=13; |
|
572 public static final int QCHAR_DIRAN=5; |
|
573 public static final int QCHAR_DIRB=7; |
|
574 public static final int QCHAR_DIRBN=18; |
|
575 public static final int QCHAR_DIRCS=6; |
|
576 public static final int QCHAR_DIREN=2; |
|
577 public static final int QCHAR_DIRES=3; |
|
578 public static final int QCHAR_DIRET=4; |
|
579 public static final int QCHAR_DIRL=0; |
|
580 public static final int QCHAR_DIRLRE=11; |
|
581 public static final int QCHAR_DIRLRO=12; |
|
582 public static final int QCHAR_DIRNSM=17; |
|
583 public static final int QCHAR_DIRON=10; |
|
584 public static final int QCHAR_DIRPDF=16; |
|
585 public static final int QCHAR_DIRR=1; |
|
586 public static final int QCHAR_DIRRLE=14; |
|
587 public static final int QCHAR_DIRRLO=15; |
|
588 public static final int QCHAR_DIRS=8; |
|
589 public static final int QCHAR_DIRWS=9; |
|
590 public static final int SYMBIAN_KEYBOARD_KEYPAD=1; |
|
591 public static final int SYMBIAN_KEYBOARD_FULL=2; |
|
592 |
|
593 |
|
594 // |
|
595 // QApplication |
|
596 // |
|
597 public static final native int QApplication_swt_new(int jniUtilsHandle); |
|
598 public static final native int QApplication_swt_palette_new(); |
|
599 public static final native int QApplication_swt_palette_new(int widget); |
|
600 public static final native int QApplication_focusWidget(); |
|
601 public static final native void QApplication_setQuitOnLastWindowClosed(boolean quit); |
|
602 public static final native int QApplication_desktop(); |
|
603 public static final native int QApplication_swt_desktopPaintDevice(); |
|
604 public static final native int QApplication_activeWindow(); |
|
605 public static final native void QApplication_beep(); |
|
606 public static final native int QApplication_swt_font_new(); |
|
607 public static final native int QApplication_swt_font_new(int widgetHandle); |
|
608 public static final native void QApplication_syncX(); |
|
609 public static final native int QApplication_doubleClickInterval(); |
|
610 public static final native int QApplication_style(); |
|
611 public static final native int QApplication_layoutDirection(); |
|
612 public static final native void QApplication_setLayoutDirection(int direction); |
|
613 public static final native void QApplication_setDoubleClickInterval(int interval); |
|
614 public static final native boolean QApplication_autoSipEnabled(); |
|
615 public static final native void QApplication_setStyleSheet(String style); |
|
616 public static final native void QApplication_closeAllWindows(); |
|
617 |
|
618 // |
|
619 // QCoreApplication |
|
620 // |
|
621 public static final native int QCoreApplication_instance(); |
|
622 public static final native void QCoreApplication_setApplicationName( int handle, String name ); |
|
623 public static final native void QCoreApplication_processEvents( int handle, int flags ); |
|
624 public static final native void QCoreApplication_sendPostedEvents ( int handle ); |
|
625 public static final native void QCoreApplication_sendPostedEvents ( int handle, int receiver, int event_type); |
|
626 public static final native boolean QCoreApplication_hasPendingEvents ( int handle ); |
|
627 public static final native void QCoreApplication_postEvent ( int handle, int receiver, int event ); |
|
628 public static final native void QCoreApplication_sendEvent ( int handle, int receiver, int event ); |
|
629 |
|
630 // |
|
631 // QAbstractEventDispatcher |
|
632 // |
|
633 public static final native int QAbstractEventDispatcher_instance( int threadHandle ); |
|
634 public static final native void QAbstractEventDispatcher_wakeup( int handle ); |
|
635 public static final native void QAbstractEventDispatcher_interrupt( int handle ); |
|
636 |
|
637 // |
|
638 // QMainWindow |
|
639 // |
|
640 public static final native int QMainWindow_new( int parent, int flags ); |
|
641 public static final native void QMainWindow_setMenuBar( int handle, int menuBarHandle ); |
|
642 public static final native void QMainWindow_setCentralWidget(int handle, int widget); |
|
643 |
|
644 // |
|
645 // QPaintDevice |
|
646 // |
|
647 public static final native int QPaintDevice_depth(int handle); |
|
648 public static final native int QPaintDevice_physicalDpiX(int handle); |
|
649 public static final native int QPaintDevice_physicalDpiY(int handle); |
|
650 public static final native int QPaintDevice_width(int handle); |
|
651 public static final native int QPaintDevice_height(int handle); |
|
652 public static final native boolean QPaintDevice_paintingActive(int handle); |
|
653 |
|
654 // |
|
655 // QWidget |
|
656 // |
|
657 public static final native int QWidget_new(int parent, int flags); |
|
658 public static final native void QWidget_addAction(int handle, int actionHandle); |
|
659 public static final native void QWidget_setVisible( int handle, boolean visible ); |
|
660 public static final native boolean QWidget_isVisible(int handle); |
|
661 public static final native boolean QWidget_isVisibleTo(int handle, int parentHandle); |
|
662 public static final native void QWidget_setParent( int handle, int parent ); |
|
663 public static final native void QWidget_resize(int handle, int width, int height); |
|
664 public static final native void QWidget_update(int handle, int x, int y, int width, int height); |
|
665 public static final native void QWidget_update(int handle); |
|
666 public static final native void QWidget_repaint(int handle, int x, int y, int width, int height); |
|
667 public static final native Rectangle QWidget_rect(int handle); |
|
668 public static final native Point QWidget_sizeHint(int handle); |
|
669 public static final native void QWidget_setMaximumSize(int handle, int maxw, int maxh); |
|
670 public static final native void QWidget_setMinimumSize(int handle, int minw, int minh); |
|
671 public static final native Point QWidget_maximumSize(int handle); |
|
672 public static final native Point QWidget_minimumSize(int handle); |
|
673 public static final native Point QWidget_frameSize(int handle); |
|
674 public static final native Rectangle QWidget_geometry(int handle); |
|
675 public static final native Rectangle QWidget_frameGeometry(int handle); |
|
676 public static final native void QWidget_setGeometry(int handle, int x, int y, int width, int height); |
|
677 public static final native void QWidget_move(int handle, int x, int y); |
|
678 public static final native Point QWidget_pos(int handle); |
|
679 public static final native Point QWidget_size(int handle); |
|
680 public static final native int QWidget_swt_palette_new( int handle ); |
|
681 public static final native void QWidget_setPalette( int handle, int palette ); |
|
682 public static final native void QWidget_swt_unsetPalette(int handle); |
|
683 public static final native void QWidget_setAutoFillBackground ( int handle, boolean enabled ); |
|
684 public static final native void QWidget_setFocus(int handle, int focusReason); |
|
685 public static final native void QWidget_setFont( int handle, int fontHandle ); |
|
686 public static final native void QWidget_activateWindow(int handle); |
|
687 public static final native boolean QWidget_isActiveWindow(int handle); |
|
688 public static final native void QWidget_raise(int handle); |
|
689 public static final native void QWidget_lower(int handle); |
|
690 public static final native Point QWidget_mapTo(int handle, int parent, int x, int y); |
|
691 public static final native Point QWidget_mapToGlobal(int handle, int x, int y); |
|
692 public static final native Point QWidget_mapFromGlobal(int handle, int x, int y); |
|
693 public static final native int[] QWidget_actions( int handle ); |
|
694 public static final native int QWidget_actions_size( int handle ); |
|
695 public static final native void QWidget_updateGeometry(int handle); |
|
696 public static final native void QWidget_insertAction(int handle, int beforeHandle, int actionHandle) ; |
|
697 public static final native boolean QWidget_isEnabled(int handle); |
|
698 public static final native boolean QWidget_isEnabledTo(int handle, int parent); |
|
699 public static final native void QWidget_setEnabled(int handle, boolean enabled); |
|
700 public static final native boolean QWidget_isHidden(int handle); |
|
701 public static final native void QWidget_setContentsMargins(int handle, int left, int top, int right, int bottom); |
|
702 public static final native void QWidget_setToolTip(int handle, String toolTip); |
|
703 public static final native String QWidget_toolTip(int handle); |
|
704 public static final native void QWidget_stackUnder(int handle, int widget); |
|
705 public static final native void QWidget_setWindowTitle(int handle, String title); |
|
706 public static final native String QWidget_windowTitle(int handle); |
|
707 public static final native void QWidget_setWindowIcon(int handle, int icon); |
|
708 public static final native void QWidget_setWindowIconText(int handle, String text); |
|
709 public static final native void QWidget_setLayout(int handle, int layoutHandle); |
|
710 public static final native void QWidget_setLayoutDirection(int handle, int layoutDirection); |
|
711 public static final native int QWidget_layoutDirection(int handle); |
|
712 public static final native void QWidget_removeAction( int handle, int actionHandle ); |
|
713 public static final native int QWidget_swt_font_new( int handle ); |
|
714 public static final native int QWidget_window(int handle); |
|
715 public static final native boolean QWidget_isModal(int handle); |
|
716 public static final native int QWidget_heightForWidth(int handle, int width); |
|
717 public static final native int QWidget_windowState(int handle); |
|
718 public static final native void QWidget_setWindowState(int handle, int windowState); |
|
719 public static final native int QWidget_focusPolicy(int handle); |
|
720 public static final native void QWidget_setFocusPolicy(int handle, int policy); |
|
721 public static final native void QWidget_setWindowModality(int handle, int modality); |
|
722 public static final native int QWidget_layout(int handle); |
|
723 public static final native void QWidget_setFocusProxy(int handle, int proxyHandle); |
|
724 public static final native int QWidget_focusProxy(int handle); |
|
725 public static final native int QWidget_windowFlags(int handle); |
|
726 public static final native void QWidget_setWindowFlags(int handle, int type); |
|
727 public static final native void QWidget_setFixedSize(int handle, int width, int height); |
|
728 public static final native void QWidget_setAttribute(int handle, int attribute, boolean on); |
|
729 public static final native void QWidget_setInputMethodHints(int handle, int attribute); |
|
730 public static final native int QWidget_inputMethodHints(int handle); |
|
731 public static final native void QWidget_clearFocus(int handle); |
|
732 public static final native void QWidget_scroll(int handle, int dx, int dy, int x, int y, int w, int h); |
|
733 public static final native void QWidget_setWindowOpacity(int handle, double level); |
|
734 public static final native double QWidget_windowOpacity(int handle); |
|
735 public static final native void QWidget_setUpdatesEnabled(int handle, boolean enable); |
|
736 public static final native void QWidget_grabMouse(int handle); |
|
737 public static final native void QWidget_releaseMouse(int handle); |
|
738 public static final native int QWidget_mouseGrabber(); |
|
739 public static final native int QWidget_swt_paintDevice(int handle); |
|
740 public static final native void QWidget_setStyleSheet(int handle, String style); |
|
741 public static final native String QWidget_styleSheet( int handle ); |
|
742 public static final native void QWidget_setInputContext(int handle, int inputContextHandle); |
|
743 public static final native boolean QWidget_testAttribute(int handle, int attribute); |
|
744 |
|
745 // |
|
746 // QFontMetrics |
|
747 // |
|
748 public static final native int QWidget_QFontMetrics_lineSpacing(int widgetHandle); |
|
749 |
|
750 // |
|
751 // QDesktopWidget |
|
752 // |
|
753 public static final native Rectangle QDesktopWidget_availableGeometry(int handle, int index); |
|
754 public static final native int QDesktopWidget_primaryScreen(int desktopWidgetHandle); |
|
755 public static final native int QDesktopWidget_screenCount(int desktopWidgetHandle); |
|
756 public static final native int QDesktopWidget_screen(int handle, int index); |
|
757 public static final native Rectangle QDesktopWidget_screenGeometry(int handle, int index); |
|
758 public static final native int QDesktopWidget_screenNumber(int desktopWidgetHandle, int handle); |
|
759 |
|
760 // |
|
761 // QObject |
|
762 // |
|
763 public static final native void QObject_installEventFilter( int handle, int filter ); |
|
764 public static final native void QObject_removeEventFilter( int handle, int filter ); |
|
765 public static final native void QObject_setProperty (int handle, String name, int value ); |
|
766 public static final native int QObject_property (int handle, String name ); |
|
767 static final native void QObject_delete( int handle ); // Protected on purpose, use QObjectDeleteWrapper |
|
768 public static final native void QObject_setParent( int handle, int parent ); |
|
769 public static final native int QObject_parent( int handle ); |
|
770 static final native void QObject_deleteLater(int handle); // Protected on purpose, use QObjectDeleteWrapper |
|
771 private static final native boolean QObject_connect( int sender, String signal, int receiver, String slot, int connectionType); |
|
772 public static final void QObject_connectOrThrow( int sender, String signal, int receiver, String slot, int connectionType) { |
|
773 if(!QObject_connect( sender, signal, receiver, slot, connectionType)) { |
|
774 SWT.error(SWT.ERROR_UNSPECIFIED); |
|
775 } |
|
776 } |
|
777 public static final native int QObject_thread ( int handle ); |
|
778 public static final native int[] QObject_children(int handle); |
|
779 public static final native void QObject_dumpObjectInfo(int handle); |
|
780 public static final native void QObject_dumpObjectTree(int handle); |
|
781 public static final native void QObject_setObjectName(int handle, String value); |
|
782 |
|
783 // |
|
784 // QAbstractButton |
|
785 // |
|
786 public static final native void QAbstractButton_setCheckable(int handle, boolean checkable); |
|
787 public static final native void QAbstractButton_setText(int handle, String text); |
|
788 public static final native String QAbstractButton_text(int handle); |
|
789 public static final native void QAbstractButton_setChecked(int handle, boolean checked); |
|
790 public static final native boolean QAbstractButton_isChecked(int handle); |
|
791 public static final native void QAbstractButton_setIcon(int handle, int iconHandle); |
|
792 public static final native void QAbstractButton_setIconSize(int handle, int w, int h); |
|
793 public static final native void QAbstractButton_setAutoExclusive(int handle, boolean auto); |
|
794 public static final native void QAbstractButton_click(int handle); |
|
795 |
|
796 // |
|
797 // QPushButton |
|
798 // |
|
799 public static final native int QPushButton_new(); |
|
800 public static final native void QPushButton_setFlat(int handle, boolean flat); |
|
801 public static final native void QPushButton_setDefault(int handle, boolean def); |
|
802 public static final native boolean QPushButton_isDefault(int handle); |
|
803 |
|
804 // |
|
805 // QRadioButton |
|
806 // |
|
807 public static final native int QRadioButton_new(); |
|
808 |
|
809 // |
|
810 // QCheckBox |
|
811 // |
|
812 public static final native int QCheckBox_new(); |
|
813 |
|
814 // |
|
815 // QFrame |
|
816 // |
|
817 public static final native int QFrame_new(); |
|
818 public static final native void QFrame_setFrameStyle( int handle, int style ); |
|
819 public static final native int QFrame_frameWidth( int handle); |
|
820 public static final native void QFrame_setLineWidth( int handle, int width ); |
|
821 public static final native int QFrame_frameShape( int handle ); |
|
822 |
|
823 // |
|
824 // QAbstractScrollArea |
|
825 // |
|
826 public static final native int QAbstractScrollArea_viewPort(int handle); |
|
827 public static final native int QAbstractScrollArea_horizontalScrollBar(int handle); |
|
828 public static final native int QAbstractScrollArea_verticalScrollBar(int handle); |
|
829 public static final native void QAbstractScrollArea_setHorizontalScrollBarPolicy(int handle, int policy); |
|
830 public static final native void QAbstractScrollArea_setVerticalScrollBarPolicy(int handle, int policy); |
|
831 public static final native void QAbstractScrollArea_setCornerWidget(int handle, int widget); |
|
832 public static final native int QAbstractScrollArea_cornerWidget(int handle); |
|
833 |
|
834 // |
|
835 // QScrollArea |
|
836 // |
|
837 // Note that you can't call any QScrollArea specific functions in the base |
|
838 // classes common to widgets - only QAbstractScrollArea stuff that all |
|
839 // Scrollables implement. So there should not be anything needed from |
|
840 // QScrollArea besides creating it. |
|
841 // |
|
842 public static final native int QScrollArea_new(int parent); |
|
843 |
|
844 // |
|
845 // QScrollBar |
|
846 // |
|
847 public static final native int QScrollBar_value(int handle); |
|
848 public static final native void QScrollBar_setValue(int handle, int value); |
|
849 |
|
850 // |
|
851 // QAbstractSlider |
|
852 // |
|
853 public static final native int QAbstractSlider_singleStep(int handle); |
|
854 public static final native int QAbstractSlider_maximum(int handle); |
|
855 public static final native int QAbstractSlider_minimum(int handle); |
|
856 public static final native int QAbstractSlider_pageStep(int handle); |
|
857 public static final native int QAbstractSlider_value(int handle); |
|
858 public static final native void QAbstractSlider_setSingleStep(int handle, int value); |
|
859 public static final native void QAbstractSlider_setMaximum(int handle, int value); |
|
860 public static final native void QAbstractSlider_setMinimum(int handle, int value); |
|
861 public static final native void QAbstractSlider_setPageStep(int handle, int value); |
|
862 public static final native void QAbstractSlider_setValue(int handle, int value); |
|
863 // |
|
864 // QLabel |
|
865 // |
|
866 public static final native String QLabel_text( int handle ); |
|
867 public static final native void QLabel_setText( int handle, String text ); |
|
868 public static final native void QLabel_setAlignment ( int handle, int alignment ); |
|
869 public static final native void QLabel_setWordWrap ( int handle, boolean wrap ); |
|
870 public static final native void QLabel_setPixmap ( int handle, int imageHandle ); |
|
871 public static final native int QLabel_new(); |
|
872 public static final native void QLabel_setBuddy(int handle, int buddy); |
|
873 public static final native void QLabel_setTextInteractionFlags(int handle, int flags); |
|
874 public static final native void QLabel_setOpenExternalLinks(int handle, boolean bool); |
|
875 |
|
876 // |
|
877 // QLineEdit |
|
878 // |
|
879 public static final native int QLineEdit_new(); |
|
880 public static final native void QLineEdit_setText(int handle, String text); |
|
881 public static final native void QLineEdit_cut(int handle); |
|
882 public static final native void QLineEdit_copy(int handle); |
|
883 public static final native String QLineEdit_text(int handle); |
|
884 public static final native void QLineEdit_insert(int handle, String string); |
|
885 public static final native void QLineEdit_setMaxLength(int handle, int maxLength); |
|
886 public static final native int QLineEdit_maxLength(int handle); |
|
887 public static final native void QLineEdit_setSelection(int handle, int start, int length); |
|
888 public static final native int QLineEdit_cursorPosition(int handle); |
|
889 public static final native void QLineEdit_setCursorPosition(int handle, int position); |
|
890 public static final native void QLineEdit_deselect(int handle); |
|
891 public static final native void QLineEdit_end(int handle, boolean mark); |
|
892 public static final native void QLineEdit_setReadOnly(int handle, boolean readOnly); |
|
893 public static final native boolean QLineEdit_isReadOnly(int handle); |
|
894 public static final native String QLineEdit_selectedText(int handle); |
|
895 public static final native int QLineEdit_selectionStart(int handle); |
|
896 public static final native void QLineEdit_selectAll(int handle); |
|
897 public static final native void QLineEdit_setEchoMode(int handle, int echoMode); |
|
898 public static final native int QLineEdit_echoMode(int handle); |
|
899 public static final native void QLineEdit_setAlignment(int handle, int alignment); |
|
900 public static final native void QLineEdit_setFrame(int handle, boolean showFrame); |
|
901 public static final native int QLineEdit_swt_getBorderWidth(int handle); |
|
902 public static final native void QLineEdit_setValidator(int handle, int validatorHandle); |
|
903 public static final native Point QLineEdit_swt_preferredClientSize(int handle); |
|
904 |
|
905 // |
|
906 // QTextEdit |
|
907 // |
|
908 public static final native int QTextEdit_new(); |
|
909 public static final native String QTextEdit_toPlainText(int handle); |
|
910 public static final native void QTextEdit_setPlainText(int handle, String text); |
|
911 public static final native void QTextEdit_setHtml(int handle, String html); |
|
912 public static final native void QTextEdit_insertPlainText(int handle, String text); |
|
913 public static final native void QTextEdit_cut(int handle); |
|
914 public static final native void QTextEdit_copy(int handle); |
|
915 public static final native void QTextEdit_setReadOnly(int handle, boolean readOnly); |
|
916 public static final native boolean QTextEdit_isReadOnly(int handle); |
|
917 public static final native Rectangle QTextEdit_cursorRect(int handle); |
|
918 public static final native void QTextEdit_ensureCursorVisible(int handle); |
|
919 public static final native void QTextEdit_setAlignment(int handle, int alignment); |
|
920 public static final native void QTextEdit_setLineWrapMode(int handle, int wrapMode); |
|
921 |
|
922 public static final native void QTextEdit_swt_append(int handle, String string); |
|
923 public static final native int QTextEdit_swt_getLineCount(int handle); |
|
924 public static final native int QTextEdit_swt_getLineHeight(int handle); |
|
925 public static final native void QTextEdit_swt_setTopIndex(int handle, int lineIndex); |
|
926 public static final native int QTextEdit_swt_getTopIndex(int handle); |
|
927 public static final native int QTextEdit_swt_getCaretPosition(int handle); |
|
928 public static final native void QTextEdit_swt_clearSelection(int handle); |
|
929 public static final native String QTextEdit_swt_getSelectionText(int handle); |
|
930 public static final native int QTextEdit_swt_selectionStart(int handle); |
|
931 public static final native int QTextEdit_swt_selectionEnd(int handle); |
|
932 public static final native void QTextEdit_swt_setCursorPosition(int handle, int position, boolean moveCursorAnchor); |
|
933 public static final native void QTextEdit_swt_selectAll(int handle); |
|
934 public static final native int QTextEdit_swt_getCaretLineNumber(int handle); |
|
935 public static final native int QTextEdit_swt_getCharCount(int handle); |
|
936 public static final native Point QTextEdit_swt_preferredClientSize(int handle, int wHint); |
|
937 |
|
938 // |
|
939 // QValidator |
|
940 // |
|
941 public static final native int QRegExpValidator_new(int parentHandle, String regExp); |
|
942 public static final native boolean QValidator_validate(int handle, String string); |
|
943 |
|
944 // |
|
945 // QMenu |
|
946 // |
|
947 public static final native int QMenu_new( int parentHandle ); |
|
948 public static final native void QMenu_addAction( int parentHandle, int handle ); |
|
949 public static final native int QMenu_exec( int handle, int x, int y, int actionHandle ); |
|
950 public static final native void QMenu_setDefaultAction(int handle, int actionHandle ); |
|
951 public static final native int QMenu_defaultAction( int handle ); |
|
952 public static final native void QMenu_popup(int handle, int x, int y, int actionHandle); |
|
953 |
|
954 // |
|
955 // QMenuBar |
|
956 // |
|
957 public static final native int QMenuBar_new( int parentHandle ); |
|
958 public static final native void QMenuBar_addAction( int menuBarHandle, int actionHandle ); |
|
959 |
|
960 // |
|
961 // QAction |
|
962 // |
|
963 public static final native int QAction_new( int parentHandle ); |
|
964 public static final native void QAction_setSeparator( int handle, boolean bool ); |
|
965 public static final native void QAction_setCheckable( int handle, boolean bool ); |
|
966 public static final native void QAction_setText(int handle, String text); |
|
967 public static final native void QAction_setIconText(int handle, String text); |
|
968 public static final native void QAction_setMenu(int handle, int menuHandle ); |
|
969 public static final native void QAction_setShortcut(int handle, int keySequenceHandle); |
|
970 public static final native void QAction_setEnabled(int handle, boolean enabled); |
|
971 public static final native boolean QAction_isEnabled(int handle); |
|
972 public static final native void QAction_setChecked(int handle, boolean selected); |
|
973 public static final native boolean QAction_isChecked(int handle); |
|
974 public static final native void QAction_setIcon(int handle, int iconHandle); |
|
975 public static final native void QAction_setSoftKeyRole(int handle, int role); |
|
976 // |
|
977 // QActionGroup |
|
978 // |
|
979 public static final native int QActionGroup_new(int handle); |
|
980 public static final native void QActionGroup_setExclusive( int actionGroupHandle, boolean b); |
|
981 public static final native void QActionGroup_addAction(int actionGroupHandle, int handle); |
|
982 public static final native void QActionGroup_removeAction(int actionGroupHandle, int handle); |
|
983 |
|
984 // |
|
985 // QPixmap |
|
986 // |
|
987 public static final native boolean QPixmap_load( int handle, String fileName ); |
|
988 public static final native int QPixmap_new(); |
|
989 public static final native void QPixmap_delete(int handle); |
|
990 public static final native int QPixmap_swt_paintDevice(int handle); |
|
991 |
|
992 // |
|
993 // QPalette |
|
994 // |
|
995 public static final native void QPalette_setColor ( int handle, int group, int role, int red, int green, int blue ); |
|
996 public static final native void QPalette_setColor ( int handle, int role, int red, int green, int blue ); |
|
997 public static final native int[] QPalette_color ( int handle, int group, int role ); |
|
998 public static final native void QPalette_delete( int handle ); |
|
999 public static final native void QPalette_swt_setBrush(int handle, int role, int pixmap); |
|
1000 public static final native void QPalette_swt_copyBrushFromPalette(int handle, int sourceHandle, int role); |
|
1001 |
|
1002 // |
|
1003 // QTimer |
|
1004 // |
|
1005 public static final native int QTimer_new(); |
|
1006 public static final native void QTimer_setSingleShot(int handle, boolean singleShot); |
|
1007 public static final native void QTimer_start(int handle, int msec); |
|
1008 |
|
1009 // |
|
1010 // QFont |
|
1011 // |
|
1012 public static final native int QFont_new( String family, int pointSize, int weight, boolean italic ); |
|
1013 public static final native int QFont_new(); |
|
1014 public static final native String QFont_family( int handle ); |
|
1015 public static final native int QFont_weight( int handle ); |
|
1016 public static final native int QFont_pointSize( int handle ); |
|
1017 public static final native boolean QFont_italic( int handle ); |
|
1018 public static final native void QFont_delete( int hanlde ); |
|
1019 public static final native void QFont_setUnderline(int handle, boolean enable); |
|
1020 public static final native void QFont_setOverline(int handle, boolean enable); |
|
1021 public static final native void QFont_setStrikeOut(int handle, boolean enable); |
|
1022 public static final native void QFont_setStretch(int handle, int stretch); |
|
1023 public static final native void QFont_setFixedPitch(int handle, boolean enable); |
|
1024 public static final native void QFont_setStyle(int handle, int style); |
|
1025 public static final native void QFont_setWeight(int handle, int weight); |
|
1026 public static final native void QFont_setStyleStrategy(int handle, int strategy); |
|
1027 public static final native void QFont_setRawName(int handle, String rawName); |
|
1028 public static final native boolean QFont_underline(int handle); |
|
1029 public static final native boolean QFont_overline(int handle); |
|
1030 public static final native boolean QFont_strikeOut(int handle); |
|
1031 public static final native int QFont_stretch(int handle); |
|
1032 public static final native boolean QFont_fixedPitch(int handle); |
|
1033 public static final native int QFont_style(int handle); |
|
1034 public static final native int QFont_styleStrategy(int handle); |
|
1035 public static final native boolean QFont_swt_equals(int handle, int handle2); |
|
1036 |
|
1037 // |
|
1038 // QFontDatabase in Device |
|
1039 // |
|
1040 public static final native int QFontDatabase_new(); |
|
1041 public static final native String[] QFontDatabase_families( int fontDbHandle ); |
|
1042 public static final native int[] QFontDatabase_swt_heights( int fontDbHandle, String family, String style ); |
|
1043 public static final native boolean QFontDatabase_isScalable( int fontDbHandle, String family, String style ); |
|
1044 public static final native String[] QFontDatabase_styles( int fontDbHandle, String family ); |
|
1045 public static final native boolean QFontDatabase_bold( int fontDbHandle, String family, String style ); |
|
1046 public static final native boolean QFontDatabase_italic( int fontDbHandle, String family, String style ); |
|
1047 public static final native void QFontDatabase_delete(int handle); |
|
1048 |
|
1049 // |
|
1050 // QKeySequence |
|
1051 // |
|
1052 public static final native int QKeySequence_new(int i); |
|
1053 public static final native void QKeySequence_delete(int aHandle); |
|
1054 |
|
1055 // |
|
1056 // QIcon |
|
1057 // |
|
1058 public static final native int QIcon_new(int pixmap); |
|
1059 public static final native int QIcon_new(); |
|
1060 public static final native void QIcon_delete(int handle); |
|
1061 public static final native int QIcon_pixmap(int handle, int w, int h); |
|
1062 |
|
1063 // |
|
1064 // AbstractListModel |
|
1065 // |
|
1066 public static final native int ListModel_new( int style, int parent, int listType ); |
|
1067 public static final native void ListModel_beginInsertRows( int handle, int parentIndexHandle, int first, int last ); |
|
1068 public static final native void ListModel_endInsertRows(int handle ); |
|
1069 public static final native void ListModel_beginRemoveRows( int handle, int parentIndexHandle, int first, int last ); |
|
1070 public static final native void ListModel_endRemoveRows(int handle ); |
|
1071 public static final native void ListModel_layoutAboutToBeChanged( int handle ); |
|
1072 public static final native void ListModel_layoutChanged( int handle ); |
|
1073 public static final native void ListModel_setCheckState( int handle, int selectionHandle, int state ); |
|
1074 public static final native void ListModel_append( int handle, String string ); |
|
1075 public static final native void ListModel_append( int handle, String string, int imageHandle ); |
|
1076 public static final native void ListModel_append( int handle, String detailText, int[] detailImageHandles, int detailImageCount, String headingText, int[] headingImageHandles, int headingImageCount ); |
|
1077 public static final native void ListModel_insert( int handle, String string, int index ); |
|
1078 public static final native void ListModel_insert( int handle, String string, int index, int imageHandle ); |
|
1079 public static final native String ListModel_itemString( int handle, int index ); |
|
1080 public static final native int ListModel_itemHeight( int handle ); |
|
1081 public static final native int ListModel_insertPosition( int handle, String string, boolean ascent ); |
|
1082 public static final native String[] ListModel_itemStrings( int handle ); |
|
1083 public static final native int ListModel_indexOf( int handle, String string, int start ); |
|
1084 public static final native void ListModel_remove( int handle, int index ); |
|
1085 public static final native void ListModel_setItem( int handle, int index, String string ); |
|
1086 public static final native void ListModel_setItem( int handle, int index, String string, int imageHandle ); |
|
1087 public static final native void ListModel_clearList(int dataModelHandle); |
|
1088 |
|
1089 // |
|
1090 // ListItemDelegate |
|
1091 // |
|
1092 public static final native int ListBoxItemDelegate_new( int parentHandle ); |
|
1093 public static final native void ListBoxItemDelegate_setHeadingFont( int handle, int fontHandle ); |
|
1094 |
|
1095 // |
|
1096 // QAbstractItemModel |
|
1097 // |
|
1098 public static final native int QAbstractItemModel_index( int handle, int row, int column, int parentIndexHandle ); |
|
1099 public static final native int QAbstractItemModel_rowCount (int handle ); |
|
1100 |
|
1101 // |
|
1102 // QModelIndex |
|
1103 // |
|
1104 public static final native int QModelIndex_row( int handle ); |
|
1105 public static final native void QModelIndex_delete( int handle ); |
|
1106 |
|
1107 // |
|
1108 // QItemSelectionModel |
|
1109 // |
|
1110 public static final native void QItemSelectionModel_select( int handle, int indexHandle, int command ); |
|
1111 public static final native void QItemSelectionModel_select( int handle, int startIndexHandle, int endIndexHandle, int command ); |
|
1112 public static final native void QItemSelectionModel_select__set( int handle, int selectionHandle, int command); |
|
1113 public static final native void QItemSelectionModel_clearSelection( int handle ); |
|
1114 public static final native int QItemSelectionModel_currentIndex( int handle ); |
|
1115 public static final native void QItemSelectionModel_setCurrentIndex( int handle, int indexHandle, int command ); |
|
1116 public static final native int[] QItemSelectionModel_selectedRows( int handle, int column ); |
|
1117 public static final native boolean QItemSelectionModel_isSelected ( int handle, int indexHandle ); |
|
1118 |
|
1119 // |
|
1120 // QAbstractItemView |
|
1121 // |
|
1122 public static final native void QAbstractItemView_clearSelection(int handle); |
|
1123 public static final native Point QAbstractItemView_iconSize(int handle); |
|
1124 public static final native void QAbstractItemView_scrollTo(int handle, int modelIndexHandle, int scrollHint); |
|
1125 public static final native void QAbstractItemView_selectAll(int handle); |
|
1126 public static final native int QAbstractItemView_selectionModel(int handle ); |
|
1127 public static final native void QAbstractItemView_setIconSize(int handle, int x, int y); |
|
1128 public static final native void QAbstractItemView_setModel(int handle, int dataModelHandle); |
|
1129 public static final native void QAbstractItemView_setSelectionBehavior(int handle, int behavior); |
|
1130 public static final native void QAbstractItemView_setSelectionMode(int handle, int mode); |
|
1131 public static final native int QAbstractItemView_sizeHintForColumn(int handle, int column); |
|
1132 public static final native Point QAbstractItemView_sizeHintForIndex(int handle, int row, int column); |
|
1133 public static final native int QAbstractItemView_sizeHintForRow(int handle, int row); |
|
1134 public static final native int QAbstractItemView_swt_indexAt(int handle, int x, int y); |
|
1135 public static final native void QAbstractItemView_swt_removeRows(int handle, int row, int count); |
|
1136 public static final native void QAbstractItemView_update(int handle, int indexHandle); |
|
1137 public static final native Rectangle QAbstractItemView_visualRect(int handle, int row, int column); |
|
1138 public static final native int QAbstractItemView_currentIndex(int handle); |
|
1139 |
|
1140 // |
|
1141 // QListView |
|
1142 // |
|
1143 public static final native int QListView_new(); |
|
1144 public static final native int QListView_flow(int handle); |
|
1145 public static final native Point QListView_gridSize(int handle); |
|
1146 public static final native int QListView_resizeMode(int handle); |
|
1147 public static final native void QListView_setFlow(int handle, int flow); |
|
1148 public static final native void QListView_setItemDelegate(int handle, int itemDelegateHandle); |
|
1149 public static final native void QListView_setMovement(int handle, int movement); |
|
1150 public static final native void QListView_setViewMode(int handle, int mode); |
|
1151 public static final native void QListView_setGridSize(int handle, int width, int height); |
|
1152 public static final native void QListView_setResizeMode(int handle, int mode); |
|
1153 public static final native void QListView_setSpacing(int handle, int spacing); |
|
1154 public static final native int QListView_spacing(int handle); |
|
1155 |
|
1156 // |
|
1157 // QModelIndexList |
|
1158 // |
|
1159 public static final native int QModelIndexList_size(int handle); |
|
1160 public static final native int QModelIndexList_at(int handle, int index); |
|
1161 |
|
1162 // |
|
1163 // QSlider |
|
1164 // |
|
1165 public static final native int QSlider_new(); |
|
1166 public static final native int QSlider_singleStep(int handle); |
|
1167 public static final native int QSlider_maximum(int handle); |
|
1168 public static final native int QSlider_minimum(int handle); |
|
1169 public static final native int QSlider_pageStep(int handle); |
|
1170 public static final native int QSlider_value(int handle); |
|
1171 public static final native void QSlider_setSingleStep(int handle, int value); |
|
1172 public static final native void QSlider_setMaximum(int handle, int value); |
|
1173 public static final native void QSlider_setMinimum(int handle, int value); |
|
1174 public static final native void QSlider_setPageStep(int handle, int value); |
|
1175 public static final native void QSlider_setValue(int handle, int value); |
|
1176 public static final native void QSlider_setOrientation(int handle, int value); |
|
1177 |
|
1178 // |
|
1179 // QColor |
|
1180 // |
|
1181 public static final native int QColor_new(); |
|
1182 public static final native int QColor_new(int red, int green, int blue); |
|
1183 public static final native int QColor_red(int handle); |
|
1184 public static final native int QColor_green(int handle); |
|
1185 public static final native int QColor_blue(int handle); |
|
1186 public static final native void QColor_setRed(int handle, int red); |
|
1187 public static final native void QColor_setGreen(int handle, int green); |
|
1188 public static final native void QColor_setBlue(int handle, int blue); |
|
1189 public static final native void QColor_delete(int handle); |
|
1190 public static final native boolean QColor_equals(int handle, int compareHandle); |
|
1191 public static final native boolean QColor_isValid(int handle); |
|
1192 |
|
1193 // |
|
1194 // QColorDialog |
|
1195 // |
|
1196 public static final native int QColorDialog_getColor(int initialColor, int parentHandle, String dialogId, int layoutDirection) ; |
|
1197 |
|
1198 // |
|
1199 // QTableWidget |
|
1200 // |
|
1201 public static final native int QTableWidget_new(); |
|
1202 public static final native void QTableWidget_clearContents(int handle); |
|
1203 public static final native int QTableWidget_column(int handle, int columnHandle); |
|
1204 public static final native int QTableWidget_columnCount(int handle); |
|
1205 public static final native int QTableWidget_currentColumn(int handle); |
|
1206 public static final native int QTableWidget_currentRow(int handle); |
|
1207 public static final native void QTableWidget_insertRow(int handle, int row); |
|
1208 public static final native void QTableWidget_insertColumn(int handle, int column); |
|
1209 public static final native int QTableWidget_itemAt(int handle, int x, int y); |
|
1210 public static final native void QTableWidget_scrollToItem(int handle, int itemHandle, int scrollHint); |
|
1211 public static final native void QTableWidget_setCellWidget(int handle, int row, int column, int widgetHandle); |
|
1212 public static final native void QTableWidget_setColumnCount(int handle, int columnCount); |
|
1213 public static final native void QTableWidget_setCurrentCell(int handle, int row, int column); |
|
1214 public static final native void QTableWidget_setCurrentItem(int handle, int itemHandle); |
|
1215 public static final native void QTableWidget_setItem(int handle, int row, int column, int itemHandle); |
|
1216 public static final native void QTableWidget_setRowCount(int handle, int rowCount); |
|
1217 public static final native void QTableWidget_removeColumn(int handle, int column); |
|
1218 public static final native void QTableWidget_removeRow(int handle, int row); |
|
1219 public static final native int QTableWidget_row(int handle, int rowHandle); |
|
1220 public static final native int QTableWidget_rowCount(int handle); |
|
1221 public static final native int QTableWidget_topIndex(int handle); |
|
1222 public static final native Rectangle QTableWidget_visualItemRect(int handle, int itemHandle); |
|
1223 |
|
1224 public static final native int QTableWidget_swt_header(int handle, boolean horizontalHeader); |
|
1225 public static final native int QTableWidget_swt_headerHeight(int handle, boolean horizontalHeader); |
|
1226 public static final native int QTableWidget_swt_headerItem(int handle, int index); |
|
1227 public static final native int QTableWidget_swt_headerSize(int handle, boolean horizontalHeader, int index); |
|
1228 public static final native boolean QTableWidget_swt_headerVisible(int handle, boolean horizontalHeader); |
|
1229 public static final native void QTableWidget_swt_resizeHeaderSection(int handle, boolean horizontalHeader, int index, int size); |
|
1230 public static final native int[] QTableWidget_swt_selectedItems(int handle); |
|
1231 public static final native int QTableWidget_swt_selectionCount(int handle); |
|
1232 public static final native void QTableWidget_swt_setHeaderIcon(int handle, int index, int iconHandle); |
|
1233 public static final native void QTableWidget_swt_setHeaderText(int handle, int column, String text); |
|
1234 public static final native void QTableWidget_swt_setHeaderVisible(int handle, boolean horizontalHeader, boolean visible); |
|
1235 |
|
1236 // |
|
1237 // QTableView |
|
1238 // |
|
1239 public static final native int QTableView_columnWidth(int handle, int column); |
|
1240 public static final native int QTableView_rowAt(int handle, int y); |
|
1241 public static final native int QTableView_rowHeight(int handle, int row); |
|
1242 public static final native void QTableView_setColumnHidden(int handle, int column, boolean hide); |
|
1243 public static final native void QTableView_setColumnWidth(int handle, int column, int width); |
|
1244 public static final native void QTableView_setRowHeight(int handle, int row, int height); |
|
1245 public static final native void QTableView_setShowGrid(int handle, boolean show); |
|
1246 public static final native void QTableView_setWordWrap(int handle, boolean on); |
|
1247 public static final native void QTableView_showColumn(int handle, int column); |
|
1248 public static final native boolean QTableView_showGrid(int handle); |
|
1249 public static final native void QTableView_showRow(int handle, int row); |
|
1250 |
|
1251 // |
|
1252 // QTableWidgetItem |
|
1253 // |
|
1254 public static final native int QTableWidgetItem_new(); |
|
1255 public static final native int QTableWidgetItem_data(int handle, int role); |
|
1256 public static final native void QTableWidgetItem_delete(int handle); |
|
1257 public static final native int QTableWidgetItem_flags(int handle); |
|
1258 public static final native boolean QTableWidgetItem_grayed(int handle); |
|
1259 public static final native boolean QTableWidgetItem_isSelected(int handle); |
|
1260 public static final native void QTableWidgetItem_setData(int handle, int role, int data); |
|
1261 public static final native void QTableWidgetItem_setFlags(int handle, int flags); |
|
1262 public static final native void QTableWidgetItem_setIcon(int handle, int iconHandle); |
|
1263 public static final native void QTableWidgetItem_setSelected(int handle, boolean selected); |
|
1264 public static final native void QTableWidgetItem_setText(int handle, String text); |
|
1265 public static final native void QTableWidgetItem_setTextAlignment(int handle, int alignment); |
|
1266 public static final native String QTableWidgetItem_text(int handle); |
|
1267 |
|
1268 public static final native void QTableWidgetItem_swt_setBackground(int handle, int red, int green, int blue, boolean restore); |
|
1269 public static final native void QTableWidgetItem_swt_setFont(int handle, int fontHandle); |
|
1270 public static final native void QTableWidgetItem_swt_setForeground(int handle, int red, int green, int blue, boolean restore); |
|
1271 public static final native void QTableWidgetItem_swt_setGrayed(int handle, boolean grayed); |
|
1272 |
|
1273 // |
|
1274 // QHeaderView |
|
1275 // |
|
1276 public static final native int QHeaderView_resizeMode(int handle, int index); |
|
1277 public static final native int QHeaderView_sectionSizeHint(int handle, int index); |
|
1278 public static final native void QHeaderView_setResizeMode(int handle, int index, int resizeMode); |
|
1279 |
|
1280 // |
|
1281 // QProgressBar |
|
1282 // |
|
1283 public static final native int QProgressBar_new(); |
|
1284 public static final native void QProgressBar_setOrientation(int handle,int orientation); |
|
1285 public static final native void QProgressBar_setTextInVisible(int handle); |
|
1286 public static final native void QProgressBar_setValue(int handle, int value); |
|
1287 public static final native void QProgressBar_setMinimum(int handle, int value); |
|
1288 public static final native void QProgressBar_setMaximum(int handle, int value); |
|
1289 |
|
1290 // |
|
1291 // QComboBox |
|
1292 // |
|
1293 public static final native int QComboBox_new(); |
|
1294 public static final native void QComboBox_clear(int handle); |
|
1295 public static final native int QComboBox_count(int handle); |
|
1296 public static final native int QComboBox_currentIndex(int handle); |
|
1297 public static final native int QComboBox_findText(int handle, String text); |
|
1298 public static final native int QComboBox_lineEdit(int handle); |
|
1299 public static final native int QComboBox_view(int handle); |
|
1300 public static final native void QComboBox_insertItem( int handle, String string,int index ); |
|
1301 public static final native String QComboBox_itemText(int handle, int index); |
|
1302 public static final native int QComboBox_maxVisibleItems(int handle); |
|
1303 public static final native void QComboBox_removeItem(int handle, int index); |
|
1304 public static final native void QComboBox_setCurrentIndex(int handle, int index); |
|
1305 public static final native void QComboBox_setEditable(int handle, boolean editable); |
|
1306 public static final native void QComboBox_setInsertPolicy(int handle, int policy); |
|
1307 public static final native void QComboBox_setItemText(int handle, String text, int index); |
|
1308 public static final native void QComboBox_setMaxVisibleItems(int handle, int count); |
|
1309 public static final native void QComboBox_setSizeAdjustPolicy(int handle, int adjustPolicy); |
|
1310 public static final native void QComboBox_swt_deselect(int handle); |
|
1311 public static final native int QComboBox_swt_getItemHeight(int handle); |
|
1312 public static final native Point QComboBox_swt_getSelection(int handle); |
|
1313 public static final native int QComboBox_swt_getTextHeight(int handle); |
|
1314 public static final native void QComboBox_swt_setItems(int handle, String [] items); |
|
1315 public static final native void QComboBox_swt_setText(int handle, String text); |
|
1316 |
|
1317 // |
|
1318 // QListWidget |
|
1319 // |
|
1320 public static final native int QListWidget_new(); |
|
1321 public static final native void QListWidget_addItem(int handle, String string, int iconHandle); |
|
1322 public static final native void QListWidget_addItems(int handle, String[] items, int[] iconHandles); |
|
1323 public static final native void QListWidget_clear(int handle); |
|
1324 public static final native int QListWidget_count(int handle); |
|
1325 public static final native int QListWidget_currentRow(int handle); |
|
1326 public static final native void QListWidget_insertItem(int handle, int index, String string, int iconHandle); |
|
1327 public static final native void QListWidget_scrollToItem(int handle, int index, int scrollHint); |
|
1328 public static final native void QListWidget_setSortingEnabled(int handle, boolean status); |
|
1329 public static final native void QListWidget_sortItems(int handle, int order); |
|
1330 public static final native int QListWidget_swt_indexOf(int handle, String text, int startIndex); |
|
1331 public static final native boolean QListWidget_swt_isItemVisible(int handle, int index); |
|
1332 public static final native boolean QListWidget_swt_isItemSelected(int handle, int index); |
|
1333 public static final native String QListWidget_swt_itemText(int handle, int index); |
|
1334 public static final native String[] QListWidget_swt_itemTexts(int handle); |
|
1335 public static final native void QListWidget_swt_removeArray(int handle, int[] arr, int count); |
|
1336 public static final native void QListWidget_swt_removeIndex(int handle, int index); |
|
1337 public static final native void QListWidget_swt_removeRange(int handle, int start, int end); |
|
1338 public static final native void QListWidget_swt_selectArray(int handle, int[] arr, int count, int command, boolean scrollFocus); |
|
1339 public static final native void QListWidget_swt_selectIndex(int handle, int index, int command); |
|
1340 public static final native void QListWidget_swt_selectRange(int handle, int start, int end, int command); |
|
1341 public static final native int[] QListWidget_swt_selectedRows(int handle, int column); |
|
1342 public static final native void QListWidget_swt_setFocusIndex(int handle, int index); |
|
1343 public static final native void QListWidget_swt_setItemVisible(int handle, int index, boolean status); |
|
1344 public static final native void QListWidget_swt_setText(int handle, int index, String text); |
|
1345 |
|
1346 // |
|
1347 // QTreeWidget |
|
1348 // |
|
1349 public static final native int QTreeWidget_new(); |
|
1350 public static final native void QTreeWidget_addTopLevelItem(int handle, int itemHandle); |
|
1351 public static final native int[] QTreeWidget_addTopLevelItems(int handle, int count); |
|
1352 public static final native void QTreeWidget_clear(int handle); |
|
1353 public static final native int QTreeWidget_currentItem(int handle); |
|
1354 public static final native int QTreeWidget_indexOfTopLevelItem(int handle, int itemHandle); |
|
1355 public static final native void QTreeWidget_insertTopLevelItem(int handle, int itemHandle, int index); |
|
1356 public static final native int QTreeWidget_itemAt(int handle, int xPos, int yPos); |
|
1357 public static final native void QTreeWidget_scrollToItem(int handle, int itemHandle, int scrollHint); |
|
1358 public static final native int[] QTreeWidget_selectedItems(int handle); |
|
1359 public static final native void QTreeWidget_setColumnCount(int handle, int count); |
|
1360 public static final native void QTreeWidget_setCurrentItem(int handle, int itemHandle); |
|
1361 public static final native void QTreeWidget_swt_setHeaderVisible(int handle, boolean visible); |
|
1362 public static final native void QTreeWidget_swt_setHeaderStretch(int handle, boolean visible); |
|
1363 public static final native int QTreeWidget_swt_selectionCount(int handle); |
|
1364 public static final native int QTreeWidget_swt_rowAt(int handle, int x, int y); |
|
1365 public static final native void QTreeWidget_takeTopLevelItem(int handle, int index); |
|
1366 public static final native Rectangle QTreeWidget_visualItemRect(int handle, int itemHandle); |
|
1367 |
|
1368 // |
|
1369 // QTreeWidgetItem |
|
1370 // |
|
1371 public static final native int QTreeWidgetItem_new(); |
|
1372 public static final native int[] QTreeWidgetItem_addChildren(int handle, int count); |
|
1373 public static final native int QTreeWidgetItem_checkState(int handle); |
|
1374 public static final native int QTreeWidgetItem_indexOfChild(int parentHandle, int childHandle); |
|
1375 public static final native void QTreeWidgetItem_insertChild(int handle, int childHandle, int index); |
|
1376 public static final native boolean QTreeWidgetItem_isExpanded(int handle); |
|
1377 public static final native void QTreeWidgetItem_removeChild(int parentHanle, int childHandle); |
|
1378 public static final native void QTreeWidgetItem_setCheckState(int handle, int flags); |
|
1379 public static final native void QTreeWidgetItem_setExpanded(int handle, boolean expanded); |
|
1380 public static final native void QTreeWidgetItem_setFlags(int handle, int flags); |
|
1381 public static final native void QTreeWidgetItem_setIcon(int handle, int imageHandle); |
|
1382 public static final native void QTreeWidgetItem_setSelected(int handle, boolean select); |
|
1383 public static final native void QTreeWidgetItem_setText(int handle, String text); |
|
1384 public static final native int QTreeWidgetItem_swt_isSameParent(int firstHandle, int lastHandle); |
|
1385 public static final native int QTreeWidget_swt_parentChildCount(int handle); |
|
1386 public static final native void QTreeWidgetItem_swt_setBackground(int handle, int red, int green, int blue, boolean restore); |
|
1387 public static final native void QTreeWidgetItem_swt_setFont(int handle, int fontHandle); |
|
1388 public static final native void QTreeWidgetItem_swt_setForeground(int handle, int red, int green, int blue, boolean restore); |
|
1389 |
|
1390 // |
|
1391 // QTreeView |
|
1392 // |
|
1393 public static final native int QTreeView_columnWidth(int handle, int column); |
|
1394 public static final native void QTreeView_resizeColumnToContents(int handle, int column); |
|
1395 public static final native void QTreeView_selectAll(int handle); |
|
1396 |
|
1397 // |
|
1398 // QSwtTimeEdit |
|
1399 // |
|
1400 public static final native int QSwtTimeEdit_swt_new(int style); |
|
1401 public static final native int QSwtTimeEdit_editor(int handle); |
|
1402 public static final native int QSwtTimeEdit_cursorPosition(int handle); |
|
1403 public static final native int QSwtTimeEdit_textLength(int handle); |
|
1404 public static final native void QSwtTimeEdit_swt_setTextVisible(int handle, boolean visible); |
|
1405 |
|
1406 // |
|
1407 // QDateTimeEdit |
|
1408 // |
|
1409 public static final native int QDateTimeEdit_new(); |
|
1410 public static final native int QDateTimeEdit_calendarWidget(int handle); |
|
1411 public static final native void QDateTimeEdit_setCalendarPopup(int handle, boolean enable); |
|
1412 public static final native void QDateTimeEdit_setDisplayFormat(int handle, String format); |
|
1413 public static final native int QDateTimeEdit_currentSectionIndex(int handle); |
|
1414 public static final native int QDateTimeEdit_sectionCount(int handle); |
|
1415 |
|
1416 public static final native int [] QDateTimeEdit_swt_dateTime(int handle); |
|
1417 public static final native void QDateTimeEdit_swt_setDate(int handle, int [] date); |
|
1418 public static final native void QDateTimeEdit_swt_setTime(int handle, int [] time); |
|
1419 public static final native void QDateTimeEdit_swt_setDateTime(int handle, int [] dateTime); |
|
1420 |
|
1421 // |
|
1422 // QOffsetTimeEdit |
|
1423 // |
|
1424 public static final native int QOffsetTimeEdit_new(); |
|
1425 public static final native int QOffsetTimeEdit_offset(int handle); |
|
1426 public static final native void QOffsetTimeEdit_setOffset(int handle, int offset); |
|
1427 public static final native void QOffsetTimeEdit_setMinimum(int handle, int minimum); |
|
1428 public static final native void QOffsetTimeEdit_setMaximum(int handle, int maximum); |
|
1429 |
|
1430 // |
|
1431 // QProgressDialog |
|
1432 // |
|
1433 public static final native int QProgressDialog_swt_new(int parentHandle, boolean showBar); |
|
1434 public static final native int QProgressDialog_maximum(int handle); |
|
1435 public static final native int QProgressDialog_minimum(int handle); |
|
1436 public static final native int QProgressDialog_value(int handle); |
|
1437 public static final native void QProgressDialog_setAutoClose(int handle, boolean close); |
|
1438 public static final native void QProgressDialog_setAutoReset(int handle, boolean reset); |
|
1439 public static final native void QProgressDialog_setMaximum(int handle, int maximum); |
|
1440 public static final native void QProgressDialog_setMinimum(int handle, int minimum); |
|
1441 public static final native void QProgressDialog_setValue(int handle, int value); |
|
1442 public static final native void QProgressDialog_setLabelText(int handle, String text); |
|
1443 public static final native void QProgressDialog_setBar(int handle, int barHandle); |
|
1444 public static final native void QProgressDialog_setCancelButton(int handle, int buttonHandle); |
|
1445 |
|
1446 |
|
1447 // |
|
1448 // QEvent |
|
1449 // |
|
1450 public static final native int QEvent_new(int type); |
|
1451 |
|
1452 // |
|
1453 // QMouseEvent |
|
1454 // |
|
1455 public static final native int QMouseEvent_new(int type, int xPos, int yPos, int xGlobalPos, int yGlobalPos, int button, int buttons, int modifiers); |
|
1456 |
|
1457 // |
|
1458 // QKeyEvent |
|
1459 // |
|
1460 public static final native int QKeyEvent_new(int type, int key, int modifiers, String text); |
|
1461 |
|
1462 // |
|
1463 // QCaptionedWidget |
|
1464 // |
|
1465 public static final native int QCaptionedWidget_new(); |
|
1466 |
|
1467 // |
|
1468 // QVBoxLayout |
|
1469 // |
|
1470 public static final native int QVBoxLayout_new(int parent); |
|
1471 |
|
1472 // |
|
1473 // QLayout |
|
1474 // |
|
1475 public static final native void QLayout_addWidget(int handle, int widget); |
|
1476 public static final native void QLayout_setContentsMargins(int handle, int left, int top, int right, int bottom); |
|
1477 public static final native void QLayout_setMenuBar(int handle, int menubar); |
|
1478 public static final native void QLayout_setSpacing(int handle, int spacing); |
|
1479 public static final native boolean QLayout_activate(int handle); |
|
1480 public static final native void QLayout_update(int handle); |
|
1481 public static final native int QLayout_sizeConstraint(int handle); |
|
1482 public static final native void QLayout_setSizeConstraint(int handle, int constraint); |
|
1483 |
|
1484 // |
|
1485 // QDesktopServices |
|
1486 // |
|
1487 public static final native boolean QDesktopServices_openUrl(String url); |
|
1488 |
|
1489 // |
|
1490 // QMessageBox |
|
1491 // |
|
1492 public static final native int QMessageBox_swt_exec(int icon, String title, String text, |
|
1493 int buttons, int parentHandle, int modality, String dialogID, int layoutDirection); |
|
1494 public static final native void QMessageBox_swt_execTimer(int aIcon, String title, String text, |
|
1495 int parentHandle, String aDialogID, int aLayoutDirection, int modality, int pixmapHandle); |
|
1496 |
|
1497 // |
|
1498 // QInputDialog |
|
1499 // |
|
1500 public static final native String QInputDialog_swt_getText(int parentHandle, String title, String label, int echoMode, String defaultText, String dialogId, int layoutDirection); |
|
1501 public static final native String QInputDialog_swt_getDouble(int parentHandle, String title, String label, double min, |
|
1502 double max, double defaultValue, int decimals, String dialogId, int layoutDirection); |
|
1503 |
|
1504 // |
|
1505 // QWebView |
|
1506 // |
|
1507 public static final native int QWebView_new(); |
|
1508 public static final native void QWebView_back(int handle); |
|
1509 public static final native void QWebView_forward(int handle); |
|
1510 public static final native void QWebView_reload(int handle); |
|
1511 public static final native void QWebView_setHtml(int handle, String html); |
|
1512 public static final native void QWebView_setUrl(int handle, String url); |
|
1513 public static final native void QWebView_stop(int handle); |
|
1514 public static final native String QWebView_swt_backUrl(int handle); |
|
1515 public static final native boolean QWebView_swt_canGoBack(int handle); |
|
1516 public static final native boolean QWebView_swt_canGoForward(int handle); |
|
1517 public static final native boolean QWebView_swt_evaluateJavaScript(int handle, String script); |
|
1518 public static final native String QWebView_swt_forwardUrl(int handle); |
|
1519 public static final native String QWebView_url(int handle); |
|
1520 |
|
1521 // |
|
1522 // QSystemTrayIcon |
|
1523 // |
|
1524 public static final native boolean QSystemTrayIcon_isSystemTrayAvailable(); |
|
1525 public static final native int QSystemTrayIcon_new( int handle); |
|
1526 public static final native void QSystemTrayIcon_setIcon(int handle,int icon ); |
|
1527 public static final native boolean QSystemTrayIcon_isVisible(int handle); |
|
1528 public static final native void QSystemTrayIcon_setVisible(int handle, boolean visible); |
|
1529 public static final native void QSystemTrayIcon_setToolTip(int handle, String string); |
|
1530 |
|
1531 // |
|
1532 // QFileDialog |
|
1533 // |
|
1534 public static final native String[] QFileDialog_swt_getOpenFileName( int parent, String title, String directory, String filter, String selectedFilter, String dialogID, int layoutDirection ); |
|
1535 public static final native String[] QFileDialog_swt_getOpenFileNames( int parent, String title, String directory, String filter, String selectedFilter, String dialogID, int layoutDirection ); |
|
1536 public static final native String[] QFileDialog_swt_getSaveFileName( int parent, String title, String directory, String filter, String selectedFilter, String dialogID, int layoutDirection ); |
|
1537 public static final native String QFileDialog_swt_getOpenDirectoryName( int parent, String title, String directory, String dialogID, int layoutDirection ); |
|
1538 public static final native void QDialog_swt_closeDialogs( int parent, String dialogID ); |
|
1539 |
|
1540 // |
|
1541 // QDialog |
|
1542 // |
|
1543 public static final native int QDialog_new(int parent, int flags); |
|
1544 |
|
1545 // |
|
1546 // QTabWidget |
|
1547 // |
|
1548 public static final native int QSwtTabWidget_new(); |
|
1549 public static final native void QTabWidget_addTab(int handle, int pageHandle, int iconHandle, String Label); |
|
1550 public static final native int QTabWidget_count(int handle); |
|
1551 public static final native int QTabWidget_currentIndex(int handle); |
|
1552 public static final native void QTabWidget_removeTab(int handle, int index); |
|
1553 public static final native void QTabWidget_setCurrentIndex(int handle, int index); |
|
1554 public static final native void QTabWidget_setTabIcon(int handle, int index, int iconHandle); |
|
1555 public static final native void QTabWidget_setTabText(int handle, int index, String text); |
|
1556 public static final native String QTabWidget_tabText(int handle, int index); |
|
1557 public static final native int QTabWidget_widget(int handle, int index); |
|
1558 public static final native int QTabWidget_swt_stackedWidgetHandle(int handle); |
|
1559 public static final native Point QSwtTabWidget_stackedWidgetSize(int handle); |
|
1560 public static final native int QTabWidget_tabBar(int handle); |
|
1561 |
|
1562 // |
|
1563 // QClipboard |
|
1564 // |
|
1565 public static final native void QClipboard_clear(); |
|
1566 public static final native byte[] QClipboard_mimeData(String mimeType); |
|
1567 public static final native void QClipboard_setMimeData(String mimeType, byte[] byteArr); |
|
1568 public static final native String[] QClipboard_swt_formats(); |
|
1569 public static final native boolean QClipboard_swt_isEmptyText(); |
|
1570 public static final native String QClipboard_text(); |
|
1571 |
|
1572 // |
|
1573 // QFontDialog |
|
1574 // |
|
1575 public static final native int QFontDialog_swt_getFont(int parentHandle, String title, |
|
1576 String family, int pointSize, int weight, boolean italic, String dialogId, int layoutDirection); |
|
1577 |
|
1578 // |
|
1579 // QStyle |
|
1580 // |
|
1581 public static final native int QStyle_pixelMetric(int id); |
|
1582 public static final native int QStyle_standardIcon(int handle, int standardIcon); |
|
1583 public static final native int QStyle_swt_pm_dockWidgetTitleBarButtonMargin(); |
|
1584 public static final native int QStyle_swt_pm_mdiSubWindowMinimizedWidth(); |
|
1585 public static final native int QStyle_swt_pm_layoutLeftMargin(); |
|
1586 public static final native int QStyle_swt_pm_layoutTopMargin(); |
|
1587 public static final native int QStyle_swt_pm_layoutRightMargin(); |
|
1588 public static final native int QStyle_swt_pm_layoutBottomMargin(); |
|
1589 public static final native int QStyle_swt_pm_layoutHorizontalSpacing(); |
|
1590 public static final native int QStyle_swt_pm_layoutVerticalSpacing(); |
|
1591 public static final native int QStyle_swt_pm_dockWidgetTitleMargin(); |
|
1592 public static final native int QStyle_swt_pm_toolBarFrameWidth(); |
|
1593 public static final native int QStyle_swt_pm_toolBarHandleExtent(); |
|
1594 public static final native int QStyle_swt_pm_toolBarItemMargin(); |
|
1595 public static final native int QStyle_swt_pm_toolBarItemSpacing(); |
|
1596 public static final native int QStyle_swt_pm_toolBarSeparatorExtent(); |
|
1597 public static final native int QStyle_swt_pm_toolBarExtensionExtent(); |
|
1598 public static final native int QStyle_swt_pm_tabBarScrollButtonWidth(); |
|
1599 public static final native int QStyle_swt_pm_tabBarTabShiftHorizontal(); |
|
1600 public static final native int QStyle_swt_pm_tabBarTabShiftVertical(); |
|
1601 public static final native int QStyle_swt_pm_headerMarkSize(); |
|
1602 public static final native int QStyle_swt_pm_headerGripMargin(); |
|
1603 public static final native int QStyle_swt_pm_headerMargin(); |
|
1604 public static final native int QStyle_swt_pm_SpinBoxSliderHeight(); |
|
1605 public static final native int QStyle_swt_pm_toolBarIconSize(); |
|
1606 public static final native int QStyle_swt_pm_smallIconSize(); |
|
1607 public static final native int QStyle_swt_pm_largeIconSize(); |
|
1608 public static final native int QStyle_swt_pm_focusFrameHMargin(); |
|
1609 public static final native int QStyle_swt_pm_focusFrameVMargin(); |
|
1610 public static final native int QStyle_swt_pm_iconViewIconSize(); |
|
1611 public static final native int QStyle_swt_pm_listViewIconSize(); |
|
1612 public static final native int QStyle_swt_pm_toolTipLabelFrameWidth(); |
|
1613 public static final native int QStyle_swt_pm_checkBoxLabelSpacing(); |
|
1614 public static final native int QStyle_swt_pm_radioButtonLabelSpacing(); |
|
1615 public static final native int QStyle_swt_pm_tabBarIconSize(); |
|
1616 public static final native int QStyle_swt_pm_sizeGripSize(); |
|
1617 public static final native int QStyle_swt_pm_messageBoxIconSize(); |
|
1618 public static final native int QStyle_swt_pm_buttonIconSize(); |
|
1619 public static final native int QStyle_swt_pm_textCursorWidth(); |
|
1620 public static final native int QStyle_swt_pm_tabBarScrollButtonOverlap(); |
|
1621 public static final native int QStyle_swt_pm_tabCloseIndicatorWidth(); |
|
1622 public static final native int QStyle_swt_pm_tabCloseIndicatorHeight(); |
|
1623 |
|
1624 // |
|
1625 // QLocale |
|
1626 // |
|
1627 public static final native int QLocale_system(); |
|
1628 public static final native int QLocale_language(int handle); |
|
1629 public static final native void QLocale_delete(int handle); |
|
1630 |
|
1631 // |
|
1632 // QImage |
|
1633 // |
|
1634 public static final native int QImage_swt_paintDevice(int handle); |
|
1635 |
|
1636 // |
|
1637 // QChar |
|
1638 // |
|
1639 public static final native int QChar_direction(char c); |
|
1640 |
|
1641 |
|
1642 // |
|
1643 // SwtFontCache |
|
1644 // |
|
1645 |
|
1646 |
|
1647 |
|
1648 /** |
|
1649 * Ensures the font or another equal font is in the font cache and returns a |
|
1650 * handle to the cached font. Takes ownership of the passed QFont handle. |
|
1651 * |
|
1652 * Only the fonts owned by SWT should be added to the cache. Don't ever add any |
|
1653 * fonts that the client application has created to the cache. Fonts are never |
|
1654 * removed from the cache. |
|
1655 * |
|
1656 * Returned fonts must never be deleted. They are owned by the cache. Returned |
|
1657 * fonts can be referenced safely for the life-time of Display. |
|
1658 * |
|
1659 * @param handle A handle to a QFont |
|
1660 * @return A handle to a cached QFont with equal properties to given QFont. |
|
1661 */ |
|
1662 public static final native int SwtFontCache_cache(int handle); |
|
1663 |
|
1664 /** |
|
1665 * Checks if the given QFont handle is in the font cache. |
|
1666 * @param handle QFont handle |
|
1667 */ |
|
1668 public static final native boolean SwtFontCache_isCached(int handle); |
|
1669 |
|
1670 |
|
1671 // |
|
1672 // QInputContextFactory |
|
1673 // |
|
1674 public static final native int QInputContextFactory_create(String key, int parent); |
|
1675 public static final native String QInputContextFactory_swt_key(String language ); |
|
1676 |
|
1677 |
|
1678 // |
|
1679 //MobileDevice, Screen, Input |
|
1680 // |
|
1681 public static final native int MobileDevice_new(); |
|
1682 public static final native void MobileDevice_createFlipWatch(int handle); |
|
1683 public static final native void MobileDevice_destroy(int handle); |
|
1684 public static final native int MobileDevice_getUserInactivityTime(int handle); |
|
1685 public static final native void MobileDevice_resetUserInactivityTime(int handle); |
|
1686 public static final native void MobileDevice_setLight(int handle, int duration); |
|
1687 public static final native boolean MobileDevice_flashLights(int handle, int duration); |
|
1688 public static final native boolean MobileDevice_vibration(int handle, int duration); |
|
1689 public static final native int getScreenDeviceNumber(); |
|
1690 public static final native int getColorDepth(); |
|
1691 public static final native int getHwInputs(); |
|
1692 |
|
1693 |
|
1694 // |
|
1695 // SwtApplication |
|
1696 // |
|
1697 |
|
1698 /** |
|
1699 * Returns the number of currently active Java callbacks. Can't be called |
|
1700 * after the application is deleted. |
|
1701 */ |
|
1702 public static final native int SwtApplication_javaCallbackCount(); |
|
1703 |
|
1704 /** |
|
1705 * Posts the QEvents that have been added to the deferred event list. This |
|
1706 * is used for events that have been canceled for some reason and need to be |
|
1707 * retried. At least deferred deletion events can fail if it's attempted to |
|
1708 * delete objects inside their event handlers. In this case the original |
|
1709 * event gets deleted and a new deferred deletion event is created and added |
|
1710 * to the deferred event list to wait until this method is called. |
|
1711 */ |
|
1712 public static final native void SwtApplication_postDeferredEvents(); |
|
1713 |
|
1714 // |
|
1715 // Special purpose global functions exported by Qt |
|
1716 // |
|
1717 public static final native void qt_x11_wait_for_window_manager(int handle); |
|
1718 |
|
1719 // |
|
1720 // XQServiceRequest |
|
1721 // |
|
1722 public static final native int XQServiceRequest_new(String service, String operation, boolean synchronou); |
|
1723 public static final native boolean XQServiceRequest_send(int handle); |
|
1724 public static final native void XQServiceRequest_swt_setArgumentsForFetchEmail(int handle, String title, String action, String filter); |
|
1725 public static final native void XQServiceRequest_swt_setArgumentsForDial(int handle, String number, boolean asyncAnswer); |
|
1726 |
|
1727 // |
|
1728 // CntServicesContactList |
|
1729 // |
|
1730 public static final native String[] CntServicesContactList_swt_contacts(int handle); |
|
1731 |
|
1732 |
|
1733 // |
|
1734 // Other |
|
1735 // |
|
1736 public static final native int EventHandler_new( ); |
|
1737 public static final native void EventHandler_destroy( int handle ); |
|
1738 /** |
|
1739 * Creates a QObject which implements slots to receive the signals and passes |
|
1740 * them to Java along with signal parameters and the signal id. |
|
1741 * @param widget The handle of the widget which will send the signal. |
|
1742 * @param peer The peer Java object where signal is delivered to (The Display) |
|
1743 * @param signalId The id that can be used to identify the signal. |
|
1744 * @return handle of the slot object, owned by the widget |
|
1745 */ |
|
1746 public static final native int SignalHandler_new( int widget, Object peer, int signalId ); |
|
1747 /** |
|
1748 * Creates the JNI utility used for all JNI activity. |
|
1749 * @param display The Display |
|
1750 * @return handle or 0 in case of failure, doesn't throw an exception |
|
1751 */ |
|
1752 public static final native int JniUtils_new(Object display); |
|
1753 |
|
1754 /** |
|
1755 * Performs a check if the QObject can be safely deleted immediately. If not |
|
1756 * then a deleteLater event should be posted. It's possible that an object can't |
|
1757 * be deleted safely e.g. when inside an event listener of the object. |
|
1758 */ |
|
1759 public static final native boolean JniUtils_safeToDelete(int handle, int qObjectHandle); |
|
1760 private static final native int windowServer(); |
|
1761 |
|
1762 /** |
|
1763 * Some platforms require initialization before Qt-APIs can be |
|
1764 * used. This method will perform the required initialization. |
|
1765 * |
|
1766 * @return 0 in case of success, non-zero in case of failure. |
|
1767 */ |
|
1768 public static final native int initUiThread(int uid); |
|
1769 /** |
|
1770 * Some platforms require initialization before Qt-APIs can be used |
|
1771 * and cleaning up after the application is done with them. This method will |
|
1772 * perform the required cleaning up. |
|
1773 */ |
|
1774 public static final native void cleanUpUiThread(); |
|
1775 |
|
1776 // Add new stuff above Other, Other is the last category |
|
1777 |
|
1778 |
|
1779 public static final native void setSymbianAppName(String name); |
|
1780 |
|
1781 |
|
1782 } |