1 /*******************************************************************************
2  * Copyright (c) 2000, 2021 IBM Corporation and others. All rights reserved.
3  * The contents of this file are made available under the terms
4  * of the GNU Lesser General Public License (LGPL) Version 2.1 that
5  * accompanies this distribution (lgpl-v21.txt).  The LGPL is also
6  * available at http://www.gnu.org/licenses/lgpl.html.  If the version
7  * of the LGPL at http://www.gnu.org is different to the version of
8  * the LGPL accompanying this distribution and there is any conflict
9  * between the two license versions, the terms of the LGPL accompanying
10  * this distribution shall govern.
11  *
12  * Contributors:
13  *     IBM Corporation - initial API and implementation
14  *******************************************************************************/
15 package org.eclipse.swt.internal.gtk;
16 
17 
18 import java.util.*;
19 
20 import org.eclipse.swt.internal.*;
21 
22 // Common type translation table:
23 // C            ->  Java
24 // --------------------
25 // Primitives:
26 // int          -> int
27 // gint*        -> int[]
28 //
29 // Unsigned integer:
30 // * Note that java's int is signed, which introduces difficulties
31 // * for values > 0x7FFFFFFF. Java's long can fit such values, but
32 // * java's long is 8 bytes, while guint is 4 bytes. For that reason,
33 // * java's long CAN'T be used for pointers or arrays.
34 // guint        -> int/long
35 // guint*       -> int[]
36 //
37 // Boolean:
38 // * Java's boolean is handy, but it's 1 byte, while gboolean is 4
39 // * bytes. For that reason, it CAN'T be used for pointers or arrays.
40 // gboolean     -> int/boolean
41 // gboolean*    -> int
42 //
43 // Pointers:
44 // gpointer     -> long
45 // void *       -> long
46 //
47 // Strings:
48 // gchar *      -> long    // You're responsible for allocating/deallocating memory buffer.
49 // const char * -> byte[]  // Example: setenv()
50 // const gchar* -> byte[]  // Example: g_log_remove_handler()
51 //
52 // Special types:
53 // GQuark       -> int
54 // GError **    -> long[]  // Example: g_filename_to_uri()
55 
56 
57 /**
58  * This class contains native functions for various libraries.
59  *
60  * Any dynamic functions must be manually linked to their corresponding library. See os_cutom.h  #define FUNC_LIB_* LIB_*
61  */
62 public class OS extends C {
63 	/** OS Constants */
64 	public static final boolean IsLinux, IsWin32, BIG_ENDIAN, IsFreeBSD;
65 	static {
66 
67 		/* Initialize the OS flags and locale constants */
68 		String osName = System.getProperty ("os.name");
69 		boolean isLinux = false, isWin32 = false, isFreeBSD = false;
70 		if (osName.equals ("Linux")) isLinux = true;
71 		if (osName.startsWith("Windows")) isWin32 = true;
72 		if (osName.equals ("FreeBSD")) isFreeBSD = true;
73 		IsLinux = isLinux;  IsWin32 = isWin32;  IsFreeBSD = isFreeBSD;
74 
75 		byte[] buffer = new byte[4];
76 		long ptr = C.malloc(4);
C.memmove(ptr, new int[]{1}, 4)77 		C.memmove(ptr, new int[]{1}, 4);
C.memmove(buffer, ptr, 1)78 		C.memmove(buffer, ptr, 1);
79 		C.free(ptr);
80 		BIG_ENDIAN = buffer[0] == 0;
81 	}
82 
83 	/** Initialization; load native libraries */
84 	static {
85 		String propertyName = "SWT_GTK4";
86 		String gtk4 = getEnvironmentalVariable(propertyName);
87 		if (gtk4 != null && gtk4.equals("1")) {
88 			try {
89 				Library.loadLibrary("swt-pi4");
90 			} catch (Throwable e) {
91 				Library.loadLibrary("swt-pi3");
92 			}
93 		} else {
94 			try {
95 				Library.loadLibrary("swt-pi3");
96 			} catch (Throwable e) {
97 				Library.loadLibrary("swt-pi4");
98 			}
99 		}
100 	}
101 
102 	//Add ability to debug gtk warnings for SWT snippets via SWT_FATAL_WARNINGS=1
103 	// env variable. Please see Eclipse bug 471477
104 	static {
105 		String propertyName = "SWT_FATAL_WARNINGS";
106 		String swt_fatal_warnings = getEnvironmentalVariable (propertyName);
107 
108 		if (swt_fatal_warnings != null && swt_fatal_warnings.equals("1")) {
109 			String gtk4PropertyName = "SWT_GTK4";
110 			String gtk4 = getEnvironmentalVariable (gtk4PropertyName);
111 			if (gtk4 != null && gtk4.equals("1")) {
112 				System.err.println("SWT warning: SWT_FATAL_WARNINGS only available on GTK3.");
113 			} else {
OS.swt_debug_on_fatal_warnings()114 				OS.swt_debug_on_fatal_warnings ();
115 			}
116 		}
117 	}
118 
119 	// Bug 519124
120 	static {
121 		String swt_lib_versions = getEnvironmentalVariable (OS.SWT_LIB_VERSIONS); // Note, this is read in multiple places.
122 		if (swt_lib_versions != null && swt_lib_versions.equals("1")) {
123 			System.out.print("SWT_LIB_Gtk:"+GTK.gtk_get_major_version()+"."+GTK.gtk_get_minor_version()+"."+GTK.gtk_get_micro_version());
124 			System.out.print(" (Dynamic gdbus)");
125 			System.out.println("");
126 		}
127 	}
128 
129 	public static final String SWT_LIB_VERSIONS = "SWT_LIB_VERSIONS";
130 
getEnvironmentalVariable(String envVarName)131 	public static String getEnvironmentalVariable (String envVarName) {
132 		String envVarValue = null;
133 		long ptr = C.getenv(ascii(envVarName));
134 		if (ptr != 0) {
135 			int length = C.strlen(ptr);
136 			byte[] buffer = new byte[length];
137 			C.memmove(buffer, ptr, length);
138 			char[] convertedChar = new char[buffer.length];
139 			for (int i = 0; i < buffer.length; i++) {
140 				convertedChar[i]=(char)buffer[i];
141 			}
142 			envVarValue = new String(convertedChar);
143 		}
144 		return envVarValue;
145 	}
146 
147 	/** Constants */
148 	public static final int G_FILE_TEST_IS_DIR = 1 << 2;
149 	public static final int G_FILE_TEST_IS_EXECUTABLE = 1 << 3;
150 	public static final int G_SIGNAL_MATCH_DATA = 1 << 4;
151 	public static final int G_SIGNAL_MATCH_ID = 1 << 0;
152 	public static final int G_LOG_FLAG_FATAL = 0x2;
153 	public static final int G_LOG_FLAG_RECURSION = 0x1;
154 	public static final int G_LOG_LEVEL_MASK = 0xfffffffc;
155 	public static final int G_APP_INFO_CREATE_NONE = 0;
156 	public static final int G_APP_INFO_CREATE_SUPPORTS_URIS  = (1 << 1);
157 	public static final int PANGO_ALIGN_LEFT = 0;
158 	public static final int PANGO_ALIGN_CENTER = 1;
159 	public static final int PANGO_ALIGN_RIGHT = 2;
160 	public static final int PANGO_ATTR_FOREGROUND = 9;
161 	public static final int PANGO_ATTR_BACKGROUND = 10;
162 	public static final int PANGO_ATTR_UNDERLINE = 11;
163 	public static final int PANGO_ATTR_UNDERLINE_COLOR = 18;
164 	public static final int PANGO_DIRECTION_LTR = 0;
165 	public static final int PANGO_DIRECTION_RTL = 1;
166 	public static final int PANGO_SCALE = 1024;
167 	public static final int PANGO_STRETCH_ULTRA_CONDENSED = 0x0;
168 	public static final int PANGO_STRETCH_EXTRA_CONDENSED = 0x1;
169 	public static final int PANGO_STRETCH_CONDENSED = 0x2;
170 	public static final int PANGO_STRETCH_SEMI_CONDENSED = 0x3;
171 	public static final int PANGO_STRETCH_NORMAL = 0x4;
172 	public static final int PANGO_STRETCH_SEMI_EXPANDED = 0x5;
173 	public static final int PANGO_STRETCH_EXPANDED = 0x6;
174 	public static final int PANGO_STRETCH_EXTRA_EXPANDED = 0x7;
175 	public static final int PANGO_STRETCH_ULTRA_EXPANDED = 0x8;
176 	public static final int PANGO_STYLE_ITALIC = 0x2;
177 	public static final int PANGO_STYLE_NORMAL = 0x0;
178 	public static final int PANGO_STYLE_OBLIQUE = 0x1;
179 	public static final int PANGO_TAB_LEFT = 0;
180 	public static final int PANGO_UNDERLINE_NONE = 0;
181 	public static final int PANGO_UNDERLINE_SINGLE = 1;
182 	public static final int PANGO_UNDERLINE_DOUBLE = 2;
183 	public static final int PANGO_UNDERLINE_LOW = 3;
184 	public static final int PANGO_UNDERLINE_ERROR = 4;
185 	public static final int PANGO_VARIANT_NORMAL = 0;
186 	public static final int PANGO_VARIANT_SMALL_CAPS = 1;
187 	public static final int PANGO_WEIGHT_BOLD = 0x2bc;
188 	public static final int PANGO_WEIGHT_NORMAL = 0x190;
189 	public static final int PANGO_WRAP_WORD_CHAR = 2;
190 	public static final int PANGO_FONT_MASK_FAMILY = 1 << 0;
191 	public static final int PANGO_FONT_MASK_STYLE = 1 << 1;
192 	public static final int PANGO_FONT_MASK_WEIGHT = 1 << 3;
193 	public static final int PANGO_FONT_MASK_SIZE = 1 << 5;
194 
195 	/**
196 	 * GDBus Session types.
197 	 * @category gdbus */
198 	public static final int G_BUS_TYPE_SESSION = 2; //The login session message bus.
199 	/** @category gdbus */
200 	public static final int G_BUS_NAME_OWNER_FLAGS_ALLOW_REPLACEMENT = (1<<0); //Allow another message bus connection to claim the name.
201 	/**
202 	 * If another message bus connection owns the name and have
203 	 * specified #G_BUS_NAME_OWNER_FLAGS_ALLOW_REPLACEMENT, then take the name from the other connection.
204 	 * @category gdbus */
205 	public static final int G_BUS_NAME_OWNER_FLAGS_REPLACE = (1<<1);
206 
207 	// Proxy flags found here: https://developer.gnome.org/gio/stable/GDBusProxy.html#GDBusProxyFlags
208 	public static final int G_DBUS_PROXY_FLAGS_DO_NOT_LOAD_PROPERTIES = 1;
209 	public static final int G_DBUS_PROXY_FLAGS_DO_NOT_CONNECT_SIGNALS = 2;
210 	public static final int G_DBUS_PROXY_FLAGS_DO_NOT_AUTO_START = 3;
211 
212 	public static final int G_DBUS_CALL_FLAGS_NONE = 0;
213 	public static final int G_DBUS_CALL_FLAGS_NO_AUTO_START = (1<<0);
214 
215 	public static final int G_DBUS_CONNECTION_FLAGS_AUTHENTICATION_CLIENT = 1;
216 
217 	public static final int G_DBUS_SERVER_FLAGS_NONE = 0;
218 
219 	/**
220 	 * DBus Data types as defined by:
221 	 * https://dbus.freedesktop.org/doc/dbus-specification.html#idm423
222 	 * If using these, make sure they're properly handled in all GDBus code. Only some of these are supported by some GDBus classes.
223 	 * @category gdbus */
224 	public static final String DBUS_TYPE_BYTE = "y"; // 8 bit, unsigned int.
225 	/** @category gdbus */
226 	public static final String DBUS_TYPE_BOOLEAN = "b";
227 	/** @category gdbus */
228 	public static final String DBUS_TYPE_ARRAY = "a";
229 	/** @category gdbus */
230 	public static final String DBUS_TYPE_STRING = "s";
231 	/** @category gdbus */
232 	public static final String DBUS_TYPE_STRING_ARRAY = "as";
233 	/** @category gdbus */
234 	public static final String DBUS_TYPE_STRUCT_ARRAY_BROWSER_FUNCS = "a(tss)";
235 	/** @category gdbus */
236 	public static final String DBUS_TYPE_INT32 = "i";
237 	/** @category gdbus */
238 	public static final String DBUS_TYPE_UINT64 = "t";
239 	/** @category gdbus */
240 	public static final String DBUS_TYPE_DOUBLE = "d";
241 	/** @category gdbus */
242 	public static final String DBUS_TYPE_STRUCT = "r"; // Not used by Dbus, but implemented by GDBus.
243 	/** @category gdbus */
244 	public static final String DBUS_TYPE_SINGLE_COMPLETE = "*";
245 
246 	/**
247 	 * GVariant Types
248 	 * These are for the most part quite similar to DBus types with a few differences. Read:
249 	 * https://developer.gnome.org/glib/stable/glib-GVariantType.html
250 	 *
251 	 * @category gdbus
252 	 */
253 	public static final byte[] G_VARIANT_TYPE_BYTE = ascii(DBUS_TYPE_BYTE);
254 	/** @category gdbus */
255 	public static final byte[] G_VARIANT_TYPE_BOOLEAN = ascii(DBUS_TYPE_BOOLEAN);
256 	/** @category gdbus */
257 	public static final byte[] G_VARIANT_TYPE_STRING_ARRAY = ascii(DBUS_TYPE_STRING_ARRAY);
258 	/** @category gdbus */
259 	public static final byte[] G_VARIANT_TYPE_STRING = ascii(DBUS_TYPE_STRING);
260 	/** @category gdbus */
261 	public static final byte[] G_VARIANT_TYPE_IN32 = ascii(DBUS_TYPE_INT32);
262 	/** @category gdbus */
263 	public static final byte[] G_VARIANT_TYPE_UINT64 = ascii(DBUS_TYPE_UINT64);
264 	/** @category gdbus */
265 	public static final byte[] G_VARIANT_TYPE_DOUBLE = ascii(DBUS_TYPE_DOUBLE);
266 	/** @category gdbus */
267 	public static final byte[] G_VARIANT_TYPE_TUPLE = ascii(DBUS_TYPE_STRUCT);
268 	/** @category gdbus */
269 	public static final byte[] G_VARIANT_TYPE_ARRAY_BROWSER_FUNCS = ascii(DBUS_TYPE_STRUCT_ARRAY_BROWSER_FUNCS);
270 
271 
272 	/** Signals */
273 	public static final byte[] accel_closures_changed = ascii("accel-closures-changed");		// Gtk2,3,4
274 	public static final byte[] activate = ascii("activate");	// ?
275 	public static final byte[] angle_changed = ascii("angle_changed");	// Gtk3/4, Guesture related.
276 	public static final byte[] authorize_authenticated_peer = ascii("authorize-authenticated-peer");
277 	public static final byte[] backspace = ascii("backspace");
278 	public static final byte[] begin = ascii("begin");
279 	public static final byte[] button_press_event = ascii("button-press-event");
280 	public static final byte[] button_release_event = ascii("button-release-event");
281 	public static final byte[] changed = ascii("changed");
282 	public static final byte[] change_value = ascii("change-value");
283 	public static final byte[] clicked = ascii("clicked");
284 	public static final byte[] close_request = ascii("close-request");
285 	public static final byte[] commit = ascii("commit");
286 	public static final byte[] configure_event = ascii("configure-event");
287 	public static final byte[] copy_clipboard = ascii("copy-clipboard");
288 	public static final byte[] cut_clipboard = ascii("cut-clipboard");
289 	public static final byte[] create_menu_proxy = ascii("create-menu-proxy");
290 	public static final byte[] delete_event = ascii("delete-event");
291 	public static final byte[] delete_from_cursor = ascii("delete-from-cursor");
292 	public static final byte[] day_selected = ascii("day-selected");
293 	public static final byte[] day_selected_double_click = ascii("day-selected-double-click");
294 	public static final byte[] delete_range = ascii("delete-range");
295 	public static final byte[] delete_text = ascii("delete-text");
296 	public static final byte[] direction_changed = ascii("direction-changed");
297 	public static final byte[] dpi_changed = ascii("notify::scale-factor");
298 	public static final byte[] drag_begin = ascii("drag_begin");
299 	public static final byte[] drag_data_delete = ascii("drag_data_delete");
300 	public static final byte[] drag_data_get = ascii("drag_data_get");
301 	public static final byte[] drag_data_received = ascii("drag_data_received");
302 	public static final byte[] drag_drop = ascii("drag_drop");
303 	public static final byte[] drag_end = ascii("drag_end");
304 	public static final byte[] drag_leave = ascii("drag_leave");
305 	public static final byte[] drag_motion = ascii("drag_motion");
306 	public static final byte[] prepare = ascii("prepare");
307 	public static final byte[] draw = ascii("draw");
308 	public static final byte[] end = ascii("end");
309 	public static final byte[] enter_notify_event = ascii("enter-notify-event");
310 	public static final byte[] enter = ascii("enter");
311 	public static final byte[] event = ascii("event");
312 	public static final byte[] event_after = ascii("event-after");
313 	public static final byte[] expand_collapse_cursor_row = ascii("expand-collapse-cursor-row");
314 	public static final byte[] focus = ascii("focus");
315 	public static final byte[] focus_in_event = ascii("focus-in-event");
316 	public static final byte[] focus_in = ascii("focus-in");
317 	public static final byte[] focus_out_event = ascii("focus-out-event");
318 	public static final byte[] focus_out = ascii("focus-out");
319 	public static final byte[] grab_focus = ascii("grab-focus");
320 	public static final byte[] hide = ascii("hide");
321 	public static final byte[] icon_release = ascii("icon-release");
322 	public static final byte[] insert_text = ascii("insert-text");
323 	public static final byte[] key_press_event = ascii("key-press-event");
324 	public static final byte[] key_release_event = ascii("key-release-event");
325 	public static final byte[] key_pressed = ascii("key-pressed");
326 	public static final byte[] key_released = ascii("key-released");
327 	public static final byte[] keys_changed = ascii("keys-changed");
328 	public static final byte[] leave_notify_event = ascii("leave-notify-event");
329 	public static final byte[] leave = ascii("leave");
330 	public static final byte[] map = ascii("map");
331 	public static final byte[] map_event = ascii("map-event");
332 	public static final byte[] mnemonic_activate = ascii("mnemonic-activate");
333 	public static final byte[] month_changed = ascii("month-changed");
334 	public static final byte[] next_month = ascii("next-month");
335 	public static final byte[] prev_month = ascii("prev-month");
336 	public static final byte[] next_year = ascii("next-year");
337 	public static final byte[] prev_year = ascii("prev-year");
338 	public static final byte[] motion_notify_event = ascii("motion-notify-event");
339 	public static final byte[] motion = ascii("motion");
340 	public static final byte[] move_cursor = ascii("move-cursor");
341 	public static final byte[] move_focus = ascii("move-focus");
342 	public static final byte[] new_connection = ascii("new-connection");
343 	public static final byte[] output = ascii("output");
344 	public static final byte[] paste_clipboard = ascii("paste-clipboard");
345 	public static final byte[] pressed = ascii("pressed");
346 	public static final byte[] released = ascii("released");
347 	public static final byte[] popped_up = ascii("popped-up");
348 	public static final byte[] popup_menu = ascii("popup-menu");
349 	public static final byte[] populate_popup = ascii("populate-popup");
350 	public static final byte[] preedit_changed = ascii("preedit-changed");
351 	public static final byte[] property_notify_event = ascii("property-notify-event");
352 	public static final byte[] realize = ascii("realize");
353 	public static final byte[] row_activated = ascii("row-activated");
354 	public static final byte[] row_changed = ascii("row-changed");
355 	public static final byte[] row_has_child_toggled = ascii("row-has-child-toggled");
356 	public static final byte[] row_inserted = ascii("row-inserted");
357 	public static final byte[] row_deleted = ascii("row-deleted");
358 	public static final byte[] scale_changed = ascii("scale-changed");
359 	public static final byte[] scroll_child = ascii("scroll-child");
360 	public static final byte[] scroll_event = ascii("scroll-event");
361 	public static final byte[] scroll = ascii("scroll");
362 	public static final byte[] select = ascii("select");
363 	public static final byte[] selection_done = ascii("selection-done");
364 	public static final byte[] show = ascii("show");
365 	public static final byte[] show_help = ascii("show-help");
366 	public static final byte[] size_allocate = ascii("size-allocate");
367 	public static final byte[] resize = ascii("resize");
368 	public static final byte[] start_interactive_search = ascii("start-interactive-search");
369 	public static final byte[] style_updated = ascii("style-updated");
370 	public static final byte[] switch_page = ascii("switch-page");
371 	public static final byte[] test_collapse_row = ascii("test-collapse-row");
372 	public static final byte[] test_expand_row = ascii("test-expand-row");
373 	public static final byte[] toggled = ascii("toggled");
374 	public static final byte[] unmap = ascii("unmap");
375 	public static final byte[] unmap_event = ascii("unmap-event");
376 	public static final byte[] value_changed = ascii("value-changed");
377 	public static final byte[] window_state_event = ascii("window-state-event");
378 	public static final byte[] notify_state = ascii("notify::state");
379 	public static final byte[] notify_theme_change = ascii("notify::gtk-application-prefer-dark-theme");
380 	public static final byte[] response = ascii("response");
381 
382 	/** Properties */
383 	public static final byte[] active = ascii("active");
384 	public static final byte[] background_rgba = ascii("background-rgba");
385 	public static final byte[] cell_background_rgba = ascii("cell-background-rgba");
386 	public static final byte[] default_border = ascii("default-border");
387 	public static final byte[] expander_size = ascii("expander-size");
388 	public static final byte[] fixed_height_mode = ascii("fixed-height-mode");
389 	public static final byte[] focus_line_width = ascii("focus-line-width");
390 	public static final byte[] focus_padding = ascii("focus-padding");
391 	public static final byte[] font_desc = ascii("font-desc");
392 	public static final byte[] foreground_rgba = ascii("foreground-rgba");
393 	public static final byte[] grid_line_width = ascii("grid-line-width");
394 	public static final byte[] inner_border = ascii("inner-border");
395 	public static final byte[] has_backward_stepper = ascii("has-backward-stepper");
396 	public static final byte[] has_secondary_backward_stepper = ascii("has-secondary-backward-stepper");
397 	public static final byte[] has_forward_stepper = ascii("has-forward-stepper");
398 	public static final byte[] has_secondary_forward_stepper = ascii("has-secondary-forward-stepper");
399 	public static final byte[] horizontal_separator = ascii("horizontal-separator");
400 	public static final byte[] inconsistent = ascii("inconsistent");
401 	public static final byte[] indicator_size = ascii("indicator-size");
402 	public static final byte[] indicator_spacing = ascii("indicator-spacing");
403 	public static final byte[] interior_focus = ascii("interior-focus");
404 	public static final byte[] margin = ascii("margin");
405 	public static final byte[] mode = ascii("mode");
406 	public static final byte[] model = ascii("model");
407 	public static final byte[] spacing = ascii("spacing");
408 	public static final byte[] pixbuf = ascii("pixbuf");
409 	public static final byte[] gicon = ascii("gicon");
410 	public static final byte[] text = ascii("text");
411 	public static final byte[] xalign = ascii("xalign");
412 	public static final byte[] ypad = ascii("ypad");
413 	public static final byte[] margin_bottom = ascii("margin-bottom");
414 	public static final byte[] margin_top = ascii("margin-top");
415 	public static final byte[] scrollbar_spacing = ascii("scrollbar-spacing");
416 
417 	/** Actions */
418 	public static final byte[] action_copy_clipboard = ascii("clipboard.copy");
419 	public static final byte[] action_cut_clipboard = ascii("clipboard.cut");
420 	public static final byte[] action_paste_clipboard = ascii("clipboard.paste");
421 
422 	/** CUSTOM_CODE START
423 	 *
424 	 * Functions for which code is not generated automatically.
425 	 * Don't move to different class or update these unless you also manually update the custom code part as well.
426 	 * These functions are usually hand-coded in os_custom.c.
427 	 *
428 	 * Typical method to generate them is as following:
429 	 * 1) Move native call and don't auto-generate bindings.
430 	 * - define function as regular function. SWT Tools should generate wrappers in os.c
431 	 * - move wrappers from os.c into os_custom.c and make your adaptations/changes.
432 	 * - add the 'flags=no_gen' to the method in OS.java
433 	 *  (e.g, 'flags=no_gen' functions)
434 	 *
435 	 * 2) Make native call invoke a custom function.
436 	 * - create a function in os_custom.c
437 	 * - create a function in OS.java that will call your function.
438 	 * (e.g, see the 'swt_*' functions).
439 	 *
440 	 * Approach 2 is more portable than approach 1.
441 	 * (e.g '2' functions can be moved around, where as with '1', the c counter-parts have to be updated manually.)
442 	 *
443 	 * '@category custom' is for annotation/visibility in outline.
444 	 * '@flags=no_gen' is an instruction for SWT tools not to generate code.
445 	 */
446 	/** @method flags=no_gen
447 	 * @category custom
448 	 */
GDK_WINDOWING_X11()449 	public static final native boolean GDK_WINDOWING_X11();
450 	/** @method flags=no_gen
451 	 * @category custom
452 	 */
GDK_WINDOWING_WAYLAND()453 	public static final native boolean GDK_WINDOWING_WAYLAND();
454 	/** Custom callbacks */
455 	/** @method flags=no_gen
456 	 * @category custom
457 	 */
pangoLayoutNewProc_CALLBACK(long func)458 	public static final native long pangoLayoutNewProc_CALLBACK(long func);
459 	/** @method flags=no_gen
460 	 * @category custom
461 	 */
pangoFontFamilyNewProc_CALLBACK(long func)462 	public static final native long pangoFontFamilyNewProc_CALLBACK(long func);
463 	/** @method flags=no_gen
464 	 * @category custom
465 	 */
pangoFontFaceNewProc_CALLBACK(long func)466 	public static final native long pangoFontFaceNewProc_CALLBACK(long func);
467 	/** @method flags=no_gen
468 	 * @category custom
469 	 */
printerOptionWidgetNewProc_CALLBACK(long func)470 	public static final native long printerOptionWidgetNewProc_CALLBACK(long func);
471 	/** @method flags=no_gen
472 	 * @category custom
473 	 */
imContextNewProc_CALLBACK(long func)474 	public static final native long imContextNewProc_CALLBACK(long func);
475 	/** @method flags=no_gen
476 	 * @category custom
477 	 */
imContextLast()478 	public static final native long imContextLast();
479 	/** @method flags=no_gen
480 	 * @category custom
481 	 */
482 
483 	/** @category custom */
484 	/* Add ability to debug gtk warnings for SWT snippets via SWT_FATAL_WARNINGS=1
485 	 * env variable. Please see Eclipse bug 471477 */
swt_debug_on_fatal_warnings()486 	public static final native void swt_debug_on_fatal_warnings();
487 
488 	/** @category custom */
swt_fixed_get_type()489 	public static final native long swt_fixed_get_type();
490 
491 	/** @category custom */
swt_fixed_accessible_get_type()492 	public static final native long swt_fixed_accessible_get_type();
493 	/**
494 	 * @param obj cast=(AtkObject*)
495 	 * @param is_native cast=(gboolean)
496 	 * @param to_map cast=(GtkWidget *)
497 	 * @category custom
498 	 */
swt_fixed_accessible_register_accessible(long obj, boolean is_native, long to_map)499 	public static final native void swt_fixed_accessible_register_accessible(long obj, boolean is_native, long to_map);
500 	/**
501 	 * @param fixed cast=(SwtFixed*)
502 	 * @param widget cast=(GtkWidget*)
503 	 * @param sibling cast=(GtkWidget*)
504 	 * @category custom
505 	 */
swt_fixed_restack(long fixed, long widget, long sibling, boolean above)506 	public static final native void swt_fixed_restack(long fixed, long widget, long sibling, boolean above);
507 	/**
508 	 * @param fixed cast=(SwtFixed*)
509 	 * @param widget cast=(GtkWidget*)
510 	 * @category custom
511 	 */
swt_fixed_move(long fixed, long widget, int x, int y)512 	public static final native void swt_fixed_move(long fixed, long widget, int x, int y);
513 	/**
514 	 * @param fixed cast=(SwtFixed*)
515 	 * @param widget cast=(GtkWidget*)
516 	 * @category custom
517 	 */
swt_fixed_resize(long fixed, long widget, int width, int height)518 	public static final native void swt_fixed_resize(long fixed, long widget, int width, int height);
519 
520 	/**
521 	 * @param container cast=(SwtFixed*)
522 	 * @param widget cast=(GtkWidget*)
523 	 * @category custom
524 	 */
swt_fixed_add(long container, long widget)525 	public static final native void swt_fixed_add(long container, long widget);
526 	/**
527 	 * @param container cast=(SwtFixed*)
528 	 * @param widget cast=(GtkWidget*)
529 	 * @category custom
530 	 */
swt_fixed_remove(long container, long widget)531 	public static final native void swt_fixed_remove(long container, long widget);
swt_set_lock_functions()532 	public static final native void swt_set_lock_functions();
533 	/** @param str cast=(const gchar *)
534 	 * @category custom
535 	 */
536 	/* Custom version of g_utf8_pointer_to_offset */
g_utf16_offset_to_pointer(long str, long offset)537 	public static final native long g_utf16_offset_to_pointer(long str, long offset);
538 
539 	/**
540 	 * @param str cast=(const gchar *)
541 	 * @param pos cast=(const gchar *)
542 	 * @category custom
543 	 */
544 	/* Custom version of g_utf8_pointer_to_offset */
g_utf16_pointer_to_offset(long str, long pos)545 	public static final native long g_utf16_pointer_to_offset(long str, long pos);
546 	/** @param str cast=(const gchar *)
547 	 * @category custom
548 	 */
549 	/* custom version of g_utf8 for 16 bit */
g_utf16_strlen(long str, long max)550 	public static final native long g_utf16_strlen(long str, long max);
551 	/** @param str cast=(const gchar *)
552 	 * @category custom
553 	 */
554 	/* custom version of g_utf8 for 16 bit */
g_utf8_offset_to_utf16_offset(long str, long offset)555 	public static final native long g_utf8_offset_to_utf16_offset(long str, long offset);
556 	/** @param str cast=(const gchar *)
557 	 * @category custom
558 	 */
559 	/* custom version of g_utf8 for 16 bit */
g_utf16_offset_to_utf8_offset(long str, long offset)560 	public static final native long g_utf16_offset_to_utf8_offset(long str, long offset);
561 
562 	/** CUSTOM_CODE END */
563 
564 	/**
565 	 * Gtk has a minimum glib version. (But it's not a 1:1 link, one can have a newer version of glib and older gtk).
566 	 *
567 	 * Minimum Glib version requirement of gtk can be found in gtk's 'configure.ac' file, see line 'm4_define([glib_required_version],[2.*.*]).
568 	 *
569 	 * For reference:
570 	 * Gtk3.22 has min version of glib 2.49.4
571 	 * Gtk3.24 has min version of glib 2.58
572 	 * Gtk4.0 has min version of glib 2.66
573 	 */
574 	public static final int GLIB_VERSION = VERSION(glib_major_version(), glib_minor_version(), glib_micro_version());
575 
576 	/*
577 	 * New API in GTK3.22 introduced the "popped-up" signal, which provides
578 	 * information about where a menu was actually positioned after it's been
579 	 * popped up. Users can set the environment variable SWT_MENU_LOCATION_DEBUGGING
580 	 * to 1 in order to help them debug menu positioning issues on GTK3.22+.
581 	 *
582 	 * For more information see bug 530204.
583 	 */
584 	public static final boolean SWT_MENU_LOCATION_DEBUGGING;
585 
586 	/*
587 	 * Enable the DEBUG flag via environment variable. See bug 515849.
588 	 */
589 	public static final boolean SWT_DEBUG;
590 
591 	/*
592 	 * Check for the GTK_THEME environment variable. If set, parse
593 	 * it to get the theme name and check if a dark variant is specified.
594 	 * We can make use of this information when loading SWT system colors.
595 	 * See bug 534007.
596 	 */
597 	/**
598 	 * True if the GTK_THEME environment variable is specified
599 	 * and is non-empty.
600 	 */
601 	public static final boolean GTK_THEME_SET;
602 	/**
603 	 * A string containing the theme name supplied via the GTK_THEME
604 	 * environment variable. Otherwise this will contain an empty string.
605 	 */
606 	public static final String GTK_THEME_SET_NAME;
607 	/**
608 	 * True iff overlay scrolling has been disabled via GTK_OVERLAY_SCROLLING=0.
609 	 * See bug 546248.
610 	 */
611 	public static final boolean GTK_OVERLAY_SCROLLING_DISABLED;
612 	/**
613 	 * True if SWT is running on the GNOME desktop environment.
614 	 */
615 	public static final boolean isGNOME;
616 
617 	/* Feature in Gtk: with the switch to GtkMenuItems from GtkImageMenuItems
618 	* in Gtk3 came a small Gtk shortfall: a small amount of padding on the left hand
619 	* side of MenuItems was added. This padding is not accessible to the developer,
620 	* causing vertical alignment issues in menus that have both image and text only
621 	* MenuItems. As an option, the user can specify the SWT_PADDED_MENU_ITEMS environment
622 	* variable, which (when enabled), double pads MenuItems so as to create consistent
623 	* vertical alignment throughout that particular menu.
624 	*
625 	* For more information see:
626 	* Bug 470298
627 	*/
628 	public static final boolean SWT_PADDED_MENU_ITEMS;
629 	static {
630 		String paddedProperty = "SWT_PADDED_MENU_ITEMS";
631 		String paddedCheck = getEnvironmentalVariable(paddedProperty);
632 		boolean usePadded = false;
633 		if (paddedCheck != null && paddedCheck.equals("1")) {
634 			usePadded = true;
635 		}
636 		SWT_PADDED_MENU_ITEMS = usePadded;
637 
638 		String menuLocationProperty = "SWT_MENU_LOCATION_DEBUGGING";
639 		String menuLocationCheck = getEnvironmentalVariable(menuLocationProperty);
640 		boolean menuLocationDebuggingEnabled = false;
641 		if (menuLocationCheck != null && menuLocationCheck.equals("1") && !GTK.GTK4) {
642 			menuLocationDebuggingEnabled = true;
643 		}
644 		SWT_MENU_LOCATION_DEBUGGING = menuLocationDebuggingEnabled;
645 
646 		String debugProperty = "SWT_DEBUG";
647 		String debugCheck = getEnvironmentalVariable(debugProperty);
648 		boolean swtDebuggingEnabled = false;
649 		if (debugCheck != null && debugCheck.equals("1")) {
650 			swtDebuggingEnabled = true;
651 		}
652 		SWT_DEBUG = swtDebuggingEnabled;
653 
654 		String gtkThemeProperty = "GTK_THEME";
655 		String gtkThemeCheck = getEnvironmentalVariable(gtkThemeProperty);
656 		boolean gtkThemeSet = false;
657 		String gtkThemeName = "";
658 		if (gtkThemeCheck != null && !gtkThemeCheck.isEmpty()) {
659 			gtkThemeSet = true;
660 			gtkThemeName = gtkThemeCheck;
661 		}
662 		GTK_THEME_SET = gtkThemeSet;
663 		GTK_THEME_SET_NAME = gtkThemeName;
664 
665 		String scrollingProperty = "GTK_OVERLAY_SCROLLING";
666 		String scrollingCheck = getEnvironmentalVariable(scrollingProperty);
667 		boolean scrollingDisabled = false;
668 		if (scrollingCheck != null && scrollingCheck.equals("0")) {
669 			scrollingDisabled = true;
670 		}
671 		GTK_OVERLAY_SCROLLING_DISABLED = scrollingDisabled;
672 
673 		Map<String, String> env = System.getenv();
674 		String desktopEnvironment = env.get("XDG_CURRENT_DESKTOP");
675 		boolean gnomeDetected = false;
676 		if (desktopEnvironment != null) {
677 			gnomeDetected = desktopEnvironment.contains("GNOME");
678 		}
679 		isGNOME = gnomeDetected;
680 
681 		System.setProperty("org.eclipse.swt.internal.gtk.version",
682 				(GTK.GTK_VERSION >>> 16) + "." + (GTK.GTK_VERSION >>> 8 & 0xFF) + "." + (GTK.GTK_VERSION & 0xFF));
683 		// set GDK backend if we are on X11
684 		if (isX11()) {
685 			System.setProperty("org.eclipse.swt.internal.gdk.backend", "x11");
686 		}
687 	}
688 
ascii(String name)689 protected static byte [] ascii (String name) {
690 	int length = name.length ();
691 	char [] chars = new char [length];
692 	name.getChars (0, length, chars, 0);
693 	byte [] buffer = new byte [length + 1];
694 	for (int i=0; i<length; i++) {
695 		buffer [i] = (byte) chars [i];
696 	}
697 	return buffer;
698 }
699 
VERSION(int major, int minor, int micro)700 public static int VERSION(int major, int minor, int micro) {
701 	return (major << 16) + (minor << 8) + micro;
702 }
703 
isX11()704 public static boolean isX11 () {
705 	return OS.GDK_WINDOWING_X11() && GDK.GDK_IS_X11_DISPLAY(GDK.gdk_display_get_default());
706 }
707 
708 /** 64 bit */
GPollFD_sizeof()709 public static final native int GPollFD_sizeof ();
GTypeInfo_sizeof()710 public static final native int GTypeInfo_sizeof ();
PangoAttribute_sizeof()711 public static final native int PangoAttribute_sizeof();
PangoAttrColor_sizeof()712 public static final native int PangoAttrColor_sizeof();
PangoAttrInt_sizeof()713 public static final native int PangoAttrInt_sizeof();
PangoItem_sizeof()714 public static final native int PangoItem_sizeof();
PangoLayoutLine_sizeof()715 public static final native int PangoLayoutLine_sizeof();
PangoLayoutRun_sizeof()716 public static final native int PangoLayoutRun_sizeof();
PangoLogAttr_sizeof()717 public static final native int PangoLogAttr_sizeof();
PangoRectangle_sizeof()718 public static final native int PangoRectangle_sizeof();
XAnyEvent_sizeof()719 public static final native int XAnyEvent_sizeof();
XEvent_sizeof()720 public static final native int XEvent_sizeof();
XExposeEvent_sizeof()721 public static final native int XExposeEvent_sizeof();
XFocusChangeEvent_sizeof()722 public static final native int XFocusChangeEvent_sizeof();
localeconv_decimal_point()723 public static final native long localeconv_decimal_point();
724 /**
725  * @param path cast=(const char *)
726  * @param realPath cast=(char *)
727  */
realpath(byte[] path, byte[] realPath)728 public static final native long realpath(byte[] path, byte[] realPath);
729 
730 
731 /** Object private fields accessors */
732 /** @param object_class cast=(GObjectClass *) */
G_OBJECT_CLASS_CONSTRUCTOR(long object_class)733 public static final native long G_OBJECT_CLASS_CONSTRUCTOR(long object_class);
734 /**
735  * @param object_class cast=(GObjectClass *)
736  * @paramOFF constructor cast=(GObject* (*) (GType, guint, GObjectConstructParam *))
737  */
G_OBJECT_CLASS_SET_CONSTRUCTOR(long object_class, long constructor)738 public static final native void G_OBJECT_CLASS_SET_CONSTRUCTOR(long object_class, long constructor);
739 /** @param xevent cast=(XEvent *) */
X_EVENT_TYPE(long xevent)740 public static final native int X_EVENT_TYPE(long xevent);
741 /** @param xevent cast=(XAnyEvent *) */
X_EVENT_WINDOW(long xevent)742 public static final native long X_EVENT_WINDOW(long xevent);
743 
744 /** X11 Native methods and constants */
745 public static final int CurrentTime = 0;
746 public static final int Expose = 12;
747 public static final int FocusIn = 9;
748 public static final int FocusOut = 10;
749 public static final int GraphicsExpose = 13;
750 public static final int ExposureMask = 1 << 15;
751 public static final int NotifyNormal = 0;
752 public static final int NotifyWhileGrabbed = 3;
753 public static final int NotifyAncestor = 0;
754 public static final int NotifyVirtual = 1;
755 public static final int NotifyNonlinear = 3;
756 public static final int NotifyNonlinearVirtual = 4;
757 public static final int RevertToParent = 2;
Call(long proc, long arg1, long arg2)758 public static final native int Call(long proc, long arg1, long arg2);
call(long function, long arg0, long arg1, long arg2, long arg3, long arg4, long arg5, long arg6)759 public static final native long call(long function, long arg0, long arg1, long arg2, long arg3, long arg4, long arg5, long arg6);
call(long function, long arg0, long arg1, long arg2, long arg3)760 public static final native long call(long function, long arg0, long arg1, long arg2, long arg3);
call(long function, long arg0, long arg1, long arg2, long arg3, long arg4, long arg5)761 public static final native long call(long function, long arg0, long arg1, long arg2, long arg3, long arg4, long arg5);
762 /**
763  * @param display cast=(Display *)
764  * @param event_return cast=(XEvent *)
765  * @param predicate cast=(Bool (*)())
766  * @param arg cast=(XPointer)
767  */
XCheckIfEvent(long display, long event_return, long predicate, long arg)768 public static final native boolean XCheckIfEvent(long display, long event_return, long predicate, long arg);
769 /** @param display cast=(Display *) */
XDefaultScreen(long display)770 public static final native int XDefaultScreen(long display);
771 /** @param display cast=(Display *) */
XDefaultRootWindow(long display)772 public static final native long XDefaultRootWindow(long display);
773 /** @param address cast=(void *) */
XFree(long address)774 public static final native void XFree(long address);
775 
776 /**
777  * @param display cast=(Display *)
778  * @param w cast=(Window)
779  * @param root_return cast=(Window *)
780  * @param child_return cast=(Window *)
781  * @param root_x_return cast=(int *)
782  * @param root_y_return cast=(int *)
783  * @param win_x_return cast=(int *)
784  * @param win_y_return cast=(int *)
785  * @param mask_return cast=(unsigned int *)
786  */
XQueryPointer(long display, long w, long [] root_return, long [] child_return, int[] root_x_return, int[] root_y_return, int[] win_x_return, int[] win_y_return, int[] mask_return)787 public static final native int XQueryPointer(long display, long w, long [] root_return, long [] child_return, int[] root_x_return, int[] root_y_return, int[] win_x_return, int[] win_y_return, int[] mask_return);
788 /** @param handler cast=(XIOErrorHandler) */
XSetIOErrorHandler(long handler)789 public static final native long XSetIOErrorHandler(long handler);
790 /** @param handler cast=(XErrorHandler) */
XSetErrorHandler(long handler)791 public static final native long XSetErrorHandler(long handler);
792 /**
793  * @param display cast=(Display *)
794  * @param window cast=(Window)
795  */
XSetInputFocus(long display, long window, int revert, int time)796 public static final native int XSetInputFocus(long display, long window, int revert, int time);
797 /**
798  * @param display cast=(Display *)
799  * @param w cast=(Window)
800  * @param prop_window cast=(Window)
801  */
XSetTransientForHint(long display, long w, long prop_window)802 public static final native int XSetTransientForHint(long display, long w, long prop_window);
803 /** @param display cast=(Display *) */
XSynchronize(long display, boolean onoff)804 public static final native long XSynchronize(long display, boolean onoff);
805 /**
806  * @param dest cast=(void *)
807  * @param src cast=(const void *),flags=no_out
808  * @param size cast=(size_t)
809  */
memmove(long dest, XExposeEvent src, long size)810 public static final native void memmove(long dest, XExposeEvent src, long size);
811 /**
812  * @param dest cast=(void *),flags=no_in
813  * @param src cast=(const void *)
814  * @param size cast=(size_t)
815  */
memmove(XExposeEvent dest, long src, long size)816 public static final native void memmove(XExposeEvent dest, long src, long size);
817 /**
818  * @param dest cast=(void *),flags=no_in
819  * @param src cast=(const void *)
820  * @param size cast=(size_t)
821  */
memmove(XFocusChangeEvent dest, long src, long size)822 public static final native void memmove(XFocusChangeEvent dest, long src, long size);
823 
824 
825 /** Natives */
Call(long func, long arg0, int arg1, int arg2)826 public static final native int Call (long func, long arg0, int arg1, int arg2);
G_OBJECT_GET_CLASS(long object)827 public static final native long G_OBJECT_GET_CLASS(long object);
G_OBJECT_TYPE_NAME(long object)828 public static final native long G_OBJECT_TYPE_NAME(long object);
829 /** @method flags=const */
G_TYPE_BOOLEAN()830 public static final native long G_TYPE_BOOLEAN();
831 /** @method flags=const */
G_TYPE_DOUBLE()832 public static final native long G_TYPE_DOUBLE();
833 /** @method flags=const */
G_TYPE_FLOAT()834 public static final native long G_TYPE_FLOAT();
835 /** @method flags=const */
G_TYPE_LONG()836 public static final native long G_TYPE_LONG();
837 /** @method flags=const */
G_TYPE_INT()838 public static final native long G_TYPE_INT();
839 /** @method flags=const */
G_TYPE_INT64()840 public static final native long G_TYPE_INT64();
G_VALUE_TYPE(long value)841 public static final native long G_VALUE_TYPE(long value);
G_OBJECT_TYPE(long instance)842 public static final native long G_OBJECT_TYPE(long instance);
843 /** @method flags=const */
G_TYPE_STRING()844 public static final native long G_TYPE_STRING();
PANGO_PIXELS(int dimension)845 public static final native int PANGO_PIXELS(int dimension);
846 /** @method flags=const */
PANGO_TYPE_FONT_DESCRIPTION()847 public static final native long PANGO_TYPE_FONT_DESCRIPTION();
848 /** @method flags=const */
PANGO_TYPE_FONT_FAMILY()849 public static final native long PANGO_TYPE_FONT_FAMILY();
850 /** @method flags=const */
PANGO_TYPE_FONT_FACE()851 public static final native long PANGO_TYPE_FONT_FACE();
852 /** @method flags=const */
PANGO_TYPE_LAYOUT()853 public static final native long PANGO_TYPE_LAYOUT();
854 /**
855  * @param commandline cast=(gchar *)
856  * @param applName cast=(gchar *)
857  * @param flags cast=(GAppInfoCreateFlags)
858  * @param error cast=(GError **)
859  */
g_app_info_create_from_commandline(byte[] commandline, byte[] applName, long flags, long error)860 public static final native long g_app_info_create_from_commandline(byte[] commandline, byte[] applName, long flags, long error);
g_app_info_get_all()861 public static final native long g_app_info_get_all();
862 /**
863  * @param appInfo cast=(GAppInfo *)
864  */
g_app_info_get_executable(long appInfo)865 public static final native long g_app_info_get_executable(long appInfo);
866 /**
867  * @param appInfo cast=(GAppInfo *)
868  */
g_app_info_get_icon(long appInfo)869 public static final native long g_app_info_get_icon(long appInfo);
870 /**
871  * @param appInfo cast=(GAppInfo *)
872  */
g_app_info_get_name(long appInfo)873 public static final native long g_app_info_get_name(long appInfo);
874 /**
875  * @param appInfo cast=(GAppInfo *)
876  * @param list cast=(GList *)
877  * @param launchContext cast=(GAppLaunchContext *)
878  * @param error cast=(GError **)
879  */
g_app_info_launch(long appInfo, long list, long launchContext, long error)880 public static final native boolean g_app_info_launch(long appInfo, long list, long launchContext, long error);
881 /**
882  * @param mimeType cast=(gchar *)
883  * @param mustSupportURIs cast=(gboolean)
884  */
g_app_info_get_default_for_type(byte[] mimeType, boolean mustSupportURIs)885 public static final native long g_app_info_get_default_for_type(byte[] mimeType, boolean mustSupportURIs);
886 /**
887  * @param uri cast=(char *)
888  * @param launchContext cast=(GAppLaunchContext *)
889  * @param error cast=(GError **)
890  */
g_app_info_launch_default_for_uri(long uri, long launchContext, long error)891 public static final native boolean g_app_info_launch_default_for_uri(long uri, long launchContext, long error);
892 /**
893  * @param appInfo cast=(GAppInfo *)
894  */
g_app_info_supports_uris(long appInfo)895 public static final native boolean g_app_info_supports_uris(long appInfo);
896 /**
897  * @param error cast=(GError *)
898  */
g_error_get_message(long error)899 public static final native long g_error_get_message(long error);
900 
901 /**
902  * @param gerror cast=(GError *)
903  */
g_error_free(long gerror)904 public static final native void g_error_free(long gerror);
905 
906 /**
907  * @param type1 cast=(gchar *)
908  * @param type2 cast=(gchar *)
909  */
g_content_type_equals(long type1, byte[] type2)910 public static final native boolean g_content_type_equals(long type1, byte[] type2);
911 /**
912  * @param type cast=(gchar *)
913  * @param supertype cast=(gchar *)
914  */
g_content_type_is_a(long type, byte[] supertype)915 public static final native boolean g_content_type_is_a(long type, byte[] supertype);
g_credentials_new()916 public static final native long g_credentials_new();
917 /**
918  * @param credentials cast=(GCredentials *)
919  * @param other_credentials cast=(GCredentials *)
920  * @param error cast=(GError **)
921  */
g_credentials_is_same_user(long credentials, long other_credentials, long [] error)922 public static final native boolean g_credentials_is_same_user(long credentials, long other_credentials, long [] error);
923 /**
924  * @param info cast=(GFileInfo *)
925  */
g_file_info_get_content_type(long info)926 public static final native long g_file_info_get_content_type(long info);
927 /**
928  * @param file cast=(GFile *)
929  */
g_file_get_uri(long file)930 public static final native long g_file_get_uri(long file);
931 /** @param fileName cast=(const char *) */
g_file_new_for_path(byte[] fileName)932 public static final native long g_file_new_for_path(byte[] fileName);
933 /**
934  * @param fileName cast=(const char *)
935  */
g_file_new_for_commandline_arg(byte[] fileName)936 public static final native long g_file_new_for_commandline_arg(byte[] fileName);
937 /** @param fileName cast=(const char *) */
g_file_new_for_uri(byte[] fileName)938 public static final native long g_file_new_for_uri(byte[] fileName);
939 /**
940  * @param file cast=(GFile *)
941  * @param attributes cast=(const char *)
942  * @param flags cast=(GFileQueryInfoFlags)
943  * @param cancellable cast=(GCancellable *)
944  * @param error cast=(GError **)
945  */
g_file_query_info(long file, byte[] attributes, long flags, long cancellable, long error)946 public static final native long g_file_query_info(long file, byte[] attributes, long flags, long cancellable, long error);
947 /**
948  * @param file cast=(const gchar *)
949  * @param test cast=(GFileTest)
950  */
g_file_test(byte[] file, int test)951 public static final native boolean /*long*/ g_file_test(byte[] file, int test);
952 /** @param icon cast=(GIcon *) */
g_icon_to_string(long icon)953 public static final native long g_icon_to_string(long icon);
954 /**
955  * @param str cast=(const gchar *)
956  * @param error cast=(GError **)
957  */
g_icon_new_for_string(byte[] str, long error[])958 public static final native long g_icon_new_for_string(byte[] str, long error[]);
959 /**
960  * @param signal_id cast=(guint)
961  * @param detail cast=(GQuark)
962  * @param hook_func cast=(GSignalEmissionHook)
963  * @param hook_data cast=(gpointer)
964  * @param data_destroy cast=(GDestroyNotify)
965  */
g_signal_add_emission_hook(int signal_id, int detail, long hook_func, long hook_data, long data_destroy)966 public static final native long g_signal_add_emission_hook(int signal_id, int detail, long hook_func, long hook_data, long data_destroy);
967 /**
968  * @param signal_id cast=(guint)
969  * @param hook_id cast=(gulong)
970  */
g_signal_remove_emission_hook(int signal_id, long hook_id)971 public static final native void g_signal_remove_emission_hook(int signal_id, long hook_id);
972 /**
973  * @param callback_func cast=(GCallback)
974  * @param user_data cast=(gpointer)
975  * @param destroy_data cast=(GClosureNotify)
976  */
g_cclosure_new(long callback_func, long user_data, long destroy_data)977 public static final native long g_cclosure_new(long callback_func, long user_data, long destroy_data);
978 /** @param closure cast=(GClosure *) */
g_closure_ref(long closure)979 public static final native long g_closure_ref(long closure);
980 /** @param closure cast=(GClosure *) */
g_closure_sink(long closure)981 public static final native void g_closure_sink(long closure);
982 /** @param closure cast=(GClosure *) */
g_closure_unref(long closure)983 public static final native void g_closure_unref(long closure);
984 /** @param context cast=(GMainContext *) */
g_main_context_acquire(long context)985 public static final native boolean g_main_context_acquire(long context);
986 /**
987  * @param context cast=(GMainContext *)
988  * @param fds cast=(GPollFD *)
989  */
g_main_context_check(long context, int max_priority, long fds, int n_fds)990 public static final native int g_main_context_check(long context, int max_priority, long fds, int n_fds);
g_main_context_default()991 public static final native long g_main_context_default();
992 /** @param context cast=(GMainContext *) */
g_main_context_iteration(long context, boolean may_block)993 public static final native boolean g_main_context_iteration(long context, boolean may_block);
994 /** @param context cast=(GMainContext *) */
g_main_context_get_poll_func(long context)995 public static final native long g_main_context_get_poll_func(long context);
996 /**
997  * @param context cast=(GMainContext *)
998  * @param priority cast=(gint *)
999  */
g_main_context_prepare(long context, int[] priority)1000 public static final native boolean g_main_context_prepare(long context, int[] priority);
1001 /**
1002  * @param context cast=(GMainContext *)
1003  * @param fds cast=(GPollFD *)
1004  * @param timeout_ cast=(gint *)
1005  */
g_main_context_query(long context, int max_priority, int[] timeout_, long fds, int n_fds)1006 public static final native int g_main_context_query(long context, int max_priority, int[] timeout_, long fds, int n_fds);
1007 /** @param context cast=(GMainContext *) */
g_main_context_release(long context)1008 public static final native void g_main_context_release(long context);
1009 /** @param context cast=(GMainContext *) */
g_main_context_wakeup(long context)1010 public static final native void g_main_context_wakeup(long context);
1011 /**
1012  * @param opsysstring cast=(const gchar *)
1013  * @param len cast=(gssize)
1014  * @param bytes_read cast=(gsize *)
1015  * @param bytes_written cast=(gsize *)
1016  * @param error cast=(GError **)
1017  */
g_filename_to_utf8(long opsysstring, long len, long [] bytes_read, long [] bytes_written, long [] error)1018 public static final native long g_filename_to_utf8(long opsysstring, long len, long [] bytes_read, long [] bytes_written, long [] error);
1019 /** @param filename cast=(const gchar *) */
g_filename_display_name(long filename)1020 public static final native long g_filename_display_name(long filename);
1021 /**
1022  * @param filename cast=(const char *)
1023  * @param hostname cast=(const char *)
1024  * @param error cast=(GError **)
1025  */
g_filename_to_uri(long filename, long hostname, long [] error)1026 public static final native long g_filename_to_uri(long filename, long hostname, long [] error);
1027 /**
1028  * @param opsysstring cast=(const gchar *)
1029  * @param len cast=(gssize)
1030  * @param bytes_read cast=(gsize *)
1031  * @param bytes_written cast=(gsize *)
1032  * @param error cast=(GError **)
1033  */
g_filename_from_utf8(long opsysstring, long len, long [] bytes_read, long [] bytes_written, long [] error)1034 public static final native long g_filename_from_utf8(long opsysstring, long len,  long [] bytes_read, long [] bytes_written, long [] error);
1035 /**
1036  * @param uri cast=(const char *)
1037  * @param hostname cast=(char **)
1038  * @param error cast=(GError **)
1039  */
g_filename_from_uri(long uri, long [] hostname, long [] error)1040 public static final native long g_filename_from_uri(long uri, long [] hostname, long [] error);
1041 /** @param mem cast=(gpointer) */
g_free(long mem)1042 public static final native void g_free(long mem);
1043 /**
1044  * @param variable cast=(const gchar *),flags=no_out
1045  */
g_getenv(byte [] variable)1046 public static final native long g_getenv(byte [] variable);
1047 /**
1048  * @method flags=ignore_deprecations
1049  * @param result cast=(GTimeVal *)
1050  */
g_get_current_time(long result)1051 public static final native void g_get_current_time(long result);
g_get_user_name()1052 public static final native long g_get_user_name();
1053 /**
1054  * @method flags=ignore_deprecations
1055  * @param result cast=(GTimeVal *)
1056  * @param microseconds cast=(glong)
1057  */
g_time_val_add(long result, long microseconds)1058 public static final native void g_time_val_add(long result, long microseconds);
1059 /**
1060  * @param function cast=(GSourceFunc)
1061  * @param data cast=(gpointer)
1062  */
g_idle_add(long function, long data)1063 public static final native int g_idle_add(long function, long data);
1064 /**
1065  * @param list cast=(GList *)
1066  * @param data cast=(gpointer)
1067  */
g_list_append(long list, long data)1068 public static final native long g_list_append(long list, long data);
1069 /** @param list cast=(GList *) */
g_list_data(long list)1070 public static final native long g_list_data(long list);
1071 /** @param list cast=(GList *) */
g_list_free(long list)1072 public static final native void g_list_free(long list);
1073 /**
1074  * @param list cast=(GList *)
1075  */
g_list_last(long list)1076 public static final native long g_list_last(long list);
1077 /** @param list cast=(GList *) */
g_list_length(long list)1078 public static final native int g_list_length(long list);
g_list_next(long list)1079 public static final native long g_list_next(long list);
1080 /**
1081  * @param list cast=(GList *)
1082  * @param n cast=(guint)
1083  */
g_list_nth_data(long list, int n)1084 public static final native long g_list_nth_data(long list, int n);
g_list_previous(long list)1085 public static final native long g_list_previous(long list);
1086 /**
1087  * @param log_domain cast=(gchar *)
1088  * @param log_levels cast=(GLogLevelFlags)
1089  * @param message cast=(gchar *)
1090  * @param unused_data cast=(gpointer)
1091  */
g_log_default_handler(long log_domain, int log_levels, long message, long unused_data)1092 public static final native void g_log_default_handler(long log_domain, int log_levels, long message, long unused_data);
1093 /**
1094  * @param log_domain cast=(gchar *),flags=no_out
1095  * @param handler_id cast=(gint)
1096  */
g_log_remove_handler(byte[] log_domain, int handler_id)1097 public static final native void g_log_remove_handler(byte[] log_domain, int handler_id);
1098 /**
1099  * @param log_domain cast=(gchar *),flags=no_out
1100  * @param log_levels cast=(GLogLevelFlags)
1101  * @param log_func cast=(GLogFunc)
1102  * @param user_data cast=(gpointer)
1103  */
g_log_set_handler(byte[] log_domain, int log_levels, long log_func, long user_data)1104 public static final native int g_log_set_handler(byte[] log_domain, int log_levels, long log_func, long user_data);
1105 /** @param size cast=(gulong) */
g_malloc(long size)1106 public static final native long g_malloc(long size);
1107 /**
1108  * @param object cast=(GObject *)
1109  * @param first_property_name cast=(const gchar *),flags=no_out
1110  * @param terminator cast=(const gchar *),flags=sentinel
1111  */
g_object_get(long object, byte[] first_property_name, int[] value, long terminator)1112 public static final native void g_object_get(long object, byte[] first_property_name, int[] value, long terminator);
1113 /**
1114  * @param object cast=(GObject *)
1115  * @param first_property_name cast=(const gchar *),flags=no_out
1116  * @param terminator cast=(const gchar *),flags=sentinel
1117  */
g_object_get(long object, byte[] first_property_name, long[] value, long terminator)1118 public static final native void g_object_get(long object, byte[] first_property_name, long[] value, long terminator);
1119 /**
1120  * @param object cast=(GObject *)
1121  * @param quark cast=(GQuark)
1122  */
g_object_get_qdata(long object, int quark)1123 public static final native long g_object_get_qdata(long object, int quark);
1124 /**
1125  * @param type cast=(GType)
1126  * @param first_property_name cast=(const gchar *)
1127  */
g_object_new(long type, long first_property_name)1128 public static final native long g_object_new(long type, long first_property_name);
1129 /**
1130  * @param object cast=(GObject *)
1131  * @param property_name cast=(const gchar *)
1132  */
g_object_notify(long object, byte[] property_name)1133 public static final native void g_object_notify(long object, byte[] property_name);
1134 /** @param object cast=(gpointer) */
g_object_ref(long object)1135 public static final native long g_object_ref(long object);
1136 /**
1137  * @param object cast=(gpointer)
1138  * @param first_property_name cast=(const gchar *),flags=no_out
1139  * @param terminator cast=(const gchar *),flags=sentinel
1140  */
g_object_set(long object, byte[] first_property_name, boolean data, long terminator)1141 public static final native void g_object_set(long object, byte[] first_property_name, boolean data, long terminator);
1142 /**
1143  * @param object cast=(gpointer)
1144  * @param first_property_name cast=(const gchar *),flags=no_out
1145  * @param terminator cast=(const gchar *),flags=sentinel
1146  */
g_object_set(long object, byte[] first_property_name, byte[] data, long terminator)1147 public static final native void g_object_set(long object, byte[] first_property_name, byte[] data, long terminator);
1148 
1149 //Note, the function below is handled in a special way in os.h because of the GdkRGBA (gtk3 only) struct. See os.h
1150 //So although it is not marked as dynamic, it is only build on gtk3.
1151 /**
1152  * @param object cast=(gpointer)
1153  * @param first_property_name cast=(const gchar *)
1154  * @param terminator cast=(const gchar *),flags=sentinel
1155  */
g_object_set(long object, byte[] first_property_name, GdkRGBA data, long terminator)1156 public static final native void g_object_set(long object, byte[] first_property_name, GdkRGBA data, long terminator);
1157 
1158 /**
1159  * @param object cast=(gpointer)
1160  * @param first_property_name cast=(const gchar *),flags=no_out
1161  * @param terminator cast=(const gchar *),flags=sentinel
1162  */
g_object_set(long object, byte[] first_property_name, int data, long terminator)1163 public static final native void g_object_set(long object, byte[] first_property_name, int data, long terminator);
1164 /**
1165  * @param object cast=(gpointer)
1166  * @param first_property_name cast=(const gchar *),flags=no_out
1167  * @param terminator cast=(const gchar *),flags=sentinel
1168  */
g_object_set(long object, byte[] first_property_name, float data, long terminator)1169 public static final native void g_object_set(long object, byte[] first_property_name, float data, long terminator);
1170 /**
1171  * @param object cast=(gpointer)
1172  * @param first_property_name cast=(const gchar *),flags=no_out
1173  * @param terminator cast=(const gchar *),flags=sentinel
1174  */
g_object_set(long object, byte[] first_property_name, long data, long terminator)1175 public static final native void g_object_set(long object, byte[] first_property_name, long data, long terminator);
1176 /**
1177  * @param object cast=(GObject *)
1178  * @param quark cast=(GQuark)
1179  * @param data cast=(gpointer)
1180  */
g_object_set_qdata(long object, int quark, long data)1181 public static final native void g_object_set_qdata(long object, int quark, long data);
1182 /** @param object cast=(gpointer) */
g_object_unref(long object)1183 public static final native void g_object_unref(long object);
1184 
1185 /**
1186  * @param data cast=(gconstpointer)
1187  * @param size cast=(gsize)
1188  */
g_bytes_new(byte [] data, long size)1189 public static final native long g_bytes_new(byte [] data, long size);
1190 
1191 /**
1192  * @param gBytes cast=(GBytes *)
1193  */
g_bytes_unref(long gBytes)1194 public static final native void g_bytes_unref(long gBytes);
1195 
1196 /** @param string cast=(const gchar *),flags=no_out */
g_quark_from_string(byte[] string)1197 public static final native int g_quark_from_string(byte[] string);
1198 /** @param prgname cast=(const gchar *),flags=no_out */
g_set_prgname(byte[] prgname)1199 public static final native void g_set_prgname(byte[] prgname);
1200 /**
1201  * @param instance cast=(gpointer)
1202  * @param detailed_signal cast=(const gchar *),flags=no_out
1203  * @param proc cast=(GCallback)
1204  * @param data cast=(gpointer)
1205  */
g_signal_connect(long instance, byte[] detailed_signal, long proc, long data)1206 public static final native int g_signal_connect(long instance, byte[] detailed_signal, long proc, long data);
1207 /**
1208  * @param instance cast=(gpointer)
1209  * @param detailed_signal cast=(const gchar *)
1210  * @param closure cast=(GClosure *)
1211  * @param after cast=(gboolean)
1212  */
g_signal_connect_closure(long instance, byte[] detailed_signal, long closure, boolean after)1213 public static final native int g_signal_connect_closure(long instance, byte[] detailed_signal, long closure, boolean after);
1214 /**
1215  * @param instance cast=(gpointer)
1216  * @param signal_id cast=(guint)
1217  * @param detail cast=(GQuark)
1218  * @param closure cast=(GClosure *)
1219  * @param after cast=(gboolean)
1220  */
g_signal_connect_closure_by_id(long instance, int signal_id, int detail, long closure, boolean after)1221 public static final native int g_signal_connect_closure_by_id(long instance, int signal_id, int detail, long closure, boolean after);
1222 /**
1223  * @param instance cast=(gpointer)
1224  * @param detailed_signal cast=(const gchar *),flags=no_out
1225  */
g_signal_emit_by_name(long instance, byte[] detailed_signal)1226 public static final native void g_signal_emit_by_name(long instance, byte[] detailed_signal);
1227 /**
1228  * @param instance cast=(gpointer)
1229  * @param detailed_signal cast=(const gchar *),flags=no_out
1230  */
g_signal_emit_by_name(long instance, byte[] detailed_signal, long data)1231 public static final native void g_signal_emit_by_name(long instance, byte[] detailed_signal, long data);
1232 /**
1233  * @param instance cast=(gpointer)
1234  * @param detailed_signal cast=(const gchar *),flags=no_out
1235  */
g_signal_emit_by_name(long instance, byte[] detailed_signal, GdkRectangle data)1236 public static final native void g_signal_emit_by_name(long instance, byte[] detailed_signal, GdkRectangle data);
1237 /**
1238  * @param instance cast=(gpointer)
1239  * @param detailed_signal cast=(const gchar *),flags=no_out
1240  */
g_signal_emit_by_name(long instance, byte[] detailed_signal, long data1, long data2)1241 public static final native void g_signal_emit_by_name(long instance, byte[] detailed_signal, long data1, long data2);
1242 /**
1243  * @param instance cast=(gpointer)
1244  * @param detailed_signal cast=(const gchar *),flags=no_out
1245  */
g_signal_emit_by_name(long instance, byte[] detailed_signal, byte [] data)1246 public static final native void g_signal_emit_by_name(long instance, byte[] detailed_signal, byte [] data);
1247 /**
1248  * @param instance cast=(gpointer)
1249  * @param handler_id cast=(gulong)
1250  */
g_signal_handler_disconnect(long instance, int handler_id)1251 public static final native void g_signal_handler_disconnect(long instance, int handler_id);
1252 /**
1253  * @param instance cast=(gpointer)
1254  * @param mask cast=(GSignalMatchType)
1255  * @param signal_id cast=(guint)
1256  * @param detail cast=(GQuark)
1257  * @param closure cast=(GClosure *)
1258  * @param func cast=(gpointer)
1259  * @param data cast=(gpointer)
1260  */
g_signal_handlers_block_matched(long instance, int mask, int signal_id, int detail, long closure, long func, long data)1261 public static final native int g_signal_handlers_block_matched(long instance, int mask, int signal_id, int detail, long closure, long func, long data);
1262 /**
1263  * @param instance cast=(gpointer)
1264  * @param mask cast=(GSignalMatchType)
1265  * @param signal_id cast=(guint)
1266  * @param detail cast=(GQuark)
1267  * @param closure cast=(GClosure *)
1268  * @param func cast=(gpointer)
1269  * @param data cast=(gpointer)
1270  */
g_signal_handlers_unblock_matched(long instance, int mask, int signal_id, int detail, long closure, long func, long data)1271 public static final native int g_signal_handlers_unblock_matched(long instance, int mask, int signal_id, int detail, long closure, long func, long data);
1272 /** @param name cast=(const gchar *),flags=no_out */
g_signal_lookup(byte[] name, long itype)1273 public static final native int g_signal_lookup(byte[] name, long itype);
1274 /**
1275  * @param instance cast=(gpointer)
1276  * @param detailed_signal cast=(const gchar *),flags=no_out
1277  */
g_signal_stop_emission_by_name(long instance, byte[] detailed_signal)1278 public static final native void g_signal_stop_emission_by_name(long instance, byte[] detailed_signal);
1279 /** @param tag cast=(guint) */
g_source_remove(long tag)1280 public static final native boolean /*long*/ g_source_remove(long tag);
1281 /**
1282  * @param list cast=(GSList *)
1283  * @param data cast=(gpointer)
1284  */
g_slist_append(long list, long data)1285 public static final native long g_slist_append(long list, long data);
1286 /** @param list cast=(GSList *) */
g_slist_data(long list)1287 public static final native long g_slist_data(long list);
1288 /** @param list cast=(GSList *) */
g_slist_free(long list)1289 public static final native void g_slist_free(long list);
1290 /** @param list cast=(GSList *) */
g_slist_next(long list)1291 public static final native long g_slist_next(long list);
1292 /** @param list cast=(GSList *) */
g_slist_length(long list)1293 public static final native int g_slist_length(long list);
1294 /** @param string_array cast=(gchar **) */
g_strfreev(long string_array)1295 public static final native void g_strfreev(long string_array);
1296 /**
1297  * @param str cast=(const gchar *)
1298  * @param endptr cast=(gchar **)
1299  */
g_strtod(long str, long [] endptr)1300 public static final native double g_strtod(long str, long [] endptr);
1301 /**
1302  * @param str cast=(const gchar *)
1303  * @param str2 cast=(const gchar *)
1304  * @param str3 cast=(const gchar *)
1305  * @param terminator cast=(const gchar *),flags=sentinel
1306  */
g_strconcat(long str, long str2, long str3, long terminator)1307 public static final native long g_strconcat(long str, long str2, long str3, long terminator);
1308 /**
1309  * @param str cast=(const gchar *)
1310  * @param str2 cast=(const gchar *)
1311  * @param terminator cast=(const gchar *),flags=sentinel
1312  */
g_strconcat(long str, long str2, long terminator)1313 public static final native long g_strconcat(long str, long str2, long terminator);
1314 /** @param str cast=(char *) */
g_strdup(long str)1315 public static final native long g_strdup (long str);
1316 /** @param g_class cast=(GType) */
g_type_class_peek(long g_class)1317 public static final native long g_type_class_peek(long g_class);
1318 /** @param g_class cast=(gpointer) */
g_type_class_peek_parent(long g_class)1319 public static final native long g_type_class_peek_parent(long g_class);
1320 /** @param g_class cast=(GType) */
g_type_class_ref(long g_class)1321 public static final native long g_type_class_ref(long g_class);
1322 /** @param g_class cast=(gpointer) */
g_type_class_unref(long g_class)1323 public static final native void g_type_class_unref(long g_class);
1324 /** @param iface cast=(gpointer) */
g_type_interface_peek_parent(long iface)1325 public static final native long g_type_interface_peek_parent(long iface);
1326 /**
1327  * @param type cast=(GType)
1328  * @param is_a_type cast=(GType)
1329  */
g_type_is_a(long type, long is_a_type)1330 public static final native boolean g_type_is_a(long type, long is_a_type);
1331 /** @param type cast=(GType) */
g_type_parent(long type)1332 public static final native long g_type_parent(long type);
1333 /**
1334  * @param parent_type cast=(GType)
1335  * @param type_name cast=(const gchar *)
1336  * @param info cast=(const GTypeInfo *)
1337  * @param flags cast=(GTypeFlags)
1338  */
g_type_register_static(long parent_type, byte[] type_name, long info, int flags)1339 public static final native long g_type_register_static(long parent_type, byte[] type_name, long info, int flags);
1340 /**
1341  * @param str cast=(const gunichar2 *),flags=no_out critical
1342  * @param len cast=(glong)
1343  * @param items_read cast=(glong *),flags=critical
1344  * @param items_written cast=(glong *),flags=critical
1345  * @param error cast=(GError **),flags=critical
1346  */
g_utf16_to_utf8(char[] str, long len, long [] items_read, long [] items_written, long [] error)1347 public static final native long g_utf16_to_utf8(char[] str, long len, long [] items_read, long [] items_written, long [] error);
1348 /**
1349  * @param str cast=(const gchar *)
1350  * @param pos cast=(const gchar *)
1351  */
g_utf8_pointer_to_offset(long str, long pos)1352 public static final native long g_utf8_pointer_to_offset(long str, long pos);
1353 /** @param str cast=(const gchar *) */
g_utf8_strlen(long str, long max)1354 public static final native long g_utf8_strlen(long str, long max);
1355 /**
1356  * @param str cast=(const gchar *),flags=no_out critical
1357  * @param len cast=(glong)
1358  * @param items_read cast=(glong *),flags=critical
1359  * @param items_written cast=(glong *),flags=critical
1360  * @param error cast=(GError **),flags=critical
1361  */
g_utf8_to_utf16(byte[] str, long len, long [] items_read, long [] items_written, long [] error)1362 public static final native long g_utf8_to_utf16(byte[] str, long len, long [] items_read, long [] items_written, long [] error);
1363 /**
1364  * @param str cast=(const gchar *)
1365  * @param len cast=(glong)
1366  * @param items_read cast=(glong *),flags=critical
1367  * @param items_written cast=(glong *),flags=critical
1368  * @param error cast=(GError **),flags=critical
1369  */
g_utf8_to_utf16(long str, long len, long [] items_read, long [] items_written, long [] error)1370 public static final native long g_utf8_to_utf16(long str, long len, long [] items_read, long [] items_written, long [] error);
1371 /**
1372  * @param value cast=(GValue *)
1373  * @param type cast=(GType)
1374  */
g_value_init(long value, long type)1375 public static final native long g_value_init (long value, long type);
1376 /** @param value cast=(GValue *) */
g_value_get_int(long value)1377 public static final native int g_value_get_int (long value);
1378 /** @param value cast=(GValue *) */
g_value_set_int(long value, int v)1379 public static final native void g_value_set_int (long value, int v);
1380 /** @param value cast=(GValue *) */
g_value_get_double(long value)1381 public static final native double g_value_get_double (long value);
1382 /** @param value cast=(GValue *) */
g_value_set_double(long value, double v)1383 public static final native void g_value_set_double (long value, double v);
1384 /** @param value cast=(GValue *) */
g_value_get_float(long value)1385 public static final native float g_value_get_float (long value);
1386 /** @param value cast=(GValue *) */
g_value_set_float(long value, float v)1387 public static final native void g_value_set_float (long value, float v);
1388 /** @param value cast=(GValue *) */
g_value_get_int64(long value)1389 public static final native long g_value_get_int64 (long value);
1390 /** @param value cast=(GValue *) */
g_value_set_int64(long value, long v)1391 public static final native void g_value_set_int64 (long value, long v);
1392 /** @param value cast=(GValue *) */
g_value_unset(long value)1393 public static final native void g_value_unset (long value);
1394 /** @param value cast=(const GValue *) */
g_value_peek_pointer(long value)1395 public static final native long g_value_peek_pointer(long value);
1396 /**
1397  * @param variable cast=(const gchar *),flags=no_out
1398  */
g_unsetenv(byte [] variable)1399 public static final native void g_unsetenv(byte [] variable);
1400 /** @method flags=const */
glib_major_version()1401 public static final native int glib_major_version();
1402 /** @method flags=const */
glib_minor_version()1403 public static final native int glib_minor_version();
1404 /** @method flags=const */
glib_micro_version()1405 public static final native int glib_micro_version();
1406 /**
1407  * @param interval cast=(guint32)
1408  * @param function cast=(GSourceFunc)
1409  * @param data cast=(gpointer)
1410  */
g_timeout_add(int interval, long function, long data)1411 public static final native int g_timeout_add(int interval, long function, long data);
1412 
1413 /** @method flags=dynamic */
FcConfigAppFontAddFile(long config, byte[] file)1414 public static final native boolean FcConfigAppFontAddFile(long config, byte[] file);
1415 
1416 /**
1417  * @param dest cast=(void *)
1418  * @param src cast=(const void *),flags=no_out
1419  * @param size cast=(size_t)
1420  */
memmove(long dest, GTypeInfo src, int size)1421 public static final native void memmove(long dest, GTypeInfo src, int size);
1422 /**
1423  * @param dest cast=(void *)
1424  * @param src cast=(const void *),flags=no_out
1425  * @param size cast=(size_t)
1426  */
memmove(long dest, GtkTargetEntry src, long size)1427 public static final native void memmove(long dest, GtkTargetEntry src, long size);
1428 /**
1429  * @param dest cast=(void *)
1430  * @param src cast=(const void *),flags=no_out
1431  * @param size cast=(size_t)
1432  */
memmove(long dest, GdkRGBA src, long size)1433 public static final native void memmove(long dest, GdkRGBA src, long size);
1434 /**
1435  * @param dest cast=(void *)
1436  * @param src cast=(const void *),flags=no_out
1437  * @param size cast=(size_t)
1438  */
memmove(long dest, GdkEventButton src, long size)1439 public static final native void memmove(long dest, GdkEventButton src, long size);
1440 /**
1441  * @param dest cast=(void *)
1442  * @param src cast=(const void *),flags=no_out
1443  * @param size cast=(size_t)
1444  */
memmove(long dest, GdkEventKey src, long size)1445 public static final native void memmove(long dest, GdkEventKey src, long size);
1446 /** @param src flags=no_out */
memmove(long dest, GtkWidgetClass src)1447 public static final native void memmove(long dest, GtkWidgetClass src);
1448 /**
1449  * @param dest cast=(void *)
1450  * @param src cast=(const void *),flags=no_out
1451  * @param size cast=(size_t)
1452  */
memmove(long dest, PangoAttribute src, long size)1453 public static final native void memmove(long dest, PangoAttribute src, long size);
1454 /** @param dest flags=no_in */
memmove(GtkWidgetClass dest, long src)1455 public static final native void memmove(GtkWidgetClass dest, long src);
1456 /**
1457  * @param dest cast=(void *),flags=no_in
1458  * @param src cast=(const void *)
1459  * @param size cast=(size_t)
1460  */
memmove(GtkBorder dest, long src, long size)1461 public static final native void memmove(GtkBorder dest, long src, long size);
1462 /**
1463  * @param dest cast=(void *),flags=no_in
1464  * @param src cast=(const void *)
1465  * @param size cast=(size_t)
1466  */
memmove(GdkKeymapKey dest, long src, long size)1467 public static final native void memmove(GdkKeymapKey dest, long src, long size);
1468 /**
1469  * @param dest cast=(void *),flags=no_in
1470  * @param src cast=(const void *)
1471  * @param size cast=(size_t)
1472  */
memmove(GdkRGBA dest, long src, long size)1473 public static final native void memmove(GdkRGBA dest, long src, long size);
1474 /**
1475  * @param dest cast=(void *),flags=no_in
1476  * @param src cast=(const void *)
1477  * @param size cast=(size_t)
1478  */
memmove(GdkEventButton dest, long src, long size)1479 public static final native void memmove(GdkEventButton dest, long src, long size);
1480 /**
1481  * @param dest cast=(void *),flags=no_in
1482  * @param src cast=(const void *)
1483  * @param size cast=(size_t)
1484  */
memmove(GdkEventCrossing dest, long src, long size)1485 public static final native void memmove(GdkEventCrossing dest, long src, long size);
1486 /**
1487  * @param dest cast=(void *),flags=no_in
1488  * @param src cast=(const void *)
1489  * @param size cast=(size_t)
1490  */
memmove(GdkEventFocus dest, long src, long size)1491 public static final native void memmove(GdkEventFocus dest, long src, long size);
1492 /**
1493  * @param dest cast=(void *),flags=no_in
1494  * @param src cast=(const void *)
1495  * @param size cast=(size_t)
1496  */
memmove(GdkEventKey dest, long src, long size)1497 public static final native void memmove(GdkEventKey dest, long src, long size);
1498 /**
1499  * @param dest cast=(void *),flags=no_in
1500  * @param src cast=(const void *)
1501  * @param size cast=(size_t)
1502  */
memmove(GdkEventMotion dest, long src, long size)1503 public static final native void memmove(GdkEventMotion dest, long src, long size);
1504 /**
1505  * @param dest cast=(void *),flags=no_in
1506  * @param src cast=(const void *)
1507  * @param size cast=(size_t)
1508  */
memmove(GdkEventWindowState dest, long src, long size)1509 public static final native void memmove(GdkEventWindowState dest, long src, long size);
memmove(long dest, GtkCellRendererClass src)1510 public static final native void memmove(long dest, GtkCellRendererClass src);
memmove(GtkCellRendererClass dest, long src)1511 public static final native void memmove(GtkCellRendererClass dest, long src);
1512 /**
1513  * @param dest cast=(void *),flags=no_in
1514  * @param src cast=(const void *)
1515  * @param size cast=(size_t)
1516  */
memmove(GdkRectangle dest, long src, long size)1517 public static final native void memmove(GdkRectangle dest, long src, long size);
1518 /**
1519  * @param dest cast=(void *),flags=no_in
1520  * @param src cast=(const void *)
1521  * @param size cast=(size_t)
1522  */
memmove(PangoAttribute dest, long src, long size)1523 public static final native void memmove(PangoAttribute dest, long src, long size);
1524 /**
1525  * @param dest cast=(void *),flags=no_in
1526  * @param src cast=(const void *)
1527  * @param size cast=(size_t)
1528  */
memmove(PangoAttrColor dest, long src, long size)1529 public static final native void memmove(PangoAttrColor dest, long src, long size);
1530 /**
1531  * @param dest cast=(void *),flags=no_in
1532  * @param src cast=(const void *)
1533  * @param size cast=(size_t)
1534  */
memmove(PangoAttrInt dest, long src, long size)1535 public static final native void memmove(PangoAttrInt dest, long src, long size);
1536 /**
1537  * @param dest cast=(void *),flags=no_in
1538  * @param src cast=(const void *)
1539  * @param size cast=(size_t)
1540  */
memmove(PangoItem dest, long src, long size)1541 public static final native void memmove(PangoItem dest, long src, long size);
1542 /**
1543  * @param dest cast=(void *),flags=no_in
1544  * @param src cast=(const void *)
1545  * @param size cast=(size_t)
1546  */
memmove(PangoLayoutLine dest, long src, long size)1547 public static final native void memmove(PangoLayoutLine dest, long src, long size);
1548 /**
1549  * @param dest cast=(void *),flags=no_in
1550  * @param src cast=(const void *)
1551  * @param size cast=(size_t)
1552  */
memmove(PangoLayoutRun dest, long src, long size)1553 public static final native void memmove(PangoLayoutRun dest, long src, long size);
1554 /**
1555  * @param dest cast=(void *),flags=no_in
1556  * @param src cast=(const void *)
1557  * @param size cast=(size_t)
1558  */
memmove(PangoLogAttr dest, long src, long size)1559 public static final native void memmove(PangoLogAttr dest, long src, long size);
1560 /** @param attribute cast=(const PangoAttribute *) */
pango_attribute_copy(long attribute)1561 public static final native long pango_attribute_copy(long attribute);
pango_attr_background_new(short red, short green, short blue)1562 public static final native long pango_attr_background_new(short red, short green, short blue);
1563 /** @param desc cast=(const PangoFontDescription *) */
pango_attr_font_desc_new(long desc)1564 public static final native long pango_attr_font_desc_new(long desc);
pango_attr_foreground_new(short red, short green, short blue)1565 public static final native long pango_attr_foreground_new(short red, short green, short blue);
pango_attr_rise_new(int rise)1566 public static final native long pango_attr_rise_new(int rise);
1567 /**
1568  * @param ink_rect flags=no_out
1569  * @param logical_rect flags=no_out
1570  */
pango_attr_shape_new(PangoRectangle ink_rect, PangoRectangle logical_rect)1571 public static final native long pango_attr_shape_new(PangoRectangle ink_rect, PangoRectangle logical_rect);
1572 /**
1573  * @param list cast=(PangoAttrList *)
1574  * @param attr cast=(PangoAttribute *)
1575  */
pango_attr_list_insert(long list, long attr)1576 public static final native void pango_attr_list_insert(long list, long attr);
1577 /** @param list cast=(PangoAttrList *) */
pango_attr_list_get_iterator(long list)1578 public static final native long pango_attr_list_get_iterator(long list);
1579 /** @param iterator cast=(PangoAttrIterator *) */
pango_attr_iterator_next(long iterator)1580 public static final native boolean pango_attr_iterator_next(long iterator);
1581 /**
1582  * @param iterator cast=(PangoAttrIterator *)
1583  * @param start cast=(gint *)
1584  * @param end cast=(gint *)
1585  */
pango_attr_iterator_range(long iterator, int[] start, int[] end)1586 public static final native void pango_attr_iterator_range(long iterator, int[] start, int[] end);
1587 /**
1588  * @param iterator cast=(PangoAttrIterator *)
1589  * @param type cast=(PangoAttrType)
1590  */
pango_attr_iterator_get(long iterator, int type)1591 public static final native long pango_attr_iterator_get(long iterator, int type);
1592 /** @param iterator cast=(PangoAttrIterator *) */
pango_attr_iterator_destroy(long iterator)1593 public static final native void pango_attr_iterator_destroy(long iterator);
pango_attr_list_new()1594 public static final native long pango_attr_list_new();
1595 /** @param list cast=(PangoAttrList *) */
pango_attr_list_unref(long list)1596 public static final native void pango_attr_list_unref(long list);
pango_attr_strikethrough_color_new(short red, short green, short blue)1597 public static final native long pango_attr_strikethrough_color_new(short red, short green, short blue);
pango_attr_strikethrough_new(boolean strikethrough)1598 public static final native long pango_attr_strikethrough_new(boolean strikethrough);
pango_attr_underline_color_new(short red, short green, short blue)1599 public static final native long pango_attr_underline_color_new(short red, short green, short blue);
pango_attr_underline_new(int underline)1600 public static final native long pango_attr_underline_new(int underline);
pango_attr_weight_new(int weight)1601 public static final native long pango_attr_weight_new(int weight);
1602 /**
1603  * @param cairo cast=(cairo_t *)
1604  */
pango_cairo_create_layout(long cairo)1605 public static final native long pango_cairo_create_layout(long cairo);
pango_cairo_font_map_get_default()1606 public static final native long pango_cairo_font_map_get_default();
1607 /**
1608  * @param context cast=(PangoContext *)
1609  */
pango_cairo_context_get_font_options(long context)1610 public static final native long pango_cairo_context_get_font_options(long context);
1611 /**
1612  * @param context cast=(PangoContext *)
1613  * @param options cast=( cairo_font_options_t *)
1614  */
pango_cairo_context_set_font_options(long context, long options)1615 public static final native void pango_cairo_context_set_font_options(long context, long options);
1616 /**
1617  * @param cairo cast=(cairo_t *)
1618  * @param layout cast=(PangoLayout *)
1619  */
pango_cairo_layout_path(long cairo, long layout)1620 public static final native void pango_cairo_layout_path(long cairo, long layout);
1621 /**
1622  * @param cairo cast=(cairo_t *)
1623  * @param layout cast=(PangoLayout *)
1624  */
pango_cairo_show_layout(long cairo, long layout)1625 public static final native void pango_cairo_show_layout(long cairo, long layout);
1626 /** @param context cast=(PangoContext *) */
pango_context_get_base_dir(long context)1627 public static final native int pango_context_get_base_dir(long context);
1628 /** @param context cast=(PangoContext *) */
pango_context_get_language(long context)1629 public static final native long pango_context_get_language(long context);
1630 /**
1631  * @param context cast=(PangoContext *)
1632  * @param desc cast=(const PangoFontDescription *)
1633  * @param language cast=(PangoLanguage *)
1634  */
pango_context_get_metrics(long context, long desc, long language)1635 public static final native long pango_context_get_metrics(long context, long desc, long language);
1636 /**
1637  * @param context cast=(PangoContext *)
1638  * @param families cast=(PangoFontFamily ***)
1639  * @param n_families cast=(int *)
1640  */
pango_context_list_families(long context, long [] families, int[] n_families)1641 public static final native void pango_context_list_families(long context, long [] families, int[] n_families);
1642 /** @param context cast=(PangoContext *) */
pango_context_set_base_dir(long context, int direction)1643 public static final native void pango_context_set_base_dir(long context, int direction);
1644 /**
1645  * @param context cast=(PangoContext *)
1646  * @param language cast=(PangoLanguage *)
1647  */
pango_context_set_language(long context, long language)1648 public static final native void pango_context_set_language(long context, long language);
1649 
1650 
1651 /* PangoFontDescription */
1652 /** @param desc cast=(PangoFontDescription *) */
pango_font_description_copy(long desc)1653 public static final native long pango_font_description_copy(long desc);
1654 /** @param desc cast=(PangoFontDescription *) */
pango_font_description_free(long desc)1655 public static final native void pango_font_description_free(long desc);
1656 /** @param str cast=(const char *),flags=no_out critical */
pango_font_description_from_string(byte[] str)1657 public static final native long pango_font_description_from_string(byte[] str);
1658 /** @param desc cast=(PangoFontDescription *) */
pango_font_description_get_family(long desc)1659 public static final native long pango_font_description_get_family(long desc);
1660 /** @param desc cast=(PangoFontDescription *) */
pango_font_description_get_size(long desc)1661 public static final native int pango_font_description_get_size(long desc);
1662 /** @param desc cast=(PangoFontDescription *) */
pango_font_description_get_stretch(long desc)1663 public static final native int pango_font_description_get_stretch(long desc);
1664 /** @param desc cast=(PangoFontDescription *) */
pango_font_description_get_variant(long desc)1665 public static final native int pango_font_description_get_variant(long desc);
1666 /** @param desc cast=(PangoFontDescription *) */
pango_font_description_get_style(long desc)1667 public static final native int pango_font_description_get_style(long desc);
1668 /** @param desc cast=(PangoFontDescription *) */
pango_font_description_get_weight(long desc)1669 public static final native int pango_font_description_get_weight(long desc);
pango_font_description_new()1670 public static final native long pango_font_description_new();
1671 /**
1672  * @param desc cast=(PangoFontDescription *)
1673  * @param family cast=(const char *),flags=no_out critical
1674  */
pango_font_description_set_family(long desc, byte[] family)1675 public static final native void pango_font_description_set_family(long desc, byte[] family);
1676 /**
1677  * @param desc cast=(PangoFontDescription *)
1678  * @param size cast=(gint)
1679  */
pango_font_description_set_size(long desc, int size)1680 public static final native void pango_font_description_set_size(long desc, int size);
1681 /**
1682  * @param desc cast=(PangoFontDescription *)
1683  * @param stretch cast=(PangoStretch)
1684  */
pango_font_description_set_stretch(long desc, int stretch)1685 public static final native void pango_font_description_set_stretch(long desc, int stretch);
1686 /**
1687  * @param desc cast=(PangoFontDescription *)
1688  * @param weight cast=(PangoStyle)
1689  */
pango_font_description_set_style(long desc, int weight)1690 public static final native void pango_font_description_set_style(long desc, int weight);
1691 /**
1692  * @param desc cast=(PangoFontDescription *)
1693  * @param weight cast=(PangoWeight)
1694  */
pango_font_description_set_weight(long desc, int weight)1695 public static final native void pango_font_description_set_weight(long desc, int weight);
1696 /**
1697  * @param desc cast=(PangoFontDescription *)
1698  * @param variant cast=(PangoVariant)
1699  */
pango_font_description_set_variant(long desc, int variant)1700 public static final native void pango_font_description_set_variant(long desc, int variant);
1701 /** @param desc cast=(PangoFontDescription *) */
pango_font_description_to_string(long desc)1702 public static final native long pango_font_description_to_string(long desc);
1703 /** @param desc cast=(PangoFontDescription *) */
pango_font_description_get_set_fields(long desc)1704 public static final native int pango_font_description_get_set_fields(long desc);
1705 
1706 
1707 /* PangoFontFace */
1708 /** @param face cast=(PangoFontFace *) */
pango_font_face_describe(long face)1709 public static final native long pango_font_face_describe(long face);
1710 
1711 
1712 /* PangoFontFamily */
1713 /** @param family cast=(PangoFontFamily *) */
pango_font_family_get_name(long family)1714 public static final native long pango_font_family_get_name(long family);
1715 /**
1716  * @param family cast=(PangoFontFamily *)
1717  * @param faces cast=(PangoFontFace ***)
1718  * @param n_faces cast=(int *)
1719  */
pango_font_family_list_faces(long family, long [] faces, int[] n_faces)1720 public static final native void pango_font_family_list_faces(long family, long [] faces, int[] n_faces);
1721 
1722 
1723 /* PangoFontMap */
1724 /** @param fontMap cast=(PangoFontMap *) */
pango_font_map_create_context(long fontMap)1725 public static final native long pango_font_map_create_context(long fontMap);
1726 /** @param metrics cast=(PangoFontMetrics *) */
1727 
1728 
1729 /* PangoFontMetrics */
pango_font_metrics_get_approximate_char_width(long metrics)1730 public static final native int pango_font_metrics_get_approximate_char_width(long metrics);
1731 /** @param metrics cast=(PangoFontMetrics *) */
pango_font_metrics_get_ascent(long metrics)1732 public static final native int pango_font_metrics_get_ascent(long metrics);
1733 /** @param metrics cast=(PangoFontMetrics *) */
pango_font_metrics_get_descent(long metrics)1734 public static final native int pango_font_metrics_get_descent(long metrics);
1735 /** @param metrics cast=(PangoFontMetrics *) */
pango_font_metrics_unref(long metrics)1736 public static final native void pango_font_metrics_unref(long metrics);
1737 
1738 /* PangoLayout */
1739 /** @param layout cast=(PangoLayout *) */
pango_layout_context_changed(long layout)1740 public static final native void pango_layout_context_changed(long layout);
1741 /** @param layout cast=(PangoLayout*) */
pango_layout_get_alignment(long layout)1742 public static final native int pango_layout_get_alignment(long layout);
1743 /** @param layout cast=(PangoLayout *) */
pango_layout_get_context(long layout)1744 public static final native long pango_layout_get_context(long layout);
1745 /** @param layout cast=(PangoLayout*) */
pango_layout_get_indent(long layout)1746 public static final native int pango_layout_get_indent(long layout);
1747 /** @param layout cast=(PangoLayout*) */
pango_layout_get_iter(long layout)1748 public static final native long pango_layout_get_iter(long layout);
1749 /** @param layout cast=(PangoLayout*) */
pango_layout_get_justify(long layout)1750 public static final native boolean pango_layout_get_justify(long layout);
1751 /** @param layout cast=(PangoLayout *) */
pango_layout_get_line(long layout, int line)1752 public static final native long pango_layout_get_line(long layout, int line);
1753 /** @param layout cast=(PangoLayout*) */
pango_layout_get_line_count(long layout)1754 public static final native int pango_layout_get_line_count(long layout);
1755 /**
1756  * @param layout cast=(PangoLayout*)
1757  * @param attrs cast=(PangoLogAttr **)
1758  * @param n_attrs cast=(int *)
1759  */
pango_layout_get_log_attrs(long layout, long [] attrs, int[] n_attrs)1760 public static final native void pango_layout_get_log_attrs(long layout, long [] attrs, int[] n_attrs);
1761 /**
1762  * @param layout cast=(PangoLayout *)
1763  * @param width cast=(int *)
1764  * @param height cast=(int *)
1765  */
pango_layout_get_size(long layout, int[] width, int[] height)1766 public static final native void pango_layout_get_size(long layout, int[] width, int[] height);
1767 /**
1768  * @param layout cast=(PangoLayout *)
1769  * @param width cast=(int *)
1770  * @param height cast=(int *)
1771  */
pango_layout_get_pixel_size(long layout, int[] width, int[] height)1772 public static final native void pango_layout_get_pixel_size(long layout, int[] width, int[] height);
1773 /** @param layout cast=(PangoLayout*) */
pango_layout_get_spacing(long layout)1774 public static final native int pango_layout_get_spacing(long layout);
1775 /** @param layout cast=(PangoLayout *) */
pango_layout_get_text(long layout)1776 public static final native long pango_layout_get_text(long layout);
1777 /** @param layout cast=(PangoLayout *) */
pango_layout_get_width(long layout)1778 public static final native int pango_layout_get_width(long layout);
1779 /**
1780  * @param layout cast=(PangoLayout*)
1781  * @param pos flags=no_in
1782  */
pango_layout_index_to_pos(long layout, int index, PangoRectangle pos)1783 public static final native void pango_layout_index_to_pos(long layout, int index, PangoRectangle pos);
1784 /** @param iter cast=(PangoLayoutIter*) */
pango_layout_iter_free(long iter)1785 public static final native void pango_layout_iter_free(long iter);
1786 /**
1787  * @param iter cast=(PangoLayoutIter*)
1788  * @param ink_rect flags=no_in
1789  * @param logical_rect flags=no_in
1790  */
pango_layout_iter_get_line_extents(long iter, PangoRectangle ink_rect, PangoRectangle logical_rect)1791 public static final native void pango_layout_iter_get_line_extents(long iter, PangoRectangle ink_rect, PangoRectangle logical_rect);
1792 /** @param iter cast=(PangoLayoutIter*) */
pango_layout_iter_get_index(long iter)1793 public static final native int pango_layout_iter_get_index(long iter);
1794 /** @param iter cast=(PangoLayoutIter*) */
pango_layout_iter_get_run(long iter)1795 public static final native long pango_layout_iter_get_run(long iter);
1796 /** @param iter cast=(PangoLayoutIter*) */
pango_layout_iter_next_line(long iter)1797 public static final native boolean pango_layout_iter_next_line(long iter);
1798 /** @param iter cast=(PangoLayoutIter*) */
pango_layout_iter_next_run(long iter)1799 public static final native boolean pango_layout_iter_next_run(long iter);
1800 /**
1801  * @param line cast=(PangoLayoutLine*)
1802  * @param ink_rect cast=(PangoRectangle *),flags=no_in
1803  * @param logical_rect cast=(PangoRectangle *),flags=no_in
1804  */
pango_layout_line_get_extents(long line, PangoRectangle ink_rect, PangoRectangle logical_rect)1805 public static final native void pango_layout_line_get_extents(long line, PangoRectangle ink_rect, PangoRectangle logical_rect);
1806 /** @param context cast=(PangoContext *) */
pango_layout_new(long context)1807 public static final native long pango_layout_new(long context);
1808 /** @param layout cast=(PangoLayout *) */
pango_layout_set_alignment(long layout, int alignment)1809 public static final native void pango_layout_set_alignment(long layout, int alignment);
1810 /**
1811  * @param layout cast=(PangoLayout *)
1812  * @param attrs cast=(PangoAttrList *)
1813  */
pango_layout_set_attributes(long layout, long attrs)1814 public static final native void pango_layout_set_attributes(long layout, long attrs);
1815 /**
1816  * @param layout cast=(PangoLayout *)
1817  */
pango_layout_set_auto_dir(long layout, boolean auto_dir)1818 public static final native void pango_layout_set_auto_dir(long layout, boolean auto_dir);
1819 /**
1820  * @param context cast=(PangoLayout *)
1821  * @param descr cast=(PangoFontDescription *)
1822  */
pango_layout_set_font_description(long context, long descr)1823 public static final native void pango_layout_set_font_description(long context, long descr);
1824 /** @param layout cast=(PangoLayout*) */
pango_layout_set_indent(long layout, int indent)1825 public static final native void pango_layout_set_indent(long layout, int indent);
1826 /** @param layout cast=(PangoLayout*) */
pango_layout_set_justify(long layout, boolean justify)1827 public static final native void pango_layout_set_justify(long layout, boolean justify);
1828 /**
1829  * @param context cast=(PangoLayout *)
1830  * @param setting cast=(gboolean)
1831  */
pango_layout_set_single_paragraph_mode(long context, boolean setting)1832 public static final native void pango_layout_set_single_paragraph_mode(long context, boolean setting);
1833 /** @param layout cast=(PangoLayout *) */
pango_layout_set_spacing(long layout, int spacing)1834 public static final native void pango_layout_set_spacing(long layout, int spacing);
1835 /**
1836  * @param layout cast=(PangoLayout *)
1837  * @param tabs cast=(PangoTabArray *)
1838  */
pango_layout_set_tabs(long layout, long tabs)1839 public static final native void pango_layout_set_tabs(long layout, long tabs);
1840 /**
1841  * @param layout cast=(PangoLayout *)
1842  * @param text cast=(const char *),flags=no_out critical
1843  * @param length cast=(int)
1844  */
pango_layout_set_text(long layout, byte[] text, int length)1845 public static final native void pango_layout_set_text(long layout, byte[] text, int length);
1846 /** @param layout cast=(PangoLayout *) */
pango_layout_set_width(long layout, int width)1847 public static final native void pango_layout_set_width(long layout, int width);
1848 /** @param layout cast=(PangoLayout *) */
pango_layout_set_wrap(long layout, int wrap)1849 public static final native void pango_layout_set_wrap(long layout, int wrap);
1850 /**
1851  * @param layout cast=(PangoLayout *)
1852  * @param index cast=(int *)
1853  * @param trailing cast=(int *)
1854  */
pango_layout_xy_to_index(long layout, int x, int y, int[] index, int[] trailing)1855 public static final native boolean pango_layout_xy_to_index(long layout, int x, int y, int[] index, int[] trailing);
1856 
1857 
1858 /** @param tab_array cast=(PangoTabArray *) */
pango_tab_array_free(long tab_array)1859 public static final native void pango_tab_array_free(long tab_array);
1860 /**
1861  * @param initial_size cast=(gint)
1862  * @param positions_in_pixels cast=(gboolean)
1863  */
pango_tab_array_new(int initial_size, boolean positions_in_pixels)1864 public static final native long pango_tab_array_new(int initial_size, boolean positions_in_pixels);
1865 /**
1866  * @param tab_array cast=(PangoTabArray *)
1867  * @param tab_index cast=(gint)
1868  * @param alignment cast=(PangoTabAlign)
1869  * @param location cast=(gint)
1870  */
pango_tab_array_set_tab(long tab_array, int tab_index, long alignment, int location)1871 public static final native void pango_tab_array_set_tab(long tab_array, int tab_index, long alignment, int location);
1872 /**
1873  * @method flags=dynamic
1874  */
ubuntu_menu_proxy_get()1875 public static final native long ubuntu_menu_proxy_get();
1876 /**
1877  * @param s1 cast=(const char*)
1878  * @param s2 cast=(const char*)
1879  */
strcmp(long s1, byte [] s2)1880 public static final native int strcmp (long s1, byte [] s2);
1881 
1882 /**
1883  * Theme name as given by OS.
1884  * You can see the exact theme name via Tweak Tools -> Appearance -> Themes.
1885  * E.g
1886  * 		Adwaita
1887  * 		Adwaita-Dark
1888  * 		Ambiance 		(Ubuntu).
1889  *
1890  * See also: Device.overrideThemeValues();
1891  */
getThemeName()1892 public static final String getThemeName() {
1893 	byte[] themeNameBytes = getThemeNameBytes();
1894 	String themeName = "unknown";
1895 	if (themeNameBytes != null && themeNameBytes.length > 0) {
1896 		themeName = new String (Converter.mbcsToWcs (themeNameBytes));
1897 	}
1898 	return themeName;
1899 }
1900 
getThemeNameBytes()1901 public static final byte [] getThemeNameBytes() {
1902 	byte [] buffer = null;
1903 	int length;
1904 	long settings = GTK.gtk_settings_get_default ();
1905 	long [] ptr = new long [1];
1906 	OS.g_object_get (settings, GTK.gtk_theme_name, ptr, 0);
1907 	if (ptr [0] == 0) {
1908 		return buffer;
1909 	}
1910 	length = C.strlen (ptr [0]);
1911 	if (length == 0) {
1912 		return buffer;
1913 	}
1914 	/* String will be passed to C function later, needs to be zero-terminated */
1915 	buffer = new byte [length + 1];
1916 	C.memmove (buffer, ptr [0], length);
1917 	OS.g_free (ptr [0]);
1918 	return buffer;
1919 }
1920 
1921 /**
1922  * Hint GTK 3 to natively prefer a dark or light theme.
1923  * <p>
1924  * Note: This method gets called from the org.eclipse.e4.ui.swt.gtk fragment.
1925  * </p>
1926  *
1927  * @since 3.104
1928  */
setDarkThemePreferred(boolean preferred)1929 	public static final void setDarkThemePreferred(boolean preferred) {
1930 		g_object_set(GTK.gtk_settings_get_default(), GTK.gtk_application_prefer_dark_theme, preferred, 0);
1931 		g_object_notify(GTK.gtk_settings_get_default(), GTK.gtk_application_prefer_dark_theme);
1932 	}
1933 
1934 /**
1935  * @param tmpl cast=(const gchar *)
1936  * @param error cast=(GError **)
1937  */
g_dir_make_tmp(long tmpl, long [] error)1938 public static final native long g_dir_make_tmp(long tmpl, long [] error);
1939 
1940 /**
1941  * @param info cast=(GDBusInterfaceInfo *)
1942  * @param name cast=(const gchar *)
1943  * @param object_path cast=(const gchar *)
1944  * @param interface_name cast=(const gchar *)
1945  * @param cancellable cast=(GCancellable *)
1946  * @param error cast=(GError **)
1947  * @category gdbus
1948  */
g_dbus_proxy_new_for_bus_sync(int bus_type, int flags, long info, byte [] name, byte [] object_path, byte [] interface_name, long cancellable, long [] error)1949 public static final native long g_dbus_proxy_new_for_bus_sync(int bus_type, int flags, long info, byte [] name, byte [] object_path, byte [] interface_name,
1950 		long cancellable, long [] error);
1951 
1952 /**
1953  * @param proxy cast=(GDBusProxy *)
1954  * @param method_name cast=(const gchar *)
1955  * @param parameters cast=(GVariant *)
1956  * @param cancellable cast=(GCancellable *)
1957  * @param error cast=(GError **)
1958  * @category gdbus
1959  */
g_dbus_proxy_call_sync(long proxy, byte[] method_name, long parameters, int flags, int timeout_msec, long cancellable, long [] error)1960 public static final native long g_dbus_proxy_call_sync (long proxy, byte[] method_name, long parameters, int flags, int timeout_msec, long cancellable, long [] error);
1961 
1962 /**
1963  * @param proxy cast=(GDBusProxy *)
1964  * @param method_name cast=(const gchar *)
1965  * @param parameters cast=(GVariant *)
1966  * @param cancellable cast=(GCancellable *)
1967  * @param callback cast=(GAsyncReadyCallback)
1968  * @param error cast=(GError **)
1969  * @category gdbus
1970  */
g_dbus_proxy_call(long proxy, byte[] method_name, long parameters, int flags, int timeout_msec, long cancellable, long callback, long [] error)1971 public static final native void g_dbus_proxy_call (long proxy, byte[] method_name, long parameters, int flags, int timeout_msec, long cancellable, long callback, long [] error);
1972 
1973 /**
1974  * @param proxy cast=(GDBusProxy *)
1975  * @category gdbus
1976  */
g_dbus_proxy_get_name_owner(long proxy)1977 public static final native long g_dbus_proxy_get_name_owner(long proxy);
1978 
1979 /**
1980  * @param xml_data cast=(const gchar *)
1981  * @param error cast=(GError **)
1982  * @category gdbus
1983  */
g_dbus_node_info_new_for_xml(byte[] xml_data, long [] error)1984 public static final native long g_dbus_node_info_new_for_xml(byte[] xml_data, long [] error);
1985 
1986 /**
1987  * @param bus_type cast=(GBusType)
1988  * @param name cast=(const gchar *)
1989  * @param flags cast=(GBusNameOwnerFlags)
1990  * @param bus_acquired_handler cast=(GBusAcquiredCallback)
1991  * @param name_acquired_handler cast=(GBusNameAcquiredCallback)
1992  * @param name_lost_handler cast=(GBusNameLostCallback)
1993  * @param user_data cast=(gpointer)
1994  * @param user_data_free_func cast=(GDestroyNotify)
1995  * @category gdbus
1996  */
g_bus_own_name(int bus_type, byte[] name, int flags, long bus_acquired_handler, long name_acquired_handler, long name_lost_handler, long user_data, long user_data_free_func)1997 public static final native int g_bus_own_name(int bus_type, byte[] name, int flags, long bus_acquired_handler, long name_acquired_handler, long name_lost_handler, long  user_data, long user_data_free_func);
1998 
1999 /**
2000  * @param connection cast=(GDBusConnection *)
2001  * @param bus_name cast=(const gchar *)
2002  * @param object_path cast=(const gchar *)
2003  * @param interface_name cast=(const gchar *)
2004  * @param method_name cast=(const gchar *)
2005  * @param param cast=(GVariant *)
2006  * @param reply_type cast=(const GVariantType *)
2007  * @param cancellable cast=(GCancellable *)
2008  * @param callback cast=(GAsyncReadyCallback)
2009  * @param user_data cast=(gpointer)
2010  * @category gdbus
2011  */
g_dbus_connection_call(long connection, byte [] bus_name, byte [] object_path, byte [] interface_name, byte [] method_name, long param, long reply_type, int flag, int timeout, long cancellable, long callback, long user_data)2012 public static final native void g_dbus_connection_call(long connection, byte [] bus_name, byte [] object_path, byte [] interface_name, byte [] method_name, long param, long reply_type, int flag, int timeout, long cancellable, long callback, long user_data);
2013 
2014 /**
2015  * @param proxy cast=(GDBusConnection *)
2016  * @param res cast=(GAsyncResult *)
2017  * @param error cast=(GError **)
2018  * @category gdbus
2019  */
g_dbus_connection_call_finish(long proxy, long res, long [] error)2020 public static final native long g_dbus_connection_call_finish(long proxy, long res, long [] error);
2021 
2022 /**
2023  * @param connection cast=(GDBusConnection *)
2024  * @param bus_name cast=(const gchar *)
2025  * @param object_path cast=(const gchar *)
2026  * @param interface_name cast=(const gchar *)
2027  * @param method_name cast=(const gchar *)
2028  * @param param cast=(GVariant *)
2029  * @param reply_type cast=(const GVariantType *)
2030  * @param cancellable cast=(GCancellable *)
2031  * @param error cast=(GError **)
2032  * @category gdbus
2033  */
g_dbus_connection_call_sync(long connection, byte [] bus_name, byte [] object_path, byte [] interface_name, byte [] method_name, long param, long reply_type, int flag, int timeout, long cancellable, long [] error)2034 public static final native long g_dbus_connection_call_sync(long connection, byte [] bus_name, byte [] object_path, byte [] interface_name, byte [] method_name, long param, long reply_type, int flag, int timeout, long cancellable, long [] error);
2035 
2036 /**
2037  * @param connection cast=(GDBusConnection *)
2038  * @param cancellable cast=(GCancellable *)
2039  * @param error cast=(GError **)
2040  * @category gdbus
2041  */
g_dbus_connection_close_sync(long connection, long cancellable, long [] error)2042 public static final native boolean g_dbus_connection_close_sync(long connection, long cancellable, long [] error);
2043 
2044 /**
2045  * @param connection cast=(GDBusConnection *)
2046  * @category gdbus
2047  */
g_dbus_connection_is_closed(long connection)2048 public static final native boolean g_dbus_connection_is_closed(long connection);
2049 
2050 /**
2051  * @param address cast=(const gchar *)
2052  * @param observer cast=(GDBusAuthObserver *)
2053  * @param cancellable cast=(GCancellable *)
2054  * @param callback cast=(GAsyncReadyCallback)
2055  * @param user_data cast=(gpointer)
2056  * @category gdbus
2057  */
g_dbus_connection_new_for_address(byte[] address, int flags, long observer, long cancellable, long callback, long user_data)2058 public static final native void g_dbus_connection_new_for_address(byte[] address, int flags, long observer, long cancellable, long callback, long user_data);
2059 
2060 /**
2061  * @param result cast=(GAsyncResult *)
2062  * @param error cast=(GError **)
2063  * @category gdbus
2064  */
g_dbus_connection_new_for_address_finish(long result, long [] error)2065 public static final native long g_dbus_connection_new_for_address_finish(long result, long [] error);
2066 
2067 /**
2068  * @param connection cast=(GDBusConnection *)
2069  * @param object_path cast=(const gchar *)
2070  * @param interface_info cast=(GDBusInterfaceInfo *)
2071  * @param vtable cast=(const GDBusInterfaceVTable *)
2072  * @param user_data cast=(gpointer)
2073  * @param user_data_free_func cast=(GDestroyNotify)
2074  * @param error cast=(GError **)
2075  * @category gdbus
2076  */
g_dbus_connection_register_object(long connection, byte[] object_path, long interface_info, long [] vtable, long user_data, long user_data_free_func, long [] error)2077 public static final native int g_dbus_connection_register_object(long connection, byte[] object_path, long interface_info, long [] vtable, long user_data, long user_data_free_func, long [] error);
2078 
2079 /**
2080  * @param info cast=(GDBusNodeInfo *)
2081  * @param name cast=(const gchar *)
2082  * @category gdbus
2083  */
g_dbus_node_info_lookup_interface(long info, byte [] name)2084 public static final native long g_dbus_node_info_lookup_interface(long info, byte [] name);
2085 
2086 /**
2087  * @param invocation cast=(GDBusMethodInvocation *)
2088  * @param parameters cast=(GVariant *)
2089  * @category gdbus
2090  */
g_dbus_method_invocation_return_value(long invocation, long parameters)2091 public static final native void g_dbus_method_invocation_return_value(long invocation, long parameters);
2092 
2093 /**
2094  * @param address cast=(const gchar *)
2095  * @param flags cast=(GDBusServerFlags)
2096  * @param guid cast=(const gchar *)
2097  * @param observer cast=(GDBusAuthObserver *)
2098  * @param cancellable cast=(GCancellable *)
2099  * @param error cast=(GError **)
2100  * @category gdbus
2101  */
g_dbus_server_new_sync(long address, int flags, long guid, long observer, long cancellable, long [] error)2102 public static final native long g_dbus_server_new_sync(long address, int flags, long guid, long observer, long cancellable, long [] error);
2103 
2104 /**
2105  * @param server cast=(GDBusServer *)
2106  * @category gdbus
2107  */
g_dbus_server_start(long server)2108 public static final native void g_dbus_server_start(long server);
2109 
2110 /**
2111  * @param server cast=(GDBusServer *)
2112  * @category gdbus
2113  */
g_dbus_server_stop(long server)2114 public static final native void g_dbus_server_stop(long server);
2115 
2116 /**
2117  * @param server cast=(GDBusServer *)
2118  * @category gdbus
2119  */
g_dbus_server_get_client_address(long server)2120 public static final native long g_dbus_server_get_client_address(long server);
2121 
2122 /**
2123  * @category gdbus
2124  */
g_dbus_auth_observer_new()2125 public static final native long g_dbus_auth_observer_new();
2126 
2127 /**
2128  * @category gdbus
2129  */
g_dbus_generate_guid()2130 public static final native long g_dbus_generate_guid();
2131 
2132 /**
2133  * @param type cast=(const GVariantType *)
2134  * @category gdbus
2135  */
g_variant_builder_new(long type)2136 public static final native long g_variant_builder_new(long type);
2137 
2138 /**
2139  * @param builder cast=(GVariantBuilder *)
2140  * @param value cast=(GVariant *)
2141  * @category gdbus
2142  */
g_variant_builder_add_value(long builder, long value)2143 public static final native void g_variant_builder_add_value(long builder, long value);
2144 
2145 /**
2146  * @param type cast=(GVariantType *)
2147  * @category gdbus
2148  */
g_variant_type_free(long type)2149 public static final native void g_variant_type_free(long type);
2150 
2151 /**
2152  * @param type cast=(const gchar *)
2153  * @category gdbus
2154  */
g_variant_type_new(byte [] type)2155 public static final native long g_variant_type_new(byte [] type);
2156 
2157 /**
2158  * @param builder cast=(GVariantBuilder *)
2159  * @category gdbus
2160  */
g_variant_builder_end(long builder)2161 public static final native long g_variant_builder_end(long builder);
2162 
2163 /**
2164  * @param builder cast=(GVariantBuilder *)
2165  * @category gdbus
2166  */
g_variant_builder_unref(long builder)2167 public static final native void g_variant_builder_unref(long builder);
2168 
2169 /**
2170  * @param format_string cast=(const gchar *),flags=no_out
2171  * @param arg0 cast=(const gchar *),flags=no_out
2172  * @category gdbus
2173  */
g_variant_new(byte[] format_string, byte[] arg0)2174 public static final native long g_variant_new (byte[] format_string, byte[] arg0);
2175 
2176 /**
2177  * @param format_string cast=(const gchar *),flags=no_out
2178  * @param arg0 cast=(gboolean)
2179  * @param arg1 cast=(const gchar *),flags=no_out
2180  * @category gdbus
2181  */
g_variant_new(byte[] format_string, boolean arg0, byte[] arg1)2182 public static final native long g_variant_new (byte[] format_string, boolean arg0, byte[] arg1);
2183 
2184 /**
2185  * @param format_string cast=(const gchar *),flags=no_out
2186  * @param arg0 cast=(const gchar *),flags=no_out
2187  * @param arg1 cast=(const gchar *),flags=no_out
2188  * @category gdbus
2189  */
g_variant_new(byte[] format_string, byte[] arg0, byte[] arg1)2190 public static final native long g_variant_new (byte[] format_string, byte[] arg0, byte[] arg1);
2191 
2192 /**
2193  * @param intval cast=(gint32)
2194  * @category gdbus
2195  */
g_variant_new_int32(int intval)2196 public static final native long g_variant_new_int32(int intval);
2197 
2198 
2199 /**
2200  * @param gvariant cast=(GVariant *)
2201  * @category gdbus
2202  * @return int
2203  */
g_variant_get_int32(long gvariant)2204 public static final native int g_variant_get_int32(long gvariant);
2205 
2206 /**
2207  * @param gvariant cast=(GVariant *)
2208  * @category gdbus
2209  * @return guchar
2210  */
g_variant_get_byte(long gvariant)2211 public static final native byte g_variant_get_byte(long gvariant);
2212 
2213 /**
2214  * @param gvariant cast=(GVariant *)
2215  * @category gdbus
2216  */
g_variant_get_boolean(long gvariant)2217 public static final native boolean g_variant_get_boolean(long gvariant);
2218 
2219 /**
2220  * @param gvariant cast=(GVariant *)
2221  * @param index cast=(gsize)
2222  * @category gdbus
2223  */
g_variant_get_child_value(long gvariant, int index)2224 public static final native long g_variant_get_child_value(long gvariant, int index);
2225 
2226 /**
2227  * @param gvariant cast=(GVariant *)
2228  * @category gdbus
2229  */
g_variant_get_double(long gvariant)2230 public static final native double g_variant_get_double(long gvariant);
2231 
g_variant_new_uint64(long value)2232 public static final native long g_variant_new_uint64(long value);
2233 
2234 /**
2235  * @param gvariant cast=(GVariant *)
2236  * @category gdbus
2237  */
g_variant_get_uint64(long gvariant)2238 public static final native long g_variant_get_uint64(long gvariant);
2239 
2240 /**
2241  * @param gvariant cast=(GVariant *)
2242  * @param length cast=(gsize *)
2243  * @category gdbus
2244  */
g_variant_get_string(long gvariant, long[] length)2245 public static final native long g_variant_get_string(long gvariant, long[] length);
2246 
2247 /**
2248  * @param gvariant cast=(GVariant *)
2249  * @category gdbus
2250  */
g_variant_get_type_string(long gvariant)2251 public static final native long g_variant_get_type_string(long gvariant);
2252 
2253 /**
2254  * @param gvariant cast=(GVariant *)
2255  * @param type cast=(const GVariantType *)
2256  * @category gdbus
2257  */
g_variant_is_of_type(long gvariant, byte[] type)2258 public static final native boolean g_variant_is_of_type(long gvariant, byte[] type);
2259 
2260 /**
2261  * @param gvariant cast=(GVariant *)
2262  * @category gdbus
2263  */
g_variant_n_children(long gvariant)2264 public static final native long g_variant_n_children(long gvariant);
2265 
2266 /**
2267  * @param value cast=(gboolean)
2268  * @category gdbus
2269  */
g_variant_new_boolean(boolean value)2270 public static final native long g_variant_new_boolean(boolean value);
2271 
2272 /**
2273  * @param value cast=(gboolean)
2274  * @category gdbus
2275  */
g_variant_new_double(double value)2276 public static final native long g_variant_new_double(double value);
2277 
2278 /**
2279  * @param value cast=(guchar)
2280  * @category gdbus
2281  */
g_variant_new_byte(byte value)2282 public static final native long g_variant_new_byte(byte value);
2283 
2284 /**
2285  * @param items cast=(GVariant * const *)
2286  * @param length cast=(gsize)
2287  * @category gdbus
2288  */
g_variant_new_tuple(long [] items, long length)2289 public static final native long g_variant_new_tuple(long [] items, long length);
2290 
2291 /**
2292  * @param string cast=(const gchar *)
2293  * @category gdbus
2294  */
g_variant_new_string(byte[] string)2295 public static final native long g_variant_new_string(byte[] string);
2296 
2297 /**
2298  * @param string cast=(const gchar *)
2299  * @category gdbus
2300  */
g_variant_new_string(long string)2301 public static final native long g_variant_new_string(long string);
2302 
2303 /**
2304  * @param value cast=(GVariant *)
2305  * @category gdbus
2306  */
g_variant_unref(long value)2307 public static final native void g_variant_unref(long value);
2308 
2309 /**
2310  * @param object cast=(GObject *)
2311  */
g_object_ref_sink(long object)2312 public static final native long g_object_ref_sink(long object);
2313 
2314 /**
2315  * @param dateTime cast=(GDateTime *)
2316  * @param year cast=(gint *)
2317  * @param month cast=(gint *)
2318  * @param day cast=(gint *)
2319  */
g_date_time_get_ymd(long dateTime, int[] year, int[] month, int[] day)2320 public static final native void g_date_time_get_ymd(long dateTime, int[] year, int[] month, int[] day);
2321 
2322 /**
2323  * Ranges:
2324  * year must be between 1 - 9999,
2325  * month must be between 1 - 12,
2326  * day must be between 1 and 28, 29, 30, 31,
2327  * hour must be between 0 - 23,
2328  * minute must be between 0 - 59,
2329  * seconds must be between 0.0 - 60.0
2330  *
2331  * @param year cast=(gint)
2332  * @param month cast=(gint)
2333  * @param day cast=(gint)
2334  * @param hour cast=(gint)
2335  * @param minute cast=(gint)
2336  * @param seconds cast=(gdouble)
2337  */
g_date_time_new_local(int year, int month, int day, int hour, int minute, double seconds)2338 public static final native long g_date_time_new_local(int year, int month, int day, int hour, int minute, double seconds);
2339 
2340 /** @param file cast=(GFile *) */
g_file_get_path(long file)2341 public static final native long g_file_get_path(long file);
2342 
2343 
2344 /* GMenu */
g_menu_new()2345 public static final native long g_menu_new();
2346 /**
2347  * @param label cast=(const gchar *)
2348  * @param submenu cast=(GMenuModel *)
2349  */
g_menu_item_new_submenu(byte[] label, long submenu)2350 public static final native long g_menu_item_new_submenu(byte[] label, long submenu);
2351 /**
2352  * @param label cast=(const gchar *)
2353  * @param section cast=(GMenuModel *)
2354  */
g_menu_item_new_section(byte[] label, long section)2355 public static final native long g_menu_item_new_section(byte[] label, long section);
2356 /**
2357  * @param label cast=(const gchar *)
2358  * @param detailed_action cast=(const gchar *)
2359  */
g_menu_item_new(byte[] label, byte[] detailed_action)2360 public static final native long g_menu_item_new(byte[] label, byte[] detailed_action);
2361 /**
2362  * @param menu_item cast=(GMenuItem *)
2363  * @param submenu cast=(GMenuModel *)
2364  */
g_menu_item_set_submenu(long menu_item, long submenu)2365 public static final native void g_menu_item_set_submenu(long menu_item, long submenu);
2366 /**
2367  * @param menu cast=(GMenu *)
2368  * @param item cast=(GMenuItem *)
2369  */
g_menu_insert_item(long menu, int position, long item)2370 public static final native void g_menu_insert_item(long menu, int position, long item);
2371 /** @param menu cast=(GMenu *) */
g_menu_remove(long menu, int position)2372 public static final native void g_menu_remove(long menu, int position);
2373 /**
2374  * @param menu_item cast=(GMenuItem *)
2375  * @param label cast=(const gchar *)
2376  */
g_menu_item_set_label(long menu_item, byte[] label)2377 public static final native void g_menu_item_set_label(long menu_item, byte[] label);
2378 /**
2379  * @param menu_item cast=(GMenuItem *)
2380  * @param attribute cast=(const gchar *)
2381  * @param format_string cast=(const gchar *)
2382  * @param data cast=(const gchar *)
2383  */
g_menu_item_set_attribute(long menu_item, byte[] attribute, byte[] format_string, long data)2384 public static final native void g_menu_item_set_attribute(long menu_item, byte[] attribute, byte[] format_string, long data);
2385 
2386 
2387 /* GMenuModel */
2388 /** @param model cast=(GMenuModel *) */
g_menu_model_get_n_items(long model)2389 public static final native int g_menu_model_get_n_items(long model);
2390 
2391 
2392 /* GAction */
g_simple_action_group_new()2393 public static final native long g_simple_action_group_new();
2394 /**
2395  * @param name cast=(const gchar *)
2396  * @param parameter_type cast=(const GVariantType *)
2397  */
g_simple_action_new(byte[] name, long parameter_type)2398 public static final native long g_simple_action_new(byte[] name, long parameter_type);
2399 /**
2400  * @param name cast=(const gchar *)
2401  * @param parameter_type cast=(const GVariantType *)
2402  * @param initial_state cast=(GVariant *)
2403  */
g_simple_action_new_stateful(byte[] name, long parameter_type, long initial_state)2404 public static final native long g_simple_action_new_stateful(byte[] name, long parameter_type, long initial_state);
2405 /**
2406  * @param action_map cast=(GActionMap *)
2407  * @param action cast=(GAction *)
2408  */
g_action_map_add_action(long action_map, long action)2409 public static final native void g_action_map_add_action(long action_map, long action);
2410 /** @param action cast=(GAction *) */
g_action_get_enabled(long action)2411 public static final native boolean g_action_get_enabled(long action);
2412 /** @param simple_action cast=(GSimpleAction *) */
g_simple_action_set_enabled(long simple_action, boolean enabled)2413 public static final native void g_simple_action_set_enabled(long simple_action, boolean enabled);
2414 /** @param action cast=(GAction *) */
g_action_get_state(long action)2415 public static final native long g_action_get_state(long action);
2416 /**
2417  * @param simple_action cast=(GSimpleAction *)
2418  * @param value cast=(GVariant *)
2419  */
g_simple_action_set_state(long simple_action, long value)2420 public static final native void g_simple_action_set_state(long simple_action, long value);
2421 
2422 
2423 /* GListModel */
2424 /** @param list cast=(GListModel *) */
g_list_model_get_n_items(long list)2425 public static final native int g_list_model_get_n_items(long list);
2426 /**
2427  * @param list cast=(GListModel *)
2428  * @param position cast=(guint)
2429  */
g_list_model_get_item(long list, int position)2430 public static final native long g_list_model_get_item(long list, int position);
2431 }
2432