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