1 /*******************************************************************************
2  * Copyright (c) 2021 Syntevo and others.
3  *
4  * This program and the accompanying materials
5  * are made available under the terms of the Eclipse Public License 2.0
6  * which accompanies this distribution, and is available at
7  * https://www.eclipse.org/legal/epl-2.0/
8  *
9  * SPDX-License-Identifier: EPL-2.0
10  *
11  * Contributors:
12  *     Syntevo - initial API and implementation
13  *******************************************************************************/
14 package org.eclipse.swt.internal.gtk3;
15 
16 /**
17  * This class contains native functions that are present in GTK3 only.
18  */
19 public class GTK3 {
20 
21 	/* Macros */
GTK_IS_MENU_ITEM(long obj)22 	public static final native boolean GTK_IS_MENU_ITEM(long obj);
23 	/** @method flags=const */
GTK_TYPE_MENU()24 	public static final native long GTK_TYPE_MENU();
25 
26 	/**
27 	 * @param context cast=(GtkIMContext *)
28 	 * @param event cast=(GdkEventKey *)
29 	 */
gtk_im_context_filter_keypress(long context, long event)30 	public static final native boolean gtk_im_context_filter_keypress(long context, long event);
31 
32 	/* GtkButton */
33 	/**
34 	 * @param button cast=(GtkButton *)
35 	 * @param image cast=(GtkWidget *)
36 	 */
gtk_button_set_image(long button, long image)37 	public static final native void gtk_button_set_image(long button, long image);
38 
39 	/* GtkAccelLabel */
40 	/**
41 	 * @param label cast=(const gchar *)
42 	 */
gtk_accel_label_new(byte[] label)43 	public static final native long gtk_accel_label_new(byte[] label);
44 	/**
45 	 * @param accel_label cast=(GtkAccelLabel *)
46 	 * @param accel_widget cast=(GtkWidget *)
47 	 */
gtk_accel_label_set_accel_widget(long accel_label, long accel_widget)48 	public static final native void gtk_accel_label_set_accel_widget(long accel_label, long accel_widget);
49 	/**
50 	 * @param accel_label cast=(GtkAccelLabel *)
51 	 * @param accel_key cast=(guint)
52 	 * @param accel_mods cast=(GdkModifierType)
53 	 */
gtk_accel_label_set_accel(long accel_label, int accel_key, int accel_mods)54 	public static final native void gtk_accel_label_set_accel(long accel_label, int accel_key, int accel_mods);
55 
56 	/* GtkBin */
57 	/** @param bin cast=(GtkBin *) */
gtk_bin_get_child(long bin)58 	public static final native long gtk_bin_get_child(long bin);
59 
60 	/* GtkBox */
61 	/**
62 	 * @param box cast=(GtkBox *)
63 	 * @param child cast=(GtkWidget *)
64 	 */
gtk_box_set_child_packing(long box, long child, boolean expand, boolean fill, int padding, int pack_type)65 	public static final native void gtk_box_set_child_packing(long box, long child, boolean expand, boolean fill, int padding, int pack_type);
66 	/**
67 	 * @param box cast=(GtkBox *)
68 	 * @param child cast=(GtkWidget *)
69 	 * @param position cast=(gint)
70 	 */
gtk_box_reorder_child(long box, long child, int position)71 	public static final native void gtk_box_reorder_child(long box, long child, int position);
72 	/**
73 	 * @param box cast=(GtkBox *)
74 	 * @param widget cast=(GtkWidget *)
75 	 * @param expand cast=(gboolean)
76 	 * @param fill cast=(gboolean)
77 	 * @param padding cast=(guint)
78 	 */
gtk_box_pack_end(long box, long widget, boolean expand, boolean fill, int padding)79 	public static final native void gtk_box_pack_end(long box, long widget, boolean expand, boolean fill, int padding);
80 
81 	/* GtkCalendar */
82 	/**
83 	 * @param calendar cast=(GtkCalendar *)
84 	 * @param month cast=(guint)
85 	 * @param year cast=(guint)
86 	 */
gtk_calendar_select_month(long calendar, int month, int year)87 	public static final native void gtk_calendar_select_month(long calendar, int month, int year);
88 	/**
89 	 * @param calendar cast=(GtkCalendar *)
90 	 * @param day cast=(guint)
91 	 */
gtk_calendar_select_day(long calendar, int day)92 	public static final native void gtk_calendar_select_day(long calendar, int day);
93 	/**
94 	 * @param calendar cast=(GtkCalendar *)
95 	 * @param flags cast=(GtkCalendarDisplayOptions)
96 	 */
gtk_calendar_set_display_options(long calendar, int flags)97 	public static final native void gtk_calendar_set_display_options(long calendar, int flags);
98 	/**
99 	 * @param calendar cast=(GtkCalendar *)
100 	 * @param year cast=(guint *)
101 	 * @param month cast=(guint *)
102 	 * @param day cast=(guint *)
103 	 */
gtk_calendar_get_date(long calendar, int[] year, int[] month, int[] day)104 	public static final native void gtk_calendar_get_date(long calendar, int[] year, int[] month, int[] day);
105 
106 	/* GtkColorChooser Interface */
107 	/**
108 	 * @param h cast=(gdouble)
109 	 * @param s cast=(gdouble)
110 	 * @param v cast=(gdouble)
111 	 * @param r cast=(gdouble *)
112 	 * @param g cast=(gdouble *)
113 	 * @param b cast=(gdouble *)
114 	 */
gtk_hsv_to_rgb(double h, double s, double v, double[] r, double[] g, double[] b)115 	public static final native void gtk_hsv_to_rgb(double h, double s, double v, double[] r, double[] g, double[] b);
116 	/**
117 	 * @param r cast=(gdouble)
118 	 * @param g cast=(gdouble)
119 	 * @param b cast=(gdouble)
120 	 * @param h cast=(gdouble *)
121 	 * @param s cast=(gdouble *)
122 	 * @param v cast=(gdouble *)
123 	 */
gtk_rgb_to_hsv(double r, double g, double b, double[] h, double[] s, double[] v)124 	public static final native void gtk_rgb_to_hsv(double r, double g, double b, double[] h, double[] s, double[] v);
125 
126 	/* GtkContainer */
127 	/**
128 	 * @param container cast=(GtkContainer *)
129 	 * @param widget cast=(GtkWidget *)
130 	 */
gtk_container_add(long container, long widget)131 	public static final native void gtk_container_add(long container, long widget);
132 	// Do not confuse this function with gtk_container_foreach(..).
133 	// Make sure you know what you are doing when using this. Please be attentive to swt_fixed_forall(..)
134 	// found in os_custom.c, which overrides this function for swtFixed container with custom behaviour.
135 	/**
136 	 * @param container cast=(GtkContainer *)
137 	 * @param callback cast=(GtkCallback)
138 	 * @param callback_data cast=(gpointer)
139 	 */
gtk_container_forall(long container, long callback, long callback_data)140 	public static final native void gtk_container_forall(long container, long callback, long callback_data);
141 	/**
142 	 * @param container cast=(GtkContainer *)
143 	 * @param child cast=(GtkWidget *)
144 	 * @param cairo cast=(cairo_t *)
145 	 */
gtk_container_propagate_draw(long container, long child, long cairo)146 	public static final native void gtk_container_propagate_draw(long container, long child, long cairo);
147 	/** @param container cast=(GtkContainer *) */
gtk_container_get_border_width(long container)148 	public static final native int gtk_container_get_border_width(long container);
149 	/** @param container cast=(GtkContainer *) */
gtk_container_get_children(long container)150 	public static final native long gtk_container_get_children(long container);
151 	/**
152 	 * @param container cast=(GtkContainer *)
153 	 * @param widget cast=(GtkWidget *)
154 	 */
gtk_container_remove(long container, long widget)155 	public static final native void gtk_container_remove(long container, long widget);
156 	/**
157 	 * @param container cast=(GtkContainer *)
158 	 * @param border_width cast=(guint)
159 	 */
gtk_container_set_border_width(long container, int border_width)160 	public static final native void gtk_container_set_border_width(long container, int border_width);
161 
162 	/* GtkDialog */
163 	/** @param dialog cast=(GtkDialog *) */
gtk_dialog_run(long dialog)164 	public static final native int gtk_dialog_run(long dialog);
165 
166 	/* GTK Initialization */
167 	/**
168 	 * @param argc cast=(int *)
169 	 * @param argv cast=(char ***)
170 	 */
gtk_init_check(long [] argc, long [] argv)171 	public static final native boolean gtk_init_check(long [] argc, long [] argv);
172 
173 	/* GtkGrab */
174 	/** @param widget cast=(GtkWidget *) */
gtk_grab_add(long widget)175 	public static final native void gtk_grab_add(long widget);
gtk_grab_get_current()176 	public static final native long gtk_grab_get_current();
177 	/** @param widget cast=(GtkWidget *) */
gtk_grab_remove(long widget)178 	public static final native void gtk_grab_remove(long widget);
179 
180 	/* Events */
gtk_get_current_event()181 	public static final native long gtk_get_current_event();
182 	/** @param state cast=(GdkModifierType*) */
gtk_get_current_event_state(int[] state)183 	public static final native boolean gtk_get_current_event_state(int[] state);
184 	/** @param event cast=(GdkEvent *) */
gtk_get_event_widget(long event)185 	public static final native long gtk_get_event_widget(long event);
186 	/** @param event cast=(GdkEvent *) */
gtk_main_do_event(long event)187 	public static final native void gtk_main_do_event(long event);
gtk_main_iteration_do(boolean blocking)188 	public static final native boolean gtk_main_iteration_do(boolean blocking);
gtk_events_pending()189 	public static final native boolean gtk_events_pending();
190 
191 	/* GtkWindow */
192 	/**
193 	 * @param window cast=(GtkWindow *)
194 	 * @param list cast=(GList *)
195 	 */
gtk_window_set_icon_list(long window, long list)196 	public static final native void gtk_window_set_icon_list(long window, long list);
197 	/**
198 	 * @param window cast=(GtkWindow *)
199 	 * @param accel_group cast=(GtkAccelGroup *)
200 	 */
gtk_window_add_accel_group(long window, long accel_group)201 	public static final native void gtk_window_add_accel_group(long window, long accel_group);
202 	/**
203 	 * @param window cast=(GtkWindow *)
204 	 * @param accel_group cast=(GtkAccelGroup *)
205 	 */
gtk_window_remove_accel_group(long window, long accel_group)206 	public static final native void gtk_window_remove_accel_group(long window, long accel_group);
207 	/** @param handle cast=(GtkWindow *) */
gtk_window_deiconify(long handle)208 	public static final native void gtk_window_deiconify(long handle);
209 	/** @param handle cast=(GtkWindow *) */
gtk_window_iconify(long handle)210 	public static final native void gtk_window_iconify(long handle);
211 	/**
212 	 * @param window cast=(GtkWindow *)
213 	 * @param widget cast=(GtkWidget *)
214 	 */
gtk_window_set_default(long window, long widget)215 	public static final native void gtk_window_set_default(long window, long widget);
216 	/** @param window cast=(GtkWindow *) */
gtk_window_activate_default(long window)217 	public static final native boolean gtk_window_activate_default(long window);
218 	/** @param window cast=(GtkWindow *) */
gtk_window_set_type_hint(long window, int hint)219 	public static final native void gtk_window_set_type_hint(long window, int hint);
220 	/**
221 	 * @param window cast=(GtkWindow *)
222 	 * @param skips_taskbar cast=(gboolean)
223 	 */
gtk_window_set_skip_taskbar_hint(long window, boolean skips_taskbar)224 	public static final native void gtk_window_set_skip_taskbar_hint(long window, boolean skips_taskbar);
225 	/**
226 	 * @param window cast=(GtkWindow *)
227 	 * @param setting cast=(gboolean)
228 	 */
gtk_window_set_keep_above(long window, boolean setting)229 	public static final native void gtk_window_set_keep_above(long window, boolean setting);
230 	/** @param window cast=(GtkWindow *) */
gtk_window_get_icon_list(long window)231 	public static final native long gtk_window_get_icon_list(long window);
232 	/**
233 	 * @param window cast=(GtkWindow *)
234 	 * @param attach_widget cast=(GtkWidget *)
235 	 */
gtk_window_set_attached_to(long window, long attach_widget)236 	public static final native void gtk_window_set_attached_to(long window, long attach_widget);
237 	/**
238 	 * @param handle cast=(GtkWindow *)
239 	 * @param x cast=(gint)
240 	 * @param y cast=(gint)
241 	 */
gtk_window_move(long handle, int x, int y)242 	public static final native void gtk_window_move(long handle, int x, int y);
243 	/** @param type cast=(GtkWindowType) */
gtk_window_new(int type)244 	public static final native long gtk_window_new(int type);
245 	/**
246 	 * @param handle cast=(GtkWindow *)
247 	 * @param x cast=(gint *)
248 	 * @param y cast=(gint *)
249 	 */
gtk_window_get_position(long handle, int[] x, int[] y)250 	public static final native void gtk_window_get_position(long handle, int[] x, int[] y);
251 	/** @param window cast=(GtkWindow *) */
gtk_window_get_mnemonic_modifier(long window)252 	public static final native int gtk_window_get_mnemonic_modifier(long window);
253 	/**
254 	 * @param handle cast=(GtkWindow *)
255 	 * @param x cast=(gint)
256 	 * @param y cast=(gint)
257 	 */
gtk_window_resize(long handle, int x, int y)258 	public static final native void gtk_window_resize(long handle, int x, int y);
259 	/**
260 	 * @param handle cast=(GtkWindow *)
261 	 * @param width cast=(gint *)
262 	 * @param height cast=(gint *)
263 	 */
gtk_window_get_size(long handle, int[] width, int[] height)264 	public static final native void gtk_window_get_size(long handle, int[] width, int[] height);
265 
266 	/* GtkWidget */
267 	/** @param widget cast=(GtkWidget *) */
gtk_widget_get_accessible(long widget)268 	public static final native long gtk_widget_get_accessible(long widget);
269 	/**
270 	 * @method flags=ignore_deprecations
271 	 * @param widget cast=(GtkWidget *)
272 	 * @param font cast=(const PangoFontDescription *)
273 	 */
274 	/* deprecated as of 3.16 */
gtk_widget_override_font(long widget, long font)275 	public static final native void gtk_widget_override_font(long widget, long font);
276 	/**
277 	 * @method flags=ignore_deprecations
278 	 * @param widget cast=(GtkWidget *)
279 	 * @param new_parent cast=(GtkWidget *)
280 	 */
281 	/* deprecated as of 3.14 */
gtk_widget_reparent(long widget, long new_parent)282 	public static final native void gtk_widget_reparent(long widget, long new_parent);
283 	/**
284 	 * @method flags=ignore_deprecations
285 	 * @param widget cast=(GtkWidget *)
286 	 * @param double_buffered cast=(gboolean)
287 	 */
288 	/* deprecated as of 3.14 */
gtk_widget_set_double_buffered(long widget, boolean double_buffered)289 	public static final native void gtk_widget_set_double_buffered(long widget, boolean double_buffered);
290 	/**
291 	 * @param widget cast=(GtkWidget *)
292 	 * @param width cast=(gint)
293 	 * @param minimum_size cast=(gint *)
294 	 * @param natural_size cast=(gint *)
295 	 */
gtk_widget_get_preferred_height_for_width(long widget, int width, int[] minimum_size, int[] natural_size)296 	public static final native void gtk_widget_get_preferred_height_for_width(long widget, int width, int[] minimum_size, int[] natural_size);
297 	/**
298 	 * @param widget cast=(GtkWidget *)
299 	 * @param minimum_size cast=(gint *)
300 	 * @param natural_size cast=(gint *)
301 	 */
gtk_widget_get_preferred_height(long widget, int[] minimum_size, int[] natural_size)302 	public static final native void gtk_widget_get_preferred_height(long widget, int[] minimum_size, int[] natural_size);
303 	/**
304 	 * @param widget cast=(GtkWidget *)
305 	 * @param height cast=(gint)
306 	 * @param minimum_size cast=(gint *)
307 	 * @param natural_size cast=(gint *)
308 	 */
gtk_widget_get_preferred_width_for_height(long widget, int height, int[] minimum_size, int[] natural_size)309 	public static final native void gtk_widget_get_preferred_width_for_height(long widget, int height, int[] minimum_size, int[] natural_size);
310 	/** @param widget cast=(GtkWidget *) */
gtk_widget_get_screen(long widget)311 	public static final native long gtk_widget_get_screen(long widget);
312 	/**
313 	 * @param widget cast=(GtkWidget *)
314 	 * @param has_window cast=(gboolean)
315 	 */
gtk_widget_set_has_window(long widget, boolean has_window)316 	public static final native void gtk_widget_set_has_window(long widget, boolean has_window);
317 	/**
318 	 * @param widget cast=(GtkWidget *)
319 	 * @param accel_signal cast=(const gchar *)
320 	 * @param accel_group cast=(GtkAccelGroup *)
321 	 * @param accel_key cast=(guint)
322 	 * @param accel_mods cast=(GdkModifierType)
323 	 */
gtk_widget_add_accelerator(long widget, byte[] accel_signal, long accel_group, int accel_key, int accel_mods, int accel_flags)324 	public static final native void gtk_widget_add_accelerator(long widget, byte[] accel_signal, long accel_group, int accel_key, int accel_mods, int accel_flags);
325 	/**
326 	 * @param widget cast=(GtkWidget *)
327 	 * @param accel_group cast=(GtkAccelGroup *)
328 	 * @param accel_key cast=(guint)
329 	 * @param accel_mods cast=(GdkModifierType)
330 	 */
gtk_widget_remove_accelerator(long widget, long accel_group, int accel_key, int accel_mods)331 	public static final native void gtk_widget_remove_accelerator(long widget, long accel_group, int accel_key, int accel_mods);
332 	/**
333 	 * @param widget cast=(GtkWidget *)
334 	 * @param events cast=(gint)
335 	 */
gtk_widget_add_events(long widget, int events)336 	public static final native void gtk_widget_add_events(long widget, int events);
337 	/** @param widget cast=(GtkWidget *) */
gtk_widget_destroy(long widget)338 	public static final native void gtk_widget_destroy(long widget);
339 	/** @param widget cast=(GtkWidget *) */
gtk_widget_get_events(long widget)340 	public static final native int gtk_widget_get_events(long widget);
341 	/** @param widget cast=(GtkWidget *) */
gtk_widget_get_window(long widget)342 	public static final native long gtk_widget_get_window(long widget);
343 	/** @param widget cast=(GtkWidget *) */
gtk_widget_get_toplevel(long widget)344 	public static final native long gtk_widget_get_toplevel(long widget);
345 	/**
346 	 * @param widget cast=(GtkWidget *)
347 	 * @param redraw cast=(gboolean)
348 	 */
gtk_widget_set_redraw_on_allocate(long widget, boolean redraw)349 	public static final native void gtk_widget_set_redraw_on_allocate(long widget, boolean redraw);
350 	/**
351 	 * @param widget cast=(GtkWidget *)
352 	 * @param event cast=(GdkEvent *)
353 	 */
gtk_widget_event(long widget, long event)354 	public static final native boolean gtk_widget_event(long widget, long event);
355 	/**
356 	 * @param widget cast=(GtkWidget *)
357 	 * @param cr cast=(cairo_t *)
358 	 */
gtk_widget_draw(long widget, long cr)359 	public static final native void gtk_widget_draw(long widget, long cr);
360 	/** @param widget cast=(GtkWidget *) */
gtk_widget_get_has_window(long widget)361 	public static final native boolean gtk_widget_get_has_window(long widget);
362 	/** @param widget cast=(GtkWidget *) */
gtk_widget_get_can_default(long widget)363 	public static final native boolean gtk_widget_get_can_default(long widget);
364 	/**
365 	 * @param widget cast=(GtkWidget *)
366 	 * @param can_default cast=(gboolean)
367 	 */
gtk_widget_set_can_default(long widget, boolean can_default)368 	public static final native void gtk_widget_set_can_default(long widget, boolean can_default);
369 	/**
370 	 * @param widget cast=(GtkWidget *)
371 	 * @param parent_window cast=(GdkWindow *)
372 	 */
gtk_widget_set_parent_window(long widget, long parent_window)373 	public static final native void gtk_widget_set_parent_window(long widget, long parent_window);
374 	/**
375 	 * @param widget cast=(GtkWidget *)
376 	 * @param region cast=(cairo_region_t *)
377 	 */
gtk_widget_shape_combine_region(long widget, long region)378 	public static final native void gtk_widget_shape_combine_region(long widget, long region);
379 	/**
380 	 * @param src_widget cast=(GtkWidget *)
381 	 * @param dest_widget cast=(GtkWidget *)
382 	 * @param dest_x cast=(gint *)
383 	 * @param dest_y cast=(gint *)
384 	 */
gtk_widget_translate_coordinates(long src_widget, long dest_widget, int src_x, int src_y, int[] dest_x, int[] dest_y)385 	public static final native boolean gtk_widget_translate_coordinates(long src_widget, long dest_widget, int src_x, int src_y, int[] dest_x, int[] dest_y);
386 	/**
387 	 * @param widget cast=(GtkWidget *)
388 	 * @param property_name cast=(const gchar *)
389 	 * @param terminator cast=(const gchar *),flags=sentinel
390 	 */
gtk_widget_style_get(long widget, byte[] property_name, int[] value, long terminator)391 	public static final native void gtk_widget_style_get(long widget, byte[] property_name, int[] value, long terminator);
392 	/**
393 	 * @param widget cast=(GtkWidget *)
394 	 * @param property_name cast=(const gchar *)
395 	 * @param terminator cast=(const gchar *),flags=sentinel
396 	 */
gtk_widget_style_get(long widget, byte[] property_name, long[] value, long terminator)397 	public static final native void gtk_widget_style_get(long widget, byte[] property_name, long[] value, long terminator);
398 	/**
399 	 * @param widget cast=(GtkWidget *)
400 	 * @param region cast=(cairo_region_t *)
401 	 */
gtk_widget_input_shape_combine_region(long widget, long region)402 	public static final native void gtk_widget_input_shape_combine_region(long widget, long region);
403 
404 	/* Drag and Drop API */
405 	/**
406 	 * @param widget cast=(GtkWidget *)
407 	 * @param targets cast=(GtkTargetList *)
408 	 * @param actions cast=(GdkDragAction)
409 	 * @param button cast=(gint)
410 	 * @param event cast=(GdkEvent *)
411 	 * @param x cast=(gint)
412 	 * @param y cast=(gint)
413 	 */
gtk_drag_begin_with_coordinates(long widget, long targets, int actions, int button, long event, int x, int y)414 	public static final native long gtk_drag_begin_with_coordinates(long widget, long targets, int actions, int button, long event, int x, int y);
415 	/**
416 	 * @param widget cast=(GtkWidget *)
417 	 * @param start_x cast=(gint)
418 	 * @param start_y cast=(gint)
419 	 * @param current_x cast=(gint)
420 	 * @param current_y cast=(gint)
421 	 */
gtk_drag_check_threshold(long widget, int start_x, int start_y, int current_x, int current_y)422 	public static final native boolean gtk_drag_check_threshold(long widget, int start_x, int start_y, int current_x, int current_y);
423 	/**
424 	 * @param widget cast=(GtkWidget *)
425 	 * @param flags cast=(GtkDestDefaults)
426 	 * @param targets cast=(const GtkTargetEntry *)
427 	 * @param n_targets cast=(gint)
428 	 * @param actions cast=(GdkDragAction)
429 	 */
gtk_drag_dest_set(long widget, int flags, long targets, int n_targets, int actions)430 	public static final native void gtk_drag_dest_set(long widget, int flags, long targets, int n_targets, int actions);
431 	/** @param widget cast=(GtkWidget *) */
gtk_drag_dest_unset(long widget)432 	public static final native void gtk_drag_dest_unset(long widget);
433 	/**
434 	 * @param context cast=(GdkDragContext *)
435 	 * @param success cast=(gboolean)
436 	 * @param delete cast=(gboolean)
437 	 * @param time cast=(guint32)
438 	 */
gtk_drag_finish(long context, boolean success, boolean delete, int time)439 	public static final native void gtk_drag_finish(long context, boolean success, boolean delete, int time);
440 	/**
441 	 * @param widget cast=(GtkWidget *)
442 	 * @param context cast=(GdkDragContext *)
443 	 * @param target cast=(GdkAtom)
444 	 * @param time cast=(guint32)
445 	 */
gtk_drag_get_data(long widget, long context, long target, int time)446 	public static final native void gtk_drag_get_data(long widget, long context, long target, int time);
447 	/**
448 	 * @param context cast=(GdkDragContext *)
449 	 * @param surface cast=(cairo_surface_t *)
450 	 */
gtk_drag_set_icon_surface(long context, long surface)451 	public static final native void gtk_drag_set_icon_surface(long context, long surface);
452 
453 	/* GtkFileChooser */
454 	/** @param chooser cast=(GtkFileChooser *) */
gtk_file_chooser_get_filename(long chooser)455 	public static final native long gtk_file_chooser_get_filename(long chooser);
456 	/** @param chooser cast=(GtkFileChooser *) */
gtk_file_chooser_get_filenames(long chooser)457 	public static final native long gtk_file_chooser_get_filenames(long chooser);
458 	/** @param chooser cast=(GtkFileChooser *) */
gtk_file_chooser_get_uri(long chooser)459 	public static final native long gtk_file_chooser_get_uri(long chooser);
460 	/** @param chooser cast=(GtkFileChooser *) */
gtk_file_chooser_get_uris(long chooser)461 	public static final native long gtk_file_chooser_get_uris(long chooser);
462 	/**
463 	 * @param chooser cast=(GtkFileChooser *)
464 	 * @param filename cast=(const gchar *)
465 	 */
gtk_file_chooser_set_current_folder(long chooser, long filename)466 	public static final native void gtk_file_chooser_set_current_folder(long chooser, long filename);
467 	/**
468 	 * @param chooser cast=(GtkFileChooser *)
469 	 * @param uri cast=(const gchar *)
470 	 */
gtk_file_chooser_set_current_folder_uri(long chooser, byte [] uri)471 	public static final native void gtk_file_chooser_set_current_folder_uri(long chooser, byte [] uri);
472 	/**
473 	 * @param chooser cast=(GtkFileChooser *)
474 	 * @param local_only cast=(gboolean)
475 	 */
gtk_file_chooser_set_local_only(long chooser, boolean local_only)476 	public static final native void gtk_file_chooser_set_local_only(long chooser, boolean local_only);
477 	/**
478 	 * @param chooser cast=(GtkFileChooser *)
479 	 * @param do_overwrite_confirmation cast=(gboolean)
480 	 */
gtk_file_chooser_set_do_overwrite_confirmation(long chooser, boolean do_overwrite_confirmation)481 	public static final native void gtk_file_chooser_set_do_overwrite_confirmation(long chooser, boolean do_overwrite_confirmation);
482 	/**
483 	 * @param chooser cast=(GtkFileChooser *)
484 	 * @param name cast=(const gchar *)
485 	 */
gtk_file_chooser_set_filename(long chooser, long name)486 	public static final native void gtk_file_chooser_set_filename(long chooser, long name);
487 	/**
488 	 * @param chooser cast=(GtkFileChooser *)
489 	 * @param uri cast=(const char *)
490 	 */
gtk_file_chooser_set_uri(long chooser, byte [] uri)491 	public static final native void gtk_file_chooser_set_uri(long chooser, byte [] uri);
492 	/**
493 	 * @param chooser cast=(GtkFileChooser *)
494 	 * @param extra_widget cast=(GtkWidget *)
495 	 */
gtk_file_chooser_set_extra_widget(long chooser, long extra_widget)496 	public static final native void gtk_file_chooser_set_extra_widget(long chooser, long extra_widget);
497 
498 	/* GtkRadioButton */
499 	/** @param radio_button cast=(GtkRadioButton *) */
gtk_radio_button_get_group(long radio_button)500 	public static final native long gtk_radio_button_get_group(long radio_button);
501 	/** @param group cast=(GSList *) */
gtk_radio_button_new(long group)502 	public static final native long gtk_radio_button_new(long group);
503 
504 	/* GtkNativeDialog */
505 	/** @param dialog cast=(GtkNativeDialog *) */
gtk_native_dialog_run(long dialog)506 	public static final native int gtk_native_dialog_run(long dialog);
507 
508 	/* GtkScrolledWindow */
509 	/**
510 	 * @param hadjustment cast=(GtkAdjustment *)
511 	 * @param vadjustment cast=(GtkAdjustment *)
512 	 */
gtk_scrolled_window_new(long hadjustment, long vadjustment)513 	public static final native long gtk_scrolled_window_new(long hadjustment, long vadjustment);
514 	/**
515 	 * @param scrolled_window cast=(GtkScrolledWindow *)
516 	 * @param type cast=(GtkShadowType)
517 	 */
gtk_scrolled_window_set_shadow_type(long scrolled_window, int type)518 	public static final native void gtk_scrolled_window_set_shadow_type(long scrolled_window, int type);
519 	/** @param scrolled_window cast=(GtkScrolledWindow *) */
gtk_scrolled_window_get_shadow_type(long scrolled_window)520 	public static final native int gtk_scrolled_window_get_shadow_type(long scrolled_window);
521 
522 	/* GtkClipboard */
523 	/** @param clipboard cast=(GtkClipboard *) */
gtk_clipboard_clear(long clipboard)524 	public static final native void gtk_clipboard_clear(long clipboard);
525 	/** @param selection cast=(GdkAtom) */
gtk_clipboard_get(long selection)526 	public static final native long gtk_clipboard_get(long selection);
527 	/**
528 	 * @param clipboard cast=(GtkClipboard *)
529 	 * @param target cast=(const GtkTargetEntry *)
530 	 * @param n_targets cast=(guint)
531 	 * @param get_func cast=(GtkClipboardGetFunc)
532 	 * @param clear_func cast=(GtkClipboardClearFunc)
533 	 * @param user_data cast=(GObject *)
534 	 */
gtk_clipboard_set_with_owner(long clipboard, long target, int n_targets, long get_func, long clear_func, long user_data)535 	public static final native boolean gtk_clipboard_set_with_owner(long clipboard, long target, int n_targets, long get_func, long clear_func, long user_data);
536 	/**
537 	 * @param clipboard cast=(GtkClipboard *)
538 	 * @param targets cast=(const GtkTargetEntry *)
539 	 * @param n_targets cast=(gint)
540 	 */
gtk_clipboard_set_can_store(long clipboard, long targets, int n_targets)541 	public static final native void gtk_clipboard_set_can_store(long clipboard, long targets, int n_targets);
542 	/** @param clipboard cast=(GtkClipboard *) */
gtk_clipboard_store(long clipboard)543 	public static final native void gtk_clipboard_store(long clipboard);
544 	/**
545 	 * @param clipboard cast=(GtkClipboard *)
546 	 * @param target cast=(GdkAtom)
547 	 */
gtk_clipboard_wait_for_contents(long clipboard, long target)548 	public static final native long gtk_clipboard_wait_for_contents(long clipboard, long target);
549 
550 	/* GtkStatusIcon */
551 	/**
552 	 * @method flags=ignore_deprecations
553 	 * @param handle cast=(GtkStatusIcon*)
554 	 */
gtk_status_icon_get_visible(long handle)555 	public static final native boolean gtk_status_icon_get_visible(long handle);
556 	/** @method flags=ignore_deprecations */
gtk_status_icon_new()557 	public static final native long gtk_status_icon_new();
558 	/**
559 	 * @method flags=ignore_deprecations
560 	 * @param handle cast=(GtkStatusIcon*)
561 	 * @param pixbuf cast=(GdkPixbuf*)
562 	 */
gtk_status_icon_set_from_pixbuf(long handle, long pixbuf)563 	public static final native void gtk_status_icon_set_from_pixbuf(long handle, long pixbuf);
564 	/**
565 	 * @method flags=ignore_deprecations
566 	 * @param handle cast=(GtkStatusIcon*)
567 	 * @param visible cast=(gboolean)
568 	 */
gtk_status_icon_set_visible(long handle, boolean visible)569 	public static final native void gtk_status_icon_set_visible(long handle, boolean visible);
570 	/**
571 	 * @method flags=ignore_deprecations
572 	 * @param handle cast=(GtkStatusIcon *)
573 	 * @param tip_text cast=(const gchar *)
574 	 */
gtk_status_icon_set_tooltip_text(long handle, byte[] tip_text)575 	public static final native void gtk_status_icon_set_tooltip_text(long handle, byte[] tip_text);
576 
577 	/* GtkTargetList */
578 	/**
579 	 * @param targets cast=(const GtkTargetEntry *)
580 	 * @param ntargets cast=(guint)
581 	 */
gtk_target_list_new(long targets, int ntargets)582 	public static final native long gtk_target_list_new(long targets, int ntargets);
583 	/** @param list cast=(GtkTargetList *) */
gtk_target_list_unref(long list)584 	public static final native void gtk_target_list_unref(long list);
585 
586 	/* GtkSelectionData */
587 	/** @param selection_data cast=(GtkSelectionData *) */
gtk_selection_data_free(long selection_data)588 	public static final native void gtk_selection_data_free(long selection_data);
589 	/** @param selection_data cast=(GtkSelectionData *) */
gtk_selection_data_get_data(long selection_data)590 	public static final native long gtk_selection_data_get_data(long selection_data);
591 	/** @param selection_data cast=(GtkSelectionData *) */
gtk_selection_data_get_format(long selection_data)592 	public static final native int gtk_selection_data_get_format(long selection_data);
593 	/** @param selection_data cast=(GtkSelectionData *) */
gtk_selection_data_get_length(long selection_data)594 	public static final native int gtk_selection_data_get_length(long selection_data);
595 	/** @param selection_data cast=(GtkSelectionData *) */
gtk_selection_data_get_target(long selection_data)596 	public static final native long gtk_selection_data_get_target(long selection_data);
597 	/** @param selection_data cast=(GtkSelectionData *) */
gtk_selection_data_get_data_type(long selection_data)598 	public static final native long gtk_selection_data_get_data_type(long selection_data);
599 	/**
600 	 * @param selection_data cast=(GtkSelectionData *)
601 	 * @param type cast=(GdkAtom)
602 	 * @param format cast=(gint)
603 	 * @param data cast=(const guchar *)
604 	 * @param length cast=(gint)
605 	 */
gtk_selection_data_set(long selection_data, long type, int format, long data, int length)606 	public static final native void gtk_selection_data_set(long selection_data, long type, int format, long data, int length);
607 
608 	/* GtkMenu/GtkMenuItem */
gtk_menu_bar_new()609 	public static final native long gtk_menu_bar_new();
610 	/** @param menu_item cast=(GtkMenuItem *) */
gtk_menu_item_get_submenu(long menu_item)611 	public static final native long gtk_menu_item_get_submenu(long menu_item);
gtk_menu_item_new()612 	public static final native long gtk_menu_item_new();
613 	/**
614 	 * @param menu_item cast=(GtkMenuItem *)
615 	 * @param submenu cast=(GtkWidget *)
616 	 */
gtk_menu_item_set_submenu(long menu_item, long submenu)617 	public static final native void gtk_menu_item_set_submenu(long menu_item, long submenu);
gtk_menu_new()618 	public static final native long gtk_menu_new();
619 	/** @param menu cast=(GtkMenu *) */
gtk_menu_popdown(long menu)620 	public static final native void gtk_menu_popdown(long menu);
621 	/** @param menu_shell cast=(GtkMenuShell *) */
gtk_menu_shell_deactivate(long menu_shell)622 	public static final native void gtk_menu_shell_deactivate(long menu_shell);
623 	/**
624 	 * @param menu_shell cast=(GtkMenuShell *)
625 	 * @param child cast=(GtkWidget *)
626 	 * @param position cast=(gint)
627 	 */
gtk_menu_shell_insert(long menu_shell, long child, int position)628 	public static final native void gtk_menu_shell_insert(long menu_shell, long child, int position);
629 	/**
630 	 * @param menu_shell cast=(GtkMenuShell *)
631 	 * @param take_focus cast=(gboolean)
632 	 */
gtk_menu_shell_set_take_focus(long menu_shell, boolean take_focus)633 	public static final native void gtk_menu_shell_set_take_focus(long menu_shell, boolean take_focus);
634 	/** @param check_menu_item cast=(GtkCheckMenuItem *) */
gtk_check_menu_item_get_active(long check_menu_item)635 	public static final native boolean gtk_check_menu_item_get_active(long check_menu_item);
gtk_check_menu_item_new()636 	public static final native long gtk_check_menu_item_new();
637 	/**
638 	 * @param wid cast=(GtkCheckMenuItem *)
639 	 * @param active cast=(gboolean)
640 	 */
gtk_check_menu_item_set_active(long wid, boolean active)641 	public static final native void gtk_check_menu_item_set_active(long wid, boolean active);
642 	/** @param radio_menu_item cast=(GtkRadioMenuItem *) */
gtk_radio_menu_item_get_group(long radio_menu_item)643 	public static final native long gtk_radio_menu_item_get_group(long radio_menu_item);
644 	/** @param group cast=(GSList *) */
gtk_radio_menu_item_new(long group)645 	public static final native long gtk_radio_menu_item_new(long group);
gtk_separator_menu_item_new()646 	public static final native long gtk_separator_menu_item_new();
647 
648 	/* GtkToolbar */
gtk_toolbar_new()649 	public static final native long gtk_toolbar_new();
650 	/**
651 	 * @param toolbar cast=(GtkToolbar *)
652 	 * @param item cast=(GtkToolItem *)
653 	 */
gtk_toolbar_insert(long toolbar, long item, int pos)654 	public static final native void gtk_toolbar_insert(long toolbar, long item, int pos);
655 	/**
656 	 * @param toolbar cast=(GtkToolbar *)
657 	 * @param show_arrow cast=(gboolean)
658 	 */
gtk_toolbar_set_show_arrow(long toolbar, boolean show_arrow)659 	public static final native void gtk_toolbar_set_show_arrow(long toolbar, boolean show_arrow);
660 	/**
661 	 * @param toolbar cast=(GtkToolbar *)
662 	 * @param style cast=(GtkToolbarStyle)
663 	 */
gtk_toolbar_set_style(long toolbar, int style)664 	public static final native void gtk_toolbar_set_style(long toolbar, int style);
665 	/** @param toolbar cast=(GtkToolbar *)*/
gtk_toolbar_set_icon_size(long toolbar, int size)666 	public static final native void gtk_toolbar_set_icon_size(long toolbar, int size);
667 
668 	/* GtkToolItem */
669 	/**
670 	 * @param item cast=(GtkToolItem *)
671 	 * @param menu_id cast=(const gchar *)
672 	 */
gtk_tool_item_get_proxy_menu_item(long item, byte[] menu_id)673 	public static final native long gtk_tool_item_get_proxy_menu_item(long item, byte[] menu_id);
674 	/** @param item cast=(GtkToolItem *) */
gtk_tool_item_retrieve_proxy_menu_item(long item)675 	public static final native long gtk_tool_item_retrieve_proxy_menu_item(long item);
676 	/**
677 	 * @param item cast=(GtkToolItem *)
678 	 * @param important cast=(gboolean)
679 	 */
gtk_tool_item_set_is_important(long item, boolean important)680 	public static final native void gtk_tool_item_set_is_important(long item, boolean important);
681 	/**
682 	 * @param item cast=(GtkToolItem *)
683 	 * @param homogeneous cast=(gboolean)
684 	 */
gtk_tool_item_set_homogeneous(long item, boolean homogeneous)685 	public static final native void gtk_tool_item_set_homogeneous(long item, boolean homogeneous);
686 	/**
687 	 * @param item cast=(GtkToolItem *)
688 	 * @param menu_id cast=(const gchar *)
689 	 * @param widget cast=(GtkWidget *)
690 	 */
gtk_tool_item_set_proxy_menu_item(long item, byte[] menu_id, long widget)691 	public static final native void gtk_tool_item_set_proxy_menu_item(long item, byte[] menu_id, long widget);
692 
693 	/* GtkSeparatorToolItem */
gtk_separator_tool_item_new()694 	public static final native long gtk_separator_tool_item_new();
695 	/**
696 	 * @param item cast=(GtkSeparatorToolItem *)
697 	 * @param draw cast=(gboolean)
698 	 */
gtk_separator_tool_item_set_draw(long item, boolean draw)699 	public static final native void gtk_separator_tool_item_set_draw(long item, boolean draw);
700 
701 	/* GtkToolButton */
702 	/**
703 	 * @param icon_widget cast=(GtkWidget *)
704 	 * @param label cast=(const gchar *)
705 	 */
gtk_tool_button_new(long icon_widget, byte[] label)706 	public static final native long gtk_tool_button_new(long icon_widget, byte[] label);
707 	/**
708 	 * @param button cast=(GtkToolButton *)
709 	 * @param widget cast=(GtkWidget *)
710 	 */
gtk_tool_button_set_icon_widget(long button, long widget)711 	public static final native void gtk_tool_button_set_icon_widget(long button, long widget);
712 	/**
713 	 * @param button cast=(GtkToolButton *)
714 	 * @param widget cast=(GtkWidget *)
715 	 */
gtk_tool_button_set_label_widget(long button, long widget)716 	public static final native void gtk_tool_button_set_label_widget(long button,  long widget);
717 	/**
718 	 * @param item cast=(GtkToolButton *)
719 	 * @param underline cast=(gboolean)
720 	 */
gtk_tool_button_set_use_underline(long item, boolean underline)721 	public static final native void gtk_tool_button_set_use_underline(long item, boolean underline);
722 
723 	/* GtkToggleToolButton */
724 	/** @param button cast=(GtkToggleToolButton *) */
gtk_toggle_tool_button_get_active(long button)725 	public static final native boolean gtk_toggle_tool_button_get_active(long button);
gtk_toggle_tool_button_new()726 	public static final native long gtk_toggle_tool_button_new();
727 	/**
728 	 * @param item cast=(GtkToggleToolButton *)
729 	 * @param selected cast=(gboolean)
730 	 */
gtk_toggle_tool_button_set_active(long item, boolean selected)731 	public static final native void gtk_toggle_tool_button_set_active(long item, boolean selected);
732 
733 	/* GtkMenuToolButton */
734 	/**
735 	 * @param icon_widget cast=(GtkWidget *)
736 	 * @param label cast=(const gchar *)
737 	 */
gtk_menu_tool_button_new(long icon_widget, byte[] label)738 	public static final native long gtk_menu_tool_button_new(long icon_widget, byte[] label);
739 
740 	/* GtkIconTheme */
741 	/**
742 	 * @param icon_theme cast=(GtkIconTheme *)
743 	 * @param icon cast=(GIcon *)
744 	 * @param size cast=(gint)
745 	 * @param flags cast=(GtkIconLookupFlags)
746 	 */
gtk_icon_theme_lookup_by_gicon(long icon_theme, long icon, int size, int flags)747 	public static final native long gtk_icon_theme_lookup_by_gicon(long icon_theme, long icon, int size, int flags);
748 	/**
749 	 * @param icon_theme cast=(GtkIconTheme *)
750 	 * @param icon_name cast=(const gchar *)
751 	 * @param size cast=(gint)
752 	 * @param flags cast=(GtkIconLookupFlags)
753 	 * @param error cast=(GError **)
754 	 */
gtk_icon_theme_load_icon(long icon_theme, byte[] icon_name, int size, int flags, long error)755 	public static final native long gtk_icon_theme_load_icon(long icon_theme, byte[] icon_name, int size, int flags, long error);
gtk_icon_theme_get_default()756 	public static final native long gtk_icon_theme_get_default();
757 	/**
758 	 * @param icon_info cast=(GtkIconInfo *)
759 	 * @param error cast=(GError **)
760 	 */
gtk_icon_info_load_icon(long icon_info, long error[])761 	public static final native long gtk_icon_info_load_icon(long icon_info, long error[]);
762 
763 	/* GtkEditable Interface */
764 	/** @param editable cast=(GtkEditable *) */
gtk_editable_copy_clipboard(long editable)765 	public static final native void gtk_editable_copy_clipboard(long editable);
766 	/** @param editable cast=(GtkEditable *) */
gtk_editable_cut_clipboard(long editable)767 	public static final native void gtk_editable_cut_clipboard(long editable);
768 	/** @param editable cast=(GtkEditable *) */
gtk_editable_paste_clipboard(long editable)769 	public static final native void gtk_editable_paste_clipboard(long editable);
770 
771 	/* GtkEntry */
772 	/**
773 	 * @param self cast=(GtkEntry *)
774 	 * @param n_chars cast=(gint)
775 	 */
gtk_entry_set_width_chars(long self, int n_chars)776 	public static final native void gtk_entry_set_width_chars(long self, int n_chars);
777 	/** @param entry cast=(GtkEntry *) */
gtk_entry_get_layout(long entry)778 	public static final native long gtk_entry_get_layout(long entry);
779 	/**
780 	 * @param entry cast=(GtkEntry *)
781 	 * @param x cast=(gint *)
782 	 * @param y cast=(gint *)
783 	 */
gtk_entry_get_layout_offsets(long entry, int[] x, int[] y)784 	public static final native void gtk_entry_get_layout_offsets(long entry, int[] x, int[] y);
785 	/**
786 	 * @param entry cast=(GtkEntry *)
787 	 * @param index cast=(gint)
788 	 */
gtk_entry_text_index_to_layout_index(long entry, int index)789 	public static final native int gtk_entry_text_index_to_layout_index(long entry, int index);
790 	/** @param entry cast=(GtkEntry *) */
gtk_entry_get_text(long entry)791 	public static final native long gtk_entry_get_text(long entry);
792 	/**
793 	 * @param entry cast=(GtkEntry *)
794 	 * @param text cast=(const gchar *)
795 	 */
gtk_entry_set_text(long entry, byte[] text)796 	public static final native void gtk_entry_set_text(long entry, byte[] text);
797 
798 	/* GtkEventController */
799 	/**
800 	 * @param gesture cast=(GtkEventController *)
801 	 * @param event cast=(const GdkEvent *)
802 	 */
gtk_event_controller_handle_event(long gesture, long event)803 	public static final native void gtk_event_controller_handle_event(long gesture, long event);
804 
805 	/* GtkFrame */
806 	/**
807 	 * @param frame cast=(GtkFrame *)
808 	 * @param type cast=(GtkShadowType)
809 	 */
gtk_frame_set_shadow_type(long frame, int type)810 	public static final native void gtk_frame_set_shadow_type(long frame, int type);
811 
812 	/* GtkViewport */
813 	/**
814 	 * @param viewport cast=(GtkViewport *)
815 	 * @param type cast=(GtkShadowType)
816 	 */
gtk_viewport_set_shadow_type(long viewport, int type)817 	public static final native void gtk_viewport_set_shadow_type(long viewport, int type);
818 
819 	/* GtkAccessible */
820 	/** @param accessible cast=(GtkAccessible *) */
gtk_accessible_get_widget(long accessible)821 	public static final native long gtk_accessible_get_widget(long accessible);
822 
823 	/* GtkComboBox */
824 	/**
825 	 * @param combo_box cast=(GtkComboBox *)
826 	 * @param width cast=(gint)
827 	 */
828 	/* Do not use directly. Instead use Combo.gtk_combo_box_toggle_wrap(..) */
gtk_combo_box_set_wrap_width(long combo_box, int width)829 	public static final native void gtk_combo_box_set_wrap_width(long combo_box, int width);
830 	/**
831 	 * @param combo_box cast=(GtkComboBox *)
832 	 * @return cast=(gint)
833 	 */
gtk_combo_box_get_wrap_width(long combo_box)834 	public static final native int gtk_combo_box_get_wrap_width(long combo_box);
835 
836 	/* GtkEventBox */
gtk_event_box_new()837 	public static final native long gtk_event_box_new();
838 
839 	/* GtkImage */
840 	/**
841 	 * @param image cast=(GtkImage *)
842 	 * @param surface cast=(cairo_surface_t *)
843 	 */
gtk_image_set_from_surface(long image, long surface)844 	public static final native void gtk_image_set_from_surface(long image, long surface);
845 	/**
846 	 * @param icon_name cast=(const gchar *)
847 	 * @param size cast=(GtkIconSize)
848 	 */
gtk_image_new_from_icon_name(byte[] icon_name, int size)849 	public static final native long gtk_image_new_from_icon_name(byte[] icon_name, int size);
850 	/**
851 	 * @param image cast=(GtkImage *)
852 	 * @param icon_name cast=(const gchar *)
853 	 * @param size cast=(GtkIconSize)
854 	 */
gtk_image_set_from_icon_name(long image, byte[] icon_name, int size)855 	public static final native void gtk_image_set_from_icon_name(long image, byte[] icon_name, int size);
856 	/** @param surface cast=(cairo_surface_t *) */
gtk_image_new_from_surface(long surface)857 	public static final native long gtk_image_new_from_surface(long surface);
858 
859 	/* GtkCssProvider */
860 	/**
861 	 * @param css_provider cast=(GtkCssProvider *)
862 	 * @param data cast=(const gchar *)
863 	 * @param length cast=(gssize)
864 	 * @param error cast=(GError **)
865 	 */
gtk_css_provider_load_from_data(long css_provider, byte[] data, long length, long error[])866 	public static final native boolean gtk_css_provider_load_from_data(long css_provider, byte[] data, long length, long error[]);
867 
868 	/* GtkStyleContext */
869 	/**
870 	 * @method flags=ignore_deprecations
871 	 * @param context cast=(GtkStyleContext *)
872 	 */
gtk_style_context_invalidate(long context)873 	public static final native void gtk_style_context_invalidate(long context);
874 }
875