diff options
author | Leo Ufimtsev | 2018-02-01 20:22:05 +0000 |
---|---|---|
committer | Alexander Kurtakov | 2018-02-02 10:25:45 +0000 |
commit | b9b818f3a8a00e500f1a4a7bd628dd845e22c986 (patch) | |
tree | c4745cb89520a4b5f9d8819a35e531ff231c6694 | |
parent | 2b0fa3968f21dad792be1d5a40217a1c40070c3c (diff) | |
download | eclipse.platform.swt-b9b818f3a8a00e500f1a4a7bd628dd845e22c986.tar.gz eclipse.platform.swt-b9b818f3a8a00e500f1a4a7bd628dd845e22c986.tar.xz eclipse.platform.swt-b9b818f3a8a00e500f1a4a7bd628dd845e22c986.zip |
Bug 529151 [Gtk] Move gtk/gdk function from OS.java to GTk.java and
GDK.java
1)
a) Moved gdk functions from OS.java to a new GDK.java.
This removes the need to have manual entries in os_custom.h for
dynamic functions.
(I took care to add copyright header to GDK.java :-).
b) Added custom macro to os.h to link GDK_LOAD_FUNCTION to LIB_GDK
c) Removed manual links from os_custom.h, as they're now auto-generated.
2)
a) In OS.java, I moved custom functions close to each other and
labeled with with '@category custom', to make it easier to tell
them apart. For some functions, it's hard to tell if they're custom
or native, e.g 'g_utf16_strlen' is actually a custom function
in os_custom.c.
Also added documentation on the two types of custom functions and how
to add a custom function. New SWT developers often struggle to figure
this out.
b) I left 2 custom macros and a custom gdk fuction in OS.java.
(e.g gdk_keymap_translate_keyboard_state). This is because
it belongs more to 'OS.java custom' with link to os_custom.h
type functions.
Testing:
- JUnits Gtk2.24 & Gtk3.22
- Child eclipse on wayland backend, on Gtk2.24/Gtk3.22 * (X11) *
(Wayland).
- Child eclipse on X11 desktop backend, on gtk3.22/gtk2.24 and x11
eclipse.
Afaik good to merge.
Bug: https://bugs.eclipse.org/bugs/show_bug.cgi?id=529151
Change-Id: I4becc174df8d2dc3375828b4c8e2e3cdcf5c3c3a
Signed-off-by: Leo Ufimtsev <lufimtse@redhat.com>
87 files changed, 8396 insertions, 8327 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT AWT/gtk/org/eclipse/swt/awt/SWT_AWT.java b/bundles/org.eclipse.swt/Eclipse SWT AWT/gtk/org/eclipse/swt/awt/SWT_AWT.java index 85754ffc36..1c70b04469 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT AWT/gtk/org/eclipse/swt/awt/SWT_AWT.java +++ b/bundles/org.eclipse.swt/Eclipse SWT AWT/gtk/org/eclipse/swt/awt/SWT_AWT.java @@ -86,7 +86,7 @@ static synchronized void initializeSwing() { * that make SWT exit. The fix is to hide all X * errors when AWT is running. */ - OS.gdk_error_trap_push(); + GDK.gdk_error_trap_push(); try { /* Initialize the default focus traversal policy */ Class<?> clazz = Class.forName("javax.swing.UIManager"); @@ -184,11 +184,11 @@ public static Frame new_Frame (final Composite parent) { if (awtHandle == 0) return; long /*int*/ xWindow; if (GTK.GTK3) { - xWindow = OS.gdk_x11_window_get_xid (GTK.gtk_widget_get_window (shell.handle)); + xWindow = GDK.gdk_x11_window_get_xid (GTK.gtk_widget_get_window (shell.handle)); } else { - xWindow = OS.gdk_x11_drawable_get_xid(GTK.gtk_widget_get_window(GTK.gtk_widget_get_toplevel(shell.handle))); + xWindow = GDK.gdk_x11_drawable_get_xid(GTK.gtk_widget_get_window(GTK.gtk_widget_get_toplevel(shell.handle))); } - OS.XSetTransientForHint(OS.gdk_x11_display_get_xdisplay(OS.gdk_display_get_default()), awtHandle, xWindow); + OS.XSetTransientForHint(GDK.gdk_x11_display_get_xdisplay(GDK.gdk_display_get_default()), awtHandle, xWindow); }); } } diff --git a/bundles/org.eclipse.swt/Eclipse SWT Accessibility/gtk/org/eclipse/swt/accessibility/AccessibleObject.java b/bundles/org.eclipse.swt/Eclipse SWT Accessibility/gtk/org/eclipse/swt/accessibility/AccessibleObject.java index 50e7ad087f..5e7ce5ff99 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT Accessibility/gtk/org/eclipse/swt/accessibility/AccessibleObject.java +++ b/bundles/org.eclipse.swt/Eclipse SWT Accessibility/gtk/org/eclipse/swt/accessibility/AccessibleObject.java @@ -4661,7 +4661,7 @@ class AccessibleObject { if (widget == 0) return; long /*int*/ topLevel = GTK.gtk_widget_get_toplevel (widget); long /*int*/ window = GTK.gtk_widget_get_window (topLevel); - OS.gdk_window_get_origin (window, x, y); + GDK.gdk_window_get_origin (window, x, y); } static int nextIndexOfChar (String string, String searchChars, int startIndex) { diff --git a/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/gtk/org/eclipse/swt/dnd/Clipboard.java b/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/gtk/org/eclipse/swt/dnd/Clipboard.java index 67218efb3b..7d23368c6d 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/gtk/org/eclipse/swt/dnd/Clipboard.java +++ b/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/gtk/org/eclipse/swt/dnd/Clipboard.java @@ -36,12 +36,12 @@ public class Clipboard { private static long /*int*/ TARGET; static { - GTKCLIPBOARD = GTK.gtk_clipboard_get(OS.GDK_NONE); + GTKCLIPBOARD = GTK.gtk_clipboard_get(GDK.GDK_NONE); byte[] buffer = Converter.wcsToMbcs("PRIMARY", true); - long /*int*/ primary = OS.gdk_atom_intern(buffer, false); + long /*int*/ primary = GDK.gdk_atom_intern(buffer, false); GTKPRIMARYCLIPBOARD = GTK.gtk_clipboard_get(primary); buffer = Converter.wcsToMbcs("TARGETS", true); - TARGET = OS.gdk_atom_intern(buffer, false); + TARGET = GDK.gdk_atom_intern(buffer, false); } /** @@ -297,7 +297,7 @@ public Object getContents(Transfer transfer, int clipboards) { * code outside of SWT (i.e AWT, etc). It ensures that the current * thread leaves the GTK lock acquired by the function above. */ - OS.gdk_threads_leave(); + GDK.gdk_threads_leave(); } if (selection_data != 0) break; if ((clipboards & DND.SELECTION_CLIPBOARD) != 0) { @@ -308,7 +308,7 @@ public Object getContents(Transfer transfer, int clipboards) { * code outside of SWT (i.e AWT, etc). It ensures that the current * thread leaves the GTK lock acquired by the function above. */ - OS.gdk_threads_leave(); + GDK.gdk_threads_leave(); } } if (selection_data == 0) return null; @@ -560,7 +560,7 @@ public String[] getAvailableTypeNames() { String[] result = new String[types1.length + types2.length]; int count = 0; for (int i = 0; i < types1.length; i++) { - long /*int*/ pName = OS.gdk_atom_name(types1[i]); + long /*int*/ pName = GDK.gdk_atom_name(types1[i]); if (pName == 0) { continue; } @@ -570,7 +570,7 @@ public String[] getAvailableTypeNames() { result[count++] = "GTKCLIPBOARD "+new String (Converter.mbcsToWcs (buffer)); } for (int i = 0; i < types2.length; i++) { - long /*int*/ pName = OS.gdk_atom_name(types2[i]); + long /*int*/ pName = GDK.gdk_atom_name(types2[i]); if (pName == 0) { continue; } @@ -596,7 +596,7 @@ private int[] getAvailablePrimaryTypes() { * code outside of SWT (i.e AWT, etc). It ensures that the current * thread leaves the GTK lock acquired by the function above. */ - OS.gdk_threads_leave(); + GDK.gdk_threads_leave(); if (selection_data != 0) { try { int length = GTK.gtk_selection_data_get_length(selection_data); @@ -621,7 +621,7 @@ private int[] getAvailableClipboardTypes () { * code outside of SWT (i.e AWT, etc). It ensures that the current * thread leaves the GTK lock acquired by the function above. */ - OS.gdk_threads_leave(); + GDK.gdk_threads_leave(); if (selection_data != 0) { try { int length = GTK.gtk_selection_data_get_length(selection_data); @@ -642,7 +642,7 @@ long /*int*/ gtk_clipboard_wait_for_contents(long /*int*/ clipboard, long /*int* long startTime = System.currentTimeMillis(); String key = "org.eclipse.swt.internal.gtk.dispatchEvent"; Display display = this.display; - display.setData(key, new int[]{OS.GDK_PROPERTY_NOTIFY, OS.GDK_SELECTION_CLEAR, OS.GDK_SELECTION_REQUEST, OS.GDK_SELECTION_NOTIFY}); + display.setData(key, new int[]{GDK.GDK_PROPERTY_NOTIFY, GDK.GDK_SELECTION_CLEAR, GDK.GDK_SELECTION_REQUEST, GDK.GDK_SELECTION_NOTIFY}); long /*int*/ selection_data = GTK.gtk_clipboard_wait_for_contents(clipboard, target); display.setData(key, null); long duration = System.currentTimeMillis() - startTime; diff --git a/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/gtk/org/eclipse/swt/dnd/DragSource.java b/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/gtk/org/eclipse/swt/dnd/DragSource.java index 7cf05b62c2..088d60919b 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/gtk/org/eclipse/swt/dnd/DragSource.java +++ b/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/gtk/org/eclipse/swt/dnd/DragSource.java @@ -361,15 +361,15 @@ void dragEnd(long /*int*/ widget, long /*int*/ context){ * a drag is finished. */ if (GTK.GTK3) { - long /*int*/ display = OS.gdk_window_get_display(GTK.gtk_widget_get_window(widget)); - long /*int*/ device_manager = OS.gdk_display_get_device_manager(display); - long /*int*/ pointer = OS.gdk_device_manager_get_client_pointer(device_manager); - long /*int*/ keyboard = OS.gdk_device_get_associated_device(pointer); - OS.gdk_device_ungrab(pointer, OS.GDK_CURRENT_TIME); - OS.gdk_device_ungrab(keyboard, OS.GDK_CURRENT_TIME); + long /*int*/ display = GDK.gdk_window_get_display(GTK.gtk_widget_get_window(widget)); + long /*int*/ device_manager = GDK.gdk_display_get_device_manager(display); + long /*int*/ pointer = GDK.gdk_device_manager_get_client_pointer(device_manager); + long /*int*/ keyboard = GDK.gdk_device_get_associated_device(pointer); + GDK.gdk_device_ungrab(pointer, GDK.GDK_CURRENT_TIME); + GDK.gdk_device_ungrab(keyboard, GDK.GDK_CURRENT_TIME); } else { - OS.gdk_pointer_ungrab(OS.GDK_CURRENT_TIME); - OS.gdk_keyboard_ungrab(OS.GDK_CURRENT_TIME); + GDK.gdk_pointer_ungrab(GDK.GDK_CURRENT_TIME); + GDK.gdk_keyboard_ungrab(GDK.GDK_CURRENT_TIME); } int operation = DND.DROP_NONE; @@ -383,9 +383,9 @@ void dragEnd(long /*int*/ widget, long /*int*/ context){ * gdk_drag_context_get_dest_window() call. See Bug 503431. */ if (GTK.GTK3) { - action = OS.gdk_drag_context_get_selected_action(context); + action = GDK.gdk_drag_context_get_selected_action(context); if (OS.isX11()) { // Wayland - dest_window = OS.gdk_drag_context_get_dest_window(context); + dest_window = GDK.gdk_drag_context_get_dest_window(context); } } else { GdkDragContext gdkDragContext = new GdkDragContext (); @@ -563,11 +563,11 @@ int opToOsOp(int operation){ int osOperation = 0; if ((operation & DND.DROP_COPY) == DND.DROP_COPY) - osOperation |= OS.GDK_ACTION_COPY; + osOperation |= GDK.GDK_ACTION_COPY; if ((operation & DND.DROP_MOVE) == DND.DROP_MOVE) - osOperation |= OS.GDK_ACTION_MOVE; + osOperation |= GDK.GDK_ACTION_MOVE; if ((operation & DND.DROP_LINK) == DND.DROP_LINK) - osOperation |= OS.GDK_ACTION_LINK; + osOperation |= GDK.GDK_ACTION_LINK; return osOperation; } @@ -575,11 +575,11 @@ int opToOsOp(int operation){ int osOpToOp(int osOperation){ int operation = DND.DROP_NONE; - if ((osOperation & OS.GDK_ACTION_COPY) == OS.GDK_ACTION_COPY) + if ((osOperation & GDK.GDK_ACTION_COPY) == GDK.GDK_ACTION_COPY) operation |= DND.DROP_COPY; - if ((osOperation & OS.GDK_ACTION_MOVE) == OS.GDK_ACTION_MOVE) + if ((osOperation & GDK.GDK_ACTION_MOVE) == GDK.GDK_ACTION_MOVE) operation |= DND.DROP_MOVE; - if ((osOperation & OS.GDK_ACTION_LINK) == OS.GDK_ACTION_LINK) + if ((osOperation & GDK.GDK_ACTION_LINK) == GDK.GDK_ACTION_LINK) operation |= DND.DROP_LINK; return operation; diff --git a/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/gtk/org/eclipse/swt/dnd/DropTarget.java b/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/gtk/org/eclipse/swt/dnd/DropTarget.java index 32b8fa9c59..9458c8ee03 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/gtk/org/eclipse/swt/dnd/DropTarget.java +++ b/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/gtk/org/eclipse/swt/dnd/DropTarget.java @@ -441,7 +441,7 @@ boolean drag_motion ( long /*int*/ widget, long /*int*/ context, int x, int y, i DNDEvent event = new DNDEvent(); if (!setEventData(context, x, y, time, event)) { keyOperation = -1; - OS.gdk_drag_status(context, 0, time); + GDK.gdk_drag_status(context, 0, time); return false; } @@ -482,16 +482,16 @@ boolean drag_motion ( long /*int*/ widget, long /*int*/ context, int x, int y, i switch (selectedOperation) { case DND.DROP_NONE: - OS.gdk_drag_status(context, 0, time); + GDK.gdk_drag_status(context, 0, time); break; case DND.DROP_COPY: - OS.gdk_drag_status(context, OS.GDK_ACTION_COPY, time); + GDK.gdk_drag_status(context, GDK.GDK_ACTION_COPY, time); break; case DND.DROP_MOVE: - OS.gdk_drag_status(context, OS.GDK_ACTION_MOVE, time); + GDK.gdk_drag_status(context, GDK.GDK_ACTION_MOVE, time); break; case DND.DROP_LINK: - OS.gdk_drag_status(context, OS.GDK_ACTION_LINK, time); + GDK.gdk_drag_status(context, GDK.GDK_ACTION_LINK, time); break; } @@ -565,15 +565,15 @@ public DropTargetEffect getDropTargetEffect() { int getOperationFromKeyState() { int[] state = new int[1]; if (GTK.GTK3) { - long /*int*/ root = OS.gdk_get_default_root_window (); - long /*int*/ device_manager = OS.gdk_display_get_device_manager (OS.gdk_window_get_display (root)); - long /*int*/ pointer = OS.gdk_device_manager_get_client_pointer (device_manager); - OS.gdk_window_get_device_position(root, pointer, null, null, state); + long /*int*/ root = GDK.gdk_get_default_root_window (); + long /*int*/ device_manager = GDK.gdk_display_get_device_manager (GDK.gdk_window_get_display (root)); + long /*int*/ pointer = GDK.gdk_device_manager_get_client_pointer (device_manager); + GDK.gdk_window_get_device_position(root, pointer, null, null, state); } else { - OS.gdk_window_get_pointer(0, null, null, state); + GDK.gdk_window_get_pointer(0, null, null, state); } - boolean ctrl = (state[0] & OS.GDK_CONTROL_MASK) != 0; - boolean shift = (state[0] & OS.GDK_SHIFT_MASK) != 0; + boolean ctrl = (state[0] & GDK.GDK_CONTROL_MASK) != 0; + boolean shift = (state[0] & GDK.GDK_SHIFT_MASK) != 0; if (ctrl && shift) return DND.DROP_LINK; if (ctrl)return DND.DROP_COPY; if (shift)return DND.DROP_MOVE; @@ -608,21 +608,21 @@ void onDispose(){ int opToOsOp(int operation){ int osOperation = 0; if ((operation & DND.DROP_COPY) == DND.DROP_COPY) - osOperation |= OS.GDK_ACTION_COPY; + osOperation |= GDK.GDK_ACTION_COPY; if ((operation & DND.DROP_MOVE) == DND.DROP_MOVE) - osOperation |= OS.GDK_ACTION_MOVE; + osOperation |= GDK.GDK_ACTION_MOVE; if ((operation & DND.DROP_LINK) == DND.DROP_LINK) - osOperation |= OS.GDK_ACTION_LINK; + osOperation |= GDK.GDK_ACTION_LINK; return osOperation; } int osOpToOp(int osOperation){ int operation = DND.DROP_NONE; - if ((osOperation & OS.GDK_ACTION_COPY) == OS.GDK_ACTION_COPY) + if ((osOperation & GDK.GDK_ACTION_COPY) == GDK.GDK_ACTION_COPY) operation |= DND.DROP_COPY; - if ((osOperation & OS.GDK_ACTION_MOVE) == OS.GDK_ACTION_MOVE) + if ((osOperation & GDK.GDK_ACTION_MOVE) == GDK.GDK_ACTION_MOVE) operation |= DND.DROP_MOVE; - if ((osOperation & OS.GDK_ACTION_LINK) == OS.GDK_ACTION_LINK) + if ((osOperation & GDK.GDK_ACTION_LINK) == GDK.GDK_ACTION_LINK) operation |= DND.DROP_LINK; return operation; } @@ -735,8 +735,8 @@ boolean setEventData(long /*int*/ context, int x, int y, int time, DNDEvent even long /*int*/ targets = 0; int actions = 0; if (GTK.GTK3) { - targets = OS.gdk_drag_context_list_targets(context); - actions = OS.gdk_drag_context_get_actions(context); + targets = GDK.gdk_drag_context_list_targets(context); + actions = GDK.gdk_drag_context_get_actions(context); } else { GdkDragContext dragContext = new GdkDragContext(); OS.memmove(dragContext, context, GdkDragContext.sizeof); @@ -782,7 +782,7 @@ boolean setEventData(long /*int*/ context, int x, int y, int time, DNDEvent even if (dataTypes.length == 0) return false; long /*int*/ window = GTK.gtk_widget_get_window (control.handle); int [] origin_x = new int[1], origin_y = new int[1]; - OS.gdk_window_get_origin(window, origin_x, origin_y); + GDK.gdk_window_get_origin(window, origin_x, origin_y); Point coordinates = DPIUtil.autoScaleDown(new Point(origin_x[0] + x, origin_y[0] + y)); event.widget = this; diff --git a/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/gtk/org/eclipse/swt/dnd/ImageTransfer.java b/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/gtk/org/eclipse/swt/dnd/ImageTransfer.java index 4ba55f6c94..1e37daa4bc 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/gtk/org/eclipse/swt/dnd/ImageTransfer.java +++ b/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/gtk/org/eclipse/swt/dnd/ImageTransfer.java @@ -106,7 +106,7 @@ public void javaToNative(Object object, TransferData transferData) { long /*int*/ [] buffer = new long /*int*/ [1]; long /*int*/ [] len = new long /*int*/ [1]; if (type == null) return; - OS.gdk_pixbuf_save_to_bufferv(pixbuf, buffer, len, type, null, null, null); + GDK.gdk_pixbuf_save_to_bufferv(pixbuf, buffer, len, type, null, null, null); OS.g_object_unref(pixbuf); transferData.pValue = buffer[0]; transferData.length = (int)(len[0] + 3) / 4 * 4; @@ -130,11 +130,11 @@ public void javaToNative(Object object, TransferData transferData) { public Object nativeToJava(TransferData transferData) { ImageData imgData = null; if (transferData.length > 0) { - long /*int*/ loader = OS.gdk_pixbuf_loader_new(); + long /*int*/ loader = GDK.gdk_pixbuf_loader_new(); try { - OS.gdk_pixbuf_loader_write(loader, transferData.pValue, transferData.length, null); - OS.gdk_pixbuf_loader_close(loader, null); - long /*int*/ pixbuf = OS.gdk_pixbuf_loader_get_pixbuf(loader); + GDK.gdk_pixbuf_loader_write(loader, transferData.pValue, transferData.length, null); + GDK.gdk_pixbuf_loader_close(loader, null); + long /*int*/ pixbuf = GDK.gdk_pixbuf_loader_get_pixbuf(loader); if (pixbuf != 0) { Image img = Image.gtk_new_from_pixbuf(Display.getCurrent(), SWT.BITMAP, pixbuf); imgData = img.getImageData(); diff --git a/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/gtk/org/eclipse/swt/dnd/TableDragSourceEffect.java b/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/gtk/org/eclipse/swt/dnd/TableDragSourceEffect.java index 891edfe9c8..745ca99552 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/gtk/org/eclipse/swt/dnd/TableDragSourceEffect.java +++ b/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/gtk/org/eclipse/swt/dnd/TableDragSourceEffect.java @@ -127,7 +127,7 @@ public class TableDragSourceEffect extends DragSourceEffect { break; } } else { - OS.gdk_pixmap_get_size(icons[i], w, h); + GDK.gdk_pixmap_get_size(icons[i], w, h); } width = Math.max(width, w[0]); height = rect.y + h[0] - yy[0]; @@ -143,9 +143,9 @@ public class TableDragSourceEffect extends DragSourceEffect { if (surface == 0) SWT.error(SWT.ERROR_NO_HANDLES); cairo = Cairo.cairo_create(surface); } else { - surface = OS.gdk_pixmap_new(OS.gdk_get_default_root_window(), width, height, -1); + surface = GDK.gdk_pixmap_new(GDK.gdk_get_default_root_window(), width, height, -1); if (surface == 0) SWT.error(SWT.ERROR_NO_HANDLES); - cairo = OS.gdk_cairo_create(surface); + cairo = GDK.gdk_cairo_create(surface); } if (cairo == 0) SWT.error(SWT.ERROR_NO_HANDLES); Cairo.cairo_set_operator(cairo, Cairo.CAIRO_OPERATOR_SOURCE); @@ -153,7 +153,7 @@ public class TableDragSourceEffect extends DragSourceEffect { if (GTK.GTK3) { Cairo.cairo_set_source_surface (cairo, icons[i], 2, yy[i] - yy[0] + 2); } else { - OS.gdk_cairo_set_source_pixmap(cairo, icons[i], 0, yy[i] - yy[0]); + GDK.gdk_cairo_set_source_pixmap(cairo, icons[i], 0, yy[i] - yy[0]); } Cairo.cairo_rectangle(cairo, 0, yy[i] - yy[0], width, hh[i]); Cairo.cairo_fill(cairo); @@ -165,10 +165,10 @@ public class TableDragSourceEffect extends DragSourceEffect { if (GTK.GTK3) { dragSourceImage = Image.gtk_new (display, SWT.ICON, surface, 0); } else { - long /*int*/ pixbuf = OS.gdk_pixbuf_new(OS.GDK_COLORSPACE_RGB, true, 8, width, height); + long /*int*/ pixbuf = GDK.gdk_pixbuf_new(GDK.GDK_COLORSPACE_RGB, true, 8, width, height); if (pixbuf == 0) SWT.error(SWT.ERROR_NO_HANDLES); - long /*int*/ colormap = OS.gdk_colormap_get_system(); - OS.gdk_pixbuf_get_from_drawable(pixbuf, surface, colormap, 0, 0, 0, 0, width, height); + long /*int*/ colormap = GDK.gdk_colormap_get_system(); + GDK.gdk_pixbuf_get_from_drawable(pixbuf, surface, colormap, 0, 0, 0, 0, width, height); dragSourceImage = Image.gtk_new_from_pixbuf(display, SWT.ICON, pixbuf); } } diff --git a/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/gtk/org/eclipse/swt/dnd/TextTransfer.java b/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/gtk/org/eclipse/swt/dnd/TextTransfer.java index 6148efbb3b..da24947d70 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/gtk/org/eclipse/swt/dnd/TextTransfer.java +++ b/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/gtk/org/eclipse/swt/dnd/TextTransfer.java @@ -77,7 +77,7 @@ public void javaToNative (Object object, TransferData transferData) { int[] format = new int[1]; long /*int*/[] ctext = new long /*int*/[1]; int[] length = new int[1]; - boolean result = OS.gdk_x11_display_utf8_to_compound_text (OS.gdk_display_get_default(), utf8, encoding, format, ctext, length); + boolean result = GDK.gdk_x11_display_utf8_to_compound_text (GDK.gdk_display_get_default(), utf8, encoding, format, ctext, length); if (!result) return; transferData.type = encoding[0]; transferData.format = format[0]; @@ -96,7 +96,7 @@ public void javaToNative (Object object, TransferData transferData) { transferData.result = 1; } if (transferData.type == STRING_ID) { - long /*int*/ string_target = OS.gdk_utf8_to_string_target(utf8); + long /*int*/ string_target = GDK.gdk_utf8_to_string_target(utf8); if (string_target == 0) return; transferData.type = STRING_ID; transferData.format = 8; @@ -119,7 +119,7 @@ public void javaToNative (Object object, TransferData transferData) { public Object nativeToJava(TransferData transferData){ if (!isSupportedType(transferData) || transferData.pValue == 0) return null; long /*int*/[] list = new long /*int*/[1]; - int count = OS.gdk_text_property_to_utf8_list_for_display(OS.gdk_display_get_default(), transferData.type, transferData.format, transferData.pValue, transferData.length, list); + int count = GDK.gdk_text_property_to_utf8_list_for_display(GDK.gdk_display_get_default(), transferData.type, transferData.format, transferData.pValue, transferData.length, list); if (count == 0) return null; long /*int*/[] ptr = new long /*int*/[1]; C.memmove(ptr, list[0], C.PTR_SIZEOF); diff --git a/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/gtk/org/eclipse/swt/dnd/Transfer.java b/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/gtk/org/eclipse/swt/dnd/Transfer.java index 39d95fc769..19381c7753 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/gtk/org/eclipse/swt/dnd/Transfer.java +++ b/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/gtk/org/eclipse/swt/dnd/Transfer.java @@ -130,9 +130,9 @@ abstract protected Object nativeToJava(TransferData transferData); * @return the unique identifier associated with this data type */ public static int registerType(String formatName){ - if (formatName == null) return OS.GDK_NONE; + if (formatName == null) return GDK.GDK_NONE; byte[] buffer = Converter.wcsToMbcs(formatName, true); - return (int)/*64*/OS.gdk_atom_intern(buffer, false); + return (int)/*64*/GDK.gdk_atom_intern(buffer, false); } /** diff --git a/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/gtk/org/eclipse/swt/dnd/TreeDragSourceEffect.java b/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/gtk/org/eclipse/swt/dnd/TreeDragSourceEffect.java index 172d08c7a7..5f99d2f05f 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/gtk/org/eclipse/swt/dnd/TreeDragSourceEffect.java +++ b/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/gtk/org/eclipse/swt/dnd/TreeDragSourceEffect.java @@ -126,7 +126,7 @@ public class TreeDragSourceEffect extends DragSourceEffect { break; } } else { - OS.gdk_pixmap_get_size(icons[i], w, h); + GDK.gdk_pixmap_get_size(icons[i], w, h); } width = Math.max(width, w[0]); height = rect.y + h[0] - yy[0]; @@ -142,9 +142,9 @@ public class TreeDragSourceEffect extends DragSourceEffect { if (surface == 0) SWT.error(SWT.ERROR_NO_HANDLES); cairo = Cairo.cairo_create(surface); } else { - surface = OS.gdk_pixmap_new(OS.gdk_get_default_root_window(), width, height, -1); + surface = GDK.gdk_pixmap_new(GDK.gdk_get_default_root_window(), width, height, -1); if (surface == 0) SWT.error(SWT.ERROR_NO_HANDLES); - cairo = OS.gdk_cairo_create(surface); + cairo = GDK.gdk_cairo_create(surface); } if (cairo == 0) SWT.error(SWT.ERROR_NO_HANDLES); Cairo.cairo_set_operator(cairo, Cairo.CAIRO_OPERATOR_SOURCE); @@ -152,7 +152,7 @@ public class TreeDragSourceEffect extends DragSourceEffect { if (GTK.GTK3) { Cairo.cairo_set_source_surface (cairo, icons[i], 2, yy[i] - yy[0] + 2); } else { - OS.gdk_cairo_set_source_pixmap(cairo, icons[i], 0, yy[i] - yy[0]); + GDK.gdk_cairo_set_source_pixmap(cairo, icons[i], 0, yy[i] - yy[0]); } Cairo.cairo_rectangle(cairo, 0, yy[i] - yy[0], width, hh[i]); Cairo.cairo_fill(cairo); @@ -164,10 +164,10 @@ public class TreeDragSourceEffect extends DragSourceEffect { if (GTK.GTK3) { dragSourceImage = Image.gtk_new (display, SWT.ICON, surface, 0); } else { - long /*int*/ pixbuf = OS.gdk_pixbuf_new(OS.GDK_COLORSPACE_RGB, true, 8, width, height); + long /*int*/ pixbuf = GDK.gdk_pixbuf_new(GDK.GDK_COLORSPACE_RGB, true, 8, width, height); if (pixbuf == 0) SWT.error(SWT.ERROR_NO_HANDLES); - long /*int*/ colormap = OS.gdk_colormap_get_system(); - OS.gdk_pixbuf_get_from_drawable(pixbuf, surface, colormap, 0, 0, 0, 0, width, height); + long /*int*/ colormap = GDK.gdk_colormap_get_system(); + GDK.gdk_pixbuf_get_from_drawable(pixbuf, surface, colormap, 0, 0, 0, 0, width, height); dragSourceImage = Image.gtk_new_from_pixbuf(display, SWT.ICON, pixbuf); } } diff --git a/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/gtk/org/eclipse/swt/internal/dnd/gtk/ListDragSourceEffect.java b/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/gtk/org/eclipse/swt/internal/dnd/gtk/ListDragSourceEffect.java index 886680f19c..de963cfcf6 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/gtk/org/eclipse/swt/internal/dnd/gtk/ListDragSourceEffect.java +++ b/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/gtk/org/eclipse/swt/internal/dnd/gtk/ListDragSourceEffect.java @@ -123,7 +123,7 @@ public class ListDragSourceEffect extends DragSourceEffect { break; } } else { - OS.gdk_pixmap_get_size(icons[i], w, h); + GDK.gdk_pixmap_get_size(icons[i], w, h); } width = Math.max(width, w[0]); height = rect.y + h[0] - yy[0]; @@ -139,9 +139,9 @@ public class ListDragSourceEffect extends DragSourceEffect { if (surface == 0) SWT.error(SWT.ERROR_NO_HANDLES); cairo = Cairo.cairo_create(surface); } else { - surface = OS.gdk_pixmap_new(OS.gdk_get_default_root_window(), width, height, -1); + surface = GDK.gdk_pixmap_new(GDK.gdk_get_default_root_window(), width, height, -1); if (surface == 0) SWT.error(SWT.ERROR_NO_HANDLES); - cairo = OS.gdk_cairo_create(surface); + cairo = GDK.gdk_cairo_create(surface); } if (cairo == 0) SWT.error(SWT.ERROR_NO_HANDLES); Cairo.cairo_set_operator(cairo, Cairo.CAIRO_OPERATOR_SOURCE); @@ -149,7 +149,7 @@ public class ListDragSourceEffect extends DragSourceEffect { if (GTK.GTK3) { Cairo.cairo_set_source_surface (cairo, icons[i], 2, yy[i] - yy[0] + 2); } else { - OS.gdk_cairo_set_source_pixmap(cairo, icons[i], 0, yy[i] - yy[0]); + GDK.gdk_cairo_set_source_pixmap(cairo, icons[i], 0, yy[i] - yy[0]); } Cairo.cairo_rectangle(cairo, 0, yy[i] - yy[0], width, hh[i]); Cairo.cairo_fill(cairo); @@ -161,10 +161,10 @@ public class ListDragSourceEffect extends DragSourceEffect { if (GTK.GTK3) { dragSourceImage = Image.gtk_new (display, SWT.ICON, surface, 0); } else { - long /*int*/ pixbuf = OS.gdk_pixbuf_new(OS.GDK_COLORSPACE_RGB, true, 8, width, height); + long /*int*/ pixbuf = GDK.gdk_pixbuf_new(GDK.GDK_COLORSPACE_RGB, true, 8, width, height); if (pixbuf == 0) SWT.error(SWT.ERROR_NO_HANDLES); - long /*int*/ colormap = OS.gdk_colormap_get_system(); - OS.gdk_pixbuf_get_from_drawable(pixbuf, surface, colormap, 0, 0, 0, 0, width, height); + long /*int*/ colormap = GDK.gdk_colormap_get_system(); + GDK.gdk_pixbuf_get_from_drawable(pixbuf, surface, colormap, 0, 0, 0, 0, width, height); dragSourceImage = Image.gtk_new_from_pixbuf(display, SWT.ICON, pixbuf); } } diff --git a/bundles/org.eclipse.swt/Eclipse SWT OpenGL/gtk/org/eclipse/swt/opengl/GLCanvas.java b/bundles/org.eclipse.swt/Eclipse SWT OpenGL/gtk/org/eclipse/swt/opengl/GLCanvas.java index d35e1e260c..05fc10ef1a 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT OpenGL/gtk/org/eclipse/swt/opengl/GLCanvas.java +++ b/bundles/org.eclipse.swt/Eclipse SWT OpenGL/gtk/org/eclipse/swt/opengl/GLCanvas.java @@ -107,7 +107,7 @@ public GLCanvas (Composite parent, int style, GLData data) { GTK.gtk_widget_realize (handle); long /*int*/ window = GTK.gtk_widget_get_window (handle); - long /*int*/ xDisplay = OS.gdk_x11_display_get_xdisplay(OS.gdk_window_get_display(window)); + long /*int*/ xDisplay = GDK.gdk_x11_display_get_xdisplay(GDK.gdk_window_get_display(window)); long /*int*/ infoPtr = GLX.glXChooseVisual (xDisplay, OS.XDefaultScreen (xDisplay), glxAttrib); if (infoPtr == 0) { dispose (); @@ -116,30 +116,30 @@ public GLCanvas (Composite parent, int style, GLData data) { vinfo = new XVisualInfo (); GLX.memmove (vinfo, infoPtr, XVisualInfo.sizeof); OS.XFree (infoPtr); - long /*int*/ screen = OS.gdk_screen_get_default (); - long /*int*/ gdkvisual = OS.gdk_x11_screen_lookup_visual (screen, vinfo.visualid); + long /*int*/ screen = GDK.gdk_screen_get_default (); + long /*int*/ gdkvisual = GDK.gdk_x11_screen_lookup_visual (screen, vinfo.visualid); long /*int*/ share = data.shareContext != null ? data.shareContext.context : 0; context = GLX.glXCreateContext (xDisplay, vinfo, share, true); if (context == 0) SWT.error (SWT.ERROR_NO_HANDLES); GdkWindowAttr attrs = new GdkWindowAttr (); attrs.width = 1; attrs.height = 1; - attrs.event_mask = OS.GDK_KEY_PRESS_MASK | OS.GDK_KEY_RELEASE_MASK | - OS.GDK_FOCUS_CHANGE_MASK | OS.GDK_POINTER_MOTION_MASK | - OS.GDK_BUTTON_PRESS_MASK | OS.GDK_BUTTON_RELEASE_MASK | - OS.GDK_ENTER_NOTIFY_MASK | OS.GDK_LEAVE_NOTIFY_MASK | - OS.GDK_EXPOSURE_MASK | OS.GDK_POINTER_MOTION_HINT_MASK; - attrs.window_type = OS.GDK_WINDOW_CHILD; + attrs.event_mask = GDK.GDK_KEY_PRESS_MASK | GDK.GDK_KEY_RELEASE_MASK | + GDK.GDK_FOCUS_CHANGE_MASK | GDK.GDK_POINTER_MOTION_MASK | + GDK.GDK_BUTTON_PRESS_MASK | GDK.GDK_BUTTON_RELEASE_MASK | + GDK.GDK_ENTER_NOTIFY_MASK | GDK.GDK_LEAVE_NOTIFY_MASK | + GDK.GDK_EXPOSURE_MASK | GDK.GDK_POINTER_MOTION_HINT_MASK; + attrs.window_type = GDK.GDK_WINDOW_CHILD; attrs.visual = gdkvisual; - glWindow = OS.gdk_window_new (window, attrs, OS.GDK_WA_VISUAL); - OS.gdk_window_set_user_data (glWindow, handle); - if ((style & SWT.NO_BACKGROUND) != 0) OS.gdk_window_set_back_pixmap (window, 0, false); + glWindow = GDK.gdk_window_new (window, attrs, GDK.GDK_WA_VISUAL); + GDK.gdk_window_set_user_data (glWindow, handle); + if ((style & SWT.NO_BACKGROUND) != 0) GDK.gdk_window_set_back_pixmap (window, 0, false); if (GTK.GTK3) { - xWindow = OS.gdk_x11_window_get_xid (glWindow); + xWindow = GDK.gdk_x11_window_get_xid (glWindow); } else { - xWindow = OS.gdk_x11_drawable_get_xid (glWindow); + xWindow = GDK.gdk_x11_drawable_get_xid (glWindow); } - OS.gdk_window_show (glWindow); + GDK.gdk_window_show (glWindow); Listener listener = event -> { switch (event.type) { @@ -156,8 +156,8 @@ public GLCanvas (Composite parent, int style, GLData data) { break; case SWT.Resize: Rectangle clientArea = DPIUtil.autoScaleUp(getClientArea()); - OS.gdk_window_move (glWindow, clientArea.x, clientArea.y); - OS.gdk_window_resize (glWindow, clientArea.width, clientArea.height); + GDK.gdk_window_move (glWindow, clientArea.x, clientArea.y); + GDK.gdk_window_resize (glWindow, clientArea.width, clientArea.height); break; case SWT.Dispose: long /*int*/ window1 = GTK.gtk_widget_get_window (handle); @@ -170,7 +170,7 @@ public GLCanvas (Composite parent, int style, GLData data) { context = 0; } if (glWindow != 0) { - OS.gdk_window_destroy (glWindow); + GDK.gdk_window_destroy (glWindow); glWindow = 0; } break; @@ -276,6 +276,6 @@ public void swapBuffers () { } private long /*int*/ gdk_x11_display_get_xdisplay(long /*int*/ window) { - return OS.gdk_x11_display_get_xdisplay(OS.gdk_window_get_display(window)); + return GDK.gdk_x11_display_get_xdisplay(GDK.gdk_window_get_display(window)); } } diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os.c b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os.c index 0694d3bb6e..bf5de70ab4 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os.c +++ b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os.c @@ -20,6 +20,3632 @@ #include "os_structs.h" #include "os_stats.h" +#ifndef GDK_NATIVE +#define GDK_NATIVE(func) Java_org_eclipse_swt_internal_gtk_GDK_##func +#endif + +#ifndef NO_GDK_1EVENT_1TYPE +JNIEXPORT jint JNICALL GDK_NATIVE(GDK_1EVENT_1TYPE) + (JNIEnv *env, jclass that, jintLong arg0) +{ + jint rc = 0; + GDK_NATIVE_ENTER(env, that, GDK_1EVENT_1TYPE_FUNC); + rc = (jint)GDK_EVENT_TYPE((GdkEvent *)arg0); + GDK_NATIVE_EXIT(env, that, GDK_1EVENT_1TYPE_FUNC); + return rc; +} +#endif + +#ifndef NO_GDK_1EVENT_1WINDOW +JNIEXPORT jintLong JNICALL GDK_NATIVE(GDK_1EVENT_1WINDOW) + (JNIEnv *env, jclass that, jintLong arg0) +{ + jintLong rc = 0; + GDK_NATIVE_ENTER(env, that, GDK_1EVENT_1WINDOW_FUNC); + rc = (jintLong)GDK_EVENT_WINDOW((GdkEventAny *)arg0); + GDK_NATIVE_EXIT(env, that, GDK_1EVENT_1WINDOW_FUNC); + return rc; +} +#endif + +#ifndef NO_GDK_1IS_1X11_1DISPLAY +JNIEXPORT jboolean JNICALL GDK_NATIVE(GDK_1IS_1X11_1DISPLAY) + (JNIEnv *env, jclass that, jintLong arg0) +{ + jboolean rc = 0; + GDK_NATIVE_ENTER(env, that, GDK_1IS_1X11_1DISPLAY_FUNC); + rc = (jboolean)GDK_IS_X11_DISPLAY((GdkDisplay *)arg0); + GDK_NATIVE_EXIT(env, that, GDK_1IS_1X11_1DISPLAY_FUNC); + return rc; +} +#endif + +#ifndef NO_GdkColor_1sizeof +JNIEXPORT jint JNICALL GDK_NATIVE(GdkColor_1sizeof) + (JNIEnv *env, jclass that) +{ + jint rc = 0; + GDK_NATIVE_ENTER(env, that, GdkColor_1sizeof_FUNC); + rc = (jint)GdkColor_sizeof(); + GDK_NATIVE_EXIT(env, that, GdkColor_1sizeof_FUNC); + return rc; +} +#endif + +#ifndef NO_GdkDragContext_1sizeof +JNIEXPORT jint JNICALL GDK_NATIVE(GdkDragContext_1sizeof) + (JNIEnv *env, jclass that) +{ + jint rc = 0; + GDK_NATIVE_ENTER(env, that, GdkDragContext_1sizeof_FUNC); + rc = (jint)GdkDragContext_sizeof(); + GDK_NATIVE_EXIT(env, that, GdkDragContext_1sizeof_FUNC); + return rc; +} +#endif + +#ifndef NO_GdkEventAny_1sizeof +JNIEXPORT jint JNICALL GDK_NATIVE(GdkEventAny_1sizeof) + (JNIEnv *env, jclass that) +{ + jint rc = 0; + GDK_NATIVE_ENTER(env, that, GdkEventAny_1sizeof_FUNC); + rc = (jint)GdkEventAny_sizeof(); + GDK_NATIVE_EXIT(env, that, GdkEventAny_1sizeof_FUNC); + return rc; +} +#endif + +#ifndef NO_GdkEventButton_1sizeof +JNIEXPORT jint JNICALL GDK_NATIVE(GdkEventButton_1sizeof) + (JNIEnv *env, jclass that) +{ + jint rc = 0; + GDK_NATIVE_ENTER(env, that, GdkEventButton_1sizeof_FUNC); + rc = (jint)GdkEventButton_sizeof(); + GDK_NATIVE_EXIT(env, that, GdkEventButton_1sizeof_FUNC); + return rc; +} +#endif + +#ifndef NO_GdkEventCrossing_1sizeof +JNIEXPORT jint JNICALL GDK_NATIVE(GdkEventCrossing_1sizeof) + (JNIEnv *env, jclass that) +{ + jint rc = 0; + GDK_NATIVE_ENTER(env, that, GdkEventCrossing_1sizeof_FUNC); + rc = (jint)GdkEventCrossing_sizeof(); + GDK_NATIVE_EXIT(env, that, GdkEventCrossing_1sizeof_FUNC); + return rc; +} +#endif + +#ifndef NO_GdkEventExpose_1sizeof +JNIEXPORT jint JNICALL GDK_NATIVE(GdkEventExpose_1sizeof) + (JNIEnv *env, jclass that) +{ + jint rc = 0; + GDK_NATIVE_ENTER(env, that, GdkEventExpose_1sizeof_FUNC); + rc = (jint)GdkEventExpose_sizeof(); + GDK_NATIVE_EXIT(env, that, GdkEventExpose_1sizeof_FUNC); + return rc; +} +#endif + +#ifndef NO_GdkEventFocus_1sizeof +JNIEXPORT jint JNICALL GDK_NATIVE(GdkEventFocus_1sizeof) + (JNIEnv *env, jclass that) +{ + jint rc = 0; + GDK_NATIVE_ENTER(env, that, GdkEventFocus_1sizeof_FUNC); + rc = (jint)GdkEventFocus_sizeof(); + GDK_NATIVE_EXIT(env, that, GdkEventFocus_1sizeof_FUNC); + return rc; +} +#endif + +#ifndef NO_GdkEventKey_1sizeof +JNIEXPORT jint JNICALL GDK_NATIVE(GdkEventKey_1sizeof) + (JNIEnv *env, jclass that) +{ + jint rc = 0; + GDK_NATIVE_ENTER(env, that, GdkEventKey_1sizeof_FUNC); + rc = (jint)GdkEventKey_sizeof(); + GDK_NATIVE_EXIT(env, that, GdkEventKey_1sizeof_FUNC); + return rc; +} +#endif + +#ifndef NO_GdkEventMotion_1sizeof +JNIEXPORT jint JNICALL GDK_NATIVE(GdkEventMotion_1sizeof) + (JNIEnv *env, jclass that) +{ + jint rc = 0; + GDK_NATIVE_ENTER(env, that, GdkEventMotion_1sizeof_FUNC); + rc = (jint)GdkEventMotion_sizeof(); + GDK_NATIVE_EXIT(env, that, GdkEventMotion_1sizeof_FUNC); + return rc; +} +#endif + +#ifndef NO_GdkEventScroll_1sizeof +JNIEXPORT jint JNICALL GDK_NATIVE(GdkEventScroll_1sizeof) + (JNIEnv *env, jclass that) +{ + jint rc = 0; + GDK_NATIVE_ENTER(env, that, GdkEventScroll_1sizeof_FUNC); + rc = (jint)GdkEventScroll_sizeof(); + GDK_NATIVE_EXIT(env, that, GdkEventScroll_1sizeof_FUNC); + return rc; +} +#endif + +#ifndef NO_GdkEventWindowState_1sizeof +JNIEXPORT jint JNICALL GDK_NATIVE(GdkEventWindowState_1sizeof) + (JNIEnv *env, jclass that) +{ + jint rc = 0; + GDK_NATIVE_ENTER(env, that, GdkEventWindowState_1sizeof_FUNC); + rc = (jint)GdkEventWindowState_sizeof(); + GDK_NATIVE_EXIT(env, that, GdkEventWindowState_1sizeof_FUNC); + return rc; +} +#endif + +#ifndef NO_GdkEvent_1sizeof +JNIEXPORT jint JNICALL GDK_NATIVE(GdkEvent_1sizeof) + (JNIEnv *env, jclass that) +{ + jint rc = 0; + GDK_NATIVE_ENTER(env, that, GdkEvent_1sizeof_FUNC); + rc = (jint)GdkEvent_sizeof(); + GDK_NATIVE_EXIT(env, that, GdkEvent_1sizeof_FUNC); + return rc; +} +#endif + +#ifndef NO_GdkGeometry_1sizeof +JNIEXPORT jint JNICALL GDK_NATIVE(GdkGeometry_1sizeof) + (JNIEnv *env, jclass that) +{ + jint rc = 0; + GDK_NATIVE_ENTER(env, that, GdkGeometry_1sizeof_FUNC); + rc = (jint)GdkGeometry_sizeof(); + GDK_NATIVE_EXIT(env, that, GdkGeometry_1sizeof_FUNC); + return rc; +} +#endif + +#ifndef NO_GdkKeymapKey_1sizeof +JNIEXPORT jint JNICALL GDK_NATIVE(GdkKeymapKey_1sizeof) + (JNIEnv *env, jclass that) +{ + jint rc = 0; + GDK_NATIVE_ENTER(env, that, GdkKeymapKey_1sizeof_FUNC); + rc = (jint)GdkKeymapKey_sizeof(); + GDK_NATIVE_EXIT(env, that, GdkKeymapKey_1sizeof_FUNC); + return rc; +} +#endif + +#ifndef NO_GdkRGBA_1sizeof +JNIEXPORT jint JNICALL GDK_NATIVE(GdkRGBA_1sizeof) + (JNIEnv *env, jclass that) +{ + jint rc = 0; + GDK_NATIVE_ENTER(env, that, GdkRGBA_1sizeof_FUNC); + rc = (jint)GdkRGBA_sizeof(); + GDK_NATIVE_EXIT(env, that, GdkRGBA_1sizeof_FUNC); + return rc; +} +#endif + +#ifndef NO_GdkRectangle_1sizeof +JNIEXPORT jint JNICALL GDK_NATIVE(GdkRectangle_1sizeof) + (JNIEnv *env, jclass that) +{ + jint rc = 0; + GDK_NATIVE_ENTER(env, that, GdkRectangle_1sizeof_FUNC); + rc = (jint)GdkRectangle_sizeof(); + GDK_NATIVE_EXIT(env, that, GdkRectangle_1sizeof_FUNC); + return rc; +} +#endif + +#ifndef NO_GdkWindowAttr_1sizeof +JNIEXPORT jint JNICALL GDK_NATIVE(GdkWindowAttr_1sizeof) + (JNIEnv *env, jclass that) +{ + jint rc = 0; + GDK_NATIVE_ENTER(env, that, GdkWindowAttr_1sizeof_FUNC); + rc = (jint)GdkWindowAttr_sizeof(); + GDK_NATIVE_EXIT(env, that, GdkWindowAttr_1sizeof_FUNC); + return rc; +} +#endif + +#ifndef NO__1GDK_1PIXMAP_1XID +JNIEXPORT jintLong JNICALL GDK_NATIVE(_1GDK_1PIXMAP_1XID) + (JNIEnv *env, jclass that, jintLong arg0) +{ + jintLong rc = 0; + GDK_NATIVE_ENTER(env, that, _1GDK_1PIXMAP_1XID_FUNC); + rc = (jintLong)GDK_PIXMAP_XID((GdkPixmap *)arg0); + GDK_NATIVE_EXIT(env, that, _1GDK_1PIXMAP_1XID_FUNC); + return rc; +} +#endif + +#ifndef NO__1GDK_1TYPE_1COLOR +JNIEXPORT jintLong JNICALL GDK_NATIVE(_1GDK_1TYPE_1COLOR) + (JNIEnv *env, jclass that) +{ + jintLong rc = 0; + GDK_NATIVE_ENTER(env, that, _1GDK_1TYPE_1COLOR_FUNC); + rc = (jintLong)GDK_TYPE_COLOR; + GDK_NATIVE_EXIT(env, that, _1GDK_1TYPE_1COLOR_FUNC); + return rc; +} +#endif + +#ifndef NO__1GDK_1TYPE_1PIXBUF +JNIEXPORT jintLong JNICALL GDK_NATIVE(_1GDK_1TYPE_1PIXBUF) + (JNIEnv *env, jclass that) +{ + jintLong rc = 0; + GDK_NATIVE_ENTER(env, that, _1GDK_1TYPE_1PIXBUF_FUNC); + rc = (jintLong)GDK_TYPE_PIXBUF; + GDK_NATIVE_EXIT(env, that, _1GDK_1TYPE_1PIXBUF_FUNC); + return rc; +} +#endif + +#ifndef NO__1GDK_1TYPE_1RGBA +JNIEXPORT jintLong JNICALL GDK_NATIVE(_1GDK_1TYPE_1RGBA) + (JNIEnv *env, jclass that) +{ + jintLong rc = 0; + GDK_NATIVE_ENTER(env, that, _1GDK_1TYPE_1RGBA_FUNC); + rc = (jintLong)GDK_TYPE_RGBA; + GDK_NATIVE_EXIT(env, that, _1GDK_1TYPE_1RGBA_FUNC); + return rc; +} +#endif + +#ifndef NO__1gdk_1atom_1intern +JNIEXPORT jintLong JNICALL GDK_NATIVE(_1gdk_1atom_1intern) + (JNIEnv *env, jclass that, jbyteArray arg0, jboolean arg1) +{ + jbyte *lparg0=NULL; + jintLong rc = 0; + GDK_NATIVE_ENTER(env, that, _1gdk_1atom_1intern_FUNC); + if (arg0) if ((lparg0 = (*env)->GetPrimitiveArrayCritical(env, arg0, NULL)) == NULL) goto fail; + rc = (jintLong)gdk_atom_intern((const gchar *)lparg0, arg1); +fail: + if (arg0 && lparg0) (*env)->ReleasePrimitiveArrayCritical(env, arg0, lparg0, JNI_ABORT); + GDK_NATIVE_EXIT(env, that, _1gdk_1atom_1intern_FUNC); + return rc; +} +#endif + +#ifndef NO__1gdk_1atom_1name +JNIEXPORT jintLong JNICALL GDK_NATIVE(_1gdk_1atom_1name) + (JNIEnv *env, jclass that, jintLong arg0) +{ + jintLong rc = 0; + GDK_NATIVE_ENTER(env, that, _1gdk_1atom_1name_FUNC); + rc = (jintLong)gdk_atom_name((GdkAtom)arg0); + GDK_NATIVE_EXIT(env, that, _1gdk_1atom_1name_FUNC); + return rc; +} +#endif + +#ifndef NO__1gdk_1beep +JNIEXPORT void JNICALL GDK_NATIVE(_1gdk_1beep) + (JNIEnv *env, jclass that) +{ + GDK_NATIVE_ENTER(env, that, _1gdk_1beep_FUNC); + gdk_beep(); + GDK_NATIVE_EXIT(env, that, _1gdk_1beep_FUNC); +} +#endif + +#ifndef NO__1gdk_1bitmap_1create_1from_1data +JNIEXPORT jintLong JNICALL GDK_NATIVE(_1gdk_1bitmap_1create_1from_1data) + (JNIEnv *env, jclass that, jintLong arg0, jbyteArray arg1, jint arg2, jint arg3) +{ + jbyte *lparg1=NULL; + jintLong rc = 0; + GDK_NATIVE_ENTER(env, that, _1gdk_1bitmap_1create_1from_1data_FUNC); + if (arg1) if ((lparg1 = (*env)->GetPrimitiveArrayCritical(env, arg1, NULL)) == NULL) goto fail; +/* + rc = (jintLong)gdk_bitmap_create_from_data((GdkWindow *)arg0, (const gchar *)lparg1, (gint)arg2, (gint)arg3); +*/ + { + GDK_LOAD_FUNCTION(fp, gdk_bitmap_create_from_data) + if (fp) { + rc = (jintLong)((jintLong (CALLING_CONVENTION*)(GdkWindow *, const gchar *, gint, gint))fp)((GdkWindow *)arg0, (const gchar *)lparg1, (gint)arg2, (gint)arg3); + } + } +fail: + if (arg1 && lparg1) (*env)->ReleasePrimitiveArrayCritical(env, arg1, lparg1, JNI_ABORT); + GDK_NATIVE_EXIT(env, that, _1gdk_1bitmap_1create_1from_1data_FUNC); + return rc; +} +#endif + +#ifndef NO__1gdk_1cairo_1create +JNIEXPORT jintLong JNICALL GDK_NATIVE(_1gdk_1cairo_1create) + (JNIEnv *env, jclass that, jintLong arg0) +{ + jintLong rc = 0; + GDK_NATIVE_ENTER(env, that, _1gdk_1cairo_1create_FUNC); +/* + rc = (jintLong)gdk_cairo_create(arg0); +*/ + { + GDK_LOAD_FUNCTION(fp, gdk_cairo_create) + if (fp) { + rc = (jintLong)((jintLong (CALLING_CONVENTION*)(jintLong))fp)(arg0); + } + } + GDK_NATIVE_EXIT(env, that, _1gdk_1cairo_1create_FUNC); + return rc; +} +#endif + +#ifndef NO__1gdk_1cairo_1get_1clip_1rectangle +JNIEXPORT jboolean JNICALL GDK_NATIVE(_1gdk_1cairo_1get_1clip_1rectangle) + (JNIEnv *env, jclass that, jintLong arg0, jobject arg1) +{ + GdkRectangle _arg1, *lparg1=NULL; + jboolean rc = 0; + GDK_NATIVE_ENTER(env, that, _1gdk_1cairo_1get_1clip_1rectangle_FUNC); + if (arg1) if ((lparg1 = getGdkRectangleFields(env, arg1, &_arg1)) == NULL) goto fail; +/* + rc = (jboolean)gdk_cairo_get_clip_rectangle(arg0, lparg1); +*/ + { + GDK_LOAD_FUNCTION(fp, gdk_cairo_get_clip_rectangle) + if (fp) { + rc = (jboolean)((jboolean (CALLING_CONVENTION*)(jintLong, GdkRectangle *))fp)(arg0, lparg1); + } + } +fail: + if (arg1 && lparg1) setGdkRectangleFields(env, arg1, lparg1); + GDK_NATIVE_EXIT(env, that, _1gdk_1cairo_1get_1clip_1rectangle_FUNC); + return rc; +} +#endif + +#ifndef NO__1gdk_1cairo_1region +JNIEXPORT void JNICALL GDK_NATIVE(_1gdk_1cairo_1region) + (JNIEnv *env, jclass that, jintLong arg0, jintLong arg1) +{ + GDK_NATIVE_ENTER(env, that, _1gdk_1cairo_1region_FUNC); +/* + gdk_cairo_region(arg0, arg1); +*/ + { + GDK_LOAD_FUNCTION(fp, gdk_cairo_region) + if (fp) { + ((void (CALLING_CONVENTION*)(jintLong, jintLong))fp)(arg0, arg1); + } + } + GDK_NATIVE_EXIT(env, that, _1gdk_1cairo_1region_FUNC); +} +#endif + +#ifndef NO__1gdk_1cairo_1region_1create_1from_1surface +JNIEXPORT jintLong JNICALL GDK_NATIVE(_1gdk_1cairo_1region_1create_1from_1surface) + (JNIEnv *env, jclass that, jintLong arg0) +{ + jintLong rc = 0; + GDK_NATIVE_ENTER(env, that, _1gdk_1cairo_1region_1create_1from_1surface_FUNC); +/* + rc = (jintLong)gdk_cairo_region_create_from_surface(arg0); +*/ + { + GDK_LOAD_FUNCTION(fp, gdk_cairo_region_create_from_surface) + if (fp) { + rc = (jintLong)((jintLong (CALLING_CONVENTION*)(jintLong))fp)(arg0); + } + } + GDK_NATIVE_EXIT(env, that, _1gdk_1cairo_1region_1create_1from_1surface_FUNC); + return rc; +} +#endif + +#ifndef NO__1gdk_1cairo_1reset_1clip +JNIEXPORT void JNICALL GDK_NATIVE(_1gdk_1cairo_1reset_1clip) + (JNIEnv *env, jclass that, jintLong arg0, jintLong arg1) +{ + GDK_NATIVE_ENTER(env, that, _1gdk_1cairo_1reset_1clip_FUNC); +/* + gdk_cairo_reset_clip(arg0, arg1); +*/ + { + GDK_LOAD_FUNCTION(fp, gdk_cairo_reset_clip) + if (fp) { + ((void (CALLING_CONVENTION*)(jintLong, jintLong))fp)(arg0, arg1); + } + } + GDK_NATIVE_EXIT(env, that, _1gdk_1cairo_1reset_1clip_FUNC); +} +#endif + +#ifndef NO__1gdk_1cairo_1set_1source_1color +JNIEXPORT void JNICALL GDK_NATIVE(_1gdk_1cairo_1set_1source_1color) + (JNIEnv *env, jclass that, jintLong arg0, jobject arg1) +{ + GdkColor _arg1, *lparg1=NULL; + GDK_NATIVE_ENTER(env, that, _1gdk_1cairo_1set_1source_1color_FUNC); + if (arg1) if ((lparg1 = getGdkColorFields(env, arg1, &_arg1)) == NULL) goto fail; +/* + gdk_cairo_set_source_color(arg0, lparg1); +*/ + { + GDK_LOAD_FUNCTION(fp, gdk_cairo_set_source_color) + if (fp) { + ((void (CALLING_CONVENTION*)(jintLong, GdkColor *))fp)(arg0, lparg1); + } + } +fail: + if (arg1 && lparg1) setGdkColorFields(env, arg1, lparg1); + GDK_NATIVE_EXIT(env, that, _1gdk_1cairo_1set_1source_1color_FUNC); +} +#endif + +#ifndef NO__1gdk_1cairo_1set_1source_1pixbuf +JNIEXPORT void JNICALL GDK_NATIVE(_1gdk_1cairo_1set_1source_1pixbuf) + (JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jdouble arg2, jdouble arg3) +{ + GDK_NATIVE_ENTER(env, that, _1gdk_1cairo_1set_1source_1pixbuf_FUNC); +/* + gdk_cairo_set_source_pixbuf(arg0, (const GdkPixbuf *)arg1, arg2, arg3); +*/ + { + GDK_LOAD_FUNCTION(fp, gdk_cairo_set_source_pixbuf) + if (fp) { + ((void (CALLING_CONVENTION*)(jintLong, const GdkPixbuf *, jdouble, jdouble))fp)(arg0, (const GdkPixbuf *)arg1, arg2, arg3); + } + } + GDK_NATIVE_EXIT(env, that, _1gdk_1cairo_1set_1source_1pixbuf_FUNC); +} +#endif + +#ifndef NO__1gdk_1cairo_1set_1source_1pixmap +JNIEXPORT void JNICALL GDK_NATIVE(_1gdk_1cairo_1set_1source_1pixmap) + (JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jdouble arg2, jdouble arg3) +{ + GDK_NATIVE_ENTER(env, that, _1gdk_1cairo_1set_1source_1pixmap_FUNC); +/* + gdk_cairo_set_source_pixmap(arg0, arg1, arg2, arg3); +*/ + { + GDK_LOAD_FUNCTION(fp, gdk_cairo_set_source_pixmap) + if (fp) { + ((void (CALLING_CONVENTION*)(jintLong, jintLong, jdouble, jdouble))fp)(arg0, arg1, arg2, arg3); + } + } + GDK_NATIVE_EXIT(env, that, _1gdk_1cairo_1set_1source_1pixmap_FUNC); +} +#endif + +#ifndef NO__1gdk_1cairo_1set_1source_1rgba +JNIEXPORT void JNICALL GDK_NATIVE(_1gdk_1cairo_1set_1source_1rgba) + (JNIEnv *env, jclass that, jintLong arg0, jobject arg1) +{ + GdkRGBA _arg1, *lparg1=NULL; + GDK_NATIVE_ENTER(env, that, _1gdk_1cairo_1set_1source_1rgba_FUNC); + if (arg1) if ((lparg1 = getGdkRGBAFields(env, arg1, &_arg1)) == NULL) goto fail; +/* + gdk_cairo_set_source_rgba(arg0, lparg1); +*/ + { + GDK_LOAD_FUNCTION(fp, gdk_cairo_set_source_rgba) + if (fp) { + ((void (CALLING_CONVENTION*)(jintLong, GdkRGBA *))fp)(arg0, lparg1); + } + } +fail: + if (arg1 && lparg1) setGdkRGBAFields(env, arg1, lparg1); + GDK_NATIVE_EXIT(env, that, _1gdk_1cairo_1set_1source_1rgba_FUNC); +} +#endif + +#ifndef NO__1gdk_1cairo_1set_1source_1window +JNIEXPORT void JNICALL GDK_NATIVE(_1gdk_1cairo_1set_1source_1window) + (JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jint arg2, jint arg3) +{ + GDK_NATIVE_ENTER(env, that, _1gdk_1cairo_1set_1source_1window_FUNC); +/* + gdk_cairo_set_source_window(arg0, (GdkWindow *)arg1, arg2, arg3); +*/ + { + GDK_LOAD_FUNCTION(fp, gdk_cairo_set_source_window) + if (fp) { + ((void (CALLING_CONVENTION*)(jintLong, GdkWindow *, jint, jint))fp)(arg0, (GdkWindow *)arg1, arg2, arg3); + } + } + GDK_NATIVE_EXIT(env, that, _1gdk_1cairo_1set_1source_1window_FUNC); +} +#endif + +#ifndef NO__1gdk_1color_1free +JNIEXPORT void JNICALL GDK_NATIVE(_1gdk_1color_1free) + (JNIEnv *env, jclass that, jintLong arg0) +{ + GDK_NATIVE_ENTER(env, that, _1gdk_1color_1free_FUNC); +/* + gdk_color_free((GdkColor *)arg0); +*/ + { + GDK_LOAD_FUNCTION(fp, gdk_color_free) + if (fp) { + ((void (CALLING_CONVENTION*)(GdkColor *))fp)((GdkColor *)arg0); + } + } + GDK_NATIVE_EXIT(env, that, _1gdk_1color_1free_FUNC); +} +#endif + +#ifndef NO__1gdk_1color_1parse +JNIEXPORT jboolean JNICALL GDK_NATIVE(_1gdk_1color_1parse) + (JNIEnv *env, jclass that, jbyteArray arg0, jobject arg1) +{ + jbyte *lparg0=NULL; + GdkColor _arg1, *lparg1=NULL; + jboolean rc = 0; + GDK_NATIVE_ENTER(env, that, _1gdk_1color_1parse_FUNC); + if (arg0) if ((lparg0 = (*env)->GetByteArrayElements(env, arg0, NULL)) == NULL) goto fail; + if (arg1) if ((lparg1 = &_arg1) == NULL) goto fail; +/* + rc = (jboolean)gdk_color_parse((const gchar *)lparg0, (GdkColor *)lparg1); +*/ + { + GDK_LOAD_FUNCTION(fp, gdk_color_parse) + if (fp) { + rc = (jboolean)((jboolean (CALLING_CONVENTION*)(const gchar *, GdkColor *))fp)((const gchar *)lparg0, (GdkColor *)lparg1); + } + } +fail: + if (arg1 && lparg1) setGdkColorFields(env, arg1, lparg1); + if (arg0 && lparg0) (*env)->ReleaseByteArrayElements(env, arg0, lparg0, 0); + GDK_NATIVE_EXIT(env, that, _1gdk_1color_1parse_FUNC); + return rc; +} +#endif + +#ifndef NO__1gdk_1color_1white +JNIEXPORT jboolean JNICALL GDK_NATIVE(_1gdk_1color_1white) + (JNIEnv *env, jclass that, jintLong arg0, jobject arg1) +{ + GdkColor _arg1, *lparg1=NULL; + jboolean rc = 0; + GDK_NATIVE_ENTER(env, that, _1gdk_1color_1white_FUNC); + if (arg1) if ((lparg1 = &_arg1) == NULL) goto fail; +/* + rc = (jboolean)gdk_color_white(arg0, lparg1); +*/ + { + GDK_LOAD_FUNCTION(fp, gdk_color_white) + if (fp) { + rc = (jboolean)((jboolean (CALLING_CONVENTION*)(jintLong, GdkColor *))fp)(arg0, lparg1); + } + } +fail: + if (arg1 && lparg1) setGdkColorFields(env, arg1, lparg1); + GDK_NATIVE_EXIT(env, that, _1gdk_1color_1white_FUNC); + return rc; +} +#endif + +#ifndef NO__1gdk_1colormap_1alloc_1color +JNIEXPORT jboolean JNICALL GDK_NATIVE(_1gdk_1colormap_1alloc_1color) + (JNIEnv *env, jclass that, jintLong arg0, jobject arg1, jboolean arg2, jboolean arg3) +{ + GdkColor _arg1, *lparg1=NULL; + jboolean rc = 0; + GDK_NATIVE_ENTER(env, that, _1gdk_1colormap_1alloc_1color_FUNC); + if (arg1) if ((lparg1 = getGdkColorFields(env, arg1, &_arg1)) == NULL) goto fail; +/* + rc = (jboolean)gdk_colormap_alloc_color(arg0, (GdkColor *)lparg1, (gboolean)arg2, (gboolean)arg3); +*/ + { + GDK_LOAD_FUNCTION(fp, gdk_colormap_alloc_color) + if (fp) { + rc = (jboolean)((jboolean (CALLING_CONVENTION*)(jintLong, GdkColor *, gboolean, gboolean))fp)(arg0, (GdkColor *)lparg1, (gboolean)arg2, (gboolean)arg3); + } + } +fail: + if (arg1 && lparg1) setGdkColorFields(env, arg1, lparg1); + GDK_NATIVE_EXIT(env, that, _1gdk_1colormap_1alloc_1color_FUNC); + return rc; +} +#endif + +#ifndef NO__1gdk_1colormap_1free_1colors +JNIEXPORT void JNICALL GDK_NATIVE(_1gdk_1colormap_1free_1colors) + (JNIEnv *env, jclass that, jintLong arg0, jobject arg1, jint arg2) +{ + GdkColor _arg1, *lparg1=NULL; + GDK_NATIVE_ENTER(env, that, _1gdk_1colormap_1free_1colors_FUNC); + if (arg1) if ((lparg1 = getGdkColorFields(env, arg1, &_arg1)) == NULL) goto fail; +/* + gdk_colormap_free_colors(arg0, (GdkColor *)lparg1, (gint)arg2); +*/ + { + GDK_LOAD_FUNCTION(fp, gdk_colormap_free_colors) + if (fp) { + ((void (CALLING_CONVENTION*)(jintLong, GdkColor *, gint))fp)(arg0, (GdkColor *)lparg1, (gint)arg2); + } + } +fail: + GDK_NATIVE_EXIT(env, that, _1gdk_1colormap_1free_1colors_FUNC); +} +#endif + +#ifndef NO__1gdk_1colormap_1get_1system +JNIEXPORT jintLong JNICALL GDK_NATIVE(_1gdk_1colormap_1get_1system) + (JNIEnv *env, jclass that) +{ + jintLong rc = 0; + GDK_NATIVE_ENTER(env, that, _1gdk_1colormap_1get_1system_FUNC); +/* + rc = (jintLong)gdk_colormap_get_system(); +*/ + { + GDK_LOAD_FUNCTION(fp, gdk_colormap_get_system) + if (fp) { + rc = (jintLong)((jintLong (CALLING_CONVENTION*)())fp)(); + } + } + GDK_NATIVE_EXIT(env, that, _1gdk_1colormap_1get_1system_FUNC); + return rc; +} +#endif + +#ifndef NO__1gdk_1cursor_1new_1for_1display +JNIEXPORT jintLong JNICALL GDK_NATIVE(_1gdk_1cursor_1new_1for_1display) + (JNIEnv *env, jclass that, jintLong arg0, jintLong arg1) +{ + jintLong rc = 0; + GDK_NATIVE_ENTER(env, that, _1gdk_1cursor_1new_1for_1display_FUNC); + rc = (jintLong)gdk_cursor_new_for_display((GdkDisplay *)arg0, (GdkCursorType)arg1); + GDK_NATIVE_EXIT(env, that, _1gdk_1cursor_1new_1for_1display_FUNC); + return rc; +} +#endif + +#ifndef NO__1gdk_1cursor_1new_1from_1name +JNIEXPORT jintLong JNICALL GDK_NATIVE(_1gdk_1cursor_1new_1from_1name) + (JNIEnv *env, jclass that, jintLong arg0, jbyteArray arg1) +{ + jbyte *lparg1=NULL; + jintLong rc = 0; + GDK_NATIVE_ENTER(env, that, _1gdk_1cursor_1new_1from_1name_FUNC); + if (arg1) if ((lparg1 = (*env)->GetByteArrayElements(env, arg1, NULL)) == NULL) goto fail; + rc = (jintLong)gdk_cursor_new_from_name((GdkDisplay *)arg0, (const gchar *)lparg1); +fail: + if (arg1 && lparg1) (*env)->ReleaseByteArrayElements(env, arg1, lparg1, 0); + GDK_NATIVE_EXIT(env, that, _1gdk_1cursor_1new_1from_1name_FUNC); + return rc; +} +#endif + +#ifndef NO__1gdk_1cursor_1new_1from_1pixbuf +JNIEXPORT jintLong JNICALL GDK_NATIVE(_1gdk_1cursor_1new_1from_1pixbuf) + (JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jint arg2, jint arg3) +{ + jintLong rc = 0; + GDK_NATIVE_ENTER(env, that, _1gdk_1cursor_1new_1from_1pixbuf_FUNC); +/* + rc = (jintLong)gdk_cursor_new_from_pixbuf(arg0, arg1, arg2, arg3); +*/ + { + GDK_LOAD_FUNCTION(fp, gdk_cursor_new_from_pixbuf) + if (fp) { + rc = (jintLong)((jintLong (CALLING_CONVENTION*)(jintLong, jintLong, jint, jint))fp)(arg0, arg1, arg2, arg3); + } + } + GDK_NATIVE_EXIT(env, that, _1gdk_1cursor_1new_1from_1pixbuf_FUNC); + return rc; +} +#endif + +#ifndef NO__1gdk_1cursor_1new_1from_1pixmap +JNIEXPORT jintLong JNICALL GDK_NATIVE(_1gdk_1cursor_1new_1from_1pixmap) + (JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jobject arg2, jobject arg3, jint arg4, jint arg5) +{ + GdkColor _arg2, *lparg2=NULL; + GdkColor _arg3, *lparg3=NULL; + jintLong rc = 0; + GDK_NATIVE_ENTER(env, that, _1gdk_1cursor_1new_1from_1pixmap_FUNC); + if (arg2) if ((lparg2 = getGdkColorFields(env, arg2, &_arg2)) == NULL) goto fail; + if (arg3) if ((lparg3 = getGdkColorFields(env, arg3, &_arg3)) == NULL) goto fail; +/* + rc = (jintLong)gdk_cursor_new_from_pixmap(arg0, arg1, (GdkColor *)lparg2, (GdkColor *)lparg3, (gint)arg4, (gint)arg5); +*/ + { + GDK_LOAD_FUNCTION(fp, gdk_cursor_new_from_pixmap) + if (fp) { + rc = (jintLong)((jintLong (CALLING_CONVENTION*)(jintLong, jintLong, GdkColor *, GdkColor *, gint, gint))fp)(arg0, arg1, (GdkColor *)lparg2, (GdkColor *)lparg3, (gint)arg4, (gint)arg5); + } + } +fail: + GDK_NATIVE_EXIT(env, that, _1gdk_1cursor_1new_1from_1pixmap_FUNC); + return rc; +} +#endif + +#ifndef NO__1gdk_1cursor_1unref +JNIEXPORT void JNICALL GDK_NATIVE(_1gdk_1cursor_1unref) + (JNIEnv *env, jclass that, jintLong arg0) +{ + GDK_NATIVE_ENTER(env, that, _1gdk_1cursor_1unref_FUNC); +/* + gdk_cursor_unref(arg0); +*/ + { + GDK_LOAD_FUNCTION(fp, gdk_cursor_unref) + if (fp) { + ((void (CALLING_CONVENTION*)(jintLong))fp)(arg0); + } + } + GDK_NATIVE_EXIT(env, that, _1gdk_1cursor_1unref_FUNC); +} +#endif + +#ifndef NO__1gdk_1device_1get_1associated_1device +JNIEXPORT jintLong JNICALL GDK_NATIVE(_1gdk_1device_1get_1associated_1device) + (JNIEnv *env, jclass that, jintLong arg0) +{ + jintLong rc = 0; + GDK_NATIVE_ENTER(env, that, _1gdk_1device_1get_1associated_1device_FUNC); +/* + rc = (jintLong)gdk_device_get_associated_device((GdkDevice *)arg0); +*/ + { + GDK_LOAD_FUNCTION(fp, gdk_device_get_associated_device) + if (fp) { + rc = (jintLong)((jintLong (CALLING_CONVENTION*)(GdkDevice *))fp)((GdkDevice *)arg0); + } + } + GDK_NATIVE_EXIT(env, that, _1gdk_1device_1get_1associated_1device_FUNC); + return rc; +} +#endif + +#ifndef NO__1gdk_1device_1get_1window_1at_1position +JNIEXPORT jintLong JNICALL GDK_NATIVE(_1gdk_1device_1get_1window_1at_1position) + (JNIEnv *env, jclass that, jintLong arg0, jintArray arg1, jintArray arg2) +{ + jint *lparg1=NULL; + jint *lparg2=NULL; + jintLong rc = 0; + GDK_NATIVE_ENTER(env, that, _1gdk_1device_1get_1window_1at_1position_FUNC); + if (arg1) if ((lparg1 = (*env)->GetIntArrayElements(env, arg1, NULL)) == NULL) goto fail; + if (arg2) if ((lparg2 = (*env)->GetIntArrayElements(env, arg2, NULL)) == NULL) goto fail; +/* + rc = (jintLong)gdk_device_get_window_at_position(arg0, (gint *)lparg1, (gint *)lparg2); +*/ + { + GDK_LOAD_FUNCTION(fp, gdk_device_get_window_at_position) + if (fp) { + rc = (jintLong)((jintLong (CALLING_CONVENTION*)(jintLong, gint *, gint *))fp)(arg0, (gint *)lparg1, (gint *)lparg2); + } + } +fail: + if (arg2 && lparg2) (*env)->ReleaseIntArrayElements(env, arg2, lparg2, 0); + if (arg1 && lparg1) (*env)->ReleaseIntArrayElements(env, arg1, lparg1, 0); + GDK_NATIVE_EXIT(env, that, _1gdk_1device_1get_1window_1at_1position_FUNC); + return rc; +} +#endif + +#ifndef NO__1gdk_1device_1grab +JNIEXPORT jint JNICALL GDK_NATIVE(_1gdk_1device_1grab) + (JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jint arg2, jboolean arg3, jint arg4, jintLong arg5, jint arg6) +{ + jint rc = 0; + GDK_NATIVE_ENTER(env, that, _1gdk_1device_1grab_FUNC); +/* + rc = (jint)gdk_device_grab((GdkDevice *)arg0, (GdkWindow *)arg1, arg2, (gboolean)arg3, (GdkEventMask)arg4, (GdkCursor *)arg5, (guint32)arg6); +*/ + { + GDK_LOAD_FUNCTION(fp, gdk_device_grab) + if (fp) { + rc = (jint)((jint (CALLING_CONVENTION*)(GdkDevice *, GdkWindow *, jint, gboolean, GdkEventMask, GdkCursor *, guint32))fp)((GdkDevice *)arg0, (GdkWindow *)arg1, arg2, (gboolean)arg3, (GdkEventMask)arg4, (GdkCursor *)arg5, (guint32)arg6); + } + } + GDK_NATIVE_EXIT(env, that, _1gdk_1device_1grab_FUNC); + return rc; +} +#endif + +#ifndef NO__1gdk_1device_1manager_1get_1client_1pointer +JNIEXPORT jintLong JNICALL GDK_NATIVE(_1gdk_1device_1manager_1get_1client_1pointer) + (JNIEnv *env, jclass that, jintLong arg0) +{ + jintLong rc = 0; + GDK_NATIVE_ENTER(env, that, _1gdk_1device_1manager_1get_1client_1pointer_FUNC); +/* + rc = (jintLong)gdk_device_manager_get_client_pointer(arg0); +*/ + { + GDK_LOAD_FUNCTION(fp, gdk_device_manager_get_client_pointer) + if (fp) { + rc = (jintLong)((jintLong (CALLING_CONVENTION*)(jintLong))fp)(arg0); + } + } + GDK_NATIVE_EXIT(env, that, _1gdk_1device_1manager_1get_1client_1pointer_FUNC); + return rc; +} +#endif + +#ifndef NO__1gdk_1device_1ungrab +JNIEXPORT void JNICALL GDK_NATIVE(_1gdk_1device_1ungrab) + (JNIEnv *env, jclass that, jintLong arg0, jint arg1) +{ + GDK_NATIVE_ENTER(env, that, _1gdk_1device_1ungrab_FUNC); +/* + gdk_device_ungrab((GdkDevice *)arg0, (guint32)arg1); +*/ + { + GDK_LOAD_FUNCTION(fp, gdk_device_ungrab) + if (fp) { + ((void (CALLING_CONVENTION*)(GdkDevice *, guint32))fp)((GdkDevice *)arg0, (guint32)arg1); + } + } + GDK_NATIVE_EXIT(env, that, _1gdk_1device_1ungrab_FUNC); +} +#endif + +#ifndef NO__1gdk_1device_1warp +JNIEXPORT void JNICALL GDK_NATIVE(_1gdk_1device_1warp) + (JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jint arg2, jint arg3) +{ + GDK_NATIVE_ENTER(env, that, _1gdk_1device_1warp_FUNC); +/* + gdk_device_warp(arg0, arg1, arg2, arg3); +*/ + { + GDK_LOAD_FUNCTION(fp, gdk_device_warp) + if (fp) { + ((void (CALLING_CONVENTION*)(jintLong, jintLong, jint, jint))fp)(arg0, arg1, arg2, arg3); + } + } + GDK_NATIVE_EXIT(env, that, _1gdk_1device_1warp_FUNC); +} +#endif + +#ifndef NO__1gdk_1display_1get_1default +JNIEXPORT jintLong JNICALL GDK_NATIVE(_1gdk_1display_1get_1default) + (JNIEnv *env, jclass that) +{ + jintLong rc = 0; + GDK_NATIVE_ENTER(env, that, _1gdk_1display_1get_1default_FUNC); +/* + rc = (jintLong)gdk_display_get_default(); +*/ + { + GDK_LOAD_FUNCTION(fp, gdk_display_get_default) + if (fp) { + rc = (jintLong)((jintLong (CALLING_CONVENTION*)())fp)(); + } + } + GDK_NATIVE_EXIT(env, that, _1gdk_1display_1get_1default_FUNC); + return rc; +} +#endif + +#ifndef NO__1gdk_1display_1get_1default_1seat +JNIEXPORT jintLong JNICALL GDK_NATIVE(_1gdk_1display_1get_1default_1seat) + (JNIEnv *env, jclass that, jintLong arg0) +{ + jintLong rc = 0; + GDK_NATIVE_ENTER(env, that, _1gdk_1display_1get_1default_1seat_FUNC); +/* + rc = (jintLong)gdk_display_get_default_seat(arg0); +*/ + { + GDK_LOAD_FUNCTION(fp, gdk_display_get_default_seat) + if (fp) { + rc = (jintLong)((jintLong (CALLING_CONVENTION*)(jintLong))fp)(arg0); + } + } + GDK_NATIVE_EXIT(env, that, _1gdk_1display_1get_1default_1seat_FUNC); + return rc; +} +#endif + +#ifndef NO__1gdk_1display_1get_1device_1manager +JNIEXPORT jintLong JNICALL GDK_NATIVE(_1gdk_1display_1get_1device_1manager) + (JNIEnv *env, jclass that, jintLong arg0) +{ + jintLong rc = 0; + GDK_NATIVE_ENTER(env, that, _1gdk_1display_1get_1device_1manager_FUNC); +/* + rc = (jintLong)gdk_display_get_device_manager((GdkDisplay *)arg0); +*/ + { + GDK_LOAD_FUNCTION(fp, gdk_display_get_device_manager) + if (fp) { + rc = (jintLong)((jintLong (CALLING_CONVENTION*)(GdkDisplay *))fp)((GdkDisplay *)arg0); + } + } + GDK_NATIVE_EXIT(env, that, _1gdk_1display_1get_1device_1manager_FUNC); + return rc; +} +#endif + +#ifndef NO__1gdk_1display_1supports_1cursor_1color +JNIEXPORT jboolean JNICALL GDK_NATIVE(_1gdk_1display_1supports_1cursor_1color) + (JNIEnv *env, jclass that, jintLong arg0) +{ + jboolean rc = 0; + GDK_NATIVE_ENTER(env, that, _1gdk_1display_1supports_1cursor_1color_FUNC); +/* + rc = (jboolean)gdk_display_supports_cursor_color(arg0); +*/ + { + GDK_LOAD_FUNCTION(fp, gdk_display_supports_cursor_color) + if (fp) { + rc = (jboolean)((jboolean (CALLING_CONVENTION*)(jintLong))fp)(arg0); + } + } + GDK_NATIVE_EXIT(env, that, _1gdk_1display_1supports_1cursor_1color_FUNC); + return rc; +} +#endif + +#ifndef NO__1gdk_1display_1warp_1pointer +JNIEXPORT void JNICALL GDK_NATIVE(_1gdk_1display_1warp_1pointer) + (JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jint arg2, jint arg3) +{ + GDK_NATIVE_ENTER(env, that, _1gdk_1display_1warp_1pointer_FUNC); +/* + gdk_display_warp_pointer(arg0, arg1, arg2, arg3); +*/ + { + GDK_LOAD_FUNCTION(fp, gdk_display_warp_pointer) + if (fp) { + ((void (CALLING_CONVENTION*)(jintLong, jintLong, jint, jint))fp)(arg0, arg1, arg2, arg3); + } + } + GDK_NATIVE_EXIT(env, that, _1gdk_1display_1warp_1pointer_FUNC); +} +#endif + +#ifndef NO__1gdk_1drag_1context_1get_1actions +JNIEXPORT jint JNICALL GDK_NATIVE(_1gdk_1drag_1context_1get_1actions) + (JNIEnv *env, jclass that, jintLong arg0) +{ + jint rc = 0; + GDK_NATIVE_ENTER(env, that, _1gdk_1drag_1context_1get_1actions_FUNC); +/* + rc = (jint)gdk_drag_context_get_actions((GdkDragContext *)arg0); +*/ + { + GDK_LOAD_FUNCTION(fp, gdk_drag_context_get_actions) + if (fp) { + rc = (jint)((jint (CALLING_CONVENTION*)(GdkDragContext *))fp)((GdkDragContext *)arg0); + } + } + GDK_NATIVE_EXIT(env, that, _1gdk_1drag_1context_1get_1actions_FUNC); + return rc; +} +#endif + +#ifndef NO__1gdk_1drag_1context_1get_1dest_1window +JNIEXPORT jintLong JNICALL GDK_NATIVE(_1gdk_1drag_1context_1get_1dest_1window) + (JNIEnv *env, jclass that, jintLong arg0) +{ + jintLong rc = 0; + GDK_NATIVE_ENTER(env, that, _1gdk_1drag_1context_1get_1dest_1window_FUNC); +/* + rc = (jintLong)gdk_drag_context_get_dest_window((GdkDragContext *)arg0); +*/ + { + GDK_LOAD_FUNCTION(fp, gdk_drag_context_get_dest_window) + if (fp) { + rc = (jintLong)((jintLong (CALLING_CONVENTION*)(GdkDragContext *))fp)((GdkDragContext *)arg0); + } + } + GDK_NATIVE_EXIT(env, that, _1gdk_1drag_1context_1get_1dest_1window_FUNC); + return rc; +} +#endif + +#ifndef NO__1gdk_1drag_1context_1get_1selected_1action +JNIEXPORT jint JNICALL GDK_NATIVE(_1gdk_1drag_1context_1get_1selected_1action) + (JNIEnv *env, jclass that, jintLong arg0) +{ + jint rc = 0; + GDK_NATIVE_ENTER(env, that, _1gdk_1drag_1context_1get_1selected_1action_FUNC); +/* + rc = (jint)gdk_drag_context_get_selected_action((GdkDragContext *)arg0); +*/ + { + GDK_LOAD_FUNCTION(fp, gdk_drag_context_get_selected_action) + if (fp) { + rc = (jint)((jint (CALLING_CONVENTION*)(GdkDragContext *))fp)((GdkDragContext *)arg0); + } + } + GDK_NATIVE_EXIT(env, that, _1gdk_1drag_1context_1get_1selected_1action_FUNC); + return rc; +} +#endif + +#ifndef NO__1gdk_1drag_1context_1list_1targets +JNIEXPORT jintLong JNICALL GDK_NATIVE(_1gdk_1drag_1context_1list_1targets) + (JNIEnv *env, jclass that, jintLong arg0) +{ + jintLong rc = 0; + GDK_NATIVE_ENTER(env, that, _1gdk_1drag_1context_1list_1targets_FUNC); +/* + rc = (jintLong)gdk_drag_context_list_targets((GdkDragContext *)arg0); +*/ + { + GDK_LOAD_FUNCTION(fp, gdk_drag_context_list_targets) + if (fp) { + rc = (jintLong)((jintLong (CALLING_CONVENTION*)(GdkDragContext *))fp)((GdkDragContext *)arg0); + } + } + GDK_NATIVE_EXIT(env, that, _1gdk_1drag_1context_1list_1targets_FUNC); + return rc; +} +#endif + +#ifndef NO__1gdk_1drag_1status +JNIEXPORT void JNICALL GDK_NATIVE(_1gdk_1drag_1status) + (JNIEnv *env, jclass that, jintLong arg0, jint arg1, jint arg2) +{ + GDK_NATIVE_ENTER(env, that, _1gdk_1drag_1status_FUNC); + gdk_drag_status((GdkDragContext *)arg0, (GdkDragAction)arg1, (guint32)arg2); + GDK_NATIVE_EXIT(env, that, _1gdk_1drag_1status_FUNC); +} +#endif + +#ifndef NO__1gdk_1draw_1arc +JNIEXPORT void JNICALL GDK_NATIVE(_1gdk_1draw_1arc) + (JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jint arg2, jint arg3, jint arg4, jint arg5, jint arg6, jint arg7, jint arg8) +{ + GDK_NATIVE_ENTER(env, that, _1gdk_1draw_1arc_FUNC); +/* + gdk_draw_arc(arg0, arg1, (gint)arg2, (gint)arg3, (gint)arg4, (gint)arg5, (gint)arg6, (gint)arg7, (gint)arg8); +*/ + { + GDK_LOAD_FUNCTION(fp, gdk_draw_arc) + if (fp) { + ((void (CALLING_CONVENTION*)(jintLong, jintLong, gint, gint, gint, gint, gint, gint, gint))fp)(arg0, arg1, (gint)arg2, (gint)arg3, (gint)arg4, (gint)arg5, (gint)arg6, (gint)arg7, (gint)arg8); + } + } + GDK_NATIVE_EXIT(env, that, _1gdk_1draw_1arc_FUNC); +} +#endif + +#ifndef NO__1gdk_1draw_1image +JNIEXPORT void JNICALL GDK_NATIVE(_1gdk_1draw_1image) + (JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jintLong arg2, jint arg3, jint arg4, jint arg5, jint arg6, jint arg7, jint arg8) +{ + GDK_NATIVE_ENTER(env, that, _1gdk_1draw_1image_FUNC); +/* + gdk_draw_image(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8); +*/ + { + GDK_LOAD_FUNCTION(fp, gdk_draw_image) + if (fp) { + ((void (CALLING_CONVENTION*)(jintLong, jintLong, jintLong, jint, jint, jint, jint, jint, jint))fp)(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8); + } + } + GDK_NATIVE_EXIT(env, that, _1gdk_1draw_1image_FUNC); +} +#endif + +#ifndef NO__1gdk_1draw_1pixbuf +JNIEXPORT void JNICALL GDK_NATIVE(_1gdk_1draw_1pixbuf) + (JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jintLong arg2, jint arg3, jint arg4, jint arg5, jint arg6, jint arg7, jint arg8, jint arg9, jint arg10, jint arg11) +{ + GDK_NATIVE_ENTER(env, that, _1gdk_1draw_1pixbuf_FUNC); +/* + gdk_draw_pixbuf(arg0, arg1, arg2, (gint)arg3, (gint)arg4, (gint)arg5, (gint)arg6, (gint)arg7, (gint)arg8, arg9, (gint)arg10, (gint)arg11); +*/ + { + GDK_LOAD_FUNCTION(fp, gdk_draw_pixbuf) + if (fp) { + ((void (CALLING_CONVENTION*)(jintLong, jintLong, jintLong, gint, gint, gint, gint, gint, gint, jint, gint, gint))fp)(arg0, arg1, arg2, (gint)arg3, (gint)arg4, (gint)arg5, (gint)arg6, (gint)arg7, (gint)arg8, arg9, (gint)arg10, (gint)arg11); + } + } + GDK_NATIVE_EXIT(env, that, _1gdk_1draw_1pixbuf_FUNC); +} +#endif + +#ifndef NO__1gdk_1draw_1rectangle +JNIEXPORT void JNICALL GDK_NATIVE(_1gdk_1draw_1rectangle) + (JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jint arg2, jint arg3, jint arg4, jint arg5, jint arg6) +{ + GDK_NATIVE_ENTER(env, that, _1gdk_1draw_1rectangle_FUNC); +/* + gdk_draw_rectangle(arg0, arg1, (gint)arg2, (gint)arg3, (gint)arg4, (gint)arg5, (gint)arg6); +*/ + { + GDK_LOAD_FUNCTION(fp, gdk_draw_rectangle) + if (fp) { + ((void (CALLING_CONVENTION*)(jintLong, jintLong, gint, gint, gint, gint, gint))fp)(arg0, arg1, (gint)arg2, (gint)arg3, (gint)arg4, (gint)arg5, (gint)arg6); + } + } + GDK_NATIVE_EXIT(env, that, _1gdk_1draw_1rectangle_FUNC); +} +#endif + +#ifndef NO__1gdk_1drawable_1get_1depth +JNIEXPORT jint JNICALL GDK_NATIVE(_1gdk_1drawable_1get_1depth) + (JNIEnv *env, jclass that, jintLong arg0) +{ + jint rc = 0; + GDK_NATIVE_ENTER(env, that, _1gdk_1drawable_1get_1depth_FUNC); +/* + rc = (jint)gdk_drawable_get_depth(arg0); +*/ + { + GDK_LOAD_FUNCTION(fp, gdk_drawable_get_depth) + if (fp) { + rc = (jint)((jint (CALLING_CONVENTION*)(jintLong))fp)(arg0); + } + } + GDK_NATIVE_EXIT(env, that, _1gdk_1drawable_1get_1depth_FUNC); + return rc; +} +#endif + +#ifndef NO__1gdk_1drawable_1get_1image +JNIEXPORT jintLong JNICALL GDK_NATIVE(_1gdk_1drawable_1get_1image) + (JNIEnv *env, jclass that, jintLong arg0, jint arg1, jint arg2, jint arg3, jint arg4) +{ + jintLong rc = 0; + GDK_NATIVE_ENTER(env, that, _1gdk_1drawable_1get_1image_FUNC); +/* + rc = (jintLong)gdk_drawable_get_image(arg0, (gint)arg1, (gint)arg2, (gint)arg3, (gint)arg4); +*/ + { + GDK_LOAD_FUNCTION(fp, gdk_drawable_get_image) + if (fp) { + rc = (jintLong)((jintLong (CALLING_CONVENTION*)(jintLong, gint, gint, gint, gint))fp)(arg0, (gint)arg1, (gint)arg2, (gint)arg3, (gint)arg4); + } + } + GDK_NATIVE_EXIT(env, that, _1gdk_1drawable_1get_1image_FUNC); + return rc; +} +#endif + +#ifndef NO__1gdk_1drawable_1get_1visible_1region +JNIEXPORT jintLong JNICALL GDK_NATIVE(_1gdk_1drawable_1get_1visible_1region) + (JNIEnv *env, jclass that, jintLong arg0) +{ + jintLong rc = 0; + GDK_NATIVE_ENTER(env, that, _1gdk_1drawable_1get_1visible_1region_FUNC); +/* + rc = (jintLong)gdk_drawable_get_visible_region(arg0); +*/ + { + GDK_LOAD_FUNCTION(fp, gdk_drawable_get_visible_region) + if (fp) { + rc = (jintLong)((jintLong (CALLING_CONVENTION*)(jintLong))fp)(arg0); + } + } + GDK_NATIVE_EXIT(env, that, _1gdk_1drawable_1get_1visible_1region_FUNC); + return rc; +} +#endif + +#ifndef NO__1gdk_1error_1trap_1pop +JNIEXPORT jint JNICALL GDK_NATIVE(_1gdk_1error_1trap_1pop) + (JNIEnv *env, jclass that) +{ + jint rc = 0; + GDK_NATIVE_ENTER(env, that, _1gdk_1error_1trap_1pop_FUNC); + rc = (jint)gdk_error_trap_pop(); + GDK_NATIVE_EXIT(env, that, _1gdk_1error_1trap_1pop_FUNC); + return rc; +} +#endif + +#ifndef NO__1gdk_1error_1trap_1push +JNIEXPORT void JNICALL GDK_NATIVE(_1gdk_1error_1trap_1push) + (JNIEnv *env, jclass that) +{ + GDK_NATIVE_ENTER(env, that, _1gdk_1error_1trap_1push_FUNC); + gdk_error_trap_push(); + GDK_NATIVE_EXIT(env, that, _1gdk_1error_1trap_1push_FUNC); +} +#endif + +#ifndef NO__1gdk_1event_1copy +JNIEXPORT jintLong JNICALL GDK_NATIVE(_1gdk_1event_1copy) + (JNIEnv *env, jclass that, jintLong arg0) +{ + jintLong rc = 0; + GDK_NATIVE_ENTER(env, that, _1gdk_1event_1copy_FUNC); + rc = (jintLong)gdk_event_copy((GdkEvent *)arg0); + GDK_NATIVE_EXIT(env, that, _1gdk_1event_1copy_FUNC); + return rc; +} +#endif + +#ifndef NO__1gdk_1event_1free +JNIEXPORT void JNICALL GDK_NATIVE(_1gdk_1event_1free) + (JNIEnv *env, jclass that, jintLong arg0) +{ + GDK_NATIVE_ENTER(env, that, _1gdk_1event_1free_FUNC); + gdk_event_free((GdkEvent *)arg0); + GDK_NATIVE_EXIT(env, that, _1gdk_1event_1free_FUNC); +} +#endif + +#ifndef NO__1gdk_1event_1get +JNIEXPORT jintLong JNICALL GDK_NATIVE(_1gdk_1event_1get) + (JNIEnv *env, jclass that) +{ + jintLong rc = 0; + GDK_NATIVE_ENTER(env, that, _1gdk_1event_1get_FUNC); + rc = (jintLong)gdk_event_get(); + GDK_NATIVE_EXIT(env, that, _1gdk_1event_1get_FUNC); + return rc; +} +#endif + +#ifndef NO__1gdk_1event_1get_1coords +JNIEXPORT jboolean JNICALL GDK_NATIVE(_1gdk_1event_1get_1coords) + (JNIEnv *env, jclass that, jintLong arg0, jdoubleArray arg1, jdoubleArray arg2) +{ + jdouble *lparg1=NULL; + jdouble *lparg2=NULL; + jboolean rc = 0; + GDK_NATIVE_ENTER(env, that, _1gdk_1event_1get_1coords_FUNC); + if (arg1) if ((lparg1 = (*env)->GetDoubleArrayElements(env, arg1, NULL)) == NULL) goto fail; + if (arg2) if ((lparg2 = (*env)->GetDoubleArrayElements(env, arg2, NULL)) == NULL) goto fail; + rc = (jboolean)gdk_event_get_coords((GdkEvent *)arg0, (gdouble *)lparg1, (gdouble *)lparg2); +fail: + if (arg2 && lparg2) (*env)->ReleaseDoubleArrayElements(env, arg2, lparg2, 0); + if (arg1 && lparg1) (*env)->ReleaseDoubleArrayElements(env, arg1, lparg1, 0); + GDK_NATIVE_EXIT(env, that, _1gdk_1event_1get_1coords_FUNC); + return rc; +} +#endif + +#ifndef NO__1gdk_1event_1get_1event_1type +JNIEXPORT jint JNICALL GDK_NATIVE(_1gdk_1event_1get_1event_1type) + (JNIEnv *env, jclass that, jintLong arg0) +{ + jint rc = 0; + GDK_NATIVE_ENTER(env, that, _1gdk_1event_1get_1event_1type_FUNC); +/* + rc = (jint)gdk_event_get_event_type((GdkEvent *)arg0); +*/ + { + GDK_LOAD_FUNCTION(fp, gdk_event_get_event_type) + if (fp) { + rc = (jint)((jint (CALLING_CONVENTION*)(GdkEvent *))fp)((GdkEvent *)arg0); + } + } + GDK_NATIVE_EXIT(env, that, _1gdk_1event_1get_1event_1type_FUNC); + return rc; +} +#endif + +#ifndef NO__1gdk_1event_1get_1scroll_1deltas +JNIEXPORT jboolean JNICALL GDK_NATIVE(_1gdk_1event_1get_1scroll_1deltas) + (JNIEnv *env, jclass that, jintLong arg0, jdoubleArray arg1, jdoubleArray arg2) +{ + jdouble *lparg1=NULL; + jdouble *lparg2=NULL; + jboolean rc = 0; + GDK_NATIVE_ENTER(env, that, _1gdk_1event_1get_1scroll_1deltas_FUNC); + if (arg1) if ((lparg1 = (*env)->GetDoubleArrayElements(env, arg1, NULL)) == NULL) goto fail; + if (arg2) if ((lparg2 = (*env)->GetDoubleArrayElements(env, arg2, NULL)) == NULL) goto fail; +/* + rc = (jboolean)gdk_event_get_scroll_deltas((GdkEvent *)arg0, lparg1, lparg2); +*/ + { + GDK_LOAD_FUNCTION(fp, gdk_event_get_scroll_deltas) + if (fp) { + rc = (jboolean)((jboolean (CALLING_CONVENTION*)(GdkEvent *, jdouble *, jdouble *))fp)((GdkEvent *)arg0, lparg1, lparg2); + } + } +fail: + if (arg2 && lparg2) (*env)->ReleaseDoubleArrayElements(env, arg2, lparg2, 0); + if (arg1 && lparg1) (*env)->ReleaseDoubleArrayElements(env, arg1, lparg1, 0); + GDK_NATIVE_EXIT(env, that, _1gdk_1event_1get_1scroll_1deltas_FUNC); + return rc; +} +#endif + +#ifndef NO__1gdk_1event_1get_1seat +JNIEXPORT jintLong JNICALL GDK_NATIVE(_1gdk_1event_1get_1seat) + (JNIEnv *env, jclass that, jintLong arg0) +{ + jintLong rc = 0; + GDK_NATIVE_ENTER(env, that, _1gdk_1event_1get_1seat_FUNC); +/* + rc = (jintLong)gdk_event_get_seat(arg0); +*/ + { + GDK_LOAD_FUNCTION(fp, gdk_event_get_seat) + if (fp) { + rc = (jintLong)((jintLong (CALLING_CONVENTION*)(jintLong))fp)(arg0); + } + } + GDK_NATIVE_EXIT(env, that, _1gdk_1event_1get_1seat_FUNC); + return rc; +} +#endif + +#ifndef NO__1gdk_1event_1get_1state +JNIEXPORT jboolean JNICALL GDK_NATIVE(_1gdk_1event_1get_1state) + (JNIEnv *env, jclass that, jintLong arg0, jintArray arg1) +{ + jint *lparg1=NULL; + jboolean rc = 0; + GDK_NATIVE_ENTER(env, that, _1gdk_1event_1get_1state_FUNC); + if (arg1) if ((lparg1 = (*env)->GetIntArrayElements(env, arg1, NULL)) == NULL) goto fail; + rc = (jboolean)gdk_event_get_state((GdkEvent *)arg0, (GdkModifierType *)lparg1); +fail: + if (arg1 && lparg1) (*env)->ReleaseIntArrayElements(env, arg1, lparg1, 0); + GDK_NATIVE_EXIT(env, that, _1gdk_1event_1get_1state_FUNC); + return rc; +} +#endif + +#ifndef NO__1gdk_1event_1get_1time +JNIEXPORT jint JNICALL GDK_NATIVE(_1gdk_1event_1get_1time) + (JNIEnv *env, jclass that, jintLong arg0) +{ + jint rc = 0; + GDK_NATIVE_ENTER(env, that, _1gdk_1event_1get_1time_FUNC); + rc = (jint)gdk_event_get_time((GdkEvent *)arg0); + GDK_NATIVE_EXIT(env, that, _1gdk_1event_1get_1time_FUNC); + return rc; +} +#endif + +#ifndef NO__1gdk_1event_1handler_1set +JNIEXPORT void JNICALL GDK_NATIVE(_1gdk_1event_1handler_1set) + (JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jintLong arg2) +{ + GDK_NATIVE_ENTER(env, that, _1gdk_1event_1handler_1set_FUNC); + gdk_event_handler_set((GdkEventFunc)arg0, (gpointer)arg1, (GDestroyNotify)arg2); + GDK_NATIVE_EXIT(env, that, _1gdk_1event_1handler_1set_FUNC); +} +#endif + +#ifndef NO__1gdk_1event_1new +JNIEXPORT jintLong JNICALL GDK_NATIVE(_1gdk_1event_1new) + (JNIEnv *env, jclass that, jint arg0) +{ + jintLong rc = 0; + GDK_NATIVE_ENTER(env, that, _1gdk_1event_1new_FUNC); + rc = (jintLong)gdk_event_new(arg0); + GDK_NATIVE_EXIT(env, that, _1gdk_1event_1new_FUNC); + return rc; +} +#endif + +#ifndef NO__1gdk_1event_1peek +JNIEXPORT jintLong JNICALL GDK_NATIVE(_1gdk_1event_1peek) + (JNIEnv *env, jclass that) +{ + jintLong rc = 0; + GDK_NATIVE_ENTER(env, that, _1gdk_1event_1peek_FUNC); + rc = (jintLong)gdk_event_peek(); + GDK_NATIVE_EXIT(env, that, _1gdk_1event_1peek_FUNC); + return rc; +} +#endif + +#ifndef NO__1gdk_1event_1put +JNIEXPORT void JNICALL GDK_NATIVE(_1gdk_1event_1put) + (JNIEnv *env, jclass that, jintLong arg0) +{ + GDK_NATIVE_ENTER(env, that, _1gdk_1event_1put_FUNC); + gdk_event_put((GdkEvent *)arg0); + GDK_NATIVE_EXIT(env, that, _1gdk_1event_1put_FUNC); +} +#endif + +#ifndef NO__1gdk_1flush +JNIEXPORT void JNICALL GDK_NATIVE(_1gdk_1flush) + (JNIEnv *env, jclass that) +{ + GDK_NATIVE_ENTER(env, that, _1gdk_1flush_FUNC); + gdk_flush(); + GDK_NATIVE_EXIT(env, that, _1gdk_1flush_FUNC); +} +#endif + +#ifndef NO__1gdk_1gc_1new +JNIEXPORT jintLong JNICALL GDK_NATIVE(_1gdk_1gc_1new) + (JNIEnv *env, jclass that, jintLong arg0) +{ + jintLong rc = 0; + GDK_NATIVE_ENTER(env, that, _1gdk_1gc_1new_FUNC); +/* + rc = (jintLong)gdk_gc_new(arg0); +*/ + { + GDK_LOAD_FUNCTION(fp, gdk_gc_new) + if (fp) { + rc = (jintLong)((jintLong (CALLING_CONVENTION*)(jintLong))fp)(arg0); + } + } + GDK_NATIVE_EXIT(env, that, _1gdk_1gc_1new_FUNC); + return rc; +} +#endif + +#ifndef NO__1gdk_1gc_1set_1fill +JNIEXPORT void JNICALL GDK_NATIVE(_1gdk_1gc_1set_1fill) + (JNIEnv *env, jclass that, jintLong arg0, jint arg1) +{ + GDK_NATIVE_ENTER(env, that, _1gdk_1gc_1set_1fill_FUNC); +/* + gdk_gc_set_fill(arg0, arg1); +*/ + { + GDK_LOAD_FUNCTION(fp, gdk_gc_set_fill) + if (fp) { + ((void (CALLING_CONVENTION*)(jintLong, jint))fp)(arg0, arg1); + } + } + GDK_NATIVE_EXIT(env, that, _1gdk_1gc_1set_1fill_FUNC); +} +#endif + +#ifndef NO__1gdk_1gc_1set_1foreground +JNIEXPORT void JNICALL GDK_NATIVE(_1gdk_1gc_1set_1foreground) + (JNIEnv *env, jclass that, jintLong arg0, jobject arg1) +{ + GdkColor _arg1, *lparg1=NULL; + GDK_NATIVE_ENTER(env, that, _1gdk_1gc_1set_1foreground_FUNC); + if (arg1) if ((lparg1 = getGdkColorFields(env, arg1, &_arg1)) == NULL) goto fail; +/* + gdk_gc_set_foreground(arg0, lparg1); +*/ + { + GDK_LOAD_FUNCTION(fp, gdk_gc_set_foreground) + if (fp) { + ((void (CALLING_CONVENTION*)(jintLong, GdkColor *))fp)(arg0, lparg1); + } + } +fail: + GDK_NATIVE_EXIT(env, that, _1gdk_1gc_1set_1foreground_FUNC); +} +#endif + +#ifndef NO__1gdk_1gc_1set_1function +JNIEXPORT void JNICALL GDK_NATIVE(_1gdk_1gc_1set_1function) + (JNIEnv *env, jclass that, jintLong arg0, jintLong arg1) +{ + GDK_NATIVE_ENTER(env, that, _1gdk_1gc_1set_1function_FUNC); +/* + gdk_gc_set_function(arg0, arg1); +*/ + { + GDK_LOAD_FUNCTION(fp, gdk_gc_set_function) + if (fp) { + ((void (CALLING_CONVENTION*)(jintLong, jintLong))fp)(arg0, arg1); + } + } + GDK_NATIVE_EXIT(env, that, _1gdk_1gc_1set_1function_FUNC); +} +#endif + +#ifndef NO__1gdk_1gc_1set_1stipple +JNIEXPORT void JNICALL GDK_NATIVE(_1gdk_1gc_1set_1stipple) + (JNIEnv *env, jclass that, jintLong arg0, jintLong arg1) +{ + GDK_NATIVE_ENTER(env, that, _1gdk_1gc_1set_1stipple_FUNC); +/* + gdk_gc_set_stipple(arg0, arg1); +*/ + { + GDK_LOAD_FUNCTION(fp, gdk_gc_set_stipple) + if (fp) { + ((void (CALLING_CONVENTION*)(jintLong, jintLong))fp)(arg0, arg1); + } + } + GDK_NATIVE_EXIT(env, that, _1gdk_1gc_1set_1stipple_FUNC); +} +#endif + +#ifndef NO__1gdk_1gc_1set_1subwindow +JNIEXPORT void JNICALL GDK_NATIVE(_1gdk_1gc_1set_1subwindow) + (JNIEnv *env, jclass that, jintLong arg0, jintLong arg1) +{ + GDK_NATIVE_ENTER(env, that, _1gdk_1gc_1set_1subwindow_FUNC); +/* + gdk_gc_set_subwindow(arg0, arg1); +*/ + { + GDK_LOAD_FUNCTION(fp, gdk_gc_set_subwindow) + if (fp) { + ((void (CALLING_CONVENTION*)(jintLong, jintLong))fp)(arg0, arg1); + } + } + GDK_NATIVE_EXIT(env, that, _1gdk_1gc_1set_1subwindow_FUNC); +} +#endif + +#ifndef NO__1gdk_1get_1default_1root_1window +JNIEXPORT jintLong JNICALL GDK_NATIVE(_1gdk_1get_1default_1root_1window) + (JNIEnv *env, jclass that) +{ + jintLong rc = 0; + GDK_NATIVE_ENTER(env, that, _1gdk_1get_1default_1root_1window_FUNC); + rc = (jintLong)gdk_get_default_root_window(); + GDK_NATIVE_EXIT(env, that, _1gdk_1get_1default_1root_1window_FUNC); + return rc; +} +#endif + +#ifndef NO__1gdk_1keyboard_1ungrab +JNIEXPORT void JNICALL GDK_NATIVE(_1gdk_1keyboard_1ungrab) + (JNIEnv *env, jclass that, jint arg0) +{ + GDK_NATIVE_ENTER(env, that, _1gdk_1keyboard_1ungrab_FUNC); +/* + gdk_keyboard_ungrab(arg0); +*/ + { + GDK_LOAD_FUNCTION(fp, gdk_keyboard_ungrab) + if (fp) { + ((void (CALLING_CONVENTION*)(jint))fp)(arg0); + } + } + GDK_NATIVE_EXIT(env, that, _1gdk_1keyboard_1ungrab_FUNC); +} +#endif + +#ifndef NO__1gdk_1keymap_1get_1default +JNIEXPORT jintLong JNICALL GDK_NATIVE(_1gdk_1keymap_1get_1default) + (JNIEnv *env, jclass that) +{ + jintLong rc = 0; + GDK_NATIVE_ENTER(env, that, _1gdk_1keymap_1get_1default_FUNC); + rc = (jintLong)gdk_keymap_get_default(); + GDK_NATIVE_EXIT(env, that, _1gdk_1keymap_1get_1default_FUNC); + return rc; +} +#endif + +#ifndef NO__1gdk_1keymap_1get_1entries_1for_1keyval +JNIEXPORT jboolean JNICALL GDK_NATIVE(_1gdk_1keymap_1get_1entries_1for_1keyval) + (JNIEnv *env, jclass that, jintLong arg0, jlong arg1, jintLongArray arg2, jintArray arg3) +{ + jintLong *lparg2=NULL; + jint *lparg3=NULL; + jboolean rc = 0; + GDK_NATIVE_ENTER(env, that, _1gdk_1keymap_1get_1entries_1for_1keyval_FUNC); + if (arg2) if ((lparg2 = (*env)->GetIntLongArrayElements(env, arg2, NULL)) == NULL) goto fail; + if (arg3) if ((lparg3 = (*env)->GetIntArrayElements(env, arg3, NULL)) == NULL) goto fail; + rc = (jboolean)gdk_keymap_get_entries_for_keyval((GdkKeymap*)arg0, (guint)arg1, (GdkKeymapKey**)lparg2, (gint*)lparg3); +fail: + if (arg3 && lparg3) (*env)->ReleaseIntArrayElements(env, arg3, lparg3, 0); + if (arg2 && lparg2) (*env)->ReleaseIntLongArrayElements(env, arg2, lparg2, 0); + GDK_NATIVE_EXIT(env, that, _1gdk_1keymap_1get_1entries_1for_1keyval_FUNC); + return rc; +} +#endif + +#ifndef NO__1gdk_1keyval_1to_1lower +JNIEXPORT jlong JNICALL GDK_NATIVE(_1gdk_1keyval_1to_1lower) + (JNIEnv *env, jclass that, jlong arg0) +{ + jlong rc = 0; + GDK_NATIVE_ENTER(env, that, _1gdk_1keyval_1to_1lower_FUNC); + rc = (jlong)gdk_keyval_to_lower(arg0); + GDK_NATIVE_EXIT(env, that, _1gdk_1keyval_1to_1lower_FUNC); + return rc; +} +#endif + +#ifndef NO__1gdk_1keyval_1to_1unicode +JNIEXPORT jlong JNICALL GDK_NATIVE(_1gdk_1keyval_1to_1unicode) + (JNIEnv *env, jclass that, jlong arg0) +{ + jlong rc = 0; + GDK_NATIVE_ENTER(env, that, _1gdk_1keyval_1to_1unicode_FUNC); + rc = (jlong)gdk_keyval_to_unicode(arg0); + GDK_NATIVE_EXIT(env, that, _1gdk_1keyval_1to_1unicode_FUNC); + return rc; +} +#endif + +#ifndef NO__1gdk_1pango_1context_1get +JNIEXPORT jintLong JNICALL GDK_NATIVE(_1gdk_1pango_1context_1get) + (JNIEnv *env, jclass that) +{ + jintLong rc = 0; + GDK_NATIVE_ENTER(env, that, _1gdk_1pango_1context_1get_FUNC); + rc = (jintLong)gdk_pango_context_get(); + GDK_NATIVE_EXIT(env, that, _1gdk_1pango_1context_1get_FUNC); + return rc; +} +#endif + +#ifndef NO__1gdk_1pango_1layout_1get_1clip_1region +JNIEXPORT jintLong JNICALL GDK_NATIVE(_1gdk_1pango_1layout_1get_1clip_1region) + (JNIEnv *env, jclass that, jintLong arg0, jint arg1, jint arg2, jintArray arg3, jint arg4) +{ + jint *lparg3=NULL; + jintLong rc = 0; + GDK_NATIVE_ENTER(env, that, _1gdk_1pango_1layout_1get_1clip_1region_FUNC); + if (arg3) if ((lparg3 = (*env)->GetIntArrayElements(env, arg3, NULL)) == NULL) goto fail; + rc = (jintLong)gdk_pango_layout_get_clip_region((PangoLayout *)arg0, arg1, arg2, (gint *)lparg3, arg4); +fail: + if (arg3 && lparg3) (*env)->ReleaseIntArrayElements(env, arg3, lparg3, 0); + GDK_NATIVE_EXIT(env, that, _1gdk_1pango_1layout_1get_1clip_1region_FUNC); + return rc; +} +#endif + +#ifndef NO__1gdk_1pixbuf_1copy_1area +JNIEXPORT void JNICALL GDK_NATIVE(_1gdk_1pixbuf_1copy_1area) + (JNIEnv *env, jclass that, jintLong arg0, jint arg1, jint arg2, jint arg3, jint arg4, jintLong arg5, jint arg6, jint arg7) +{ + GDK_NATIVE_ENTER(env, that, _1gdk_1pixbuf_1copy_1area_FUNC); + gdk_pixbuf_copy_area((GdkPixbuf *)arg0, arg1, arg2, arg3, arg4, (GdkPixbuf *)arg5, arg6, arg7); + GDK_NATIVE_EXIT(env, that, _1gdk_1pixbuf_1copy_1area_FUNC); +} +#endif + +#ifndef NO__1gdk_1pixbuf_1get_1from_1drawable +JNIEXPORT jintLong JNICALL GDK_NATIVE(_1gdk_1pixbuf_1get_1from_1drawable) + (JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jintLong arg2, jint arg3, jint arg4, jint arg5, jint arg6, jint arg7, jint arg8) +{ + jintLong rc = 0; + GDK_NATIVE_ENTER(env, that, _1gdk_1pixbuf_1get_1from_1drawable_FUNC); +/* + rc = (jintLong)gdk_pixbuf_get_from_drawable((GdkPixbuf *)arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8); +*/ + { + GDK_LOAD_FUNCTION(fp, gdk_pixbuf_get_from_drawable) + if (fp) { + rc = (jintLong)((jintLong (CALLING_CONVENTION*)(GdkPixbuf *, jintLong, jintLong, jint, jint, jint, jint, jint, jint))fp)((GdkPixbuf *)arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8); + } + } + GDK_NATIVE_EXIT(env, that, _1gdk_1pixbuf_1get_1from_1drawable_FUNC); + return rc; +} +#endif + +#ifndef NO__1gdk_1pixbuf_1get_1from_1window +JNIEXPORT jintLong JNICALL GDK_NATIVE(_1gdk_1pixbuf_1get_1from_1window) + (JNIEnv *env, jclass that, jintLong arg0, jint arg1, jint arg2, jint arg3, jint arg4) +{ + jintLong rc = 0; + GDK_NATIVE_ENTER(env, that, _1gdk_1pixbuf_1get_1from_1window_FUNC); +/* + rc = (jintLong)gdk_pixbuf_get_from_window((GdkWindow *)arg0, (gint)arg1, (gint)arg2, (gint)arg3, (gint)arg4); +*/ + { + GDK_LOAD_FUNCTION(fp, gdk_pixbuf_get_from_window) + if (fp) { + rc = (jintLong)((jintLong (CALLING_CONVENTION*)(GdkWindow *, gint, gint, gint, gint))fp)((GdkWindow *)arg0, (gint)arg1, (gint)arg2, (gint)arg3, (gint)arg4); + } + } + GDK_NATIVE_EXIT(env, that, _1gdk_1pixbuf_1get_1from_1window_FUNC); + return rc; +} +#endif + +#ifndef NO__1gdk_1pixbuf_1get_1has_1alpha +JNIEXPORT jboolean JNICALL GDK_NATIVE(_1gdk_1pixbuf_1get_1has_1alpha) + (JNIEnv *env, jclass that, jintLong arg0) +{ + jboolean rc = 0; + GDK_NATIVE_ENTER(env, that, _1gdk_1pixbuf_1get_1has_1alpha_FUNC); + rc = (jboolean)gdk_pixbuf_get_has_alpha((const GdkPixbuf *)arg0); + GDK_NATIVE_EXIT(env, that, _1gdk_1pixbuf_1get_1has_1alpha_FUNC); + return rc; +} +#endif + +#ifndef NO__1gdk_1pixbuf_1get_1height +JNIEXPORT jint JNICALL GDK_NATIVE(_1gdk_1pixbuf_1get_1height) + (JNIEnv *env, jclass that, jintLong arg0) +{ + jint rc = 0; + GDK_NATIVE_ENTER(env, that, _1gdk_1pixbuf_1get_1height_FUNC); + rc = (jint)gdk_pixbuf_get_height((const GdkPixbuf *)arg0); + GDK_NATIVE_EXIT(env, that, _1gdk_1pixbuf_1get_1height_FUNC); + return rc; +} +#endif + +#ifndef NO__1gdk_1pixbuf_1get_1pixels +JNIEXPORT jintLong JNICALL GDK_NATIVE(_1gdk_1pixbuf_1get_1pixels) + (JNIEnv *env, jclass that, jintLong arg0) +{ + jintLong rc = 0; + GDK_NATIVE_ENTER(env, that, _1gdk_1pixbuf_1get_1pixels_FUNC); + rc = (jintLong)gdk_pixbuf_get_pixels((const GdkPixbuf *)arg0); + GDK_NATIVE_EXIT(env, that, _1gdk_1pixbuf_1get_1pixels_FUNC); + return rc; +} +#endif + +#ifndef NO__1gdk_1pixbuf_1get_1rowstride +JNIEXPORT jint JNICALL GDK_NATIVE(_1gdk_1pixbuf_1get_1rowstride) + (JNIEnv *env, jclass that, jintLong arg0) +{ + jint rc = 0; + GDK_NATIVE_ENTER(env, that, _1gdk_1pixbuf_1get_1rowstride_FUNC); + rc = (jint)gdk_pixbuf_get_rowstride((const GdkPixbuf *)arg0); + GDK_NATIVE_EXIT(env, that, _1gdk_1pixbuf_1get_1rowstride_FUNC); + return rc; +} +#endif + +#ifndef NO__1gdk_1pixbuf_1get_1width +JNIEXPORT jint JNICALL GDK_NATIVE(_1gdk_1pixbuf_1get_1width) + (JNIEnv *env, jclass that, jintLong arg0) +{ + jint rc = 0; + GDK_NATIVE_ENTER(env, that, _1gdk_1pixbuf_1get_1width_FUNC); + rc = (jint)gdk_pixbuf_get_width((const GdkPixbuf *)arg0); + GDK_NATIVE_EXIT(env, that, _1gdk_1pixbuf_1get_1width_FUNC); + return rc; +} +#endif + +#ifndef NO__1gdk_1pixbuf_1loader_1close +JNIEXPORT jboolean JNICALL GDK_NATIVE(_1gdk_1pixbuf_1loader_1close) + (JNIEnv *env, jclass that, jintLong arg0, jintLongArray arg1) +{ + jintLong *lparg1=NULL; + jboolean rc = 0; + GDK_NATIVE_ENTER(env, that, _1gdk_1pixbuf_1loader_1close_FUNC); + if (arg1) if ((lparg1 = (*env)->GetIntLongArrayElements(env, arg1, NULL)) == NULL) goto fail; + rc = (jboolean)gdk_pixbuf_loader_close((GdkPixbufLoader *)arg0, (GError **)lparg1); +fail: + if (arg1 && lparg1) (*env)->ReleaseIntLongArrayElements(env, arg1, lparg1, 0); + GDK_NATIVE_EXIT(env, that, _1gdk_1pixbuf_1loader_1close_FUNC); + return rc; +} +#endif + +#ifndef NO__1gdk_1pixbuf_1loader_1get_1pixbuf +JNIEXPORT jintLong JNICALL GDK_NATIVE(_1gdk_1pixbuf_1loader_1get_1pixbuf) + (JNIEnv *env, jclass that, jintLong arg0) +{ + jintLong rc = 0; + GDK_NATIVE_ENTER(env, that, _1gdk_1pixbuf_1loader_1get_1pixbuf_FUNC); + rc = (jintLong)gdk_pixbuf_loader_get_pixbuf((GdkPixbufLoader *)arg0); + GDK_NATIVE_EXIT(env, that, _1gdk_1pixbuf_1loader_1get_1pixbuf_FUNC); + return rc; +} +#endif + +#ifndef NO__1gdk_1pixbuf_1loader_1new +JNIEXPORT jintLong JNICALL GDK_NATIVE(_1gdk_1pixbuf_1loader_1new) + (JNIEnv *env, jclass that) +{ + jintLong rc = 0; + GDK_NATIVE_ENTER(env, that, _1gdk_1pixbuf_1loader_1new_FUNC); + rc = (jintLong)gdk_pixbuf_loader_new(); + GDK_NATIVE_EXIT(env, that, _1gdk_1pixbuf_1loader_1new_FUNC); + return rc; +} +#endif + +#ifndef NO__1gdk_1pixbuf_1loader_1write +JNIEXPORT jboolean JNICALL GDK_NATIVE(_1gdk_1pixbuf_1loader_1write) + (JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jint arg2, jintLongArray arg3) +{ + jintLong *lparg3=NULL; + jboolean rc = 0; + GDK_NATIVE_ENTER(env, that, _1gdk_1pixbuf_1loader_1write_FUNC); + if (arg3) if ((lparg3 = (*env)->GetIntLongArrayElements(env, arg3, NULL)) == NULL) goto fail; + rc = (jboolean)gdk_pixbuf_loader_write((GdkPixbufLoader *)arg0, (const guchar *)arg1, (gsize)arg2, (GError **)lparg3); +fail: + if (arg3 && lparg3) (*env)->ReleaseIntLongArrayElements(env, arg3, lparg3, 0); + GDK_NATIVE_EXIT(env, that, _1gdk_1pixbuf_1loader_1write_FUNC); + return rc; +} +#endif + +#ifndef NO__1gdk_1pixbuf_1new +JNIEXPORT jintLong JNICALL GDK_NATIVE(_1gdk_1pixbuf_1new) + (JNIEnv *env, jclass that, jint arg0, jboolean arg1, jint arg2, jint arg3, jint arg4) +{ + jintLong rc = 0; + GDK_NATIVE_ENTER(env, that, _1gdk_1pixbuf_1new_FUNC); + rc = (jintLong)gdk_pixbuf_new((GdkColorspace)arg0, (gboolean)arg1, arg2, arg3, arg4); + GDK_NATIVE_EXIT(env, that, _1gdk_1pixbuf_1new_FUNC); + return rc; +} +#endif + +#ifndef NO__1gdk_1pixbuf_1new_1from_1file +JNIEXPORT jintLong JNICALL GDK_NATIVE(_1gdk_1pixbuf_1new_1from_1file) + (JNIEnv *env, jclass that, jbyteArray arg0, jintLongArray arg1) +{ + jbyte *lparg0=NULL; + jintLong *lparg1=NULL; + jintLong rc = 0; + GDK_NATIVE_ENTER(env, that, _1gdk_1pixbuf_1new_1from_1file_FUNC); + if (arg0) if ((lparg0 = (*env)->GetByteArrayElements(env, arg0, NULL)) == NULL) goto fail; + if (arg1) if ((lparg1 = (*env)->GetIntLongArrayElements(env, arg1, NULL)) == NULL) goto fail; + rc = (jintLong)gdk_pixbuf_new_from_file((const char *)lparg0, (GError**)lparg1); +fail: + if (arg1 && lparg1) (*env)->ReleaseIntLongArrayElements(env, arg1, lparg1, 0); + if (arg0 && lparg0) (*env)->ReleaseByteArrayElements(env, arg0, lparg0, 0); + GDK_NATIVE_EXIT(env, that, _1gdk_1pixbuf_1new_1from_1file_FUNC); + return rc; +} +#endif + +#ifndef NO__1gdk_1pixbuf_1save_1to_1bufferv +JNIEXPORT jboolean JNICALL GDK_NATIVE(_1gdk_1pixbuf_1save_1to_1bufferv) + (JNIEnv *env, jclass that, jintLong arg0, jintLongArray arg1, jintLongArray arg2, jbyteArray arg3, jintLongArray arg4, jintLongArray arg5, jintLongArray arg6) +{ + jintLong *lparg1=NULL; + jintLong *lparg2=NULL; + jbyte *lparg3=NULL; + jintLong *lparg4=NULL; + jintLong *lparg5=NULL; + jintLong *lparg6=NULL; + jboolean rc = 0; + GDK_NATIVE_ENTER(env, that, _1gdk_1pixbuf_1save_1to_1bufferv_FUNC); + if (arg1) if ((lparg1 = (*env)->GetIntLongArrayElements(env, arg1, NULL)) == NULL) goto fail; + if (arg2) if ((lparg2 = (*env)->GetIntLongArrayElements(env, arg2, NULL)) == NULL) goto fail; + if (arg3) if ((lparg3 = (*env)->GetByteArrayElements(env, arg3, NULL)) == NULL) goto fail; + if (arg4) if ((lparg4 = (*env)->GetIntLongArrayElements(env, arg4, NULL)) == NULL) goto fail; + if (arg5) if ((lparg5 = (*env)->GetIntLongArrayElements(env, arg5, NULL)) == NULL) goto fail; + if (arg6) if ((lparg6 = (*env)->GetIntLongArrayElements(env, arg6, NULL)) == NULL) goto fail; +/* + rc = (jboolean)gdk_pixbuf_save_to_bufferv((GdkPixbuf *)arg0, (gchar **)lparg1, (gsize *)lparg2, (const char *)lparg3, (char **)lparg4, (char **)lparg5, (GError **)lparg6); +*/ + { + GDK_LOAD_FUNCTION(fp, gdk_pixbuf_save_to_bufferv) + if (fp) { + rc = (jboolean)((jboolean (CALLING_CONVENTION*)(GdkPixbuf *, gchar **, gsize *, const char *, char **, char **, GError **))fp)((GdkPixbuf *)arg0, (gchar **)lparg1, (gsize *)lparg2, (const char *)lparg3, (char **)lparg4, (char **)lparg5, (GError **)lparg6); + } + } +fail: + if (arg6 && lparg6) (*env)->ReleaseIntLongArrayElements(env, arg6, lparg6, 0); + if (arg5 && lparg5) (*env)->ReleaseIntLongArrayElements(env, arg5, lparg5, 0); + if (arg4 && lparg4) (*env)->ReleaseIntLongArrayElements(env, arg4, lparg4, 0); + if (arg3 && lparg3) (*env)->ReleaseByteArrayElements(env, arg3, lparg3, 0); + if (arg2 && lparg2) (*env)->ReleaseIntLongArrayElements(env, arg2, lparg2, 0); + if (arg1 && lparg1) (*env)->ReleaseIntLongArrayElements(env, arg1, lparg1, 0); + GDK_NATIVE_EXIT(env, that, _1gdk_1pixbuf_1save_1to_1bufferv_FUNC); + return rc; +} +#endif + +#ifndef NO__1gdk_1pixbuf_1scale_1simple +JNIEXPORT jintLong JNICALL GDK_NATIVE(_1gdk_1pixbuf_1scale_1simple) + (JNIEnv *env, jclass that, jintLong arg0, jint arg1, jint arg2, jint arg3) +{ + jintLong rc = 0; + GDK_NATIVE_ENTER(env, that, _1gdk_1pixbuf_1scale_1simple_FUNC); + rc = (jintLong)gdk_pixbuf_scale_simple((const GdkPixbuf *)arg0, arg1, arg2, (GdkInterpType)arg3); + GDK_NATIVE_EXIT(env, that, _1gdk_1pixbuf_1scale_1simple_FUNC); + return rc; +} +#endif + +#ifndef NO__1gdk_1pixmap_1get_1size +JNIEXPORT void JNICALL GDK_NATIVE(_1gdk_1pixmap_1get_1size) + (JNIEnv *env, jclass that, jintLong arg0, jintArray arg1, jintArray arg2) +{ + jint *lparg1=NULL; + jint *lparg2=NULL; + GDK_NATIVE_ENTER(env, that, _1gdk_1pixmap_1get_1size_FUNC); + if (arg1) if ((lparg1 = (*env)->GetPrimitiveArrayCritical(env, arg1, NULL)) == NULL) goto fail; + if (arg2) if ((lparg2 = (*env)->GetPrimitiveArrayCritical(env, arg2, NULL)) == NULL) goto fail; +/* + gdk_pixmap_get_size(arg0, (gint *)lparg1, (gint *)lparg2); +*/ + { + GDK_LOAD_FUNCTION(fp, gdk_pixmap_get_size) + if (fp) { + ((void (CALLING_CONVENTION*)(jintLong, gint *, gint *))fp)(arg0, (gint *)lparg1, (gint *)lparg2); + } + } +fail: + if (arg2 && lparg2) (*env)->ReleasePrimitiveArrayCritical(env, arg2, lparg2, 0); + if (arg1 && lparg1) (*env)->ReleasePrimitiveArrayCritical(env, arg1, lparg1, 0); + GDK_NATIVE_EXIT(env, that, _1gdk_1pixmap_1get_1size_FUNC); +} +#endif + +#ifndef NO__1gdk_1pixmap_1new +JNIEXPORT jintLong JNICALL GDK_NATIVE(_1gdk_1pixmap_1new) + (JNIEnv *env, jclass that, jintLong arg0, jint arg1, jint arg2, jint arg3) +{ + jintLong rc = 0; + GDK_NATIVE_ENTER(env, that, _1gdk_1pixmap_1new_FUNC); +/* + rc = (jintLong)gdk_pixmap_new((GdkWindow *)arg0, (gint)arg1, (gint)arg2, (gint)arg3); +*/ + { + GDK_LOAD_FUNCTION(fp, gdk_pixmap_new) + if (fp) { + rc = (jintLong)((jintLong (CALLING_CONVENTION*)(GdkWindow *, gint, gint, gint))fp)((GdkWindow *)arg0, (gint)arg1, (gint)arg2, (gint)arg3); + } + } + GDK_NATIVE_EXIT(env, that, _1gdk_1pixmap_1new_FUNC); + return rc; +} +#endif + +#ifndef NO__1gdk_1pointer_1grab +JNIEXPORT jint JNICALL GDK_NATIVE(_1gdk_1pointer_1grab) + (JNIEnv *env, jclass that, jintLong arg0, jboolean arg1, jint arg2, jintLong arg3, jintLong arg4, jint arg5) +{ + jint rc = 0; + GDK_NATIVE_ENTER(env, that, _1gdk_1pointer_1grab_FUNC); +/* + rc = (jint)gdk_pointer_grab((GdkWindow *)arg0, (gboolean)arg1, (GdkEventMask)arg2, (GdkWindow *)arg3, (GdkCursor *)arg4, (guint32)arg5); +*/ + { + GDK_LOAD_FUNCTION(fp, gdk_pointer_grab) + if (fp) { + rc = (jint)((jint (CALLING_CONVENTION*)(GdkWindow *, gboolean, GdkEventMask, GdkWindow *, GdkCursor *, guint32))fp)((GdkWindow *)arg0, (gboolean)arg1, (GdkEventMask)arg2, (GdkWindow *)arg3, (GdkCursor *)arg4, (guint32)arg5); + } + } + GDK_NATIVE_EXIT(env, that, _1gdk_1pointer_1grab_FUNC); + return rc; +} +#endif + +#ifndef NO__1gdk_1pointer_1ungrab +JNIEXPORT void JNICALL GDK_NATIVE(_1gdk_1pointer_1ungrab) + (JNIEnv *env, jclass that, jint arg0) +{ + GDK_NATIVE_ENTER(env, that, _1gdk_1pointer_1ungrab_FUNC); +/* + gdk_pointer_ungrab((guint32)arg0); +*/ + { + GDK_LOAD_FUNCTION(fp, gdk_pointer_ungrab) + if (fp) { + ((void (CALLING_CONVENTION*)(guint32))fp)((guint32)arg0); + } + } + GDK_NATIVE_EXIT(env, that, _1gdk_1pointer_1ungrab_FUNC); +} +#endif + +#ifndef NO__1gdk_1property_1get +JNIEXPORT jboolean JNICALL GDK_NATIVE(_1gdk_1property_1get) + (JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jintLong arg2, jintLong arg3, jintLong arg4, jint arg5, jintLongArray arg6, jintArray arg7, jintArray arg8, jintLongArray arg9) +{ + jintLong *lparg6=NULL; + jint *lparg7=NULL; + jint *lparg8=NULL; + jintLong *lparg9=NULL; + jboolean rc = 0; + GDK_NATIVE_ENTER(env, that, _1gdk_1property_1get_FUNC); + if (arg6) if ((lparg6 = (*env)->GetIntLongArrayElements(env, arg6, NULL)) == NULL) goto fail; + if (arg7) if ((lparg7 = (*env)->GetIntArrayElements(env, arg7, NULL)) == NULL) goto fail; + if (arg8) if ((lparg8 = (*env)->GetIntArrayElements(env, arg8, NULL)) == NULL) goto fail; + if (arg9) if ((lparg9 = (*env)->GetIntLongArrayElements(env, arg9, NULL)) == NULL) goto fail; + rc = (jboolean)gdk_property_get((GdkWindow *)arg0, (GdkAtom)arg1, (GdkAtom)arg2, arg3, arg4, arg5, (GdkAtom *)lparg6, (gint *)lparg7, (gint *)lparg8, (guchar **)lparg9); +fail: + if (arg9 && lparg9) (*env)->ReleaseIntLongArrayElements(env, arg9, lparg9, 0); + if (arg8 && lparg8) (*env)->ReleaseIntArrayElements(env, arg8, lparg8, 0); + if (arg7 && lparg7) (*env)->ReleaseIntArrayElements(env, arg7, lparg7, 0); + if (arg6 && lparg6) (*env)->ReleaseIntLongArrayElements(env, arg6, lparg6, 0); + GDK_NATIVE_EXIT(env, that, _1gdk_1property_1get_FUNC); + return rc; +} +#endif + +#ifndef NO__1gdk_1region_1destroy +JNIEXPORT void JNICALL GDK_NATIVE(_1gdk_1region_1destroy) + (JNIEnv *env, jclass that, jintLong arg0) +{ + GDK_NATIVE_ENTER(env, that, _1gdk_1region_1destroy_FUNC); + gdk_region_destroy((GdkRegion *)arg0); + GDK_NATIVE_EXIT(env, that, _1gdk_1region_1destroy_FUNC); +} +#endif + +#ifndef NO__1gdk_1region_1empty +JNIEXPORT jboolean JNICALL GDK_NATIVE(_1gdk_1region_1empty) + (JNIEnv *env, jclass that, jintLong arg0) +{ + jboolean rc = 0; + GDK_NATIVE_ENTER(env, that, _1gdk_1region_1empty_FUNC); + rc = (jboolean)gdk_region_empty((GdkRegion *)arg0); + GDK_NATIVE_EXIT(env, that, _1gdk_1region_1empty_FUNC); + return rc; +} +#endif + +#ifndef NO__1gdk_1region_1get_1clipbox +JNIEXPORT void JNICALL GDK_NATIVE(_1gdk_1region_1get_1clipbox) + (JNIEnv *env, jclass that, jintLong arg0, jobject arg1) +{ + GdkRectangle _arg1, *lparg1=NULL; + GDK_NATIVE_ENTER(env, that, _1gdk_1region_1get_1clipbox_FUNC); + if (arg1) if ((lparg1 = &_arg1) == NULL) goto fail; + gdk_region_get_clipbox((GdkRegion *)arg0, (GdkRectangle *)lparg1); +fail: + if (arg1 && lparg1) setGdkRectangleFields(env, arg1, lparg1); + GDK_NATIVE_EXIT(env, that, _1gdk_1region_1get_1clipbox_FUNC); +} +#endif + +#ifndef NO__1gdk_1region_1get_1rectangles +JNIEXPORT void JNICALL GDK_NATIVE(_1gdk_1region_1get_1rectangles) + (JNIEnv *env, jclass that, jintLong arg0, jintLongArray arg1, jintArray arg2) +{ + jintLong *lparg1=NULL; + jint *lparg2=NULL; + GDK_NATIVE_ENTER(env, that, _1gdk_1region_1get_1rectangles_FUNC); + if (arg1) if ((lparg1 = (*env)->GetIntLongArrayElements(env, arg1, NULL)) == NULL) goto fail; + if (arg2) if ((lparg2 = (*env)->GetIntArrayElements(env, arg2, NULL)) == NULL) goto fail; +/* + gdk_region_get_rectangles(arg0, lparg1, (gint *)lparg2); +*/ + { + GDK_LOAD_FUNCTION(fp, gdk_region_get_rectangles) + if (fp) { + ((void (CALLING_CONVENTION*)(jintLong, jintLong *, gint *))fp)(arg0, lparg1, (gint *)lparg2); + } + } +fail: + if (arg2 && lparg2) (*env)->ReleaseIntArrayElements(env, arg2, lparg2, 0); + if (arg1 && lparg1) (*env)->ReleaseIntLongArrayElements(env, arg1, lparg1, 0); + GDK_NATIVE_EXIT(env, that, _1gdk_1region_1get_1rectangles_FUNC); +} +#endif + +#ifndef NO__1gdk_1region_1intersect +JNIEXPORT void JNICALL GDK_NATIVE(_1gdk_1region_1intersect) + (JNIEnv *env, jclass that, jintLong arg0, jintLong arg1) +{ + GDK_NATIVE_ENTER(env, that, _1gdk_1region_1intersect_FUNC); + gdk_region_intersect((GdkRegion *)arg0, (GdkRegion *)arg1); + GDK_NATIVE_EXIT(env, that, _1gdk_1region_1intersect_FUNC); +} +#endif + +#ifndef NO__1gdk_1region_1new +JNIEXPORT jintLong JNICALL GDK_NATIVE(_1gdk_1region_1new) + (JNIEnv *env, jclass that) +{ + jintLong rc = 0; + GDK_NATIVE_ENTER(env, that, _1gdk_1region_1new_FUNC); + rc = (jintLong)gdk_region_new(); + GDK_NATIVE_EXIT(env, that, _1gdk_1region_1new_FUNC); + return rc; +} +#endif + +#ifndef NO__1gdk_1region_1offset +JNIEXPORT void JNICALL GDK_NATIVE(_1gdk_1region_1offset) + (JNIEnv *env, jclass that, jintLong arg0, jint arg1, jint arg2) +{ + GDK_NATIVE_ENTER(env, that, _1gdk_1region_1offset_FUNC); + gdk_region_offset((GdkRegion *)arg0, (gint)arg1, (gint)arg2); + GDK_NATIVE_EXIT(env, that, _1gdk_1region_1offset_FUNC); +} +#endif + +#ifndef NO__1gdk_1region_1point_1in +JNIEXPORT jboolean JNICALL GDK_NATIVE(_1gdk_1region_1point_1in) + (JNIEnv *env, jclass that, jintLong arg0, jint arg1, jint arg2) +{ + jboolean rc = 0; + GDK_NATIVE_ENTER(env, that, _1gdk_1region_1point_1in_FUNC); + rc = (jboolean)gdk_region_point_in((GdkRegion *)arg0, (gint)arg1, (gint)arg2); + GDK_NATIVE_EXIT(env, that, _1gdk_1region_1point_1in_FUNC); + return rc; +} +#endif + +#ifndef NO__1gdk_1region_1polygon +JNIEXPORT jintLong JNICALL GDK_NATIVE(_1gdk_1region_1polygon) + (JNIEnv *env, jclass that, jintArray arg0, jint arg1, jint arg2) +{ + jint *lparg0=NULL; + jintLong rc = 0; + GDK_NATIVE_ENTER(env, that, _1gdk_1region_1polygon_FUNC); + if (arg0) if ((lparg0 = (*env)->GetIntArrayElements(env, arg0, NULL)) == NULL) goto fail; +/* + rc = (jintLong)gdk_region_polygon(lparg0, arg1, arg2); +*/ + { + GDK_LOAD_FUNCTION(fp, gdk_region_polygon) + if (fp) { + rc = (jintLong)((jintLong (CALLING_CONVENTION*)(jint *, jint, jint))fp)(lparg0, arg1, arg2); + } + } +fail: + if (arg0 && lparg0) (*env)->ReleaseIntArrayElements(env, arg0, lparg0, 0); + GDK_NATIVE_EXIT(env, that, _1gdk_1region_1polygon_FUNC); + return rc; +} +#endif + +#ifndef NO__1gdk_1region_1rect_1in +JNIEXPORT jintLong JNICALL GDK_NATIVE(_1gdk_1region_1rect_1in) + (JNIEnv *env, jclass that, jintLong arg0, jobject arg1) +{ + GdkRectangle _arg1, *lparg1=NULL; + jintLong rc = 0; + GDK_NATIVE_ENTER(env, that, _1gdk_1region_1rect_1in_FUNC); + if (arg1) if ((lparg1 = getGdkRectangleFields(env, arg1, &_arg1)) == NULL) goto fail; + rc = (jintLong)gdk_region_rect_in((GdkRegion *)arg0, (GdkRectangle *)lparg1); +fail: + GDK_NATIVE_EXIT(env, that, _1gdk_1region_1rect_1in_FUNC); + return rc; +} +#endif + +#ifndef NO__1gdk_1region_1rectangle +JNIEXPORT jintLong JNICALL GDK_NATIVE(_1gdk_1region_1rectangle) + (JNIEnv *env, jclass that, jobject arg0) +{ + GdkRectangle _arg0, *lparg0=NULL; + jintLong rc = 0; + GDK_NATIVE_ENTER(env, that, _1gdk_1region_1rectangle_FUNC); + if (arg0) if ((lparg0 = getGdkRectangleFields(env, arg0, &_arg0)) == NULL) goto fail; + rc = (jintLong)gdk_region_rectangle(lparg0); +fail: + GDK_NATIVE_EXIT(env, that, _1gdk_1region_1rectangle_FUNC); + return rc; +} +#endif + +#ifndef NO__1gdk_1region_1subtract +JNIEXPORT void JNICALL GDK_NATIVE(_1gdk_1region_1subtract) + (JNIEnv *env, jclass that, jintLong arg0, jintLong arg1) +{ + GDK_NATIVE_ENTER(env, that, _1gdk_1region_1subtract_FUNC); + gdk_region_subtract((GdkRegion *)arg0, (GdkRegion *)arg1); + GDK_NATIVE_EXIT(env, that, _1gdk_1region_1subtract_FUNC); +} +#endif + +#ifndef NO__1gdk_1region_1union +JNIEXPORT void JNICALL GDK_NATIVE(_1gdk_1region_1union) + (JNIEnv *env, jclass that, jintLong arg0, jintLong arg1) +{ + GDK_NATIVE_ENTER(env, that, _1gdk_1region_1union_FUNC); + gdk_region_union((GdkRegion *)arg0, (GdkRegion *)arg1); + GDK_NATIVE_EXIT(env, that, _1gdk_1region_1union_FUNC); +} +#endif + +#ifndef NO__1gdk_1region_1union_1with_1rect +JNIEXPORT void JNICALL GDK_NATIVE(_1gdk_1region_1union_1with_1rect) + (JNIEnv *env, jclass that, jintLong arg0, jobject arg1) +{ + GdkRectangle _arg1, *lparg1=NULL; + GDK_NATIVE_ENTER(env, that, _1gdk_1region_1union_1with_1rect_FUNC); + if (arg1) if ((lparg1 = getGdkRectangleFields(env, arg1, &_arg1)) == NULL) goto fail; + gdk_region_union_with_rect((GdkRegion *)arg0, (GdkRectangle *)lparg1); +fail: + GDK_NATIVE_EXIT(env, that, _1gdk_1region_1union_1with_1rect_FUNC); +} +#endif + +#ifndef NO__1gdk_1rgba_1free +JNIEXPORT void JNICALL GDK_NATIVE(_1gdk_1rgba_1free) + (JNIEnv *env, jclass that, jintLong arg0) +{ + GDK_NATIVE_ENTER(env, that, _1gdk_1rgba_1free_FUNC); +/* + gdk_rgba_free((GdkRGBA *)arg0); +*/ + { + GDK_LOAD_FUNCTION(fp, gdk_rgba_free) + if (fp) { + ((void (CALLING_CONVENTION*)(GdkRGBA *))fp)((GdkRGBA *)arg0); + } + } + GDK_NATIVE_EXIT(env, that, _1gdk_1rgba_1free_FUNC); +} +#endif + +#ifndef NO__1gdk_1rgba_1hash +JNIEXPORT jint JNICALL GDK_NATIVE(_1gdk_1rgba_1hash) + (JNIEnv *env, jclass that, jobject arg0) +{ + GdkRGBA _arg0, *lparg0=NULL; + jint rc = 0; + GDK_NATIVE_ENTER(env, that, _1gdk_1rgba_1hash_FUNC); + if (arg0) if ((lparg0 = getGdkRGBAFields(env, arg0, &_arg0)) == NULL) goto fail; +/* + rc = (jint)gdk_rgba_hash((GdkRGBA *)lparg0); +*/ + { + GDK_LOAD_FUNCTION(fp, gdk_rgba_hash) + if (fp) { + rc = (jint)((jint (CALLING_CONVENTION*)(GdkRGBA *))fp)((GdkRGBA *)lparg0); + } + } +fail: + if (arg0 && lparg0) setGdkRGBAFields(env, arg0, lparg0); + GDK_NATIVE_EXIT(env, that, _1gdk_1rgba_1hash_FUNC); + return rc; +} +#endif + +#ifndef NO__1gdk_1rgba_1parse +JNIEXPORT jintLong JNICALL GDK_NATIVE(_1gdk_1rgba_1parse) + (JNIEnv *env, jclass that, jobject arg0, jbyteArray arg1) +{ + GdkRGBA _arg0, *lparg0=NULL; + jbyte *lparg1=NULL; + jintLong rc = 0; + GDK_NATIVE_ENTER(env, that, _1gdk_1rgba_1parse_FUNC); + if (arg0) if ((lparg0 = getGdkRGBAFields(env, arg0, &_arg0)) == NULL) goto fail; + if (arg1) if ((lparg1 = (*env)->GetByteArrayElements(env, arg1, NULL)) == NULL) goto fail; +/* + rc = (jintLong)gdk_rgba_parse((GdkRGBA *)lparg0, (const gchar *)lparg1); +*/ + { + GDK_LOAD_FUNCTION(fp, gdk_rgba_parse) + if (fp) { + rc = (jintLong)((jintLong (CALLING_CONVENTION*)(GdkRGBA *, const gchar *))fp)((GdkRGBA *)lparg0, (const gchar *)lparg1); + } + } +fail: + if (arg1 && lparg1) (*env)->ReleaseByteArrayElements(env, arg1, lparg1, 0); + if (arg0 && lparg0) setGdkRGBAFields(env, arg0, lparg0); + GDK_NATIVE_EXIT(env, that, _1gdk_1rgba_1parse_FUNC); + return rc; +} +#endif + +#ifndef NO__1gdk_1rgba_1to_1string +JNIEXPORT jintLong JNICALL GDK_NATIVE(_1gdk_1rgba_1to_1string) + (JNIEnv *env, jclass that, jobject arg0) +{ + GdkRGBA _arg0, *lparg0=NULL; + jintLong rc = 0; + GDK_NATIVE_ENTER(env, that, _1gdk_1rgba_1to_1string_FUNC); + if (arg0) if ((lparg0 = getGdkRGBAFields(env, arg0, &_arg0)) == NULL) goto fail; +/* + rc = (jintLong)gdk_rgba_to_string((GdkRGBA *)lparg0); +*/ + { + GDK_LOAD_FUNCTION(fp, gdk_rgba_to_string) + if (fp) { + rc = (jintLong)((jintLong (CALLING_CONVENTION*)(GdkRGBA *))fp)((GdkRGBA *)lparg0); + } + } +fail: + if (arg0 && lparg0) setGdkRGBAFields(env, arg0, lparg0); + GDK_NATIVE_EXIT(env, that, _1gdk_1rgba_1to_1string_FUNC); + return rc; +} +#endif + +#ifndef NO__1gdk_1screen_1get_1active_1window +JNIEXPORT jintLong JNICALL GDK_NATIVE(_1gdk_1screen_1get_1active_1window) + (JNIEnv *env, jclass that, jintLong arg0) +{ + jintLong rc = 0; + GDK_NATIVE_ENTER(env, that, _1gdk_1screen_1get_1active_1window_FUNC); + rc = (jintLong)gdk_screen_get_active_window((GdkScreen *)arg0); + GDK_NATIVE_EXIT(env, that, _1gdk_1screen_1get_1active_1window_FUNC); + return rc; +} +#endif + +#ifndef NO__1gdk_1screen_1get_1default +JNIEXPORT jintLong JNICALL GDK_NATIVE(_1gdk_1screen_1get_1default) + (JNIEnv *env, jclass that) +{ + jintLong rc = 0; + GDK_NATIVE_ENTER(env, that, _1gdk_1screen_1get_1default_FUNC); +/* + rc = (jintLong)gdk_screen_get_default(); +*/ + { + GDK_LOAD_FUNCTION(fp, gdk_screen_get_default) + if (fp) { + rc = (jintLong)((jintLong (CALLING_CONVENTION*)())fp)(); + } + } + GDK_NATIVE_EXIT(env, that, _1gdk_1screen_1get_1default_FUNC); + return rc; +} +#endif + +#ifndef NO__1gdk_1screen_1get_1monitor_1at_1point +JNIEXPORT jint JNICALL GDK_NATIVE(_1gdk_1screen_1get_1monitor_1at_1point) + (JNIEnv *env, jclass that, jintLong arg0, jint arg1, jint arg2) +{ + jint rc = 0; + GDK_NATIVE_ENTER(env, that, _1gdk_1screen_1get_1monitor_1at_1point_FUNC); +/* + rc = (jint)gdk_screen_get_monitor_at_point((GdkScreen *)arg0, (gint)arg1, (gint)arg2); +*/ + { + GDK_LOAD_FUNCTION(fp, gdk_screen_get_monitor_at_point) + if (fp) { + rc = (jint)((jint (CALLING_CONVENTION*)(GdkScreen *, gint, gint))fp)((GdkScreen *)arg0, (gint)arg1, (gint)arg2); + } + } + GDK_NATIVE_EXIT(env, that, _1gdk_1screen_1get_1monitor_1at_1point_FUNC); + return rc; +} +#endif + +#ifndef NO__1gdk_1screen_1get_1monitor_1at_1window +JNIEXPORT jint JNICALL GDK_NATIVE(_1gdk_1screen_1get_1monitor_1at_1window) + (JNIEnv *env, jclass that, jintLong arg0, jintLong arg1) +{ + jint rc = 0; + GDK_NATIVE_ENTER(env, that, _1gdk_1screen_1get_1monitor_1at_1window_FUNC); +/* + rc = (jint)gdk_screen_get_monitor_at_window((GdkScreen *)arg0, (GdkWindow *)arg1); +*/ + { + GDK_LOAD_FUNCTION(fp, gdk_screen_get_monitor_at_window) + if (fp) { + rc = (jint)((jint (CALLING_CONVENTION*)(GdkScreen *, GdkWindow *))fp)((GdkScreen *)arg0, (GdkWindow *)arg1); + } + } + GDK_NATIVE_EXIT(env, that, _1gdk_1screen_1get_1monitor_1at_1window_FUNC); + return rc; +} +#endif + +#ifndef NO__1gdk_1screen_1get_1monitor_1geometry +JNIEXPORT void JNICALL GDK_NATIVE(_1gdk_1screen_1get_1monitor_1geometry) + (JNIEnv *env, jclass that, jintLong arg0, jint arg1, jobject arg2) +{ + GdkRectangle _arg2, *lparg2=NULL; + GDK_NATIVE_ENTER(env, that, _1gdk_1screen_1get_1monitor_1geometry_FUNC); + if (arg2) if ((lparg2 = &_arg2) == NULL) goto fail; +/* + gdk_screen_get_monitor_geometry((GdkScreen *)arg0, arg1, lparg2); +*/ + { + GDK_LOAD_FUNCTION(fp, gdk_screen_get_monitor_geometry) + if (fp) { + ((void (CALLING_CONVENTION*)(GdkScreen *, jint, GdkRectangle *))fp)((GdkScreen *)arg0, arg1, lparg2); + } + } +fail: + if (arg2 && lparg2) setGdkRectangleFields(env, arg2, lparg2); + GDK_NATIVE_EXIT(env, that, _1gdk_1screen_1get_1monitor_1geometry_FUNC); +} +#endif + +#ifndef NO__1gdk_1screen_1get_1monitor_1scale_1factor +JNIEXPORT jint JNICALL GDK_NATIVE(_1gdk_1screen_1get_1monitor_1scale_1factor) + (JNIEnv *env, jclass that, jintLong arg0, jint arg1) +{ + jint rc = 0; + GDK_NATIVE_ENTER(env, that, _1gdk_1screen_1get_1monitor_1scale_1factor_FUNC); +/* + rc = (jint)gdk_screen_get_monitor_scale_factor((GdkScreen *)arg0, (gint)arg1); +*/ + { + GDK_LOAD_FUNCTION(fp, gdk_screen_get_monitor_scale_factor) + if (fp) { + rc = (jint)((jint (CALLING_CONVENTION*)(GdkScreen *, gint))fp)((GdkScreen *)arg0, (gint)arg1); + } + } + GDK_NATIVE_EXIT(env, that, _1gdk_1screen_1get_1monitor_1scale_1factor_FUNC); + return rc; +} +#endif + +#ifndef NO__1gdk_1screen_1get_1monitor_1width_1mm +JNIEXPORT jint JNICALL GDK_NATIVE(_1gdk_1screen_1get_1monitor_1width_1mm) + (JNIEnv *env, jclass that, jintLong arg0, jint arg1) +{ + jint rc = 0; + GDK_NATIVE_ENTER(env, that, _1gdk_1screen_1get_1monitor_1width_1mm_FUNC); +/* + rc = (jint)gdk_screen_get_monitor_width_mm((GdkScreen *)arg0, arg1); +*/ + { + GDK_LOAD_FUNCTION(fp, gdk_screen_get_monitor_width_mm) + if (fp) { + rc = (jint)((jint (CALLING_CONVENTION*)(GdkScreen *, jint))fp)((GdkScreen *)arg0, arg1); + } + } + GDK_NATIVE_EXIT(env, that, _1gdk_1screen_1get_1monitor_1width_1mm_FUNC); + return rc; +} +#endif + +#ifndef NO__1gdk_1screen_1get_1monitor_1workarea +JNIEXPORT void JNICALL GDK_NATIVE(_1gdk_1screen_1get_1monitor_1workarea) + (JNIEnv *env, jclass that, jintLong arg0, jint arg1, jobject arg2) +{ + GdkRectangle _arg2, *lparg2=NULL; + GDK_NATIVE_ENTER(env, that, _1gdk_1screen_1get_1monitor_1workarea_FUNC); + if (arg2) if ((lparg2 = &_arg2) == NULL) goto fail; +/* + gdk_screen_get_monitor_workarea((GdkScreen *)arg0, arg1, lparg2); +*/ + { + GDK_LOAD_FUNCTION(fp, gdk_screen_get_monitor_workarea) + if (fp) { + ((void (CALLING_CONVENTION*)(GdkScreen *, jint, GdkRectangle *))fp)((GdkScreen *)arg0, arg1, lparg2); + } + } +fail: + if (arg2 && lparg2) setGdkRectangleFields(env, arg2, lparg2); + GDK_NATIVE_EXIT(env, that, _1gdk_1screen_1get_1monitor_1workarea_FUNC); +} +#endif + +#ifndef NO__1gdk_1screen_1get_1n_1monitors +JNIEXPORT jint JNICALL GDK_NATIVE(_1gdk_1screen_1get_1n_1monitors) + (JNIEnv *env, jclass that, jintLong arg0) +{ + jint rc = 0; + GDK_NATIVE_ENTER(env, that, _1gdk_1screen_1get_1n_1monitors_FUNC); +/* + rc = (jint)gdk_screen_get_n_monitors((GdkScreen *)arg0); +*/ + { + GDK_LOAD_FUNCTION(fp, gdk_screen_get_n_monitors) + if (fp) { + rc = (jint)((jint (CALLING_CONVENTION*)(GdkScreen *))fp)((GdkScreen *)arg0); + } + } + GDK_NATIVE_EXIT(env, that, _1gdk_1screen_1get_1n_1monitors_FUNC); + return rc; +} +#endif + +#ifndef NO__1gdk_1screen_1get_1primary_1monitor +JNIEXPORT jint JNICALL GDK_NATIVE(_1gdk_1screen_1get_1primary_1monitor) + (JNIEnv *env, jclass that, jintLong arg0) +{ + jint rc = 0; + GDK_NATIVE_ENTER(env, that, _1gdk_1screen_1get_1primary_1monitor_FUNC); +/* + rc = (jint)gdk_screen_get_primary_monitor((GdkScreen *)arg0); +*/ + { + GDK_LOAD_FUNCTION(fp, gdk_screen_get_primary_monitor) + if (fp) { + rc = (jint)((jint (CALLING_CONVENTION*)(GdkScreen *))fp)((GdkScreen *)arg0); + } + } + GDK_NATIVE_EXIT(env, that, _1gdk_1screen_1get_1primary_1monitor_FUNC); + return rc; +} +#endif + +#ifndef NO__1gdk_1screen_1get_1resolution +JNIEXPORT jdouble JNICALL GDK_NATIVE(_1gdk_1screen_1get_1resolution) + (JNIEnv *env, jclass that, jintLong arg0) +{ + jdouble rc = 0; + GDK_NATIVE_ENTER(env, that, _1gdk_1screen_1get_1resolution_FUNC); +/* + rc = (jdouble)gdk_screen_get_resolution((GdkScreen *)arg0); +*/ + { + GDK_LOAD_FUNCTION(fp, gdk_screen_get_resolution) + if (fp) { + rc = (jdouble)((jdouble (CALLING_CONVENTION*)(GdkScreen *))fp)((GdkScreen *)arg0); + } + } + GDK_NATIVE_EXIT(env, that, _1gdk_1screen_1get_1resolution_FUNC); + return rc; +} +#endif + +#ifndef NO__1gdk_1screen_1height +JNIEXPORT jint JNICALL GDK_NATIVE(_1gdk_1screen_1height) + (JNIEnv *env, jclass that) +{ + jint rc = 0; + GDK_NATIVE_ENTER(env, that, _1gdk_1screen_1height_FUNC); + rc = (jint)gdk_screen_height(); + GDK_NATIVE_EXIT(env, that, _1gdk_1screen_1height_FUNC); + return rc; +} +#endif + +#ifndef NO__1gdk_1screen_1width +JNIEXPORT jint JNICALL GDK_NATIVE(_1gdk_1screen_1width) + (JNIEnv *env, jclass that) +{ + jint rc = 0; + GDK_NATIVE_ENTER(env, that, _1gdk_1screen_1width_FUNC); + rc = (jint)gdk_screen_width(); + GDK_NATIVE_EXIT(env, that, _1gdk_1screen_1width_FUNC); + return rc; +} +#endif + +#ifndef NO__1gdk_1screen_1width_1mm +JNIEXPORT jint JNICALL GDK_NATIVE(_1gdk_1screen_1width_1mm) + (JNIEnv *env, jclass that) +{ + jint rc = 0; + GDK_NATIVE_ENTER(env, that, _1gdk_1screen_1width_1mm_FUNC); + rc = (jint)gdk_screen_width_mm(); + GDK_NATIVE_EXIT(env, that, _1gdk_1screen_1width_1mm_FUNC); + return rc; +} +#endif + +#ifndef NO__1gdk_1seat_1get_1pointer +JNIEXPORT jintLong JNICALL GDK_NATIVE(_1gdk_1seat_1get_1pointer) + (JNIEnv *env, jclass that, jintLong arg0) +{ + jintLong rc = 0; + GDK_NATIVE_ENTER(env, that, _1gdk_1seat_1get_1pointer_FUNC); +/* + rc = (jintLong)gdk_seat_get_pointer(arg0); +*/ + { + GDK_LOAD_FUNCTION(fp, gdk_seat_get_pointer) + if (fp) { + rc = (jintLong)((jintLong (CALLING_CONVENTION*)(jintLong))fp)(arg0); + } + } + GDK_NATIVE_EXIT(env, that, _1gdk_1seat_1get_1pointer_FUNC); + return rc; +} +#endif + +#ifndef NO__1gdk_1seat_1grab +JNIEXPORT jint JNICALL GDK_NATIVE(_1gdk_1seat_1grab) + (JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jint arg2, jboolean arg3, jintLong arg4, jintLong arg5, jintLong arg6, jintLong arg7) +{ + jint rc = 0; + GDK_NATIVE_ENTER(env, that, _1gdk_1seat_1grab_FUNC); +/* + rc = (jint)gdk_seat_grab(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7); +*/ + { + GDK_LOAD_FUNCTION(fp, gdk_seat_grab) + if (fp) { + rc = (jint)((jint (CALLING_CONVENTION*)(jintLong, jintLong, jint, jboolean, jintLong, jintLong, jintLong, jintLong))fp)(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7); + } + } + GDK_NATIVE_EXIT(env, that, _1gdk_1seat_1grab_FUNC); + return rc; +} +#endif + +#ifndef NO__1gdk_1seat_1ungrab +JNIEXPORT void JNICALL GDK_NATIVE(_1gdk_1seat_1ungrab) + (JNIEnv *env, jclass that, jintLong arg0) +{ + GDK_NATIVE_ENTER(env, that, _1gdk_1seat_1ungrab_FUNC); +/* + gdk_seat_ungrab(arg0); +*/ + { + GDK_LOAD_FUNCTION(fp, gdk_seat_ungrab) + if (fp) { + ((void (CALLING_CONVENTION*)(jintLong))fp)(arg0); + } + } + GDK_NATIVE_EXIT(env, that, _1gdk_1seat_1ungrab_FUNC); +} +#endif + +#ifndef NO__1gdk_1selection_1owner_1get +JNIEXPORT void JNICALL GDK_NATIVE(_1gdk_1selection_1owner_1get) + (JNIEnv *env, jclass that, jintLong arg0) +{ + GDK_NATIVE_ENTER(env, that, _1gdk_1selection_1owner_1get_FUNC); + gdk_selection_owner_get((GdkAtom)arg0); + GDK_NATIVE_EXIT(env, that, _1gdk_1selection_1owner_1get_FUNC); +} +#endif + +#ifndef NO__1gdk_1selection_1owner_1set +JNIEXPORT void JNICALL GDK_NATIVE(_1gdk_1selection_1owner_1set) + (JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jint arg2, jboolean arg3) +{ + GDK_NATIVE_ENTER(env, that, _1gdk_1selection_1owner_1set_FUNC); + gdk_selection_owner_set((GdkWindow *)arg0, (GdkAtom)arg1, (guint32)arg2, (gboolean)arg3); + GDK_NATIVE_EXIT(env, that, _1gdk_1selection_1owner_1set_FUNC); +} +#endif + +#ifndef NO__1gdk_1set_1program_1class +JNIEXPORT void JNICALL GDK_NATIVE(_1gdk_1set_1program_1class) + (JNIEnv *env, jclass that, jbyteArray arg0) +{ + jbyte *lparg0=NULL; + GDK_NATIVE_ENTER(env, that, _1gdk_1set_1program_1class_FUNC); + if (arg0) if ((lparg0 = (*env)->GetByteArrayElements(env, arg0, NULL)) == NULL) goto fail; + gdk_set_program_class((const char *)lparg0); +fail: + if (arg0 && lparg0) (*env)->ReleaseByteArrayElements(env, arg0, lparg0, 0); + GDK_NATIVE_EXIT(env, that, _1gdk_1set_1program_1class_FUNC); +} +#endif + +#ifndef NO__1gdk_1test_1simulate_1button +JNIEXPORT jboolean JNICALL GDK_NATIVE(_1gdk_1test_1simulate_1button) + (JNIEnv *env, jclass that, jintLong arg0, jint arg1, jint arg2, jint arg3, jint arg4, jint arg5) +{ + jboolean rc = 0; + GDK_NATIVE_ENTER(env, that, _1gdk_1test_1simulate_1button_FUNC); + rc = (jboolean)gdk_test_simulate_button((GdkWindow *)arg0, (gint)arg1, (gint)arg2, (guint)arg3, (GdkModifierType)arg4, (GdkEventType)arg5); + GDK_NATIVE_EXIT(env, that, _1gdk_1test_1simulate_1button_FUNC); + return rc; +} +#endif + +#ifndef NO__1gdk_1text_1property_1to_1utf8_1list_1for_1display +JNIEXPORT jint JNICALL GDK_NATIVE(_1gdk_1text_1property_1to_1utf8_1list_1for_1display) + (JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jint arg2, jintLong arg3, jint arg4, jintLongArray arg5) +{ + jintLong *lparg5=NULL; + jint rc = 0; + GDK_NATIVE_ENTER(env, that, _1gdk_1text_1property_1to_1utf8_1list_1for_1display_FUNC); + if (arg5) if ((lparg5 = (*env)->GetIntLongArrayElements(env, arg5, NULL)) == NULL) goto fail; + rc = (jint)gdk_text_property_to_utf8_list_for_display((GdkDisplay *)arg0, (GdkAtom)arg1, arg2, (guchar *)arg3, arg4, (gchar ***)lparg5); +fail: + if (arg5 && lparg5) (*env)->ReleaseIntLongArrayElements(env, arg5, lparg5, 0); + GDK_NATIVE_EXIT(env, that, _1gdk_1text_1property_1to_1utf8_1list_1for_1display_FUNC); + return rc; +} +#endif + +#ifndef NO__1gdk_1unicode_1to_1keyval +JNIEXPORT jint JNICALL GDK_NATIVE(_1gdk_1unicode_1to_1keyval) + (JNIEnv *env, jclass that, jint arg0) +{ + jint rc = 0; + GDK_NATIVE_ENTER(env, that, _1gdk_1unicode_1to_1keyval_FUNC); + rc = (jint)gdk_unicode_to_keyval(arg0); + GDK_NATIVE_EXIT(env, that, _1gdk_1unicode_1to_1keyval_FUNC); + return rc; +} +#endif + +#ifndef NO__1gdk_1utf8_1to_1string_1target +JNIEXPORT jintLong JNICALL GDK_NATIVE(_1gdk_1utf8_1to_1string_1target) + (JNIEnv *env, jclass that, jbyteArray arg0) +{ + jbyte *lparg0=NULL; + jintLong rc = 0; + GDK_NATIVE_ENTER(env, that, _1gdk_1utf8_1to_1string_1target_FUNC); + if (arg0) if ((lparg0 = (*env)->GetByteArrayElements(env, arg0, NULL)) == NULL) goto fail; + rc = (jintLong)gdk_utf8_to_string_target((const gchar *)lparg0); +fail: + if (arg0 && lparg0) (*env)->ReleaseByteArrayElements(env, arg0, lparg0, 0); + GDK_NATIVE_EXIT(env, that, _1gdk_1utf8_1to_1string_1target_FUNC); + return rc; +} +#endif + +#ifndef NO__1gdk_1visual_1get_1depth +JNIEXPORT jint JNICALL GDK_NATIVE(_1gdk_1visual_1get_1depth) + (JNIEnv *env, jclass that, jintLong arg0) +{ + jint rc = 0; + GDK_NATIVE_ENTER(env, that, _1gdk_1visual_1get_1depth_FUNC); +/* + rc = (jint)gdk_visual_get_depth((GdkVisual *)arg0); +*/ + { + GDK_LOAD_FUNCTION(fp, gdk_visual_get_depth) + if (fp) { + rc = (jint)((jint (CALLING_CONVENTION*)(GdkVisual *))fp)((GdkVisual *)arg0); + } + } + GDK_NATIVE_EXIT(env, that, _1gdk_1visual_1get_1depth_FUNC); + return rc; +} +#endif + +#ifndef NO__1gdk_1visual_1get_1system +JNIEXPORT jintLong JNICALL GDK_NATIVE(_1gdk_1visual_1get_1system) + (JNIEnv *env, jclass that) +{ + jintLong rc = 0; + GDK_NATIVE_ENTER(env, that, _1gdk_1visual_1get_1system_FUNC); + rc = (jintLong)gdk_visual_get_system(); + GDK_NATIVE_EXIT(env, that, _1gdk_1visual_1get_1system_FUNC); + return rc; +} +#endif + +#ifndef NO__1gdk_1window_1add_1filter +JNIEXPORT void JNICALL GDK_NATIVE(_1gdk_1window_1add_1filter) + (JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jintLong arg2) +{ + GDK_NATIVE_ENTER(env, that, _1gdk_1window_1add_1filter_FUNC); + gdk_window_add_filter((GdkWindow *)arg0, (GdkFilterFunc)arg1, (gpointer)arg2); + GDK_NATIVE_EXIT(env, that, _1gdk_1window_1add_1filter_FUNC); +} +#endif + +#ifndef NO__1gdk_1window_1at_1pointer +JNIEXPORT jintLong JNICALL GDK_NATIVE(_1gdk_1window_1at_1pointer) + (JNIEnv *env, jclass that, jintArray arg0, jintArray arg1) +{ + jint *lparg0=NULL; + jint *lparg1=NULL; + jintLong rc = 0; + GDK_NATIVE_ENTER(env, that, _1gdk_1window_1at_1pointer_FUNC); + if (arg0) if ((lparg0 = (*env)->GetIntArrayElements(env, arg0, NULL)) == NULL) goto fail; + if (arg1) if ((lparg1 = (*env)->GetIntArrayElements(env, arg1, NULL)) == NULL) goto fail; +/* + rc = (jintLong)gdk_window_at_pointer((gint *)lparg0, (gint *)lparg1); +*/ + { + GDK_LOAD_FUNCTION(fp, gdk_window_at_pointer) + if (fp) { + rc = (jintLong)((jintLong (CALLING_CONVENTION*)(gint *, gint *))fp)((gint *)lparg0, (gint *)lparg1); + } + } +fail: + if (arg1 && lparg1) (*env)->ReleaseIntArrayElements(env, arg1, lparg1, 0); + if (arg0 && lparg0) (*env)->ReleaseIntArrayElements(env, arg0, lparg0, 0); + GDK_NATIVE_EXIT(env, that, _1gdk_1window_1at_1pointer_FUNC); + return rc; +} +#endif + +#ifndef NO__1gdk_1window_1begin_1paint_1rect +JNIEXPORT void JNICALL GDK_NATIVE(_1gdk_1window_1begin_1paint_1rect) + (JNIEnv *env, jclass that, jintLong arg0, jobject arg1) +{ + GdkRectangle _arg1, *lparg1=NULL; + GDK_NATIVE_ENTER(env, that, _1gdk_1window_1begin_1paint_1rect_FUNC); + if (arg1) if ((lparg1 = getGdkRectangleFields(env, arg1, &_arg1)) == NULL) goto fail; + gdk_window_begin_paint_rect((GdkWindow *)arg0, (GdkRectangle *)lparg1); +fail: + GDK_NATIVE_EXIT(env, that, _1gdk_1window_1begin_1paint_1rect_FUNC); +} +#endif + +#ifndef NO__1gdk_1window_1create_1similar_1surface +JNIEXPORT jintLong JNICALL GDK_NATIVE(_1gdk_1window_1create_1similar_1surface) + (JNIEnv *env, jclass that, jintLong arg0, jint arg1, jint arg2, jint arg3) +{ + jintLong rc = 0; + GDK_NATIVE_ENTER(env, that, _1gdk_1window_1create_1similar_1surface_FUNC); +/* + rc = (jintLong)gdk_window_create_similar_surface((GdkWindow *)arg0, arg1, arg2, arg3); +*/ + { + GDK_LOAD_FUNCTION(fp, gdk_window_create_similar_surface) + if (fp) { + rc = (jintLong)((jintLong (CALLING_CONVENTION*)(GdkWindow *, jint, jint, jint))fp)((GdkWindow *)arg0, arg1, arg2, arg3); + } + } + GDK_NATIVE_EXIT(env, that, _1gdk_1window_1create_1similar_1surface_FUNC); + return rc; +} +#endif + +#ifndef NO__1gdk_1window_1destroy +JNIEXPORT void JNICALL GDK_NATIVE(_1gdk_1window_1destroy) + (JNIEnv *env, jclass that, jintLong arg0) +{ + GDK_NATIVE_ENTER(env, that, _1gdk_1window_1destroy_FUNC); + gdk_window_destroy((GdkWindow *)arg0); + GDK_NATIVE_EXIT(env, that, _1gdk_1window_1destroy_FUNC); +} +#endif + +#ifndef NO__1gdk_1window_1end_1paint +JNIEXPORT void JNICALL GDK_NATIVE(_1gdk_1window_1end_1paint) + (JNIEnv *env, jclass that, jintLong arg0) +{ + GDK_NATIVE_ENTER(env, that, _1gdk_1window_1end_1paint_FUNC); + gdk_window_end_paint((GdkWindow *)arg0); + GDK_NATIVE_EXIT(env, that, _1gdk_1window_1end_1paint_FUNC); +} +#endif + +#ifndef NO__1gdk_1window_1focus +JNIEXPORT void JNICALL GDK_NATIVE(_1gdk_1window_1focus) + (JNIEnv *env, jclass that, jintLong arg0, jint arg1) +{ + GDK_NATIVE_ENTER(env, that, _1gdk_1window_1focus_FUNC); + gdk_window_focus((GdkWindow *)arg0, arg1); + GDK_NATIVE_EXIT(env, that, _1gdk_1window_1focus_FUNC); +} +#endif + +#ifndef NO__1gdk_1window_1get_1children +JNIEXPORT jintLong JNICALL GDK_NATIVE(_1gdk_1window_1get_1children) + (JNIEnv *env, jclass that, jintLong arg0) +{ + jintLong rc = 0; + GDK_NATIVE_ENTER(env, that, _1gdk_1window_1get_1children_FUNC); + rc = (jintLong)gdk_window_get_children((GdkWindow *)arg0); + GDK_NATIVE_EXIT(env, that, _1gdk_1window_1get_1children_FUNC); + return rc; +} +#endif + +#ifndef NO__1gdk_1window_1get_1device_1position +JNIEXPORT jintLong JNICALL GDK_NATIVE(_1gdk_1window_1get_1device_1position) + (JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jintArray arg2, jintArray arg3, jintArray arg4) +{ + jint *lparg2=NULL; + jint *lparg3=NULL; + jint *lparg4=NULL; + jintLong rc = 0; + GDK_NATIVE_ENTER(env, that, _1gdk_1window_1get_1device_1position_FUNC); + if (arg2) if ((lparg2 = (*env)->GetIntArrayElements(env, arg2, NULL)) == NULL) goto fail; + if (arg3) if ((lparg3 = (*env)->GetIntArrayElements(env, arg3, NULL)) == NULL) goto fail; + if (arg4) if ((lparg4 = (*env)->GetIntArrayElements(env, arg4, NULL)) == NULL) goto fail; +/* + rc = (jintLong)gdk_window_get_device_position((GdkWindow *)arg0, (GdkDevice *)arg1, (gint *)lparg2, (gint *)lparg3, (GdkModifierType *)lparg4); +*/ + { + GDK_LOAD_FUNCTION(fp, gdk_window_get_device_position) + if (fp) { + rc = (jintLong)((jintLong (CALLING_CONVENTION*)(GdkWindow *, GdkDevice *, gint *, gint *, GdkModifierType *))fp)((GdkWindow *)arg0, (GdkDevice *)arg1, (gint *)lparg2, (gint *)lparg3, (GdkModifierType *)lparg4); + } + } +fail: + if (arg4 && lparg4) (*env)->ReleaseIntArrayElements(env, arg4, lparg4, 0); + if (arg3 && lparg3) (*env)->ReleaseIntArrayElements(env, arg3, lparg3, 0); + if (arg2 && lparg2) (*env)->ReleaseIntArrayElements(env, arg2, lparg2, 0); + GDK_NATIVE_EXIT(env, that, _1gdk_1window_1get_1device_1position_FUNC); + return rc; +} +#endif + +#ifndef NO__1gdk_1window_1get_1display +JNIEXPORT jintLong JNICALL GDK_NATIVE(_1gdk_1window_1get_1display) + (JNIEnv *env, jclass that, jintLong arg0) +{ + jintLong rc = 0; + GDK_NATIVE_ENTER(env, that, _1gdk_1window_1get_1display_FUNC); +/* + rc = (jintLong)gdk_window_get_display((GdkWindow *)arg0); +*/ + { + GDK_LOAD_FUNCTION(fp, gdk_window_get_display) + if (fp) { + rc = (jintLong)((jintLong (CALLING_CONVENTION*)(GdkWindow *))fp)((GdkWindow *)arg0); + } + } + GDK_NATIVE_EXIT(env, that, _1gdk_1window_1get_1display_FUNC); + return rc; +} +#endif + +#ifndef NO__1gdk_1window_1get_1events +JNIEXPORT jint JNICALL GDK_NATIVE(_1gdk_1window_1get_1events) + (JNIEnv *env, jclass that, jintLong arg0) +{ + jint rc = 0; + GDK_NATIVE_ENTER(env, that, _1gdk_1window_1get_1events_FUNC); + rc = (jint)gdk_window_get_events((GdkWindow *)arg0); + GDK_NATIVE_EXIT(env, that, _1gdk_1window_1get_1events_FUNC); + return rc; +} +#endif + +#ifndef NO__1gdk_1window_1get_1frame_1extents +JNIEXPORT void JNICALL GDK_NATIVE(_1gdk_1window_1get_1frame_1extents) + (JNIEnv *env, jclass that, jintLong arg0, jobject arg1) +{ + GdkRectangle _arg1, *lparg1=NULL; + GDK_NATIVE_ENTER(env, that, _1gdk_1window_1get_1frame_1extents_FUNC); + if (arg1) if ((lparg1 = &_arg1) == NULL) goto fail; + gdk_window_get_frame_extents((GdkWindow *)arg0, (GdkRectangle *)lparg1); +fail: + if (arg1 && lparg1) setGdkRectangleFields(env, arg1, lparg1); + GDK_NATIVE_EXIT(env, that, _1gdk_1window_1get_1frame_1extents_FUNC); +} +#endif + +#ifndef NO__1gdk_1window_1get_1height +JNIEXPORT jint JNICALL GDK_NATIVE(_1gdk_1window_1get_1height) + (JNIEnv *env, jclass that, jintLong arg0) +{ + jint rc = 0; + GDK_NATIVE_ENTER(env, that, _1gdk_1window_1get_1height_FUNC); +/* + rc = (jint)gdk_window_get_height((GdkWindow *)arg0); +*/ + { + GDK_LOAD_FUNCTION(fp, gdk_window_get_height) + if (fp) { + rc = (jint)((jint (CALLING_CONVENTION*)(GdkWindow *))fp)((GdkWindow *)arg0); + } + } + GDK_NATIVE_EXIT(env, that, _1gdk_1window_1get_1height_FUNC); + return rc; +} +#endif + +#ifndef NO__1gdk_1window_1get_1internal_1paint_1info +JNIEXPORT void JNICALL GDK_NATIVE(_1gdk_1window_1get_1internal_1paint_1info) + (JNIEnv *env, jclass that, jintLong arg0, jintLongArray arg1, jintArray arg2, jintArray arg3) +{ + jintLong *lparg1=NULL; + jint *lparg2=NULL; + jint *lparg3=NULL; + GDK_NATIVE_ENTER(env, that, _1gdk_1window_1get_1internal_1paint_1info_FUNC); + if (arg1) if ((lparg1 = (*env)->GetIntLongArrayElements(env, arg1, NULL)) == NULL) goto fail; + if (arg2) if ((lparg2 = (*env)->GetIntArrayElements(env, arg2, NULL)) == NULL) goto fail; + if (arg3) if ((lparg3 = (*env)->GetIntArrayElements(env, arg3, NULL)) == NULL) goto fail; +/* + gdk_window_get_internal_paint_info((GdkWindow *)arg0, lparg1, (gint *)lparg2, (gint *)lparg3); +*/ + { + GDK_LOAD_FUNCTION(fp, gdk_window_get_internal_paint_info) + if (fp) { + ((void (CALLING_CONVENTION*)(GdkWindow *, jintLong *, gint *, gint *))fp)((GdkWindow *)arg0, lparg1, (gint *)lparg2, (gint *)lparg3); + } + } +fail: + if (arg3 && lparg3) (*env)->ReleaseIntArrayElements(env, arg3, lparg3, 0); + if (arg2 && lparg2) (*env)->ReleaseIntArrayElements(env, arg2, lparg2, 0); + if (arg1 && lparg1) (*env)->ReleaseIntLongArrayElements(env, arg1, lparg1, 0); + GDK_NATIVE_EXIT(env, that, _1gdk_1window_1get_1internal_1paint_1info_FUNC); +} +#endif + +#ifndef NO__1gdk_1window_1get_1origin +JNIEXPORT jint JNICALL GDK_NATIVE(_1gdk_1window_1get_1origin) + (JNIEnv *env, jclass that, jintLong arg0, jintArray arg1, jintArray arg2) +{ + jint *lparg1=NULL; + jint *lparg2=NULL; + jint rc = 0; + GDK_NATIVE_ENTER(env, that, _1gdk_1window_1get_1origin_FUNC); + if (arg1) if ((lparg1 = (*env)->GetIntArrayElements(env, arg1, NULL)) == NULL) goto fail; + if (arg2) if ((lparg2 = (*env)->GetIntArrayElements(env, arg2, NULL)) == NULL) goto fail; + rc = (jint)gdk_window_get_origin((GdkWindow *)arg0, (gint *)lparg1, (gint *)lparg2); +fail: + if (arg2 && lparg2) (*env)->ReleaseIntArrayElements(env, arg2, lparg2, 0); + if (arg1 && lparg1) (*env)->ReleaseIntArrayElements(env, arg1, lparg1, 0); + GDK_NATIVE_EXIT(env, that, _1gdk_1window_1get_1origin_FUNC); + return rc; +} +#endif + +#ifndef NO__1gdk_1window_1get_1parent +JNIEXPORT jintLong JNICALL GDK_NATIVE(_1gdk_1window_1get_1parent) + (JNIEnv *env, jclass that, jintLong arg0) +{ + jintLong rc = 0; + GDK_NATIVE_ENTER(env, that, _1gdk_1window_1get_1parent_FUNC); + rc = (jintLong)gdk_window_get_parent((GdkWindow *)arg0); + GDK_NATIVE_EXIT(env, that, _1gdk_1window_1get_1parent_FUNC); + return rc; +} +#endif + +#ifndef NO__1gdk_1window_1get_1pointer +JNIEXPORT jintLong JNICALL GDK_NATIVE(_1gdk_1window_1get_1pointer) + (JNIEnv *env, jclass that, jintLong arg0, jintArray arg1, jintArray arg2, jintArray arg3) +{ + jint *lparg1=NULL; + jint *lparg2=NULL; + jint *lparg3=NULL; + jintLong rc = 0; + GDK_NATIVE_ENTER(env, that, _1gdk_1window_1get_1pointer_FUNC); + if (arg1) if ((lparg1 = (*env)->GetIntArrayElements(env, arg1, NULL)) == NULL) goto fail; + if (arg2) if ((lparg2 = (*env)->GetIntArrayElements(env, arg2, NULL)) == NULL) goto fail; + if (arg3) if ((lparg3 = (*env)->GetIntArrayElements(env, arg3, NULL)) == NULL) goto fail; +/* + rc = (jintLong)gdk_window_get_pointer((GdkWindow *)arg0, (gint *)lparg1, (gint *)lparg2, (GdkModifierType *)lparg3); +*/ + { + GDK_LOAD_FUNCTION(fp, gdk_window_get_pointer) + if (fp) { + rc = (jintLong)((jintLong (CALLING_CONVENTION*)(GdkWindow *, gint *, gint *, GdkModifierType *))fp)((GdkWindow *)arg0, (gint *)lparg1, (gint *)lparg2, (GdkModifierType *)lparg3); + } + } +fail: + if (arg3 && lparg3) (*env)->ReleaseIntArrayElements(env, arg3, lparg3, 0); + if (arg2 && lparg2) (*env)->ReleaseIntArrayElements(env, arg2, lparg2, 0); + if (arg1 && lparg1) (*env)->ReleaseIntArrayElements(env, arg1, lparg1, 0); + GDK_NATIVE_EXIT(env, that, _1gdk_1window_1get_1pointer_FUNC); + return rc; +} +#endif + +#ifndef NO__1gdk_1window_1get_1position +JNIEXPORT void JNICALL GDK_NATIVE(_1gdk_1window_1get_1position) + (JNIEnv *env, jclass that, jintLong arg0, jintArray arg1, jintArray arg2) +{ + jint *lparg1=NULL; + jint *lparg2=NULL; + GDK_NATIVE_ENTER(env, that, _1gdk_1window_1get_1position_FUNC); + if (arg1) if ((lparg1 = (*env)->GetIntArrayElements(env, arg1, NULL)) == NULL) goto fail; + if (arg2) if ((lparg2 = (*env)->GetIntArrayElements(env, arg2, NULL)) == NULL) goto fail; + gdk_window_get_position((GdkWindow *)arg0, (gint *)lparg1, (gint *)lparg2); +fail: + if (arg2 && lparg2) (*env)->ReleaseIntArrayElements(env, arg2, lparg2, 0); + if (arg1 && lparg1) (*env)->ReleaseIntArrayElements(env, arg1, lparg1, 0); + GDK_NATIVE_EXIT(env, that, _1gdk_1window_1get_1position_FUNC); +} +#endif + +#ifndef NO__1gdk_1window_1get_1root_1origin +JNIEXPORT void JNICALL GDK_NATIVE(_1gdk_1window_1get_1root_1origin) + (JNIEnv *env, jclass that, jintLong arg0, jintArray arg1, jintArray arg2) +{ + jint *lparg1=NULL; + jint *lparg2=NULL; + GDK_NATIVE_ENTER(env, that, _1gdk_1window_1get_1root_1origin_FUNC); + if (arg1) if ((lparg1 = (*env)->GetIntArrayElements(env, arg1, NULL)) == NULL) goto fail; + if (arg2) if ((lparg2 = (*env)->GetIntArrayElements(env, arg2, NULL)) == NULL) goto fail; + gdk_window_get_root_origin((GdkWindow *)arg0, (gint *)lparg1, (gint *)lparg2); +fail: + if (arg2 && lparg2) (*env)->ReleaseIntArrayElements(env, arg2, lparg2, 0); + if (arg1 && lparg1) (*env)->ReleaseIntArrayElements(env, arg1, lparg1, 0); + GDK_NATIVE_EXIT(env, that, _1gdk_1window_1get_1root_1origin_FUNC); +} +#endif + +#ifndef NO__1gdk_1window_1get_1user_1data +JNIEXPORT void JNICALL GDK_NATIVE(_1gdk_1window_1get_1user_1data) + (JNIEnv *env, jclass that, jintLong arg0, jintLongArray arg1) +{ + jintLong *lparg1=NULL; + GDK_NATIVE_ENTER(env, that, _1gdk_1window_1get_1user_1data_FUNC); + if (arg1) if ((lparg1 = (*env)->GetIntLongArrayElements(env, arg1, NULL)) == NULL) goto fail; + gdk_window_get_user_data((GdkWindow *)arg0, (gpointer *)lparg1); +fail: + if (arg1 && lparg1) (*env)->ReleaseIntLongArrayElements(env, arg1, lparg1, 0); + GDK_NATIVE_EXIT(env, that, _1gdk_1window_1get_1user_1data_FUNC); +} +#endif + +#ifndef NO__1gdk_1window_1get_1visible_1region +JNIEXPORT jintLong JNICALL GDK_NATIVE(_1gdk_1window_1get_1visible_1region) + (JNIEnv *env, jclass that, jintLong arg0) +{ + jintLong rc = 0; + GDK_NATIVE_ENTER(env, that, _1gdk_1window_1get_1visible_1region_FUNC); +/* + rc = (jintLong)gdk_window_get_visible_region((GdkWindow *)arg0); +*/ + { + GDK_LOAD_FUNCTION(fp, gdk_window_get_visible_region) + if (fp) { + rc = (jintLong)((jintLong (CALLING_CONVENTION*)(GdkWindow *))fp)((GdkWindow *)arg0); + } + } + GDK_NATIVE_EXIT(env, that, _1gdk_1window_1get_1visible_1region_FUNC); + return rc; +} +#endif + +#ifndef NO__1gdk_1window_1get_1width +JNIEXPORT jint JNICALL GDK_NATIVE(_1gdk_1window_1get_1width) + (JNIEnv *env, jclass that, jintLong arg0) +{ + jint rc = 0; + GDK_NATIVE_ENTER(env, that, _1gdk_1window_1get_1width_FUNC); +/* + rc = (jint)gdk_window_get_width((GdkWindow *)arg0); +*/ + { + GDK_LOAD_FUNCTION(fp, gdk_window_get_width) + if (fp) { + rc = (jint)((jint (CALLING_CONVENTION*)(GdkWindow *))fp)((GdkWindow *)arg0); + } + } + GDK_NATIVE_EXIT(env, that, _1gdk_1window_1get_1width_FUNC); + return rc; +} +#endif + +#ifndef NO__1gdk_1window_1hide +JNIEXPORT void JNICALL GDK_NATIVE(_1gdk_1window_1hide) + (JNIEnv *env, jclass that, jintLong arg0) +{ + GDK_NATIVE_ENTER(env, that, _1gdk_1window_1hide_FUNC); + gdk_window_hide((GdkWindow *)arg0); + GDK_NATIVE_EXIT(env, that, _1gdk_1window_1hide_FUNC); +} +#endif + +#ifndef NO__1gdk_1window_1invalidate_1rect +JNIEXPORT void JNICALL GDK_NATIVE(_1gdk_1window_1invalidate_1rect) + (JNIEnv *env, jclass that, jintLong arg0, jobject arg1, jboolean arg2) +{ + GdkRectangle _arg1, *lparg1=NULL; + GDK_NATIVE_ENTER(env, that, _1gdk_1window_1invalidate_1rect_FUNC); + if (arg1) if ((lparg1 = getGdkRectangleFields(env, arg1, &_arg1)) == NULL) goto fail; + gdk_window_invalidate_rect((GdkWindow *)arg0, (GdkRectangle *)lparg1, (gboolean)arg2); +fail: + GDK_NATIVE_EXIT(env, that, _1gdk_1window_1invalidate_1rect_FUNC); +} +#endif + +#ifndef NO__1gdk_1window_1invalidate_1region +JNIEXPORT void JNICALL GDK_NATIVE(_1gdk_1window_1invalidate_1region) + (JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jboolean arg2) +{ + GDK_NATIVE_ENTER(env, that, _1gdk_1window_1invalidate_1region_FUNC); +/* + gdk_window_invalidate_region((GdkWindow *)arg0, arg1, (gboolean)arg2); +*/ + { + GDK_LOAD_FUNCTION(fp, gdk_window_invalidate_region) + if (fp) { + ((void (CALLING_CONVENTION*)(GdkWindow *, jintLong, gboolean))fp)((GdkWindow *)arg0, arg1, (gboolean)arg2); + } + } + GDK_NATIVE_EXIT(env, that, _1gdk_1window_1invalidate_1region_FUNC); +} +#endif + +#ifndef NO__1gdk_1window_1is_1visible +JNIEXPORT jboolean JNICALL GDK_NATIVE(_1gdk_1window_1is_1visible) + (JNIEnv *env, jclass that, jintLong arg0) +{ + jboolean rc = 0; + GDK_NATIVE_ENTER(env, that, _1gdk_1window_1is_1visible_FUNC); + rc = (jboolean)gdk_window_is_visible((GdkWindow *)arg0); + GDK_NATIVE_EXIT(env, that, _1gdk_1window_1is_1visible_FUNC); + return rc; +} +#endif + +#ifndef NO__1gdk_1window_1lower +JNIEXPORT void JNICALL GDK_NATIVE(_1gdk_1window_1lower) + (JNIEnv *env, jclass that, jintLong arg0) +{ + GDK_NATIVE_ENTER(env, that, _1gdk_1window_1lower_FUNC); + gdk_window_lower((GdkWindow *)arg0); + GDK_NATIVE_EXIT(env, that, _1gdk_1window_1lower_FUNC); +} +#endif + +#ifndef NO__1gdk_1window_1move +JNIEXPORT void JNICALL GDK_NATIVE(_1gdk_1window_1move) + (JNIEnv *env, jclass that, jintLong arg0, jint arg1, jint arg2) +{ + GDK_NATIVE_ENTER(env, that, _1gdk_1window_1move_FUNC); + gdk_window_move((GdkWindow *)arg0, arg1, arg2); + GDK_NATIVE_EXIT(env, that, _1gdk_1window_1move_FUNC); +} +#endif + +#ifndef NO__1gdk_1window_1move_1resize +JNIEXPORT void JNICALL GDK_NATIVE(_1gdk_1window_1move_1resize) + (JNIEnv *env, jclass that, jintLong arg0, jint arg1, jint arg2, jint arg3, jint arg4) +{ + GDK_NATIVE_ENTER(env, that, _1gdk_1window_1move_1resize_FUNC); + gdk_window_move_resize((GdkWindow *)arg0, arg1, arg2, arg3, arg4); + GDK_NATIVE_EXIT(env, that, _1gdk_1window_1move_1resize_FUNC); +} +#endif + +#ifndef NO__1gdk_1window_1new +JNIEXPORT jintLong JNICALL GDK_NATIVE(_1gdk_1window_1new) + (JNIEnv *env, jclass that, jintLong arg0, jobject arg1, jint arg2) +{ + GdkWindowAttr _arg1, *lparg1=NULL; + jintLong rc = 0; + GDK_NATIVE_ENTER(env, that, _1gdk_1window_1new_FUNC); + if (arg1) if ((lparg1 = getGdkWindowAttrFields(env, arg1, &_arg1)) == NULL) goto fail; + rc = (jintLong)gdk_window_new((GdkWindow *)arg0, lparg1, arg2); +fail: + GDK_NATIVE_EXIT(env, that, _1gdk_1window_1new_FUNC); + return rc; +} +#endif + +#ifndef NO__1gdk_1window_1process_1all_1updates +JNIEXPORT void JNICALL GDK_NATIVE(_1gdk_1window_1process_1all_1updates) + (JNIEnv *env, jclass that) +{ + GDK_NATIVE_ENTER(env, that, _1gdk_1window_1process_1all_1updates_FUNC); +/* + gdk_window_process_all_updates(); +*/ + { + GDK_LOAD_FUNCTION(fp, gdk_window_process_all_updates) + if (fp) { + ((void (CALLING_CONVENTION*)())fp)(); + } + } + GDK_NATIVE_EXIT(env, that, _1gdk_1window_1process_1all_1updates_FUNC); +} +#endif + +#ifndef NO__1gdk_1window_1process_1updates +JNIEXPORT void JNICALL GDK_NATIVE(_1gdk_1window_1process_1updates) + (JNIEnv *env, jclass that, jintLong arg0, jboolean arg1) +{ + GDK_NATIVE_ENTER(env, that, _1gdk_1window_1process_1updates_FUNC); +/* + gdk_window_process_updates((GdkWindow *)arg0, (gboolean)arg1); +*/ + { + GDK_LOAD_FUNCTION(fp, gdk_window_process_updates) + if (fp) { + ((void (CALLING_CONVENTION*)(GdkWindow *, gboolean))fp)((GdkWindow *)arg0, (gboolean)arg1); + } + } + GDK_NATIVE_EXIT(env, that, _1gdk_1window_1process_1updates_FUNC); +} +#endif + +#ifndef NO__1gdk_1window_1raise +JNIEXPORT void JNICALL GDK_NATIVE(_1gdk_1window_1raise) + (JNIEnv *env, jclass that, jintLong arg0) +{ + GDK_NATIVE_ENTER(env, that, _1gdk_1window_1raise_FUNC); + gdk_window_raise((GdkWindow *)arg0); + GDK_NATIVE_EXIT(env, that, _1gdk_1window_1raise_FUNC); +} +#endif + +#ifndef NO__1gdk_1window_1remove_1filter +JNIEXPORT void JNICALL GDK_NATIVE(_1gdk_1window_1remove_1filter) + (JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jintLong arg2) +{ + GDK_NATIVE_ENTER(env, that, _1gdk_1window_1remove_1filter_FUNC); + gdk_window_remove_filter((GdkWindow *)arg0, (GdkFilterFunc)arg1, (gpointer)arg2); + GDK_NATIVE_EXIT(env, that, _1gdk_1window_1remove_1filter_FUNC); +} +#endif + +#ifndef NO__1gdk_1window_1resize +JNIEXPORT void JNICALL GDK_NATIVE(_1gdk_1window_1resize) + (JNIEnv *env, jclass that, jintLong arg0, jint arg1, jint arg2) +{ + GDK_NATIVE_ENTER(env, that, _1gdk_1window_1resize_FUNC); + gdk_window_resize((GdkWindow *)arg0, arg1, arg2); + GDK_NATIVE_EXIT(env, that, _1gdk_1window_1resize_FUNC); +} +#endif + +#ifndef NO__1gdk_1window_1restack +JNIEXPORT void JNICALL GDK_NATIVE(_1gdk_1window_1restack) + (JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jboolean arg2) +{ + GDK_NATIVE_ENTER(env, that, _1gdk_1window_1restack_FUNC); +/* + gdk_window_restack((GdkWindow *)arg0, (GdkWindow *)arg1, (gboolean)arg2); +*/ + { + GDK_LOAD_FUNCTION(fp, gdk_window_restack) + if (fp) { + ((void (CALLING_CONVENTION*)(GdkWindow *, GdkWindow *, gboolean))fp)((GdkWindow *)arg0, (GdkWindow *)arg1, (gboolean)arg2); + } + } + GDK_NATIVE_EXIT(env, that, _1gdk_1window_1restack_FUNC); +} +#endif + +#ifndef NO__1gdk_1window_1set_1back_1pixmap +JNIEXPORT void JNICALL GDK_NATIVE(_1gdk_1window_1set_1back_1pixmap) + (JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jboolean arg2) +{ + GDK_NATIVE_ENTER(env, that, _1gdk_1window_1set_1back_1pixmap_FUNC); +/* + gdk_window_set_back_pixmap((GdkWindow *)arg0, arg1, (gboolean)arg2); +*/ + { + GDK_LOAD_FUNCTION(fp, gdk_window_set_back_pixmap) + if (fp) { + ((void (CALLING_CONVENTION*)(GdkWindow *, jintLong, gboolean))fp)((GdkWindow *)arg0, arg1, (gboolean)arg2); + } + } + GDK_NATIVE_EXIT(env, that, _1gdk_1window_1set_1back_1pixmap_FUNC); +} +#endif + +#ifndef NO__1gdk_1window_1set_1background_1pattern +JNIEXPORT void JNICALL GDK_NATIVE(_1gdk_1window_1set_1background_1pattern) + (JNIEnv *env, jclass that, jintLong arg0, jintLong arg1) +{ + GDK_NATIVE_ENTER(env, that, _1gdk_1window_1set_1background_1pattern_FUNC); +/* + gdk_window_set_background_pattern(arg0, arg1); +*/ + { + GDK_LOAD_FUNCTION(fp, gdk_window_set_background_pattern) + if (fp) { + ((void (CALLING_CONVENTION*)(jintLong, jintLong))fp)(arg0, arg1); + } + } + GDK_NATIVE_EXIT(env, that, _1gdk_1window_1set_1background_1pattern_FUNC); +} +#endif + +#ifndef NO__1gdk_1window_1set_1cursor +JNIEXPORT void JNICALL GDK_NATIVE(_1gdk_1window_1set_1cursor) + (JNIEnv *env, jclass that, jintLong arg0, jintLong arg1) +{ + GDK_NATIVE_ENTER(env, that, _1gdk_1window_1set_1cursor_FUNC); + gdk_window_set_cursor((GdkWindow *)arg0, (GdkCursor *)arg1); + GDK_NATIVE_EXIT(env, that, _1gdk_1window_1set_1cursor_FUNC); +} +#endif + +#ifndef NO__1gdk_1window_1set_1decorations +JNIEXPORT void JNICALL GDK_NATIVE(_1gdk_1window_1set_1decorations) + (JNIEnv *env, jclass that, jintLong arg0, jint arg1) +{ + GDK_NATIVE_ENTER(env, that, _1gdk_1window_1set_1decorations_FUNC); + gdk_window_set_decorations((GdkWindow *)arg0, (GdkWMDecoration)arg1); + GDK_NATIVE_EXIT(env, that, _1gdk_1window_1set_1decorations_FUNC); +} +#endif + +#ifndef NO__1gdk_1window_1set_1events +JNIEXPORT void JNICALL GDK_NATIVE(_1gdk_1window_1set_1events) + (JNIEnv *env, jclass that, jintLong arg0, jint arg1) +{ + GDK_NATIVE_ENTER(env, that, _1gdk_1window_1set_1events_FUNC); + gdk_window_set_events((GdkWindow *)arg0, arg1); + GDK_NATIVE_EXIT(env, that, _1gdk_1window_1set_1events_FUNC); +} +#endif + +#ifndef NO__1gdk_1window_1set_1functions +JNIEXPORT void JNICALL GDK_NATIVE(_1gdk_1window_1set_1functions) + (JNIEnv *env, jclass that, jintLong arg0, jint arg1) +{ + GDK_NATIVE_ENTER(env, that, _1gdk_1window_1set_1functions_FUNC); + gdk_window_set_functions((GdkWindow *)arg0, (GdkWMFunction)arg1); + GDK_NATIVE_EXIT(env, that, _1gdk_1window_1set_1functions_FUNC); +} +#endif + +#ifndef NO__1gdk_1window_1set_1override_1redirect +JNIEXPORT void JNICALL GDK_NATIVE(_1gdk_1window_1set_1override_1redirect) + (JNIEnv *env, jclass that, jintLong arg0, jboolean arg1) +{ + GDK_NATIVE_ENTER(env, that, _1gdk_1window_1set_1override_1redirect_FUNC); + gdk_window_set_override_redirect((GdkWindow *)arg0, (gboolean)arg1); + GDK_NATIVE_EXIT(env, that, _1gdk_1window_1set_1override_1redirect_FUNC); +} +#endif + +#ifndef NO__1gdk_1window_1set_1user_1data +JNIEXPORT void JNICALL GDK_NATIVE(_1gdk_1window_1set_1user_1data) + (JNIEnv *env, jclass that, jintLong arg0, jintLong arg1) +{ + GDK_NATIVE_ENTER(env, that, _1gdk_1window_1set_1user_1data_FUNC); + gdk_window_set_user_data((GdkWindow *)arg0, (gpointer)arg1); + GDK_NATIVE_EXIT(env, that, _1gdk_1window_1set_1user_1data_FUNC); +} +#endif + +#ifndef NO__1gdk_1window_1shape_1combine_1region +JNIEXPORT void JNICALL GDK_NATIVE(_1gdk_1window_1shape_1combine_1region) + (JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jint arg2, jint arg3) +{ + GDK_NATIVE_ENTER(env, that, _1gdk_1window_1shape_1combine_1region_FUNC); +/* + gdk_window_shape_combine_region((GdkWindow *)arg0, arg1, arg2, arg3); +*/ + { + GDK_LOAD_FUNCTION(fp, gdk_window_shape_combine_region) + if (fp) { + ((void (CALLING_CONVENTION*)(GdkWindow *, jintLong, jint, jint))fp)((GdkWindow *)arg0, arg1, arg2, arg3); + } + } + GDK_NATIVE_EXIT(env, that, _1gdk_1window_1shape_1combine_1region_FUNC); +} +#endif + +#ifndef NO__1gdk_1window_1show +JNIEXPORT void JNICALL GDK_NATIVE(_1gdk_1window_1show) + (JNIEnv *env, jclass that, jintLong arg0) +{ + GDK_NATIVE_ENTER(env, that, _1gdk_1window_1show_FUNC); + gdk_window_show((GdkWindow *)arg0); + GDK_NATIVE_EXIT(env, that, _1gdk_1window_1show_FUNC); +} +#endif + +#ifndef NO__1gdk_1window_1show_1unraised +JNIEXPORT void JNICALL GDK_NATIVE(_1gdk_1window_1show_1unraised) + (JNIEnv *env, jclass that, jintLong arg0) +{ + GDK_NATIVE_ENTER(env, that, _1gdk_1window_1show_1unraised_FUNC); + gdk_window_show_unraised((GdkWindow *)arg0); + GDK_NATIVE_EXIT(env, that, _1gdk_1window_1show_1unraised_FUNC); +} +#endif + +#ifndef NO__1gdk_1x11_1display_1get_1xdisplay +JNIEXPORT jintLong JNICALL GDK_NATIVE(_1gdk_1x11_1display_1get_1xdisplay) + (JNIEnv *env, jclass that, jintLong arg0) +{ + jintLong rc = 0; + GDK_NATIVE_ENTER(env, that, _1gdk_1x11_1display_1get_1xdisplay_FUNC); + rc = (jintLong)gdk_x11_display_get_xdisplay((GdkDisplay *)arg0); + GDK_NATIVE_EXIT(env, that, _1gdk_1x11_1display_1get_1xdisplay_FUNC); + return rc; +} +#endif + +#ifndef NO__1gdk_1x11_1display_1utf8_1to_1compound_1text +JNIEXPORT jboolean JNICALL GDK_NATIVE(_1gdk_1x11_1display_1utf8_1to_1compound_1text) + (JNIEnv *env, jclass that, jintLong arg0, jbyteArray arg1, jintLongArray arg2, jintArray arg3, jintLongArray arg4, jintArray arg5) +{ + jbyte *lparg1=NULL; + jintLong *lparg2=NULL; + jint *lparg3=NULL; + jintLong *lparg4=NULL; + jint *lparg5=NULL; + jboolean rc = 0; + GDK_NATIVE_ENTER(env, that, _1gdk_1x11_1display_1utf8_1to_1compound_1text_FUNC); + if (arg1) if ((lparg1 = (*env)->GetByteArrayElements(env, arg1, NULL)) == NULL) goto fail; + if (arg2) if ((lparg2 = (*env)->GetIntLongArrayElements(env, arg2, NULL)) == NULL) goto fail; + if (arg3) if ((lparg3 = (*env)->GetIntArrayElements(env, arg3, NULL)) == NULL) goto fail; + if (arg4) if ((lparg4 = (*env)->GetIntLongArrayElements(env, arg4, NULL)) == NULL) goto fail; + if (arg5) if ((lparg5 = (*env)->GetIntArrayElements(env, arg5, NULL)) == NULL) goto fail; +/* + rc = (jboolean)gdk_x11_display_utf8_to_compound_text((GdkDisplay *)arg0, lparg1, lparg2, lparg3, lparg4, lparg5); +*/ + { + GDK_LOAD_FUNCTION(fp, gdk_x11_display_utf8_to_compound_text) + if (fp) { + rc = (jboolean)((jboolean (CALLING_CONVENTION*)(GdkDisplay *, jbyte *, jintLong *, jint *, jintLong *, jint *))fp)((GdkDisplay *)arg0, lparg1, lparg2, lparg3, lparg4, lparg5); + } + } +fail: + if (arg5 && lparg5) (*env)->ReleaseIntArrayElements(env, arg5, lparg5, 0); + if (arg4 && lparg4) (*env)->ReleaseIntLongArrayElements(env, arg4, lparg4, 0); + if (arg3 && lparg3) (*env)->ReleaseIntArrayElements(env, arg3, lparg3, 0); + if (arg2 && lparg2) (*env)->ReleaseIntLongArrayElements(env, arg2, lparg2, 0); + if (arg1 && lparg1) (*env)->ReleaseByteArrayElements(env, arg1, lparg1, 0); + GDK_NATIVE_EXIT(env, that, _1gdk_1x11_1display_1utf8_1to_1compound_1text_FUNC); + return rc; +} +#endif + +#ifndef NO__1gdk_1x11_1drawable_1get_1xid +JNIEXPORT jintLong JNICALL GDK_NATIVE(_1gdk_1x11_1drawable_1get_1xid) + (JNIEnv *env, jclass that, jintLong arg0) +{ + jintLong rc = 0; + GDK_NATIVE_ENTER(env, that, _1gdk_1x11_1drawable_1get_1xid_FUNC); +/* + rc = (jintLong)gdk_x11_drawable_get_xid(arg0); +*/ + { + GDK_LOAD_FUNCTION(fp, gdk_x11_drawable_get_xid) + if (fp) { + rc = (jintLong)((jintLong (CALLING_CONVENTION*)(jintLong))fp)(arg0); + } + } + GDK_NATIVE_EXIT(env, that, _1gdk_1x11_1drawable_1get_1xid_FUNC); + return rc; +} +#endif + +#ifndef NO__1gdk_1x11_1get_1default_1xdisplay +JNIEXPORT jintLong JNICALL GDK_NATIVE(_1gdk_1x11_1get_1default_1xdisplay) + (JNIEnv *env, jclass that) +{ + jintLong rc = 0; + GDK_NATIVE_ENTER(env, that, _1gdk_1x11_1get_1default_1xdisplay_FUNC); + rc = (jintLong)gdk_x11_get_default_xdisplay(); + GDK_NATIVE_EXIT(env, that, _1gdk_1x11_1get_1default_1xdisplay_FUNC); + return rc; +} +#endif + +#ifndef NO__1gdk_1x11_1screen_1get_1window_1manager_1name +JNIEXPORT jintLong JNICALL GDK_NATIVE(_1gdk_1x11_1screen_1get_1window_1manager_1name) + (JNIEnv *env, jclass that, jintLong arg0) +{ + jintLong rc = 0; + GDK_NATIVE_ENTER(env, that, _1gdk_1x11_1screen_1get_1window_1manager_1name_FUNC); +/* + rc = (jintLong)gdk_x11_screen_get_window_manager_name((GdkScreen *)arg0); +*/ + { + GDK_LOAD_FUNCTION(fp, gdk_x11_screen_get_window_manager_name) + if (fp) { + rc = (jintLong)((jintLong (CALLING_CONVENTION*)(GdkScreen *))fp)((GdkScreen *)arg0); + } + } + GDK_NATIVE_EXIT(env, that, _1gdk_1x11_1screen_1get_1window_1manager_1name_FUNC); + return rc; +} +#endif + +#ifndef NO__1gdk_1x11_1screen_1lookup_1visual +JNIEXPORT jintLong JNICALL GDK_NATIVE(_1gdk_1x11_1screen_1lookup_1visual) + (JNIEnv *env, jclass that, jintLong arg0, jint arg1) +{ + jintLong rc = 0; + GDK_NATIVE_ENTER(env, that, _1gdk_1x11_1screen_1lookup_1visual_FUNC); +/* + rc = (jintLong)gdk_x11_screen_lookup_visual((GdkScreen *)arg0, (VisualID)arg1); +*/ + { + GDK_LOAD_FUNCTION(fp, gdk_x11_screen_lookup_visual) + if (fp) { + rc = (jintLong)((jintLong (CALLING_CONVENTION*)(GdkScreen *, VisualID))fp)((GdkScreen *)arg0, (VisualID)arg1); + } + } + GDK_NATIVE_EXIT(env, that, _1gdk_1x11_1screen_1lookup_1visual_FUNC); + return rc; +} +#endif + +#ifndef NO__1gdk_1x11_1visual_1get_1xvisual +JNIEXPORT jintLong JNICALL GDK_NATIVE(_1gdk_1x11_1visual_1get_1xvisual) + (JNIEnv *env, jclass that, jintLong arg0) +{ + jintLong rc = 0; + GDK_NATIVE_ENTER(env, that, _1gdk_1x11_1visual_1get_1xvisual_FUNC); + rc = (jintLong)gdk_x11_visual_get_xvisual((GdkVisual *)arg0); + GDK_NATIVE_EXIT(env, that, _1gdk_1x11_1visual_1get_1xvisual_FUNC); + return rc; +} +#endif + +#ifndef NO__1gdk_1x11_1window_1get_1xid +JNIEXPORT jintLong JNICALL GDK_NATIVE(_1gdk_1x11_1window_1get_1xid) + (JNIEnv *env, jclass that, jintLong arg0) +{ + jintLong rc = 0; + GDK_NATIVE_ENTER(env, that, _1gdk_1x11_1window_1get_1xid_FUNC); +/* + rc = (jintLong)gdk_x11_window_get_xid((GdkWindow *)arg0); +*/ + { + GDK_LOAD_FUNCTION(fp, gdk_x11_window_get_xid) + if (fp) { + rc = (jintLong)((jintLong (CALLING_CONVENTION*)(GdkWindow *))fp)((GdkWindow *)arg0); + } + } + GDK_NATIVE_EXIT(env, that, _1gdk_1x11_1window_1get_1xid_FUNC); + return rc; +} +#endif + +#ifndef NO__1gdk_1x11_1window_1lookup_1for_1display +JNIEXPORT jintLong JNICALL GDK_NATIVE(_1gdk_1x11_1window_1lookup_1for_1display) + (JNIEnv *env, jclass that, jintLong arg0, jintLong arg1) +{ + jintLong rc = 0; + GDK_NATIVE_ENTER(env, that, _1gdk_1x11_1window_1lookup_1for_1display_FUNC); +/* + rc = (jintLong)gdk_x11_window_lookup_for_display((GdkDisplay *)arg0, arg1); +*/ + { + GDK_LOAD_FUNCTION(fp, gdk_x11_window_lookup_for_display) + if (fp) { + rc = (jintLong)((jintLong (CALLING_CONVENTION*)(GdkDisplay *, jintLong))fp)((GdkDisplay *)arg0, arg1); + } + } + GDK_NATIVE_EXIT(env, that, _1gdk_1x11_1window_1lookup_1for_1display_FUNC); + return rc; +} +#endif + +#ifndef NO_gdk_1threads_1leave +JNIEXPORT void JNICALL GDK_NATIVE(gdk_1threads_1leave) + (JNIEnv *env, jclass that) +{ + GDK_NATIVE_ENTER(env, that, gdk_1threads_1leave_FUNC); + gdk_threads_leave(); + GDK_NATIVE_EXIT(env, that, gdk_1threads_1leave_FUNC); +} +#endif + #ifndef GTK_NATIVE #define GTK_NATIVE(func) Java_org_eclipse_swt_internal_gtk_GTK_##func #endif @@ -11132,42 +14758,6 @@ JNIEXPORT jlong JNICALL OS_NATIVE(Call__JJIJ)(JNIEnv *env, jclass that, jintLong } #endif -#ifndef NO_GDK_1EVENT_1TYPE -JNIEXPORT jint JNICALL OS_NATIVE(GDK_1EVENT_1TYPE) - (JNIEnv *env, jclass that, jintLong arg0) -{ - jint rc = 0; - OS_NATIVE_ENTER(env, that, GDK_1EVENT_1TYPE_FUNC); - rc = (jint)GDK_EVENT_TYPE((GdkEvent *)arg0); - OS_NATIVE_EXIT(env, that, GDK_1EVENT_1TYPE_FUNC); - return rc; -} -#endif - -#ifndef NO_GDK_1EVENT_1WINDOW -JNIEXPORT jintLong JNICALL OS_NATIVE(GDK_1EVENT_1WINDOW) - (JNIEnv *env, jclass that, jintLong arg0) -{ - jintLong rc = 0; - OS_NATIVE_ENTER(env, that, GDK_1EVENT_1WINDOW_FUNC); - rc = (jintLong)GDK_EVENT_WINDOW((GdkEventAny *)arg0); - OS_NATIVE_EXIT(env, that, GDK_1EVENT_1WINDOW_FUNC); - return rc; -} -#endif - -#ifndef NO_GDK_1IS_1X11_1DISPLAY -JNIEXPORT jboolean JNICALL OS_NATIVE(GDK_1IS_1X11_1DISPLAY) - (JNIEnv *env, jclass that, jintLong arg0) -{ - jboolean rc = 0; - OS_NATIVE_ENTER(env, that, GDK_1IS_1X11_1DISPLAY_FUNC); - rc = (jboolean)GDK_IS_X11_DISPLAY((GdkDisplay *)arg0); - OS_NATIVE_EXIT(env, that, GDK_1IS_1X11_1DISPLAY_FUNC); - return rc; -} -#endif - #ifndef NO_GInterfaceInfo_1sizeof JNIEXPORT jint JNICALL OS_NATIVE(GInterfaceInfo_1sizeof) (JNIEnv *env, jclass that) @@ -11310,210 +14900,6 @@ JNIEXPORT jintLong JNICALL OS_NATIVE(G_1VALUE_1TYPE) } #endif -#ifndef NO_GdkColor_1sizeof -JNIEXPORT jint JNICALL OS_NATIVE(GdkColor_1sizeof) - (JNIEnv *env, jclass that) -{ - jint rc = 0; - OS_NATIVE_ENTER(env, that, GdkColor_1sizeof_FUNC); - rc = (jint)GdkColor_sizeof(); - OS_NATIVE_EXIT(env, that, GdkColor_1sizeof_FUNC); - return rc; -} -#endif - -#ifndef NO_GdkDragContext_1sizeof -JNIEXPORT jint JNICALL OS_NATIVE(GdkDragContext_1sizeof) - (JNIEnv *env, jclass that) -{ - jint rc = 0; - OS_NATIVE_ENTER(env, that, GdkDragContext_1sizeof_FUNC); - rc = (jint)GdkDragContext_sizeof(); - OS_NATIVE_EXIT(env, that, GdkDragContext_1sizeof_FUNC); - return rc; -} -#endif - -#ifndef NO_GdkEventAny_1sizeof -JNIEXPORT jint JNICALL OS_NATIVE(GdkEventAny_1sizeof) - (JNIEnv *env, jclass that) -{ - jint rc = 0; - OS_NATIVE_ENTER(env, that, GdkEventAny_1sizeof_FUNC); - rc = (jint)GdkEventAny_sizeof(); - OS_NATIVE_EXIT(env, that, GdkEventAny_1sizeof_FUNC); - return rc; -} -#endif - -#ifndef NO_GdkEventButton_1sizeof -JNIEXPORT jint JNICALL OS_NATIVE(GdkEventButton_1sizeof) - (JNIEnv *env, jclass that) -{ - jint rc = 0; - OS_NATIVE_ENTER(env, that, GdkEventButton_1sizeof_FUNC); - rc = (jint)GdkEventButton_sizeof(); - OS_NATIVE_EXIT(env, that, GdkEventButton_1sizeof_FUNC); - return rc; -} -#endif - -#ifndef NO_GdkEventCrossing_1sizeof -JNIEXPORT jint JNICALL OS_NATIVE(GdkEventCrossing_1sizeof) - (JNIEnv *env, jclass that) -{ - jint rc = 0; - OS_NATIVE_ENTER(env, that, GdkEventCrossing_1sizeof_FUNC); - rc = (jint)GdkEventCrossing_sizeof(); - OS_NATIVE_EXIT(env, that, GdkEventCrossing_1sizeof_FUNC); - return rc; -} -#endif - -#ifndef NO_GdkEventExpose_1sizeof -JNIEXPORT jint JNICALL OS_NATIVE(GdkEventExpose_1sizeof) - (JNIEnv *env, jclass that) -{ - jint rc = 0; - OS_NATIVE_ENTER(env, that, GdkEventExpose_1sizeof_FUNC); - rc = (jint)GdkEventExpose_sizeof(); - OS_NATIVE_EXIT(env, that, GdkEventExpose_1sizeof_FUNC); - return rc; -} -#endif - -#ifndef NO_GdkEventFocus_1sizeof -JNIEXPORT jint JNICALL OS_NATIVE(GdkEventFocus_1sizeof) - (JNIEnv *env, jclass that) -{ - jint rc = 0; - OS_NATIVE_ENTER(env, that, GdkEventFocus_1sizeof_FUNC); - rc = (jint)GdkEventFocus_sizeof(); - OS_NATIVE_EXIT(env, that, GdkEventFocus_1sizeof_FUNC); - return rc; -} -#endif - -#ifndef NO_GdkEventKey_1sizeof -JNIEXPORT jint JNICALL OS_NATIVE(GdkEventKey_1sizeof) - (JNIEnv *env, jclass that) -{ - jint rc = 0; - OS_NATIVE_ENTER(env, that, GdkEventKey_1sizeof_FUNC); - rc = (jint)GdkEventKey_sizeof(); - OS_NATIVE_EXIT(env, that, GdkEventKey_1sizeof_FUNC); - return rc; -} -#endif - -#ifndef NO_GdkEventMotion_1sizeof -JNIEXPORT jint JNICALL OS_NATIVE(GdkEventMotion_1sizeof) - (JNIEnv *env, jclass that) -{ - jint rc = 0; - OS_NATIVE_ENTER(env, that, GdkEventMotion_1sizeof_FUNC); - rc = (jint)GdkEventMotion_sizeof(); - OS_NATIVE_EXIT(env, that, GdkEventMotion_1sizeof_FUNC); - return rc; -} -#endif - -#ifndef NO_GdkEventScroll_1sizeof -JNIEXPORT jint JNICALL OS_NATIVE(GdkEventScroll_1sizeof) - (JNIEnv *env, jclass that) -{ - jint rc = 0; - OS_NATIVE_ENTER(env, that, GdkEventScroll_1sizeof_FUNC); - rc = (jint)GdkEventScroll_sizeof(); - OS_NATIVE_EXIT(env, that, GdkEventScroll_1sizeof_FUNC); - return rc; -} -#endif - -#ifndef NO_GdkEventWindowState_1sizeof -JNIEXPORT jint JNICALL OS_NATIVE(GdkEventWindowState_1sizeof) - (JNIEnv *env, jclass that) -{ - jint rc = 0; - OS_NATIVE_ENTER(env, that, GdkEventWindowState_1sizeof_FUNC); - rc = (jint)GdkEventWindowState_sizeof(); - OS_NATIVE_EXIT(env, that, GdkEventWindowState_1sizeof_FUNC); - return rc; -} -#endif - -#ifndef NO_GdkEvent_1sizeof -JNIEXPORT jint JNICALL OS_NATIVE(GdkEvent_1sizeof) - (JNIEnv *env, jclass that) -{ - jint rc = 0; - OS_NATIVE_ENTER(env, that, GdkEvent_1sizeof_FUNC); - rc = (jint)GdkEvent_sizeof(); - OS_NATIVE_EXIT(env, that, GdkEvent_1sizeof_FUNC); - return rc; -} -#endif - -#ifndef NO_GdkGeometry_1sizeof -JNIEXPORT jint JNICALL OS_NATIVE(GdkGeometry_1sizeof) - (JNIEnv *env, jclass that) -{ - jint rc = 0; - OS_NATIVE_ENTER(env, that, GdkGeometry_1sizeof_FUNC); - rc = (jint)GdkGeometry_sizeof(); - OS_NATIVE_EXIT(env, that, GdkGeometry_1sizeof_FUNC); - return rc; -} -#endif - -#ifndef NO_GdkKeymapKey_1sizeof -JNIEXPORT jint JNICALL OS_NATIVE(GdkKeymapKey_1sizeof) - (JNIEnv *env, jclass that) -{ - jint rc = 0; - OS_NATIVE_ENTER(env, that, GdkKeymapKey_1sizeof_FUNC); - rc = (jint)GdkKeymapKey_sizeof(); - OS_NATIVE_EXIT(env, that, GdkKeymapKey_1sizeof_FUNC); - return rc; -} -#endif - -#ifndef NO_GdkRGBA_1sizeof -JNIEXPORT jint JNICALL OS_NATIVE(GdkRGBA_1sizeof) - (JNIEnv *env, jclass that) -{ - jint rc = 0; - OS_NATIVE_ENTER(env, that, GdkRGBA_1sizeof_FUNC); - rc = (jint)GdkRGBA_sizeof(); - OS_NATIVE_EXIT(env, that, GdkRGBA_1sizeof_FUNC); - return rc; -} -#endif - -#ifndef NO_GdkRectangle_1sizeof -JNIEXPORT jint JNICALL OS_NATIVE(GdkRectangle_1sizeof) - (JNIEnv *env, jclass that) -{ - jint rc = 0; - OS_NATIVE_ENTER(env, that, GdkRectangle_1sizeof_FUNC); - rc = (jint)GdkRectangle_sizeof(); - OS_NATIVE_EXIT(env, that, GdkRectangle_1sizeof_FUNC); - return rc; -} -#endif - -#ifndef NO_GdkWindowAttr_1sizeof -JNIEXPORT jint JNICALL OS_NATIVE(GdkWindowAttr_1sizeof) - (JNIEnv *env, jclass that) -{ - jint rc = 0; - OS_NATIVE_ENTER(env, that, GdkWindowAttr_1sizeof_FUNC); - rc = (jint)GdkWindowAttr_sizeof(); - OS_NATIVE_EXIT(env, that, GdkWindowAttr_1sizeof_FUNC); - return rc; -} -#endif - #ifndef NO_PangoAttrColor_1sizeof JNIEXPORT jint JNICALL OS_NATIVE(PangoAttrColor_1sizeof) (JNIEnv *env, jclass that) @@ -11754,54 +15140,6 @@ fail: } #endif -#ifndef NO__1GDK_1PIXMAP_1XID -JNIEXPORT jintLong JNICALL OS_NATIVE(_1GDK_1PIXMAP_1XID) - (JNIEnv *env, jclass that, jintLong arg0) -{ - jintLong rc = 0; - OS_NATIVE_ENTER(env, that, _1GDK_1PIXMAP_1XID_FUNC); - rc = (jintLong)GDK_PIXMAP_XID((GdkPixmap *)arg0); - OS_NATIVE_EXIT(env, that, _1GDK_1PIXMAP_1XID_FUNC); - return rc; -} -#endif - -#ifndef NO__1GDK_1TYPE_1COLOR -JNIEXPORT jintLong JNICALL OS_NATIVE(_1GDK_1TYPE_1COLOR) - (JNIEnv *env, jclass that) -{ - jintLong rc = 0; - OS_NATIVE_ENTER(env, that, _1GDK_1TYPE_1COLOR_FUNC); - rc = (jintLong)GDK_TYPE_COLOR; - OS_NATIVE_EXIT(env, that, _1GDK_1TYPE_1COLOR_FUNC); - return rc; -} -#endif - -#ifndef NO__1GDK_1TYPE_1PIXBUF -JNIEXPORT jintLong JNICALL OS_NATIVE(_1GDK_1TYPE_1PIXBUF) - (JNIEnv *env, jclass that) -{ - jintLong rc = 0; - OS_NATIVE_ENTER(env, that, _1GDK_1TYPE_1PIXBUF_FUNC); - rc = (jintLong)GDK_TYPE_PIXBUF; - OS_NATIVE_EXIT(env, that, _1GDK_1TYPE_1PIXBUF_FUNC); - return rc; -} -#endif - -#ifndef NO__1GDK_1TYPE_1RGBA -JNIEXPORT jintLong JNICALL OS_NATIVE(_1GDK_1TYPE_1RGBA) - (JNIEnv *env, jclass that) -{ - jintLong rc = 0; - OS_NATIVE_ENTER(env, that, _1GDK_1TYPE_1RGBA_FUNC); - rc = (jintLong)GDK_TYPE_RGBA; - OS_NATIVE_EXIT(env, that, _1GDK_1TYPE_1RGBA_FUNC); - return rc; -} -#endif - #ifndef NO__1GString_1len JNIEXPORT jint JNICALL OS_NATIVE(_1GString_1len) (JNIEnv *env, jclass that, jintLong arg0) @@ -14506,3330 +17844,6 @@ fail: } #endif -#ifndef NO__1gdk_1atom_1intern -JNIEXPORT jintLong JNICALL OS_NATIVE(_1gdk_1atom_1intern) - (JNIEnv *env, jclass that, jbyteArray arg0, jboolean arg1) -{ - jbyte *lparg0=NULL; - jintLong rc = 0; - OS_NATIVE_ENTER(env, that, _1gdk_1atom_1intern_FUNC); - if (arg0) if ((lparg0 = (*env)->GetPrimitiveArrayCritical(env, arg0, NULL)) == NULL) goto fail; - rc = (jintLong)gdk_atom_intern((const gchar *)lparg0, arg1); -fail: - if (arg0 && lparg0) (*env)->ReleasePrimitiveArrayCritical(env, arg0, lparg0, JNI_ABORT); - OS_NATIVE_EXIT(env, that, _1gdk_1atom_1intern_FUNC); - return rc; -} -#endif - -#ifndef NO__1gdk_1atom_1name -JNIEXPORT jintLong JNICALL OS_NATIVE(_1gdk_1atom_1name) - (JNIEnv *env, jclass that, jintLong arg0) -{ - jintLong rc = 0; - OS_NATIVE_ENTER(env, that, _1gdk_1atom_1name_FUNC); - rc = (jintLong)gdk_atom_name((GdkAtom)arg0); - OS_NATIVE_EXIT(env, that, _1gdk_1atom_1name_FUNC); - return rc; -} -#endif - -#ifndef NO__1gdk_1beep -JNIEXPORT void JNICALL OS_NATIVE(_1gdk_1beep) - (JNIEnv *env, jclass that) -{ - OS_NATIVE_ENTER(env, that, _1gdk_1beep_FUNC); - gdk_beep(); - OS_NATIVE_EXIT(env, that, _1gdk_1beep_FUNC); -} -#endif - -#ifndef NO__1gdk_1bitmap_1create_1from_1data -JNIEXPORT jintLong JNICALL OS_NATIVE(_1gdk_1bitmap_1create_1from_1data) - (JNIEnv *env, jclass that, jintLong arg0, jbyteArray arg1, jint arg2, jint arg3) -{ - jbyte *lparg1=NULL; - jintLong rc = 0; - OS_NATIVE_ENTER(env, that, _1gdk_1bitmap_1create_1from_1data_FUNC); - if (arg1) if ((lparg1 = (*env)->GetPrimitiveArrayCritical(env, arg1, NULL)) == NULL) goto fail; -/* - rc = (jintLong)gdk_bitmap_create_from_data((GdkWindow *)arg0, (const gchar *)lparg1, (gint)arg2, (gint)arg3); -*/ - { - OS_LOAD_FUNCTION(fp, gdk_bitmap_create_from_data) - if (fp) { - rc = (jintLong)((jintLong (CALLING_CONVENTION*)(GdkWindow *, const gchar *, gint, gint))fp)((GdkWindow *)arg0, (const gchar *)lparg1, (gint)arg2, (gint)arg3); - } - } -fail: - if (arg1 && lparg1) (*env)->ReleasePrimitiveArrayCritical(env, arg1, lparg1, JNI_ABORT); - OS_NATIVE_EXIT(env, that, _1gdk_1bitmap_1create_1from_1data_FUNC); - return rc; -} -#endif - -#ifndef NO__1gdk_1cairo_1create -JNIEXPORT jintLong JNICALL OS_NATIVE(_1gdk_1cairo_1create) - (JNIEnv *env, jclass that, jintLong arg0) -{ - jintLong rc = 0; - OS_NATIVE_ENTER(env, that, _1gdk_1cairo_1create_FUNC); -/* - rc = (jintLong)gdk_cairo_create(arg0); -*/ - { - OS_LOAD_FUNCTION(fp, gdk_cairo_create) - if (fp) { - rc = (jintLong)((jintLong (CALLING_CONVENTION*)(jintLong))fp)(arg0); - } - } - OS_NATIVE_EXIT(env, that, _1gdk_1cairo_1create_FUNC); - return rc; -} -#endif - -#ifndef NO__1gdk_1cairo_1get_1clip_1rectangle -JNIEXPORT jboolean JNICALL OS_NATIVE(_1gdk_1cairo_1get_1clip_1rectangle) - (JNIEnv *env, jclass that, jintLong arg0, jobject arg1) -{ - GdkRectangle _arg1, *lparg1=NULL; - jboolean rc = 0; - OS_NATIVE_ENTER(env, that, _1gdk_1cairo_1get_1clip_1rectangle_FUNC); - if (arg1) if ((lparg1 = getGdkRectangleFields(env, arg1, &_arg1)) == NULL) goto fail; -/* - rc = (jboolean)gdk_cairo_get_clip_rectangle(arg0, lparg1); -*/ - { - OS_LOAD_FUNCTION(fp, gdk_cairo_get_clip_rectangle) - if (fp) { - rc = (jboolean)((jboolean (CALLING_CONVENTION*)(jintLong, GdkRectangle *))fp)(arg0, lparg1); - } - } -fail: - if (arg1 && lparg1) setGdkRectangleFields(env, arg1, lparg1); - OS_NATIVE_EXIT(env, that, _1gdk_1cairo_1get_1clip_1rectangle_FUNC); - return rc; -} -#endif - -#ifndef NO__1gdk_1cairo_1region -JNIEXPORT void JNICALL OS_NATIVE(_1gdk_1cairo_1region) - (JNIEnv *env, jclass that, jintLong arg0, jintLong arg1) -{ - OS_NATIVE_ENTER(env, that, _1gdk_1cairo_1region_FUNC); -/* - gdk_cairo_region(arg0, arg1); -*/ - { - OS_LOAD_FUNCTION(fp, gdk_cairo_region) - if (fp) { - ((void (CALLING_CONVENTION*)(jintLong, jintLong))fp)(arg0, arg1); - } - } - OS_NATIVE_EXIT(env, that, _1gdk_1cairo_1region_FUNC); -} -#endif - -#ifndef NO__1gdk_1cairo_1region_1create_1from_1surface -JNIEXPORT jintLong JNICALL OS_NATIVE(_1gdk_1cairo_1region_1create_1from_1surface) - (JNIEnv *env, jclass that, jintLong arg0) -{ - jintLong rc = 0; - OS_NATIVE_ENTER(env, that, _1gdk_1cairo_1region_1create_1from_1surface_FUNC); -/* - rc = (jintLong)gdk_cairo_region_create_from_surface(arg0); -*/ - { - OS_LOAD_FUNCTION(fp, gdk_cairo_region_create_from_surface) - if (fp) { - rc = (jintLong)((jintLong (CALLING_CONVENTION*)(jintLong))fp)(arg0); - } - } - OS_NATIVE_EXIT(env, that, _1gdk_1cairo_1region_1create_1from_1surface_FUNC); - return rc; -} -#endif - -#ifndef NO__1gdk_1cairo_1reset_1clip -JNIEXPORT void JNICALL OS_NATIVE(_1gdk_1cairo_1reset_1clip) - (JNIEnv *env, jclass that, jintLong arg0, jintLong arg1) -{ - OS_NATIVE_ENTER(env, that, _1gdk_1cairo_1reset_1clip_FUNC); -/* - gdk_cairo_reset_clip(arg0, arg1); -*/ - { - OS_LOAD_FUNCTION(fp, gdk_cairo_reset_clip) - if (fp) { - ((void (CALLING_CONVENTION*)(jintLong, jintLong))fp)(arg0, arg1); - } - } - OS_NATIVE_EXIT(env, that, _1gdk_1cairo_1reset_1clip_FUNC); -} -#endif - -#ifndef NO__1gdk_1cairo_1set_1source_1color -JNIEXPORT void JNICALL OS_NATIVE(_1gdk_1cairo_1set_1source_1color) - (JNIEnv *env, jclass that, jintLong arg0, jobject arg1) -{ - GdkColor _arg1, *lparg1=NULL; - OS_NATIVE_ENTER(env, that, _1gdk_1cairo_1set_1source_1color_FUNC); - if (arg1) if ((lparg1 = getGdkColorFields(env, arg1, &_arg1)) == NULL) goto fail; -/* - gdk_cairo_set_source_color(arg0, lparg1); -*/ - { - OS_LOAD_FUNCTION(fp, gdk_cairo_set_source_color) - if (fp) { - ((void (CALLING_CONVENTION*)(jintLong, GdkColor *))fp)(arg0, lparg1); - } - } -fail: - if (arg1 && lparg1) setGdkColorFields(env, arg1, lparg1); - OS_NATIVE_EXIT(env, that, _1gdk_1cairo_1set_1source_1color_FUNC); -} -#endif - -#ifndef NO__1gdk_1cairo_1set_1source_1pixbuf -JNIEXPORT void JNICALL OS_NATIVE(_1gdk_1cairo_1set_1source_1pixbuf) - (JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jdouble arg2, jdouble arg3) -{ - OS_NATIVE_ENTER(env, that, _1gdk_1cairo_1set_1source_1pixbuf_FUNC); -/* - gdk_cairo_set_source_pixbuf(arg0, (const GdkPixbuf *)arg1, arg2, arg3); -*/ - { - OS_LOAD_FUNCTION(fp, gdk_cairo_set_source_pixbuf) - if (fp) { - ((void (CALLING_CONVENTION*)(jintLong, const GdkPixbuf *, jdouble, jdouble))fp)(arg0, (const GdkPixbuf *)arg1, arg2, arg3); - } - } - OS_NATIVE_EXIT(env, that, _1gdk_1cairo_1set_1source_1pixbuf_FUNC); -} -#endif - -#ifndef NO__1gdk_1cairo_1set_1source_1pixmap -JNIEXPORT void JNICALL OS_NATIVE(_1gdk_1cairo_1set_1source_1pixmap) - (JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jdouble arg2, jdouble arg3) -{ - OS_NATIVE_ENTER(env, that, _1gdk_1cairo_1set_1source_1pixmap_FUNC); -/* - gdk_cairo_set_source_pixmap(arg0, arg1, arg2, arg3); -*/ - { - OS_LOAD_FUNCTION(fp, gdk_cairo_set_source_pixmap) - if (fp) { - ((void (CALLING_CONVENTION*)(jintLong, jintLong, jdouble, jdouble))fp)(arg0, arg1, arg2, arg3); - } - } - OS_NATIVE_EXIT(env, that, _1gdk_1cairo_1set_1source_1pixmap_FUNC); -} -#endif - -#ifndef NO__1gdk_1cairo_1set_1source_1rgba -JNIEXPORT void JNICALL OS_NATIVE(_1gdk_1cairo_1set_1source_1rgba) - (JNIEnv *env, jclass that, jintLong arg0, jobject arg1) -{ - GdkRGBA _arg1, *lparg1=NULL; - OS_NATIVE_ENTER(env, that, _1gdk_1cairo_1set_1source_1rgba_FUNC); - if (arg1) if ((lparg1 = getGdkRGBAFields(env, arg1, &_arg1)) == NULL) goto fail; -/* - gdk_cairo_set_source_rgba(arg0, lparg1); -*/ - { - OS_LOAD_FUNCTION(fp, gdk_cairo_set_source_rgba) - if (fp) { - ((void (CALLING_CONVENTION*)(jintLong, GdkRGBA *))fp)(arg0, lparg1); - } - } -fail: - if (arg1 && lparg1) setGdkRGBAFields(env, arg1, lparg1); - OS_NATIVE_EXIT(env, that, _1gdk_1cairo_1set_1source_1rgba_FUNC); -} -#endif - -#ifndef NO__1gdk_1cairo_1set_1source_1window -JNIEXPORT void JNICALL OS_NATIVE(_1gdk_1cairo_1set_1source_1window) - (JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jint arg2, jint arg3) -{ - OS_NATIVE_ENTER(env, that, _1gdk_1cairo_1set_1source_1window_FUNC); -/* - gdk_cairo_set_source_window(arg0, (GdkWindow *)arg1, arg2, arg3); -*/ - { - OS_LOAD_FUNCTION(fp, gdk_cairo_set_source_window) - if (fp) { - ((void (CALLING_CONVENTION*)(jintLong, GdkWindow *, jint, jint))fp)(arg0, (GdkWindow *)arg1, arg2, arg3); - } - } - OS_NATIVE_EXIT(env, that, _1gdk_1cairo_1set_1source_1window_FUNC); -} -#endif - -#ifndef NO__1gdk_1color_1free -JNIEXPORT void JNICALL OS_NATIVE(_1gdk_1color_1free) - (JNIEnv *env, jclass that, jintLong arg0) -{ - OS_NATIVE_ENTER(env, that, _1gdk_1color_1free_FUNC); -/* - gdk_color_free((GdkColor *)arg0); -*/ - { - OS_LOAD_FUNCTION(fp, gdk_color_free) - if (fp) { - ((void (CALLING_CONVENTION*)(GdkColor *))fp)((GdkColor *)arg0); - } - } - OS_NATIVE_EXIT(env, that, _1gdk_1color_1free_FUNC); -} -#endif - -#ifndef NO__1gdk_1color_1parse -JNIEXPORT jboolean JNICALL OS_NATIVE(_1gdk_1color_1parse) - (JNIEnv *env, jclass that, jbyteArray arg0, jobject arg1) -{ - jbyte *lparg0=NULL; - GdkColor _arg1, *lparg1=NULL; - jboolean rc = 0; - OS_NATIVE_ENTER(env, that, _1gdk_1color_1parse_FUNC); - if (arg0) if ((lparg0 = (*env)->GetByteArrayElements(env, arg0, NULL)) == NULL) goto fail; - if (arg1) if ((lparg1 = &_arg1) == NULL) goto fail; -/* - rc = (jboolean)gdk_color_parse((const gchar *)lparg0, (GdkColor *)lparg1); -*/ - { - OS_LOAD_FUNCTION(fp, gdk_color_parse) - if (fp) { - rc = (jboolean)((jboolean (CALLING_CONVENTION*)(const gchar *, GdkColor *))fp)((const gchar *)lparg0, (GdkColor *)lparg1); - } - } -fail: - if (arg1 && lparg1) setGdkColorFields(env, arg1, lparg1); - if (arg0 && lparg0) (*env)->ReleaseByteArrayElements(env, arg0, lparg0, 0); - OS_NATIVE_EXIT(env, that, _1gdk_1color_1parse_FUNC); - return rc; -} -#endif - -#ifndef NO__1gdk_1color_1white -JNIEXPORT jboolean JNICALL OS_NATIVE(_1gdk_1color_1white) - (JNIEnv *env, jclass that, jintLong arg0, jobject arg1) -{ - GdkColor _arg1, *lparg1=NULL; - jboolean rc = 0; - OS_NATIVE_ENTER(env, that, _1gdk_1color_1white_FUNC); - if (arg1) if ((lparg1 = &_arg1) == NULL) goto fail; -/* - rc = (jboolean)gdk_color_white(arg0, lparg1); -*/ - { - OS_LOAD_FUNCTION(fp, gdk_color_white) - if (fp) { - rc = (jboolean)((jboolean (CALLING_CONVENTION*)(jintLong, GdkColor *))fp)(arg0, lparg1); - } - } -fail: - if (arg1 && lparg1) setGdkColorFields(env, arg1, lparg1); - OS_NATIVE_EXIT(env, that, _1gdk_1color_1white_FUNC); - return rc; -} -#endif - -#ifndef NO__1gdk_1colormap_1alloc_1color -JNIEXPORT jboolean JNICALL OS_NATIVE(_1gdk_1colormap_1alloc_1color) - (JNIEnv *env, jclass that, jintLong arg0, jobject arg1, jboolean arg2, jboolean arg3) -{ - GdkColor _arg1, *lparg1=NULL; - jboolean rc = 0; - OS_NATIVE_ENTER(env, that, _1gdk_1colormap_1alloc_1color_FUNC); - if (arg1) if ((lparg1 = getGdkColorFields(env, arg1, &_arg1)) == NULL) goto fail; -/* - rc = (jboolean)gdk_colormap_alloc_color(arg0, (GdkColor *)lparg1, (gboolean)arg2, (gboolean)arg3); -*/ - { - OS_LOAD_FUNCTION(fp, gdk_colormap_alloc_color) - if (fp) { - rc = (jboolean)((jboolean (CALLING_CONVENTION*)(jintLong, GdkColor *, gboolean, gboolean))fp)(arg0, (GdkColor *)lparg1, (gboolean)arg2, (gboolean)arg3); - } - } -fail: - if (arg1 && lparg1) setGdkColorFields(env, arg1, lparg1); - OS_NATIVE_EXIT(env, that, _1gdk_1colormap_1alloc_1color_FUNC); - return rc; -} -#endif - -#ifndef NO__1gdk_1colormap_1free_1colors -JNIEXPORT void JNICALL OS_NATIVE(_1gdk_1colormap_1free_1colors) - (JNIEnv *env, jclass that, jintLong arg0, jobject arg1, jint arg2) -{ - GdkColor _arg1, *lparg1=NULL; - OS_NATIVE_ENTER(env, that, _1gdk_1colormap_1free_1colors_FUNC); - if (arg1) if ((lparg1 = getGdkColorFields(env, arg1, &_arg1)) == NULL) goto fail; -/* - gdk_colormap_free_colors(arg0, (GdkColor *)lparg1, (gint)arg2); -*/ - { - OS_LOAD_FUNCTION(fp, gdk_colormap_free_colors) - if (fp) { - ((void (CALLING_CONVENTION*)(jintLong, GdkColor *, gint))fp)(arg0, (GdkColor *)lparg1, (gint)arg2); - } - } -fail: - OS_NATIVE_EXIT(env, that, _1gdk_1colormap_1free_1colors_FUNC); -} -#endif - -#ifndef NO__1gdk_1colormap_1get_1system -JNIEXPORT jintLong JNICALL OS_NATIVE(_1gdk_1colormap_1get_1system) - (JNIEnv *env, jclass that) -{ - jintLong rc = 0; - OS_NATIVE_ENTER(env, that, _1gdk_1colormap_1get_1system_FUNC); -/* - rc = (jintLong)gdk_colormap_get_system(); -*/ - { - OS_LOAD_FUNCTION(fp, gdk_colormap_get_system) - if (fp) { - rc = (jintLong)((jintLong (CALLING_CONVENTION*)())fp)(); - } - } - OS_NATIVE_EXIT(env, that, _1gdk_1colormap_1get_1system_FUNC); - return rc; -} -#endif - -#ifndef NO__1gdk_1cursor_1new_1for_1display -JNIEXPORT jintLong JNICALL OS_NATIVE(_1gdk_1cursor_1new_1for_1display) - (JNIEnv *env, jclass that, jintLong arg0, jintLong arg1) -{ - jintLong rc = 0; - OS_NATIVE_ENTER(env, that, _1gdk_1cursor_1new_1for_1display_FUNC); - rc = (jintLong)gdk_cursor_new_for_display((GdkDisplay *)arg0, (GdkCursorType)arg1); - OS_NATIVE_EXIT(env, that, _1gdk_1cursor_1new_1for_1display_FUNC); - return rc; -} -#endif - -#ifndef NO__1gdk_1cursor_1new_1from_1name -JNIEXPORT jintLong JNICALL OS_NATIVE(_1gdk_1cursor_1new_1from_1name) - (JNIEnv *env, jclass that, jintLong arg0, jbyteArray arg1) -{ - jbyte *lparg1=NULL; - jintLong rc = 0; - OS_NATIVE_ENTER(env, that, _1gdk_1cursor_1new_1from_1name_FUNC); - if (arg1) if ((lparg1 = (*env)->GetByteArrayElements(env, arg1, NULL)) == NULL) goto fail; - rc = (jintLong)gdk_cursor_new_from_name((GdkDisplay *)arg0, (const gchar *)lparg1); -fail: - if (arg1 && lparg1) (*env)->ReleaseByteArrayElements(env, arg1, lparg1, 0); - OS_NATIVE_EXIT(env, that, _1gdk_1cursor_1new_1from_1name_FUNC); - return rc; -} -#endif - -#ifndef NO__1gdk_1cursor_1new_1from_1pixbuf -JNIEXPORT jintLong JNICALL OS_NATIVE(_1gdk_1cursor_1new_1from_1pixbuf) - (JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jint arg2, jint arg3) -{ - jintLong rc = 0; - OS_NATIVE_ENTER(env, that, _1gdk_1cursor_1new_1from_1pixbuf_FUNC); -/* - rc = (jintLong)gdk_cursor_new_from_pixbuf(arg0, arg1, arg2, arg3); -*/ - { - OS_LOAD_FUNCTION(fp, gdk_cursor_new_from_pixbuf) - if (fp) { - rc = (jintLong)((jintLong (CALLING_CONVENTION*)(jintLong, jintLong, jint, jint))fp)(arg0, arg1, arg2, arg3); - } - } - OS_NATIVE_EXIT(env, that, _1gdk_1cursor_1new_1from_1pixbuf_FUNC); - return rc; -} -#endif - -#ifndef NO__1gdk_1cursor_1new_1from_1pixmap -JNIEXPORT jintLong JNICALL OS_NATIVE(_1gdk_1cursor_1new_1from_1pixmap) - (JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jobject arg2, jobject arg3, jint arg4, jint arg5) -{ - GdkColor _arg2, *lparg2=NULL; - GdkColor _arg3, *lparg3=NULL; - jintLong rc = 0; - OS_NATIVE_ENTER(env, that, _1gdk_1cursor_1new_1from_1pixmap_FUNC); - if (arg2) if ((lparg2 = getGdkColorFields(env, arg2, &_arg2)) == NULL) goto fail; - if (arg3) if ((lparg3 = getGdkColorFields(env, arg3, &_arg3)) == NULL) goto fail; -/* - rc = (jintLong)gdk_cursor_new_from_pixmap(arg0, arg1, (GdkColor *)lparg2, (GdkColor *)lparg3, (gint)arg4, (gint)arg5); -*/ - { - OS_LOAD_FUNCTION(fp, gdk_cursor_new_from_pixmap) - if (fp) { - rc = (jintLong)((jintLong (CALLING_CONVENTION*)(jintLong, jintLong, GdkColor *, GdkColor *, gint, gint))fp)(arg0, arg1, (GdkColor *)lparg2, (GdkColor *)lparg3, (gint)arg4, (gint)arg5); - } - } -fail: - OS_NATIVE_EXIT(env, that, _1gdk_1cursor_1new_1from_1pixmap_FUNC); - return rc; -} -#endif - -#ifndef NO__1gdk_1cursor_1unref -JNIEXPORT void JNICALL OS_NATIVE(_1gdk_1cursor_1unref) - (JNIEnv *env, jclass that, jintLong arg0) -{ - OS_NATIVE_ENTER(env, that, _1gdk_1cursor_1unref_FUNC); -/* - gdk_cursor_unref(arg0); -*/ - { - OS_LOAD_FUNCTION(fp, gdk_cursor_unref) - if (fp) { - ((void (CALLING_CONVENTION*)(jintLong))fp)(arg0); - } - } - OS_NATIVE_EXIT(env, that, _1gdk_1cursor_1unref_FUNC); -} -#endif - -#ifndef NO__1gdk_1device_1get_1associated_1device -JNIEXPORT jintLong JNICALL OS_NATIVE(_1gdk_1device_1get_1associated_1device) - (JNIEnv *env, jclass that, jintLong arg0) -{ - jintLong rc = 0; - OS_NATIVE_ENTER(env, that, _1gdk_1device_1get_1associated_1device_FUNC); -/* - rc = (jintLong)gdk_device_get_associated_device((GdkDevice *)arg0); -*/ - { - OS_LOAD_FUNCTION(fp, gdk_device_get_associated_device) - if (fp) { - rc = (jintLong)((jintLong (CALLING_CONVENTION*)(GdkDevice *))fp)((GdkDevice *)arg0); - } - } - OS_NATIVE_EXIT(env, that, _1gdk_1device_1get_1associated_1device_FUNC); - return rc; -} -#endif - -#ifndef NO__1gdk_1device_1get_1window_1at_1position -JNIEXPORT jintLong JNICALL OS_NATIVE(_1gdk_1device_1get_1window_1at_1position) - (JNIEnv *env, jclass that, jintLong arg0, jintArray arg1, jintArray arg2) -{ - jint *lparg1=NULL; - jint *lparg2=NULL; - jintLong rc = 0; - OS_NATIVE_ENTER(env, that, _1gdk_1device_1get_1window_1at_1position_FUNC); - if (arg1) if ((lparg1 = (*env)->GetIntArrayElements(env, arg1, NULL)) == NULL) goto fail; - if (arg2) if ((lparg2 = (*env)->GetIntArrayElements(env, arg2, NULL)) == NULL) goto fail; -/* - rc = (jintLong)gdk_device_get_window_at_position(arg0, (gint *)lparg1, (gint *)lparg2); -*/ - { - OS_LOAD_FUNCTION(fp, gdk_device_get_window_at_position) - if (fp) { - rc = (jintLong)((jintLong (CALLING_CONVENTION*)(jintLong, gint *, gint *))fp)(arg0, (gint *)lparg1, (gint *)lparg2); - } - } -fail: - if (arg2 && lparg2) (*env)->ReleaseIntArrayElements(env, arg2, lparg2, 0); - if (arg1 && lparg1) (*env)->ReleaseIntArrayElements(env, arg1, lparg1, 0); - OS_NATIVE_EXIT(env, that, _1gdk_1device_1get_1window_1at_1position_FUNC); - return rc; -} -#endif - -#ifndef NO__1gdk_1device_1grab -JNIEXPORT jint JNICALL OS_NATIVE(_1gdk_1device_1grab) - (JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jint arg2, jboolean arg3, jint arg4, jintLong arg5, jint arg6) -{ - jint rc = 0; - OS_NATIVE_ENTER(env, that, _1gdk_1device_1grab_FUNC); -/* - rc = (jint)gdk_device_grab((GdkDevice *)arg0, (GdkWindow *)arg1, arg2, (gboolean)arg3, (GdkEventMask)arg4, (GdkCursor *)arg5, (guint32)arg6); -*/ - { - OS_LOAD_FUNCTION(fp, gdk_device_grab) - if (fp) { - rc = (jint)((jint (CALLING_CONVENTION*)(GdkDevice *, GdkWindow *, jint, gboolean, GdkEventMask, GdkCursor *, guint32))fp)((GdkDevice *)arg0, (GdkWindow *)arg1, arg2, (gboolean)arg3, (GdkEventMask)arg4, (GdkCursor *)arg5, (guint32)arg6); - } - } - OS_NATIVE_EXIT(env, that, _1gdk_1device_1grab_FUNC); - return rc; -} -#endif - -#ifndef NO__1gdk_1device_1manager_1get_1client_1pointer -JNIEXPORT jintLong JNICALL OS_NATIVE(_1gdk_1device_1manager_1get_1client_1pointer) - (JNIEnv *env, jclass that, jintLong arg0) -{ - jintLong rc = 0; - OS_NATIVE_ENTER(env, that, _1gdk_1device_1manager_1get_1client_1pointer_FUNC); -/* - rc = (jintLong)gdk_device_manager_get_client_pointer(arg0); -*/ - { - OS_LOAD_FUNCTION(fp, gdk_device_manager_get_client_pointer) - if (fp) { - rc = (jintLong)((jintLong (CALLING_CONVENTION*)(jintLong))fp)(arg0); - } - } - OS_NATIVE_EXIT(env, that, _1gdk_1device_1manager_1get_1client_1pointer_FUNC); - return rc; -} -#endif - -#ifndef NO__1gdk_1device_1ungrab -JNIEXPORT void JNICALL OS_NATIVE(_1gdk_1device_1ungrab) - (JNIEnv *env, jclass that, jintLong arg0, jint arg1) -{ - OS_NATIVE_ENTER(env, that, _1gdk_1device_1ungrab_FUNC); -/* - gdk_device_ungrab((GdkDevice *)arg0, (guint32)arg1); -*/ - { - OS_LOAD_FUNCTION(fp, gdk_device_ungrab) - if (fp) { - ((void (CALLING_CONVENTION*)(GdkDevice *, guint32))fp)((GdkDevice *)arg0, (guint32)arg1); - } - } - OS_NATIVE_EXIT(env, that, _1gdk_1device_1ungrab_FUNC); -} -#endif - -#ifndef NO__1gdk_1device_1warp -JNIEXPORT void JNICALL OS_NATIVE(_1gdk_1device_1warp) - (JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jint arg2, jint arg3) -{ - OS_NATIVE_ENTER(env, that, _1gdk_1device_1warp_FUNC); -/* - gdk_device_warp(arg0, arg1, arg2, arg3); -*/ - { - OS_LOAD_FUNCTION(fp, gdk_device_warp) - if (fp) { - ((void (CALLING_CONVENTION*)(jintLong, jintLong, jint, jint))fp)(arg0, arg1, arg2, arg3); - } - } - OS_NATIVE_EXIT(env, that, _1gdk_1device_1warp_FUNC); -} -#endif - -#ifndef NO__1gdk_1display_1get_1default -JNIEXPORT jintLong JNICALL OS_NATIVE(_1gdk_1display_1get_1default) - (JNIEnv *env, jclass that) -{ - jintLong rc = 0; - OS_NATIVE_ENTER(env, that, _1gdk_1display_1get_1default_FUNC); -/* - rc = (jintLong)gdk_display_get_default(); -*/ - { - OS_LOAD_FUNCTION(fp, gdk_display_get_default) - if (fp) { - rc = (jintLong)((jintLong (CALLING_CONVENTION*)())fp)(); - } - } - OS_NATIVE_EXIT(env, that, _1gdk_1display_1get_1default_FUNC); - return rc; -} -#endif - -#ifndef NO__1gdk_1display_1get_1default_1seat -JNIEXPORT jintLong JNICALL OS_NATIVE(_1gdk_1display_1get_1default_1seat) - (JNIEnv *env, jclass that, jintLong arg0) -{ - jintLong rc = 0; - OS_NATIVE_ENTER(env, that, _1gdk_1display_1get_1default_1seat_FUNC); -/* - rc = (jintLong)gdk_display_get_default_seat(arg0); -*/ - { - OS_LOAD_FUNCTION(fp, gdk_display_get_default_seat) - if (fp) { - rc = (jintLong)((jintLong (CALLING_CONVENTION*)(jintLong))fp)(arg0); - } - } - OS_NATIVE_EXIT(env, that, _1gdk_1display_1get_1default_1seat_FUNC); - return rc; -} -#endif - -#ifndef NO__1gdk_1display_1get_1device_1manager -JNIEXPORT jintLong JNICALL OS_NATIVE(_1gdk_1display_1get_1device_1manager) - (JNIEnv *env, jclass that, jintLong arg0) -{ - jintLong rc = 0; - OS_NATIVE_ENTER(env, that, _1gdk_1display_1get_1device_1manager_FUNC); -/* - rc = (jintLong)gdk_display_get_device_manager((GdkDisplay *)arg0); -*/ - { - OS_LOAD_FUNCTION(fp, gdk_display_get_device_manager) - if (fp) { - rc = (jintLong)((jintLong (CALLING_CONVENTION*)(GdkDisplay *))fp)((GdkDisplay *)arg0); - } - } - OS_NATIVE_EXIT(env, that, _1gdk_1display_1get_1device_1manager_FUNC); - return rc; -} -#endif - -#ifndef NO__1gdk_1display_1supports_1cursor_1color -JNIEXPORT jboolean JNICALL OS_NATIVE(_1gdk_1display_1supports_1cursor_1color) - (JNIEnv *env, jclass that, jintLong arg0) -{ - jboolean rc = 0; - OS_NATIVE_ENTER(env, that, _1gdk_1display_1supports_1cursor_1color_FUNC); -/* - rc = (jboolean)gdk_display_supports_cursor_color(arg0); -*/ - { - OS_LOAD_FUNCTION(fp, gdk_display_supports_cursor_color) - if (fp) { - rc = (jboolean)((jboolean (CALLING_CONVENTION*)(jintLong))fp)(arg0); - } - } - OS_NATIVE_EXIT(env, that, _1gdk_1display_1supports_1cursor_1color_FUNC); - return rc; -} -#endif - -#ifndef NO__1gdk_1display_1warp_1pointer -JNIEXPORT void JNICALL OS_NATIVE(_1gdk_1display_1warp_1pointer) - (JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jint arg2, jint arg3) -{ - OS_NATIVE_ENTER(env, that, _1gdk_1display_1warp_1pointer_FUNC); -/* - gdk_display_warp_pointer(arg0, arg1, arg2, arg3); -*/ - { - OS_LOAD_FUNCTION(fp, gdk_display_warp_pointer) - if (fp) { - ((void (CALLING_CONVENTION*)(jintLong, jintLong, jint, jint))fp)(arg0, arg1, arg2, arg3); - } - } - OS_NATIVE_EXIT(env, that, _1gdk_1display_1warp_1pointer_FUNC); -} -#endif - -#ifndef NO__1gdk_1drag_1context_1get_1actions -JNIEXPORT jint JNICALL OS_NATIVE(_1gdk_1drag_1context_1get_1actions) - (JNIEnv *env, jclass that, jintLong arg0) -{ - jint rc = 0; - OS_NATIVE_ENTER(env, that, _1gdk_1drag_1context_1get_1actions_FUNC); -/* - rc = (jint)gdk_drag_context_get_actions((GdkDragContext *)arg0); -*/ - { - OS_LOAD_FUNCTION(fp, gdk_drag_context_get_actions) - if (fp) { - rc = (jint)((jint (CALLING_CONVENTION*)(GdkDragContext *))fp)((GdkDragContext *)arg0); - } - } - OS_NATIVE_EXIT(env, that, _1gdk_1drag_1context_1get_1actions_FUNC); - return rc; -} -#endif - -#ifndef NO__1gdk_1drag_1context_1get_1dest_1window -JNIEXPORT jintLong JNICALL OS_NATIVE(_1gdk_1drag_1context_1get_1dest_1window) - (JNIEnv *env, jclass that, jintLong arg0) -{ - jintLong rc = 0; - OS_NATIVE_ENTER(env, that, _1gdk_1drag_1context_1get_1dest_1window_FUNC); -/* - rc = (jintLong)gdk_drag_context_get_dest_window((GdkDragContext *)arg0); -*/ - { - OS_LOAD_FUNCTION(fp, gdk_drag_context_get_dest_window) - if (fp) { - rc = (jintLong)((jintLong (CALLING_CONVENTION*)(GdkDragContext *))fp)((GdkDragContext *)arg0); - } - } - OS_NATIVE_EXIT(env, that, _1gdk_1drag_1context_1get_1dest_1window_FUNC); - return rc; -} -#endif - -#ifndef NO__1gdk_1drag_1context_1get_1selected_1action -JNIEXPORT jint JNICALL OS_NATIVE(_1gdk_1drag_1context_1get_1selected_1action) - (JNIEnv *env, jclass that, jintLong arg0) -{ - jint rc = 0; - OS_NATIVE_ENTER(env, that, _1gdk_1drag_1context_1get_1selected_1action_FUNC); -/* - rc = (jint)gdk_drag_context_get_selected_action((GdkDragContext *)arg0); -*/ - { - OS_LOAD_FUNCTION(fp, gdk_drag_context_get_selected_action) - if (fp) { - rc = (jint)((jint (CALLING_CONVENTION*)(GdkDragContext *))fp)((GdkDragContext *)arg0); - } - } - OS_NATIVE_EXIT(env, that, _1gdk_1drag_1context_1get_1selected_1action_FUNC); - return rc; -} -#endif - -#ifndef NO__1gdk_1drag_1context_1list_1targets -JNIEXPORT jintLong JNICALL OS_NATIVE(_1gdk_1drag_1context_1list_1targets) - (JNIEnv *env, jclass that, jintLong arg0) -{ - jintLong rc = 0; - OS_NATIVE_ENTER(env, that, _1gdk_1drag_1context_1list_1targets_FUNC); -/* - rc = (jintLong)gdk_drag_context_list_targets((GdkDragContext *)arg0); -*/ - { - OS_LOAD_FUNCTION(fp, gdk_drag_context_list_targets) - if (fp) { - rc = (jintLong)((jintLong (CALLING_CONVENTION*)(GdkDragContext *))fp)((GdkDragContext *)arg0); - } - } - OS_NATIVE_EXIT(env, that, _1gdk_1drag_1context_1list_1targets_FUNC); - return rc; -} -#endif - -#ifndef NO__1gdk_1drag_1status -JNIEXPORT void JNICALL OS_NATIVE(_1gdk_1drag_1status) - (JNIEnv *env, jclass that, jintLong arg0, jint arg1, jint arg2) -{ - OS_NATIVE_ENTER(env, that, _1gdk_1drag_1status_FUNC); - gdk_drag_status((GdkDragContext *)arg0, (GdkDragAction)arg1, (guint32)arg2); - OS_NATIVE_EXIT(env, that, _1gdk_1drag_1status_FUNC); -} -#endif - -#ifndef NO__1gdk_1draw_1arc -JNIEXPORT void JNICALL OS_NATIVE(_1gdk_1draw_1arc) - (JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jint arg2, jint arg3, jint arg4, jint arg5, jint arg6, jint arg7, jint arg8) -{ - OS_NATIVE_ENTER(env, that, _1gdk_1draw_1arc_FUNC); -/* - gdk_draw_arc(arg0, arg1, (gint)arg2, (gint)arg3, (gint)arg4, (gint)arg5, (gint)arg6, (gint)arg7, (gint)arg8); -*/ - { - OS_LOAD_FUNCTION(fp, gdk_draw_arc) - if (fp) { - ((void (CALLING_CONVENTION*)(jintLong, jintLong, gint, gint, gint, gint, gint, gint, gint))fp)(arg0, arg1, (gint)arg2, (gint)arg3, (gint)arg4, (gint)arg5, (gint)arg6, (gint)arg7, (gint)arg8); - } - } - OS_NATIVE_EXIT(env, that, _1gdk_1draw_1arc_FUNC); -} -#endif - -#ifndef NO__1gdk_1draw_1image -JNIEXPORT void JNICALL OS_NATIVE(_1gdk_1draw_1image) - (JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jintLong arg2, jint arg3, jint arg4, jint arg5, jint arg6, jint arg7, jint arg8) -{ - OS_NATIVE_ENTER(env, that, _1gdk_1draw_1image_FUNC); -/* - gdk_draw_image(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8); -*/ - { - OS_LOAD_FUNCTION(fp, gdk_draw_image) - if (fp) { - ((void (CALLING_CONVENTION*)(jintLong, jintLong, jintLong, jint, jint, jint, jint, jint, jint))fp)(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8); - } - } - OS_NATIVE_EXIT(env, that, _1gdk_1draw_1image_FUNC); -} -#endif - -#ifndef NO__1gdk_1draw_1pixbuf -JNIEXPORT void JNICALL OS_NATIVE(_1gdk_1draw_1pixbuf) - (JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jintLong arg2, jint arg3, jint arg4, jint arg5, jint arg6, jint arg7, jint arg8, jint arg9, jint arg10, jint arg11) -{ - OS_NATIVE_ENTER(env, that, _1gdk_1draw_1pixbuf_FUNC); -/* - gdk_draw_pixbuf(arg0, arg1, arg2, (gint)arg3, (gint)arg4, (gint)arg5, (gint)arg6, (gint)arg7, (gint)arg8, arg9, (gint)arg10, (gint)arg11); -*/ - { - OS_LOAD_FUNCTION(fp, gdk_draw_pixbuf) - if (fp) { - ((void (CALLING_CONVENTION*)(jintLong, jintLong, jintLong, gint, gint, gint, gint, gint, gint, jint, gint, gint))fp)(arg0, arg1, arg2, (gint)arg3, (gint)arg4, (gint)arg5, (gint)arg6, (gint)arg7, (gint)arg8, arg9, (gint)arg10, (gint)arg11); - } - } - OS_NATIVE_EXIT(env, that, _1gdk_1draw_1pixbuf_FUNC); -} -#endif - -#ifndef NO__1gdk_1draw_1rectangle -JNIEXPORT void JNICALL OS_NATIVE(_1gdk_1draw_1rectangle) - (JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jint arg2, jint arg3, jint arg4, jint arg5, jint arg6) -{ - OS_NATIVE_ENTER(env, that, _1gdk_1draw_1rectangle_FUNC); -/* - gdk_draw_rectangle(arg0, arg1, (gint)arg2, (gint)arg3, (gint)arg4, (gint)arg5, (gint)arg6); -*/ - { - OS_LOAD_FUNCTION(fp, gdk_draw_rectangle) - if (fp) { - ((void (CALLING_CONVENTION*)(jintLong, jintLong, gint, gint, gint, gint, gint))fp)(arg0, arg1, (gint)arg2, (gint)arg3, (gint)arg4, (gint)arg5, (gint)arg6); - } - } - OS_NATIVE_EXIT(env, that, _1gdk_1draw_1rectangle_FUNC); -} -#endif - -#ifndef NO__1gdk_1drawable_1get_1depth -JNIEXPORT jint JNICALL OS_NATIVE(_1gdk_1drawable_1get_1depth) - (JNIEnv *env, jclass that, jintLong arg0) -{ - jint rc = 0; - OS_NATIVE_ENTER(env, that, _1gdk_1drawable_1get_1depth_FUNC); -/* - rc = (jint)gdk_drawable_get_depth(arg0); -*/ - { - OS_LOAD_FUNCTION(fp, gdk_drawable_get_depth) - if (fp) { - rc = (jint)((jint (CALLING_CONVENTION*)(jintLong))fp)(arg0); - } - } - OS_NATIVE_EXIT(env, that, _1gdk_1drawable_1get_1depth_FUNC); - return rc; -} -#endif - -#ifndef NO__1gdk_1drawable_1get_1image -JNIEXPORT jintLong JNICALL OS_NATIVE(_1gdk_1drawable_1get_1image) - (JNIEnv *env, jclass that, jintLong arg0, jint arg1, jint arg2, jint arg3, jint arg4) -{ - jintLong rc = 0; - OS_NATIVE_ENTER(env, that, _1gdk_1drawable_1get_1image_FUNC); -/* - rc = (jintLong)gdk_drawable_get_image(arg0, (gint)arg1, (gint)arg2, (gint)arg3, (gint)arg4); -*/ - { - OS_LOAD_FUNCTION(fp, gdk_drawable_get_image) - if (fp) { - rc = (jintLong)((jintLong (CALLING_CONVENTION*)(jintLong, gint, gint, gint, gint))fp)(arg0, (gint)arg1, (gint)arg2, (gint)arg3, (gint)arg4); - } - } - OS_NATIVE_EXIT(env, that, _1gdk_1drawable_1get_1image_FUNC); - return rc; -} -#endif - -#ifndef NO__1gdk_1drawable_1get_1visible_1region -JNIEXPORT jintLong JNICALL OS_NATIVE(_1gdk_1drawable_1get_1visible_1region) - (JNIEnv *env, jclass that, jintLong arg0) -{ - jintLong rc = 0; - OS_NATIVE_ENTER(env, that, _1gdk_1drawable_1get_1visible_1region_FUNC); -/* - rc = (jintLong)gdk_drawable_get_visible_region(arg0); -*/ - { - OS_LOAD_FUNCTION(fp, gdk_drawable_get_visible_region) - if (fp) { - rc = (jintLong)((jintLong (CALLING_CONVENTION*)(jintLong))fp)(arg0); - } - } - OS_NATIVE_EXIT(env, that, _1gdk_1drawable_1get_1visible_1region_FUNC); - return rc; -} -#endif - -#ifndef NO__1gdk_1error_1trap_1pop -JNIEXPORT jint JNICALL OS_NATIVE(_1gdk_1error_1trap_1pop) - (JNIEnv *env, jclass that) -{ - jint rc = 0; - OS_NATIVE_ENTER(env, that, _1gdk_1error_1trap_1pop_FUNC); - rc = (jint)gdk_error_trap_pop(); - OS_NATIVE_EXIT(env, that, _1gdk_1error_1trap_1pop_FUNC); - return rc; -} -#endif - -#ifndef NO__1gdk_1error_1trap_1push -JNIEXPORT void JNICALL OS_NATIVE(_1gdk_1error_1trap_1push) - (JNIEnv *env, jclass that) -{ - OS_NATIVE_ENTER(env, that, _1gdk_1error_1trap_1push_FUNC); - gdk_error_trap_push(); - OS_NATIVE_EXIT(env, that, _1gdk_1error_1trap_1push_FUNC); -} -#endif - -#ifndef NO__1gdk_1event_1copy -JNIEXPORT jintLong JNICALL OS_NATIVE(_1gdk_1event_1copy) - (JNIEnv *env, jclass that, jintLong arg0) -{ - jintLong rc = 0; - OS_NATIVE_ENTER(env, that, _1gdk_1event_1copy_FUNC); - rc = (jintLong)gdk_event_copy((GdkEvent *)arg0); - OS_NATIVE_EXIT(env, that, _1gdk_1event_1copy_FUNC); - return rc; -} -#endif - -#ifndef NO__1gdk_1event_1free -JNIEXPORT void JNICALL OS_NATIVE(_1gdk_1event_1free) - (JNIEnv *env, jclass that, jintLong arg0) -{ - OS_NATIVE_ENTER(env, that, _1gdk_1event_1free_FUNC); - gdk_event_free((GdkEvent *)arg0); - OS_NATIVE_EXIT(env, that, _1gdk_1event_1free_FUNC); -} -#endif - -#ifndef NO__1gdk_1event_1get -JNIEXPORT jintLong JNICALL OS_NATIVE(_1gdk_1event_1get) - (JNIEnv *env, jclass that) -{ - jintLong rc = 0; - OS_NATIVE_ENTER(env, that, _1gdk_1event_1get_FUNC); - rc = (jintLong)gdk_event_get(); - OS_NATIVE_EXIT(env, that, _1gdk_1event_1get_FUNC); - return rc; -} -#endif - -#ifndef NO__1gdk_1event_1get_1coords -JNIEXPORT jboolean JNICALL OS_NATIVE(_1gdk_1event_1get_1coords) - (JNIEnv *env, jclass that, jintLong arg0, jdoubleArray arg1, jdoubleArray arg2) -{ - jdouble *lparg1=NULL; - jdouble *lparg2=NULL; - jboolean rc = 0; - OS_NATIVE_ENTER(env, that, _1gdk_1event_1get_1coords_FUNC); - if (arg1) if ((lparg1 = (*env)->GetDoubleArrayElements(env, arg1, NULL)) == NULL) goto fail; - if (arg2) if ((lparg2 = (*env)->GetDoubleArrayElements(env, arg2, NULL)) == NULL) goto fail; - rc = (jboolean)gdk_event_get_coords((GdkEvent *)arg0, (gdouble *)lparg1, (gdouble *)lparg2); -fail: - if (arg2 && lparg2) (*env)->ReleaseDoubleArrayElements(env, arg2, lparg2, 0); - if (arg1 && lparg1) (*env)->ReleaseDoubleArrayElements(env, arg1, lparg1, 0); - OS_NATIVE_EXIT(env, that, _1gdk_1event_1get_1coords_FUNC); - return rc; -} -#endif - -#ifndef NO__1gdk_1event_1get_1event_1type -JNIEXPORT jint JNICALL OS_NATIVE(_1gdk_1event_1get_1event_1type) - (JNIEnv *env, jclass that, jintLong arg0) -{ - jint rc = 0; - OS_NATIVE_ENTER(env, that, _1gdk_1event_1get_1event_1type_FUNC); -/* - rc = (jint)gdk_event_get_event_type((GdkEvent *)arg0); -*/ - { - OS_LOAD_FUNCTION(fp, gdk_event_get_event_type) - if (fp) { - rc = (jint)((jint (CALLING_CONVENTION*)(GdkEvent *))fp)((GdkEvent *)arg0); - } - } - OS_NATIVE_EXIT(env, that, _1gdk_1event_1get_1event_1type_FUNC); - return rc; -} -#endif - -#ifndef NO__1gdk_1event_1get_1scroll_1deltas -JNIEXPORT jboolean JNICALL OS_NATIVE(_1gdk_1event_1get_1scroll_1deltas) - (JNIEnv *env, jclass that, jintLong arg0, jdoubleArray arg1, jdoubleArray arg2) -{ - jdouble *lparg1=NULL; - jdouble *lparg2=NULL; - jboolean rc = 0; - OS_NATIVE_ENTER(env, that, _1gdk_1event_1get_1scroll_1deltas_FUNC); - if (arg1) if ((lparg1 = (*env)->GetDoubleArrayElements(env, arg1, NULL)) == NULL) goto fail; - if (arg2) if ((lparg2 = (*env)->GetDoubleArrayElements(env, arg2, NULL)) == NULL) goto fail; -/* - rc = (jboolean)gdk_event_get_scroll_deltas((GdkEvent *)arg0, lparg1, lparg2); -*/ - { - OS_LOAD_FUNCTION(fp, gdk_event_get_scroll_deltas) - if (fp) { - rc = (jboolean)((jboolean (CALLING_CONVENTION*)(GdkEvent *, jdouble *, jdouble *))fp)((GdkEvent *)arg0, lparg1, lparg2); - } - } -fail: - if (arg2 && lparg2) (*env)->ReleaseDoubleArrayElements(env, arg2, lparg2, 0); - if (arg1 && lparg1) (*env)->ReleaseDoubleArrayElements(env, arg1, lparg1, 0); - OS_NATIVE_EXIT(env, that, _1gdk_1event_1get_1scroll_1deltas_FUNC); - return rc; -} -#endif - -#ifndef NO__1gdk_1event_1get_1seat -JNIEXPORT jintLong JNICALL OS_NATIVE(_1gdk_1event_1get_1seat) - (JNIEnv *env, jclass that, jintLong arg0) -{ - jintLong rc = 0; - OS_NATIVE_ENTER(env, that, _1gdk_1event_1get_1seat_FUNC); -/* - rc = (jintLong)gdk_event_get_seat(arg0); -*/ - { - OS_LOAD_FUNCTION(fp, gdk_event_get_seat) - if (fp) { - rc = (jintLong)((jintLong (CALLING_CONVENTION*)(jintLong))fp)(arg0); - } - } - OS_NATIVE_EXIT(env, that, _1gdk_1event_1get_1seat_FUNC); - return rc; -} -#endif - -#ifndef NO__1gdk_1event_1get_1state -JNIEXPORT jboolean JNICALL OS_NATIVE(_1gdk_1event_1get_1state) - (JNIEnv *env, jclass that, jintLong arg0, jintArray arg1) -{ - jint *lparg1=NULL; - jboolean rc = 0; - OS_NATIVE_ENTER(env, that, _1gdk_1event_1get_1state_FUNC); - if (arg1) if ((lparg1 = (*env)->GetIntArrayElements(env, arg1, NULL)) == NULL) goto fail; - rc = (jboolean)gdk_event_get_state((GdkEvent *)arg0, (GdkModifierType *)lparg1); -fail: - if (arg1 && lparg1) (*env)->ReleaseIntArrayElements(env, arg1, lparg1, 0); - OS_NATIVE_EXIT(env, that, _1gdk_1event_1get_1state_FUNC); - return rc; -} -#endif - -#ifndef NO__1gdk_1event_1get_1time -JNIEXPORT jint JNICALL OS_NATIVE(_1gdk_1event_1get_1time) - (JNIEnv *env, jclass that, jintLong arg0) -{ - jint rc = 0; - OS_NATIVE_ENTER(env, that, _1gdk_1event_1get_1time_FUNC); - rc = (jint)gdk_event_get_time((GdkEvent *)arg0); - OS_NATIVE_EXIT(env, that, _1gdk_1event_1get_1time_FUNC); - return rc; -} -#endif - -#ifndef NO__1gdk_1event_1handler_1set -JNIEXPORT void JNICALL OS_NATIVE(_1gdk_1event_1handler_1set) - (JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jintLong arg2) -{ - OS_NATIVE_ENTER(env, that, _1gdk_1event_1handler_1set_FUNC); - gdk_event_handler_set((GdkEventFunc)arg0, (gpointer)arg1, (GDestroyNotify)arg2); - OS_NATIVE_EXIT(env, that, _1gdk_1event_1handler_1set_FUNC); -} -#endif - -#ifndef NO__1gdk_1event_1new -JNIEXPORT jintLong JNICALL OS_NATIVE(_1gdk_1event_1new) - (JNIEnv *env, jclass that, jint arg0) -{ - jintLong rc = 0; - OS_NATIVE_ENTER(env, that, _1gdk_1event_1new_FUNC); - rc = (jintLong)gdk_event_new(arg0); - OS_NATIVE_EXIT(env, that, _1gdk_1event_1new_FUNC); - return rc; -} -#endif - -#ifndef NO__1gdk_1event_1peek -JNIEXPORT jintLong JNICALL OS_NATIVE(_1gdk_1event_1peek) - (JNIEnv *env, jclass that) -{ - jintLong rc = 0; - OS_NATIVE_ENTER(env, that, _1gdk_1event_1peek_FUNC); - rc = (jintLong)gdk_event_peek(); - OS_NATIVE_EXIT(env, that, _1gdk_1event_1peek_FUNC); - return rc; -} -#endif - -#ifndef NO__1gdk_1event_1put -JNIEXPORT void JNICALL OS_NATIVE(_1gdk_1event_1put) - (JNIEnv *env, jclass that, jintLong arg0) -{ - OS_NATIVE_ENTER(env, that, _1gdk_1event_1put_FUNC); - gdk_event_put((GdkEvent *)arg0); - OS_NATIVE_EXIT(env, that, _1gdk_1event_1put_FUNC); -} -#endif - -#ifndef NO__1gdk_1flush -JNIEXPORT void JNICALL OS_NATIVE(_1gdk_1flush) - (JNIEnv *env, jclass that) -{ - OS_NATIVE_ENTER(env, that, _1gdk_1flush_FUNC); - gdk_flush(); - OS_NATIVE_EXIT(env, that, _1gdk_1flush_FUNC); -} -#endif - -#ifndef NO__1gdk_1gc_1new -JNIEXPORT jintLong JNICALL OS_NATIVE(_1gdk_1gc_1new) - (JNIEnv *env, jclass that, jintLong arg0) -{ - jintLong rc = 0; - OS_NATIVE_ENTER(env, that, _1gdk_1gc_1new_FUNC); -/* - rc = (jintLong)gdk_gc_new(arg0); -*/ - { - OS_LOAD_FUNCTION(fp, gdk_gc_new) - if (fp) { - rc = (jintLong)((jintLong (CALLING_CONVENTION*)(jintLong))fp)(arg0); - } - } - OS_NATIVE_EXIT(env, that, _1gdk_1gc_1new_FUNC); - return rc; -} -#endif - -#ifndef NO__1gdk_1gc_1set_1fill -JNIEXPORT void JNICALL OS_NATIVE(_1gdk_1gc_1set_1fill) - (JNIEnv *env, jclass that, jintLong arg0, jint arg1) -{ - OS_NATIVE_ENTER(env, that, _1gdk_1gc_1set_1fill_FUNC); -/* - gdk_gc_set_fill(arg0, arg1); -*/ - { - OS_LOAD_FUNCTION(fp, gdk_gc_set_fill) - if (fp) { - ((void (CALLING_CONVENTION*)(jintLong, jint))fp)(arg0, arg1); - } - } - OS_NATIVE_EXIT(env, that, _1gdk_1gc_1set_1fill_FUNC); -} -#endif - -#ifndef NO__1gdk_1gc_1set_1foreground -JNIEXPORT void JNICALL OS_NATIVE(_1gdk_1gc_1set_1foreground) - (JNIEnv *env, jclass that, jintLong arg0, jobject arg1) -{ - GdkColor _arg1, *lparg1=NULL; - OS_NATIVE_ENTER(env, that, _1gdk_1gc_1set_1foreground_FUNC); - if (arg1) if ((lparg1 = getGdkColorFields(env, arg1, &_arg1)) == NULL) goto fail; -/* - gdk_gc_set_foreground(arg0, lparg1); -*/ - { - OS_LOAD_FUNCTION(fp, gdk_gc_set_foreground) - if (fp) { - ((void (CALLING_CONVENTION*)(jintLong, GdkColor *))fp)(arg0, lparg1); - } - } -fail: - OS_NATIVE_EXIT(env, that, _1gdk_1gc_1set_1foreground_FUNC); -} -#endif - -#ifndef NO__1gdk_1gc_1set_1function -JNIEXPORT void JNICALL OS_NATIVE(_1gdk_1gc_1set_1function) - (JNIEnv *env, jclass that, jintLong arg0, jintLong arg1) -{ - OS_NATIVE_ENTER(env, that, _1gdk_1gc_1set_1function_FUNC); -/* - gdk_gc_set_function(arg0, arg1); -*/ - { - OS_LOAD_FUNCTION(fp, gdk_gc_set_function) - if (fp) { - ((void (CALLING_CONVENTION*)(jintLong, jintLong))fp)(arg0, arg1); - } - } - OS_NATIVE_EXIT(env, that, _1gdk_1gc_1set_1function_FUNC); -} -#endif - -#ifndef NO__1gdk_1gc_1set_1stipple -JNIEXPORT void JNICALL OS_NATIVE(_1gdk_1gc_1set_1stipple) - (JNIEnv *env, jclass that, jintLong arg0, jintLong arg1) -{ - OS_NATIVE_ENTER(env, that, _1gdk_1gc_1set_1stipple_FUNC); -/* - gdk_gc_set_stipple(arg0, arg1); -*/ - { - OS_LOAD_FUNCTION(fp, gdk_gc_set_stipple) - if (fp) { - ((void (CALLING_CONVENTION*)(jintLong, jintLong))fp)(arg0, arg1); - } - } - OS_NATIVE_EXIT(env, that, _1gdk_1gc_1set_1stipple_FUNC); -} -#endif - -#ifndef NO__1gdk_1gc_1set_1subwindow -JNIEXPORT void JNICALL OS_NATIVE(_1gdk_1gc_1set_1subwindow) - (JNIEnv *env, jclass that, jintLong arg0, jintLong arg1) -{ - OS_NATIVE_ENTER(env, that, _1gdk_1gc_1set_1subwindow_FUNC); -/* - gdk_gc_set_subwindow(arg0, arg1); -*/ - { - OS_LOAD_FUNCTION(fp, gdk_gc_set_subwindow) - if (fp) { - ((void (CALLING_CONVENTION*)(jintLong, jintLong))fp)(arg0, arg1); - } - } - OS_NATIVE_EXIT(env, that, _1gdk_1gc_1set_1subwindow_FUNC); -} -#endif - -#ifndef NO__1gdk_1get_1default_1root_1window -JNIEXPORT jintLong JNICALL OS_NATIVE(_1gdk_1get_1default_1root_1window) - (JNIEnv *env, jclass that) -{ - jintLong rc = 0; - OS_NATIVE_ENTER(env, that, _1gdk_1get_1default_1root_1window_FUNC); - rc = (jintLong)gdk_get_default_root_window(); - OS_NATIVE_EXIT(env, that, _1gdk_1get_1default_1root_1window_FUNC); - return rc; -} -#endif - -#ifndef NO__1gdk_1keyboard_1ungrab -JNIEXPORT void JNICALL OS_NATIVE(_1gdk_1keyboard_1ungrab) - (JNIEnv *env, jclass that, jint arg0) -{ - OS_NATIVE_ENTER(env, that, _1gdk_1keyboard_1ungrab_FUNC); -/* - gdk_keyboard_ungrab(arg0); -*/ - { - OS_LOAD_FUNCTION(fp, gdk_keyboard_ungrab) - if (fp) { - ((void (CALLING_CONVENTION*)(jint))fp)(arg0); - } - } - OS_NATIVE_EXIT(env, that, _1gdk_1keyboard_1ungrab_FUNC); -} -#endif - -#ifndef NO__1gdk_1keymap_1get_1default -JNIEXPORT jintLong JNICALL OS_NATIVE(_1gdk_1keymap_1get_1default) - (JNIEnv *env, jclass that) -{ - jintLong rc = 0; - OS_NATIVE_ENTER(env, that, _1gdk_1keymap_1get_1default_FUNC); - rc = (jintLong)gdk_keymap_get_default(); - OS_NATIVE_EXIT(env, that, _1gdk_1keymap_1get_1default_FUNC); - return rc; -} -#endif - -#ifndef NO__1gdk_1keymap_1get_1entries_1for_1keyval -JNIEXPORT jboolean JNICALL OS_NATIVE(_1gdk_1keymap_1get_1entries_1for_1keyval) - (JNIEnv *env, jclass that, jintLong arg0, jlong arg1, jintLongArray arg2, jintArray arg3) -{ - jintLong *lparg2=NULL; - jint *lparg3=NULL; - jboolean rc = 0; - OS_NATIVE_ENTER(env, that, _1gdk_1keymap_1get_1entries_1for_1keyval_FUNC); - if (arg2) if ((lparg2 = (*env)->GetIntLongArrayElements(env, arg2, NULL)) == NULL) goto fail; - if (arg3) if ((lparg3 = (*env)->GetIntArrayElements(env, arg3, NULL)) == NULL) goto fail; - rc = (jboolean)gdk_keymap_get_entries_for_keyval((GdkKeymap*)arg0, (guint)arg1, (GdkKeymapKey**)lparg2, (gint*)lparg3); -fail: - if (arg3 && lparg3) (*env)->ReleaseIntArrayElements(env, arg3, lparg3, 0); - if (arg2 && lparg2) (*env)->ReleaseIntLongArrayElements(env, arg2, lparg2, 0); - OS_NATIVE_EXIT(env, that, _1gdk_1keymap_1get_1entries_1for_1keyval_FUNC); - return rc; -} -#endif - -#ifndef NO__1gdk_1keyval_1to_1lower -JNIEXPORT jlong JNICALL OS_NATIVE(_1gdk_1keyval_1to_1lower) - (JNIEnv *env, jclass that, jlong arg0) -{ - jlong rc = 0; - OS_NATIVE_ENTER(env, that, _1gdk_1keyval_1to_1lower_FUNC); - rc = (jlong)gdk_keyval_to_lower(arg0); - OS_NATIVE_EXIT(env, that, _1gdk_1keyval_1to_1lower_FUNC); - return rc; -} -#endif - -#ifndef NO__1gdk_1keyval_1to_1unicode -JNIEXPORT jlong JNICALL OS_NATIVE(_1gdk_1keyval_1to_1unicode) - (JNIEnv *env, jclass that, jlong arg0) -{ - jlong rc = 0; - OS_NATIVE_ENTER(env, that, _1gdk_1keyval_1to_1unicode_FUNC); - rc = (jlong)gdk_keyval_to_unicode(arg0); - OS_NATIVE_EXIT(env, that, _1gdk_1keyval_1to_1unicode_FUNC); - return rc; -} -#endif - -#ifndef NO__1gdk_1pango_1context_1get -JNIEXPORT jintLong JNICALL OS_NATIVE(_1gdk_1pango_1context_1get) - (JNIEnv *env, jclass that) -{ - jintLong rc = 0; - OS_NATIVE_ENTER(env, that, _1gdk_1pango_1context_1get_FUNC); - rc = (jintLong)gdk_pango_context_get(); - OS_NATIVE_EXIT(env, that, _1gdk_1pango_1context_1get_FUNC); - return rc; -} -#endif - -#ifndef NO__1gdk_1pango_1layout_1get_1clip_1region -JNIEXPORT jintLong JNICALL OS_NATIVE(_1gdk_1pango_1layout_1get_1clip_1region) - (JNIEnv *env, jclass that, jintLong arg0, jint arg1, jint arg2, jintArray arg3, jint arg4) -{ - jint *lparg3=NULL; - jintLong rc = 0; - OS_NATIVE_ENTER(env, that, _1gdk_1pango_1layout_1get_1clip_1region_FUNC); - if (arg3) if ((lparg3 = (*env)->GetIntArrayElements(env, arg3, NULL)) == NULL) goto fail; - rc = (jintLong)gdk_pango_layout_get_clip_region((PangoLayout *)arg0, arg1, arg2, (gint *)lparg3, arg4); -fail: - if (arg3 && lparg3) (*env)->ReleaseIntArrayElements(env, arg3, lparg3, 0); - OS_NATIVE_EXIT(env, that, _1gdk_1pango_1layout_1get_1clip_1region_FUNC); - return rc; -} -#endif - -#ifndef NO__1gdk_1pixbuf_1copy_1area -JNIEXPORT void JNICALL OS_NATIVE(_1gdk_1pixbuf_1copy_1area) - (JNIEnv *env, jclass that, jintLong arg0, jint arg1, jint arg2, jint arg3, jint arg4, jintLong arg5, jint arg6, jint arg7) -{ - OS_NATIVE_ENTER(env, that, _1gdk_1pixbuf_1copy_1area_FUNC); - gdk_pixbuf_copy_area((GdkPixbuf *)arg0, arg1, arg2, arg3, arg4, (GdkPixbuf *)arg5, arg6, arg7); - OS_NATIVE_EXIT(env, that, _1gdk_1pixbuf_1copy_1area_FUNC); -} -#endif - -#ifndef NO__1gdk_1pixbuf_1get_1from_1drawable -JNIEXPORT jintLong JNICALL OS_NATIVE(_1gdk_1pixbuf_1get_1from_1drawable) - (JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jintLong arg2, jint arg3, jint arg4, jint arg5, jint arg6, jint arg7, jint arg8) -{ - jintLong rc = 0; - OS_NATIVE_ENTER(env, that, _1gdk_1pixbuf_1get_1from_1drawable_FUNC); -/* - rc = (jintLong)gdk_pixbuf_get_from_drawable((GdkPixbuf *)arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8); -*/ - { - OS_LOAD_FUNCTION(fp, gdk_pixbuf_get_from_drawable) - if (fp) { - rc = (jintLong)((jintLong (CALLING_CONVENTION*)(GdkPixbuf *, jintLong, jintLong, jint, jint, jint, jint, jint, jint))fp)((GdkPixbuf *)arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8); - } - } - OS_NATIVE_EXIT(env, that, _1gdk_1pixbuf_1get_1from_1drawable_FUNC); - return rc; -} -#endif - -#ifndef NO__1gdk_1pixbuf_1get_1from_1window -JNIEXPORT jintLong JNICALL OS_NATIVE(_1gdk_1pixbuf_1get_1from_1window) - (JNIEnv *env, jclass that, jintLong arg0, jint arg1, jint arg2, jint arg3, jint arg4) -{ - jintLong rc = 0; - OS_NATIVE_ENTER(env, that, _1gdk_1pixbuf_1get_1from_1window_FUNC); -/* - rc = (jintLong)gdk_pixbuf_get_from_window((GdkWindow *)arg0, (gint)arg1, (gint)arg2, (gint)arg3, (gint)arg4); -*/ - { - OS_LOAD_FUNCTION(fp, gdk_pixbuf_get_from_window) - if (fp) { - rc = (jintLong)((jintLong (CALLING_CONVENTION*)(GdkWindow *, gint, gint, gint, gint))fp)((GdkWindow *)arg0, (gint)arg1, (gint)arg2, (gint)arg3, (gint)arg4); - } - } - OS_NATIVE_EXIT(env, that, _1gdk_1pixbuf_1get_1from_1window_FUNC); - return rc; -} -#endif - -#ifndef NO__1gdk_1pixbuf_1get_1has_1alpha -JNIEXPORT jboolean JNICALL OS_NATIVE(_1gdk_1pixbuf_1get_1has_1alpha) - (JNIEnv *env, jclass that, jintLong arg0) -{ - jboolean rc = 0; - OS_NATIVE_ENTER(env, that, _1gdk_1pixbuf_1get_1has_1alpha_FUNC); - rc = (jboolean)gdk_pixbuf_get_has_alpha((const GdkPixbuf *)arg0); - OS_NATIVE_EXIT(env, that, _1gdk_1pixbuf_1get_1has_1alpha_FUNC); - return rc; -} -#endif - -#ifndef NO__1gdk_1pixbuf_1get_1height -JNIEXPORT jint JNICALL OS_NATIVE(_1gdk_1pixbuf_1get_1height) - (JNIEnv *env, jclass that, jintLong arg0) -{ - jint rc = 0; - OS_NATIVE_ENTER(env, that, _1gdk_1pixbuf_1get_1height_FUNC); - rc = (jint)gdk_pixbuf_get_height((const GdkPixbuf *)arg0); - OS_NATIVE_EXIT(env, that, _1gdk_1pixbuf_1get_1height_FUNC); - return rc; -} -#endif - -#ifndef NO__1gdk_1pixbuf_1get_1pixels -JNIEXPORT jintLong JNICALL OS_NATIVE(_1gdk_1pixbuf_1get_1pixels) - (JNIEnv *env, jclass that, jintLong arg0) -{ - jintLong rc = 0; - OS_NATIVE_ENTER(env, that, _1gdk_1pixbuf_1get_1pixels_FUNC); - rc = (jintLong)gdk_pixbuf_get_pixels((const GdkPixbuf *)arg0); - OS_NATIVE_EXIT(env, that, _1gdk_1pixbuf_1get_1pixels_FUNC); - return rc; -} -#endif - -#ifndef NO__1gdk_1pixbuf_1get_1rowstride -JNIEXPORT jint JNICALL OS_NATIVE(_1gdk_1pixbuf_1get_1rowstride) - (JNIEnv *env, jclass that, jintLong arg0) -{ - jint rc = 0; - OS_NATIVE_ENTER(env, that, _1gdk_1pixbuf_1get_1rowstride_FUNC); - rc = (jint)gdk_pixbuf_get_rowstride((const GdkPixbuf *)arg0); - OS_NATIVE_EXIT(env, that, _1gdk_1pixbuf_1get_1rowstride_FUNC); - return rc; -} -#endif - -#ifndef NO__1gdk_1pixbuf_1get_1width -JNIEXPORT jint JNICALL OS_NATIVE(_1gdk_1pixbuf_1get_1width) - (JNIEnv *env, jclass that, jintLong arg0) -{ - jint rc = 0; - OS_NATIVE_ENTER(env, that, _1gdk_1pixbuf_1get_1width_FUNC); - rc = (jint)gdk_pixbuf_get_width((const GdkPixbuf *)arg0); - OS_NATIVE_EXIT(env, that, _1gdk_1pixbuf_1get_1width_FUNC); - return rc; -} -#endif - -#ifndef NO__1gdk_1pixbuf_1loader_1close -JNIEXPORT jboolean JNICALL OS_NATIVE(_1gdk_1pixbuf_1loader_1close) - (JNIEnv *env, jclass that, jintLong arg0, jintLongArray arg1) -{ - jintLong *lparg1=NULL; - jboolean rc = 0; - OS_NATIVE_ENTER(env, that, _1gdk_1pixbuf_1loader_1close_FUNC); - if (arg1) if ((lparg1 = (*env)->GetIntLongArrayElements(env, arg1, NULL)) == NULL) goto fail; - rc = (jboolean)gdk_pixbuf_loader_close((GdkPixbufLoader *)arg0, (GError **)lparg1); -fail: - if (arg1 && lparg1) (*env)->ReleaseIntLongArrayElements(env, arg1, lparg1, 0); - OS_NATIVE_EXIT(env, that, _1gdk_1pixbuf_1loader_1close_FUNC); - return rc; -} -#endif - -#ifndef NO__1gdk_1pixbuf_1loader_1get_1pixbuf -JNIEXPORT jintLong JNICALL OS_NATIVE(_1gdk_1pixbuf_1loader_1get_1pixbuf) - (JNIEnv *env, jclass that, jintLong arg0) -{ - jintLong rc = 0; - OS_NATIVE_ENTER(env, that, _1gdk_1pixbuf_1loader_1get_1pixbuf_FUNC); - rc = (jintLong)gdk_pixbuf_loader_get_pixbuf((GdkPixbufLoader *)arg0); - OS_NATIVE_EXIT(env, that, _1gdk_1pixbuf_1loader_1get_1pixbuf_FUNC); - return rc; -} -#endif - -#ifndef NO__1gdk_1pixbuf_1loader_1new -JNIEXPORT jintLong JNICALL OS_NATIVE(_1gdk_1pixbuf_1loader_1new) - (JNIEnv *env, jclass that) -{ - jintLong rc = 0; - OS_NATIVE_ENTER(env, that, _1gdk_1pixbuf_1loader_1new_FUNC); - rc = (jintLong)gdk_pixbuf_loader_new(); - OS_NATIVE_EXIT(env, that, _1gdk_1pixbuf_1loader_1new_FUNC); - return rc; -} -#endif - -#ifndef NO__1gdk_1pixbuf_1loader_1write -JNIEXPORT jboolean JNICALL OS_NATIVE(_1gdk_1pixbuf_1loader_1write) - (JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jint arg2, jintLongArray arg3) -{ - jintLong *lparg3=NULL; - jboolean rc = 0; - OS_NATIVE_ENTER(env, that, _1gdk_1pixbuf_1loader_1write_FUNC); - if (arg3) if ((lparg3 = (*env)->GetIntLongArrayElements(env, arg3, NULL)) == NULL) goto fail; - rc = (jboolean)gdk_pixbuf_loader_write((GdkPixbufLoader *)arg0, (const guchar *)arg1, (gsize)arg2, (GError **)lparg3); -fail: - if (arg3 && lparg3) (*env)->ReleaseIntLongArrayElements(env, arg3, lparg3, 0); - OS_NATIVE_EXIT(env, that, _1gdk_1pixbuf_1loader_1write_FUNC); - return rc; -} -#endif - -#ifndef NO__1gdk_1pixbuf_1new -JNIEXPORT jintLong JNICALL OS_NATIVE(_1gdk_1pixbuf_1new) - (JNIEnv *env, jclass that, jint arg0, jboolean arg1, jint arg2, jint arg3, jint arg4) -{ - jintLong rc = 0; - OS_NATIVE_ENTER(env, that, _1gdk_1pixbuf_1new_FUNC); - rc = (jintLong)gdk_pixbuf_new((GdkColorspace)arg0, (gboolean)arg1, arg2, arg3, arg4); - OS_NATIVE_EXIT(env, that, _1gdk_1pixbuf_1new_FUNC); - return rc; -} -#endif - -#ifndef NO__1gdk_1pixbuf_1new_1from_1file -JNIEXPORT jintLong JNICALL OS_NATIVE(_1gdk_1pixbuf_1new_1from_1file) - (JNIEnv *env, jclass that, jbyteArray arg0, jintLongArray arg1) -{ - jbyte *lparg0=NULL; - jintLong *lparg1=NULL; - jintLong rc = 0; - OS_NATIVE_ENTER(env, that, _1gdk_1pixbuf_1new_1from_1file_FUNC); - if (arg0) if ((lparg0 = (*env)->GetByteArrayElements(env, arg0, NULL)) == NULL) goto fail; - if (arg1) if ((lparg1 = (*env)->GetIntLongArrayElements(env, arg1, NULL)) == NULL) goto fail; - rc = (jintLong)gdk_pixbuf_new_from_file((const char *)lparg0, (GError**)lparg1); -fail: - if (arg1 && lparg1) (*env)->ReleaseIntLongArrayElements(env, arg1, lparg1, 0); - if (arg0 && lparg0) (*env)->ReleaseByteArrayElements(env, arg0, lparg0, 0); - OS_NATIVE_EXIT(env, that, _1gdk_1pixbuf_1new_1from_1file_FUNC); - return rc; -} -#endif - -#ifndef NO__1gdk_1pixbuf_1save_1to_1bufferv -JNIEXPORT jboolean JNICALL OS_NATIVE(_1gdk_1pixbuf_1save_1to_1bufferv) - (JNIEnv *env, jclass that, jintLong arg0, jintLongArray arg1, jintLongArray arg2, jbyteArray arg3, jintLongArray arg4, jintLongArray arg5, jintLongArray arg6) -{ - jintLong *lparg1=NULL; - jintLong *lparg2=NULL; - jbyte *lparg3=NULL; - jintLong *lparg4=NULL; - jintLong *lparg5=NULL; - jintLong *lparg6=NULL; - jboolean rc = 0; - OS_NATIVE_ENTER(env, that, _1gdk_1pixbuf_1save_1to_1bufferv_FUNC); - if (arg1) if ((lparg1 = (*env)->GetIntLongArrayElements(env, arg1, NULL)) == NULL) goto fail; - if (arg2) if ((lparg2 = (*env)->GetIntLongArrayElements(env, arg2, NULL)) == NULL) goto fail; - if (arg3) if ((lparg3 = (*env)->GetByteArrayElements(env, arg3, NULL)) == NULL) goto fail; - if (arg4) if ((lparg4 = (*env)->GetIntLongArrayElements(env, arg4, NULL)) == NULL) goto fail; - if (arg5) if ((lparg5 = (*env)->GetIntLongArrayElements(env, arg5, NULL)) == NULL) goto fail; - if (arg6) if ((lparg6 = (*env)->GetIntLongArrayElements(env, arg6, NULL)) == NULL) goto fail; -/* - rc = (jboolean)gdk_pixbuf_save_to_bufferv((GdkPixbuf *)arg0, (gchar **)lparg1, (gsize *)lparg2, (const char *)lparg3, (char **)lparg4, (char **)lparg5, (GError **)lparg6); -*/ - { - OS_LOAD_FUNCTION(fp, gdk_pixbuf_save_to_bufferv) - if (fp) { - rc = (jboolean)((jboolean (CALLING_CONVENTION*)(GdkPixbuf *, gchar **, gsize *, const char *, char **, char **, GError **))fp)((GdkPixbuf *)arg0, (gchar **)lparg1, (gsize *)lparg2, (const char *)lparg3, (char **)lparg4, (char **)lparg5, (GError **)lparg6); - } - } -fail: - if (arg6 && lparg6) (*env)->ReleaseIntLongArrayElements(env, arg6, lparg6, 0); - if (arg5 && lparg5) (*env)->ReleaseIntLongArrayElements(env, arg5, lparg5, 0); - if (arg4 && lparg4) (*env)->ReleaseIntLongArrayElements(env, arg4, lparg4, 0); - if (arg3 && lparg3) (*env)->ReleaseByteArrayElements(env, arg3, lparg3, 0); - if (arg2 && lparg2) (*env)->ReleaseIntLongArrayElements(env, arg2, lparg2, 0); - if (arg1 && lparg1) (*env)->ReleaseIntLongArrayElements(env, arg1, lparg1, 0); - OS_NATIVE_EXIT(env, that, _1gdk_1pixbuf_1save_1to_1bufferv_FUNC); - return rc; -} -#endif - -#ifndef NO__1gdk_1pixbuf_1scale_1simple -JNIEXPORT jintLong JNICALL OS_NATIVE(_1gdk_1pixbuf_1scale_1simple) - (JNIEnv *env, jclass that, jintLong arg0, jint arg1, jint arg2, jint arg3) -{ - jintLong rc = 0; - OS_NATIVE_ENTER(env, that, _1gdk_1pixbuf_1scale_1simple_FUNC); - rc = (jintLong)gdk_pixbuf_scale_simple((const GdkPixbuf *)arg0, arg1, arg2, (GdkInterpType)arg3); - OS_NATIVE_EXIT(env, that, _1gdk_1pixbuf_1scale_1simple_FUNC); - return rc; -} -#endif - -#ifndef NO__1gdk_1pixmap_1get_1size -JNIEXPORT void JNICALL OS_NATIVE(_1gdk_1pixmap_1get_1size) - (JNIEnv *env, jclass that, jintLong arg0, jintArray arg1, jintArray arg2) -{ - jint *lparg1=NULL; - jint *lparg2=NULL; - OS_NATIVE_ENTER(env, that, _1gdk_1pixmap_1get_1size_FUNC); - if (arg1) if ((lparg1 = (*env)->GetPrimitiveArrayCritical(env, arg1, NULL)) == NULL) goto fail; - if (arg2) if ((lparg2 = (*env)->GetPrimitiveArrayCritical(env, arg2, NULL)) == NULL) goto fail; -/* - gdk_pixmap_get_size(arg0, (gint *)lparg1, (gint *)lparg2); -*/ - { - OS_LOAD_FUNCTION(fp, gdk_pixmap_get_size) - if (fp) { - ((void (CALLING_CONVENTION*)(jintLong, gint *, gint *))fp)(arg0, (gint *)lparg1, (gint *)lparg2); - } - } -fail: - if (arg2 && lparg2) (*env)->ReleasePrimitiveArrayCritical(env, arg2, lparg2, 0); - if (arg1 && lparg1) (*env)->ReleasePrimitiveArrayCritical(env, arg1, lparg1, 0); - OS_NATIVE_EXIT(env, that, _1gdk_1pixmap_1get_1size_FUNC); -} -#endif - -#ifndef NO__1gdk_1pixmap_1new -JNIEXPORT jintLong JNICALL OS_NATIVE(_1gdk_1pixmap_1new) - (JNIEnv *env, jclass that, jintLong arg0, jint arg1, jint arg2, jint arg3) -{ - jintLong rc = 0; - OS_NATIVE_ENTER(env, that, _1gdk_1pixmap_1new_FUNC); -/* - rc = (jintLong)gdk_pixmap_new((GdkWindow *)arg0, (gint)arg1, (gint)arg2, (gint)arg3); -*/ - { - OS_LOAD_FUNCTION(fp, gdk_pixmap_new) - if (fp) { - rc = (jintLong)((jintLong (CALLING_CONVENTION*)(GdkWindow *, gint, gint, gint))fp)((GdkWindow *)arg0, (gint)arg1, (gint)arg2, (gint)arg3); - } - } - OS_NATIVE_EXIT(env, that, _1gdk_1pixmap_1new_FUNC); - return rc; -} -#endif - -#ifndef NO__1gdk_1pointer_1grab -JNIEXPORT jint JNICALL OS_NATIVE(_1gdk_1pointer_1grab) - (JNIEnv *env, jclass that, jintLong arg0, jboolean arg1, jint arg2, jintLong arg3, jintLong arg4, jint arg5) -{ - jint rc = 0; - OS_NATIVE_ENTER(env, that, _1gdk_1pointer_1grab_FUNC); -/* - rc = (jint)gdk_pointer_grab((GdkWindow *)arg0, (gboolean)arg1, (GdkEventMask)arg2, (GdkWindow *)arg3, (GdkCursor *)arg4, (guint32)arg5); -*/ - { - OS_LOAD_FUNCTION(fp, gdk_pointer_grab) - if (fp) { - rc = (jint)((jint (CALLING_CONVENTION*)(GdkWindow *, gboolean, GdkEventMask, GdkWindow *, GdkCursor *, guint32))fp)((GdkWindow *)arg0, (gboolean)arg1, (GdkEventMask)arg2, (GdkWindow *)arg3, (GdkCursor *)arg4, (guint32)arg5); - } - } - OS_NATIVE_EXIT(env, that, _1gdk_1pointer_1grab_FUNC); - return rc; -} -#endif - -#ifndef NO__1gdk_1pointer_1ungrab -JNIEXPORT void JNICALL OS_NATIVE(_1gdk_1pointer_1ungrab) - (JNIEnv *env, jclass that, jint arg0) -{ - OS_NATIVE_ENTER(env, that, _1gdk_1pointer_1ungrab_FUNC); -/* - gdk_pointer_ungrab((guint32)arg0); -*/ - { - OS_LOAD_FUNCTION(fp, gdk_pointer_ungrab) - if (fp) { - ((void (CALLING_CONVENTION*)(guint32))fp)((guint32)arg0); - } - } - OS_NATIVE_EXIT(env, that, _1gdk_1pointer_1ungrab_FUNC); -} -#endif - -#ifndef NO__1gdk_1property_1get -JNIEXPORT jboolean JNICALL OS_NATIVE(_1gdk_1property_1get) - (JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jintLong arg2, jintLong arg3, jintLong arg4, jint arg5, jintLongArray arg6, jintArray arg7, jintArray arg8, jintLongArray arg9) -{ - jintLong *lparg6=NULL; - jint *lparg7=NULL; - jint *lparg8=NULL; - jintLong *lparg9=NULL; - jboolean rc = 0; - OS_NATIVE_ENTER(env, that, _1gdk_1property_1get_FUNC); - if (arg6) if ((lparg6 = (*env)->GetIntLongArrayElements(env, arg6, NULL)) == NULL) goto fail; - if (arg7) if ((lparg7 = (*env)->GetIntArrayElements(env, arg7, NULL)) == NULL) goto fail; - if (arg8) if ((lparg8 = (*env)->GetIntArrayElements(env, arg8, NULL)) == NULL) goto fail; - if (arg9) if ((lparg9 = (*env)->GetIntLongArrayElements(env, arg9, NULL)) == NULL) goto fail; - rc = (jboolean)gdk_property_get((GdkWindow *)arg0, (GdkAtom)arg1, (GdkAtom)arg2, arg3, arg4, arg5, (GdkAtom *)lparg6, (gint *)lparg7, (gint *)lparg8, (guchar **)lparg9); -fail: - if (arg9 && lparg9) (*env)->ReleaseIntLongArrayElements(env, arg9, lparg9, 0); - if (arg8 && lparg8) (*env)->ReleaseIntArrayElements(env, arg8, lparg8, 0); - if (arg7 && lparg7) (*env)->ReleaseIntArrayElements(env, arg7, lparg7, 0); - if (arg6 && lparg6) (*env)->ReleaseIntLongArrayElements(env, arg6, lparg6, 0); - OS_NATIVE_EXIT(env, that, _1gdk_1property_1get_FUNC); - return rc; -} -#endif - -#ifndef NO__1gdk_1region_1destroy -JNIEXPORT void JNICALL OS_NATIVE(_1gdk_1region_1destroy) - (JNIEnv *env, jclass that, jintLong arg0) -{ - OS_NATIVE_ENTER(env, that, _1gdk_1region_1destroy_FUNC); - gdk_region_destroy((GdkRegion *)arg0); - OS_NATIVE_EXIT(env, that, _1gdk_1region_1destroy_FUNC); -} -#endif - -#ifndef NO__1gdk_1region_1empty -JNIEXPORT jboolean JNICALL OS_NATIVE(_1gdk_1region_1empty) - (JNIEnv *env, jclass that, jintLong arg0) -{ - jboolean rc = 0; - OS_NATIVE_ENTER(env, that, _1gdk_1region_1empty_FUNC); - rc = (jboolean)gdk_region_empty((GdkRegion *)arg0); - OS_NATIVE_EXIT(env, that, _1gdk_1region_1empty_FUNC); - return rc; -} -#endif - -#ifndef NO__1gdk_1region_1get_1clipbox -JNIEXPORT void JNICALL OS_NATIVE(_1gdk_1region_1get_1clipbox) - (JNIEnv *env, jclass that, jintLong arg0, jobject arg1) -{ - GdkRectangle _arg1, *lparg1=NULL; - OS_NATIVE_ENTER(env, that, _1gdk_1region_1get_1clipbox_FUNC); - if (arg1) if ((lparg1 = &_arg1) == NULL) goto fail; - gdk_region_get_clipbox((GdkRegion *)arg0, (GdkRectangle *)lparg1); -fail: - if (arg1 && lparg1) setGdkRectangleFields(env, arg1, lparg1); - OS_NATIVE_EXIT(env, that, _1gdk_1region_1get_1clipbox_FUNC); -} -#endif - -#ifndef NO__1gdk_1region_1get_1rectangles -JNIEXPORT void JNICALL OS_NATIVE(_1gdk_1region_1get_1rectangles) - (JNIEnv *env, jclass that, jintLong arg0, jintLongArray arg1, jintArray arg2) -{ - jintLong *lparg1=NULL; - jint *lparg2=NULL; - OS_NATIVE_ENTER(env, that, _1gdk_1region_1get_1rectangles_FUNC); - if (arg1) if ((lparg1 = (*env)->GetIntLongArrayElements(env, arg1, NULL)) == NULL) goto fail; - if (arg2) if ((lparg2 = (*env)->GetIntArrayElements(env, arg2, NULL)) == NULL) goto fail; -/* - gdk_region_get_rectangles(arg0, lparg1, (gint *)lparg2); -*/ - { - OS_LOAD_FUNCTION(fp, gdk_region_get_rectangles) - if (fp) { - ((void (CALLING_CONVENTION*)(jintLong, jintLong *, gint *))fp)(arg0, lparg1, (gint *)lparg2); - } - } -fail: - if (arg2 && lparg2) (*env)->ReleaseIntArrayElements(env, arg2, lparg2, 0); - if (arg1 && lparg1) (*env)->ReleaseIntLongArrayElements(env, arg1, lparg1, 0); - OS_NATIVE_EXIT(env, that, _1gdk_1region_1get_1rectangles_FUNC); -} -#endif - -#ifndef NO__1gdk_1region_1intersect -JNIEXPORT void JNICALL OS_NATIVE(_1gdk_1region_1intersect) - (JNIEnv *env, jclass that, jintLong arg0, jintLong arg1) -{ - OS_NATIVE_ENTER(env, that, _1gdk_1region_1intersect_FUNC); - gdk_region_intersect((GdkRegion *)arg0, (GdkRegion *)arg1); - OS_NATIVE_EXIT(env, that, _1gdk_1region_1intersect_FUNC); -} -#endif - -#ifndef NO__1gdk_1region_1new -JNIEXPORT jintLong JNICALL OS_NATIVE(_1gdk_1region_1new) - (JNIEnv *env, jclass that) -{ - jintLong rc = 0; - OS_NATIVE_ENTER(env, that, _1gdk_1region_1new_FUNC); - rc = (jintLong)gdk_region_new(); - OS_NATIVE_EXIT(env, that, _1gdk_1region_1new_FUNC); - return rc; -} -#endif - -#ifndef NO__1gdk_1region_1offset -JNIEXPORT void JNICALL OS_NATIVE(_1gdk_1region_1offset) - (JNIEnv *env, jclass that, jintLong arg0, jint arg1, jint arg2) -{ - OS_NATIVE_ENTER(env, that, _1gdk_1region_1offset_FUNC); - gdk_region_offset((GdkRegion *)arg0, (gint)arg1, (gint)arg2); - OS_NATIVE_EXIT(env, that, _1gdk_1region_1offset_FUNC); -} -#endif - -#ifndef NO__1gdk_1region_1point_1in -JNIEXPORT jboolean JNICALL OS_NATIVE(_1gdk_1region_1point_1in) - (JNIEnv *env, jclass that, jintLong arg0, jint arg1, jint arg2) -{ - jboolean rc = 0; - OS_NATIVE_ENTER(env, that, _1gdk_1region_1point_1in_FUNC); - rc = (jboolean)gdk_region_point_in((GdkRegion *)arg0, (gint)arg1, (gint)arg2); - OS_NATIVE_EXIT(env, that, _1gdk_1region_1point_1in_FUNC); - return rc; -} -#endif - -#ifndef NO__1gdk_1region_1polygon -JNIEXPORT jintLong JNICALL OS_NATIVE(_1gdk_1region_1polygon) - (JNIEnv *env, jclass that, jintArray arg0, jint arg1, jint arg2) -{ - jint *lparg0=NULL; - jintLong rc = 0; - OS_NATIVE_ENTER(env, that, _1gdk_1region_1polygon_FUNC); - if (arg0) if ((lparg0 = (*env)->GetIntArrayElements(env, arg0, NULL)) == NULL) goto fail; -/* - rc = (jintLong)gdk_region_polygon(lparg0, arg1, arg2); -*/ - { - OS_LOAD_FUNCTION(fp, gdk_region_polygon) - if (fp) { - rc = (jintLong)((jintLong (CALLING_CONVENTION*)(jint *, jint, jint))fp)(lparg0, arg1, arg2); - } - } -fail: - if (arg0 && lparg0) (*env)->ReleaseIntArrayElements(env, arg0, lparg0, 0); - OS_NATIVE_EXIT(env, that, _1gdk_1region_1polygon_FUNC); - return rc; -} -#endif - -#ifndef NO__1gdk_1region_1rect_1in -JNIEXPORT jintLong JNICALL OS_NATIVE(_1gdk_1region_1rect_1in) - (JNIEnv *env, jclass that, jintLong arg0, jobject arg1) -{ - GdkRectangle _arg1, *lparg1=NULL; - jintLong rc = 0; - OS_NATIVE_ENTER(env, that, _1gdk_1region_1rect_1in_FUNC); - if (arg1) if ((lparg1 = getGdkRectangleFields(env, arg1, &_arg1)) == NULL) goto fail; - rc = (jintLong)gdk_region_rect_in((GdkRegion *)arg0, (GdkRectangle *)lparg1); -fail: - OS_NATIVE_EXIT(env, that, _1gdk_1region_1rect_1in_FUNC); - return rc; -} -#endif - -#ifndef NO__1gdk_1region_1rectangle -JNIEXPORT jintLong JNICALL OS_NATIVE(_1gdk_1region_1rectangle) - (JNIEnv *env, jclass that, jobject arg0) -{ - GdkRectangle _arg0, *lparg0=NULL; - jintLong rc = 0; - OS_NATIVE_ENTER(env, that, _1gdk_1region_1rectangle_FUNC); - if (arg0) if ((lparg0 = getGdkRectangleFields(env, arg0, &_arg0)) == NULL) goto fail; - rc = (jintLong)gdk_region_rectangle(lparg0); -fail: - OS_NATIVE_EXIT(env, that, _1gdk_1region_1rectangle_FUNC); - return rc; -} -#endif - -#ifndef NO__1gdk_1region_1subtract -JNIEXPORT void JNICALL OS_NATIVE(_1gdk_1region_1subtract) - (JNIEnv *env, jclass that, jintLong arg0, jintLong arg1) -{ - OS_NATIVE_ENTER(env, that, _1gdk_1region_1subtract_FUNC); - gdk_region_subtract((GdkRegion *)arg0, (GdkRegion *)arg1); - OS_NATIVE_EXIT(env, that, _1gdk_1region_1subtract_FUNC); -} -#endif - -#ifndef NO__1gdk_1region_1union -JNIEXPORT void JNICALL OS_NATIVE(_1gdk_1region_1union) - (JNIEnv *env, jclass that, jintLong arg0, jintLong arg1) -{ - OS_NATIVE_ENTER(env, that, _1gdk_1region_1union_FUNC); - gdk_region_union((GdkRegion *)arg0, (GdkRegion *)arg1); - OS_NATIVE_EXIT(env, that, _1gdk_1region_1union_FUNC); -} -#endif - -#ifndef NO__1gdk_1region_1union_1with_1rect -JNIEXPORT void JNICALL OS_NATIVE(_1gdk_1region_1union_1with_1rect) - (JNIEnv *env, jclass that, jintLong arg0, jobject arg1) -{ - GdkRectangle _arg1, *lparg1=NULL; - OS_NATIVE_ENTER(env, that, _1gdk_1region_1union_1with_1rect_FUNC); - if (arg1) if ((lparg1 = getGdkRectangleFields(env, arg1, &_arg1)) == NULL) goto fail; - gdk_region_union_with_rect((GdkRegion *)arg0, (GdkRectangle *)lparg1); -fail: - OS_NATIVE_EXIT(env, that, _1gdk_1region_1union_1with_1rect_FUNC); -} -#endif - -#ifndef NO__1gdk_1rgba_1free -JNIEXPORT void JNICALL OS_NATIVE(_1gdk_1rgba_1free) - (JNIEnv *env, jclass that, jintLong arg0) -{ - OS_NATIVE_ENTER(env, that, _1gdk_1rgba_1free_FUNC); -/* - gdk_rgba_free((GdkRGBA *)arg0); -*/ - { - OS_LOAD_FUNCTION(fp, gdk_rgba_free) - if (fp) { - ((void (CALLING_CONVENTION*)(GdkRGBA *))fp)((GdkRGBA *)arg0); - } - } - OS_NATIVE_EXIT(env, that, _1gdk_1rgba_1free_FUNC); -} -#endif - -#ifndef NO__1gdk_1rgba_1hash -JNIEXPORT jint JNICALL OS_NATIVE(_1gdk_1rgba_1hash) - (JNIEnv *env, jclass that, jobject arg0) -{ - GdkRGBA _arg0, *lparg0=NULL; - jint rc = 0; - OS_NATIVE_ENTER(env, that, _1gdk_1rgba_1hash_FUNC); - if (arg0) if ((lparg0 = getGdkRGBAFields(env, arg0, &_arg0)) == NULL) goto fail; -/* - rc = (jint)gdk_rgba_hash((GdkRGBA *)lparg0); -*/ - { - OS_LOAD_FUNCTION(fp, gdk_rgba_hash) - if (fp) { - rc = (jint)((jint (CALLING_CONVENTION*)(GdkRGBA *))fp)((GdkRGBA *)lparg0); - } - } -fail: - if (arg0 && lparg0) setGdkRGBAFields(env, arg0, lparg0); - OS_NATIVE_EXIT(env, that, _1gdk_1rgba_1hash_FUNC); - return rc; -} -#endif - -#ifndef NO__1gdk_1rgba_1parse -JNIEXPORT jintLong JNICALL OS_NATIVE(_1gdk_1rgba_1parse) - (JNIEnv *env, jclass that, jobject arg0, jbyteArray arg1) -{ - GdkRGBA _arg0, *lparg0=NULL; - jbyte *lparg1=NULL; - jintLong rc = 0; - OS_NATIVE_ENTER(env, that, _1gdk_1rgba_1parse_FUNC); - if (arg0) if ((lparg0 = getGdkRGBAFields(env, arg0, &_arg0)) == NULL) goto fail; - if (arg1) if ((lparg1 = (*env)->GetByteArrayElements(env, arg1, NULL)) == NULL) goto fail; -/* - rc = (jintLong)gdk_rgba_parse((GdkRGBA *)lparg0, (const gchar *)lparg1); -*/ - { - OS_LOAD_FUNCTION(fp, gdk_rgba_parse) - if (fp) { - rc = (jintLong)((jintLong (CALLING_CONVENTION*)(GdkRGBA *, const gchar *))fp)((GdkRGBA *)lparg0, (const gchar *)lparg1); - } - } -fail: - if (arg1 && lparg1) (*env)->ReleaseByteArrayElements(env, arg1, lparg1, 0); - if (arg0 && lparg0) setGdkRGBAFields(env, arg0, lparg0); - OS_NATIVE_EXIT(env, that, _1gdk_1rgba_1parse_FUNC); - return rc; -} -#endif - -#ifndef NO__1gdk_1rgba_1to_1string -JNIEXPORT jintLong JNICALL OS_NATIVE(_1gdk_1rgba_1to_1string) - (JNIEnv *env, jclass that, jobject arg0) -{ - GdkRGBA _arg0, *lparg0=NULL; - jintLong rc = 0; - OS_NATIVE_ENTER(env, that, _1gdk_1rgba_1to_1string_FUNC); - if (arg0) if ((lparg0 = getGdkRGBAFields(env, arg0, &_arg0)) == NULL) goto fail; -/* - rc = (jintLong)gdk_rgba_to_string((GdkRGBA *)lparg0); -*/ - { - OS_LOAD_FUNCTION(fp, gdk_rgba_to_string) - if (fp) { - rc = (jintLong)((jintLong (CALLING_CONVENTION*)(GdkRGBA *))fp)((GdkRGBA *)lparg0); - } - } -fail: - if (arg0 && lparg0) setGdkRGBAFields(env, arg0, lparg0); - OS_NATIVE_EXIT(env, that, _1gdk_1rgba_1to_1string_FUNC); - return rc; -} -#endif - -#ifndef NO__1gdk_1screen_1get_1active_1window -JNIEXPORT jintLong JNICALL OS_NATIVE(_1gdk_1screen_1get_1active_1window) - (JNIEnv *env, jclass that, jintLong arg0) -{ - jintLong rc = 0; - OS_NATIVE_ENTER(env, that, _1gdk_1screen_1get_1active_1window_FUNC); - rc = (jintLong)gdk_screen_get_active_window((GdkScreen *)arg0); - OS_NATIVE_EXIT(env, that, _1gdk_1screen_1get_1active_1window_FUNC); - return rc; -} -#endif - -#ifndef NO__1gdk_1screen_1get_1default -JNIEXPORT jintLong JNICALL OS_NATIVE(_1gdk_1screen_1get_1default) - (JNIEnv *env, jclass that) -{ - jintLong rc = 0; - OS_NATIVE_ENTER(env, that, _1gdk_1screen_1get_1default_FUNC); -/* - rc = (jintLong)gdk_screen_get_default(); -*/ - { - OS_LOAD_FUNCTION(fp, gdk_screen_get_default) - if (fp) { - rc = (jintLong)((jintLong (CALLING_CONVENTION*)())fp)(); - } - } - OS_NATIVE_EXIT(env, that, _1gdk_1screen_1get_1default_FUNC); - return rc; -} -#endif - -#ifndef NO__1gdk_1screen_1get_1monitor_1at_1point -JNIEXPORT jint JNICALL OS_NATIVE(_1gdk_1screen_1get_1monitor_1at_1point) - (JNIEnv *env, jclass that, jintLong arg0, jint arg1, jint arg2) -{ - jint rc = 0; - OS_NATIVE_ENTER(env, that, _1gdk_1screen_1get_1monitor_1at_1point_FUNC); -/* - rc = (jint)gdk_screen_get_monitor_at_point((GdkScreen *)arg0, (gint)arg1, (gint)arg2); -*/ - { - OS_LOAD_FUNCTION(fp, gdk_screen_get_monitor_at_point) - if (fp) { - rc = (jint)((jint (CALLING_CONVENTION*)(GdkScreen *, gint, gint))fp)((GdkScreen *)arg0, (gint)arg1, (gint)arg2); - } - } - OS_NATIVE_EXIT(env, that, _1gdk_1screen_1get_1monitor_1at_1point_FUNC); - return rc; -} -#endif - -#ifndef NO__1gdk_1screen_1get_1monitor_1at_1window -JNIEXPORT jint JNICALL OS_NATIVE(_1gdk_1screen_1get_1monitor_1at_1window) - (JNIEnv *env, jclass that, jintLong arg0, jintLong arg1) -{ - jint rc = 0; - OS_NATIVE_ENTER(env, that, _1gdk_1screen_1get_1monitor_1at_1window_FUNC); -/* - rc = (jint)gdk_screen_get_monitor_at_window((GdkScreen *)arg0, (GdkWindow *)arg1); -*/ - { - OS_LOAD_FUNCTION(fp, gdk_screen_get_monitor_at_window) - if (fp) { - rc = (jint)((jint (CALLING_CONVENTION*)(GdkScreen *, GdkWindow *))fp)((GdkScreen *)arg0, (GdkWindow *)arg1); - } - } - OS_NATIVE_EXIT(env, that, _1gdk_1screen_1get_1monitor_1at_1window_FUNC); - return rc; -} -#endif - -#ifndef NO__1gdk_1screen_1get_1monitor_1geometry -JNIEXPORT void JNICALL OS_NATIVE(_1gdk_1screen_1get_1monitor_1geometry) - (JNIEnv *env, jclass that, jintLong arg0, jint arg1, jobject arg2) -{ - GdkRectangle _arg2, *lparg2=NULL; - OS_NATIVE_ENTER(env, that, _1gdk_1screen_1get_1monitor_1geometry_FUNC); - if (arg2) if ((lparg2 = &_arg2) == NULL) goto fail; -/* - gdk_screen_get_monitor_geometry((GdkScreen *)arg0, arg1, lparg2); -*/ - { - OS_LOAD_FUNCTION(fp, gdk_screen_get_monitor_geometry) - if (fp) { - ((void (CALLING_CONVENTION*)(GdkScreen *, jint, GdkRectangle *))fp)((GdkScreen *)arg0, arg1, lparg2); - } - } -fail: - if (arg2 && lparg2) setGdkRectangleFields(env, arg2, lparg2); - OS_NATIVE_EXIT(env, that, _1gdk_1screen_1get_1monitor_1geometry_FUNC); -} -#endif - -#ifndef NO__1gdk_1screen_1get_1monitor_1scale_1factor -JNIEXPORT jint JNICALL OS_NATIVE(_1gdk_1screen_1get_1monitor_1scale_1factor) - (JNIEnv *env, jclass that, jintLong arg0, jint arg1) -{ - jint rc = 0; - OS_NATIVE_ENTER(env, that, _1gdk_1screen_1get_1monitor_1scale_1factor_FUNC); -/* - rc = (jint)gdk_screen_get_monitor_scale_factor((GdkScreen *)arg0, (gint)arg1); -*/ - { - OS_LOAD_FUNCTION(fp, gdk_screen_get_monitor_scale_factor) - if (fp) { - rc = (jint)((jint (CALLING_CONVENTION*)(GdkScreen *, gint))fp)((GdkScreen *)arg0, (gint)arg1); - } - } - OS_NATIVE_EXIT(env, that, _1gdk_1screen_1get_1monitor_1scale_1factor_FUNC); - return rc; -} -#endif - -#ifndef NO__1gdk_1screen_1get_1monitor_1width_1mm -JNIEXPORT jint JNICALL OS_NATIVE(_1gdk_1screen_1get_1monitor_1width_1mm) - (JNIEnv *env, jclass that, jintLong arg0, jint arg1) -{ - jint rc = 0; - OS_NATIVE_ENTER(env, that, _1gdk_1screen_1get_1monitor_1width_1mm_FUNC); -/* - rc = (jint)gdk_screen_get_monitor_width_mm((GdkScreen *)arg0, arg1); -*/ - { - OS_LOAD_FUNCTION(fp, gdk_screen_get_monitor_width_mm) - if (fp) { - rc = (jint)((jint (CALLING_CONVENTION*)(GdkScreen *, jint))fp)((GdkScreen *)arg0, arg1); - } - } - OS_NATIVE_EXIT(env, that, _1gdk_1screen_1get_1monitor_1width_1mm_FUNC); - return rc; -} -#endif - -#ifndef NO__1gdk_1screen_1get_1monitor_1workarea -JNIEXPORT void JNICALL OS_NATIVE(_1gdk_1screen_1get_1monitor_1workarea) - (JNIEnv *env, jclass that, jintLong arg0, jint arg1, jobject arg2) -{ - GdkRectangle _arg2, *lparg2=NULL; - OS_NATIVE_ENTER(env, that, _1gdk_1screen_1get_1monitor_1workarea_FUNC); - if (arg2) if ((lparg2 = &_arg2) == NULL) goto fail; -/* - gdk_screen_get_monitor_workarea((GdkScreen *)arg0, arg1, lparg2); -*/ - { - OS_LOAD_FUNCTION(fp, gdk_screen_get_monitor_workarea) - if (fp) { - ((void (CALLING_CONVENTION*)(GdkScreen *, jint, GdkRectangle *))fp)((GdkScreen *)arg0, arg1, lparg2); - } - } -fail: - if (arg2 && lparg2) setGdkRectangleFields(env, arg2, lparg2); - OS_NATIVE_EXIT(env, that, _1gdk_1screen_1get_1monitor_1workarea_FUNC); -} -#endif - -#ifndef NO__1gdk_1screen_1get_1n_1monitors -JNIEXPORT jint JNICALL OS_NATIVE(_1gdk_1screen_1get_1n_1monitors) - (JNIEnv *env, jclass that, jintLong arg0) -{ - jint rc = 0; - OS_NATIVE_ENTER(env, that, _1gdk_1screen_1get_1n_1monitors_FUNC); -/* - rc = (jint)gdk_screen_get_n_monitors((GdkScreen *)arg0); -*/ - { - OS_LOAD_FUNCTION(fp, gdk_screen_get_n_monitors) - if (fp) { - rc = (jint)((jint (CALLING_CONVENTION*)(GdkScreen *))fp)((GdkScreen *)arg0); - } - } - OS_NATIVE_EXIT(env, that, _1gdk_1screen_1get_1n_1monitors_FUNC); - return rc; -} -#endif - -#ifndef NO__1gdk_1screen_1get_1primary_1monitor -JNIEXPORT jint JNICALL OS_NATIVE(_1gdk_1screen_1get_1primary_1monitor) - (JNIEnv *env, jclass that, jintLong arg0) -{ - jint rc = 0; - OS_NATIVE_ENTER(env, that, _1gdk_1screen_1get_1primary_1monitor_FUNC); -/* - rc = (jint)gdk_screen_get_primary_monitor((GdkScreen *)arg0); -*/ - { - OS_LOAD_FUNCTION(fp, gdk_screen_get_primary_monitor) - if (fp) { - rc = (jint)((jint (CALLING_CONVENTION*)(GdkScreen *))fp)((GdkScreen *)arg0); - } - } - OS_NATIVE_EXIT(env, that, _1gdk_1screen_1get_1primary_1monitor_FUNC); - return rc; -} -#endif - -#ifndef NO__1gdk_1screen_1get_1resolution -JNIEXPORT jdouble JNICALL OS_NATIVE(_1gdk_1screen_1get_1resolution) - (JNIEnv *env, jclass that, jintLong arg0) -{ - jdouble rc = 0; - OS_NATIVE_ENTER(env, that, _1gdk_1screen_1get_1resolution_FUNC); -/* - rc = (jdouble)gdk_screen_get_resolution((GdkScreen *)arg0); -*/ - { - OS_LOAD_FUNCTION(fp, gdk_screen_get_resolution) - if (fp) { - rc = (jdouble)((jdouble (CALLING_CONVENTION*)(GdkScreen *))fp)((GdkScreen *)arg0); - } - } - OS_NATIVE_EXIT(env, that, _1gdk_1screen_1get_1resolution_FUNC); - return rc; -} -#endif - -#ifndef NO__1gdk_1screen_1height -JNIEXPORT jint JNICALL OS_NATIVE(_1gdk_1screen_1height) - (JNIEnv *env, jclass that) -{ - jint rc = 0; - OS_NATIVE_ENTER(env, that, _1gdk_1screen_1height_FUNC); - rc = (jint)gdk_screen_height(); - OS_NATIVE_EXIT(env, that, _1gdk_1screen_1height_FUNC); - return rc; -} -#endif - -#ifndef NO__1gdk_1screen_1width -JNIEXPORT jint JNICALL OS_NATIVE(_1gdk_1screen_1width) - (JNIEnv *env, jclass that) -{ - jint rc = 0; - OS_NATIVE_ENTER(env, that, _1gdk_1screen_1width_FUNC); - rc = (jint)gdk_screen_width(); - OS_NATIVE_EXIT(env, that, _1gdk_1screen_1width_FUNC); - return rc; -} -#endif - -#ifndef NO__1gdk_1screen_1width_1mm -JNIEXPORT jint JNICALL OS_NATIVE(_1gdk_1screen_1width_1mm) - (JNIEnv *env, jclass that) -{ - jint rc = 0; - OS_NATIVE_ENTER(env, that, _1gdk_1screen_1width_1mm_FUNC); - rc = (jint)gdk_screen_width_mm(); - OS_NATIVE_EXIT(env, that, _1gdk_1screen_1width_1mm_FUNC); - return rc; -} -#endif - -#ifndef NO__1gdk_1seat_1get_1pointer -JNIEXPORT jintLong JNICALL OS_NATIVE(_1gdk_1seat_1get_1pointer) - (JNIEnv *env, jclass that, jintLong arg0) -{ - jintLong rc = 0; - OS_NATIVE_ENTER(env, that, _1gdk_1seat_1get_1pointer_FUNC); -/* - rc = (jintLong)gdk_seat_get_pointer(arg0); -*/ - { - OS_LOAD_FUNCTION(fp, gdk_seat_get_pointer) - if (fp) { - rc = (jintLong)((jintLong (CALLING_CONVENTION*)(jintLong))fp)(arg0); - } - } - OS_NATIVE_EXIT(env, that, _1gdk_1seat_1get_1pointer_FUNC); - return rc; -} -#endif - -#ifndef NO__1gdk_1seat_1grab -JNIEXPORT jint JNICALL OS_NATIVE(_1gdk_1seat_1grab) - (JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jint arg2, jboolean arg3, jintLong arg4, jintLong arg5, jintLong arg6, jintLong arg7) -{ - jint rc = 0; - OS_NATIVE_ENTER(env, that, _1gdk_1seat_1grab_FUNC); -/* - rc = (jint)gdk_seat_grab(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7); -*/ - { - OS_LOAD_FUNCTION(fp, gdk_seat_grab) - if (fp) { - rc = (jint)((jint (CALLING_CONVENTION*)(jintLong, jintLong, jint, jboolean, jintLong, jintLong, jintLong, jintLong))fp)(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7); - } - } - OS_NATIVE_EXIT(env, that, _1gdk_1seat_1grab_FUNC); - return rc; -} -#endif - -#ifndef NO__1gdk_1seat_1ungrab -JNIEXPORT void JNICALL OS_NATIVE(_1gdk_1seat_1ungrab) - (JNIEnv *env, jclass that, jintLong arg0) -{ - OS_NATIVE_ENTER(env, that, _1gdk_1seat_1ungrab_FUNC); -/* - gdk_seat_ungrab(arg0); -*/ - { - OS_LOAD_FUNCTION(fp, gdk_seat_ungrab) - if (fp) { - ((void (CALLING_CONVENTION*)(jintLong))fp)(arg0); - } - } - OS_NATIVE_EXIT(env, that, _1gdk_1seat_1ungrab_FUNC); -} -#endif - -#ifndef NO__1gdk_1selection_1owner_1get -JNIEXPORT void JNICALL OS_NATIVE(_1gdk_1selection_1owner_1get) - (JNIEnv *env, jclass that, jintLong arg0) -{ - OS_NATIVE_ENTER(env, that, _1gdk_1selection_1owner_1get_FUNC); - gdk_selection_owner_get((GdkAtom)arg0); - OS_NATIVE_EXIT(env, that, _1gdk_1selection_1owner_1get_FUNC); -} -#endif - -#ifndef NO__1gdk_1selection_1owner_1set -JNIEXPORT void JNICALL OS_NATIVE(_1gdk_1selection_1owner_1set) - (JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jint arg2, jboolean arg3) -{ - OS_NATIVE_ENTER(env, that, _1gdk_1selection_1owner_1set_FUNC); - gdk_selection_owner_set((GdkWindow *)arg0, (GdkAtom)arg1, (guint32)arg2, (gboolean)arg3); - OS_NATIVE_EXIT(env, that, _1gdk_1selection_1owner_1set_FUNC); -} -#endif - -#ifndef NO__1gdk_1set_1program_1class -JNIEXPORT void JNICALL OS_NATIVE(_1gdk_1set_1program_1class) - (JNIEnv *env, jclass that, jbyteArray arg0) -{ - jbyte *lparg0=NULL; - OS_NATIVE_ENTER(env, that, _1gdk_1set_1program_1class_FUNC); - if (arg0) if ((lparg0 = (*env)->GetByteArrayElements(env, arg0, NULL)) == NULL) goto fail; - gdk_set_program_class((const char *)lparg0); -fail: - if (arg0 && lparg0) (*env)->ReleaseByteArrayElements(env, arg0, lparg0, 0); - OS_NATIVE_EXIT(env, that, _1gdk_1set_1program_1class_FUNC); -} -#endif - -#ifndef NO__1gdk_1test_1simulate_1button -JNIEXPORT jboolean JNICALL OS_NATIVE(_1gdk_1test_1simulate_1button) - (JNIEnv *env, jclass that, jintLong arg0, jint arg1, jint arg2, jint arg3, jint arg4, jint arg5) -{ - jboolean rc = 0; - OS_NATIVE_ENTER(env, that, _1gdk_1test_1simulate_1button_FUNC); - rc = (jboolean)gdk_test_simulate_button((GdkWindow *)arg0, (gint)arg1, (gint)arg2, (guint)arg3, (GdkModifierType)arg4, (GdkEventType)arg5); - OS_NATIVE_EXIT(env, that, _1gdk_1test_1simulate_1button_FUNC); - return rc; -} -#endif - -#ifndef NO__1gdk_1text_1property_1to_1utf8_1list_1for_1display -JNIEXPORT jint JNICALL OS_NATIVE(_1gdk_1text_1property_1to_1utf8_1list_1for_1display) - (JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jint arg2, jintLong arg3, jint arg4, jintLongArray arg5) -{ - jintLong *lparg5=NULL; - jint rc = 0; - OS_NATIVE_ENTER(env, that, _1gdk_1text_1property_1to_1utf8_1list_1for_1display_FUNC); - if (arg5) if ((lparg5 = (*env)->GetIntLongArrayElements(env, arg5, NULL)) == NULL) goto fail; - rc = (jint)gdk_text_property_to_utf8_list_for_display((GdkDisplay *)arg0, (GdkAtom)arg1, arg2, (guchar *)arg3, arg4, (gchar ***)lparg5); -fail: - if (arg5 && lparg5) (*env)->ReleaseIntLongArrayElements(env, arg5, lparg5, 0); - OS_NATIVE_EXIT(env, that, _1gdk_1text_1property_1to_1utf8_1list_1for_1display_FUNC); - return rc; -} -#endif - -#ifndef NO__1gdk_1unicode_1to_1keyval -JNIEXPORT jint JNICALL OS_NATIVE(_1gdk_1unicode_1to_1keyval) - (JNIEnv *env, jclass that, jint arg0) -{ - jint rc = 0; - OS_NATIVE_ENTER(env, that, _1gdk_1unicode_1to_1keyval_FUNC); - rc = (jint)gdk_unicode_to_keyval(arg0); - OS_NATIVE_EXIT(env, that, _1gdk_1unicode_1to_1keyval_FUNC); - return rc; -} -#endif - -#ifndef NO__1gdk_1utf8_1to_1string_1target -JNIEXPORT jintLong JNICALL OS_NATIVE(_1gdk_1utf8_1to_1string_1target) - (JNIEnv *env, jclass that, jbyteArray arg0) -{ - jbyte *lparg0=NULL; - jintLong rc = 0; - OS_NATIVE_ENTER(env, that, _1gdk_1utf8_1to_1string_1target_FUNC); - if (arg0) if ((lparg0 = (*env)->GetByteArrayElements(env, arg0, NULL)) == NULL) goto fail; - rc = (jintLong)gdk_utf8_to_string_target((const gchar *)lparg0); -fail: - if (arg0 && lparg0) (*env)->ReleaseByteArrayElements(env, arg0, lparg0, 0); - OS_NATIVE_EXIT(env, that, _1gdk_1utf8_1to_1string_1target_FUNC); - return rc; -} -#endif - -#ifndef NO__1gdk_1visual_1get_1depth -JNIEXPORT jint JNICALL OS_NATIVE(_1gdk_1visual_1get_1depth) - (JNIEnv *env, jclass that, jintLong arg0) -{ - jint rc = 0; - OS_NATIVE_ENTER(env, that, _1gdk_1visual_1get_1depth_FUNC); -/* - rc = (jint)gdk_visual_get_depth((GdkVisual *)arg0); -*/ - { - OS_LOAD_FUNCTION(fp, gdk_visual_get_depth) - if (fp) { - rc = (jint)((jint (CALLING_CONVENTION*)(GdkVisual *))fp)((GdkVisual *)arg0); - } - } - OS_NATIVE_EXIT(env, that, _1gdk_1visual_1get_1depth_FUNC); - return rc; -} -#endif - -#ifndef NO__1gdk_1visual_1get_1system -JNIEXPORT jintLong JNICALL OS_NATIVE(_1gdk_1visual_1get_1system) - (JNIEnv *env, jclass that) -{ - jintLong rc = 0; - OS_NATIVE_ENTER(env, that, _1gdk_1visual_1get_1system_FUNC); - rc = (jintLong)gdk_visual_get_system(); - OS_NATIVE_EXIT(env, that, _1gdk_1visual_1get_1system_FUNC); - return rc; -} -#endif - -#ifndef NO__1gdk_1window_1add_1filter -JNIEXPORT void JNICALL OS_NATIVE(_1gdk_1window_1add_1filter) - (JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jintLong arg2) -{ - OS_NATIVE_ENTER(env, that, _1gdk_1window_1add_1filter_FUNC); - gdk_window_add_filter((GdkWindow *)arg0, (GdkFilterFunc)arg1, (gpointer)arg2); - OS_NATIVE_EXIT(env, that, _1gdk_1window_1add_1filter_FUNC); -} -#endif - -#ifndef NO__1gdk_1window_1at_1pointer -JNIEXPORT jintLong JNICALL OS_NATIVE(_1gdk_1window_1at_1pointer) - (JNIEnv *env, jclass that, jintArray arg0, jintArray arg1) -{ - jint *lparg0=NULL; - jint *lparg1=NULL; - jintLong rc = 0; - OS_NATIVE_ENTER(env, that, _1gdk_1window_1at_1pointer_FUNC); - if (arg0) if ((lparg0 = (*env)->GetIntArrayElements(env, arg0, NULL)) == NULL) goto fail; - if (arg1) if ((lparg1 = (*env)->GetIntArrayElements(env, arg1, NULL)) == NULL) goto fail; -/* - rc = (jintLong)gdk_window_at_pointer((gint *)lparg0, (gint *)lparg1); -*/ - { - OS_LOAD_FUNCTION(fp, gdk_window_at_pointer) - if (fp) { - rc = (jintLong)((jintLong (CALLING_CONVENTION*)(gint *, gint *))fp)((gint *)lparg0, (gint *)lparg1); - } - } -fail: - if (arg1 && lparg1) (*env)->ReleaseIntArrayElements(env, arg1, lparg1, 0); - if (arg0 && lparg0) (*env)->ReleaseIntArrayElements(env, arg0, lparg0, 0); - OS_NATIVE_EXIT(env, that, _1gdk_1window_1at_1pointer_FUNC); - return rc; -} -#endif - -#ifndef NO__1gdk_1window_1begin_1paint_1rect -JNIEXPORT void JNICALL OS_NATIVE(_1gdk_1window_1begin_1paint_1rect) - (JNIEnv *env, jclass that, jintLong arg0, jobject arg1) -{ - GdkRectangle _arg1, *lparg1=NULL; - OS_NATIVE_ENTER(env, that, _1gdk_1window_1begin_1paint_1rect_FUNC); - if (arg1) if ((lparg1 = getGdkRectangleFields(env, arg1, &_arg1)) == NULL) goto fail; - gdk_window_begin_paint_rect((GdkWindow *)arg0, (GdkRectangle *)lparg1); -fail: - OS_NATIVE_EXIT(env, that, _1gdk_1window_1begin_1paint_1rect_FUNC); -} -#endif - -#ifndef NO__1gdk_1window_1create_1similar_1surface -JNIEXPORT jintLong JNICALL OS_NATIVE(_1gdk_1window_1create_1similar_1surface) - (JNIEnv *env, jclass that, jintLong arg0, jint arg1, jint arg2, jint arg3) -{ - jintLong rc = 0; - OS_NATIVE_ENTER(env, that, _1gdk_1window_1create_1similar_1surface_FUNC); -/* - rc = (jintLong)gdk_window_create_similar_surface((GdkWindow *)arg0, arg1, arg2, arg3); -*/ - { - OS_LOAD_FUNCTION(fp, gdk_window_create_similar_surface) - if (fp) { - rc = (jintLong)((jintLong (CALLING_CONVENTION*)(GdkWindow *, jint, jint, jint))fp)((GdkWindow *)arg0, arg1, arg2, arg3); - } - } - OS_NATIVE_EXIT(env, that, _1gdk_1window_1create_1similar_1surface_FUNC); - return rc; -} -#endif - -#ifndef NO__1gdk_1window_1destroy -JNIEXPORT void JNICALL OS_NATIVE(_1gdk_1window_1destroy) - (JNIEnv *env, jclass that, jintLong arg0) -{ - OS_NATIVE_ENTER(env, that, _1gdk_1window_1destroy_FUNC); - gdk_window_destroy((GdkWindow *)arg0); - OS_NATIVE_EXIT(env, that, _1gdk_1window_1destroy_FUNC); -} -#endif - -#ifndef NO__1gdk_1window_1end_1paint -JNIEXPORT void JNICALL OS_NATIVE(_1gdk_1window_1end_1paint) - (JNIEnv *env, jclass that, jintLong arg0) -{ - OS_NATIVE_ENTER(env, that, _1gdk_1window_1end_1paint_FUNC); - gdk_window_end_paint((GdkWindow *)arg0); - OS_NATIVE_EXIT(env, that, _1gdk_1window_1end_1paint_FUNC); -} -#endif - -#ifndef NO__1gdk_1window_1focus -JNIEXPORT void JNICALL OS_NATIVE(_1gdk_1window_1focus) - (JNIEnv *env, jclass that, jintLong arg0, jint arg1) -{ - OS_NATIVE_ENTER(env, that, _1gdk_1window_1focus_FUNC); - gdk_window_focus((GdkWindow *)arg0, arg1); - OS_NATIVE_EXIT(env, that, _1gdk_1window_1focus_FUNC); -} -#endif - -#ifndef NO__1gdk_1window_1get_1children -JNIEXPORT jintLong JNICALL OS_NATIVE(_1gdk_1window_1get_1children) - (JNIEnv *env, jclass that, jintLong arg0) -{ - jintLong rc = 0; - OS_NATIVE_ENTER(env, that, _1gdk_1window_1get_1children_FUNC); - rc = (jintLong)gdk_window_get_children((GdkWindow *)arg0); - OS_NATIVE_EXIT(env, that, _1gdk_1window_1get_1children_FUNC); - return rc; -} -#endif - -#ifndef NO__1gdk_1window_1get_1device_1position -JNIEXPORT jintLong JNICALL OS_NATIVE(_1gdk_1window_1get_1device_1position) - (JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jintArray arg2, jintArray arg3, jintArray arg4) -{ - jint *lparg2=NULL; - jint *lparg3=NULL; - jint *lparg4=NULL; - jintLong rc = 0; - OS_NATIVE_ENTER(env, that, _1gdk_1window_1get_1device_1position_FUNC); - if (arg2) if ((lparg2 = (*env)->GetIntArrayElements(env, arg2, NULL)) == NULL) goto fail; - if (arg3) if ((lparg3 = (*env)->GetIntArrayElements(env, arg3, NULL)) == NULL) goto fail; - if (arg4) if ((lparg4 = (*env)->GetIntArrayElements(env, arg4, NULL)) == NULL) goto fail; -/* - rc = (jintLong)gdk_window_get_device_position((GdkWindow *)arg0, (GdkDevice *)arg1, (gint *)lparg2, (gint *)lparg3, (GdkModifierType *)lparg4); -*/ - { - OS_LOAD_FUNCTION(fp, gdk_window_get_device_position) - if (fp) { - rc = (jintLong)((jintLong (CALLING_CONVENTION*)(GdkWindow *, GdkDevice *, gint *, gint *, GdkModifierType *))fp)((GdkWindow *)arg0, (GdkDevice *)arg1, (gint *)lparg2, (gint *)lparg3, (GdkModifierType *)lparg4); - } - } -fail: - if (arg4 && lparg4) (*env)->ReleaseIntArrayElements(env, arg4, lparg4, 0); - if (arg3 && lparg3) (*env)->ReleaseIntArrayElements(env, arg3, lparg3, 0); - if (arg2 && lparg2) (*env)->ReleaseIntArrayElements(env, arg2, lparg2, 0); - OS_NATIVE_EXIT(env, that, _1gdk_1window_1get_1device_1position_FUNC); - return rc; -} -#endif - -#ifndef NO__1gdk_1window_1get_1display -JNIEXPORT jintLong JNICALL OS_NATIVE(_1gdk_1window_1get_1display) - (JNIEnv *env, jclass that, jintLong arg0) -{ - jintLong rc = 0; - OS_NATIVE_ENTER(env, that, _1gdk_1window_1get_1display_FUNC); -/* - rc = (jintLong)gdk_window_get_display((GdkWindow *)arg0); -*/ - { - OS_LOAD_FUNCTION(fp, gdk_window_get_display) - if (fp) { - rc = (jintLong)((jintLong (CALLING_CONVENTION*)(GdkWindow *))fp)((GdkWindow *)arg0); - } - } - OS_NATIVE_EXIT(env, that, _1gdk_1window_1get_1display_FUNC); - return rc; -} -#endif - -#ifndef NO__1gdk_1window_1get_1events -JNIEXPORT jint JNICALL OS_NATIVE(_1gdk_1window_1get_1events) - (JNIEnv *env, jclass that, jintLong arg0) -{ - jint rc = 0; - OS_NATIVE_ENTER(env, that, _1gdk_1window_1get_1events_FUNC); - rc = (jint)gdk_window_get_events((GdkWindow *)arg0); - OS_NATIVE_EXIT(env, that, _1gdk_1window_1get_1events_FUNC); - return rc; -} -#endif - -#ifndef NO__1gdk_1window_1get_1frame_1extents -JNIEXPORT void JNICALL OS_NATIVE(_1gdk_1window_1get_1frame_1extents) - (JNIEnv *env, jclass that, jintLong arg0, jobject arg1) -{ - GdkRectangle _arg1, *lparg1=NULL; - OS_NATIVE_ENTER(env, that, _1gdk_1window_1get_1frame_1extents_FUNC); - if (arg1) if ((lparg1 = &_arg1) == NULL) goto fail; - gdk_window_get_frame_extents((GdkWindow *)arg0, (GdkRectangle *)lparg1); -fail: - if (arg1 && lparg1) setGdkRectangleFields(env, arg1, lparg1); - OS_NATIVE_EXIT(env, that, _1gdk_1window_1get_1frame_1extents_FUNC); -} -#endif - -#ifndef NO__1gdk_1window_1get_1height -JNIEXPORT jint JNICALL OS_NATIVE(_1gdk_1window_1get_1height) - (JNIEnv *env, jclass that, jintLong arg0) -{ - jint rc = 0; - OS_NATIVE_ENTER(env, that, _1gdk_1window_1get_1height_FUNC); -/* - rc = (jint)gdk_window_get_height((GdkWindow *)arg0); -*/ - { - OS_LOAD_FUNCTION(fp, gdk_window_get_height) - if (fp) { - rc = (jint)((jint (CALLING_CONVENTION*)(GdkWindow *))fp)((GdkWindow *)arg0); - } - } - OS_NATIVE_EXIT(env, that, _1gdk_1window_1get_1height_FUNC); - return rc; -} -#endif - -#ifndef NO__1gdk_1window_1get_1internal_1paint_1info -JNIEXPORT void JNICALL OS_NATIVE(_1gdk_1window_1get_1internal_1paint_1info) - (JNIEnv *env, jclass that, jintLong arg0, jintLongArray arg1, jintArray arg2, jintArray arg3) -{ - jintLong *lparg1=NULL; - jint *lparg2=NULL; - jint *lparg3=NULL; - OS_NATIVE_ENTER(env, that, _1gdk_1window_1get_1internal_1paint_1info_FUNC); - if (arg1) if ((lparg1 = (*env)->GetIntLongArrayElements(env, arg1, NULL)) == NULL) goto fail; - if (arg2) if ((lparg2 = (*env)->GetIntArrayElements(env, arg2, NULL)) == NULL) goto fail; - if (arg3) if ((lparg3 = (*env)->GetIntArrayElements(env, arg3, NULL)) == NULL) goto fail; -/* - gdk_window_get_internal_paint_info((GdkWindow *)arg0, lparg1, (gint *)lparg2, (gint *)lparg3); -*/ - { - OS_LOAD_FUNCTION(fp, gdk_window_get_internal_paint_info) - if (fp) { - ((void (CALLING_CONVENTION*)(GdkWindow *, jintLong *, gint *, gint *))fp)((GdkWindow *)arg0, lparg1, (gint *)lparg2, (gint *)lparg3); - } - } -fail: - if (arg3 && lparg3) (*env)->ReleaseIntArrayElements(env, arg3, lparg3, 0); - if (arg2 && lparg2) (*env)->ReleaseIntArrayElements(env, arg2, lparg2, 0); - if (arg1 && lparg1) (*env)->ReleaseIntLongArrayElements(env, arg1, lparg1, 0); - OS_NATIVE_EXIT(env, that, _1gdk_1window_1get_1internal_1paint_1info_FUNC); -} -#endif - -#ifndef NO__1gdk_1window_1get_1origin -JNIEXPORT jint JNICALL OS_NATIVE(_1gdk_1window_1get_1origin) - (JNIEnv *env, jclass that, jintLong arg0, jintArray arg1, jintArray arg2) -{ - jint *lparg1=NULL; - jint *lparg2=NULL; - jint rc = 0; - OS_NATIVE_ENTER(env, that, _1gdk_1window_1get_1origin_FUNC); - if (arg1) if ((lparg1 = (*env)->GetIntArrayElements(env, arg1, NULL)) == NULL) goto fail; - if (arg2) if ((lparg2 = (*env)->GetIntArrayElements(env, arg2, NULL)) == NULL) goto fail; - rc = (jint)gdk_window_get_origin((GdkWindow *)arg0, (gint *)lparg1, (gint *)lparg2); -fail: - if (arg2 && lparg2) (*env)->ReleaseIntArrayElements(env, arg2, lparg2, 0); - if (arg1 && lparg1) (*env)->ReleaseIntArrayElements(env, arg1, lparg1, 0); - OS_NATIVE_EXIT(env, that, _1gdk_1window_1get_1origin_FUNC); - return rc; -} -#endif - -#ifndef NO__1gdk_1window_1get_1parent -JNIEXPORT jintLong JNICALL OS_NATIVE(_1gdk_1window_1get_1parent) - (JNIEnv *env, jclass that, jintLong arg0) -{ - jintLong rc = 0; - OS_NATIVE_ENTER(env, that, _1gdk_1window_1get_1parent_FUNC); - rc = (jintLong)gdk_window_get_parent((GdkWindow *)arg0); - OS_NATIVE_EXIT(env, that, _1gdk_1window_1get_1parent_FUNC); - return rc; -} -#endif - -#ifndef NO__1gdk_1window_1get_1pointer -JNIEXPORT jintLong JNICALL OS_NATIVE(_1gdk_1window_1get_1pointer) - (JNIEnv *env, jclass that, jintLong arg0, jintArray arg1, jintArray arg2, jintArray arg3) -{ - jint *lparg1=NULL; - jint *lparg2=NULL; - jint *lparg3=NULL; - jintLong rc = 0; - OS_NATIVE_ENTER(env, that, _1gdk_1window_1get_1pointer_FUNC); - if (arg1) if ((lparg1 = (*env)->GetIntArrayElements(env, arg1, NULL)) == NULL) goto fail; - if (arg2) if ((lparg2 = (*env)->GetIntArrayElements(env, arg2, NULL)) == NULL) goto fail; - if (arg3) if ((lparg3 = (*env)->GetIntArrayElements(env, arg3, NULL)) == NULL) goto fail; -/* - rc = (jintLong)gdk_window_get_pointer((GdkWindow *)arg0, (gint *)lparg1, (gint *)lparg2, (GdkModifierType *)lparg3); -*/ - { - OS_LOAD_FUNCTION(fp, gdk_window_get_pointer) - if (fp) { - rc = (jintLong)((jintLong (CALLING_CONVENTION*)(GdkWindow *, gint *, gint *, GdkModifierType *))fp)((GdkWindow *)arg0, (gint *)lparg1, (gint *)lparg2, (GdkModifierType *)lparg3); - } - } -fail: - if (arg3 && lparg3) (*env)->ReleaseIntArrayElements(env, arg3, lparg3, 0); - if (arg2 && lparg2) (*env)->ReleaseIntArrayElements(env, arg2, lparg2, 0); - if (arg1 && lparg1) (*env)->ReleaseIntArrayElements(env, arg1, lparg1, 0); - OS_NATIVE_EXIT(env, that, _1gdk_1window_1get_1pointer_FUNC); - return rc; -} -#endif - -#ifndef NO__1gdk_1window_1get_1position -JNIEXPORT void JNICALL OS_NATIVE(_1gdk_1window_1get_1position) - (JNIEnv *env, jclass that, jintLong arg0, jintArray arg1, jintArray arg2) -{ - jint *lparg1=NULL; - jint *lparg2=NULL; - OS_NATIVE_ENTER(env, that, _1gdk_1window_1get_1position_FUNC); - if (arg1) if ((lparg1 = (*env)->GetIntArrayElements(env, arg1, NULL)) == NULL) goto fail; - if (arg2) if ((lparg2 = (*env)->GetIntArrayElements(env, arg2, NULL)) == NULL) goto fail; - gdk_window_get_position((GdkWindow *)arg0, (gint *)lparg1, (gint *)lparg2); -fail: - if (arg2 && lparg2) (*env)->ReleaseIntArrayElements(env, arg2, lparg2, 0); - if (arg1 && lparg1) (*env)->ReleaseIntArrayElements(env, arg1, lparg1, 0); - OS_NATIVE_EXIT(env, that, _1gdk_1window_1get_1position_FUNC); -} -#endif - -#ifndef NO__1gdk_1window_1get_1root_1origin -JNIEXPORT void JNICALL OS_NATIVE(_1gdk_1window_1get_1root_1origin) - (JNIEnv *env, jclass that, jintLong arg0, jintArray arg1, jintArray arg2) -{ - jint *lparg1=NULL; - jint *lparg2=NULL; - OS_NATIVE_ENTER(env, that, _1gdk_1window_1get_1root_1origin_FUNC); - if (arg1) if ((lparg1 = (*env)->GetIntArrayElements(env, arg1, NULL)) == NULL) goto fail; - if (arg2) if ((lparg2 = (*env)->GetIntArrayElements(env, arg2, NULL)) == NULL) goto fail; - gdk_window_get_root_origin((GdkWindow *)arg0, (gint *)lparg1, (gint *)lparg2); -fail: - if (arg2 && lparg2) (*env)->ReleaseIntArrayElements(env, arg2, lparg2, 0); - if (arg1 && lparg1) (*env)->ReleaseIntArrayElements(env, arg1, lparg1, 0); - OS_NATIVE_EXIT(env, that, _1gdk_1window_1get_1root_1origin_FUNC); -} -#endif - -#ifndef NO__1gdk_1window_1get_1user_1data -JNIEXPORT void JNICALL OS_NATIVE(_1gdk_1window_1get_1user_1data) - (JNIEnv *env, jclass that, jintLong arg0, jintLongArray arg1) -{ - jintLong *lparg1=NULL; - OS_NATIVE_ENTER(env, that, _1gdk_1window_1get_1user_1data_FUNC); - if (arg1) if ((lparg1 = (*env)->GetIntLongArrayElements(env, arg1, NULL)) == NULL) goto fail; - gdk_window_get_user_data((GdkWindow *)arg0, (gpointer *)lparg1); -fail: - if (arg1 && lparg1) (*env)->ReleaseIntLongArrayElements(env, arg1, lparg1, 0); - OS_NATIVE_EXIT(env, that, _1gdk_1window_1get_1user_1data_FUNC); -} -#endif - -#ifndef NO__1gdk_1window_1get_1visible_1region -JNIEXPORT jintLong JNICALL OS_NATIVE(_1gdk_1window_1get_1visible_1region) - (JNIEnv *env, jclass that, jintLong arg0) -{ - jintLong rc = 0; - OS_NATIVE_ENTER(env, that, _1gdk_1window_1get_1visible_1region_FUNC); -/* - rc = (jintLong)gdk_window_get_visible_region((GdkWindow *)arg0); -*/ - { - OS_LOAD_FUNCTION(fp, gdk_window_get_visible_region) - if (fp) { - rc = (jintLong)((jintLong (CALLING_CONVENTION*)(GdkWindow *))fp)((GdkWindow *)arg0); - } - } - OS_NATIVE_EXIT(env, that, _1gdk_1window_1get_1visible_1region_FUNC); - return rc; -} -#endif - -#ifndef NO__1gdk_1window_1get_1width -JNIEXPORT jint JNICALL OS_NATIVE(_1gdk_1window_1get_1width) - (JNIEnv *env, jclass that, jintLong arg0) -{ - jint rc = 0; - OS_NATIVE_ENTER(env, that, _1gdk_1window_1get_1width_FUNC); -/* - rc = (jint)gdk_window_get_width((GdkWindow *)arg0); -*/ - { - OS_LOAD_FUNCTION(fp, gdk_window_get_width) - if (fp) { - rc = (jint)((jint (CALLING_CONVENTION*)(GdkWindow *))fp)((GdkWindow *)arg0); - } - } - OS_NATIVE_EXIT(env, that, _1gdk_1window_1get_1width_FUNC); - return rc; -} -#endif - -#ifndef NO__1gdk_1window_1hide -JNIEXPORT void JNICALL OS_NATIVE(_1gdk_1window_1hide) - (JNIEnv *env, jclass that, jintLong arg0) -{ - OS_NATIVE_ENTER(env, that, _1gdk_1window_1hide_FUNC); - gdk_window_hide((GdkWindow *)arg0); - OS_NATIVE_EXIT(env, that, _1gdk_1window_1hide_FUNC); -} -#endif - -#ifndef NO__1gdk_1window_1invalidate_1rect -JNIEXPORT void JNICALL OS_NATIVE(_1gdk_1window_1invalidate_1rect) - (JNIEnv *env, jclass that, jintLong arg0, jobject arg1, jboolean arg2) -{ - GdkRectangle _arg1, *lparg1=NULL; - OS_NATIVE_ENTER(env, that, _1gdk_1window_1invalidate_1rect_FUNC); - if (arg1) if ((lparg1 = getGdkRectangleFields(env, arg1, &_arg1)) == NULL) goto fail; - gdk_window_invalidate_rect((GdkWindow *)arg0, (GdkRectangle *)lparg1, (gboolean)arg2); -fail: - OS_NATIVE_EXIT(env, that, _1gdk_1window_1invalidate_1rect_FUNC); -} -#endif - -#ifndef NO__1gdk_1window_1invalidate_1region -JNIEXPORT void JNICALL OS_NATIVE(_1gdk_1window_1invalidate_1region) - (JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jboolean arg2) -{ - OS_NATIVE_ENTER(env, that, _1gdk_1window_1invalidate_1region_FUNC); -/* - gdk_window_invalidate_region((GdkWindow *)arg0, arg1, (gboolean)arg2); -*/ - { - OS_LOAD_FUNCTION(fp, gdk_window_invalidate_region) - if (fp) { - ((void (CALLING_CONVENTION*)(GdkWindow *, jintLong, gboolean))fp)((GdkWindow *)arg0, arg1, (gboolean)arg2); - } - } - OS_NATIVE_EXIT(env, that, _1gdk_1window_1invalidate_1region_FUNC); -} -#endif - -#ifndef NO__1gdk_1window_1is_1visible -JNIEXPORT jboolean JNICALL OS_NATIVE(_1gdk_1window_1is_1visible) - (JNIEnv *env, jclass that, jintLong arg0) -{ - jboolean rc = 0; - OS_NATIVE_ENTER(env, that, _1gdk_1window_1is_1visible_FUNC); - rc = (jboolean)gdk_window_is_visible((GdkWindow *)arg0); - OS_NATIVE_EXIT(env, that, _1gdk_1window_1is_1visible_FUNC); - return rc; -} -#endif - -#ifndef NO__1gdk_1window_1lower -JNIEXPORT void JNICALL OS_NATIVE(_1gdk_1window_1lower) - (JNIEnv *env, jclass that, jintLong arg0) -{ - OS_NATIVE_ENTER(env, that, _1gdk_1window_1lower_FUNC); - gdk_window_lower((GdkWindow *)arg0); - OS_NATIVE_EXIT(env, that, _1gdk_1window_1lower_FUNC); -} -#endif - -#ifndef NO__1gdk_1window_1move -JNIEXPORT void JNICALL OS_NATIVE(_1gdk_1window_1move) - (JNIEnv *env, jclass that, jintLong arg0, jint arg1, jint arg2) -{ - OS_NATIVE_ENTER(env, that, _1gdk_1window_1move_FUNC); - gdk_window_move((GdkWindow *)arg0, arg1, arg2); - OS_NATIVE_EXIT(env, that, _1gdk_1window_1move_FUNC); -} -#endif - -#ifndef NO__1gdk_1window_1move_1resize -JNIEXPORT void JNICALL OS_NATIVE(_1gdk_1window_1move_1resize) - (JNIEnv *env, jclass that, jintLong arg0, jint arg1, jint arg2, jint arg3, jint arg4) -{ - OS_NATIVE_ENTER(env, that, _1gdk_1window_1move_1resize_FUNC); - gdk_window_move_resize((GdkWindow *)arg0, arg1, arg2, arg3, arg4); - OS_NATIVE_EXIT(env, that, _1gdk_1window_1move_1resize_FUNC); -} -#endif - -#ifndef NO__1gdk_1window_1new -JNIEXPORT jintLong JNICALL OS_NATIVE(_1gdk_1window_1new) - (JNIEnv *env, jclass that, jintLong arg0, jobject arg1, jint arg2) -{ - GdkWindowAttr _arg1, *lparg1=NULL; - jintLong rc = 0; - OS_NATIVE_ENTER(env, that, _1gdk_1window_1new_FUNC); - if (arg1) if ((lparg1 = getGdkWindowAttrFields(env, arg1, &_arg1)) == NULL) goto fail; - rc = (jintLong)gdk_window_new((GdkWindow *)arg0, lparg1, arg2); -fail: - OS_NATIVE_EXIT(env, that, _1gdk_1window_1new_FUNC); - return rc; -} -#endif - -#ifndef NO__1gdk_1window_1process_1all_1updates -JNIEXPORT void JNICALL OS_NATIVE(_1gdk_1window_1process_1all_1updates) - (JNIEnv *env, jclass that) -{ - OS_NATIVE_ENTER(env, that, _1gdk_1window_1process_1all_1updates_FUNC); -/* - gdk_window_process_all_updates(); -*/ - { - OS_LOAD_FUNCTION(fp, gdk_window_process_all_updates) - if (fp) { - ((void (CALLING_CONVENTION*)())fp)(); - } - } - OS_NATIVE_EXIT(env, that, _1gdk_1window_1process_1all_1updates_FUNC); -} -#endif - -#ifndef NO__1gdk_1window_1process_1updates -JNIEXPORT void JNICALL OS_NATIVE(_1gdk_1window_1process_1updates) - (JNIEnv *env, jclass that, jintLong arg0, jboolean arg1) -{ - OS_NATIVE_ENTER(env, that, _1gdk_1window_1process_1updates_FUNC); -/* - gdk_window_process_updates((GdkWindow *)arg0, (gboolean)arg1); -*/ - { - OS_LOAD_FUNCTION(fp, gdk_window_process_updates) - if (fp) { - ((void (CALLING_CONVENTION*)(GdkWindow *, gboolean))fp)((GdkWindow *)arg0, (gboolean)arg1); - } - } - OS_NATIVE_EXIT(env, that, _1gdk_1window_1process_1updates_FUNC); -} -#endif - -#ifndef NO__1gdk_1window_1raise -JNIEXPORT void JNICALL OS_NATIVE(_1gdk_1window_1raise) - (JNIEnv *env, jclass that, jintLong arg0) -{ - OS_NATIVE_ENTER(env, that, _1gdk_1window_1raise_FUNC); - gdk_window_raise((GdkWindow *)arg0); - OS_NATIVE_EXIT(env, that, _1gdk_1window_1raise_FUNC); -} -#endif - -#ifndef NO__1gdk_1window_1remove_1filter -JNIEXPORT void JNICALL OS_NATIVE(_1gdk_1window_1remove_1filter) - (JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jintLong arg2) -{ - OS_NATIVE_ENTER(env, that, _1gdk_1window_1remove_1filter_FUNC); - gdk_window_remove_filter((GdkWindow *)arg0, (GdkFilterFunc)arg1, (gpointer)arg2); - OS_NATIVE_EXIT(env, that, _1gdk_1window_1remove_1filter_FUNC); -} -#endif - -#ifndef NO__1gdk_1window_1resize -JNIEXPORT void JNICALL OS_NATIVE(_1gdk_1window_1resize) - (JNIEnv *env, jclass that, jintLong arg0, jint arg1, jint arg2) -{ - OS_NATIVE_ENTER(env, that, _1gdk_1window_1resize_FUNC); - gdk_window_resize((GdkWindow *)arg0, arg1, arg2); - OS_NATIVE_EXIT(env, that, _1gdk_1window_1resize_FUNC); -} -#endif - -#ifndef NO__1gdk_1window_1restack -JNIEXPORT void JNICALL OS_NATIVE(_1gdk_1window_1restack) - (JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jboolean arg2) -{ - OS_NATIVE_ENTER(env, that, _1gdk_1window_1restack_FUNC); -/* - gdk_window_restack((GdkWindow *)arg0, (GdkWindow *)arg1, (gboolean)arg2); -*/ - { - OS_LOAD_FUNCTION(fp, gdk_window_restack) - if (fp) { - ((void (CALLING_CONVENTION*)(GdkWindow *, GdkWindow *, gboolean))fp)((GdkWindow *)arg0, (GdkWindow *)arg1, (gboolean)arg2); - } - } - OS_NATIVE_EXIT(env, that, _1gdk_1window_1restack_FUNC); -} -#endif - -#ifndef NO__1gdk_1window_1set_1back_1pixmap -JNIEXPORT void JNICALL OS_NATIVE(_1gdk_1window_1set_1back_1pixmap) - (JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jboolean arg2) -{ - OS_NATIVE_ENTER(env, that, _1gdk_1window_1set_1back_1pixmap_FUNC); -/* - gdk_window_set_back_pixmap((GdkWindow *)arg0, arg1, (gboolean)arg2); -*/ - { - OS_LOAD_FUNCTION(fp, gdk_window_set_back_pixmap) - if (fp) { - ((void (CALLING_CONVENTION*)(GdkWindow *, jintLong, gboolean))fp)((GdkWindow *)arg0, arg1, (gboolean)arg2); - } - } - OS_NATIVE_EXIT(env, that, _1gdk_1window_1set_1back_1pixmap_FUNC); -} -#endif - -#ifndef NO__1gdk_1window_1set_1background_1pattern -JNIEXPORT void JNICALL OS_NATIVE(_1gdk_1window_1set_1background_1pattern) - (JNIEnv *env, jclass that, jintLong arg0, jintLong arg1) -{ - OS_NATIVE_ENTER(env, that, _1gdk_1window_1set_1background_1pattern_FUNC); -/* - gdk_window_set_background_pattern(arg0, arg1); -*/ - { - OS_LOAD_FUNCTION(fp, gdk_window_set_background_pattern) - if (fp) { - ((void (CALLING_CONVENTION*)(jintLong, jintLong))fp)(arg0, arg1); - } - } - OS_NATIVE_EXIT(env, that, _1gdk_1window_1set_1background_1pattern_FUNC); -} -#endif - -#ifndef NO__1gdk_1window_1set_1cursor -JNIEXPORT void JNICALL OS_NATIVE(_1gdk_1window_1set_1cursor) - (JNIEnv *env, jclass that, jintLong arg0, jintLong arg1) -{ - OS_NATIVE_ENTER(env, that, _1gdk_1window_1set_1cursor_FUNC); - gdk_window_set_cursor((GdkWindow *)arg0, (GdkCursor *)arg1); - OS_NATIVE_EXIT(env, that, _1gdk_1window_1set_1cursor_FUNC); -} -#endif - -#ifndef NO__1gdk_1window_1set_1decorations -JNIEXPORT void JNICALL OS_NATIVE(_1gdk_1window_1set_1decorations) - (JNIEnv *env, jclass that, jintLong arg0, jint arg1) -{ - OS_NATIVE_ENTER(env, that, _1gdk_1window_1set_1decorations_FUNC); - gdk_window_set_decorations((GdkWindow *)arg0, (GdkWMDecoration)arg1); - OS_NATIVE_EXIT(env, that, _1gdk_1window_1set_1decorations_FUNC); -} -#endif - -#ifndef NO__1gdk_1window_1set_1events -JNIEXPORT void JNICALL OS_NATIVE(_1gdk_1window_1set_1events) - (JNIEnv *env, jclass that, jintLong arg0, jint arg1) -{ - OS_NATIVE_ENTER(env, that, _1gdk_1window_1set_1events_FUNC); - gdk_window_set_events((GdkWindow *)arg0, arg1); - OS_NATIVE_EXIT(env, that, _1gdk_1window_1set_1events_FUNC); -} -#endif - -#ifndef NO__1gdk_1window_1set_1functions -JNIEXPORT void JNICALL OS_NATIVE(_1gdk_1window_1set_1functions) - (JNIEnv *env, jclass that, jintLong arg0, jint arg1) -{ - OS_NATIVE_ENTER(env, that, _1gdk_1window_1set_1functions_FUNC); - gdk_window_set_functions((GdkWindow *)arg0, (GdkWMFunction)arg1); - OS_NATIVE_EXIT(env, that, _1gdk_1window_1set_1functions_FUNC); -} -#endif - -#ifndef NO__1gdk_1window_1set_1override_1redirect -JNIEXPORT void JNICALL OS_NATIVE(_1gdk_1window_1set_1override_1redirect) - (JNIEnv *env, jclass that, jintLong arg0, jboolean arg1) -{ - OS_NATIVE_ENTER(env, that, _1gdk_1window_1set_1override_1redirect_FUNC); - gdk_window_set_override_redirect((GdkWindow *)arg0, (gboolean)arg1); - OS_NATIVE_EXIT(env, that, _1gdk_1window_1set_1override_1redirect_FUNC); -} -#endif - -#ifndef NO__1gdk_1window_1set_1user_1data -JNIEXPORT void JNICALL OS_NATIVE(_1gdk_1window_1set_1user_1data) - (JNIEnv *env, jclass that, jintLong arg0, jintLong arg1) -{ - OS_NATIVE_ENTER(env, that, _1gdk_1window_1set_1user_1data_FUNC); - gdk_window_set_user_data((GdkWindow *)arg0, (gpointer)arg1); - OS_NATIVE_EXIT(env, that, _1gdk_1window_1set_1user_1data_FUNC); -} -#endif - -#ifndef NO__1gdk_1window_1shape_1combine_1region -JNIEXPORT void JNICALL OS_NATIVE(_1gdk_1window_1shape_1combine_1region) - (JNIEnv *env, jclass that, jintLong arg0, jintLong arg1, jint arg2, jint arg3) -{ - OS_NATIVE_ENTER(env, that, _1gdk_1window_1shape_1combine_1region_FUNC); -/* - gdk_window_shape_combine_region((GdkWindow *)arg0, arg1, arg2, arg3); -*/ - { - OS_LOAD_FUNCTION(fp, gdk_window_shape_combine_region) - if (fp) { - ((void (CALLING_CONVENTION*)(GdkWindow *, jintLong, jint, jint))fp)((GdkWindow *)arg0, arg1, arg2, arg3); - } - } - OS_NATIVE_EXIT(env, that, _1gdk_1window_1shape_1combine_1region_FUNC); -} -#endif - -#ifndef NO__1gdk_1window_1show -JNIEXPORT void JNICALL OS_NATIVE(_1gdk_1window_1show) - (JNIEnv *env, jclass that, jintLong arg0) -{ - OS_NATIVE_ENTER(env, that, _1gdk_1window_1show_FUNC); - gdk_window_show((GdkWindow *)arg0); - OS_NATIVE_EXIT(env, that, _1gdk_1window_1show_FUNC); -} -#endif - -#ifndef NO__1gdk_1window_1show_1unraised -JNIEXPORT void JNICALL OS_NATIVE(_1gdk_1window_1show_1unraised) - (JNIEnv *env, jclass that, jintLong arg0) -{ - OS_NATIVE_ENTER(env, that, _1gdk_1window_1show_1unraised_FUNC); - gdk_window_show_unraised((GdkWindow *)arg0); - OS_NATIVE_EXIT(env, that, _1gdk_1window_1show_1unraised_FUNC); -} -#endif - -#ifndef NO__1gdk_1x11_1display_1get_1xdisplay -JNIEXPORT jintLong JNICALL OS_NATIVE(_1gdk_1x11_1display_1get_1xdisplay) - (JNIEnv *env, jclass that, jintLong arg0) -{ - jintLong rc = 0; - OS_NATIVE_ENTER(env, that, _1gdk_1x11_1display_1get_1xdisplay_FUNC); - rc = (jintLong)gdk_x11_display_get_xdisplay((GdkDisplay *)arg0); - OS_NATIVE_EXIT(env, that, _1gdk_1x11_1display_1get_1xdisplay_FUNC); - return rc; -} -#endif - -#ifndef NO__1gdk_1x11_1display_1utf8_1to_1compound_1text -JNIEXPORT jboolean JNICALL OS_NATIVE(_1gdk_1x11_1display_1utf8_1to_1compound_1text) - (JNIEnv *env, jclass that, jintLong arg0, jbyteArray arg1, jintLongArray arg2, jintArray arg3, jintLongArray arg4, jintArray arg5) -{ - jbyte *lparg1=NULL; - jintLong *lparg2=NULL; - jint *lparg3=NULL; - jintLong *lparg4=NULL; - jint *lparg5=NULL; - jboolean rc = 0; - OS_NATIVE_ENTER(env, that, _1gdk_1x11_1display_1utf8_1to_1compound_1text_FUNC); - if (arg1) if ((lparg1 = (*env)->GetByteArrayElements(env, arg1, NULL)) == NULL) goto fail; - if (arg2) if ((lparg2 = (*env)->GetIntLongArrayElements(env, arg2, NULL)) == NULL) goto fail; - if (arg3) if ((lparg3 = (*env)->GetIntArrayElements(env, arg3, NULL)) == NULL) goto fail; - if (arg4) if ((lparg4 = (*env)->GetIntLongArrayElements(env, arg4, NULL)) == NULL) goto fail; - if (arg5) if ((lparg5 = (*env)->GetIntArrayElements(env, arg5, NULL)) == NULL) goto fail; -/* - rc = (jboolean)gdk_x11_display_utf8_to_compound_text((GdkDisplay *)arg0, lparg1, lparg2, lparg3, lparg4, lparg5); -*/ - { - OS_LOAD_FUNCTION(fp, gdk_x11_display_utf8_to_compound_text) - if (fp) { - rc = (jboolean)((jboolean (CALLING_CONVENTION*)(GdkDisplay *, jbyte *, jintLong *, jint *, jintLong *, jint *))fp)((GdkDisplay *)arg0, lparg1, lparg2, lparg3, lparg4, lparg5); - } - } -fail: - if (arg5 && lparg5) (*env)->ReleaseIntArrayElements(env, arg5, lparg5, 0); - if (arg4 && lparg4) (*env)->ReleaseIntLongArrayElements(env, arg4, lparg4, 0); - if (arg3 && lparg3) (*env)->ReleaseIntArrayElements(env, arg3, lparg3, 0); - if (arg2 && lparg2) (*env)->ReleaseIntLongArrayElements(env, arg2, lparg2, 0); - if (arg1 && lparg1) (*env)->ReleaseByteArrayElements(env, arg1, lparg1, 0); - OS_NATIVE_EXIT(env, that, _1gdk_1x11_1display_1utf8_1to_1compound_1text_FUNC); - return rc; -} -#endif - -#ifndef NO__1gdk_1x11_1drawable_1get_1xid -JNIEXPORT jintLong JNICALL OS_NATIVE(_1gdk_1x11_1drawable_1get_1xid) - (JNIEnv *env, jclass that, jintLong arg0) -{ - jintLong rc = 0; - OS_NATIVE_ENTER(env, that, _1gdk_1x11_1drawable_1get_1xid_FUNC); -/* - rc = (jintLong)gdk_x11_drawable_get_xid(arg0); -*/ - { - OS_LOAD_FUNCTION(fp, gdk_x11_drawable_get_xid) - if (fp) { - rc = (jintLong)((jintLong (CALLING_CONVENTION*)(jintLong))fp)(arg0); - } - } - OS_NATIVE_EXIT(env, that, _1gdk_1x11_1drawable_1get_1xid_FUNC); - return rc; -} -#endif - -#ifndef NO__1gdk_1x11_1get_1default_1xdisplay -JNIEXPORT jintLong JNICALL OS_NATIVE(_1gdk_1x11_1get_1default_1xdisplay) - (JNIEnv *env, jclass that) -{ - jintLong rc = 0; - OS_NATIVE_ENTER(env, that, _1gdk_1x11_1get_1default_1xdisplay_FUNC); - rc = (jintLong)gdk_x11_get_default_xdisplay(); - OS_NATIVE_EXIT(env, that, _1gdk_1x11_1get_1default_1xdisplay_FUNC); - return rc; -} -#endif - -#ifndef NO__1gdk_1x11_1screen_1get_1window_1manager_1name -JNIEXPORT jintLong JNICALL OS_NATIVE(_1gdk_1x11_1screen_1get_1window_1manager_1name) - (JNIEnv *env, jclass that, jintLong arg0) -{ - jintLong rc = 0; - OS_NATIVE_ENTER(env, that, _1gdk_1x11_1screen_1get_1window_1manager_1name_FUNC); -/* - rc = (jintLong)gdk_x11_screen_get_window_manager_name((GdkScreen *)arg0); -*/ - { - OS_LOAD_FUNCTION(fp, gdk_x11_screen_get_window_manager_name) - if (fp) { - rc = (jintLong)((jintLong (CALLING_CONVENTION*)(GdkScreen *))fp)((GdkScreen *)arg0); - } - } - OS_NATIVE_EXIT(env, that, _1gdk_1x11_1screen_1get_1window_1manager_1name_FUNC); - return rc; -} -#endif - -#ifndef NO__1gdk_1x11_1screen_1lookup_1visual -JNIEXPORT jintLong JNICALL OS_NATIVE(_1gdk_1x11_1screen_1lookup_1visual) - (JNIEnv *env, jclass that, jintLong arg0, jint arg1) -{ - jintLong rc = 0; - OS_NATIVE_ENTER(env, that, _1gdk_1x11_1screen_1lookup_1visual_FUNC); -/* - rc = (jintLong)gdk_x11_screen_lookup_visual((GdkScreen *)arg0, (VisualID)arg1); -*/ - { - OS_LOAD_FUNCTION(fp, gdk_x11_screen_lookup_visual) - if (fp) { - rc = (jintLong)((jintLong (CALLING_CONVENTION*)(GdkScreen *, VisualID))fp)((GdkScreen *)arg0, (VisualID)arg1); - } - } - OS_NATIVE_EXIT(env, that, _1gdk_1x11_1screen_1lookup_1visual_FUNC); - return rc; -} -#endif - -#ifndef NO__1gdk_1x11_1visual_1get_1xvisual -JNIEXPORT jintLong JNICALL OS_NATIVE(_1gdk_1x11_1visual_1get_1xvisual) - (JNIEnv *env, jclass that, jintLong arg0) -{ - jintLong rc = 0; - OS_NATIVE_ENTER(env, that, _1gdk_1x11_1visual_1get_1xvisual_FUNC); - rc = (jintLong)gdk_x11_visual_get_xvisual((GdkVisual *)arg0); - OS_NATIVE_EXIT(env, that, _1gdk_1x11_1visual_1get_1xvisual_FUNC); - return rc; -} -#endif - -#ifndef NO__1gdk_1x11_1window_1get_1xid -JNIEXPORT jintLong JNICALL OS_NATIVE(_1gdk_1x11_1window_1get_1xid) - (JNIEnv *env, jclass that, jintLong arg0) -{ - jintLong rc = 0; - OS_NATIVE_ENTER(env, that, _1gdk_1x11_1window_1get_1xid_FUNC); -/* - rc = (jintLong)gdk_x11_window_get_xid((GdkWindow *)arg0); -*/ - { - OS_LOAD_FUNCTION(fp, gdk_x11_window_get_xid) - if (fp) { - rc = (jintLong)((jintLong (CALLING_CONVENTION*)(GdkWindow *))fp)((GdkWindow *)arg0); - } - } - OS_NATIVE_EXIT(env, that, _1gdk_1x11_1window_1get_1xid_FUNC); - return rc; -} -#endif - -#ifndef NO__1gdk_1x11_1window_1lookup_1for_1display -JNIEXPORT jintLong JNICALL OS_NATIVE(_1gdk_1x11_1window_1lookup_1for_1display) - (JNIEnv *env, jclass that, jintLong arg0, jintLong arg1) -{ - jintLong rc = 0; - OS_NATIVE_ENTER(env, that, _1gdk_1x11_1window_1lookup_1for_1display_FUNC); -/* - rc = (jintLong)gdk_x11_window_lookup_for_display((GdkDisplay *)arg0, arg1); -*/ - { - OS_LOAD_FUNCTION(fp, gdk_x11_window_lookup_for_display) - if (fp) { - rc = (jintLong)((jintLong (CALLING_CONVENTION*)(GdkDisplay *, jintLong))fp)((GdkDisplay *)arg0, arg1); - } - } - OS_NATIVE_EXIT(env, that, _1gdk_1x11_1window_1lookup_1for_1display_FUNC); - return rc; -} -#endif - #ifndef NO__1getpid JNIEXPORT jint JNICALL OS_NATIVE(_1getpid) (JNIEnv *env, jclass that) @@ -19234,16 +19248,6 @@ JNIEXPORT void JNICALL OS_NATIVE(g_1value_1unset) } #endif -#ifndef NO_gdk_1threads_1leave -JNIEXPORT void JNICALL OS_NATIVE(gdk_1threads_1leave) - (JNIEnv *env, jclass that) -{ - OS_NATIVE_ENTER(env, that, gdk_1threads_1leave_FUNC); - gdk_threads_leave(); - OS_NATIVE_EXIT(env, that, gdk_1threads_1leave_FUNC); -} -#endif - #ifndef NO_localeconv_1decimal_1point JNIEXPORT jintLong JNICALL OS_NATIVE(localeconv_1decimal_1point) (JNIEnv *env, jclass that) diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os.h b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os.h index 9a9dc3bb3d..c8c1ca4541 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os.h +++ b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os.h @@ -80,6 +80,17 @@ CHECK_DLERROR \ } +// Hard-link code generated from GTK.java to LIB_GTK +#define GDK_LOAD_FUNCTION(var, name) \ + static int initialized = 0; \ + static void *var = NULL; \ + if (!initialized) { \ + void* handle = dlopen(LIB_GDK, LOAD_FLAGS); \ + if (handle) var = dlsym(handle, #name); \ + initialized = 1; \ + CHECK_DLERROR \ + } + #ifdef GDK_WINDOWING_X11 #include <gdk/gdkx.h> diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os_custom.h b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os_custom.h index b8d51a9047..675a6751c8 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os_custom.h +++ b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os_custom.h @@ -64,110 +64,10 @@ /* Libraries for dynamic loaded functions */ #define g_thread_init_LIB LIB_GTHREAD -#define gdk_keyboard_ungrab_LIB LIB_GDK -#define gdk_cursor_new_from_pixbuf_LIB LIB_GDK -#define gdk_cursor_unref_LIB LIB_GDK -#define gdk_display_warp_pointer_LIB LIB_GDK -#define gdk_device_warp_LIB LIB_GDK -#define gdk_device_manager_get_client_pointer_LIB LIB_GDK -#define gdk_device_get_window_at_position_LIB LIB_GDK -#define gdk_device_grab_LIB LIB_GDK -#define gdk_device_ungrab_LIB LIB_GDK -#define gdk_display_get_device_manager_LIB LIB_GDK -#define gdk_device_get_associated_device_LIB LIB_GDK -#define gdk_display_get_default_LIB LIB_GDK -#define gdk_display_get_default_seat_LIB LIB_GDK -#define gdk_display_supports_cursor_color_LIB LIB_GDK -#define gdk_drag_context_get_actions_LIB LIB_GDK -#define gdk_drag_context_get_dest_window_LIB LIB_GDK -#define gdk_drag_context_get_selected_action_LIB LIB_GDK -#define gdk_drag_context_list_targets_LIB LIB_GDK -#define gdk_draw_arc_LIB LIB_GDK -#define gdk_draw_layout_LIB LIB_GDK -#define gdk_draw_pixbuf_LIB LIB_GDK -#define gdk_draw_image_LIB LIB_GDK -#define gdk_drawable_get_image_LIB LIB_GDK -#define gdk_drawable_get_visible_region_LIB LIB_GDK -#define gdk_gc_new_LIB LIB_GDK -#define gdk_draw_rectangle_LIB LIB_GDK -#define gdk_gc_set_foreground_LIB LIB_GDK -#define gdk_gc_set_function_LIB LIB_GDK -#define gdk_gc_set_subwindow_LIB LIB_GDK -#define gdk_drawable_get_depth_LIB LIB_GDK -#define gdk_pixmap_new_LIB LIB_GDK -#define gdk_color_white_LIB LIB_GDK -#define gdk_color_free_LIB LIB_GDK -#define gdk_color_parse_LIB LIB_GDK -#define gdk_colormap_get_system_LIB LIB_GDK -#define gdk_bitmap_create_from_data_LIB LIB_GDK -#define gdk_cursor_new_from_pixmap_LIB LIB_GDK -#define gdk_window_get_internal_paint_info_LIB LIB_GDK -#define gdk_window_invalidate_region_LIB LIB_GDK -#define gdk_window_shape_combine_region_LIB LIB_GDK -#define gdk_window_set_back_pixmap_LIB LIB_GDK -#define gdk_gc_set_stipple_LIB LIB_GDK -#define gdk_gc_set_fill_LIB LIB_GDK -#define gdk_pixbuf_save_to_bufferv_LIB LIB_GDK -#define gdk_pixbuf_get_from_drawable_LIB LIB_GDK -#define gdk_pixbuf_get_from_window_LIB LIB_GDK -#define gdk_pointer_grab_LIB LIB_GDK -#define gdk_pointer_ungrab_LIB LIB_GDK -#define gdk_region_polygon_LIB LIB_GDK -#define gdk_region_get_rectangles_LIB LIB_GDK -#define gdk_rgba_to_string_LIB LIB_GDK -#define gdk_rgba_free_LIB LIB_GDK -#define gdk_rgba_hash_LIB LIB_GDK -#define gdk_rgba_parse_LIB LIB_GDK -#define gdk_screen_get_default_LIB LIB_GDK -#define gdk_screen_get_resolution_LIB LIB_GDK -#define gdk_screen_get_monitor_scale_factor_LIB LIB_GDK -#define gdk_screen_get_monitor_at_point_LIB LIB_GDK -#define gdk_screen_get_monitor_at_window_LIB LIB_GDK -#define gdk_screen_get_monitor_geometry_LIB LIB_GDK -#define gdk_screen_get_n_monitors_LIB LIB_GDK -#define gdk_screen_get_monitor_width_mm_LIB LIB_GDK -#define gdk_screen_get_primary_monitor_LIB LIB_GDK -#define gdk_visual_get_depth_LIB LIB_GDK -#define gdk_window_create_similar_surface_LIB LIB_GDK -#define gdk_window_restack_LIB LIB_GDK -#define gdk_window_process_all_updates_LIB LIB_GDK -#define gdk_window_process_updates_LIB LIB_GDK -#define gdk_window_get_device_position_LIB LIB_GDK -#define gdk_window_get_pointer_LIB LIB_GDK -#define gdk_window_at_pointer_LIB LIB_GDK -#define gdk_window_get_height_LIB LIB_GDK -#define gdk_window_get_width_LIB LIB_GDK -#define gdk_pixmap_get_size_LIB LIB_GDK -#define gdk_window_get_display_LIB LIB_GDK -#define gdk_window_get_visible_region_LIB LIB_GDK -#define gdk_window_set_keep_above_LIB LIB_GDK -#define gdk_window_set_accept_focus_LIB LIB_GDK -#define gdk_threads_set_lock_functions_LIB LIB_GDK - -#define gdk_cairo_reset_clip_LIB LIB_GDK -#define gdk_cairo_get_clip_rectangle_LIB LIB_GDK -#define gdk_cairo_set_source_pixbuf_LIB LIB_GDK -#define gdk_cairo_set_source_pixmap_LIB LIB_GDK -#define gdk_cairo_set_source_color_LIB LIB_GDK -#define gdk_cairo_set_source_rgba_LIB LIB_GDK -#define gdk_cairo_set_source_window_LIB LIB_GDK -#define gdk_cairo_region_create_from_surface_LIB LIB_GDK -#define gdk_cairo_region_LIB LIB_GDK -#define gdk_cairo_create_LIB LIB_GDK -#define gdk_colormap_alloc_color_LIB LIB_GDK -#define gdk_colormap_free_colors_LIB LIB_GDK #define ubuntu_menu_proxy_get_LIB LIB_GTK #define FcConfigAppFontAddFile_LIB LIB_FONTCONFIG // GTK3 only -#define gdk_screen_get_monitor_workarea_LIB LIB_GDK -#define gdk_seat_grab_LIB LIB_GDK -#define gdk_seat_ungrab_LIB LIB_GDK -#define gdk_seat_get_pointer_LIB LIB_GDK -#define gdk_window_set_background_pattern_LIB LIB_GTK -#define gdk_event_get_scroll_deltas_LIB LIB_GTK -#define gdk_event_get_seat_LIB LIB_GDK -#define gdk_event_get_event_type_LIB LIB_GDK #define g_bytes_new_LIB LIB_GLIB #define g_bytes_unref_LIB LIB_GLIB @@ -175,19 +75,6 @@ #define g_thread_supported() 0 #endif - -#ifdef GDK_WINDOWING_X11 - -#define gdk_x11_screen_get_window_manager_name_LIB LIB_GDK -#define gdk_x11_screen_lookup_visual_LIB LIB_GDK -#define gdk_x11_window_lookup_for_display_LIB LIB_GDK -#define gdk_x11_display_utf8_to_compound_text_LIB LIB_GDK -#define gdk_x11_drawable_get_xid_LIB LIB_GDK -#define gdk_x11_get_default_xdisplay_LIB LIB_GDK -#define gdk_x11_window_get_xid_LIB LIB_GDK - -#endif - /* Field accessors */ #define G_OBJECT_CLASS_CONSTRUCTOR(arg0) (arg0)->constructor #define G_OBJECT_CLASS_SET_CONSTRUCTOR(arg0, arg1) (arg0)->constructor = (GObject* (*) (GType, guint, GObjectConstructParam *))arg1 diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os_stats.c b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os_stats.c index 480a802ffc..ddb326eacf 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os_stats.c +++ b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os_stats.c @@ -21,6 +21,259 @@ #ifdef NATIVE_STATS +char * GDK_nativeFunctionNames[] = { + "GDK_1EVENT_1TYPE", + "GDK_1EVENT_1WINDOW", + "GDK_1IS_1X11_1DISPLAY", + "GdkColor_1sizeof", + "GdkDragContext_1sizeof", + "GdkEventAny_1sizeof", + "GdkEventButton_1sizeof", + "GdkEventCrossing_1sizeof", + "GdkEventExpose_1sizeof", + "GdkEventFocus_1sizeof", + "GdkEventKey_1sizeof", + "GdkEventMotion_1sizeof", + "GdkEventScroll_1sizeof", + "GdkEventWindowState_1sizeof", + "GdkEvent_1sizeof", + "GdkGeometry_1sizeof", + "GdkKeymapKey_1sizeof", + "GdkRGBA_1sizeof", + "GdkRectangle_1sizeof", + "GdkWindowAttr_1sizeof", + "_1GDK_1PIXMAP_1XID", + "_1GDK_1TYPE_1COLOR", + "_1GDK_1TYPE_1PIXBUF", + "_1GDK_1TYPE_1RGBA", + "_1gdk_1atom_1intern", + "_1gdk_1atom_1name", + "_1gdk_1beep", + "_1gdk_1bitmap_1create_1from_1data", + "_1gdk_1cairo_1create", + "_1gdk_1cairo_1get_1clip_1rectangle", + "_1gdk_1cairo_1region", + "_1gdk_1cairo_1region_1create_1from_1surface", + "_1gdk_1cairo_1reset_1clip", + "_1gdk_1cairo_1set_1source_1color", + "_1gdk_1cairo_1set_1source_1pixbuf", + "_1gdk_1cairo_1set_1source_1pixmap", + "_1gdk_1cairo_1set_1source_1rgba", + "_1gdk_1cairo_1set_1source_1window", + "_1gdk_1color_1free", + "_1gdk_1color_1parse", + "_1gdk_1color_1white", + "_1gdk_1colormap_1alloc_1color", + "_1gdk_1colormap_1free_1colors", + "_1gdk_1colormap_1get_1system", + "_1gdk_1cursor_1new_1for_1display", + "_1gdk_1cursor_1new_1from_1name", + "_1gdk_1cursor_1new_1from_1pixbuf", + "_1gdk_1cursor_1new_1from_1pixmap", + "_1gdk_1cursor_1unref", + "_1gdk_1device_1get_1associated_1device", + "_1gdk_1device_1get_1window_1at_1position", + "_1gdk_1device_1grab", + "_1gdk_1device_1manager_1get_1client_1pointer", + "_1gdk_1device_1ungrab", + "_1gdk_1device_1warp", + "_1gdk_1display_1get_1default", + "_1gdk_1display_1get_1default_1seat", + "_1gdk_1display_1get_1device_1manager", + "_1gdk_1display_1supports_1cursor_1color", + "_1gdk_1display_1warp_1pointer", + "_1gdk_1drag_1context_1get_1actions", + "_1gdk_1drag_1context_1get_1dest_1window", + "_1gdk_1drag_1context_1get_1selected_1action", + "_1gdk_1drag_1context_1list_1targets", + "_1gdk_1drag_1status", + "_1gdk_1draw_1arc", + "_1gdk_1draw_1image", + "_1gdk_1draw_1pixbuf", + "_1gdk_1draw_1rectangle", + "_1gdk_1drawable_1get_1depth", + "_1gdk_1drawable_1get_1image", + "_1gdk_1drawable_1get_1visible_1region", + "_1gdk_1error_1trap_1pop", + "_1gdk_1error_1trap_1push", + "_1gdk_1event_1copy", + "_1gdk_1event_1free", + "_1gdk_1event_1get", + "_1gdk_1event_1get_1coords", + "_1gdk_1event_1get_1event_1type", + "_1gdk_1event_1get_1scroll_1deltas", + "_1gdk_1event_1get_1seat", + "_1gdk_1event_1get_1state", + "_1gdk_1event_1get_1time", + "_1gdk_1event_1handler_1set", + "_1gdk_1event_1new", + "_1gdk_1event_1peek", + "_1gdk_1event_1put", + "_1gdk_1flush", + "_1gdk_1gc_1new", + "_1gdk_1gc_1set_1fill", + "_1gdk_1gc_1set_1foreground", + "_1gdk_1gc_1set_1function", + "_1gdk_1gc_1set_1stipple", + "_1gdk_1gc_1set_1subwindow", + "_1gdk_1get_1default_1root_1window", + "_1gdk_1keyboard_1ungrab", + "_1gdk_1keymap_1get_1default", + "_1gdk_1keymap_1get_1entries_1for_1keyval", + "_1gdk_1keyval_1to_1lower", + "_1gdk_1keyval_1to_1unicode", + "_1gdk_1pango_1context_1get", + "_1gdk_1pango_1layout_1get_1clip_1region", + "_1gdk_1pixbuf_1copy_1area", + "_1gdk_1pixbuf_1get_1from_1drawable", + "_1gdk_1pixbuf_1get_1from_1window", + "_1gdk_1pixbuf_1get_1has_1alpha", + "_1gdk_1pixbuf_1get_1height", + "_1gdk_1pixbuf_1get_1pixels", + "_1gdk_1pixbuf_1get_1rowstride", + "_1gdk_1pixbuf_1get_1width", + "_1gdk_1pixbuf_1loader_1close", + "_1gdk_1pixbuf_1loader_1get_1pixbuf", + "_1gdk_1pixbuf_1loader_1new", + "_1gdk_1pixbuf_1loader_1write", + "_1gdk_1pixbuf_1new", + "_1gdk_1pixbuf_1new_1from_1file", + "_1gdk_1pixbuf_1save_1to_1bufferv", + "_1gdk_1pixbuf_1scale_1simple", + "_1gdk_1pixmap_1get_1size", + "_1gdk_1pixmap_1new", + "_1gdk_1pointer_1grab", + "_1gdk_1pointer_1ungrab", + "_1gdk_1property_1get", + "_1gdk_1region_1destroy", + "_1gdk_1region_1empty", + "_1gdk_1region_1get_1clipbox", + "_1gdk_1region_1get_1rectangles", + "_1gdk_1region_1intersect", + "_1gdk_1region_1new", + "_1gdk_1region_1offset", + "_1gdk_1region_1point_1in", + "_1gdk_1region_1polygon", + "_1gdk_1region_1rect_1in", + "_1gdk_1region_1rectangle", + "_1gdk_1region_1subtract", + "_1gdk_1region_1union", + "_1gdk_1region_1union_1with_1rect", + "_1gdk_1rgba_1free", + "_1gdk_1rgba_1hash", + "_1gdk_1rgba_1parse", + "_1gdk_1rgba_1to_1string", + "_1gdk_1screen_1get_1active_1window", + "_1gdk_1screen_1get_1default", + "_1gdk_1screen_1get_1monitor_1at_1point", + "_1gdk_1screen_1get_1monitor_1at_1window", + "_1gdk_1screen_1get_1monitor_1geometry", + "_1gdk_1screen_1get_1monitor_1scale_1factor", + "_1gdk_1screen_1get_1monitor_1width_1mm", + "_1gdk_1screen_1get_1monitor_1workarea", + "_1gdk_1screen_1get_1n_1monitors", + "_1gdk_1screen_1get_1primary_1monitor", + "_1gdk_1screen_1get_1resolution", + "_1gdk_1screen_1height", + "_1gdk_1screen_1width", + "_1gdk_1screen_1width_1mm", + "_1gdk_1seat_1get_1pointer", + "_1gdk_1seat_1grab", + "_1gdk_1seat_1ungrab", + "_1gdk_1selection_1owner_1get", + "_1gdk_1selection_1owner_1set", + "_1gdk_1set_1program_1class", + "_1gdk_1test_1simulate_1button", + "_1gdk_1text_1property_1to_1utf8_1list_1for_1display", + "_1gdk_1unicode_1to_1keyval", + "_1gdk_1utf8_1to_1string_1target", + "_1gdk_1visual_1get_1depth", + "_1gdk_1visual_1get_1system", + "_1gdk_1window_1add_1filter", + "_1gdk_1window_1at_1pointer", + "_1gdk_1window_1begin_1paint_1rect", + "_1gdk_1window_1create_1similar_1surface", + "_1gdk_1window_1destroy", + "_1gdk_1window_1end_1paint", + "_1gdk_1window_1focus", + "_1gdk_1window_1get_1children", + "_1gdk_1window_1get_1device_1position", + "_1gdk_1window_1get_1display", + "_1gdk_1window_1get_1events", + "_1gdk_1window_1get_1frame_1extents", + "_1gdk_1window_1get_1height", + "_1gdk_1window_1get_1internal_1paint_1info", + "_1gdk_1window_1get_1origin", + "_1gdk_1window_1get_1parent", + "_1gdk_1window_1get_1pointer", + "_1gdk_1window_1get_1position", + "_1gdk_1window_1get_1root_1origin", + "_1gdk_1window_1get_1user_1data", + "_1gdk_1window_1get_1visible_1region", + "_1gdk_1window_1get_1width", + "_1gdk_1window_1hide", + "_1gdk_1window_1invalidate_1rect", + "_1gdk_1window_1invalidate_1region", + "_1gdk_1window_1is_1visible", + "_1gdk_1window_1lower", + "_1gdk_1window_1move", + "_1gdk_1window_1move_1resize", + "_1gdk_1window_1new", + "_1gdk_1window_1process_1all_1updates", + "_1gdk_1window_1process_1updates", + "_1gdk_1window_1raise", + "_1gdk_1window_1remove_1filter", + "_1gdk_1window_1resize", + "_1gdk_1window_1restack", + "_1gdk_1window_1set_1back_1pixmap", + "_1gdk_1window_1set_1background_1pattern", + "_1gdk_1window_1set_1cursor", + "_1gdk_1window_1set_1decorations", + "_1gdk_1window_1set_1events", + "_1gdk_1window_1set_1functions", + "_1gdk_1window_1set_1override_1redirect", + "_1gdk_1window_1set_1user_1data", + "_1gdk_1window_1shape_1combine_1region", + "_1gdk_1window_1show", + "_1gdk_1window_1show_1unraised", + "_1gdk_1x11_1display_1get_1xdisplay", + "_1gdk_1x11_1display_1utf8_1to_1compound_1text", + "_1gdk_1x11_1drawable_1get_1xid", + "_1gdk_1x11_1get_1default_1xdisplay", + "_1gdk_1x11_1screen_1get_1window_1manager_1name", + "_1gdk_1x11_1screen_1lookup_1visual", + "_1gdk_1x11_1visual_1get_1xvisual", + "_1gdk_1x11_1window_1get_1xid", + "_1gdk_1x11_1window_1lookup_1for_1display", + "gdk_1threads_1leave", +}; +#define NATIVE_FUNCTION_COUNT sizeof(GDK_nativeFunctionNames) / sizeof(char*) +int GDK_nativeFunctionCount = NATIVE_FUNCTION_COUNT; +int GDK_nativeFunctionCallCount[NATIVE_FUNCTION_COUNT]; + +#define STATS_NATIVE(func) Java_org_eclipse_swt_tools_internal_NativeStats_##func + +JNIEXPORT jint JNICALL STATS_NATIVE(GDK_1GetFunctionCount) + (JNIEnv *env, jclass that) +{ + return GDK_nativeFunctionCount; +} + +JNIEXPORT jstring JNICALL STATS_NATIVE(GDK_1GetFunctionName) + (JNIEnv *env, jclass that, jint index) +{ + return (*env)->NewStringUTF(env, GDK_nativeFunctionNames[index]); +} + +JNIEXPORT jint JNICALL STATS_NATIVE(GDK_1GetFunctionCallCount) + (JNIEnv *env, jclass that, jint index) +{ + return GDK_nativeFunctionCallCount[index]; +} + +#endif +#ifdef NATIVE_STATS + char * GTK_nativeFunctionNames[] = { "GTK_1ACCEL_1LABEL_1GET_1ACCEL_1STRING", "GTK_1ACCEL_1LABEL_1SET_1ACCEL_1STRING", @@ -963,9 +1216,6 @@ char * OS_nativeFunctionNames[] = { #else "Call__JJIJ", #endif - "GDK_1EVENT_1TYPE", - "GDK_1EVENT_1WINDOW", - "GDK_1IS_1X11_1DISPLAY", "GDK_1WINDOWING_1WAYLAND", "GDK_1WINDOWING_1X11", "GInterfaceInfo_1sizeof", @@ -980,23 +1230,6 @@ char * OS_nativeFunctionNames[] = { "G_1TYPE_1INT", "G_1TYPE_1INT64", "G_1VALUE_1TYPE", - "GdkColor_1sizeof", - "GdkDragContext_1sizeof", - "GdkEventAny_1sizeof", - "GdkEventButton_1sizeof", - "GdkEventCrossing_1sizeof", - "GdkEventExpose_1sizeof", - "GdkEventFocus_1sizeof", - "GdkEventKey_1sizeof", - "GdkEventMotion_1sizeof", - "GdkEventScroll_1sizeof", - "GdkEventWindowState_1sizeof", - "GdkEvent_1sizeof", - "GdkGeometry_1sizeof", - "GdkKeymapKey_1sizeof", - "GdkRGBA_1sizeof", - "GdkRectangle_1sizeof", - "GdkWindowAttr_1sizeof", "PangoAttrColor_1sizeof", "PangoAttrInt_1sizeof", "PangoAttribute_1sizeof", @@ -1016,10 +1249,6 @@ char * OS_nativeFunctionNames[] = { "X_1EVENT_1WINDOW", "_1Call", "_1FcConfigAppFontAddFile", - "_1GDK_1PIXMAP_1XID", - "_1GDK_1TYPE_1COLOR", - "_1GDK_1TYPE_1PIXBUF", - "_1GDK_1TYPE_1RGBA", "_1GString_1len", "_1GString_1str", "_1G_1OBJECT_1CLASS", @@ -1284,206 +1513,7 @@ char * OS_nativeFunctionNames[] = { "_1g_1variant_1new_1int32", "_1g_1variant_1new_1string", "_1g_1variant_1new_1tuple", - "_1gdk_1atom_1intern", - "_1gdk_1atom_1name", - "_1gdk_1beep", - "_1gdk_1bitmap_1create_1from_1data", - "_1gdk_1cairo_1create", - "_1gdk_1cairo_1get_1clip_1rectangle", - "_1gdk_1cairo_1region", - "_1gdk_1cairo_1region_1create_1from_1surface", - "_1gdk_1cairo_1reset_1clip", - "_1gdk_1cairo_1set_1source_1color", - "_1gdk_1cairo_1set_1source_1pixbuf", - "_1gdk_1cairo_1set_1source_1pixmap", - "_1gdk_1cairo_1set_1source_1rgba", - "_1gdk_1cairo_1set_1source_1window", - "_1gdk_1color_1free", - "_1gdk_1color_1parse", - "_1gdk_1color_1white", - "_1gdk_1colormap_1alloc_1color", - "_1gdk_1colormap_1free_1colors", - "_1gdk_1colormap_1get_1system", - "_1gdk_1cursor_1new_1for_1display", - "_1gdk_1cursor_1new_1from_1name", - "_1gdk_1cursor_1new_1from_1pixbuf", - "_1gdk_1cursor_1new_1from_1pixmap", - "_1gdk_1cursor_1unref", - "_1gdk_1device_1get_1associated_1device", - "_1gdk_1device_1get_1window_1at_1position", - "_1gdk_1device_1grab", - "_1gdk_1device_1manager_1get_1client_1pointer", - "_1gdk_1device_1ungrab", - "_1gdk_1device_1warp", - "_1gdk_1display_1get_1default", - "_1gdk_1display_1get_1default_1seat", - "_1gdk_1display_1get_1device_1manager", - "_1gdk_1display_1supports_1cursor_1color", - "_1gdk_1display_1warp_1pointer", - "_1gdk_1drag_1context_1get_1actions", - "_1gdk_1drag_1context_1get_1dest_1window", - "_1gdk_1drag_1context_1get_1selected_1action", - "_1gdk_1drag_1context_1list_1targets", - "_1gdk_1drag_1status", - "_1gdk_1draw_1arc", - "_1gdk_1draw_1image", - "_1gdk_1draw_1pixbuf", - "_1gdk_1draw_1rectangle", - "_1gdk_1drawable_1get_1depth", - "_1gdk_1drawable_1get_1image", - "_1gdk_1drawable_1get_1visible_1region", - "_1gdk_1error_1trap_1pop", - "_1gdk_1error_1trap_1push", - "_1gdk_1event_1copy", - "_1gdk_1event_1free", - "_1gdk_1event_1get", - "_1gdk_1event_1get_1coords", - "_1gdk_1event_1get_1event_1type", - "_1gdk_1event_1get_1scroll_1deltas", - "_1gdk_1event_1get_1seat", - "_1gdk_1event_1get_1state", - "_1gdk_1event_1get_1time", - "_1gdk_1event_1handler_1set", - "_1gdk_1event_1new", - "_1gdk_1event_1peek", - "_1gdk_1event_1put", - "_1gdk_1flush", - "_1gdk_1gc_1new", - "_1gdk_1gc_1set_1fill", - "_1gdk_1gc_1set_1foreground", - "_1gdk_1gc_1set_1function", - "_1gdk_1gc_1set_1stipple", - "_1gdk_1gc_1set_1subwindow", - "_1gdk_1get_1default_1root_1window", - "_1gdk_1keyboard_1ungrab", - "_1gdk_1keymap_1get_1default", - "_1gdk_1keymap_1get_1entries_1for_1keyval", "_1gdk_1keymap_1translate_1keyboard_1state", - "_1gdk_1keyval_1to_1lower", - "_1gdk_1keyval_1to_1unicode", - "_1gdk_1pango_1context_1get", - "_1gdk_1pango_1layout_1get_1clip_1region", - "_1gdk_1pixbuf_1copy_1area", - "_1gdk_1pixbuf_1get_1from_1drawable", - "_1gdk_1pixbuf_1get_1from_1window", - "_1gdk_1pixbuf_1get_1has_1alpha", - "_1gdk_1pixbuf_1get_1height", - "_1gdk_1pixbuf_1get_1pixels", - "_1gdk_1pixbuf_1get_1rowstride", - "_1gdk_1pixbuf_1get_1width", - "_1gdk_1pixbuf_1loader_1close", - "_1gdk_1pixbuf_1loader_1get_1pixbuf", - "_1gdk_1pixbuf_1loader_1new", - "_1gdk_1pixbuf_1loader_1write", - "_1gdk_1pixbuf_1new", - "_1gdk_1pixbuf_1new_1from_1file", - "_1gdk_1pixbuf_1save_1to_1bufferv", - "_1gdk_1pixbuf_1scale_1simple", - "_1gdk_1pixmap_1get_1size", - "_1gdk_1pixmap_1new", - "_1gdk_1pointer_1grab", - "_1gdk_1pointer_1ungrab", - "_1gdk_1property_1get", - "_1gdk_1region_1destroy", - "_1gdk_1region_1empty", - "_1gdk_1region_1get_1clipbox", - "_1gdk_1region_1get_1rectangles", - "_1gdk_1region_1intersect", - "_1gdk_1region_1new", - "_1gdk_1region_1offset", - "_1gdk_1region_1point_1in", - "_1gdk_1region_1polygon", - "_1gdk_1region_1rect_1in", - "_1gdk_1region_1rectangle", - "_1gdk_1region_1subtract", - "_1gdk_1region_1union", - "_1gdk_1region_1union_1with_1rect", - "_1gdk_1rgba_1free", - "_1gdk_1rgba_1hash", - "_1gdk_1rgba_1parse", - "_1gdk_1rgba_1to_1string", - "_1gdk_1screen_1get_1active_1window", - "_1gdk_1screen_1get_1default", - "_1gdk_1screen_1get_1monitor_1at_1point", - "_1gdk_1screen_1get_1monitor_1at_1window", - "_1gdk_1screen_1get_1monitor_1geometry", - "_1gdk_1screen_1get_1monitor_1scale_1factor", - "_1gdk_1screen_1get_1monitor_1width_1mm", - "_1gdk_1screen_1get_1monitor_1workarea", - "_1gdk_1screen_1get_1n_1monitors", - "_1gdk_1screen_1get_1primary_1monitor", - "_1gdk_1screen_1get_1resolution", - "_1gdk_1screen_1height", - "_1gdk_1screen_1width", - "_1gdk_1screen_1width_1mm", - "_1gdk_1seat_1get_1pointer", - "_1gdk_1seat_1grab", - "_1gdk_1seat_1ungrab", - "_1gdk_1selection_1owner_1get", - "_1gdk_1selection_1owner_1set", - "_1gdk_1set_1program_1class", - "_1gdk_1test_1simulate_1button", - "_1gdk_1text_1property_1to_1utf8_1list_1for_1display", - "_1gdk_1unicode_1to_1keyval", - "_1gdk_1utf8_1to_1string_1target", - "_1gdk_1visual_1get_1depth", - "_1gdk_1visual_1get_1system", - "_1gdk_1window_1add_1filter", - "_1gdk_1window_1at_1pointer", - "_1gdk_1window_1begin_1paint_1rect", - "_1gdk_1window_1create_1similar_1surface", - "_1gdk_1window_1destroy", - "_1gdk_1window_1end_1paint", - "_1gdk_1window_1focus", - "_1gdk_1window_1get_1children", - "_1gdk_1window_1get_1device_1position", - "_1gdk_1window_1get_1display", - "_1gdk_1window_1get_1events", - "_1gdk_1window_1get_1frame_1extents", - "_1gdk_1window_1get_1height", - "_1gdk_1window_1get_1internal_1paint_1info", - "_1gdk_1window_1get_1origin", - "_1gdk_1window_1get_1parent", - "_1gdk_1window_1get_1pointer", - "_1gdk_1window_1get_1position", - "_1gdk_1window_1get_1root_1origin", - "_1gdk_1window_1get_1user_1data", - "_1gdk_1window_1get_1visible_1region", - "_1gdk_1window_1get_1width", - "_1gdk_1window_1hide", - "_1gdk_1window_1invalidate_1rect", - "_1gdk_1window_1invalidate_1region", - "_1gdk_1window_1is_1visible", - "_1gdk_1window_1lower", - "_1gdk_1window_1move", - "_1gdk_1window_1move_1resize", - "_1gdk_1window_1new", - "_1gdk_1window_1process_1all_1updates", - "_1gdk_1window_1process_1updates", - "_1gdk_1window_1raise", - "_1gdk_1window_1remove_1filter", - "_1gdk_1window_1resize", - "_1gdk_1window_1restack", - "_1gdk_1window_1set_1back_1pixmap", - "_1gdk_1window_1set_1background_1pattern", - "_1gdk_1window_1set_1cursor", - "_1gdk_1window_1set_1decorations", - "_1gdk_1window_1set_1events", - "_1gdk_1window_1set_1functions", - "_1gdk_1window_1set_1override_1redirect", - "_1gdk_1window_1set_1user_1data", - "_1gdk_1window_1shape_1combine_1region", - "_1gdk_1window_1show", - "_1gdk_1window_1show_1unraised", - "_1gdk_1x11_1display_1get_1xdisplay", - "_1gdk_1x11_1display_1utf8_1to_1compound_1text", - "_1gdk_1x11_1drawable_1get_1xid", - "_1gdk_1x11_1get_1default_1xdisplay", - "_1gdk_1x11_1screen_1get_1window_1manager_1name", - "_1gdk_1x11_1screen_1lookup_1visual", - "_1gdk_1x11_1visual_1get_1xvisual", - "_1gdk_1x11_1window_1get_1xid", - "_1gdk_1x11_1window_1lookup_1for_1display", "_1getpid", "_1glib_1major_1version", "_1glib_1micro_1version", @@ -1602,7 +1632,6 @@ char * OS_nativeFunctionNames[] = { "g_1value_1set_1int", "g_1value_1set_1int64", "g_1value_1unset", - "gdk_1threads_1leave", "imContextLast", "imContextNewProc_1CALLBACK", "localeconv_1decimal_1point", diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os_stats.h b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os_stats.h index f6ac01ddca..f8fd88f489 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os_stats.h +++ b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os_stats.h @@ -17,6 +17,247 @@ /* DO NOT EDIT - your changes will be lost. */ #ifdef NATIVE_STATS +extern int GDK_nativeFunctionCount; +extern int GDK_nativeFunctionCallCount[]; +extern char* GDK_nativeFunctionNames[]; +#define GDK_NATIVE_ENTER(env, that, func) GDK_nativeFunctionCallCount[func]++; +#define GDK_NATIVE_EXIT(env, that, func) +#else +#ifndef GDK_NATIVE_ENTER +#define GDK_NATIVE_ENTER(env, that, func) +#endif +#ifndef GDK_NATIVE_EXIT +#define GDK_NATIVE_EXIT(env, that, func) +#endif +#endif + +typedef enum { + GDK_1EVENT_1TYPE_FUNC, + GDK_1EVENT_1WINDOW_FUNC, + GDK_1IS_1X11_1DISPLAY_FUNC, + GdkColor_1sizeof_FUNC, + GdkDragContext_1sizeof_FUNC, + GdkEventAny_1sizeof_FUNC, + GdkEventButton_1sizeof_FUNC, + GdkEventCrossing_1sizeof_FUNC, + GdkEventExpose_1sizeof_FUNC, + GdkEventFocus_1sizeof_FUNC, + GdkEventKey_1sizeof_FUNC, + GdkEventMotion_1sizeof_FUNC, + GdkEventScroll_1sizeof_FUNC, + GdkEventWindowState_1sizeof_FUNC, + GdkEvent_1sizeof_FUNC, + GdkGeometry_1sizeof_FUNC, + GdkKeymapKey_1sizeof_FUNC, + GdkRGBA_1sizeof_FUNC, + GdkRectangle_1sizeof_FUNC, + GdkWindowAttr_1sizeof_FUNC, + _1GDK_1PIXMAP_1XID_FUNC, + _1GDK_1TYPE_1COLOR_FUNC, + _1GDK_1TYPE_1PIXBUF_FUNC, + _1GDK_1TYPE_1RGBA_FUNC, + _1gdk_1atom_1intern_FUNC, + _1gdk_1atom_1name_FUNC, + _1gdk_1beep_FUNC, + _1gdk_1bitmap_1create_1from_1data_FUNC, + _1gdk_1cairo_1create_FUNC, + _1gdk_1cairo_1get_1clip_1rectangle_FUNC, + _1gdk_1cairo_1region_FUNC, + _1gdk_1cairo_1region_1create_1from_1surface_FUNC, + _1gdk_1cairo_1reset_1clip_FUNC, + _1gdk_1cairo_1set_1source_1color_FUNC, + _1gdk_1cairo_1set_1source_1pixbuf_FUNC, + _1gdk_1cairo_1set_1source_1pixmap_FUNC, + _1gdk_1cairo_1set_1source_1rgba_FUNC, + _1gdk_1cairo_1set_1source_1window_FUNC, + _1gdk_1color_1free_FUNC, + _1gdk_1color_1parse_FUNC, + _1gdk_1color_1white_FUNC, + _1gdk_1colormap_1alloc_1color_FUNC, + _1gdk_1colormap_1free_1colors_FUNC, + _1gdk_1colormap_1get_1system_FUNC, + _1gdk_1cursor_1new_1for_1display_FUNC, + _1gdk_1cursor_1new_1from_1name_FUNC, + _1gdk_1cursor_1new_1from_1pixbuf_FUNC, + _1gdk_1cursor_1new_1from_1pixmap_FUNC, + _1gdk_1cursor_1unref_FUNC, + _1gdk_1device_1get_1associated_1device_FUNC, + _1gdk_1device_1get_1window_1at_1position_FUNC, + _1gdk_1device_1grab_FUNC, + _1gdk_1device_1manager_1get_1client_1pointer_FUNC, + _1gdk_1device_1ungrab_FUNC, + _1gdk_1device_1warp_FUNC, + _1gdk_1display_1get_1default_FUNC, + _1gdk_1display_1get_1default_1seat_FUNC, + _1gdk_1display_1get_1device_1manager_FUNC, + _1gdk_1display_1supports_1cursor_1color_FUNC, + _1gdk_1display_1warp_1pointer_FUNC, + _1gdk_1drag_1context_1get_1actions_FUNC, + _1gdk_1drag_1context_1get_1dest_1window_FUNC, + _1gdk_1drag_1context_1get_1selected_1action_FUNC, + _1gdk_1drag_1context_1list_1targets_FUNC, + _1gdk_1drag_1status_FUNC, + _1gdk_1draw_1arc_FUNC, + _1gdk_1draw_1image_FUNC, + _1gdk_1draw_1pixbuf_FUNC, + _1gdk_1draw_1rectangle_FUNC, + _1gdk_1drawable_1get_1depth_FUNC, + _1gdk_1drawable_1get_1image_FUNC, + _1gdk_1drawable_1get_1visible_1region_FUNC, + _1gdk_1error_1trap_1pop_FUNC, + _1gdk_1error_1trap_1push_FUNC, + _1gdk_1event_1copy_FUNC, + _1gdk_1event_1free_FUNC, + _1gdk_1event_1get_FUNC, + _1gdk_1event_1get_1coords_FUNC, + _1gdk_1event_1get_1event_1type_FUNC, + _1gdk_1event_1get_1scroll_1deltas_FUNC, + _1gdk_1event_1get_1seat_FUNC, + _1gdk_1event_1get_1state_FUNC, + _1gdk_1event_1get_1time_FUNC, + _1gdk_1event_1handler_1set_FUNC, + _1gdk_1event_1new_FUNC, + _1gdk_1event_1peek_FUNC, + _1gdk_1event_1put_FUNC, + _1gdk_1flush_FUNC, + _1gdk_1gc_1new_FUNC, + _1gdk_1gc_1set_1fill_FUNC, + _1gdk_1gc_1set_1foreground_FUNC, + _1gdk_1gc_1set_1function_FUNC, + _1gdk_1gc_1set_1stipple_FUNC, + _1gdk_1gc_1set_1subwindow_FUNC, + _1gdk_1get_1default_1root_1window_FUNC, + _1gdk_1keyboard_1ungrab_FUNC, + _1gdk_1keymap_1get_1default_FUNC, + _1gdk_1keymap_1get_1entries_1for_1keyval_FUNC, + _1gdk_1keyval_1to_1lower_FUNC, + _1gdk_1keyval_1to_1unicode_FUNC, + _1gdk_1pango_1context_1get_FUNC, + _1gdk_1pango_1layout_1get_1clip_1region_FUNC, + _1gdk_1pixbuf_1copy_1area_FUNC, + _1gdk_1pixbuf_1get_1from_1drawable_FUNC, + _1gdk_1pixbuf_1get_1from_1window_FUNC, + _1gdk_1pixbuf_1get_1has_1alpha_FUNC, + _1gdk_1pixbuf_1get_1height_FUNC, + _1gdk_1pixbuf_1get_1pixels_FUNC, + _1gdk_1pixbuf_1get_1rowstride_FUNC, + _1gdk_1pixbuf_1get_1width_FUNC, + _1gdk_1pixbuf_1loader_1close_FUNC, + _1gdk_1pixbuf_1loader_1get_1pixbuf_FUNC, + _1gdk_1pixbuf_1loader_1new_FUNC, + _1gdk_1pixbuf_1loader_1write_FUNC, + _1gdk_1pixbuf_1new_FUNC, + _1gdk_1pixbuf_1new_1from_1file_FUNC, + _1gdk_1pixbuf_1save_1to_1bufferv_FUNC, + _1gdk_1pixbuf_1scale_1simple_FUNC, + _1gdk_1pixmap_1get_1size_FUNC, + _1gdk_1pixmap_1new_FUNC, + _1gdk_1pointer_1grab_FUNC, + _1gdk_1pointer_1ungrab_FUNC, + _1gdk_1property_1get_FUNC, + _1gdk_1region_1destroy_FUNC, + _1gdk_1region_1empty_FUNC, + _1gdk_1region_1get_1clipbox_FUNC, + _1gdk_1region_1get_1rectangles_FUNC, + _1gdk_1region_1intersect_FUNC, + _1gdk_1region_1new_FUNC, + _1gdk_1region_1offset_FUNC, + _1gdk_1region_1point_1in_FUNC, + _1gdk_1region_1polygon_FUNC, + _1gdk_1region_1rect_1in_FUNC, + _1gdk_1region_1rectangle_FUNC, + _1gdk_1region_1subtract_FUNC, + _1gdk_1region_1union_FUNC, + _1gdk_1region_1union_1with_1rect_FUNC, + _1gdk_1rgba_1free_FUNC, + _1gdk_1rgba_1hash_FUNC, + _1gdk_1rgba_1parse_FUNC, + _1gdk_1rgba_1to_1string_FUNC, + _1gdk_1screen_1get_1active_1window_FUNC, + _1gdk_1screen_1get_1default_FUNC, + _1gdk_1screen_1get_1monitor_1at_1point_FUNC, + _1gdk_1screen_1get_1monitor_1at_1window_FUNC, + _1gdk_1screen_1get_1monitor_1geometry_FUNC, + _1gdk_1screen_1get_1monitor_1scale_1factor_FUNC, + _1gdk_1screen_1get_1monitor_1width_1mm_FUNC, + _1gdk_1screen_1get_1monitor_1workarea_FUNC, + _1gdk_1screen_1get_1n_1monitors_FUNC, + _1gdk_1screen_1get_1primary_1monitor_FUNC, + _1gdk_1screen_1get_1resolution_FUNC, + _1gdk_1screen_1height_FUNC, + _1gdk_1screen_1width_FUNC, + _1gdk_1screen_1width_1mm_FUNC, + _1gdk_1seat_1get_1pointer_FUNC, + _1gdk_1seat_1grab_FUNC, + _1gdk_1seat_1ungrab_FUNC, + _1gdk_1selection_1owner_1get_FUNC, + _1gdk_1selection_1owner_1set_FUNC, + _1gdk_1set_1program_1class_FUNC, + _1gdk_1test_1simulate_1button_FUNC, + _1gdk_1text_1property_1to_1utf8_1list_1for_1display_FUNC, + _1gdk_1unicode_1to_1keyval_FUNC, + _1gdk_1utf8_1to_1string_1target_FUNC, + _1gdk_1visual_1get_1depth_FUNC, + _1gdk_1visual_1get_1system_FUNC, + _1gdk_1window_1add_1filter_FUNC, + _1gdk_1window_1at_1pointer_FUNC, + _1gdk_1window_1begin_1paint_1rect_FUNC, + _1gdk_1window_1create_1similar_1surface_FUNC, + _1gdk_1window_1destroy_FUNC, + _1gdk_1window_1end_1paint_FUNC, + _1gdk_1window_1focus_FUNC, + _1gdk_1window_1get_1children_FUNC, + _1gdk_1window_1get_1device_1position_FUNC, + _1gdk_1window_1get_1display_FUNC, + _1gdk_1window_1get_1events_FUNC, + _1gdk_1window_1get_1frame_1extents_FUNC, + _1gdk_1window_1get_1height_FUNC, + _1gdk_1window_1get_1internal_1paint_1info_FUNC, + _1gdk_1window_1get_1origin_FUNC, + _1gdk_1window_1get_1parent_FUNC, + _1gdk_1window_1get_1pointer_FUNC, + _1gdk_1window_1get_1position_FUNC, + _1gdk_1window_1get_1root_1origin_FUNC, + _1gdk_1window_1get_1user_1data_FUNC, + _1gdk_1window_1get_1visible_1region_FUNC, + _1gdk_1window_1get_1width_FUNC, + _1gdk_1window_1hide_FUNC, + _1gdk_1window_1invalidate_1rect_FUNC, + _1gdk_1window_1invalidate_1region_FUNC, + _1gdk_1window_1is_1visible_FUNC, + _1gdk_1window_1lower_FUNC, + _1gdk_1window_1move_FUNC, + _1gdk_1window_1move_1resize_FUNC, + _1gdk_1window_1new_FUNC, + _1gdk_1window_1process_1all_1updates_FUNC, + _1gdk_1window_1process_1updates_FUNC, + _1gdk_1window_1raise_FUNC, + _1gdk_1window_1remove_1filter_FUNC, + _1gdk_1window_1resize_FUNC, + _1gdk_1window_1restack_FUNC, + _1gdk_1window_1set_1back_1pixmap_FUNC, + _1gdk_1window_1set_1background_1pattern_FUNC, + _1gdk_1window_1set_1cursor_FUNC, + _1gdk_1window_1set_1decorations_FUNC, + _1gdk_1window_1set_1events_FUNC, + _1gdk_1window_1set_1functions_FUNC, + _1gdk_1window_1set_1override_1redirect_FUNC, + _1gdk_1window_1set_1user_1data_FUNC, + _1gdk_1window_1shape_1combine_1region_FUNC, + _1gdk_1window_1show_FUNC, + _1gdk_1window_1show_1unraised_FUNC, + _1gdk_1x11_1display_1get_1xdisplay_FUNC, + _1gdk_1x11_1display_1utf8_1to_1compound_1text_FUNC, + _1gdk_1x11_1drawable_1get_1xid_FUNC, + _1gdk_1x11_1get_1default_1xdisplay_FUNC, + _1gdk_1x11_1screen_1get_1window_1manager_1name_FUNC, + _1gdk_1x11_1screen_1lookup_1visual_FUNC, + _1gdk_1x11_1visual_1get_1xvisual_FUNC, + _1gdk_1x11_1window_1get_1xid_FUNC, + _1gdk_1x11_1window_1lookup_1for_1display_FUNC, + gdk_1threads_1leave_FUNC, +} GDK_FUNCS; +#ifdef NATIVE_STATS extern int GTK_nativeFunctionCount; extern int GTK_nativeFunctionCallCount[]; extern char* GTK_nativeFunctionNames[]; @@ -961,9 +1202,6 @@ typedef enum { #else Call__JJIJ_FUNC, #endif - GDK_1EVENT_1TYPE_FUNC, - GDK_1EVENT_1WINDOW_FUNC, - GDK_1IS_1X11_1DISPLAY_FUNC, GDK_1WINDOWING_1WAYLAND_FUNC, GDK_1WINDOWING_1X11_FUNC, GInterfaceInfo_1sizeof_FUNC, @@ -978,23 +1216,6 @@ typedef enum { G_1TYPE_1INT_FUNC, G_1TYPE_1INT64_FUNC, G_1VALUE_1TYPE_FUNC, - GdkColor_1sizeof_FUNC, - GdkDragContext_1sizeof_FUNC, - GdkEventAny_1sizeof_FUNC, - GdkEventButton_1sizeof_FUNC, - GdkEventCrossing_1sizeof_FUNC, - GdkEventExpose_1sizeof_FUNC, - GdkEventFocus_1sizeof_FUNC, - GdkEventKey_1sizeof_FUNC, - GdkEventMotion_1sizeof_FUNC, - GdkEventScroll_1sizeof_FUNC, - GdkEventWindowState_1sizeof_FUNC, - GdkEvent_1sizeof_FUNC, - GdkGeometry_1sizeof_FUNC, - GdkKeymapKey_1sizeof_FUNC, - GdkRGBA_1sizeof_FUNC, - GdkRectangle_1sizeof_FUNC, - GdkWindowAttr_1sizeof_FUNC, PangoAttrColor_1sizeof_FUNC, PangoAttrInt_1sizeof_FUNC, PangoAttribute_1sizeof_FUNC, @@ -1014,10 +1235,6 @@ typedef enum { X_1EVENT_1WINDOW_FUNC, _1Call_FUNC, _1FcConfigAppFontAddFile_FUNC, - _1GDK_1PIXMAP_1XID_FUNC, - _1GDK_1TYPE_1COLOR_FUNC, - _1GDK_1TYPE_1PIXBUF_FUNC, - _1GDK_1TYPE_1RGBA_FUNC, _1GString_1len_FUNC, _1GString_1str_FUNC, _1G_1OBJECT_1CLASS_FUNC, @@ -1282,206 +1499,7 @@ typedef enum { _1g_1variant_1new_1int32_FUNC, _1g_1variant_1new_1string_FUNC, _1g_1variant_1new_1tuple_FUNC, - _1gdk_1atom_1intern_FUNC, - _1gdk_1atom_1name_FUNC, - _1gdk_1beep_FUNC, - _1gdk_1bitmap_1create_1from_1data_FUNC, - _1gdk_1cairo_1create_FUNC, - _1gdk_1cairo_1get_1clip_1rectangle_FUNC, - _1gdk_1cairo_1region_FUNC, - _1gdk_1cairo_1region_1create_1from_1surface_FUNC, - _1gdk_1cairo_1reset_1clip_FUNC, - _1gdk_1cairo_1set_1source_1color_FUNC, - _1gdk_1cairo_1set_1source_1pixbuf_FUNC, - _1gdk_1cairo_1set_1source_1pixmap_FUNC, - _1gdk_1cairo_1set_1source_1rgba_FUNC, - _1gdk_1cairo_1set_1source_1window_FUNC, - _1gdk_1color_1free_FUNC, - _1gdk_1color_1parse_FUNC, - _1gdk_1color_1white_FUNC, - _1gdk_1colormap_1alloc_1color_FUNC, - _1gdk_1colormap_1free_1colors_FUNC, - _1gdk_1colormap_1get_1system_FUNC, - _1gdk_1cursor_1new_1for_1display_FUNC, - _1gdk_1cursor_1new_1from_1name_FUNC, - _1gdk_1cursor_1new_1from_1pixbuf_FUNC, - _1gdk_1cursor_1new_1from_1pixmap_FUNC, - _1gdk_1cursor_1unref_FUNC, - _1gdk_1device_1get_1associated_1device_FUNC, - _1gdk_1device_1get_1window_1at_1position_FUNC, - _1gdk_1device_1grab_FUNC, - _1gdk_1device_1manager_1get_1client_1pointer_FUNC, - _1gdk_1device_1ungrab_FUNC, - _1gdk_1device_1warp_FUNC, - _1gdk_1display_1get_1default_FUNC, - _1gdk_1display_1get_1default_1seat_FUNC, - _1gdk_1display_1get_1device_1manager_FUNC, - _1gdk_1display_1supports_1cursor_1color_FUNC, - _1gdk_1display_1warp_1pointer_FUNC, - _1gdk_1drag_1context_1get_1actions_FUNC, - _1gdk_1drag_1context_1get_1dest_1window_FUNC, - _1gdk_1drag_1context_1get_1selected_1action_FUNC, - _1gdk_1drag_1context_1list_1targets_FUNC, - _1gdk_1drag_1status_FUNC, - _1gdk_1draw_1arc_FUNC, - _1gdk_1draw_1image_FUNC, - _1gdk_1draw_1pixbuf_FUNC, - _1gdk_1draw_1rectangle_FUNC, - _1gdk_1drawable_1get_1depth_FUNC, - _1gdk_1drawable_1get_1image_FUNC, - _1gdk_1drawable_1get_1visible_1region_FUNC, - _1gdk_1error_1trap_1pop_FUNC, - _1gdk_1error_1trap_1push_FUNC, - _1gdk_1event_1copy_FUNC, - _1gdk_1event_1free_FUNC, - _1gdk_1event_1get_FUNC, - _1gdk_1event_1get_1coords_FUNC, - _1gdk_1event_1get_1event_1type_FUNC, - _1gdk_1event_1get_1scroll_1deltas_FUNC, - _1gdk_1event_1get_1seat_FUNC, - _1gdk_1event_1get_1state_FUNC, - _1gdk_1event_1get_1time_FUNC, - _1gdk_1event_1handler_1set_FUNC, - _1gdk_1event_1new_FUNC, - _1gdk_1event_1peek_FUNC, - _1gdk_1event_1put_FUNC, - _1gdk_1flush_FUNC, - _1gdk_1gc_1new_FUNC, - _1gdk_1gc_1set_1fill_FUNC, - _1gdk_1gc_1set_1foreground_FUNC, - _1gdk_1gc_1set_1function_FUNC, - _1gdk_1gc_1set_1stipple_FUNC, - _1gdk_1gc_1set_1subwindow_FUNC, - _1gdk_1get_1default_1root_1window_FUNC, - _1gdk_1keyboard_1ungrab_FUNC, - _1gdk_1keymap_1get_1default_FUNC, - _1gdk_1keymap_1get_1entries_1for_1keyval_FUNC, _1gdk_1keymap_1translate_1keyboard_1state_FUNC, - _1gdk_1keyval_1to_1lower_FUNC, - _1gdk_1keyval_1to_1unicode_FUNC, - _1gdk_1pango_1context_1get_FUNC, - _1gdk_1pango_1layout_1get_1clip_1region_FUNC, - _1gdk_1pixbuf_1copy_1area_FUNC, - _1gdk_1pixbuf_1get_1from_1drawable_FUNC, - _1gdk_1pixbuf_1get_1from_1window_FUNC, - _1gdk_1pixbuf_1get_1has_1alpha_FUNC, - _1gdk_1pixbuf_1get_1height_FUNC, - _1gdk_1pixbuf_1get_1pixels_FUNC, - _1gdk_1pixbuf_1get_1rowstride_FUNC, - _1gdk_1pixbuf_1get_1width_FUNC, - _1gdk_1pixbuf_1loader_1close_FUNC, - _1gdk_1pixbuf_1loader_1get_1pixbuf_FUNC, - _1gdk_1pixbuf_1loader_1new_FUNC, - _1gdk_1pixbuf_1loader_1write_FUNC, - _1gdk_1pixbuf_1new_FUNC, - _1gdk_1pixbuf_1new_1from_1file_FUNC, - _1gdk_1pixbuf_1save_1to_1bufferv_FUNC, - _1gdk_1pixbuf_1scale_1simple_FUNC, - _1gdk_1pixmap_1get_1size_FUNC, - _1gdk_1pixmap_1new_FUNC, - _1gdk_1pointer_1grab_FUNC, - _1gdk_1pointer_1ungrab_FUNC, - _1gdk_1property_1get_FUNC, - _1gdk_1region_1destroy_FUNC, - _1gdk_1region_1empty_FUNC, - _1gdk_1region_1get_1clipbox_FUNC, - _1gdk_1region_1get_1rectangles_FUNC, - _1gdk_1region_1intersect_FUNC, - _1gdk_1region_1new_FUNC, - _1gdk_1region_1offset_FUNC, - _1gdk_1region_1point_1in_FUNC, - _1gdk_1region_1polygon_FUNC, - _1gdk_1region_1rect_1in_FUNC, - _1gdk_1region_1rectangle_FUNC, - _1gdk_1region_1subtract_FUNC, - _1gdk_1region_1union_FUNC, - _1gdk_1region_1union_1with_1rect_FUNC, - _1gdk_1rgba_1free_FUNC, - _1gdk_1rgba_1hash_FUNC, - _1gdk_1rgba_1parse_FUNC, - _1gdk_1rgba_1to_1string_FUNC, - _1gdk_1screen_1get_1active_1window_FUNC, - _1gdk_1screen_1get_1default_FUNC, - _1gdk_1screen_1get_1monitor_1at_1point_FUNC, - _1gdk_1screen_1get_1monitor_1at_1window_FUNC, - _1gdk_1screen_1get_1monitor_1geometry_FUNC, - _1gdk_1screen_1get_1monitor_1scale_1factor_FUNC, - _1gdk_1screen_1get_1monitor_1width_1mm_FUNC, - _1gdk_1screen_1get_1monitor_1workarea_FUNC, - _1gdk_1screen_1get_1n_1monitors_FUNC, - _1gdk_1screen_1get_1primary_1monitor_FUNC, - _1gdk_1screen_1get_1resolution_FUNC, - _1gdk_1screen_1height_FUNC, - _1gdk_1screen_1width_FUNC, - _1gdk_1screen_1width_1mm_FUNC, - _1gdk_1seat_1get_1pointer_FUNC, - _1gdk_1seat_1grab_FUNC, - _1gdk_1seat_1ungrab_FUNC, - _1gdk_1selection_1owner_1get_FUNC, - _1gdk_1selection_1owner_1set_FUNC, - _1gdk_1set_1program_1class_FUNC, - _1gdk_1test_1simulate_1button_FUNC, - _1gdk_1text_1property_1to_1utf8_1list_1for_1display_FUNC, - _1gdk_1unicode_1to_1keyval_FUNC, - _1gdk_1utf8_1to_1string_1target_FUNC, - _1gdk_1visual_1get_1depth_FUNC, - _1gdk_1visual_1get_1system_FUNC, - _1gdk_1window_1add_1filter_FUNC, - _1gdk_1window_1at_1pointer_FUNC, - _1gdk_1window_1begin_1paint_1rect_FUNC, - _1gdk_1window_1create_1similar_1surface_FUNC, - _1gdk_1window_1destroy_FUNC, - _1gdk_1window_1end_1paint_FUNC, - _1gdk_1window_1focus_FUNC, - _1gdk_1window_1get_1children_FUNC, - _1gdk_1window_1get_1device_1position_FUNC, - _1gdk_1window_1get_1display_FUNC, - _1gdk_1window_1get_1events_FUNC, - _1gdk_1window_1get_1frame_1extents_FUNC, - _1gdk_1window_1get_1height_FUNC, - _1gdk_1window_1get_1internal_1paint_1info_FUNC, - _1gdk_1window_1get_1origin_FUNC, - _1gdk_1window_1get_1parent_FUNC, - _1gdk_1window_1get_1pointer_FUNC, - _1gdk_1window_1get_1position_FUNC, - _1gdk_1window_1get_1root_1origin_FUNC, - _1gdk_1window_1get_1user_1data_FUNC, - _1gdk_1window_1get_1visible_1region_FUNC, - _1gdk_1window_1get_1width_FUNC, - _1gdk_1window_1hide_FUNC, - _1gdk_1window_1invalidate_1rect_FUNC, - _1gdk_1window_1invalidate_1region_FUNC, - _1gdk_1window_1is_1visible_FUNC, - _1gdk_1window_1lower_FUNC, - _1gdk_1window_1move_FUNC, - _1gdk_1window_1move_1resize_FUNC, - _1gdk_1window_1new_FUNC, - _1gdk_1window_1process_1all_1updates_FUNC, - _1gdk_1window_1process_1updates_FUNC, - _1gdk_1window_1raise_FUNC, - _1gdk_1window_1remove_1filter_FUNC, - _1gdk_1window_1resize_FUNC, - _1gdk_1window_1restack_FUNC, - _1gdk_1window_1set_1back_1pixmap_FUNC, - _1gdk_1window_1set_1background_1pattern_FUNC, - _1gdk_1window_1set_1cursor_FUNC, - _1gdk_1window_1set_1decorations_FUNC, - _1gdk_1window_1set_1events_FUNC, - _1gdk_1window_1set_1functions_FUNC, - _1gdk_1window_1set_1override_1redirect_FUNC, - _1gdk_1window_1set_1user_1data_FUNC, - _1gdk_1window_1shape_1combine_1region_FUNC, - _1gdk_1window_1show_FUNC, - _1gdk_1window_1show_1unraised_FUNC, - _1gdk_1x11_1display_1get_1xdisplay_FUNC, - _1gdk_1x11_1display_1utf8_1to_1compound_1text_FUNC, - _1gdk_1x11_1drawable_1get_1xid_FUNC, - _1gdk_1x11_1get_1default_1xdisplay_FUNC, - _1gdk_1x11_1screen_1get_1window_1manager_1name_FUNC, - _1gdk_1x11_1screen_1lookup_1visual_FUNC, - _1gdk_1x11_1visual_1get_1xvisual_FUNC, - _1gdk_1x11_1window_1get_1xid_FUNC, - _1gdk_1x11_1window_1lookup_1for_1display_FUNC, _1getpid_FUNC, _1glib_1major_1version_FUNC, _1glib_1micro_1version_FUNC, @@ -1600,7 +1618,6 @@ typedef enum { g_1value_1set_1int_FUNC, g_1value_1set_1int64_FUNC, g_1value_1unset_FUNC, - gdk_1threads_1leave_FUNC, imContextLast_FUNC, imContextNewProc_1CALLBACK_FUNC, localeconv_1decimal_1point_FUNC, diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/GDK.java b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/GDK.java new file mode 100644 index 0000000000..be0579bf01 --- /dev/null +++ b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/GDK.java @@ -0,0 +1,2731 @@ +/******************************************************************************* + * Copyright (c) 2018 Red Hat Inc. and others. All rights reserved. + * The contents of this file are made available under the terms + * of the GNU Lesser General Public License (LGPL) Version 2.1 that + * accompanies this distribution (lgpl-v21.txt). The LGPL is also + * available at http://www.gnu.org/licenses/lgpl.html. If the version + * of the LGPL at http://www.gnu.org is different to the version of + * the LGPL accompanying this distribution and there is any conflict + * between the two license versions, the terms of the LGPL accompanying + * this distribution shall govern. + * + * Contributors: + * IBM Corporation - initial API and implementation + *******************************************************************************/ +package org.eclipse.swt.internal.gtk; + +/** + * This class contains GDK specific native functions. + * + * In contrast to OS.java, dynamic functions are automatically linked, no need to add os_custom.h entries. + */ +public class GDK extends OS { + + /** Constants */ + public static final int GDK_2BUTTON_PRESS = 0x5; + public static final int GDK_3BUTTON_PRESS = 0x6; + public static final int GDK_ACTION_COPY = 1 << 1; + public static final int GDK_ACTION_MOVE = 1 << 2; + public static final int GDK_ACTION_LINK = 1 << 3; + public static final int GDK_Alt_L = 0xffe9; + public static final int GDK_Alt_R = 0xffea; + public static final int GDK_BackSpace = 0xff08; + public static final int GDK_BOTTOM_LEFT_CORNER = 0xc; + public static final int GDK_BOTTOM_RIGHT_CORNER = 0xe; + public static final int GDK_BOTTOM_SIDE = 0x10; + public static final int GDK_BUTTON1_MASK = 0x100; + public static final int GDK_BUTTON2_MASK = 0x200; + public static final int GDK_BUTTON3_MASK = 0x400; + public static final int GDK_BUTTON_MOTION_MASK = 1 << 4; + public static final int GDK_BUTTON1_MOTION_MASK = 1 << 5; + public static final int GDK_BUTTON2_MOTION_MASK = 1 << 6; + public static final int GDK_BUTTON3_MOTION_MASK = 1 << 7; + public static final int GDK_BUTTON_PRESS = 0x4; + public static final int GDK_BUTTON_PRESS_MASK = 0x100; + public static final int GDK_BUTTON_RELEASE = 0x7; + public static final int GDK_BUTTON_RELEASE_MASK = 0x200; + public static final int GDK_COLORSPACE_RGB = 0; + public static final int GDK_CONFIGURE = 13; + public static final int GDK_CONTROL_MASK = 0x4; + public static final int GDK_CROSS = 0x1e; + public static final int GDK_CROSSING_NORMAL = 0; + public static final int GDK_CROSSING_GRAB = 1; + public static final int GDK_CROSSING_UNGRAB = 2; + public static final int GDK_Break = 0xff6b; + public static final int GDK_Cancel = 0xff69; + public static final int GDK_Caps_Lock = 0xffE5; + public static final int GDK_Clear = 0xff0B; + public static final int GDK_Control_L = 0xffe3; + public static final int GDK_Control_R = 0xffe4; + public static final int GDK_CURRENT_TIME = 0x0; + public static final int GDK_DECOR_BORDER = 0x2; + public static final int GDK_DECOR_MAXIMIZE = 0x40; + public static final int GDK_DECOR_MENU = 0x10; + public static final int GDK_DECOR_MINIMIZE = 0x20; + public static final int GDK_DECOR_RESIZEH = 0x4; + public static final int GDK_DECOR_TITLE = 0x8; + public static final int GDK_DOUBLE_ARROW = 0x2a; + public static final int GDK_Delete = 0xffff; + public static final int GDK_Down = 0xff54; + public static final int GDK_ENTER_NOTIFY_MASK = 0x1000; + public static final int GDK_ENTER_NOTIFY = 10; + public static final int GDK_EVEN_ODD_RULE = 0; + public static final int GDK_EXPOSE = 2; + public static final int GDK_EXPOSURE_MASK = 0x2; + public static final int GDK_End = 0xff57; + public static final int GDK_Escape = 0xff1b; + public static final int GDK_ISO_Enter = 0xfe34; + public static final int GDK_F1 = 0xffbe; + public static final int GDK_F10 = 0xffc7; + public static final int GDK_F11 = 0xffc8; + public static final int GDK_F12 = 0xffc9; + public static final int GDK_F13 = 0xffca; + public static final int GDK_F14 = 0xffcb; + public static final int GDK_F15 = 0xffcc; + public static final int GDK_F16 = 0xffcd; + public static final int GDK_F17 = 0xffce; + public static final int GDK_F18 = 0xffcf; + public static final int GDK_F19 = 0xffd0; + public static final int GDK_F20 = 0xffd1; + public static final int GDK_F2 = 0xffbf; + public static final int GDK_F3 = 0xffc0; + public static final int GDK_F4 = 0xffc1; + public static final int GDK_F5 = 0xffc2; + public static final int GDK_F6 = 0xffc3; + public static final int GDK_F7 = 0xffc4; + public static final int GDK_F8 = 0xffc5; + public static final int GDK_F9 = 0xffc6; + public static final int GDK_KEY_a = 0x061; + public static final int GDK_KEY_z = 0x07a; + public static final int GDK_FLEUR = 0x34; + public static final int GDK_FOCUS_CHANGE = 0xc; + public static final int GDK_FOCUS_CHANGE_MASK = 0x4000; + public static final int GDK_FUNC_ALL = 1; + public static final int GDK_FUNC_RESIZE = 2; + public static final int GDK_FUNC_MOVE = 4; + public static final int GDK_FUNC_MINIMIZE = 8; + public static final int GDK_FUNC_MAXIMIZE = 16; + public static final int GDK_FUNC_CLOSE = 32; + public static final int GDK_GRAB_SUCCESS = 0x0; + public static final int GDK_HAND2 = 0x3c; + public static final int GDK_Help = 0xFF6A; + public static final int GDK_HINT_MIN_SIZE = 1 << 1; + public static final int GDK_Home = 0xff50; + public static final int GDK_INCLUDE_INFERIORS = 0x1; + public static final int GDK_INPUT_ONLY = 1; + public static final int GDK_INTERP_BILINEAR = 0x2; + public static final int GDK_Insert = 0xff63; + public static final int GDK_ISO_Left_Tab = 0xfe20; + public static final int GDK_KEY_PRESS = 0x8; + public static final int GDK_KEY_PRESS_MASK = 0x400; + public static final int GDK_KEY_RELEASE = 0x9; + public static final int GDK_KEY_RELEASE_MASK = 0x800; + public static final int GDK_KP_0 = 0xffb0; + public static final int GDK_KP_1 = 0xffb1; + public static final int GDK_KP_2 = 0xffb2; + public static final int GDK_KP_3 = 0xffb3; + public static final int GDK_KP_4 = 0xffb4; + public static final int GDK_KP_5 = 0xffb5; + public static final int GDK_KP_6 = 0xffb6; + public static final int GDK_KP_7 = 0xffb7; + public static final int GDK_KP_8 = 0xffb8; + public static final int GDK_KP_9 = 0xffb9; + public static final int GDK_KP_Add = 0xffab; + public static final int GDK_KP_Decimal = 0xffae; + public static final int GDK_KP_Delete = 0xFF9F; + public static final int GDK_KP_Divide = 0xffaf; + public static final int GDK_KP_Down = 0xFF99; + public static final int GDK_KP_End = 0xFF9C; + public static final int GDK_KP_Enter = 0xff8d; + public static final int GDK_KP_Equal = 0xffbd; + public static final int GDK_KP_Home = 0xFF95; + public static final int GDK_KP_Insert = 0xFF9E; + public static final int GDK_KP_Left = 0xFF96; + public static final int GDK_KP_Multiply = 0xffaa; + public static final int GDK_KP_Page_Down = 0xFF9B; + public static final int GDK_KP_Page_Up = 0xFF9A; + public static final int GDK_KP_Right = 0xFF98; + public static final int GDK_KP_Subtract = 0xffad; + public static final int GDK_KP_Up = 0xFF97; + public static final int GDK_LEAVE_NOTIFY = 11; + public static final int GDK_LEAVE_NOTIFY_MASK = 0x2000; + public static final int GDK_LEFT_PTR = 0x44; + public static final int GDK_LEFT_SIDE = 0x46; + public static final int GDK_Linefeed = 0xff0A; + public static final int GDK_Left = 0xff51; + public static final int GDK_Meta_L = 0xFFE7; + public static final int GDK_Meta_R = 0xFFE8; + public static final int GDK_MAP = 14; + public static final int GDK_MOD1_MASK = 0x8; //usually 'alt' modifier. + public static final int GDK_SUPER_MASK = 0x4000000; + public static final int GDK_HYPER_MASK = 0x8000000; + public static final int GDK_META_MASK = 0x10000000; + public static final int GDK_MOTION_NOTIFY = 0x3; + public static final int GDK_NO_EXPOSE = 30; + public static final int GDK_NONE = 0; + public static final int GDK_NOTIFY_INFERIOR = 2; + public static final int GDK_Num_Lock = 0xFF7F; + public static final int GDK_OVERLAP_RECTANGLE_OUT = 0x1; + public static final int GDK_OWNERSHIP_NONE = 0; + public static final int GDK_PIXBUF_ALPHA_BILEVEL = 0x0; + public static final int GDK_POINTER_MOTION_HINT_MASK = 0x8; + public static final int GDK_POINTER_MOTION_MASK = 0x4; + public static final int GDK_PROPERTY_NOTIFY = 16; + public static final int GDK_PROPERTY_CHANGE_MASK = 1 << 16; + public static final int GDK_Page_Down = 0xff56; + public static final int GDK_Page_Up = 0xff55; + public static final int GDK_Pause = 0xff13; + public static final int GDK_Print = 0xff61; + public static final int GDK_QUESTION_ARROW = 0x5c; + public static final int GDK_RIGHT_SIDE = 0x60; + public static final int GDK_Return = 0xff0d; + public static final int GDK_Right = 0xff53; + public static final int GDK_space = 0x20; + public static final int GDK_SB_H_DOUBLE_ARROW = 0x6c; + public static final int GDK_SB_UP_ARROW = 0x72; + public static final int GDK_SB_V_DOUBLE_ARROW = 0x74; + public static final int GDK_SCROLL_UP = 0; + public static final int GDK_SCROLL_DOWN = 1; + public static final int GDK_SCROLL_LEFT = 2; + public static final int GDK_SCROLL_RIGHT = 3; + public static final int GDK_SCROLL_SMOOTH = 4; + public static final int GDK_SCROLL_MASK = 1 << 21; + public static final int GDK_SMOOTH_SCROLL_MASK = 1 << 23; + public static final int GDK_SELECTION_CLEAR = 17; + public static final int GDK_SELECTION_NOTIFY = 19; + public static final int GDK_SELECTION_REQUEST = 18; + public static final int GDK_SHIFT_MASK = 0x1; + public static final int GDK_SIZING = 0x78; + public static final int GDK_STIPPLED = 0x2; + public static final int GDK_TILED = 0x1; + public static final int GDK_Shift_L = 0xffe1; + public static final int GDK_Shift_R = 0xffe2; + public static final int GDK_SCROLL = 31; + public static final int GDK_Scroll_Lock = 0xff14; + public static final int GDK_TOP_LEFT_CORNER = 0x86; + public static final int GDK_TOP_RIGHT_CORNER = 0x88; + public static final int GDK_TOP_SIDE = 0x8a; + public static final int GDK_Tab = 0xff09; + public static final int GDK_Up = 0xff52; + public static final int GDK_WATCH = 0x96; + public static final int GDK_XOR = 0x2; + public static final int GDK_XTERM = 0x98; + public static final int GDK_X_CURSOR = 0x0; + public static final int GDK_WINDOW_CHILD = 2; + public static final int GDK_WINDOW_STATE = 32; + public static final int GDK_WINDOW_STATE_ICONIFIED = 1 << 1; + public static final int GDK_WINDOW_STATE_MAXIMIZED = 1 << 2; + public static final int GDK_WINDOW_STATE_FULLSCREEN = 1 << 4; + public static final int GDK_UNMAP = 15; + public static final int GDK_WA_X = 1 << 2; + public static final int GDK_WA_Y = 1 << 3; + public static final int GDK_WA_VISUAL = 1 << 6; + public static final int GDK_WINDOW_TYPE_HINT_DIALOG = 1; + public static final int GDK_WINDOW_TYPE_HINT_TOOLTIP = 10; + + /** sizeof(TYPE) for 32/64 bit support */ + public static final native int GdkColor_sizeof(); + public static final native int GdkKeymapKey_sizeof(); + public static final native int GdkRGBA_sizeof(); + public static final native int GdkDragContext_sizeof(); + public static final native int GdkEvent_sizeof(); + public static final native int GdkEventAny_sizeof(); + public static final native int GdkEventButton_sizeof(); + public static final native int GdkEventCrossing_sizeof(); + public static final native int GdkEventExpose_sizeof(); + public static final native int GdkEventFocus_sizeof(); + public static final native int GdkEventKey_sizeof(); + public static final native int GdkEventMotion_sizeof(); + public static final native int GdkEventScroll_sizeof(); + public static final native int GdkEventWindowState_sizeof(); + public static final native int GdkGeometry_sizeof(); + public static final native int GdkRectangle_sizeof(); + public static final native int GdkWindowAttr_sizeof(); + + + /** Macros */ + /** @param event cast=(GdkEvent *) */ + public static final native int GDK_EVENT_TYPE(long /*int*/ event); + /** @param event cast=(GdkEventAny *) */ + public static final native long /*int*/ GDK_EVENT_WINDOW(long /*int*/ event); + /** @param display cast=(GdkDisplay *) */ + public static final native boolean GDK_IS_X11_DISPLAY(long /*int*/ display); + /** @param pixmap cast=(GdkPixmap *) */ + public static final native long /*int*/ _GDK_PIXMAP_XID(long /*int*/ pixmap); + public static final long /*int*/ GDK_PIXMAP_XID(long /*int*/ pixmap) { + lock.lock(); + try { + return _GDK_PIXMAP_XID(pixmap); + } finally { + lock.unlock(); + } + } + + /** @method flags=const */ + public static final native long /*int*/ _GDK_TYPE_COLOR(); + public static final long /*int*/ GDK_TYPE_COLOR() { + lock.lock(); + try { + return _GDK_TYPE_COLOR(); + } finally { + lock.unlock(); + } + } + /** @method flags=const */ + public static final native long /*int*/ _GDK_TYPE_RGBA(); + public static final long /*int*/ GDK_TYPE_RGBA() { + lock.lock(); + assert GTK.GTK3 : "GTK3 code was run by GTK2"; + try { + return _GDK_TYPE_RGBA(); + } finally { + lock.unlock(); + } + } + /** @method flags=const */ + public static final native long /*int*/ _GDK_TYPE_PIXBUF(); + public static final long /*int*/ GDK_TYPE_PIXBUF() { + lock.lock(); + try { + return _GDK_TYPE_PIXBUF(); + } finally { + lock.unlock(); + } + } + + /** @param gdkdisplay cast=(GdkDisplay *) */ + public static final native long /*int*/ _gdk_x11_display_get_xdisplay(long /*int*/ gdkdisplay); + public static final long /*int*/ gdk_x11_display_get_xdisplay (long /*int*/ gdkdisplay) { + lock.lock(); + try { + return _gdk_x11_display_get_xdisplay(gdkdisplay); + } finally { + lock.unlock(); + } + } + /** @method flags=dynamic */ + public static final native long /*int*/ _gdk_x11_drawable_get_xid(long /*int*/ drawable); + public static final long /*int*/ gdk_x11_drawable_get_xid(long /*int*/ drawable) { + lock.lock(); + try { + return _gdk_x11_drawable_get_xid(drawable); + } finally { + lock.unlock(); + } + } + public static final native long /*int*/ _gdk_x11_get_default_xdisplay(); + public static final long /*int*/ gdk_x11_get_default_xdisplay () { + lock.lock(); + try { + return _gdk_x11_get_default_xdisplay(); + } finally { + lock.unlock(); + } + } + /** + * @method flags=dynamic + * @param screen cast=(GdkScreen *) + * @param xvisualid cast=(VisualID) + */ + public static final native long /*int*/ _gdk_x11_screen_lookup_visual(long /*int*/ screen, int xvisualid); + public static final long /*int*/ gdk_x11_screen_lookup_visual(long /*int*/ screen, int xvisualid) { + lock.lock(); + try { + return _gdk_x11_screen_lookup_visual(screen, xvisualid); + } finally { + lock.unlock(); + } + } + /** + * @method flags=dynamic + * @param screen cast=(GdkScreen *) + */ + public static final native long /*int*/ _gdk_x11_screen_get_window_manager_name(long /*int*/ screen); + public static final long /*int*/ gdk_x11_screen_get_window_manager_name(long /*int*/ screen) { + lock.lock(); + try { + return _gdk_x11_screen_get_window_manager_name(screen); + } finally { + lock.unlock(); + } + } + /** @param visual cast=(GdkVisual *) */ + public static final native long /*int*/ _gdk_x11_visual_get_xvisual(long /*int*/ visual); + public static final long /*int*/ gdk_x11_visual_get_xvisual(long /*int*/ visual) { + lock.lock(); + try { + return _gdk_x11_visual_get_xvisual(visual); + } finally { + lock.unlock(); + } + } + /** + * @method flags=dynamic + * @param gdkwindow cast=(GdkWindow *) + */ + public static final native long /*int*/ _gdk_x11_window_get_xid(long /*int*/ gdkwindow); + public static final long /*int*/ gdk_x11_window_get_xid(long /*int*/ gdkwindow) { + lock.lock(); + try { + return _gdk_x11_window_get_xid(gdkwindow); + } finally { + lock.unlock(); + } + } + /** + * @method flags=dynamic + * @param gdkdisplay cast=(GdkDisplay *) + */ + public static final native long /*int*/ _gdk_x11_window_lookup_for_display(long /*int*/ gdkdisplay, long /*int*/ xid); + public static final long /*int*/ gdk_x11_window_lookup_for_display(long /*int*/ gdkdisplay, long /*int*/ xid) { + lock.lock(); + try { + return _gdk_x11_window_lookup_for_display(gdkdisplay, xid); + } finally { + lock.unlock(); + } + } + /** + * @param window cast=(GdkWindow *) + * @param function cast=(GdkFilterFunc) + * @param data cast=(gpointer) + */ + public static final native void _gdk_window_add_filter(long /*int*/ window, long /*int*/ function, long /*int*/ data); + public static final void gdk_window_add_filter(long /*int*/ window, long /*int*/ function, long /*int*/ data) { + lock.lock(); + try { + _gdk_window_add_filter(window, function, data); + } finally { + lock.unlock(); + } + } + /** + * @param window cast=(GdkWindow *) + * @param function cast=(GdkFilterFunc) + * @param data cast=(gpointer) + */ + public static final native void _gdk_window_remove_filter(long /*int*/ window, long /*int*/ function, long /*int*/ data); + public static final void gdk_window_remove_filter(long /*int*/ window, long /*int*/ function, long /*int*/ data) { + lock.lock(); + try { + _gdk_window_remove_filter(window, function, data); + } finally { + lock.unlock(); + } + } + /** @param atom_name cast=(const gchar *),flags=no_out critical */ + public static final native long /*int*/ _gdk_atom_intern(byte[] atom_name, boolean only_if_exists); + public static final long /*int*/ gdk_atom_intern(byte[] atom_name, boolean only_if_exists) { + lock.lock(); + try { + return _gdk_atom_intern(atom_name, only_if_exists); + } finally { + lock.unlock(); + } + } + /** @param atom cast=(GdkAtom) */ + public static final native long /*int*/ _gdk_atom_name(long /*int*/ atom); + public static final long /*int*/ gdk_atom_name(long /*int*/ atom) { + lock.lock(); + try { + return _gdk_atom_name(atom); + } finally { + lock.unlock(); + } + } + public static final native void _gdk_beep(); + public static final void gdk_beep() { + lock.lock(); + try { + _gdk_beep(); + } finally { + lock.unlock(); + } + } + /** + * @method flags=dynamic + * @param window cast=(GdkWindow *) + * @param data cast=(const gchar *),flags=no_out critical + * @param width cast=(gint) + * @param height cast=(gint) + */ + public static final native long /*int*/ _gdk_bitmap_create_from_data(long /*int*/ window, byte[] data, int width, int height); + public static final long /*int*/ gdk_bitmap_create_from_data(long /*int*/ window, byte[] data, int width, int height) { + lock.lock(); + try { + return _gdk_bitmap_create_from_data(window, data, width, height); + } finally { + lock.unlock(); + } + } + /** @method flags=dynamic */ + public static final native long /*int*/ _gdk_cairo_create(long /*int*/ drawable); + public static final long /*int*/ gdk_cairo_create(long /*int*/ drawable) { + lock.lock(); + try { + return _gdk_cairo_create(drawable); + } finally { + lock.unlock(); + } + } + /** @method flags=dynamic */ + public static final native boolean _gdk_cairo_get_clip_rectangle(long /*int*/ cr, GdkRectangle rect); + public static final boolean gdk_cairo_get_clip_rectangle(long /*int*/ cr, GdkRectangle rect) { + lock.lock(); + try { + return _gdk_cairo_get_clip_rectangle(cr, rect); + } finally { + lock.unlock(); + } + } + /** @method flags=dynamic */ + public static final native void _gdk_cairo_region(long /*int*/ cairo, long /*int*/ region); + public static final void gdk_cairo_region(long /*int*/ cairo, long /*int*/ region) { + lock.lock(); + try { + _gdk_cairo_region(cairo, region); + } finally { + lock.unlock(); + } + } + /** @method flags=dynamic */ + public static final native void _gdk_cairo_reset_clip(long /*int*/ cairo, long /*int*/ drawable); + public static final void gdk_cairo_reset_clip(long /*int*/ cairo, long /*int*/ drawable) { + lock.lock(); + try { + _gdk_cairo_reset_clip(cairo, drawable); + } finally { + lock.unlock(); + } + } + /** @method flags=dynamic */ + public static final native void _gdk_cairo_set_source_color(long /*int*/ cairo, GdkColor color); + public static final void gdk_cairo_set_source_color(long /*int*/ cairo, GdkColor color) { + lock.lock(); + try { + _gdk_cairo_set_source_color(cairo, color); + } finally { + lock.unlock(); + } + } + /** @method flags=dynamic */ + public static final native void _gdk_cairo_set_source_rgba(long /*int*/ cairo, GdkRGBA rgba); + public static final void gdk_cairo_set_source_rgba(long /*int*/ cairo, GdkRGBA rgba) { + lock.lock(); + try { + _gdk_cairo_set_source_rgba(cairo, rgba); + } finally { + lock.unlock(); + } + } + /** + * @param window cast=(GdkWindow *) + * @method flags=dynamic + */ + public static final native int _gdk_window_get_width(long /*int*/ window); + public static final int gdk_window_get_width(long /*int*/ window) { + lock.lock(); + try { + return _gdk_window_get_width(window); + } finally { + lock.unlock(); + } + } + /** + * @param window cast=(GdkWindow *) + * @method flags=dynamic + */ + public static final native long /*int*/ _gdk_window_get_visible_region(long /*int*/ window); + public static final long /*int*/ gdk_window_get_visible_region(long /*int*/ window) { + lock.lock(); + try { + return _gdk_window_get_visible_region(window); + } finally { + lock.unlock(); + } + } + /** + * @param window cast=(GdkWindow *) + * @method flags=dynamic + */ + public static final native int _gdk_window_get_height(long /*int*/ window); + public static final int gdk_window_get_height(long /*int*/ window) { + lock.lock(); + try { + return _gdk_window_get_height(window); + } finally { + lock.unlock(); + } + } + /** + * @method flags=dynamic + * @param pixbuf cast=(const GdkPixbuf *) + */ + public static final native void _gdk_cairo_set_source_pixbuf(long /*int*/ cairo, long /*int*/ pixbuf, double pixbuf_x, double pixbuf_y); + public static final void gdk_cairo_set_source_pixbuf(long /*int*/ cairo, long /*int*/ pixbuf, double pixbuf_x, double pixbuf_y) { + lock.lock(); + try { + _gdk_cairo_set_source_pixbuf(cairo,pixbuf,pixbuf_x,pixbuf_y); + } + finally { + lock.unlock(); + } + } + /** + * @method flags=dynamic + */ + public static final native void _gdk_cairo_set_source_pixmap(long /*int*/ cairo, long /*int*/ pixmap, double pixbuf_x, double pixbuf_y); + public static final void gdk_cairo_set_source_pixmap(long /*int*/ cairo, long /*int*/ pixmap, double pixbuf_x, double pixbuf_y) { + lock.lock(); + try { + _gdk_cairo_set_source_pixmap(cairo,pixmap,pixbuf_x,pixbuf_y); + } + finally { + lock.unlock(); + } + } + /** + * @method flags=dynamic + * @param window cast=(GdkWindow *) + */ + public static final native void _gdk_cairo_set_source_window(long /*int*/ cairo, long /*int*/ window, int x, int y); + public static final void gdk_cairo_set_source_window(long /*int*/ cairo, long /*int*/ window, int x, int y) { + lock.lock(); + try { + _gdk_cairo_set_source_window(cairo, window, x, y); + } + finally { + lock.unlock(); + } + } + /** + * @method flags=dynamic + * @param color cast=(GdkColor *) */ + public static final native void _gdk_color_free(long /*int*/ color); + public static final void gdk_color_free(long /*int*/ color) { + lock.lock(); + assert !GTK.GTK3 : "GTK2 code was run by GTK3"; + try { + _gdk_color_free(color); + } finally { + lock.unlock(); + } + } + /** + * @method flags=dynamic + * @param spec cast=(const gchar *) + * @param color cast=(GdkColor *),flags=no_in + */ + public static final native boolean _gdk_color_parse(byte[] spec, GdkColor color); + public static final boolean gdk_color_parse(byte[] spec, GdkColor color) { + lock.lock(); + assert !GTK.GTK3 : "GTK2 code was run by GTK3"; + try { + return _gdk_color_parse(spec, color); + } finally { + lock.unlock(); + } + } + /** + * @method flags=dynamic + * @param color flags=no_in + */ + public static final native boolean _gdk_color_white(long /*int*/ colormap, GdkColor color); + public static final boolean gdk_color_white(long /*int*/ colormap, GdkColor color) { + lock.lock(); + try { + return _gdk_color_white(colormap, color); + } finally { + lock.unlock(); + } + } + /** + * @method flags=dynamic + * @param color cast=(GdkColor *) + * @param writeable cast=(gboolean) + * @param best_match cast=(gboolean) + */ + public static final native boolean _gdk_colormap_alloc_color(long /*int*/ colormap, GdkColor color, boolean writeable, boolean best_match); + public static final boolean gdk_colormap_alloc_color(long /*int*/ colormap, GdkColor color, boolean writeable, boolean best_match) { + lock.lock(); + try { + return _gdk_colormap_alloc_color(colormap, color, writeable, best_match); + } finally { + lock.unlock(); + } + } + /** + * @method flags=dynamic + * @param colors cast=(GdkColor *),flags=no_out + * @param ncolors cast=(gint) + */ + public static final native void _gdk_colormap_free_colors(long /*int*/ colormap, GdkColor colors, int ncolors); + public static final void gdk_colormap_free_colors(long /*int*/ colormap, GdkColor colors, int ncolors) { + lock.lock(); + try { + _gdk_colormap_free_colors(colormap, colors, ncolors); + } finally { + lock.unlock(); + } + } + /** @method flags=dynamic */ + public static final native long /*int*/ _gdk_colormap_get_system(); + public static final long /*int*/ gdk_colormap_get_system() { + lock.lock(); + try { + return _gdk_colormap_get_system(); + } finally { + lock.unlock(); + } + } + /** @method flags=dynamic */ + public static final native void _gdk_cursor_unref(long /*int*/ cursor); + public static final void gdk_cursor_unref(long /*int*/ cursor) { + lock.lock(); + try { + _gdk_cursor_unref(cursor); + } finally { + lock.unlock(); + } + } + /** @param display cast=(GdkDisplay *) + * @param cursor_type cast=(GdkCursorType) + */ + public static final native long /*int*/ _gdk_cursor_new_for_display(long /*int*/ display, long /*int*/ cursor_type); + public static final long /*int*/ gdk_cursor_new_for_display(long /*int*/ display, long /*int*/ cursor_type) { + lock.lock(); + try { + return _gdk_cursor_new_for_display(display, cursor_type); + } finally { + lock.unlock(); + } + } + /** @param display cast=(GdkDisplay *) + * @param cursor_name cast=(const gchar *) + */ + public static final native long /*int*/ _gdk_cursor_new_from_name(long /*int*/ display, byte[] cursor_name); + public static final long /*int*/ gdk_cursor_new_from_name(long /*int*/ display, byte[] cursor_name) { + lock.lock(); + try { + return _gdk_cursor_new_from_name(display, cursor_name); + } finally { + lock.unlock(); + } + } + /** + * @method flags=dynamic + * @param fg cast=(GdkColor *),flags=no_out + * @param bg cast=(GdkColor *),flags=no_out + * @param x cast=(gint) + * @param y cast=(gint) + */ + public static final native long /*int*/ _gdk_cursor_new_from_pixmap(long /*int*/ source, long /*int*/ mask, GdkColor fg, GdkColor bg, int x, int y); + public static final long /*int*/ gdk_cursor_new_from_pixmap(long /*int*/ source, long /*int*/ mask, GdkColor fg, GdkColor bg, int x, int y) { + lock.lock(); + try { + return _gdk_cursor_new_from_pixmap(source, mask, fg, bg, x, y); + } finally { + lock.unlock(); + } + } + /** @method flags=dynamic */ + public static final native long /*int*/ _gdk_cursor_new_from_pixbuf(long /*int*/ display, long /*int*/ pixbuf, int x, int y); + public static final long /*int*/ gdk_cursor_new_from_pixbuf(long /*int*/ display, long /*int*/ pixbuf, int x, int y) { + lock.lock(); + try { + return _gdk_cursor_new_from_pixbuf(display, pixbuf, x, y); + } finally { + lock.unlock(); + } + } + /** @method flags=dynamic */ + public static final native void _gdk_display_warp_pointer(long /*int*/ device, long /*int*/ screen, int x, int y); + public static final void gdk_display_warp_pointer(long /*int*/ device, long /*int*/ screen, int x, int y) { + lock.lock(); + try { + _gdk_display_warp_pointer(device, screen, x, y); + } finally { + lock.unlock(); + } + } + /** @method flags=dynamic */ + public static final native void _gdk_device_warp(long /*int*/ device, long /*int*/ screen, int x, int y); + public static final void gdk_device_warp(long /*int*/ device, long /*int*/ screen, int x, int y) { + lock.lock(); + try { + _gdk_device_warp(device, screen, x, y); + } finally { + lock.unlock(); + } + } + /** @method flags=dynamic */ + public static final native long /*int*/ _gdk_display_get_default(); + public static final long /*int*/ gdk_display_get_default() { + lock.lock(); + try { + return _gdk_display_get_default(); + } finally { + lock.unlock(); + } + } + /** + * @method flags=dynamic + */ + public static final native long /*int*/ _gdk_display_get_default_seat(long /*int*/ display); + public static final long /*int*/ gdk_display_get_default_seat(long /*int*/ display) { + lock.lock(); + try { + return _gdk_display_get_default_seat(display); + } finally { + lock.unlock(); + } + } + /** + * @method flags=dynamic + * @param window cast=(GdkWindow *) + */ + public static final native long /*int*/ _gdk_window_get_display(long /*int*/ window); + public static final long /*int*/ gdk_window_get_display(long /*int*/ window) { + lock.lock(); + try { + return _gdk_window_get_display(window); + } finally { + lock.unlock(); + } + } + /** + * @method flags=dynamic + * @param display cast=(GdkDisplay *) + */ + public static final native long /*int*/ _gdk_display_get_device_manager(long /*int*/ display); + public static final long /*int*/ gdk_display_get_device_manager(long /*int*/ display) { + lock.lock(); + try { + return _gdk_display_get_device_manager(display); + } finally { + lock.unlock(); + } + } + /** @method flags=dynamic */ + public static final native long /*int*/ _gdk_device_manager_get_client_pointer(long /*int*/ device_manager); + public static final long /*int*/ gdk_device_manager_get_client_pointer(long /*int*/ device_manager) { + lock.lock(); + try { + return _gdk_device_manager_get_client_pointer(device_manager); + } finally { + lock.unlock(); + } + } + /** + * @method flags=dynamic + * @param win_x cast=(gint *) + * @param win_y cast=(gint *) + */ + public static final native long /*int*/ _gdk_device_get_window_at_position(long /*int*/ device, int[] win_x, int[] win_y); + public static final long /*int*/ gdk_device_get_window_at_position(long /*int*/ device, int[] win_x, int[] win_y) { + lock.lock(); + try { + return _gdk_device_get_window_at_position(device, win_x, win_y); + } finally { + lock.unlock(); + } + } + /** @method flags=dynamic */ + public static final native boolean _gdk_display_supports_cursor_color(long /*int*/ display); + public static final boolean gdk_display_supports_cursor_color(long /*int*/ display) { + lock.lock(); + try { + return _gdk_display_supports_cursor_color(display); + } finally { + lock.unlock(); + } + } + /** + * @method flags=dynamic + * @param context cast=(GdkDragContext *) + */ + public static final native int _gdk_drag_context_get_actions(long /*int*/ context); + public static final int gdk_drag_context_get_actions(long /*int*/ context) { + lock.lock(); + try { + return _gdk_drag_context_get_actions(context); + } finally { + lock.unlock(); + } + } + /** + * @method flags=dynamic + * @param context cast=(GdkDragContext *) + */ + public static final native long /*int*/ _gdk_drag_context_get_dest_window(long /*int*/ context); + public static final long /*int*/ gdk_drag_context_get_dest_window(long /*int*/ context) { + lock.lock(); + try { + return _gdk_drag_context_get_dest_window(context); + } finally { + lock.unlock(); + } + } + /** + * @method flags=dynamic + * @param context cast=(GdkDragContext *) + */ + public static final native int _gdk_drag_context_get_selected_action(long /*int*/ context); + public static final int gdk_drag_context_get_selected_action(long /*int*/ context) { + lock.lock(); + try { + return _gdk_drag_context_get_selected_action(context); + } finally { + lock.unlock(); + } + } + /** + * @method flags=dynamic + * @param context cast=(GdkDragContext *) + */ + public static final native long /*int*/ _gdk_drag_context_list_targets(long /*int*/ context); + public static final long /*int*/ gdk_drag_context_list_targets(long /*int*/ context) { + lock.lock(); + try { + return _gdk_drag_context_list_targets(context); + } finally { + lock.unlock(); + } + } + /** + * @param context cast=(GdkDragContext *) + * @param action cast=(GdkDragAction) + * @param time cast=(guint32) + */ + public static final native void _gdk_drag_status(long /*int*/ context, int action, int time); + public static final void gdk_drag_status(long /*int*/ context, int action, int time) { + lock.lock(); + try { + _gdk_drag_status(context, action, time); + } finally { + lock.unlock(); + } + } + /** + * @method flags=dynamic + * @param filled cast=(gint) + * @param x cast=(gint) + * @param y cast=(gint) + * @param width cast=(gint) + * @param height cast=(gint) + * @param angle1 cast=(gint) + * @param angle2 cast=(gint) + */ + public static final native void _gdk_draw_arc(long /*int*/ drawable, long /*int*/ gc, int filled, int x, int y, int width, int height, int angle1, int angle2); + public static final void gdk_draw_arc(long /*int*/ drawable, long /*int*/ gc, int filled, int x, int y, int width, int height, int angle1, int angle2) { + lock.lock(); + try { + _gdk_draw_arc(drawable, gc, filled, x, y, width, height, angle1, angle2); + } finally { + lock.unlock(); + } + } + /** + * @method flags=dynamic + */ + public static final native void _gdk_draw_image(long /*int*/ drawable, long /*int*/ gc, long /*int*/ image, int xsrc, int ysrc, int xdest, int ydest, int width, int height); + public static final void gdk_draw_image(long /*int*/ drawable, long /*int*/ gc, long /*int*/ image, int xsrc, int ysrc, int xdest, int ydest, int width, int height) { + lock.lock(); + try { + _gdk_draw_image(drawable, gc, image, xsrc, ysrc, xdest, ydest, width, height); + } finally { + lock.unlock(); + } + } + /** + * @method flags=dynamic + * @param xsrc cast=(gint) + * @param ysrc cast=(gint) + * @param xdest cast=(gint) + * @param ydest cast=(gint) + * @param width cast=(gint) + * @param height cast=(gint) + * @param x_dither cast=(gint) + * @param y_dither cast=(gint) + */ + public static final native void _gdk_draw_pixbuf(long /*int*/ drawable, long /*int*/ gc, long /*int*/ pixbuf, int xsrc, int ysrc, int xdest, int ydest, int width, int height, int dither, int x_dither, int y_dither); + public static final void gdk_draw_pixbuf(long /*int*/ drawable, long /*int*/ gc, long /*int*/ pixbuf, int xsrc, int ysrc, int xdest, int ydest, int width, int height, int dither, int x_dither, int y_dither) { + lock.lock(); + try { + _gdk_draw_pixbuf(drawable, gc, pixbuf, xsrc, ysrc, xdest, ydest, width, height, dither, x_dither, y_dither); + } finally { + lock.unlock(); + } + } + /** + * @method flags=dynamic + * @param filled cast=(gint) + * @param x cast=(gint) + * @param y cast=(gint) + * @param width cast=(gint) + * @param height cast=(gint) + */ + public static final native void _gdk_draw_rectangle(long /*int*/ drawable, long /*int*/ gc, int filled, int x, int y, int width, int height); + public static final void gdk_draw_rectangle(long /*int*/ drawable, long /*int*/ gc, int filled, int x, int y, int width, int height) { + lock.lock(); + try { + _gdk_draw_rectangle(drawable, gc, filled, x, y, width, height); + } finally { + lock.unlock(); + } + } + /** @method flags=dynamic */ + public static final native int _gdk_drawable_get_depth(long /*int*/ drawable); + public static final int gdk_drawable_get_depth(long /*int*/ drawable) { + lock.lock(); + try { + return _gdk_drawable_get_depth(drawable); + } finally { + lock.unlock(); + } + } + /** + * @method flags=dynamic + * @param width cast=(gint *),flags=no_in critical + * @param height cast=(gint *),flags=no_in critical + * @method flags=dynamic + */ + public static final native void _gdk_pixmap_get_size(long /*int*/ pixmap, int[] width, int[] height); + public static final void gdk_pixmap_get_size(long /*int*/ pixmap, int[] width, int[] height) { + lock.lock(); + try { + _gdk_pixmap_get_size (pixmap,width,height); + } finally { + lock.unlock(); + } + } + /** + * @method flags=dynamic + * @param x cast=(gint) + * @param y cast=(gint) + * @param width cast=(gint) + * @param height cast=(gint) + */ + public static final native long /*int*/ _gdk_drawable_get_image(long /*int*/ drawable, int x, int y, int width, int height); + public static final long /*int*/ gdk_drawable_get_image(long /*int*/ drawable, int x, int y, int width, int height) { + lock.lock(); + try { + return _gdk_drawable_get_image(drawable, x, y, width, height); + } finally { + lock.unlock(); + } + } + /** @method flags=dynamic */ + public static final native long /*int*/ _gdk_drawable_get_visible_region(long /*int*/ drawable); + public static final long /*int*/ gdk_drawable_get_visible_region(long /*int*/ drawable) { + lock.lock(); + try { + return _gdk_drawable_get_visible_region(drawable); + } finally { + lock.unlock(); + } + } + /** @param event cast=(GdkEvent *) */ + public static final native long /*int*/ _gdk_event_copy(long /*int*/ event); + public static final long /*int*/ gdk_event_copy(long /*int*/ event) { + lock.lock(); + try { + return _gdk_event_copy(event); + } finally { + lock.unlock(); + } + } + /** @param event cast=(GdkEvent *) */ + public static final native void _gdk_event_free(long /*int*/ event); + public static final void gdk_event_free(long /*int*/ event) { + lock.lock(); + try { + _gdk_event_free(event); + } finally { + lock.unlock(); + } + } + public static final native long /*int*/ _gdk_event_get(); + public static final long /*int*/ gdk_event_get() { + lock.lock(); + try { + return _gdk_event_get(); + } finally { + lock.unlock(); + } + } + /** + * @param event cast=(GdkEvent *) + * @param px cast=(gdouble *) + * @param py cast=(gdouble *) + */ + public static final native boolean _gdk_event_get_coords(long /*int*/ event, double[] px, double[] py); + public static final boolean gdk_event_get_coords(long /*int*/ event, double[] px, double[] py) { + lock.lock(); + try { + return _gdk_event_get_coords(event, px, py); + } finally { + lock.unlock(); + } + } + /** + * @param event cast=(GdkEvent *) + * @param pmod cast=(GdkModifierType *) + */ + public static final native boolean _gdk_event_get_state(long /*int*/ event, int[] pmod); + public static final boolean gdk_event_get_state(long /*int*/ event, int[] pmod) { + lock.lock(); + try { + return _gdk_event_get_state(event, pmod); + } finally { + lock.unlock(); + } + } + /** + * @method flags=dynamic + * @param event cast=(GdkEvent *) + */ + public static final native boolean _gdk_event_get_scroll_deltas(long /*int*/ event, double[] delta_x, double[] delta_y); + public static final boolean gdk_event_get_scroll_deltas(long /*int*/ event, double[] delta_x, double[] delta_y) { + lock.lock(); + try { + return _gdk_event_get_scroll_deltas(event, delta_x, delta_y); + } finally { + lock.unlock(); + } + } + /** + * @method flags=dynamic + */ + public static final native long /*int*/ _gdk_event_get_seat(long /*int*/ event); + public static final long /*int*/ gdk_event_get_seat(long /*int*/ event) { + lock.lock(); + try { + return _gdk_event_get_seat(event); + } finally { + lock.unlock(); + } + } + /** @param event cast=(GdkEvent *) */ + public static final native int _gdk_event_get_time(long /*int*/ event); + public static final int gdk_event_get_time(long /*int*/ event) { + lock.lock(); + try { + return _gdk_event_get_time(event); + } finally { + lock.unlock(); + } + } + /** + * @method flags=dynamic + * @param event cast=(GdkEvent *) + */ + public static final native int _gdk_event_get_event_type(long /*int*/ event); + /** [GTK3.10+] */ + public static final int gdk_event_get_event_type(long /*int*/ event) { + lock.lock(); + try { + return _gdk_event_get_event_type(event); + } finally { + lock.unlock(); + } + } + /** + * @param func cast=(GdkEventFunc) + * @param data cast=(gpointer) + * @param notify cast=(GDestroyNotify) + */ + public static final native void _gdk_event_handler_set(long /*int*/ func, long /*int*/ data, long /*int*/ notify); + public static final void gdk_event_handler_set(long /*int*/ func, long /*int*/ data, long /*int*/ notify) { + lock.lock(); + try { + _gdk_event_handler_set(func, data, notify); + } finally { + lock.unlock(); + } + } + public static final native long /*int*/ _gdk_event_new(int type); + public static final long /*int*/ gdk_event_new(int type) { + lock.lock(); + try { + return _gdk_event_new(type); + } finally { + lock.unlock(); + } + } + public static final native long /*int*/ _gdk_event_peek(); + public static final long /*int*/ gdk_event_peek() { + lock.lock(); + try { + return _gdk_event_peek(); + } finally { + lock.unlock(); + } + } + /** @param event cast=(GdkEvent *) */ + public static final native void _gdk_event_put(long /*int*/ event); + public static final void gdk_event_put(long /*int*/ event) { + lock.lock(); + try { + _gdk_event_put(event); + } finally { + lock.unlock(); + } + } + public static final native void _gdk_error_trap_push(); + public static final void gdk_error_trap_push() { + lock.lock(); + try { + _gdk_error_trap_push(); + } finally { + lock.unlock(); + } + } + public static final native int _gdk_error_trap_pop(); + public static final int gdk_error_trap_pop() { + lock.lock(); + try { + return _gdk_error_trap_pop(); + } finally { + lock.unlock(); + } + } + public static final native void _gdk_flush(); + public static final void gdk_flush() { + lock.lock(); + try { + _gdk_flush(); + } finally { + lock.unlock(); + } + } + /** @method flags=dynamic */ + public static final native long /*int*/ _gdk_gc_new(long /*int*/ window); + public static final long /*int*/ gdk_gc_new(long /*int*/ window) { + lock.lock(); + try { + return _gdk_gc_new(window); + } finally { + lock.unlock(); + } + } + /** @method flags=dynamic */ + public static final native void _gdk_gc_set_fill(long /*int*/ gc, int fill); + public static final void gdk_gc_set_fill(long /*int*/ gc, int fill) { + lock.lock(); + try { + _gdk_gc_set_fill(gc, fill); + } finally { + lock.unlock(); + } + } + /** + * @method flags=dynamic + * @param color flags=no_out + */ + public static final native void _gdk_gc_set_foreground(long /*int*/ gc, GdkColor color); + public static final void gdk_gc_set_foreground(long /*int*/ gc, GdkColor color) { + lock.lock(); + try { + _gdk_gc_set_foreground(gc, color); + } finally { + lock.unlock(); + } + } + /** + * @method flags=dynamic + */ + public static final native void _gdk_gc_set_function(long /*int*/ gc, long /*int*/ function); + public static final void gdk_gc_set_function(long /*int*/ gc, long /*int*/ function) { + lock.lock(); + try { + _gdk_gc_set_function(gc, function); + } finally { + lock.unlock(); + } + } + /** @method flags=dynamic */ + public static final native void _gdk_gc_set_stipple(long /*int*/ gc, long /*int*/ stipple); + public static final void gdk_gc_set_stipple(long /*int*/ gc, long /*int*/ stipple) { + lock.lock(); + try { + _gdk_gc_set_stipple(gc, stipple); + } finally { + lock.unlock(); + } + } + /** + * @method flags=dynamic + */ + public static final native void _gdk_gc_set_subwindow(long /*int*/ gc, long /*int*/ mode); + public static final void gdk_gc_set_subwindow(long /*int*/ gc, long /*int*/ mode) { + lock.lock(); + try { + _gdk_gc_set_subwindow(gc, mode); + } finally { + lock.unlock(); + } + } + public static final native long /*int*/ _gdk_get_default_root_window(); + public static final long /*int*/ gdk_get_default_root_window() { + lock.lock(); + try { + return _gdk_get_default_root_window(); + } finally { + lock.unlock(); + } + } + /** @method flags=dynamic */ + public static final native void _gdk_keyboard_ungrab(int time); + public static final void gdk_keyboard_ungrab(int time) { + lock.lock(); + try { + _gdk_keyboard_ungrab(time); + } finally { + lock.unlock(); + } + } + public static final native long /*int*/ _gdk_keymap_get_default(); + public static final long /*int*/ gdk_keymap_get_default() { + lock.lock(); + try { + return _gdk_keymap_get_default(); + } finally { + lock.unlock(); + } + } + /** + * @param keymap cast=(GdkKeymap*) + * @param keyval cast=(guint) + * @param keys cast=(GdkKeymapKey**) + * @param n_keys cast=(gint*) + */ + public static final native boolean _gdk_keymap_get_entries_for_keyval (long /*int*/ keymap, long keyval, long /*int*/[] keys, int[] n_keys); + public static final boolean gdk_keymap_get_entries_for_keyval (long /*int*/ keymap, long keyval, long /*int*/[] keys, int[] n_keys) { + lock.lock(); + try { + return _gdk_keymap_get_entries_for_keyval(keymap, keyval, keys, n_keys); + } finally { + lock.unlock(); + } + } + public static final native long _gdk_keyval_to_lower(long keyval); + public static final long gdk_keyval_to_lower(long keyval) { + lock.lock(); + try { + return _gdk_keyval_to_lower(keyval); + } finally { + lock.unlock(); + } + } + public static final native long _gdk_keyval_to_unicode(long keyval); + public static final long gdk_keyval_to_unicode(long keyval) { + lock.lock(); + try { + return _gdk_keyval_to_unicode(keyval); + } finally { + lock.unlock(); + } + } + public static final native long /*int*/ _gdk_pango_context_get(); + public static final long /*int*/ gdk_pango_context_get() { + lock.lock(); + try { + return _gdk_pango_context_get(); + } finally { + lock.unlock(); + } + } + /** + * @param layout cast=(PangoLayout *) + * @param index_ranges cast=(gint *) + */ + public static final native long /*int*/ _gdk_pango_layout_get_clip_region(long /*int*/ layout, int x_origin, int y_origin, int[] index_ranges, int n_ranges); + public static final long /*int*/ gdk_pango_layout_get_clip_region(long /*int*/ layout, int x_origin, int y_origin, int[] index_ranges, int n_ranges) { + lock.lock(); + try { + return _gdk_pango_layout_get_clip_region(layout, x_origin, y_origin, index_ranges, n_ranges); + } finally { + lock.unlock(); + } + } + /** + * @param src_pixbuf cast=(GdkPixbuf *) + * @param dest_pixbuf cast=(GdkPixbuf *) + */ + public static final native void _gdk_pixbuf_copy_area(long /*int*/ src_pixbuf, int src_x, int src_y, int width, int height, long /*int*/ dest_pixbuf, int dest_x, int dest_y); + public static final void gdk_pixbuf_copy_area(long /*int*/ src_pixbuf, int src_x, int src_y, int width, int height, long /*int*/ dest_pixbuf, int dest_x, int dest_y) { + lock.lock(); + try { + _gdk_pixbuf_copy_area(src_pixbuf, src_x, src_y, width, height, dest_pixbuf, dest_x, dest_y); + } finally { + lock.unlock(); + } + } + /** + * @method flags=dynamic + * @param dest cast=(GdkPixbuf *) + */ + public static final native long /*int*/ _gdk_pixbuf_get_from_drawable(long /*int*/ dest, long /*int*/ src, long /*int*/ cmap, int src_x, int src_y, int dest_x, int dest_y, int width, int height); + public static final long /*int*/ gdk_pixbuf_get_from_drawable(long /*int*/ dest, long /*int*/ src, long /*int*/ cmap, int src_x, int src_y, int dest_x, int dest_y, int width, int height) { + lock.lock(); + try { + return _gdk_pixbuf_get_from_drawable(dest, src, cmap, src_x, src_y, dest_x, dest_y, width, height); + } finally { + lock.unlock(); + } + } + /** + * @method flags=dynamic + * @param window cast=(GdkWindow *) + * @param src_x cast=(gint) + * @param src_y cast=(gint) + * @param width cast=(gint) + * @param height cast=(gint) + */ + public static final native long /*int*/ _gdk_pixbuf_get_from_window(long /*int*/ window, int src_x, int src_y, int width, int height); + public static final long /*int*/ gdk_pixbuf_get_from_window(long /*int*/ window, int src_x, int src_y, int width, int height) { + lock.lock(); + try { + return _gdk_pixbuf_get_from_window(window, src_x, src_y, width, height); + } finally { + lock.unlock(); + } + } + /** @param pixbuf cast=(const GdkPixbuf *) */ + public static final native boolean _gdk_pixbuf_get_has_alpha(long /*int*/ pixbuf); + public static final boolean gdk_pixbuf_get_has_alpha(long /*int*/ pixbuf) { + lock.lock(); + try { + return _gdk_pixbuf_get_has_alpha(pixbuf); + } finally { + lock.unlock(); + } + } + /** @param pixbuf cast=(const GdkPixbuf *) */ + public static final native int _gdk_pixbuf_get_height(long /*int*/ pixbuf); + public static final int gdk_pixbuf_get_height(long /*int*/ pixbuf) { + lock.lock(); + try { + return _gdk_pixbuf_get_height(pixbuf); + } finally { + lock.unlock(); + } + } + /** @param pixbuf cast=(const GdkPixbuf *) */ + public static final native long /*int*/ _gdk_pixbuf_get_pixels(long /*int*/ pixbuf); + public static final long /*int*/ gdk_pixbuf_get_pixels(long /*int*/ pixbuf) { + lock.lock(); + try { + return _gdk_pixbuf_get_pixels(pixbuf); + } finally { + lock.unlock(); + } + } + /** @param pixbuf cast=(const GdkPixbuf *) */ + public static final native int _gdk_pixbuf_get_rowstride(long /*int*/ pixbuf); + public static final int gdk_pixbuf_get_rowstride(long /*int*/ pixbuf) { + lock.lock(); + try { + return _gdk_pixbuf_get_rowstride(pixbuf); + } finally { + lock.unlock(); + } + } + /** @param pixbuf cast=(const GdkPixbuf *) */ + public static final native int _gdk_pixbuf_get_width(long /*int*/ pixbuf); + public static final int gdk_pixbuf_get_width(long /*int*/ pixbuf) { + lock.lock(); + try { + return _gdk_pixbuf_get_width(pixbuf); + } finally { + lock.unlock(); + } + } + public static final native long /*int*/ _gdk_pixbuf_loader_new(); + public static final long /*int*/ gdk_pixbuf_loader_new() { + lock.lock(); + try { + return _gdk_pixbuf_loader_new(); + } finally { + lock.unlock(); + } + } + /** + * @param loader cast=(GdkPixbufLoader *) + * @param error cast=(GError **) + */ + public static final native boolean _gdk_pixbuf_loader_close(long /*int*/ loader, long /*int*/ [] error); + public static final boolean gdk_pixbuf_loader_close(long /*int*/ loader, long /*int*/ [] error) { + lock.lock(); + try { + return _gdk_pixbuf_loader_close(loader, error); + } finally { + lock.unlock(); + } + } + /** @param loader cast=(GdkPixbufLoader *) */ + public static final native long /*int*/ _gdk_pixbuf_loader_get_pixbuf(long /*int*/ loader); + public static final long /*int*/ gdk_pixbuf_loader_get_pixbuf(long /*int*/ loader) { + lock.lock(); + try { + return _gdk_pixbuf_loader_get_pixbuf(loader); + } finally { + lock.unlock(); + } + } + /** + * @param loader cast=(GdkPixbufLoader *) + * @param buffer cast=(const guchar *) + * @param count cast=(gsize) + * @param error cast=(GError **) + */ + public static final native boolean _gdk_pixbuf_loader_write(long /*int*/ loader, long /*int*/ buffer, int count, long /*int*/ [] error); + public static final boolean gdk_pixbuf_loader_write(long /*int*/ loader, long /*int*/ buffer, int count, long /*int*/ [] error) { + lock.lock(); + try { + return _gdk_pixbuf_loader_write(loader, buffer, count, error); + } finally { + lock.unlock(); + } + } + /** + * @param colorspace cast=(GdkColorspace) + * @param has_alpha cast=(gboolean) + */ + public static final native long /*int*/ _gdk_pixbuf_new(int colorspace, boolean has_alpha, int bits_per_sample, int width, int height); + public static final long /*int*/ gdk_pixbuf_new(int colorspace, boolean has_alpha, int bits_per_sample, int width, int height) { + lock.lock(); + try { + return _gdk_pixbuf_new(colorspace, has_alpha, bits_per_sample, width, height); + } finally { + lock.unlock(); + } + } + /** + * @param filename cast=(const char *) + * @param error cast=(GError**) + */ + public static final native long /*int*/ _gdk_pixbuf_new_from_file(byte[] filename, long /*int*/ [] error); + public static final long /*int*/ gdk_pixbuf_new_from_file(byte[] filename, long /*int*/ [] error) { + lock.lock(); + try { + return _gdk_pixbuf_new_from_file(filename, error); + } finally { + lock.unlock(); + } + } + /** + * @method flags=dynamic + * @param pixbuf cast=(GdkPixbuf *) + * @param buffer cast=(gchar **) + * @param buffer_size cast=(gsize *) + * @param type cast=(const char *) + * @param option_keys cast=(char **) + * @param option_values cast=(char **) + * @param error cast=(GError **) + */ + public static final native boolean _gdk_pixbuf_save_to_bufferv(long /*int*/ pixbuf, long /*int*/ [] buffer, long /*int*/ [] buffer_size, byte [] type, long /*int*/ [] option_keys, long /*int*/ [] option_values, long /*int*/ [] error); + public static final boolean gdk_pixbuf_save_to_bufferv(long /*int*/ pixbuf, long /*int*/ [] buffer, long /*int*/ [] buffer_size, byte [] type, long /*int*/ [] option_keys, long /*int*/ [] option_values, long /*int*/ [] error) { + lock.lock(); + try { + return _gdk_pixbuf_save_to_bufferv(pixbuf, buffer, buffer_size, type, option_keys, option_values, error); + } finally { + lock.unlock(); + } + } + /** + * @param src cast=(const GdkPixbuf *) + * @param interp_type cast=(GdkInterpType) + */ + public static final native long /*int*/ _gdk_pixbuf_scale_simple(long /*int*/ src, int dest_width, int dest_height, int interp_type); + public static final long /*int*/ gdk_pixbuf_scale_simple(long /*int*/ src, int dest_width, int dest_height, int interp_type) { + lock.lock(); + try { + return _gdk_pixbuf_scale_simple(src, dest_width, dest_height, interp_type); + } finally { + lock.unlock(); + } + } + /** + * @method flags=dynamic + * @param window cast=(GdkWindow *) + * @param width cast=(gint) + * @param height cast=(gint) + * @param depth cast=(gint) + */ + public static final native long /*int*/ _gdk_pixmap_new(long /*int*/ window, int width, int height, int depth); + public static final long /*int*/ gdk_pixmap_new(long /*int*/ window, int width, int height, int depth) { + lock.lock(); + try { + return _gdk_pixmap_new(window, width, height, depth); + } finally { + lock.unlock(); + } + } + /** + * @method flags=dynamic + * @param window cast=(GdkWindow *) + * @param owner_events cast=(gboolean) + * @param event_mask cast=(GdkEventMask) + * @param confine_to cast=(GdkWindow *) + * @param cursor cast=(GdkCursor *) + * @param time cast=(guint32) + */ + public static final native int _gdk_pointer_grab(long /*int*/ window, boolean owner_events, int event_mask, long /*int*/ confine_to, long /*int*/ cursor, int time); + public static final int gdk_pointer_grab(long /*int*/ window, boolean owner_events, int event_mask, long /*int*/ confine_to, long /*int*/ cursor, int time) { + lock.lock(); + try { + return _gdk_pointer_grab(window, owner_events, event_mask, confine_to, cursor, time); + } finally { + lock.unlock(); + } + } + /** + * @method flags=dynamic + * @param device cast=(GdkDevice *) + * @param window cast=(GdkWindow *) + * @param owner_events cast=(gboolean) + * @param event_mask cast=(GdkEventMask) + * @param cursor cast=(GdkCursor *) + * @param time_ cast=(guint32) + */ + public static final native int _gdk_device_grab(long /*int*/ device, long /*int*/ window, int grab_ownership, boolean owner_events, int event_mask, long /*int*/ cursor, int time_); + public static final int gdk_device_grab(long /*int*/ device, long /*int*/ window, int grab_ownership, boolean owner_events, int event_mask, long /*int*/ cursor, int time_) { + lock.lock(); + try { + return _gdk_device_grab(device, window, grab_ownership, owner_events, event_mask, cursor,time_); + } finally { + lock.unlock(); + } + } + /** + * @method flags=dynamic + * @param time cast=(guint32) + */ + public static final native void _gdk_pointer_ungrab(int time); + public static final void gdk_pointer_ungrab(int time) { + lock.lock(); + try { + _gdk_pointer_ungrab(time); + } finally { + lock.unlock(); + } + } + /** + * @method flags=dynamic + * @param device cast=(GdkDevice *) + * @param time_ cast=(guint32) + */ + public static final native void _gdk_device_ungrab(long /*int*/ device, int time_); + public static final void gdk_device_ungrab(long /*int*/ device, int time_) { + lock.lock(); + try { + _gdk_device_ungrab(device, time_); + } finally { + lock.unlock(); + } + } + /** + * @method flags=dynamic + * @param device cast=(GdkDevice *) + */ + public static final native long /*int*/ _gdk_device_get_associated_device(long /*int*/ device); + public static final long /*int*/ gdk_device_get_associated_device(long /*int*/ device) { + lock.lock(); + try { + return _gdk_device_get_associated_device(device); + } finally { + lock.unlock(); + } + } + /** + * @param window cast=(GdkWindow *) + * @param property cast=(GdkAtom) + * @param type cast=(GdkAtom) + * @param actual_property_type cast=(GdkAtom *) + * @param actual_format cast=(gint *) + * @param actual_length cast=(gint *) + * @param data cast=(guchar **) + */ + public static final native boolean _gdk_property_get(long /*int*/ window, long /*int*/ property, long /*int*/ type, long /*int*/ offset, long /*int*/ length, int pdelete, long /*int*/[] actual_property_type, int[] actual_format, int[] actual_length, long /*int*/[] data); + public static final boolean gdk_property_get(long /*int*/ window, long /*int*/ property, long /*int*/ type, long /*int*/ offset, long /*int*/ length, int pdelete, long /*int*/[] actual_property_type, int[] actual_format, int[] actual_length, long /*int*/[] data) { + lock.lock(); + try { + return _gdk_property_get(window, property, type, offset, length, pdelete, actual_property_type, actual_format, actual_length, data); + } finally { + lock.unlock(); + } + } + /** @param region cast=(GdkRegion *) */ + public static final native void _gdk_region_destroy(long /*int*/ region); + public static final void gdk_region_destroy(long /*int*/ region) { + lock.lock(); + try { + _gdk_region_destroy(region); + } finally { + lock.unlock(); + } + } + /** @param region cast=(GdkRegion *) */ + public static final native boolean _gdk_region_empty(long /*int*/ region); + public static final boolean gdk_region_empty(long /*int*/ region) { + lock.lock(); + try { + return _gdk_region_empty(region); + } finally { + lock.unlock(); + } + } + /** + * @param region cast=(GdkRegion *) + * @param rectangle cast=(GdkRectangle *),flags=no_in + */ + public static final native void _gdk_region_get_clipbox(long /*int*/ region, GdkRectangle rectangle); + public static final void gdk_region_get_clipbox(long /*int*/ region, GdkRectangle rectangle) { + lock.lock(); + try { + _gdk_region_get_clipbox(region, rectangle); + } finally { + lock.unlock(); + } + } + /** + * @method flags=dynamic + * @param n_rectangles cast=(gint *) + */ + public static final native void _gdk_region_get_rectangles(long /*int*/ region, long /*int*/[] rectangles, int[] n_rectangles); + public static final void gdk_region_get_rectangles(long /*int*/ region, long /*int*/[] rectangles, int[] n_rectangles) { + lock.lock(); + try { + _gdk_region_get_rectangles(region, rectangles, n_rectangles); + } finally { + lock.unlock(); + } + } + /** + * @param source1 cast=(GdkRegion *) + * @param source2 cast=(GdkRegion *) + */ + public static final native void _gdk_region_intersect(long /*int*/ source1, long /*int*/ source2); + public static final void gdk_region_intersect(long /*int*/ source1, long /*int*/ source2) { + lock.lock(); + try { + _gdk_region_intersect(source1, source2); + } finally { + lock.unlock(); + } + } + /** @method flags=dynamic */ + public static final native long /*int*/ _gdk_cairo_region_create_from_surface(long /*int*/ surface); + public static final long /*int*/ gdk_cairo_region_create_from_surface(long /*int*/ surface) { + lock.lock(); + try { + return _gdk_cairo_region_create_from_surface(surface); + } finally { + lock.unlock(); + } + } + public static final native long /*int*/ _gdk_region_new(); + public static final long /*int*/ gdk_region_new() { + lock.lock(); + try { + return _gdk_region_new(); + } finally { + lock.unlock(); + } + } + /** + * @param region cast=(GdkRegion *) + * @param dx cast=(gint) + * @param dy cast=(gint) + */ + public static final native void _gdk_region_offset(long /*int*/ region, int dx, int dy); + public static final void gdk_region_offset(long /*int*/ region, int dx, int dy) { + lock.lock(); + try { + _gdk_region_offset(region, dx, dy); + } finally { + lock.unlock(); + } + } + /** + * @param region cast=(GdkRegion *) + * @param x cast=(gint) + * @param y cast=(gint) + */ + public static final native boolean _gdk_region_point_in(long /*int*/ region, int x, int y); + public static final boolean gdk_region_point_in(long /*int*/ region, int x, int y) { + lock.lock(); + try { + return _gdk_region_point_in(region, x, y); + } finally { + lock.unlock(); + } + } + /** @method flags=dynamic */ + public static final native long /*int*/ _gdk_region_polygon(int[] points, int npoints, int fill_rule); + public static final long /*int*/ gdk_region_polygon(int[] points, int npoints, int fill_rule) { + lock.lock(); + try { + return _gdk_region_polygon(points, npoints, fill_rule); + } finally { + lock.unlock(); + } + } + /** + * @param rectangle flags=no_out + */ + public static final native long /*int*/ _gdk_region_rectangle(GdkRectangle rectangle); + public static final long /*int*/ gdk_region_rectangle(GdkRectangle rectangle) { + lock.lock(); + try { + return _gdk_region_rectangle(rectangle); + } finally { + lock.unlock(); + } + } + /** + * @param region cast=(GdkRegion *) + * @param rect cast=(GdkRectangle *),flags=no_out + */ + public static final native long /*int*/ _gdk_region_rect_in(long /*int*/ region, GdkRectangle rect); + public static final long /*int*/ gdk_region_rect_in(long /*int*/ region, GdkRectangle rect) { + lock.lock(); + try { + return _gdk_region_rect_in(region, rect); + } finally { + lock.unlock(); + } + } + /** + * @param source1 cast=(GdkRegion *) + * @param source2 cast=(GdkRegion *) + */ + public static final native void _gdk_region_subtract(long /*int*/ source1, long /*int*/ source2); + public static final void gdk_region_subtract(long /*int*/ source1, long /*int*/ source2) { + lock.lock(); + try { + _gdk_region_subtract(source1, source2); + } finally { + lock.unlock(); + } + } + /** + * @param source1 cast=(GdkRegion *) + * @param source2 cast=(GdkRegion *) + */ + public static final native void _gdk_region_union(long /*int*/ source1, long /*int*/ source2); + public static final void gdk_region_union(long /*int*/ source1, long /*int*/ source2) { + lock.lock(); + try { + _gdk_region_union(source1, source2); + } finally { + lock.unlock(); + } + } + /** + * @param region cast=(GdkRegion *) + * @param rect cast=(GdkRectangle *),flags=no_out + */ + public static final native void _gdk_region_union_with_rect(long /*int*/ region, GdkRectangle rect); + public static final void gdk_region_union_with_rect(long /*int*/ region, GdkRectangle rect) { + lock.lock(); + try { + _gdk_region_union_with_rect(region, rect); + } finally { + lock.unlock(); + } + } + /** + * @method flags=dynamic + * @param rgba cast=(GdkRGBA *) + */ + public static final native long /*int*/ _gdk_rgba_to_string(GdkRGBA rgba); + public static final long /*int*/ gdk_rgba_to_string(GdkRGBA rgba) { + lock.lock(); + assert GTK.GTK3 : "GTK3 code was run by GTK2"; + try { + return _gdk_rgba_to_string(rgba); + } finally { + lock.unlock(); + } + } + /** + * @method flags=dynamic + * @param rgba cast=(GdkRGBA *) + */ + public static final native void _gdk_rgba_free(long /*int*/ rgba); + public static final void gdk_rgba_free(long /*int*/ rgba) { + lock.lock(); + assert GTK.GTK3 : "GTK3 code was run by GTK2"; + try { + _gdk_rgba_free(rgba); + } finally { + lock.unlock(); + } + } + /** + * @method flags=dynamic + * @param rgba cast=(GdkRGBA *) + */ + public static final native int _gdk_rgba_hash(GdkRGBA rgba); + public static final int gdk_rgba_hash(GdkRGBA rgba) { + lock.lock(); + assert GTK.GTK3 : "GTK3 code was run by GTK2"; + try { + return _gdk_rgba_hash(rgba); + } finally { + lock.unlock(); + } + } + /** + * @method flags=dynamic + * @param rgba cast=(GdkRGBA *) + * @param property cast=(const gchar *) + */ + public static final native long /*int*/ _gdk_rgba_parse(GdkRGBA rgba, byte[] property); + public static final long /*int*/ gdk_rgba_parse(GdkRGBA rgba, byte[] property) { + lock.lock(); + assert GTK.GTK3 : "GTK3 code was run by GTK2"; + try { + return _gdk_rgba_parse(rgba, property); + } finally { + lock.unlock(); + } + } + /** @method flags=dynamic */ + public static final native long /*int*/ _gdk_screen_get_default(); + public static final long /*int*/ gdk_screen_get_default() { + lock.lock(); + try { + return _gdk_screen_get_default(); + } finally { + lock.unlock(); + } + } + /** @param screen cast=(GdkScreen *) */ + public static final native long /*int*/ _gdk_screen_get_active_window(long /*int*/ screen); + public static final long /*int*/ gdk_screen_get_active_window(long /*int*/ screen) { + lock.lock(); + try { + return _gdk_screen_get_active_window(screen); + } finally { + lock.unlock(); + } + } + /** + * @method flags=dynamic + * @param screen cast=(GdkScreen *) + */ + public static final native double _gdk_screen_get_resolution(long /*int*/ screen); + public static final double gdk_screen_get_resolution(long /*int*/ screen) { + lock.lock(); + try { + return _gdk_screen_get_resolution(screen); + } finally { + lock.unlock(); + } + } + /** + * @method flags=dynamic + * @param screen cast=(GdkScreen *) + * @param monitor_num cast=(gint) + */ + public static final native int _gdk_screen_get_monitor_scale_factor(long /*int*/ screen, int monitor_num); + public static final int gdk_screen_get_monitor_scale_factor(long /*int*/ screen, int monitor_num) { + lock.lock(); + try { + return _gdk_screen_get_monitor_scale_factor(screen, monitor_num); + } finally { + lock.unlock(); + } + } + /** + * @method flags=dynamic + * @param screen cast=(GdkScreen *) + * @param x cast=(gint) + * @param y cast=(gint) + */ + public static final native int _gdk_screen_get_monitor_at_point (long /*int*/ screen, int x, int y); + public static final int gdk_screen_get_monitor_at_point (long /*int*/ screen, int x, int y) { + lock.lock(); + try { + return _gdk_screen_get_monitor_at_point (screen, x, y); + } finally { + lock.unlock(); + } + } + /** + * @method flags=dynamic + * @param screen cast=(GdkScreen *) + * @param window cast=(GdkWindow *) + */ + public static final native int _gdk_screen_get_monitor_at_window(long /*int*/ screen, long /*int*/ window); + public static final int gdk_screen_get_monitor_at_window(long /*int*/ screen, long /*int*/ window) { + lock.lock(); + try { + return _gdk_screen_get_monitor_at_window(screen, window); + } finally { + lock.unlock(); + } + } + /** + * @method flags=dynamic + * @param screen cast=(GdkScreen *) + * @param dest flags=no_in + */ + public static final native void _gdk_screen_get_monitor_geometry (long /*int*/ screen, int monitor_num, GdkRectangle dest); + public static final void gdk_screen_get_monitor_geometry (long /*int*/ screen, int monitor_num, GdkRectangle dest) { + lock.lock(); + try { + _gdk_screen_get_monitor_geometry(screen, monitor_num, dest); + } finally { + lock.unlock(); + } + } + /** + * @method flags=dynamic + * @param screen cast=(GdkScreen *) + * @param dest flags=no_in + */ + public static final native void _gdk_screen_get_monitor_workarea (long /*int*/ screen, int monitor_num, GdkRectangle dest); + public static final void gdk_screen_get_monitor_workarea (long /*int*/ screen, int monitor_num, GdkRectangle dest) { + lock.lock(); + try { + _gdk_screen_get_monitor_workarea(screen, monitor_num, dest); + } finally { + lock.unlock(); + } + } + /** + * @method flags=dynamic + * @param screen cast=(GdkScreen *) + */ + public static final native int _gdk_screen_get_n_monitors(long /*int*/ screen); + public static final int gdk_screen_get_n_monitors(long /*int*/ screen) { + lock.lock(); + try { + return _gdk_screen_get_n_monitors(screen); + } finally { + lock.unlock(); + } + } + /** + * @method flags=dynamic + * @param screen cast=(GdkScreen *) + */ + public static final native int _gdk_screen_get_primary_monitor(long /*int*/ screen); + public static final int gdk_screen_get_primary_monitor(long /*int*/ screen) { + lock.lock(); + try { + return _gdk_screen_get_primary_monitor(screen); + } finally { + lock.unlock(); + } + } + public static final native int _gdk_screen_height(); + public static final int gdk_screen_height() { + lock.lock(); + try { + return _gdk_screen_height(); + } finally { + lock.unlock(); + } + } + public static final native int _gdk_screen_width(); + public static final int gdk_screen_width() { + lock.lock(); + try { + return _gdk_screen_width(); + } finally { + lock.unlock(); + } + } + public static final native int _gdk_screen_width_mm(); + public static final int gdk_screen_width_mm() { + lock.lock(); + try { + return _gdk_screen_width_mm(); + } finally { + lock.unlock(); + } + } + /** + * @method flags=dynamic + * @param screen cast=(GdkScreen *) + */ + public static final native int _gdk_screen_get_monitor_width_mm(long /*int*/ screen, int monitor_num); + public static final int gdk_screen_get_monitor_width_mm(long /*int*/ screen, int monitor_num) { + lock.lock(); + try { + return _gdk_screen_get_monitor_width_mm(screen, monitor_num); + } finally { + lock.unlock(); + } + } + /** + * @method flags=dynamic + */ + public static final native int _gdk_seat_grab(long /*int*/ seat, long /*int*/ window, int capabilities, boolean owner_events, long /*int*/ cursor, long /*int*/ event, long /*int*/ func, long /*int*/ func_data); + public static final int gdk_seat_grab(long /*int*/ seat, long /*int*/ window, int capabilities, boolean owner_events, long /*int*/ cursor, long /*int*/ event, long /*int*/ func, long /*int*/ func_data) { + lock.lock(); + try { + return _gdk_seat_grab(seat, window, capabilities, owner_events, cursor, event, func, func_data); + } finally { + lock.unlock(); + } + } + /** + * @method flags=dynamic + */ + public static final native void _gdk_seat_ungrab(long /*int*/ seat); + public static final void gdk_seat_ungrab(long /*int*/ seat) { + lock.lock(); + try { + _gdk_seat_ungrab(seat); + } finally { + lock.unlock(); + } + } + /** + * @method flags=dynamic + */ + public static final native long /*int*/ _gdk_seat_get_pointer(long /*int*/ seat); + public static final long /*int*/ gdk_seat_get_pointer(long /*int*/ seat) { + lock.lock(); + try { + return _gdk_seat_get_pointer(seat); + } finally { + lock.unlock(); + } + } + /** @param program_class cast=(const char *) */ + public static final native void _gdk_set_program_class(byte[] program_class); + public static final void gdk_set_program_class(byte[] program_class) { + lock.lock(); + try { + _gdk_set_program_class(program_class); + } finally { + lock.unlock(); + } + } + /** @param atom cast=(GdkAtom) */ + public static final native void _gdk_selection_owner_get(long /*int*/ atom); + public static final void gdk_selection_owner_get(long /*int*/ atom) { + lock.lock(); + try { + _gdk_selection_owner_get(atom); + } finally { + lock.unlock(); + } + } + /** + * @param owner cast=(GdkWindow *) + * @param atom cast=(GdkAtom) + * @param time cast=(guint32) + * @param send_event cast=(gboolean) + */ + public static final native void _gdk_selection_owner_set(long /*int*/ owner, long /*int*/ atom, int time, boolean send_event); + public static final void gdk_selection_owner_set(long /*int*/ owner, long /*int*/ atom, int time, boolean send_event) { + lock.lock(); + try { + _gdk_selection_owner_set(owner, atom, time, send_event); + } finally { + lock.unlock(); + } + } + /** + * @param display cast=(GdkDisplay *) + * @method flags=dynamic + */ + public static final native boolean _gdk_x11_display_utf8_to_compound_text(long /*int*/ display, byte[] str, long /*int*/[] encoding, int[] format, long /*int*/[] ctext, int[] length); + public static final boolean gdk_x11_display_utf8_to_compound_text(long /*int*/ display, byte[] str, long /*int*/[] encoding, int[] format, long /*int*/[] ctext, int[] length) { + lock.lock(); + try { + return _gdk_x11_display_utf8_to_compound_text(display, str, encoding, format, ctext, length); + } finally { + lock.unlock(); + } + } + /** @param str cast=(const gchar *) */ + public static final native long /*int*/ _gdk_utf8_to_string_target(byte[] str); + public static final long /*int*/ gdk_utf8_to_string_target(byte[] str) { + lock.lock(); + try { + return _gdk_utf8_to_string_target(str); + } finally { + lock.unlock(); + } + } + /** + * @param window cast=(GdkWindow *) + * @param x cast=(gint) + * @param y cast=(gint) + * @param button cast=(guint) + * @param modifiers cast=(GdkModifierType) + * @param button_pressrelease cast=(GdkEventType) + */ + public static final native boolean _gdk_test_simulate_button(long /*int*/ window, int x, int y, int button, + int modifiers, int button_pressrelease); + public static final boolean gdk_test_simulate_button(long /*int*/ window, int x, int y, int button, int modifiers, + int button_pressrelease) { + lock.lock(); + try { + return _gdk_test_simulate_button(window, x, y, button, modifiers, button_pressrelease); + } finally { + lock.unlock(); + } + } + /** + * @param display cast=(GdkDisplay *) + * @param encoding cast=(GdkAtom) + * @param text cast=(guchar *) + * @param list cast=(gchar ***) + */ + public static final native int _gdk_text_property_to_utf8_list_for_display (long /*int*/ display, long /*int*/ encoding, int format, long /*int*/ text, int length, long /*int*/[] list); + public static final int gdk_text_property_to_utf8_list_for_display (long /*int*/ display, long /*int*/ encoding, int format, long /*int*/ text, int length, long /*int*/[] list) { + lock.lock(); + try { + return _gdk_text_property_to_utf8_list_for_display(display, encoding, format, text, length, list); + } finally { + lock.unlock(); + } + } + public static final native void gdk_threads_leave (); + public static final native int _gdk_unicode_to_keyval(int wc); + public static final int gdk_unicode_to_keyval(int wc) { + lock.lock(); + try { + return _gdk_unicode_to_keyval(wc); + } finally { + lock.unlock(); + } + } + /** + * @method flags=dynamic + * @param visual cast=(GdkVisual *) + */ + public static final native int _gdk_visual_get_depth(long /*int*/ visual); + public static final int gdk_visual_get_depth(long /*int*/ visual) { + lock.lock(); + try { + return _gdk_visual_get_depth(visual); + } finally { + lock.unlock(); + } + } + public static final native long /*int*/ _gdk_visual_get_system(); + public static final long /*int*/ gdk_visual_get_system() { + lock.lock(); + try { + return _gdk_visual_get_system(); + } finally { + lock.unlock(); + } + } + /** + * @method flags=dynamic + * @param win_x cast=(gint *) + * @param win_y cast=(gint *) + */ + public static final native long /*int*/ _gdk_window_at_pointer(int[] win_x, int[] win_y); + public static final long /*int*/ gdk_window_at_pointer(int[] win_x, int[] win_y) { + lock.lock(); + try { + return _gdk_window_at_pointer(win_x, win_y); + } finally { + lock.unlock(); + } + } + /** + * @param window cast=(GdkWindow *) + * @param rectangle cast=(GdkRectangle *),flags=no_out + */ + public static final native void _gdk_window_begin_paint_rect(long /*int*/ window, GdkRectangle rectangle); + public static final void gdk_window_begin_paint_rect(long /*int*/ window, GdkRectangle rectangle) { + lock.lock(); + try { + _gdk_window_begin_paint_rect(window, rectangle); + } finally { + lock.unlock(); + } + } + /** + * @method flags=dynamic + * @param window cast=(GdkWindow *) + */ + public static final native long /*int*/ _gdk_window_create_similar_surface(long /*int*/ window, int content, int width, int height); + public static final long /*int*/ gdk_window_create_similar_surface(long /*int*/ window, int content, int width, int height) { + lock.lock(); + try { + return _gdk_window_create_similar_surface(window, content, width, height); + } finally { + lock.unlock(); + } + } + /** @param window cast=(GdkWindow *) */ + public static final native void _gdk_window_destroy(long /*int*/ window); + public static final void gdk_window_destroy(long /*int*/ window) { + lock.lock(); + try { + _gdk_window_destroy(window); + } finally { + lock.unlock(); + } + } + /** @param window cast=(GdkWindow *) */ + public static final native void _gdk_window_end_paint(long /*int*/ window); + public static final void gdk_window_end_paint(long /*int*/ window) { + lock.lock(); + try { + _gdk_window_end_paint(window); + } finally { + lock.unlock(); + } + } + /** @param window cast=(GdkWindow *) */ + public static final native long /*int*/ _gdk_window_get_children(long /*int*/ window); + public static final long /*int*/ gdk_window_get_children(long /*int*/ window) { + lock.lock(); + try { + return _gdk_window_get_children(window); + } finally { + lock.unlock(); + } + } + /** @param window cast=(GdkWindow *) */ + public static final native int _gdk_window_get_events(long /*int*/ window); + public static final int gdk_window_get_events(long /*int*/ window) { + lock.lock(); + try { + return _gdk_window_get_events(window); + } finally { + lock.unlock(); + } + } + /** @param window cast=(GdkWindow *) */ + public static final native void _gdk_window_focus(long /*int*/ window, int timestamp); + public static final void gdk_window_focus(long /*int*/ window, int timestamp) { + lock.lock(); + try { + _gdk_window_focus(window, timestamp); + } finally { + lock.unlock(); + } + } + /** + * @param window cast=(GdkWindow *) + * @param rect cast=(GdkRectangle *),flags=no_in + */ + public static final native void _gdk_window_get_frame_extents(long /*int*/ window, GdkRectangle rect); + public static final void gdk_window_get_frame_extents(long /*int*/ window, GdkRectangle rect) { + lock.lock(); + try { + _gdk_window_get_frame_extents(window, rect); + } finally { + lock.unlock(); + } + } + /** + * @method flags=dynamic + * @param window cast=(GdkWindow *) + * @param x_offset cast=(gint *) + * @param y_offset cast=(gint *) + */ + public static final native void _gdk_window_get_internal_paint_info(long /*int*/ window, long /*int*/ [] real_drawable, int[] x_offset, int[] y_offset); + public static final void gdk_window_get_internal_paint_info(long /*int*/ window, long /*int*/ [] real_drawable, int[] x_offset, int[] y_offset) { + lock.lock(); + try { + _gdk_window_get_internal_paint_info(window, real_drawable, x_offset, y_offset); + } finally { + lock.unlock(); + } + } + /** + * @param window cast=(GdkWindow *) + * @param x cast=(gint *) + * @param y cast=(gint *) + */ + public static final native int _gdk_window_get_origin(long /*int*/ window, int[] x, int[] y); + public static final int gdk_window_get_origin(long /*int*/ window, int[] x, int[] y) { + lock.lock(); + try { + return _gdk_window_get_origin(window, x, y); + } finally { + lock.unlock(); + } + } + /** + * @method flags=dynamic + * @param window cast=(GdkWindow *) + * @param device cast=(GdkDevice *) + * @param x cast=(gint *) + * @param y cast=(gint *) + * @param mask cast=(GdkModifierType *) + */ + public static final native long /*int*/ _gdk_window_get_device_position(long /*int*/ window, long /*int*/ device, int[] x, int[] y, int[] mask); + public static final long /*int*/ gdk_window_get_device_position(long /*int*/ window, long /*int*/ device, int[] x, int[] y, int[] mask) { + lock.lock(); + try { + return _gdk_window_get_device_position(window, device, x, y, mask); + } finally { + lock.unlock(); + } + } + /** @param window cast=(GdkWindow *) */ + public static final native long /*int*/ _gdk_window_get_parent(long /*int*/ window); + public static final long /*int*/ gdk_window_get_parent(long /*int*/ window) { + lock.lock(); + try { + return _gdk_window_get_parent(window); + } finally { + lock.unlock(); + } + } + /** + * @method flags=dynamic + * @param window cast=(GdkWindow *) + * @param x cast=(gint *) + * @param y cast=(gint *) + * @param mask cast=(GdkModifierType *) + */ + public static final native long /*int*/ _gdk_window_get_pointer(long /*int*/ window, int[] x, int[] y, int[] mask); + public static final long /*int*/ gdk_window_get_pointer(long /*int*/ window, int[] x, int[] y, int[] mask) { + lock.lock(); + try { + return _gdk_window_get_pointer(window, x, y, mask); + } finally { + lock.unlock(); + } + } + /** + * @param window cast=(GdkWindow *) + * @param x cast=(gint *) + * @param y cast=(gint *) + */ + public static final native void _gdk_window_get_position(long /*int*/ window, int[] x, int[] y); + public static final void gdk_window_get_position(long /*int*/ window, int[] x, int[] y) { + lock.lock(); + try { + _gdk_window_get_position(window, x, y); + } finally { + lock.unlock(); + } + } + /** + * @param window cast=(GdkWindow *) + * @param x cast=(gint *) + * @param y cast=(gint *) + */ + public static final native void _gdk_window_get_root_origin(long /*int*/ window, int[] x, int[] y); + public static final void gdk_window_get_root_origin(long /*int*/ window, int[] x, int[] y) { + lock.lock(); + try { + _gdk_window_get_root_origin(window, x, y); + } finally { + lock.unlock(); + } + } + /** + * @param window cast=(GdkWindow *) + * @param data cast=(gpointer *) + */ + public static final native void _gdk_window_get_user_data(long /*int*/ window, long /*int*/[] data); + public static final void gdk_window_get_user_data(long /*int*/ window, long /*int*/[] data) { + lock.lock(); + try { + _gdk_window_get_user_data(window, data); + } finally { + lock.unlock(); + } + } + /** @param window cast=(GdkWindow *) */ + public static final native void _gdk_window_hide(long /*int*/ window); + public static final void gdk_window_hide(long /*int*/ window) { + lock.lock(); + try { + _gdk_window_hide(window); + } finally { + lock.unlock(); + } + } + /** + * @param window cast=(GdkWindow *) + * @param rectangle cast=(GdkRectangle *),flags=no_out + * @param invalidate_children cast=(gboolean) + */ + public static final native void _gdk_window_invalidate_rect(long /*int*/ window, GdkRectangle rectangle, boolean invalidate_children); + public static final void gdk_window_invalidate_rect(long /*int*/ window, GdkRectangle rectangle, boolean invalidate_children) { + lock.lock(); + try { + _gdk_window_invalidate_rect(window, rectangle, invalidate_children); + } finally { + lock.unlock(); + } + } + /** + * @method flags=dynamic + * @param window cast=(GdkWindow *) + * @param invalidate_children cast=(gboolean) + */ + public static final native void _gdk_window_invalidate_region(long /*int*/ window, long /*int*/ region, boolean invalidate_children); + public static final void gdk_window_invalidate_region(long /*int*/ window, long /*int*/ region, boolean invalidate_children) { + lock.lock(); + try { + _gdk_window_invalidate_region(window, region, invalidate_children); + } finally { + lock.unlock(); + } + } + /** @param window cast=(GdkWindow *) */ + public static final native boolean _gdk_window_is_visible(long /*int*/ window); + public static final boolean gdk_window_is_visible(long /*int*/ window) { + lock.lock(); + try { + return _gdk_window_is_visible(window); + } finally { + lock.unlock(); + } + } + /** @param window cast=(GdkWindow *) */ + public static final native void _gdk_window_move(long /*int*/ window, int x, int y); + public static final void gdk_window_move(long /*int*/ window, int x, int y) { + lock.lock(); + try { + _gdk_window_move(window, x, y); + } finally { + lock.unlock(); + } + } + /** @param window cast=(GdkWindow *) */ + public static final native void _gdk_window_move_resize(long /*int*/ window, int x, int y, int width, int height); + public static final void gdk_window_move_resize(long /*int*/ window, int x, int y, int width, int height) { + lock.lock(); + try { + _gdk_window_move_resize(window, x, y, width, height); + } finally { + lock.unlock(); + } + } + /** + * @param parent cast=(GdkWindow *) + * @param attributes flags=no_out + */ + public static final native long /*int*/ _gdk_window_new(long /*int*/ parent, GdkWindowAttr attributes, int attributes_mask); + public static final long /*int*/ gdk_window_new(long /*int*/ parent, GdkWindowAttr attributes, int attributes_mask) { + lock.lock(); + try { + return _gdk_window_new(parent, attributes, attributes_mask); + } finally { + lock.unlock(); + } + } + /** @param window cast=(GdkWindow *) */ + public static final native void _gdk_window_lower(long /*int*/ window); + public static final void gdk_window_lower(long /*int*/ window) { + lock.lock(); + try { + _gdk_window_lower(window); + } finally { + lock.unlock(); + } + } + /** + * @method flags=dynamic + */ + public static final native void _gdk_window_process_all_updates(); + public static final void gdk_window_process_all_updates() { + lock.lock(); + try { + _gdk_window_process_all_updates(); + } finally { + lock.unlock(); + } + } + /** + * @method flags=dynamic + * @param window cast=(GdkWindow *) + * @param update_children cast=(gboolean) + */ + public static final native void _gdk_window_process_updates(long /*int*/ window, boolean update_children); + public static final void gdk_window_process_updates(long /*int*/ window, boolean update_children) { + lock.lock(); + try { + _gdk_window_process_updates(window, update_children); + } finally { + lock.unlock(); + } + } + /** @param window cast=(GdkWindow *) */ + public static final native void _gdk_window_raise(long /*int*/ window); + public static final void gdk_window_raise(long /*int*/ window) { + lock.lock(); + try { + _gdk_window_raise(window); + } finally { + lock.unlock(); + } + } + /** @param window cast=(GdkWindow *) */ + public static final native void _gdk_window_resize(long /*int*/ window, int width, int height); + public static final void gdk_window_resize(long /*int*/ window, int width, int height) { + lock.lock(); + try { + _gdk_window_resize(window, width, height); + } finally { + lock.unlock(); + } + } + /** + * @method flags=dynamic + * @param window cast=(GdkWindow *) + * @param sibling cast=(GdkWindow *) + * @param above cast=(gboolean) + */ + public static final native void _gdk_window_restack(long /*int*/ window, long /*int*/ sibling, boolean above); + public static final void gdk_window_restack(long /*int*/ window, long /*int*/ sibling, boolean above) { + lock.lock(); + try { + _gdk_window_restack(window, sibling, above); + } finally { + lock.unlock(); + } + } + /** @method flags=dynamic */ + public static final native void _gdk_window_set_background_pattern(long /*int*/ window, long /*int*/ pattern); + public static final void gdk_window_set_background_pattern(long /*int*/ window, long /*int*/ pattern) { + lock.lock(); + try { + _gdk_window_set_background_pattern(window, pattern); + } finally { + lock.unlock(); + } + } + /** + * @method flags=dynamic + * @param window cast=(GdkWindow *) + * @param parent_relative cast=(gboolean) + */ + public static final native void _gdk_window_set_back_pixmap(long /*int*/ window, long /*int*/ pixmap, boolean parent_relative); + public static final void gdk_window_set_back_pixmap(long /*int*/ window, long /*int*/ pixmap, boolean parent_relative) { + lock.lock(); + try { + _gdk_window_set_back_pixmap(window, pixmap, parent_relative); + } finally { + lock.unlock(); + } + } + /** + * @param window cast=(GdkWindow *) + * @param cursor cast=(GdkCursor *) + */ + public static final native void _gdk_window_set_cursor(long /*int*/ window, long /*int*/ cursor); + public static final void gdk_window_set_cursor(long /*int*/ window, long /*int*/ cursor) { + lock.lock(); + try { + _gdk_window_set_cursor(window, cursor); + } finally { + lock.unlock(); + } + } + /** + * @param window cast=(GdkWindow *) + * @param decorations cast=(GdkWMDecoration) + */ + public static final native void _gdk_window_set_decorations(long /*int*/ window, int decorations); + public static final void gdk_window_set_decorations(long /*int*/ window, int decorations) { + lock.lock(); + try { + _gdk_window_set_decorations(window, decorations); + } finally { + lock.unlock(); + } + } + /** + * @param window cast=(GdkWindow *) + * @param functions cast=(GdkWMFunction) + */ + public static final native void _gdk_window_set_functions(long /*int*/ window, int functions); + public static final void gdk_window_set_functions(long /*int*/ window, int functions) { + lock.lock(); + try { + _gdk_window_set_functions(window, functions); + } finally { + lock.unlock(); + } + } + /** @param window cast=(GdkWindow *) */ + public static final native void _gdk_window_set_events(long /*int*/ window, int event_mask); + public static final void gdk_window_set_events(long /*int*/ window, int event_mask) { + lock.lock(); + try { + _gdk_window_set_events(window, event_mask); + } finally { + lock.unlock(); + } + } + /** + * @param window cast=(GdkWindow *) + * @param override_redirect cast=(gboolean) + */ + public static final native void _gdk_window_set_override_redirect(long /*int*/ window, boolean override_redirect); + public static final void gdk_window_set_override_redirect(long /*int*/ window, boolean override_redirect) { + lock.lock(); + try { + _gdk_window_set_override_redirect(window, override_redirect); + } finally { + lock.unlock(); + } + } + /** + * @param window cast=(GdkWindow *) + * @param user_data cast=(gpointer) + */ + public static final native void _gdk_window_set_user_data(long /*int*/ window, long /*int*/ user_data); + public static final void gdk_window_set_user_data(long /*int*/ window, long /*int*/ user_data) { + lock.lock(); + try { + _gdk_window_set_user_data(window, user_data); + } finally { + lock.unlock(); + } + } + /** + * @method flags=dynamic + * @param window cast=(GdkWindow *) + */ + public static final native void _gdk_window_shape_combine_region (long /*int*/ window, long /*int*/ shape_region, int offset_x, int offset_y); + public static final void gdk_window_shape_combine_region (long /*int*/ window, long /*int*/ shape_region, int offset_x, int offset_y) { + lock.lock(); + try { + _gdk_window_shape_combine_region(window, shape_region, offset_x, offset_y); + } finally { + lock.unlock(); + } + } + /** @param window cast=(GdkWindow *) */ + public static final native void _gdk_window_show(long /*int*/ window); + public static final void gdk_window_show(long /*int*/ window) { + lock.lock(); + try { + _gdk_window_show(window); + } finally { + lock.unlock(); + } + } + /** @param window cast=(GdkWindow *) */ + public static final native void _gdk_window_show_unraised(long /*int*/ window); + public static final void gdk_window_show_unraised(long /*int*/ window) { + lock.lock(); + try { + _gdk_window_show_unraised(window); + } finally { + lock.unlock(); + } + } + + + + +} diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/GTK.java b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/GTK.java index 4afb3eecc6..8f61dd5494 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/GTK.java +++ b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/GTK.java @@ -14,6 +14,12 @@ *******************************************************************************/ package org.eclipse.swt.internal.gtk; + +/** + * This class contains GTK specific native functions. + * + * In contrast to OS.java, dynamic functions are automatically linked, no need to add os_custom.h entries. + */ public class GTK extends OS { /** Constants */ diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/GdkColor.java b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/GdkColor.java index a61c0b6901..507a8f6fa7 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/GdkColor.java +++ b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/GdkColor.java @@ -24,5 +24,5 @@ public class GdkColor { public short green; /** @field cast=(guint16) */ public short blue; - public static final int sizeof = OS.GdkColor_sizeof(); + public static final int sizeof = GDK.GdkColor_sizeof(); } diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/GdkDragContext.java b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/GdkDragContext.java index 414a01614a..ba7186985f 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/GdkDragContext.java +++ b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/GdkDragContext.java @@ -34,5 +34,5 @@ public class GdkDragContext { public int action; /** @field cast=(guint32) */ public int start_time; - public static final int sizeof = OS.GdkDragContext_sizeof(); + public static final int sizeof = GDK.GdkDragContext_sizeof(); } diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/GdkEvent.java b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/GdkEvent.java index deafd22241..277bfe911d 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/GdkEvent.java +++ b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/GdkEvent.java @@ -18,5 +18,5 @@ package org.eclipse.swt.internal.gtk; public class GdkEvent { /** @field cast=(GdkEventType) */ public int type; - public static final int sizeof = OS.GdkEvent_sizeof(); + public static final int sizeof = GDK.GdkEvent_sizeof(); } diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/GdkEventAny.java b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/GdkEventAny.java index 92611a568f..e13ee4c88c 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/GdkEventAny.java +++ b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/GdkEventAny.java @@ -20,5 +20,5 @@ public class GdkEventAny extends GdkEvent { public long /*int*/ window; /** @field cast=(gint8) */ public byte send_event; - public static final int sizeof = OS.GdkEventAny_sizeof(); + public static final int sizeof = GDK.GdkEventAny_sizeof(); } diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/GdkEventButton.java b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/GdkEventButton.java index 76e0bdfc0b..e07d9f7051 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/GdkEventButton.java +++ b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/GdkEventButton.java @@ -38,5 +38,5 @@ public class GdkEventButton extends GdkEvent { public double x_root; /** @field cast=(gdouble) */ public double y_root; - public static final int sizeof = OS.GdkEventButton_sizeof(); + public static final int sizeof = GDK.GdkEventButton_sizeof(); } diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/GdkEventCrossing.java b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/GdkEventCrossing.java index 2436eb1997..9a58331525 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/GdkEventCrossing.java +++ b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/GdkEventCrossing.java @@ -34,5 +34,5 @@ public class GdkEventCrossing extends GdkEvent { /** @field cast=(gboolean) */ public boolean focus; public int state; - public static final int sizeof = OS.GdkEventCrossing_sizeof(); + public static final int sizeof = GDK.GdkEventCrossing_sizeof(); } diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/GdkEventExpose.java b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/GdkEventExpose.java index bc0f0599fd..209d0fa80f 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/GdkEventExpose.java +++ b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/GdkEventExpose.java @@ -32,6 +32,6 @@ public class GdkEventExpose extends GdkEvent { public long /*int*/ region; /** @field cast=(gint) */ public int count; - public static final int sizeof = OS.GdkEventExpose_sizeof(); + public static final int sizeof = GDK.GdkEventExpose_sizeof(); } diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/GdkEventFocus.java b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/GdkEventFocus.java index 583d778d0b..8728f22930 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/GdkEventFocus.java +++ b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/GdkEventFocus.java @@ -22,5 +22,5 @@ public class GdkEventFocus extends GdkEvent { public byte send_event; /** @field cast=(gint16) */ public short in; - public static final int sizeof = OS.GdkEventFocus_sizeof(); + public static final int sizeof = GDK.GdkEventFocus_sizeof(); } diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/GdkEventKey.java b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/GdkEventKey.java index a9a78d87d0..bc1be89252 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/GdkEventKey.java +++ b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/GdkEventKey.java @@ -34,5 +34,5 @@ public class GdkEventKey extends GdkEvent { public short hardware_keycode; /** @field cast=(guint8) */ public byte group; - public static final int sizeof = OS.GdkEventKey_sizeof(); + public static final int sizeof = GDK.GdkEventKey_sizeof(); } diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/GdkEventMotion.java b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/GdkEventMotion.java index 8e49758d0b..72bef1d3db 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/GdkEventMotion.java +++ b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/GdkEventMotion.java @@ -38,5 +38,5 @@ public class GdkEventMotion extends GdkEvent { public double x_root; /** @field cast=(gdouble) */ public double y_root; - public static final int sizeof = OS.GdkEventMotion_sizeof(); + public static final int sizeof = GDK.GdkEventMotion_sizeof(); } diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/GdkEventScroll.java b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/GdkEventScroll.java index 53dc45b840..39eeba93bb 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/GdkEventScroll.java +++ b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/GdkEventScroll.java @@ -36,5 +36,5 @@ public class GdkEventScroll extends GdkEvent { public double x_root; /** @field cast=(gdouble) */ public double y_root; - public static final int sizeof = OS.GdkEventScroll_sizeof(); + public static final int sizeof = GDK.GdkEventScroll_sizeof(); } diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/GdkEventWindowState.java b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/GdkEventWindowState.java index c5546beba7..ecd325f37b 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/GdkEventWindowState.java +++ b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/GdkEventWindowState.java @@ -21,5 +21,5 @@ public class GdkEventWindowState extends GdkEvent { public byte send_event; public int changed_mask; public int new_window_state; - public static final int sizeof = OS.GdkEventWindowState_sizeof(); + public static final int sizeof = GDK.GdkEventWindowState_sizeof(); } diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/GdkGeometry.java b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/GdkGeometry.java index da59bbbcdb..49d6db39d0 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/GdkGeometry.java +++ b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/GdkGeometry.java @@ -27,5 +27,5 @@ public class GdkGeometry { public double min_aspect; public double max_aspect; public int win_gravity; - public static final int sizeof = OS.GdkGeometry_sizeof(); + public static final int sizeof = GDK.GdkGeometry_sizeof(); } diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/GdkKeymapKey.java b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/GdkKeymapKey.java index 4579991196..a49179b184 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/GdkKeymapKey.java +++ b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/GdkKeymapKey.java @@ -7,5 +7,5 @@ public class GdkKeymapKey { public int group; /** @field cast=(gint) */ public int level; - public static final int sizeof = OS.GdkKeymapKey_sizeof(); + public static final int sizeof = GDK.GdkKeymapKey_sizeof(); } diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/GdkRGBA.java b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/GdkRGBA.java index bdb7a0cb1e..3d6a360809 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/GdkRGBA.java +++ b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/GdkRGBA.java @@ -20,7 +20,7 @@ public class GdkRGBA { public double green; public double blue; public double alpha; - public static final int sizeof = OS.GdkRGBA_sizeof(); + public static final int sizeof = GDK.GdkRGBA_sizeof(); /** * Returns a string containing a concise, human-readable diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/GdkRectangle.java b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/GdkRectangle.java index 9fc5c9faa4..4cd214e204 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/GdkRectangle.java +++ b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/GdkRectangle.java @@ -24,5 +24,5 @@ public class GdkRectangle { public int width; /** @field cast=(gint) */ public int height; - public static final int sizeof = OS.GdkRectangle_sizeof(); + public static final int sizeof = GDK.GdkRectangle_sizeof(); } diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/GdkWindowAttr.java b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/GdkWindowAttr.java index ffe306bbca..0ee4f1dd1b 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/GdkWindowAttr.java +++ b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/GdkWindowAttr.java @@ -35,5 +35,5 @@ public class GdkWindowAttr { /** @field cast=(gchar *) */ public long /*int*/ wmclass_class; public boolean override_redirect; - public static final int sizeof = OS.GdkWindowAttr_sizeof(); + public static final int sizeof = GDK.GdkWindowAttr_sizeof(); } diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/OS.java b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/OS.java index c45a0b48d3..97fcc1a0a6 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/OS.java +++ b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/OS.java @@ -46,6 +46,11 @@ import org.eclipse.swt.internal.*; // GError ** -> long /*int*/[] ex g_filename_to_uri +/** + * This class contains native functions for various libraries. + * + * Any dynamic functions must be manually linked to their corresponding library. See os_cutom.h #define FUNC_LIB_* LIB_* + */ public class OS extends C { /** OS Constants */ public static final boolean IsAIX, IsSunOS, IsLinux, IsHPUX, IsWin32, BIG_ENDIAN; @@ -140,206 +145,6 @@ public class OS extends C { public static final int G_SIGNAL_MATCH_FUNC = 1 << 3; public static final int G_SIGNAL_MATCH_DATA = 1 << 4; public static final int G_SIGNAL_MATCH_ID = 1 << 0; - public static final int GDK_2BUTTON_PRESS = 0x5; - public static final int GDK_3BUTTON_PRESS = 0x6; - public static final int GDK_ACTION_COPY = 1 << 1; - public static final int GDK_ACTION_MOVE = 1 << 2; - public static final int GDK_ACTION_LINK = 1 << 3; - public static final int GDK_Alt_L = 0xffe9; - public static final int GDK_Alt_R = 0xffea; - public static final int GDK_BackSpace = 0xff08; - public static final int GDK_BOTTOM_LEFT_CORNER = 0xc; - public static final int GDK_BOTTOM_RIGHT_CORNER = 0xe; - public static final int GDK_BOTTOM_SIDE = 0x10; - public static final int GDK_BUTTON1_MASK = 0x100; - public static final int GDK_BUTTON2_MASK = 0x200; - public static final int GDK_BUTTON3_MASK = 0x400; - public static final int GDK_BUTTON_MOTION_MASK = 1 << 4; - public static final int GDK_BUTTON1_MOTION_MASK = 1 << 5; - public static final int GDK_BUTTON2_MOTION_MASK = 1 << 6; - public static final int GDK_BUTTON3_MOTION_MASK = 1 << 7; - public static final int GDK_BUTTON_PRESS = 0x4; - public static final int GDK_BUTTON_PRESS_MASK = 0x100; - public static final int GDK_BUTTON_RELEASE = 0x7; - public static final int GDK_BUTTON_RELEASE_MASK = 0x200; - public static final int GDK_COLORSPACE_RGB = 0; - public static final int GDK_CONFIGURE = 13; - public static final int GDK_CONTROL_MASK = 0x4; - public static final int GDK_CROSS = 0x1e; - public static final int GDK_CROSSING_NORMAL = 0; - public static final int GDK_CROSSING_GRAB = 1; - public static final int GDK_CROSSING_UNGRAB = 2; - public static final int GDK_Break = 0xff6b; - public static final int GDK_Cancel = 0xff69; - public static final int GDK_Caps_Lock = 0xffE5; - public static final int GDK_Clear = 0xff0B; - public static final int GDK_Control_L = 0xffe3; - public static final int GDK_Control_R = 0xffe4; - public static final int GDK_CURRENT_TIME = 0x0; - public static final int GDK_DECOR_BORDER = 0x2; - public static final int GDK_DECOR_MAXIMIZE = 0x40; - public static final int GDK_DECOR_MENU = 0x10; - public static final int GDK_DECOR_MINIMIZE = 0x20; - public static final int GDK_DECOR_RESIZEH = 0x4; - public static final int GDK_DECOR_TITLE = 0x8; - public static final int GDK_DOUBLE_ARROW = 0x2a; - public static final int GDK_Delete = 0xffff; - public static final int GDK_Down = 0xff54; - public static final int GDK_ENTER_NOTIFY_MASK = 0x1000; - public static final int GDK_ENTER_NOTIFY = 10; - public static final int GDK_EVEN_ODD_RULE = 0; - public static final int GDK_EXPOSE = 2; - public static final int GDK_EXPOSURE_MASK = 0x2; - public static final int GDK_End = 0xff57; - public static final int GDK_Escape = 0xff1b; - public static final int GDK_ISO_Enter = 0xfe34; - public static final int GDK_F1 = 0xffbe; - public static final int GDK_F10 = 0xffc7; - public static final int GDK_F11 = 0xffc8; - public static final int GDK_F12 = 0xffc9; - public static final int GDK_F13 = 0xffca; - public static final int GDK_F14 = 0xffcb; - public static final int GDK_F15 = 0xffcc; - public static final int GDK_F16 = 0xffcd; - public static final int GDK_F17 = 0xffce; - public static final int GDK_F18 = 0xffcf; - public static final int GDK_F19 = 0xffd0; - public static final int GDK_F20 = 0xffd1; - public static final int GDK_F2 = 0xffbf; - public static final int GDK_F3 = 0xffc0; - public static final int GDK_F4 = 0xffc1; - public static final int GDK_F5 = 0xffc2; - public static final int GDK_F6 = 0xffc3; - public static final int GDK_F7 = 0xffc4; - public static final int GDK_F8 = 0xffc5; - public static final int GDK_F9 = 0xffc6; - public static final int GDK_KEY_a = 0x061; - public static final int GDK_KEY_z = 0x07a; - public static final int GDK_FLEUR = 0x34; - public static final int GDK_FOCUS_CHANGE = 0xc; - public static final int GDK_FOCUS_CHANGE_MASK = 0x4000; - public static final int GDK_FUNC_ALL = 1; - public static final int GDK_FUNC_RESIZE = 2; - public static final int GDK_FUNC_MOVE = 4; - public static final int GDK_FUNC_MINIMIZE = 8; - public static final int GDK_FUNC_MAXIMIZE = 16; - public static final int GDK_FUNC_CLOSE = 32; - public static final int GDK_GRAB_SUCCESS = 0x0; - public static final int GDK_HAND2 = 0x3c; - public static final int GDK_Help = 0xFF6A; - public static final int GDK_HINT_MIN_SIZE = 1 << 1; - public static final int GDK_Home = 0xff50; - public static final int GDK_INCLUDE_INFERIORS = 0x1; - public static final int GDK_INPUT_ONLY = 1; - public static final int GDK_INTERP_BILINEAR = 0x2; - public static final int GDK_Insert = 0xff63; - public static final int GDK_ISO_Left_Tab = 0xfe20; - public static final int GDK_KEY_PRESS = 0x8; - public static final int GDK_KEY_PRESS_MASK = 0x400; - public static final int GDK_KEY_RELEASE = 0x9; - public static final int GDK_KEY_RELEASE_MASK = 0x800; - public static final int GDK_KP_0 = 0xffb0; - public static final int GDK_KP_1 = 0xffb1; - public static final int GDK_KP_2 = 0xffb2; - public static final int GDK_KP_3 = 0xffb3; - public static final int GDK_KP_4 = 0xffb4; - public static final int GDK_KP_5 = 0xffb5; - public static final int GDK_KP_6 = 0xffb6; - public static final int GDK_KP_7 = 0xffb7; - public static final int GDK_KP_8 = 0xffb8; - public static final int GDK_KP_9 = 0xffb9; - public static final int GDK_KP_Add = 0xffab; - public static final int GDK_KP_Decimal = 0xffae; - public static final int GDK_KP_Delete = 0xFF9F; - public static final int GDK_KP_Divide = 0xffaf; - public static final int GDK_KP_Down = 0xFF99; - public static final int GDK_KP_End = 0xFF9C; - public static final int GDK_KP_Enter = 0xff8d; - public static final int GDK_KP_Equal = 0xffbd; - public static final int GDK_KP_Home = 0xFF95; - public static final int GDK_KP_Insert = 0xFF9E; - public static final int GDK_KP_Left = 0xFF96; - public static final int GDK_KP_Multiply = 0xffaa; - public static final int GDK_KP_Page_Down = 0xFF9B; - public static final int GDK_KP_Page_Up = 0xFF9A; - public static final int GDK_KP_Right = 0xFF98; - public static final int GDK_KP_Subtract = 0xffad; - public static final int GDK_KP_Up = 0xFF97; - public static final int GDK_LEAVE_NOTIFY = 11; - public static final int GDK_LEAVE_NOTIFY_MASK = 0x2000; - public static final int GDK_LEFT_PTR = 0x44; - public static final int GDK_LEFT_SIDE = 0x46; - public static final int GDK_Linefeed = 0xff0A; - public static final int GDK_Left = 0xff51; - public static final int GDK_Meta_L = 0xFFE7; - public static final int GDK_Meta_R = 0xFFE8; - public static final int GDK_MAP = 14; - public static final int GDK_MOD1_MASK = 0x8; //usually 'alt' modifier. - public static final int GDK_SUPER_MASK = 0x4000000; - public static final int GDK_HYPER_MASK = 0x8000000; - public static final int GDK_META_MASK = 0x10000000; - public static final int GDK_MOTION_NOTIFY = 0x3; - public static final int GDK_NO_EXPOSE = 30; - public static final int GDK_NONE = 0; - public static final int GDK_NOTIFY_INFERIOR = 2; - public static final int GDK_Num_Lock = 0xFF7F; - public static final int GDK_OVERLAP_RECTANGLE_OUT = 0x1; - public static final int GDK_OWNERSHIP_NONE = 0; - public static final int GDK_PIXBUF_ALPHA_BILEVEL = 0x0; - public static final int GDK_POINTER_MOTION_HINT_MASK = 0x8; - public static final int GDK_POINTER_MOTION_MASK = 0x4; - public static final int GDK_PROPERTY_NOTIFY = 16; - public static final int GDK_PROPERTY_CHANGE_MASK = 1 << 16; - public static final int GDK_Page_Down = 0xff56; - public static final int GDK_Page_Up = 0xff55; - public static final int GDK_Pause = 0xff13; - public static final int GDK_Print = 0xff61; - public static final int GDK_QUESTION_ARROW = 0x5c; - public static final int GDK_RIGHT_SIDE = 0x60; - public static final int GDK_Return = 0xff0d; - public static final int GDK_Right = 0xff53; - public static final int GDK_space = 0x20; - public static final int GDK_SB_H_DOUBLE_ARROW = 0x6c; - public static final int GDK_SB_UP_ARROW = 0x72; - public static final int GDK_SB_V_DOUBLE_ARROW = 0x74; - public static final int GDK_SCROLL_UP = 0; - public static final int GDK_SCROLL_DOWN = 1; - public static final int GDK_SCROLL_LEFT = 2; - public static final int GDK_SCROLL_RIGHT = 3; - public static final int GDK_SCROLL_SMOOTH = 4; - public static final int GDK_SCROLL_MASK = 1 << 21; - public static final int GDK_SMOOTH_SCROLL_MASK = 1 << 23; - public static final int GDK_SELECTION_CLEAR = 17; - public static final int GDK_SELECTION_NOTIFY = 19; - public static final int GDK_SELECTION_REQUEST = 18; - public static final int GDK_SHIFT_MASK = 0x1; - public static final int GDK_SIZING = 0x78; - public static final int GDK_STIPPLED = 0x2; - public static final int GDK_TILED = 0x1; - public static final int GDK_Shift_L = 0xffe1; - public static final int GDK_Shift_R = 0xffe2; - public static final int GDK_SCROLL = 31; - public static final int GDK_Scroll_Lock = 0xff14; - public static final int GDK_TOP_LEFT_CORNER = 0x86; - public static final int GDK_TOP_RIGHT_CORNER = 0x88; - public static final int GDK_TOP_SIDE = 0x8a; - public static final int GDK_Tab = 0xff09; - public static final int GDK_Up = 0xff52; - public static final int GDK_WATCH = 0x96; - public static final int GDK_XOR = 0x2; - public static final int GDK_XTERM = 0x98; - public static final int GDK_X_CURSOR = 0x0; - public static final int GDK_WINDOW_CHILD = 2; - public static final int GDK_WINDOW_STATE = 32; - public static final int GDK_WINDOW_STATE_ICONIFIED = 1 << 1; - public static final int GDK_WINDOW_STATE_MAXIMIZED = 1 << 2; - public static final int GDK_WINDOW_STATE_FULLSCREEN = 1 << 4; - public static final int GDK_UNMAP = 15; - public static final int GDK_WA_X = 1 << 2; - public static final int GDK_WA_Y = 1 << 3; - public static final int GDK_WA_VISUAL = 1 << 6; - public static final int GDK_WINDOW_TYPE_HINT_DIALOG = 1; - public static final int GDK_WINDOW_TYPE_HINT_TOOLTIP = 10; public static final int G_LOG_FLAG_FATAL = 0x2; public static final int G_LOG_FLAG_RECURSION = 0x1; public static final int G_LOG_LEVEL_MASK = 0xfffffffc; @@ -454,9 +259,9 @@ public class OS extends C { /** Signals */ - public static final byte[] accel_closures_changed = ascii("accel-closures-changed"); - public static final byte[] activate = ascii("activate"); - public static final byte[] angle_changed = ascii("angle_changed"); + public static final byte[] accel_closures_changed = ascii("accel-closures-changed"); // Gtk2,3,4 + public static final byte[] activate = ascii("activate"); // ? + public static final byte[] angle_changed = ascii("angle_changed"); // Gtk3/4, Guesture related. public static final byte[] backspace = ascii("backspace"); public static final byte[] begin = ascii("begin"); public static final byte[] button_press_event = ascii("button-press-event"); @@ -585,6 +390,276 @@ public class OS extends C { public static final byte[] margin_top = ascii("margin-top"); public static final byte[] scrollbar_spacing = ascii("scrollbar-spacing"); + + /** CUSTOM_CODE START + * + * Functions for which code is not generated automatically. + * Don't move to different class or update these unless you also manually update the custom code part as well. + * These functions are usually hand-coded in os_custom.c. + * + * Typical method to generate them is as following: + * 1) Move native call and don't auto-generate bindings. + * - define function as regular function. SWT Tools should generate wrappers in os.c + * - move wrappers from os.c into os_custom.c and make your adaptations/changes. + * - add the 'flags=no_gen' to the method in OS.java + * (e.g, 'flags=no_gen' functions) + * + * 2) Make native call invoke a custom function. + * - create a function in os_custom.c + * - create a function in OS.java that will call your function. + * (e.g, see the 'swt_*' functions). + * + * Approach 2 is more portable than approach 1. + * (e.g '2' functions can be moved around, where as with '1', the c counter-parts have to be updated manually.) + * + * '@category custom' is for annotation/visibility in outline. + * '@flags=no_gen' is an instruction for SWT tools not to generate code. + */ + /** @method flags=no_gen + * @category custom + */ + public static final native boolean GDK_WINDOWING_X11(); + /** @method flags=no_gen + * @category custom + */ + public static final native boolean GDK_WINDOWING_WAYLAND(); + /** + * Can't be auto-generated because of mapping guint to long for keyval + * @method flags=no_gen + * @category custom + */ + public static final native boolean _gdk_keymap_translate_keyboard_state (long /*int*/ keymap, int hardware_keycode, int state, int group, long[] keyval, int[] effective_group, int[] level, int[] consumed_modifiers); + public static final boolean gdk_keymap_translate_keyboard_state (long /*int*/ keymap, int hardware_keycode, int state, int group, long[] keyval, int[] effective_group, int[] level, int[] consumed_modifiers) { + lock.lock(); + try { + return _gdk_keymap_translate_keyboard_state(keymap, hardware_keycode, state, group, keyval, effective_group, level, consumed_modifiers); + } finally { + lock.unlock(); + } + } + /** @method flags=no_gen + * @category custom + */ + public static final native void _call_get_size (long /*int*/ function, long /*int*/ arg0, long /*int*/ arg1, long /*int*/ arg2, long /*int*/ arg3, long /*int*/ arg4, long /*int*/ arg5, long /*int*/ arg6); + public static final void call_get_size (long /*int*/ function, long /*int*/ arg0, long /*int*/ arg1, long /*int*/ arg2, long /*int*/ arg3, long /*int*/ arg4, long /*int*/ arg5, long /*int*/ arg6) { + // See also related call_* functions. + lock.lock(); + try { + _call_get_size(function, arg0, arg1, arg2, arg3, arg4, arg5, arg6); + } finally { + lock.unlock(); + } + } + + /** Custom callbacks */ + /** @method flags=no_gen + * @category custom + */ + public static final native long /*int*/ pangoLayoutNewProc_CALLBACK(long /*int*/ func); + /** @method flags=no_gen + * @category custom + */ + public static final native long /*int*/ pangoFontFamilyNewProc_CALLBACK(long /*int*/ func); + /** @method flags=no_gen + * @category custom + */ + public static final native long /*int*/ pangoFontFaceNewProc_CALLBACK(long /*int*/ func); + /** @method flags=no_gen + * @category custom + */ + public static final native long /*int*/ printerOptionWidgetNewProc_CALLBACK(long /*int*/ func); + /** @method flags=no_gen + * @category custom + */ + public static final native long /*int*/ imContextNewProc_CALLBACK(long /*int*/ func); + /** @method flags=no_gen + * @category custom + */ + public static final native long /*int*/ imContextLast(); + /** @method flags=no_gen + * @category custom + */ + public static final native void _cachejvmptr (); + /** Cache the JVM pointer so that it's usable in other implementations. */ + public static final void cachejvmptr() { + // See bug 521487. + lock.lock(); + try { + _cachejvmptr(); + } finally { + lock.unlock(); + } + } + + /** @category custom */ + public static final native void _swt_debug_on_fatal_warnings(); + /** Add ability to debug gtk warnings for SWT snippets via SWT_FATAL_WARNINGS=1 + * env variable. Please see Eclipse bug 471477 */ + public static final void swt_debug_on_fatal_warnings() { + lock.lock(); + try { + _swt_debug_on_fatal_warnings (); + } finally { + lock.unlock(); + } + } + + /** @category custom */ + public static final native long /*int*/ _swt_fixed_get_type(); + public static final long /*int*/ swt_fixed_get_type() { + lock.lock(); + try { + return _swt_fixed_get_type(); + } finally { + lock.unlock(); + } + } + + /** @category custom */ + public static final native long /*int*/ _swt_fixed_accessible_get_type(); + public static final long /*int*/ swt_fixed_accessible_get_type() { + lock.lock(); + try { + return _swt_fixed_accessible_get_type(); + } finally { + lock.unlock(); + } + } + /** + * @param obj cast=(AtkObject*) + * @param is_native cast=(gboolean) + * @param to_map cast=(GtkWidget *) + * @category custom + */ + public static final native void _swt_fixed_accessible_register_accessible(long /*int*/ obj, boolean is_native, long /*int*/ to_map); + public static final void swt_fixed_accessible_register_accessible(long /*int*/ obj, boolean is_native, long /*int*/ to_map) { + lock.lock(); + try { + _swt_fixed_accessible_register_accessible(obj, is_native, to_map); + } finally { + lock.unlock(); + } + } + /** + * @param fixed cast=(SwtFixed*) + * @param widget cast=(GtkWidget*) + * @param sibling cast=(GtkWidget*) + * @category custom + */ + public static final native void _swt_fixed_restack(long /*int*/ fixed, long /*int*/ widget, long /*int*/ sibling, boolean above); + public static final void swt_fixed_restack(long /*int*/ fixed, long /*int*/ widget, long /*int*/ sibling, boolean above) { + lock.lock(); + try { + _swt_fixed_restack(fixed, widget, sibling, above); + } finally { + lock.unlock(); + } + } + /** + * @param fixed cast=(SwtFixed*) + * @param widget cast=(GtkWidget*) + * @category custom + */ + public static final native void _swt_fixed_move(long /*int*/ fixed, long /*int*/ widget, int x, int y); + public static final void swt_fixed_move(long /*int*/ fixed, long /*int*/ widget, int x, int y) { + lock.lock(); + try { + _swt_fixed_move(fixed, widget, x, y); + } finally { + lock.unlock(); + } + } + /** + * @param fixed cast=(SwtFixed*) + * @param widget cast=(GtkWidget*) + * @category custom + */ + public static final native void _swt_fixed_resize(long /*int*/ fixed, long /*int*/ widget, int width, int height); + public static final void swt_fixed_resize(long /*int*/ fixed, long /*int*/ widget, int width, int height) { + lock.lock(); + try { + _swt_fixed_resize(fixed, widget, width, height); + } finally { + lock.unlock(); + } + } + + /** @param str cast=(const gchar *) + * @category custom + */ + public static final native long /*int*/ _g_utf16_offset_to_pointer(long /*int*/ str, long /*int*/ offset); + /** Custom version of g_utf8_pointer_to_offset */ + public static final long /*int*/ g_utf16_offset_to_pointer(long /*int*/ str, long /*int*/ offset) { + lock.lock(); + try { + return _g_utf16_offset_to_pointer(str, offset); + } finally { + lock.unlock(); + } + } + + /** + * @param str cast=(const gchar *) + * @param pos cast=(const gchar *) + * @category custom + */ + public static final native long /*int*/ _g_utf16_pointer_to_offset(long /*int*/ str, long /*int*/ pos); + /** Custom version of g_utf8_pointer_to_offset */ + public static final long /*int*/ g_utf16_pointer_to_offset(long /*int*/ str, long /*int*/ pos) { + lock.lock(); + try { + return _g_utf16_pointer_to_offset(str, pos); + } finally { + lock.unlock(); + } + } + /** @param str cast=(const gchar *) + * @category custom + */ + public static final native long /*int*/ _g_utf16_strlen(long /*int*/ str, long /*int*/ max); + /** custom version of g_utf8 for 16 bit */ + public static final long /*int*/ g_utf16_strlen(long /*int*/ str, long /*int*/ max) { + lock.lock(); + try { + return _g_utf16_strlen(str, max); + } finally { + lock.unlock(); + } + } + /** @param str cast=(const gchar *) + * @category custom + */ + public static final native long /*int*/ _g_utf8_offset_to_utf16_offset(long /*int*/ str, long /*int*/ offset); + /** custom version of g_utf8 for 16 bit */ + public static final long /*int*/ g_utf8_offset_to_utf16_offset(long /*int*/ str, long /*int*/ offset) { + lock.lock(); + try { + return _g_utf8_offset_to_utf16_offset(str, offset); + } finally { + lock.unlock(); + } + } + /** @param str cast=(const gchar *) + * @category custom + */ + public static final native long /*int*/ _g_utf16_offset_to_utf8_offset(long /*int*/ str, long /*int*/ offset); + /** custom version of g_utf8 for 16 bit */ + public static final long /*int*/ g_utf16_offset_to_utf8_offset(long /*int*/ str, long /*int*/ offset) { + lock.lock(); + try { + return _g_utf16_offset_to_utf8_offset(str, offset); + } finally { + lock.unlock(); + } + } + + /** CUSTOM_CODE END */ + + + + + + /** * 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). * @@ -608,8 +683,6 @@ public class OS extends C { public static final int GLIB_VERSION = VERSION(glib_major_version(), glib_minor_version(), glib_micro_version()); private static final boolean MIN_GLIB_2_32 = OS.GLIB_VERSION >= VERSION(2, 32, 0); - - /* Feature in Gtk: with the switch to GtkMenuItems from GtkImageMenuItems * in Gtk3 came a small Gtk shortfall: a small amount of padding on the left hand * side of MenuItems was added. This padding is not accessible to the developer, @@ -655,31 +728,27 @@ public static int VERSION(int major, int minor, int micro) { } public static boolean isX11 () { - return GDK_WINDOWING_X11() && GDK_IS_X11_DISPLAY(gdk_display_get_default()); + return OS.GDK_WINDOWING_X11() && GDK.GDK_IS_X11_DISPLAY(GDK.gdk_display_get_default()); } + + + + + + + + + + + + + /** 64 bit */ public static final native int GInterfaceInfo_sizeof (); public static final native int GPollFD_sizeof (); public static final native int GTypeInfo_sizeof (); public static final native int GTypeQuery_sizeof (); -public static final native int GdkColor_sizeof(); -public static final native int GdkKeymapKey_sizeof(); -public static final native int GdkRGBA_sizeof(); -public static final native int GdkDragContext_sizeof(); -public static final native int GdkEvent_sizeof(); -public static final native int GdkEventAny_sizeof(); -public static final native int GdkEventButton_sizeof(); -public static final native int GdkEventCrossing_sizeof(); -public static final native int GdkEventExpose_sizeof(); -public static final native int GdkEventFocus_sizeof(); -public static final native int GdkEventKey_sizeof(); -public static final native int GdkEventMotion_sizeof(); -public static final native int GdkEventScroll_sizeof(); -public static final native int GdkEventWindowState_sizeof(); -public static final native int GdkGeometry_sizeof(); -public static final native int GdkRectangle_sizeof(); -public static final native int GdkWindowAttr_sizeof(); public static final native int PangoAttribute_sizeof(); public static final native int PangoAttrColor_sizeof(); public static final native int PangoAttrInt_sizeof(); @@ -700,10 +769,7 @@ public static final native long /*int*/ localeconv_decimal_point(); public static final native long /*int*/ realpath(byte[] path, byte[] realPath); - /** Object private fields accessors */ - - /** @param object_class cast=(GObjectClass *) */ public static final native long /*int*/ G_OBJECT_CLASS_CONSTRUCTOR(long /*int*/ object_class); /** @@ -711,10 +777,6 @@ public static final native long /*int*/ G_OBJECT_CLASS_CONSTRUCTOR(long /*int*/ * @paramOFF constructor cast=(GObject* (*) (GType, guint, GObjectConstructParam *)) */ public static final native void G_OBJECT_CLASS_SET_CONSTRUCTOR(long /*int*/ object_class, long /*int*/ constructor); -/** @param event cast=(GdkEvent *) */ -public static final native int GDK_EVENT_TYPE(long /*int*/ event); -/** @param event cast=(GdkEventAny *) */ -public static final native long /*int*/ GDK_EVENT_WINDOW(long /*int*/ event); /** @param xevent cast=(XEvent *) */ public static final native int X_EVENT_TYPE(long /*int*/ xevent); /** @param xevent cast=(XAnyEvent *) */ @@ -783,32 +845,6 @@ public static final long /*int*/ call (long /*int*/ function, long /*int*/ arg0, lock.unlock(); } } -/** @method flags=no_gen */ -public static final native void _call_get_size (long /*int*/ function, long /*int*/ arg0, long /*int*/ arg1, long /*int*/ arg2, long /*int*/ arg3, long /*int*/ arg4, long /*int*/ arg5, long /*int*/ arg6); -public static final void call_get_size (long /*int*/ function, long /*int*/ arg0, long /*int*/ arg1, long /*int*/ arg2, long /*int*/ arg3, long /*int*/ arg4, long /*int*/ arg5, long /*int*/ arg6) { - lock.lock(); - try { - _call_get_size(function, arg0, arg1, arg2, arg3, arg4, arg5, arg6); - } finally { - lock.unlock(); - } -} -/** @method flags=no_gen */ -public static final native boolean GDK_WINDOWING_X11(); -/** @method flags=no_gen */ -public static final native boolean GDK_WINDOWING_WAYLAND(); -/** @param display cast=(GdkDisplay *) */ -public static final native boolean GDK_IS_X11_DISPLAY(long /*int*/ display); -/** @param pixmap cast=(GdkPixmap *) */ -public static final native long /*int*/ _GDK_PIXMAP_XID(long /*int*/ pixmap); -public static final long /*int*/ GDK_PIXMAP_XID(long /*int*/ pixmap) { - lock.lock(); - try { - return _GDK_PIXMAP_XID(pixmap); - } finally { - lock.unlock(); - } -} /** * @param display cast=(Display *) * @param event_return cast=(XEvent *) @@ -969,126 +1005,6 @@ public static final void XTestFakeKeyEvent(long /*int*/ display, int keycode, bo lock.unlock(); } } -/** @param gdkdisplay cast=(GdkDisplay *) */ -public static final native long /*int*/ _gdk_x11_display_get_xdisplay(long /*int*/ gdkdisplay); -public static final long /*int*/ gdk_x11_display_get_xdisplay (long /*int*/ gdkdisplay) { - lock.lock(); - try { - return _gdk_x11_display_get_xdisplay(gdkdisplay); - } finally { - lock.unlock(); - } -} -/** @method flags=dynamic */ -public static final native long /*int*/ _gdk_x11_drawable_get_xid(long /*int*/ drawable); -public static final long /*int*/ gdk_x11_drawable_get_xid(long /*int*/ drawable) { - lock.lock(); - try { - return _gdk_x11_drawable_get_xid(drawable); - } finally { - lock.unlock(); - } -} -public static final native long /*int*/ _gdk_x11_get_default_xdisplay(); -public static final long /*int*/ gdk_x11_get_default_xdisplay () { - lock.lock(); - try { - return _gdk_x11_get_default_xdisplay(); - } finally { - lock.unlock(); - } -} -/** - * @method flags=dynamic - * @param screen cast=(GdkScreen *) - * @param xvisualid cast=(VisualID) - */ -public static final native long /*int*/ _gdk_x11_screen_lookup_visual(long /*int*/ screen, int xvisualid); -public static final long /*int*/ gdk_x11_screen_lookup_visual(long /*int*/ screen, int xvisualid) { - lock.lock(); - try { - return _gdk_x11_screen_lookup_visual(screen, xvisualid); - } finally { - lock.unlock(); - } -} -/** - * @method flags=dynamic - * @param screen cast=(GdkScreen *) - */ -public static final native long /*int*/ _gdk_x11_screen_get_window_manager_name(long /*int*/ screen); -public static final long /*int*/ gdk_x11_screen_get_window_manager_name(long /*int*/ screen) { - lock.lock(); - try { - return _gdk_x11_screen_get_window_manager_name(screen); - } finally { - lock.unlock(); - } -} -/** @param visual cast=(GdkVisual *) */ -public static final native long /*int*/ _gdk_x11_visual_get_xvisual(long /*int*/ visual); -public static final long /*int*/ gdk_x11_visual_get_xvisual(long /*int*/ visual) { - lock.lock(); - try { - return _gdk_x11_visual_get_xvisual(visual); - } finally { - lock.unlock(); - } -} -/** -* @method flags=dynamic -* @param gdkwindow cast=(GdkWindow *) -*/ -public static final native long /*int*/ _gdk_x11_window_get_xid(long /*int*/ gdkwindow); -public static final long /*int*/ gdk_x11_window_get_xid(long /*int*/ gdkwindow) { - lock.lock(); - try { - return _gdk_x11_window_get_xid(gdkwindow); - } finally { - lock.unlock(); - } -} -/** - * @method flags=dynamic - * @param gdkdisplay cast=(GdkDisplay *) - */ -public static final native long /*int*/ _gdk_x11_window_lookup_for_display(long /*int*/ gdkdisplay, long /*int*/ xid); -public static final long /*int*/ gdk_x11_window_lookup_for_display(long /*int*/ gdkdisplay, long /*int*/ xid) { - lock.lock(); - try { - return _gdk_x11_window_lookup_for_display(gdkdisplay, xid); - } finally { - lock.unlock(); - } -} -/** - * @param window cast=(GdkWindow *) - * @param function cast=(GdkFilterFunc) - * @param data cast=(gpointer) - */ -public static final native void _gdk_window_add_filter(long /*int*/ window, long /*int*/ function, long /*int*/ data); -public static final void gdk_window_add_filter(long /*int*/ window, long /*int*/ function, long /*int*/ data) { - lock.lock(); - try { - _gdk_window_add_filter(window, function, data); - } finally { - lock.unlock(); - } -} -/** - * @param window cast=(GdkWindow *) - * @param function cast=(GdkFilterFunc) - * @param data cast=(gpointer) - */ -public static final native void _gdk_window_remove_filter(long /*int*/ window, long /*int*/ function, long /*int*/ data); -public static final void gdk_window_remove_filter(long /*int*/ window, long /*int*/ function, long /*int*/ data) { - lock.lock(); - try { - _gdk_window_remove_filter(window, function, data); - } finally { - lock.unlock(); - } -} /** * @param dest cast=(void *) * @param src cast=(const void *),flags=no_out @@ -1115,56 +1031,10 @@ public static final native int RTLD_NOW(); /** @method flags=const */ public static final native int RTLD_LAZY(); -/** Custom callbacks */ - -/** @method flags=no_gen */ -public static final native long /*int*/ pangoLayoutNewProc_CALLBACK(long /*int*/ func); -/** @method flags=no_gen */ -public static final native long /*int*/ pangoFontFamilyNewProc_CALLBACK(long /*int*/ func); -/** @method flags=no_gen */ -public static final native long /*int*/ pangoFontFaceNewProc_CALLBACK(long /*int*/ func); -/** @method flags=no_gen */ -public static final native long /*int*/ printerOptionWidgetNewProc_CALLBACK(long /*int*/ func); -/** @method flags=no_gen */ -public static final native long /*int*/ imContextNewProc_CALLBACK(long /*int*/ func); -/** @method flags=no_gen */ -public static final native long /*int*/ imContextLast(); - /** Natives */ public static final native int Call (long /*int*/ func, long /*int*/ arg0, int arg1, int arg2); public static final native long Call (long /*int*/ func, long /*int*/ arg0, int arg1, long arg2); -/** @method flags=const */ -public static final native long /*int*/ _GDK_TYPE_COLOR(); -public static final long /*int*/ GDK_TYPE_COLOR() { - lock.lock(); - try { - return _GDK_TYPE_COLOR(); - } finally { - lock.unlock(); - } -} -/** @method flags=const */ -public static final native long /*int*/ _GDK_TYPE_RGBA(); -public static final long /*int*/ GDK_TYPE_RGBA() { - lock.lock(); - assert GTK.GTK3 : "GTK3 code was run by GTK2"; - try { - return _GDK_TYPE_RGBA(); - } finally { - lock.unlock(); - } -} -/** @method flags=const */ -public static final native long /*int*/ _GDK_TYPE_PIXBUF(); -public static final long /*int*/ GDK_TYPE_PIXBUF() { - lock.lock(); - try { - return _GDK_TYPE_PIXBUF(); - } finally { - lock.unlock(); - } -} public static final native long /*int*/ _G_OBJECT_CLASS (long /*int*/ klass); public static final long /*int*/ G_OBJECT_CLASS (long /*int*/ klass) { lock.lock(); @@ -2809,6 +2679,7 @@ public static final long /*int*/ g_type_register_static (long /*int*/ parent_typ * @method flags=dynamic */ public static final native void _g_thread_init(long /*int*/ vtable); +/** Treat with special care, platform specific behaviour. See os_custom.h */ public static final void g_thread_init(long /*int*/ vtable) { lock.lock(); try { @@ -2818,6 +2689,7 @@ public static final void g_thread_init(long /*int*/ vtable) { } } public static final native boolean _g_thread_supported(); +/** Treat with special care, see os_custom.h */ public static final boolean g_thread_supported() { lock.lock(); try { @@ -2856,59 +2728,6 @@ public static final long /*int*/ g_utf8_pointer_to_offset(long /*int*/ str, long } } /** @param str cast=(const gchar *) */ -public static final native long /*int*/ _g_utf16_offset_to_pointer(long /*int*/ str, long /*int*/ offset); -public static final long /*int*/ g_utf16_offset_to_pointer(long /*int*/ str, long /*int*/ offset) { - lock.lock(); - try { - return _g_utf16_offset_to_pointer(str, offset); - } finally { - lock.unlock(); - } -} -/** - * @param str cast=(const gchar *) - * @param pos cast=(const gchar *) - */ -public static final native long /*int*/ _g_utf16_pointer_to_offset(long /*int*/ str, long /*int*/ pos); -public static final long /*int*/ g_utf16_pointer_to_offset(long /*int*/ str, long /*int*/ pos) { - lock.lock(); - try { - return _g_utf16_pointer_to_offset(str, pos); - } finally { - lock.unlock(); - } -} -/** @param str cast=(const gchar *) */ -public static final native long /*int*/ _g_utf16_strlen(long /*int*/ str, long /*int*/ max); -public static final long /*int*/ g_utf16_strlen(long /*int*/ str, long /*int*/ max) { - lock.lock(); - try { - return _g_utf16_strlen(str, max); - } finally { - lock.unlock(); - } -} -/** @param str cast=(const gchar *) */ -public static final native long /*int*/ _g_utf8_offset_to_utf16_offset(long /*int*/ str, long /*int*/ offset); -public static final long /*int*/ g_utf8_offset_to_utf16_offset(long /*int*/ str, long /*int*/ offset) { - lock.lock(); - try { - return _g_utf8_offset_to_utf16_offset(str, offset); - } finally { - lock.unlock(); - } -} -/** @param str cast=(const gchar *) */ -public static final native long /*int*/ _g_utf16_offset_to_utf8_offset(long /*int*/ str, long /*int*/ offset); -public static final long /*int*/ g_utf16_offset_to_utf8_offset(long /*int*/ str, long /*int*/ offset) { - lock.lock(); - try { - return _g_utf16_offset_to_utf8_offset(str, offset); - } finally { - lock.unlock(); - } -} -/** @param str cast=(const gchar *) */ public static final native long /*int*/ _g_utf8_strlen(long /*int*/ str, long /*int*/ max); public static final long /*int*/ g_utf8_strlen(long /*int*/ str, long /*int*/ max) { lock.lock(); @@ -3030,2355 +2849,6 @@ public static final int g_timeout_add(int interval, long /*int*/ function, long } } -/** @param atom_name cast=(const gchar *),flags=no_out critical */ -public static final native long /*int*/ _gdk_atom_intern(byte[] atom_name, boolean only_if_exists); -public static final long /*int*/ gdk_atom_intern(byte[] atom_name, boolean only_if_exists) { - lock.lock(); - try { - return _gdk_atom_intern(atom_name, only_if_exists); - } finally { - lock.unlock(); - } -} -/** @param atom cast=(GdkAtom) */ -public static final native long /*int*/ _gdk_atom_name(long /*int*/ atom); -public static final long /*int*/ gdk_atom_name(long /*int*/ atom) { - lock.lock(); - try { - return _gdk_atom_name(atom); - } finally { - lock.unlock(); - } -} -public static final native void _gdk_beep(); -public static final void gdk_beep() { - lock.lock(); - try { - _gdk_beep(); - } finally { - lock.unlock(); - } -} -/** - * @method flags=dynamic - * @param window cast=(GdkWindow *) - * @param data cast=(const gchar *),flags=no_out critical - * @param width cast=(gint) - * @param height cast=(gint) - */ -public static final native long /*int*/ _gdk_bitmap_create_from_data(long /*int*/ window, byte[] data, int width, int height); -public static final long /*int*/ gdk_bitmap_create_from_data(long /*int*/ window, byte[] data, int width, int height) { - lock.lock(); - try { - return _gdk_bitmap_create_from_data(window, data, width, height); - } finally { - lock.unlock(); - } -} -/** @method flags=dynamic */ -public static final native long /*int*/ _gdk_cairo_create(long /*int*/ drawable); -public static final long /*int*/ gdk_cairo_create(long /*int*/ drawable) { - lock.lock(); - try { - return _gdk_cairo_create(drawable); - } finally { - lock.unlock(); - } -} -/** @method flags=dynamic */ -public static final native boolean _gdk_cairo_get_clip_rectangle(long /*int*/ cr, GdkRectangle rect); -public static final boolean gdk_cairo_get_clip_rectangle(long /*int*/ cr, GdkRectangle rect) { - lock.lock(); - try { - return _gdk_cairo_get_clip_rectangle(cr, rect); - } finally { - lock.unlock(); - } -} -/** @method flags=dynamic */ -public static final native void _gdk_cairo_region(long /*int*/ cairo, long /*int*/ region); -public static final void gdk_cairo_region(long /*int*/ cairo, long /*int*/ region) { - lock.lock(); - try { - _gdk_cairo_region(cairo, region); - } finally { - lock.unlock(); - } -} -/** @method flags=dynamic */ -public static final native void _gdk_cairo_reset_clip(long /*int*/ cairo, long /*int*/ drawable); -public static final void gdk_cairo_reset_clip(long /*int*/ cairo, long /*int*/ drawable) { - lock.lock(); - try { - _gdk_cairo_reset_clip(cairo, drawable); - } finally { - lock.unlock(); - } -} -/** @method flags=dynamic */ -public static final native void _gdk_cairo_set_source_color(long /*int*/ cairo, GdkColor color); -public static final void gdk_cairo_set_source_color(long /*int*/ cairo, GdkColor color) { - lock.lock(); - try { - _gdk_cairo_set_source_color(cairo, color); - } finally { - lock.unlock(); - } -} -/** @method flags=dynamic */ -public static final native void _gdk_cairo_set_source_rgba(long /*int*/ cairo, GdkRGBA rgba); -public static final void gdk_cairo_set_source_rgba(long /*int*/ cairo, GdkRGBA rgba) { - lock.lock(); - try { - _gdk_cairo_set_source_rgba(cairo, rgba); - } finally { - lock.unlock(); - } -} -/** - * @param window cast=(GdkWindow *) - * @method flags=dynamic - */ -public static final native int _gdk_window_get_width(long /*int*/ window); -public static final int gdk_window_get_width(long /*int*/ window) { - lock.lock(); - try { - return _gdk_window_get_width(window); - } finally { - lock.unlock(); - } -} -/** - * @param window cast=(GdkWindow *) - * @method flags=dynamic - */ -public static final native long /*int*/ _gdk_window_get_visible_region(long /*int*/ window); -public static final long /*int*/ gdk_window_get_visible_region(long /*int*/ window) { - lock.lock(); - try { - return _gdk_window_get_visible_region(window); - } finally { - lock.unlock(); - } -} -/** - * @param window cast=(GdkWindow *) - * @method flags=dynamic - */ -public static final native int _gdk_window_get_height(long /*int*/ window); -public static final int gdk_window_get_height(long /*int*/ window) { - lock.lock(); - try { - return _gdk_window_get_height(window); - } finally { - lock.unlock(); - } -} -/** - * @method flags=dynamic - * @param pixbuf cast=(const GdkPixbuf *) - */ -public static final native void _gdk_cairo_set_source_pixbuf(long /*int*/ cairo, long /*int*/ pixbuf, double pixbuf_x, double pixbuf_y); -public static final void gdk_cairo_set_source_pixbuf(long /*int*/ cairo, long /*int*/ pixbuf, double pixbuf_x, double pixbuf_y) { - lock.lock(); - try { - _gdk_cairo_set_source_pixbuf(cairo,pixbuf,pixbuf_x,pixbuf_y); - } - finally { - lock.unlock(); - } -} -/** - * @method flags=dynamic - */ -public static final native void _gdk_cairo_set_source_pixmap(long /*int*/ cairo, long /*int*/ pixmap, double pixbuf_x, double pixbuf_y); -public static final void gdk_cairo_set_source_pixmap(long /*int*/ cairo, long /*int*/ pixmap, double pixbuf_x, double pixbuf_y) { - lock.lock(); - try { - _gdk_cairo_set_source_pixmap(cairo,pixmap,pixbuf_x,pixbuf_y); - } - finally { - lock.unlock(); - } -} -/** - * @method flags=dynamic - * @param window cast=(GdkWindow *) - */ -public static final native void _gdk_cairo_set_source_window(long /*int*/ cairo, long /*int*/ window, int x, int y); -public static final void gdk_cairo_set_source_window(long /*int*/ cairo, long /*int*/ window, int x, int y) { - lock.lock(); - try { - _gdk_cairo_set_source_window(cairo, window, x, y); - } - finally { - lock.unlock(); - } -} -/** - * @method flags=dynamic - * @param color cast=(GdkColor *) */ -public static final native void _gdk_color_free(long /*int*/ color); -public static final void gdk_color_free(long /*int*/ color) { - lock.lock(); - assert !GTK.GTK3 : "GTK2 code was run by GTK3"; - try { - _gdk_color_free(color); - } finally { - lock.unlock(); - } -} -/** - * @method flags=dynamic - * @param spec cast=(const gchar *) - * @param color cast=(GdkColor *),flags=no_in - */ -public static final native boolean _gdk_color_parse(byte[] spec, GdkColor color); -public static final boolean gdk_color_parse(byte[] spec, GdkColor color) { - lock.lock(); - assert !GTK.GTK3 : "GTK2 code was run by GTK3"; - try { - return _gdk_color_parse(spec, color); - } finally { - lock.unlock(); - } -} -/** - * @method flags=dynamic - * @param color flags=no_in - */ -public static final native boolean _gdk_color_white(long /*int*/ colormap, GdkColor color); -public static final boolean gdk_color_white(long /*int*/ colormap, GdkColor color) { - lock.lock(); - try { - return _gdk_color_white(colormap, color); - } finally { - lock.unlock(); - } -} -/** - * @method flags=dynamic - * @param color cast=(GdkColor *) - * @param writeable cast=(gboolean) - * @param best_match cast=(gboolean) - */ -public static final native boolean _gdk_colormap_alloc_color(long /*int*/ colormap, GdkColor color, boolean writeable, boolean best_match); -public static final boolean gdk_colormap_alloc_color(long /*int*/ colormap, GdkColor color, boolean writeable, boolean best_match) { - lock.lock(); - try { - return _gdk_colormap_alloc_color(colormap, color, writeable, best_match); - } finally { - lock.unlock(); - } -} -/** - * @method flags=dynamic - * @param colors cast=(GdkColor *),flags=no_out - * @param ncolors cast=(gint) - */ -public static final native void _gdk_colormap_free_colors(long /*int*/ colormap, GdkColor colors, int ncolors); -public static final void gdk_colormap_free_colors(long /*int*/ colormap, GdkColor colors, int ncolors) { - lock.lock(); - try { - _gdk_colormap_free_colors(colormap, colors, ncolors); - } finally { - lock.unlock(); - } -} -/** @method flags=dynamic */ -public static final native long /*int*/ _gdk_colormap_get_system(); -public static final long /*int*/ gdk_colormap_get_system() { - lock.lock(); - try { - return _gdk_colormap_get_system(); - } finally { - lock.unlock(); - } -} -/** @method flags=dynamic */ -public static final native void _gdk_cursor_unref(long /*int*/ cursor); -public static final void gdk_cursor_unref(long /*int*/ cursor) { - lock.lock(); - try { - _gdk_cursor_unref(cursor); - } finally { - lock.unlock(); - } -} -/** @param display cast=(GdkDisplay *) - * @param cursor_type cast=(GdkCursorType) - */ -public static final native long /*int*/ _gdk_cursor_new_for_display(long /*int*/ display, long /*int*/ cursor_type); -public static final long /*int*/ gdk_cursor_new_for_display(long /*int*/ display, long /*int*/ cursor_type) { - lock.lock(); - try { - return _gdk_cursor_new_for_display(display, cursor_type); - } finally { - lock.unlock(); - } -} -/** @param display cast=(GdkDisplay *) - * @param cursor_name cast=(const gchar *) - */ -public static final native long /*int*/ _gdk_cursor_new_from_name(long /*int*/ display, byte[] cursor_name); -public static final long /*int*/ gdk_cursor_new_from_name(long /*int*/ display, byte[] cursor_name) { - lock.lock(); - try { - return _gdk_cursor_new_from_name(display, cursor_name); - } finally { - lock.unlock(); - } -} -/** - * @method flags=dynamic - * @param fg cast=(GdkColor *),flags=no_out - * @param bg cast=(GdkColor *),flags=no_out - * @param x cast=(gint) - * @param y cast=(gint) - */ -public static final native long /*int*/ _gdk_cursor_new_from_pixmap(long /*int*/ source, long /*int*/ mask, GdkColor fg, GdkColor bg, int x, int y); -public static final long /*int*/ gdk_cursor_new_from_pixmap(long /*int*/ source, long /*int*/ mask, GdkColor fg, GdkColor bg, int x, int y) { - lock.lock(); - try { - return _gdk_cursor_new_from_pixmap(source, mask, fg, bg, x, y); - } finally { - lock.unlock(); - } -} -/** @method flags=dynamic */ -public static final native long /*int*/ _gdk_cursor_new_from_pixbuf(long /*int*/ display, long /*int*/ pixbuf, int x, int y); -public static final long /*int*/ gdk_cursor_new_from_pixbuf(long /*int*/ display, long /*int*/ pixbuf, int x, int y) { - lock.lock(); - try { - return _gdk_cursor_new_from_pixbuf(display, pixbuf, x, y); - } finally { - lock.unlock(); - } -} -/** @method flags=dynamic */ -public static final native void _gdk_display_warp_pointer(long /*int*/ device, long /*int*/ screen, int x, int y); -public static final void gdk_display_warp_pointer(long /*int*/ device, long /*int*/ screen, int x, int y) { - lock.lock(); - try { - _gdk_display_warp_pointer(device, screen, x, y); - } finally { - lock.unlock(); - } - } -/** @method flags=dynamic */ -public static final native void _gdk_device_warp(long /*int*/ device, long /*int*/ screen, int x, int y); -public static final void gdk_device_warp(long /*int*/ device, long /*int*/ screen, int x, int y) { - lock.lock(); - try { - _gdk_device_warp(device, screen, x, y); - } finally { - lock.unlock(); - } - } - -/** @method flags=dynamic */ -public static final native long /*int*/ _gdk_display_get_default(); -public static final long /*int*/ gdk_display_get_default() { - lock.lock(); - try { - return _gdk_display_get_default(); - } finally { - lock.unlock(); - } -} - -/** - * @method flags=dynamic - */ -public static final native long /*int*/ _gdk_display_get_default_seat(long /*int*/ display); -public static final long /*int*/ gdk_display_get_default_seat(long /*int*/ display) { - lock.lock(); - try { - return _gdk_display_get_default_seat(display); - } finally { - lock.unlock(); - } -} - -/** - * @method flags=dynamic - * @param window cast=(GdkWindow *) - */ -public static final native long /*int*/ _gdk_window_get_display(long /*int*/ window); -public static final long /*int*/ gdk_window_get_display(long /*int*/ window) { - lock.lock(); - try { - return _gdk_window_get_display(window); - } finally { - lock.unlock(); - } -} -/** - * @method flags=dynamic - * @param display cast=(GdkDisplay *) - */ -public static final native long /*int*/ _gdk_display_get_device_manager(long /*int*/ display); -public static final long /*int*/ gdk_display_get_device_manager(long /*int*/ display) { - lock.lock(); - try { - return _gdk_display_get_device_manager(display); - } finally { - lock.unlock(); - } -} -/** @method flags=dynamic */ -public static final native long /*int*/ _gdk_device_manager_get_client_pointer(long /*int*/ device_manager); -public static final long /*int*/ gdk_device_manager_get_client_pointer(long /*int*/ device_manager) { - lock.lock(); - try { - return _gdk_device_manager_get_client_pointer(device_manager); - } finally { - lock.unlock(); - } -} -/** - * @method flags=dynamic - * @param win_x cast=(gint *) - * @param win_y cast=(gint *) - */ -public static final native long /*int*/ _gdk_device_get_window_at_position(long /*int*/ device, int[] win_x, int[] win_y); -public static final long /*int*/ gdk_device_get_window_at_position(long /*int*/ device, int[] win_x, int[] win_y) { - lock.lock(); - try { - return _gdk_device_get_window_at_position(device, win_x, win_y); - } finally { - lock.unlock(); - } -} -/** @method flags=dynamic */ -public static final native boolean _gdk_display_supports_cursor_color(long /*int*/ display); -public static final boolean gdk_display_supports_cursor_color(long /*int*/ display) { - lock.lock(); - try { - return _gdk_display_supports_cursor_color(display); - } finally { - lock.unlock(); - } -} -/** - * @method flags=dynamic - * @param context cast=(GdkDragContext *) - */ -public static final native int _gdk_drag_context_get_actions(long /*int*/ context); -public static final int gdk_drag_context_get_actions(long /*int*/ context) { - lock.lock(); - try { - return _gdk_drag_context_get_actions(context); - } finally { - lock.unlock(); - } -} -/** - * @method flags=dynamic - * @param context cast=(GdkDragContext *) - */ -public static final native long /*int*/ _gdk_drag_context_get_dest_window(long /*int*/ context); -public static final long /*int*/ gdk_drag_context_get_dest_window(long /*int*/ context) { - lock.lock(); - try { - return _gdk_drag_context_get_dest_window(context); - } finally { - lock.unlock(); - } -} -/** - * @method flags=dynamic - * @param context cast=(GdkDragContext *) - */ -public static final native int _gdk_drag_context_get_selected_action(long /*int*/ context); -public static final int gdk_drag_context_get_selected_action(long /*int*/ context) { - lock.lock(); - try { - return _gdk_drag_context_get_selected_action(context); - } finally { - lock.unlock(); - } -} -/** - * @method flags=dynamic - * @param context cast=(GdkDragContext *) - */ -public static final native long /*int*/ _gdk_drag_context_list_targets(long /*int*/ context); -public static final long /*int*/ gdk_drag_context_list_targets(long /*int*/ context) { - lock.lock(); - try { - return _gdk_drag_context_list_targets(context); - } finally { - lock.unlock(); - } -} -/** - * @param context cast=(GdkDragContext *) - * @param action cast=(GdkDragAction) - * @param time cast=(guint32) - */ -public static final native void _gdk_drag_status(long /*int*/ context, int action, int time); -public static final void gdk_drag_status(long /*int*/ context, int action, int time) { - lock.lock(); - try { - _gdk_drag_status(context, action, time); - } finally { - lock.unlock(); - } -} -/** - * @method flags=dynamic - * @param filled cast=(gint) - * @param x cast=(gint) - * @param y cast=(gint) - * @param width cast=(gint) - * @param height cast=(gint) - * @param angle1 cast=(gint) - * @param angle2 cast=(gint) - */ -public static final native void _gdk_draw_arc(long /*int*/ drawable, long /*int*/ gc, int filled, int x, int y, int width, int height, int angle1, int angle2); -public static final void gdk_draw_arc(long /*int*/ drawable, long /*int*/ gc, int filled, int x, int y, int width, int height, int angle1, int angle2) { - lock.lock(); - try { - _gdk_draw_arc(drawable, gc, filled, x, y, width, height, angle1, angle2); - } finally { - lock.unlock(); - } -} -/** - * @method flags=dynamic - */ -public static final native void _gdk_draw_image(long /*int*/ drawable, long /*int*/ gc, long /*int*/ image, int xsrc, int ysrc, int xdest, int ydest, int width, int height); -public static final void gdk_draw_image(long /*int*/ drawable, long /*int*/ gc, long /*int*/ image, int xsrc, int ysrc, int xdest, int ydest, int width, int height) { - lock.lock(); - try { - _gdk_draw_image(drawable, gc, image, xsrc, ysrc, xdest, ydest, width, height); - } finally { - lock.unlock(); - } -} -/** - * @method flags=dynamic - * @param xsrc cast=(gint) - * @param ysrc cast=(gint) - * @param xdest cast=(gint) - * @param ydest cast=(gint) - * @param width cast=(gint) - * @param height cast=(gint) - * @param x_dither cast=(gint) - * @param y_dither cast=(gint) - */ -public static final native void _gdk_draw_pixbuf(long /*int*/ drawable, long /*int*/ gc, long /*int*/ pixbuf, int xsrc, int ysrc, int xdest, int ydest, int width, int height, int dither, int x_dither, int y_dither); -public static final void gdk_draw_pixbuf(long /*int*/ drawable, long /*int*/ gc, long /*int*/ pixbuf, int xsrc, int ysrc, int xdest, int ydest, int width, int height, int dither, int x_dither, int y_dither) { - lock.lock(); - try { - _gdk_draw_pixbuf(drawable, gc, pixbuf, xsrc, ysrc, xdest, ydest, width, height, dither, x_dither, y_dither); - } finally { - lock.unlock(); - } -} -/** - * @method flags=dynamic - * @param filled cast=(gint) - * @param x cast=(gint) - * @param y cast=(gint) - * @param width cast=(gint) - * @param height cast=(gint) - */ -public static final native void _gdk_draw_rectangle(long /*int*/ drawable, long /*int*/ gc, int filled, int x, int y, int width, int height); -public static final void gdk_draw_rectangle(long /*int*/ drawable, long /*int*/ gc, int filled, int x, int y, int width, int height) { - lock.lock(); - try { - _gdk_draw_rectangle(drawable, gc, filled, x, y, width, height); - } finally { - lock.unlock(); - } -} -/** @method flags=dynamic */ -public static final native int _gdk_drawable_get_depth(long /*int*/ drawable); -public static final int gdk_drawable_get_depth(long /*int*/ drawable) { - lock.lock(); - try { - return _gdk_drawable_get_depth(drawable); - } finally { - lock.unlock(); - } -} -/** - * @method flags=dynamic - * @param width cast=(gint *),flags=no_in critical - * @param height cast=(gint *),flags=no_in critical - * @method flags=dynamic - */ -public static final native void _gdk_pixmap_get_size(long /*int*/ pixmap, int[] width, int[] height); -public static final void gdk_pixmap_get_size(long /*int*/ pixmap, int[] width, int[] height) { - lock.lock(); - try { - _gdk_pixmap_get_size (pixmap,width,height); - } finally { - lock.unlock(); - } -} -/** - * @method flags=dynamic - * @param x cast=(gint) - * @param y cast=(gint) - * @param width cast=(gint) - * @param height cast=(gint) - */ -public static final native long /*int*/ _gdk_drawable_get_image(long /*int*/ drawable, int x, int y, int width, int height); -public static final long /*int*/ gdk_drawable_get_image(long /*int*/ drawable, int x, int y, int width, int height) { - lock.lock(); - try { - return _gdk_drawable_get_image(drawable, x, y, width, height); - } finally { - lock.unlock(); - } -} -/** @method flags=dynamic */ -public static final native long /*int*/ _gdk_drawable_get_visible_region(long /*int*/ drawable); -public static final long /*int*/ gdk_drawable_get_visible_region(long /*int*/ drawable) { - lock.lock(); - try { - return _gdk_drawable_get_visible_region(drawable); - } finally { - lock.unlock(); - } -} -/** @param event cast=(GdkEvent *) */ -public static final native long /*int*/ _gdk_event_copy(long /*int*/ event); -public static final long /*int*/ gdk_event_copy(long /*int*/ event) { - lock.lock(); - try { - return _gdk_event_copy(event); - } finally { - lock.unlock(); - } -} -/** @param event cast=(GdkEvent *) */ -public static final native void _gdk_event_free(long /*int*/ event); -public static final void gdk_event_free(long /*int*/ event) { - lock.lock(); - try { - _gdk_event_free(event); - } finally { - lock.unlock(); - } -} -public static final native long /*int*/ _gdk_event_get(); -public static final long /*int*/ gdk_event_get() { - lock.lock(); - try { - return _gdk_event_get(); - } finally { - lock.unlock(); - } -} -/** - * @param event cast=(GdkEvent *) - * @param px cast=(gdouble *) - * @param py cast=(gdouble *) - */ -public static final native boolean _gdk_event_get_coords(long /*int*/ event, double[] px, double[] py); -public static final boolean gdk_event_get_coords(long /*int*/ event, double[] px, double[] py) { - lock.lock(); - try { - return _gdk_event_get_coords(event, px, py); - } finally { - lock.unlock(); - } -} -/** - * @param event cast=(GdkEvent *) - * @param pmod cast=(GdkModifierType *) - */ -public static final native boolean _gdk_event_get_state(long /*int*/ event, int[] pmod); -public static final boolean gdk_event_get_state(long /*int*/ event, int[] pmod) { - lock.lock(); - try { - return _gdk_event_get_state(event, pmod); - } finally { - lock.unlock(); - } -} -/** - * @method flags=dynamic - * @param event cast=(GdkEvent *) - */ -public static final native boolean _gdk_event_get_scroll_deltas(long /*int*/ event, double[] delta_x, double[] delta_y); -public static final boolean gdk_event_get_scroll_deltas(long /*int*/ event, double[] delta_x, double[] delta_y) { - lock.lock(); - try { - return _gdk_event_get_scroll_deltas(event, delta_x, delta_y); - } finally { - lock.unlock(); - } -} - -/** - * @method flags=dynamic - */ -public static final native long /*int*/ _gdk_event_get_seat(long /*int*/ event); -public static final long /*int*/ gdk_event_get_seat(long /*int*/ event) { - lock.lock(); - try { - return _gdk_event_get_seat(event); - } finally { - lock.unlock(); - } -} -/** @param event cast=(GdkEvent *) */ -public static final native int _gdk_event_get_time(long /*int*/ event); -public static final int gdk_event_get_time(long /*int*/ event) { - lock.lock(); - try { - return _gdk_event_get_time(event); - } finally { - lock.unlock(); - } -} -/** - * @method flags=dynamic - * @param event cast=(GdkEvent *) - */ -public static final native int _gdk_event_get_event_type(long /*int*/ event); -/** [GTK3.10+] */ -public static final int gdk_event_get_event_type(long /*int*/ event) { - lock.lock(); - try { - return _gdk_event_get_event_type(event); - } finally { - lock.unlock(); - } -} -/** - * @param func cast=(GdkEventFunc) - * @param data cast=(gpointer) - * @param notify cast=(GDestroyNotify) - */ -public static final native void _gdk_event_handler_set(long /*int*/ func, long /*int*/ data, long /*int*/ notify); -public static final void gdk_event_handler_set(long /*int*/ func, long /*int*/ data, long /*int*/ notify) { - lock.lock(); - try { - _gdk_event_handler_set(func, data, notify); - } finally { - lock.unlock(); - } -} -public static final native long /*int*/ _gdk_event_new(int type); -public static final long /*int*/ gdk_event_new(int type) { - lock.lock(); - try { - return _gdk_event_new(type); - } finally { - lock.unlock(); - } -} -public static final native long /*int*/ _gdk_event_peek(); -public static final long /*int*/ gdk_event_peek() { - lock.lock(); - try { - return _gdk_event_peek(); - } finally { - lock.unlock(); - } -} -/** @param event cast=(GdkEvent *) */ -public static final native void _gdk_event_put(long /*int*/ event); -public static final void gdk_event_put(long /*int*/ event) { - lock.lock(); - try { - _gdk_event_put(event); - } finally { - lock.unlock(); - } -} -public static final native void _gdk_error_trap_push(); -public static final void gdk_error_trap_push() { - lock.lock(); - try { - _gdk_error_trap_push(); - } finally { - lock.unlock(); - } -} -public static final native int _gdk_error_trap_pop(); -public static final int gdk_error_trap_pop() { - lock.lock(); - try { - return _gdk_error_trap_pop(); - } finally { - lock.unlock(); - } -} -public static final native void _gdk_flush(); -public static final void gdk_flush() { - lock.lock(); - try { - _gdk_flush(); - } finally { - lock.unlock(); - } -} -/** @method flags=dynamic */ -public static final native long /*int*/ _gdk_gc_new(long /*int*/ window); -public static final long /*int*/ gdk_gc_new(long /*int*/ window) { - lock.lock(); - try { - return _gdk_gc_new(window); - } finally { - lock.unlock(); - } -} -/** @method flags=dynamic */ -public static final native void _gdk_gc_set_fill(long /*int*/ gc, int fill); -public static final void gdk_gc_set_fill(long /*int*/ gc, int fill) { - lock.lock(); - try { - _gdk_gc_set_fill(gc, fill); - } finally { - lock.unlock(); - } -} -/** - * @method flags=dynamic - * @param color flags=no_out - */ -public static final native void _gdk_gc_set_foreground(long /*int*/ gc, GdkColor color); -public static final void gdk_gc_set_foreground(long /*int*/ gc, GdkColor color) { - lock.lock(); - try { - _gdk_gc_set_foreground(gc, color); - } finally { - lock.unlock(); - } -} -/** - * @method flags=dynamic - */ -public static final native void _gdk_gc_set_function(long /*int*/ gc, long /*int*/ function); -public static final void gdk_gc_set_function(long /*int*/ gc, long /*int*/ function) { - lock.lock(); - try { - _gdk_gc_set_function(gc, function); - } finally { - lock.unlock(); - } -} -/** @method flags=dynamic */ -public static final native void _gdk_gc_set_stipple(long /*int*/ gc, long /*int*/ stipple); -public static final void gdk_gc_set_stipple(long /*int*/ gc, long /*int*/ stipple) { - lock.lock(); - try { - _gdk_gc_set_stipple(gc, stipple); - } finally { - lock.unlock(); - } -} -/** - * @method flags=dynamic - */ -public static final native void _gdk_gc_set_subwindow(long /*int*/ gc, long /*int*/ mode); -public static final void gdk_gc_set_subwindow(long /*int*/ gc, long /*int*/ mode) { - lock.lock(); - try { - _gdk_gc_set_subwindow(gc, mode); - } finally { - lock.unlock(); - } -} -public static final native long /*int*/ _gdk_get_default_root_window(); -public static final long /*int*/ gdk_get_default_root_window() { - lock.lock(); - try { - return _gdk_get_default_root_window(); - } finally { - lock.unlock(); - } -} -/** @method flags=dynamic */ -public static final native void _gdk_keyboard_ungrab(int time); -public static final void gdk_keyboard_ungrab(int time) { - lock.lock(); - try { - _gdk_keyboard_ungrab(time); - } finally { - lock.unlock(); - } -} -public static final native long /*int*/ _gdk_keymap_get_default(); -public static final long /*int*/ gdk_keymap_get_default() { - lock.lock(); - try { - return _gdk_keymap_get_default(); - } finally { - lock.unlock(); - } -} -/** - * @param keymap cast=(GdkKeymap*) - * @param keyval cast=(guint) - * @param keys cast=(GdkKeymapKey**) - * @param n_keys cast=(gint*) - */ -public static final native boolean _gdk_keymap_get_entries_for_keyval (long /*int*/ keymap, long keyval, long /*int*/[] keys, int[] n_keys); -public static final boolean gdk_keymap_get_entries_for_keyval (long /*int*/ keymap, long keyval, long /*int*/[] keys, int[] n_keys) { - lock.lock(); - try { - return _gdk_keymap_get_entries_for_keyval(keymap, keyval, keys, n_keys); - } finally { - lock.unlock(); - } -} -/** - * Can't be auto-generated because of mapping guint to long for keyval - * @method flags=no_gen - */ -public static final native boolean _gdk_keymap_translate_keyboard_state (long /*int*/ keymap, int hardware_keycode, int state, int group, long[] keyval, int[] effective_group, int[] level, int[] consumed_modifiers); -public static final boolean gdk_keymap_translate_keyboard_state (long /*int*/ keymap, int hardware_keycode, int state, int group, long[] keyval, int[] effective_group, int[] level, int[] consumed_modifiers) { - lock.lock(); - try { - return _gdk_keymap_translate_keyboard_state(keymap, hardware_keycode, state, group, keyval, effective_group, level, consumed_modifiers); - } finally { - lock.unlock(); - } -} - -// Cache the JVM pointer so that it's usable in other implementations. -// This is a custom function defined in os_custom.c. See bug 521487. -/** @method flags=no_gen */ -public static final native void _cachejvmptr (); -public static final void cachejvmptr() { - lock.lock(); - try { - _cachejvmptr(); - } finally { - lock.unlock(); - } -} -public static final native long _gdk_keyval_to_lower(long keyval); -public static final long gdk_keyval_to_lower(long keyval) { - lock.lock(); - try { - return _gdk_keyval_to_lower(keyval); - } finally { - lock.unlock(); - } -} -public static final native long _gdk_keyval_to_unicode(long keyval); -public static final long gdk_keyval_to_unicode(long keyval) { - lock.lock(); - try { - return _gdk_keyval_to_unicode(keyval); - } finally { - lock.unlock(); - } -} -public static final native long /*int*/ _gdk_pango_context_get(); -public static final long /*int*/ gdk_pango_context_get() { - lock.lock(); - try { - return _gdk_pango_context_get(); - } finally { - lock.unlock(); - } -} -/** - * @param layout cast=(PangoLayout *) - * @param index_ranges cast=(gint *) - */ -public static final native long /*int*/ _gdk_pango_layout_get_clip_region(long /*int*/ layout, int x_origin, int y_origin, int[] index_ranges, int n_ranges); -public static final long /*int*/ gdk_pango_layout_get_clip_region(long /*int*/ layout, int x_origin, int y_origin, int[] index_ranges, int n_ranges) { - lock.lock(); - try { - return _gdk_pango_layout_get_clip_region(layout, x_origin, y_origin, index_ranges, n_ranges); - } finally { - lock.unlock(); - } -} -/** - * @param src_pixbuf cast=(GdkPixbuf *) - * @param dest_pixbuf cast=(GdkPixbuf *) - */ -public static final native void _gdk_pixbuf_copy_area(long /*int*/ src_pixbuf, int src_x, int src_y, int width, int height, long /*int*/ dest_pixbuf, int dest_x, int dest_y); -public static final void gdk_pixbuf_copy_area(long /*int*/ src_pixbuf, int src_x, int src_y, int width, int height, long /*int*/ dest_pixbuf, int dest_x, int dest_y) { - lock.lock(); - try { - _gdk_pixbuf_copy_area(src_pixbuf, src_x, src_y, width, height, dest_pixbuf, dest_x, dest_y); - } finally { - lock.unlock(); - } -} -/** - * @method flags=dynamic - * @param dest cast=(GdkPixbuf *) - */ -public static final native long /*int*/ _gdk_pixbuf_get_from_drawable(long /*int*/ dest, long /*int*/ src, long /*int*/ cmap, int src_x, int src_y, int dest_x, int dest_y, int width, int height); -public static final long /*int*/ gdk_pixbuf_get_from_drawable(long /*int*/ dest, long /*int*/ src, long /*int*/ cmap, int src_x, int src_y, int dest_x, int dest_y, int width, int height) { - lock.lock(); - try { - return _gdk_pixbuf_get_from_drawable(dest, src, cmap, src_x, src_y, dest_x, dest_y, width, height); - } finally { - lock.unlock(); - } -} -/** - * @method flags=dynamic - * @param window cast=(GdkWindow *) - * @param src_x cast=(gint) - * @param src_y cast=(gint) - * @param width cast=(gint) - * @param height cast=(gint) - */ -public static final native long /*int*/ _gdk_pixbuf_get_from_window(long /*int*/ window, int src_x, int src_y, int width, int height); -public static final long /*int*/ gdk_pixbuf_get_from_window(long /*int*/ window, int src_x, int src_y, int width, int height) { - lock.lock(); - try { - return _gdk_pixbuf_get_from_window(window, src_x, src_y, width, height); - } finally { - lock.unlock(); - } -} -/** @param pixbuf cast=(const GdkPixbuf *) */ -public static final native boolean _gdk_pixbuf_get_has_alpha(long /*int*/ pixbuf); -public static final boolean gdk_pixbuf_get_has_alpha(long /*int*/ pixbuf) { - lock.lock(); - try { - return _gdk_pixbuf_get_has_alpha(pixbuf); - } finally { - lock.unlock(); - } -} -/** @param pixbuf cast=(const GdkPixbuf *) */ -public static final native int _gdk_pixbuf_get_height(long /*int*/ pixbuf); -public static final int gdk_pixbuf_get_height(long /*int*/ pixbuf) { - lock.lock(); - try { - return _gdk_pixbuf_get_height(pixbuf); - } finally { - lock.unlock(); - } -} -/** @param pixbuf cast=(const GdkPixbuf *) */ -public static final native long /*int*/ _gdk_pixbuf_get_pixels(long /*int*/ pixbuf); -public static final long /*int*/ gdk_pixbuf_get_pixels(long /*int*/ pixbuf) { - lock.lock(); - try { - return _gdk_pixbuf_get_pixels(pixbuf); - } finally { - lock.unlock(); - } -} -/** @param pixbuf cast=(const GdkPixbuf *) */ -public static final native int _gdk_pixbuf_get_rowstride(long /*int*/ pixbuf); -public static final int gdk_pixbuf_get_rowstride(long /*int*/ pixbuf) { - lock.lock(); - try { - return _gdk_pixbuf_get_rowstride(pixbuf); - } finally { - lock.unlock(); - } -} -/** @param pixbuf cast=(const GdkPixbuf *) */ -public static final native int _gdk_pixbuf_get_width(long /*int*/ pixbuf); -public static final int gdk_pixbuf_get_width(long /*int*/ pixbuf) { - lock.lock(); - try { - return _gdk_pixbuf_get_width(pixbuf); - } finally { - lock.unlock(); - } -} -public static final native long /*int*/ _gdk_pixbuf_loader_new(); -public static final long /*int*/ gdk_pixbuf_loader_new() { - lock.lock(); - try { - return _gdk_pixbuf_loader_new(); - } finally { - lock.unlock(); - } -} -/** - * @param loader cast=(GdkPixbufLoader *) - * @param error cast=(GError **) - */ -public static final native boolean _gdk_pixbuf_loader_close(long /*int*/ loader, long /*int*/ [] error); -public static final boolean gdk_pixbuf_loader_close(long /*int*/ loader, long /*int*/ [] error) { - lock.lock(); - try { - return _gdk_pixbuf_loader_close(loader, error); - } finally { - lock.unlock(); - } -} -/** @param loader cast=(GdkPixbufLoader *) */ -public static final native long /*int*/ _gdk_pixbuf_loader_get_pixbuf(long /*int*/ loader); -public static final long /*int*/ gdk_pixbuf_loader_get_pixbuf(long /*int*/ loader) { - lock.lock(); - try { - return _gdk_pixbuf_loader_get_pixbuf(loader); - } finally { - lock.unlock(); - } -} -/** - * @param loader cast=(GdkPixbufLoader *) - * @param buffer cast=(const guchar *) - * @param count cast=(gsize) - * @param error cast=(GError **) - */ -public static final native boolean _gdk_pixbuf_loader_write(long /*int*/ loader, long /*int*/ buffer, int count, long /*int*/ [] error); -public static final boolean gdk_pixbuf_loader_write(long /*int*/ loader, long /*int*/ buffer, int count, long /*int*/ [] error) { - lock.lock(); - try { - return _gdk_pixbuf_loader_write(loader, buffer, count, error); - } finally { - lock.unlock(); - } -} -/** - * @param colorspace cast=(GdkColorspace) - * @param has_alpha cast=(gboolean) - */ -public static final native long /*int*/ _gdk_pixbuf_new(int colorspace, boolean has_alpha, int bits_per_sample, int width, int height); -public static final long /*int*/ gdk_pixbuf_new(int colorspace, boolean has_alpha, int bits_per_sample, int width, int height) { - lock.lock(); - try { - return _gdk_pixbuf_new(colorspace, has_alpha, bits_per_sample, width, height); - } finally { - lock.unlock(); - } -} -/** - * @param filename cast=(const char *) - * @param error cast=(GError**) - */ -public static final native long /*int*/ _gdk_pixbuf_new_from_file(byte[] filename, long /*int*/ [] error); -public static final long /*int*/ gdk_pixbuf_new_from_file(byte[] filename, long /*int*/ [] error) { - lock.lock(); - try { - return _gdk_pixbuf_new_from_file(filename, error); - } finally { - lock.unlock(); - } -} -/** - * @method flags=dynamic - * @param pixbuf cast=(GdkPixbuf *) - * @param buffer cast=(gchar **) - * @param buffer_size cast=(gsize *) - * @param type cast=(const char *) - * @param option_keys cast=(char **) - * @param option_values cast=(char **) - * @param error cast=(GError **) - */ -public static final native boolean _gdk_pixbuf_save_to_bufferv(long /*int*/ pixbuf, long /*int*/ [] buffer, long /*int*/ [] buffer_size, byte [] type, long /*int*/ [] option_keys, long /*int*/ [] option_values, long /*int*/ [] error); -public static final boolean gdk_pixbuf_save_to_bufferv(long /*int*/ pixbuf, long /*int*/ [] buffer, long /*int*/ [] buffer_size, byte [] type, long /*int*/ [] option_keys, long /*int*/ [] option_values, long /*int*/ [] error) { - lock.lock(); - try { - return _gdk_pixbuf_save_to_bufferv(pixbuf, buffer, buffer_size, type, option_keys, option_values, error); - } finally { - lock.unlock(); - } -} -/** - * @param src cast=(const GdkPixbuf *) - * @param interp_type cast=(GdkInterpType) - */ -public static final native long /*int*/ _gdk_pixbuf_scale_simple(long /*int*/ src, int dest_width, int dest_height, int interp_type); -public static final long /*int*/ gdk_pixbuf_scale_simple(long /*int*/ src, int dest_width, int dest_height, int interp_type) { - lock.lock(); - try { - return _gdk_pixbuf_scale_simple(src, dest_width, dest_height, interp_type); - } finally { - lock.unlock(); - } -} -/** - * @method flags=dynamic - * @param window cast=(GdkWindow *) - * @param width cast=(gint) - * @param height cast=(gint) - * @param depth cast=(gint) - */ -public static final native long /*int*/ _gdk_pixmap_new(long /*int*/ window, int width, int height, int depth); -public static final long /*int*/ gdk_pixmap_new(long /*int*/ window, int width, int height, int depth) { - lock.lock(); - try { - return _gdk_pixmap_new(window, width, height, depth); - } finally { - lock.unlock(); - } -} -/** - * @method flags=dynamic - * @param window cast=(GdkWindow *) - * @param owner_events cast=(gboolean) - * @param event_mask cast=(GdkEventMask) - * @param confine_to cast=(GdkWindow *) - * @param cursor cast=(GdkCursor *) - * @param time cast=(guint32) - */ -public static final native int _gdk_pointer_grab(long /*int*/ window, boolean owner_events, int event_mask, long /*int*/ confine_to, long /*int*/ cursor, int time); -public static final int gdk_pointer_grab(long /*int*/ window, boolean owner_events, int event_mask, long /*int*/ confine_to, long /*int*/ cursor, int time) { - lock.lock(); - try { - return _gdk_pointer_grab(window, owner_events, event_mask, confine_to, cursor, time); - } finally { - lock.unlock(); - } -} -/** - * @method flags=dynamic - * @param device cast=(GdkDevice *) - * @param window cast=(GdkWindow *) - * @param owner_events cast=(gboolean) - * @param event_mask cast=(GdkEventMask) - * @param cursor cast=(GdkCursor *) - * @param time_ cast=(guint32) - */ -public static final native int _gdk_device_grab(long /*int*/ device, long /*int*/ window, int grab_ownership, boolean owner_events, int event_mask, long /*int*/ cursor, int time_); -public static final int gdk_device_grab(long /*int*/ device, long /*int*/ window, int grab_ownership, boolean owner_events, int event_mask, long /*int*/ cursor, int time_) { - lock.lock(); - try { - return _gdk_device_grab(device, window, grab_ownership, owner_events, event_mask, cursor,time_); - } finally { - lock.unlock(); - } -} -/** - * @method flags=dynamic - * @param time cast=(guint32) - */ -public static final native void _gdk_pointer_ungrab(int time); -public static final void gdk_pointer_ungrab(int time) { - lock.lock(); - try { - _gdk_pointer_ungrab(time); - } finally { - lock.unlock(); - } -} -/** - * @method flags=dynamic - * @param device cast=(GdkDevice *) - * @param time_ cast=(guint32) - */ -public static final native void _gdk_device_ungrab(long /*int*/ device, int time_); -public static final void gdk_device_ungrab(long /*int*/ device, int time_) { - lock.lock(); - try { - _gdk_device_ungrab(device, time_); - } finally { - lock.unlock(); - } -} -/** - * @method flags=dynamic - * @param device cast=(GdkDevice *) - */ -public static final native long /*int*/ _gdk_device_get_associated_device(long /*int*/ device); -public static final long /*int*/ gdk_device_get_associated_device(long /*int*/ device) { - lock.lock(); - try { - return _gdk_device_get_associated_device(device); - } finally { - lock.unlock(); - } -} -/** - * @param window cast=(GdkWindow *) - * @param property cast=(GdkAtom) - * @param type cast=(GdkAtom) - * @param actual_property_type cast=(GdkAtom *) - * @param actual_format cast=(gint *) - * @param actual_length cast=(gint *) - * @param data cast=(guchar **) - */ -public static final native boolean _gdk_property_get(long /*int*/ window, long /*int*/ property, long /*int*/ type, long /*int*/ offset, long /*int*/ length, int pdelete, long /*int*/[] actual_property_type, int[] actual_format, int[] actual_length, long /*int*/[] data); -public static final boolean gdk_property_get(long /*int*/ window, long /*int*/ property, long /*int*/ type, long /*int*/ offset, long /*int*/ length, int pdelete, long /*int*/[] actual_property_type, int[] actual_format, int[] actual_length, long /*int*/[] data) { - lock.lock(); - try { - return _gdk_property_get(window, property, type, offset, length, pdelete, actual_property_type, actual_format, actual_length, data); - } finally { - lock.unlock(); - } -} -/** @param region cast=(GdkRegion *) */ -public static final native void _gdk_region_destroy(long /*int*/ region); -public static final void gdk_region_destroy(long /*int*/ region) { - lock.lock(); - try { - _gdk_region_destroy(region); - } finally { - lock.unlock(); - } -} -/** @param region cast=(GdkRegion *) */ -public static final native boolean _gdk_region_empty(long /*int*/ region); -public static final boolean gdk_region_empty(long /*int*/ region) { - lock.lock(); - try { - return _gdk_region_empty(region); - } finally { - lock.unlock(); - } -} -/** - * @param region cast=(GdkRegion *) - * @param rectangle cast=(GdkRectangle *),flags=no_in - */ -public static final native void _gdk_region_get_clipbox(long /*int*/ region, GdkRectangle rectangle); -public static final void gdk_region_get_clipbox(long /*int*/ region, GdkRectangle rectangle) { - lock.lock(); - try { - _gdk_region_get_clipbox(region, rectangle); - } finally { - lock.unlock(); - } -} -/** - * @method flags=dynamic - * @param n_rectangles cast=(gint *) - */ -public static final native void _gdk_region_get_rectangles(long /*int*/ region, long /*int*/[] rectangles, int[] n_rectangles); -public static final void gdk_region_get_rectangles(long /*int*/ region, long /*int*/[] rectangles, int[] n_rectangles) { - lock.lock(); - try { - _gdk_region_get_rectangles(region, rectangles, n_rectangles); - } finally { - lock.unlock(); - } -} -/** - * @param source1 cast=(GdkRegion *) - * @param source2 cast=(GdkRegion *) - */ -public static final native void _gdk_region_intersect(long /*int*/ source1, long /*int*/ source2); -public static final void gdk_region_intersect(long /*int*/ source1, long /*int*/ source2) { - lock.lock(); - try { - _gdk_region_intersect(source1, source2); - } finally { - lock.unlock(); - } -} -/** @method flags=dynamic */ -public static final native long /*int*/ _gdk_cairo_region_create_from_surface(long /*int*/ surface); -public static final long /*int*/ gdk_cairo_region_create_from_surface(long /*int*/ surface) { - lock.lock(); - try { - return _gdk_cairo_region_create_from_surface(surface); - } finally { - lock.unlock(); - } -} -public static final native long /*int*/ _gdk_region_new(); -public static final long /*int*/ gdk_region_new() { - lock.lock(); - try { - return _gdk_region_new(); - } finally { - lock.unlock(); - } -} -/** - * @param region cast=(GdkRegion *) - * @param dx cast=(gint) - * @param dy cast=(gint) - */ -public static final native void _gdk_region_offset(long /*int*/ region, int dx, int dy); -public static final void gdk_region_offset(long /*int*/ region, int dx, int dy) { - lock.lock(); - try { - _gdk_region_offset(region, dx, dy); - } finally { - lock.unlock(); - } -} -/** - * @param region cast=(GdkRegion *) - * @param x cast=(gint) - * @param y cast=(gint) - */ -public static final native boolean _gdk_region_point_in(long /*int*/ region, int x, int y); -public static final boolean gdk_region_point_in(long /*int*/ region, int x, int y) { - lock.lock(); - try { - return _gdk_region_point_in(region, x, y); - } finally { - lock.unlock(); - } -} -/** @method flags=dynamic */ -public static final native long /*int*/ _gdk_region_polygon(int[] points, int npoints, int fill_rule); -public static final long /*int*/ gdk_region_polygon(int[] points, int npoints, int fill_rule) { - lock.lock(); - try { - return _gdk_region_polygon(points, npoints, fill_rule); - } finally { - lock.unlock(); - } -} -/** - * @param rectangle flags=no_out - */ -public static final native long /*int*/ _gdk_region_rectangle(GdkRectangle rectangle); -public static final long /*int*/ gdk_region_rectangle(GdkRectangle rectangle) { - lock.lock(); - try { - return _gdk_region_rectangle(rectangle); - } finally { - lock.unlock(); - } -} -/** - * @param region cast=(GdkRegion *) - * @param rect cast=(GdkRectangle *),flags=no_out - */ -public static final native long /*int*/ _gdk_region_rect_in(long /*int*/ region, GdkRectangle rect); -public static final long /*int*/ gdk_region_rect_in(long /*int*/ region, GdkRectangle rect) { - lock.lock(); - try { - return _gdk_region_rect_in(region, rect); - } finally { - lock.unlock(); - } -} -/** - * @param source1 cast=(GdkRegion *) - * @param source2 cast=(GdkRegion *) - */ -public static final native void _gdk_region_subtract(long /*int*/ source1, long /*int*/ source2); -public static final void gdk_region_subtract(long /*int*/ source1, long /*int*/ source2) { - lock.lock(); - try { - _gdk_region_subtract(source1, source2); - } finally { - lock.unlock(); - } -} -/** - * @param source1 cast=(GdkRegion *) - * @param source2 cast=(GdkRegion *) - */ -public static final native void _gdk_region_union(long /*int*/ source1, long /*int*/ source2); -public static final void gdk_region_union(long /*int*/ source1, long /*int*/ source2) { - lock.lock(); - try { - _gdk_region_union(source1, source2); - } finally { - lock.unlock(); - } -} -/** - * @param region cast=(GdkRegion *) - * @param rect cast=(GdkRectangle *),flags=no_out - */ -public static final native void _gdk_region_union_with_rect(long /*int*/ region, GdkRectangle rect); -public static final void gdk_region_union_with_rect(long /*int*/ region, GdkRectangle rect) { - lock.lock(); - try { - _gdk_region_union_with_rect(region, rect); - } finally { - lock.unlock(); - } -} -/** - * @method flags=dynamic - * @param rgba cast=(GdkRGBA *) - */ -public static final native long /*int*/ _gdk_rgba_to_string(GdkRGBA rgba); -public static final long /*int*/ gdk_rgba_to_string(GdkRGBA rgba) { - lock.lock(); - assert GTK.GTK3 : "GTK3 code was run by GTK2"; - try { - return _gdk_rgba_to_string(rgba); - } finally { - lock.unlock(); - } -} -/** - * @method flags=dynamic - * @param rgba cast=(GdkRGBA *) - */ -public static final native void _gdk_rgba_free(long /*int*/ rgba); -public static final void gdk_rgba_free(long /*int*/ rgba) { - lock.lock(); - assert GTK.GTK3 : "GTK3 code was run by GTK2"; - try { - _gdk_rgba_free(rgba); - } finally { - lock.unlock(); - } -} -/** - * @method flags=dynamic - * @param rgba cast=(GdkRGBA *) - */ -public static final native int _gdk_rgba_hash(GdkRGBA rgba); -public static final int gdk_rgba_hash(GdkRGBA rgba) { - lock.lock(); - assert GTK.GTK3 : "GTK3 code was run by GTK2"; - try { - return _gdk_rgba_hash(rgba); - } finally { - lock.unlock(); - } -} -/** - * @method flags=dynamic - * @param rgba cast=(GdkRGBA *) - * @param property cast=(const gchar *) - */ -public static final native long /*int*/ _gdk_rgba_parse(GdkRGBA rgba, byte[] property); -public static final long /*int*/ gdk_rgba_parse(GdkRGBA rgba, byte[] property) { - lock.lock(); - assert GTK.GTK3 : "GTK3 code was run by GTK2"; - try { - return _gdk_rgba_parse(rgba, property); - } finally { - lock.unlock(); - } -} -/** @method flags=dynamic */ -public static final native long /*int*/ _gdk_screen_get_default(); -public static final long /*int*/ gdk_screen_get_default() { - lock.lock(); - try { - return _gdk_screen_get_default(); - } finally { - lock.unlock(); - } -} -/** @param screen cast=(GdkScreen *) */ -public static final native long /*int*/ _gdk_screen_get_active_window(long /*int*/ screen); -public static final long /*int*/ gdk_screen_get_active_window(long /*int*/ screen) { - lock.lock(); - try { - return _gdk_screen_get_active_window(screen); - } finally { - lock.unlock(); - } -} -/** - * @method flags=dynamic - * @param screen cast=(GdkScreen *) - */ -public static final native double _gdk_screen_get_resolution(long /*int*/ screen); -public static final double gdk_screen_get_resolution(long /*int*/ screen) { - lock.lock(); - try { - return _gdk_screen_get_resolution(screen); - } finally { - lock.unlock(); - } -} -/** - * @method flags=dynamic - * @param screen cast=(GdkScreen *) - * @param monitor_num cast=(gint) - */ -public static final native int _gdk_screen_get_monitor_scale_factor(long /*int*/ screen, int monitor_num); -public static final int gdk_screen_get_monitor_scale_factor(long /*int*/ screen, int monitor_num) { - lock.lock(); - try { - return _gdk_screen_get_monitor_scale_factor(screen, monitor_num); - } finally { - lock.unlock(); - } -} -/** - * @method flags=dynamic - * @param screen cast=(GdkScreen *) - * @param x cast=(gint) - * @param y cast=(gint) - */ -public static final native int _gdk_screen_get_monitor_at_point (long /*int*/ screen, int x, int y); -public static final int gdk_screen_get_monitor_at_point (long /*int*/ screen, int x, int y) { - lock.lock(); - try { - return _gdk_screen_get_monitor_at_point (screen, x, y); - } finally { - lock.unlock(); - } -} -/** - * @method flags=dynamic - * @param screen cast=(GdkScreen *) - * @param window cast=(GdkWindow *) - */ -public static final native int _gdk_screen_get_monitor_at_window(long /*int*/ screen, long /*int*/ window); -public static final int gdk_screen_get_monitor_at_window(long /*int*/ screen, long /*int*/ window) { - lock.lock(); - try { - return _gdk_screen_get_monitor_at_window(screen, window); - } finally { - lock.unlock(); - } -} -/** - * @method flags=dynamic - * @param screen cast=(GdkScreen *) - * @param dest flags=no_in - */ -public static final native void _gdk_screen_get_monitor_geometry (long /*int*/ screen, int monitor_num, GdkRectangle dest); -public static final void gdk_screen_get_monitor_geometry (long /*int*/ screen, int monitor_num, GdkRectangle dest) { - lock.lock(); - try { - _gdk_screen_get_monitor_geometry(screen, monitor_num, dest); - } finally { - lock.unlock(); - } -} - -/** - * @method flags=dynamic - * @param screen cast=(GdkScreen *) - * @param dest flags=no_in - */ -public static final native void _gdk_screen_get_monitor_workarea (long /*int*/ screen, int monitor_num, GdkRectangle dest); -public static final void gdk_screen_get_monitor_workarea (long /*int*/ screen, int monitor_num, GdkRectangle dest) { - lock.lock(); - try { - _gdk_screen_get_monitor_workarea(screen, monitor_num, dest); - } finally { - lock.unlock(); - } -} - -/** - * @method flags=dynamic - * @param screen cast=(GdkScreen *) - */ -public static final native int _gdk_screen_get_n_monitors(long /*int*/ screen); -public static final int gdk_screen_get_n_monitors(long /*int*/ screen) { - lock.lock(); - try { - return _gdk_screen_get_n_monitors(screen); - } finally { - lock.unlock(); - } -} - -/** - * @method flags=dynamic - * @param screen cast=(GdkScreen *) - */ -public static final native int _gdk_screen_get_primary_monitor(long /*int*/ screen); -public static final int gdk_screen_get_primary_monitor(long /*int*/ screen) { - lock.lock(); - try { - return _gdk_screen_get_primary_monitor(screen); - } finally { - lock.unlock(); - } -} - - -public static final native int _gdk_screen_height(); -public static final int gdk_screen_height() { - lock.lock(); - try { - return _gdk_screen_height(); - } finally { - lock.unlock(); - } -} -public static final native int _gdk_screen_width(); -public static final int gdk_screen_width() { - lock.lock(); - try { - return _gdk_screen_width(); - } finally { - lock.unlock(); - } -} -public static final native int _gdk_screen_width_mm(); -public static final int gdk_screen_width_mm() { - lock.lock(); - try { - return _gdk_screen_width_mm(); - } finally { - lock.unlock(); - } -} - -/** - * @method flags=dynamic - * @param screen cast=(GdkScreen *) - */ -public static final native int _gdk_screen_get_monitor_width_mm(long /*int*/ screen, int monitor_num); -public static final int gdk_screen_get_monitor_width_mm(long /*int*/ screen, int monitor_num) { - lock.lock(); - try { - return _gdk_screen_get_monitor_width_mm(screen, monitor_num); - } finally { - lock.unlock(); - } -} -/** - * @method flags=dynamic - */ -public static final native int _gdk_seat_grab(long /*int*/ seat, long /*int*/ window, int capabilities, boolean owner_events, long /*int*/ cursor, long /*int*/ event, long /*int*/ func, long /*int*/ func_data); -public static final int gdk_seat_grab(long /*int*/ seat, long /*int*/ window, int capabilities, boolean owner_events, long /*int*/ cursor, long /*int*/ event, long /*int*/ func, long /*int*/ func_data) { - lock.lock(); - try { - return _gdk_seat_grab(seat, window, capabilities, owner_events, cursor, event, func, func_data); - } finally { - lock.unlock(); - } -} -/** - * @method flags=dynamic - */ -public static final native void _gdk_seat_ungrab(long /*int*/ seat); -public static final void gdk_seat_ungrab(long /*int*/ seat) { - lock.lock(); - try { - _gdk_seat_ungrab(seat); - } finally { - lock.unlock(); - } -} -/** - * @method flags=dynamic - */ -public static final native long /*int*/ _gdk_seat_get_pointer(long /*int*/ seat); -public static final long /*int*/ gdk_seat_get_pointer(long /*int*/ seat) { - lock.lock(); - try { - return _gdk_seat_get_pointer(seat); - } finally { - lock.unlock(); - } -} -/** @param program_class cast=(const char *) */ -public static final native void _gdk_set_program_class(byte[] program_class); -public static final void gdk_set_program_class(byte[] program_class) { - lock.lock(); - try { - _gdk_set_program_class(program_class); - } finally { - lock.unlock(); - } -} -/** @param atom cast=(GdkAtom) */ -public static final native void _gdk_selection_owner_get(long /*int*/ atom); -public static final void gdk_selection_owner_get(long /*int*/ atom) { - lock.lock(); - try { - _gdk_selection_owner_get(atom); - } finally { - lock.unlock(); - } -} -/** - * @param owner cast=(GdkWindow *) - * @param atom cast=(GdkAtom) - * @param time cast=(guint32) - * @param send_event cast=(gboolean) - */ -public static final native void _gdk_selection_owner_set(long /*int*/ owner, long /*int*/ atom, int time, boolean send_event); -public static final void gdk_selection_owner_set(long /*int*/ owner, long /*int*/ atom, int time, boolean send_event) { - lock.lock(); - try { - _gdk_selection_owner_set(owner, atom, time, send_event); - } finally { - lock.unlock(); - } -} -/** - * @param display cast=(GdkDisplay *) - * @method flags=dynamic - */ -public static final native boolean _gdk_x11_display_utf8_to_compound_text(long /*int*/ display, byte[] str, long /*int*/[] encoding, int[] format, long /*int*/[] ctext, int[] length); -public static final boolean gdk_x11_display_utf8_to_compound_text(long /*int*/ display, byte[] str, long /*int*/[] encoding, int[] format, long /*int*/[] ctext, int[] length) { - lock.lock(); - try { - return _gdk_x11_display_utf8_to_compound_text(display, str, encoding, format, ctext, length); - } finally { - lock.unlock(); - } -} -/** @param str cast=(const gchar *) */ -public static final native long /*int*/ _gdk_utf8_to_string_target(byte[] str); -public static final long /*int*/ gdk_utf8_to_string_target(byte[] str) { - lock.lock(); - try { - return _gdk_utf8_to_string_target(str); - } finally { - lock.unlock(); - } -} -/** - * @param window cast=(GdkWindow *) - * @param x cast=(gint) - * @param y cast=(gint) - * @param button cast=(guint) - * @param modifiers cast=(GdkModifierType) - * @param button_pressrelease cast=(GdkEventType) - */ -public static final native boolean _gdk_test_simulate_button(long /*int*/ window, int x, int y, int button, - int modifiers, int button_pressrelease); -public static final boolean gdk_test_simulate_button(long /*int*/ window, int x, int y, int button, int modifiers, - int button_pressrelease) { - lock.lock(); - try { - return _gdk_test_simulate_button(window, x, y, button, modifiers, button_pressrelease); - } finally { - lock.unlock(); - } -} -/** - * @param display cast=(GdkDisplay *) - * @param encoding cast=(GdkAtom) - * @param text cast=(guchar *) - * @param list cast=(gchar ***) - */ -public static final native int _gdk_text_property_to_utf8_list_for_display (long /*int*/ display, long /*int*/ encoding, int format, long /*int*/ text, int length, long /*int*/[] list); -public static final int gdk_text_property_to_utf8_list_for_display (long /*int*/ display, long /*int*/ encoding, int format, long /*int*/ text, int length, long /*int*/[] list) { - lock.lock(); - try { - return _gdk_text_property_to_utf8_list_for_display(display, encoding, format, text, length, list); - } finally { - lock.unlock(); - } -} -public static final native void gdk_threads_leave (); - -public static final native int _gdk_unicode_to_keyval(int wc); -public static final int gdk_unicode_to_keyval(int wc) { - lock.lock(); - try { - return _gdk_unicode_to_keyval(wc); - } finally { - lock.unlock(); - } -} -/** - * @method flags=dynamic - * @param visual cast=(GdkVisual *) - */ -public static final native int _gdk_visual_get_depth(long /*int*/ visual); -public static final int gdk_visual_get_depth(long /*int*/ visual) { - lock.lock(); - try { - return _gdk_visual_get_depth(visual); - } finally { - lock.unlock(); - } -} -public static final native long /*int*/ _gdk_visual_get_system(); -public static final long /*int*/ gdk_visual_get_system() { - lock.lock(); - try { - return _gdk_visual_get_system(); - } finally { - lock.unlock(); - } -} -/** - * @method flags=dynamic - * @param win_x cast=(gint *) - * @param win_y cast=(gint *) - */ -public static final native long /*int*/ _gdk_window_at_pointer(int[] win_x, int[] win_y); -public static final long /*int*/ gdk_window_at_pointer(int[] win_x, int[] win_y) { - lock.lock(); - try { - return _gdk_window_at_pointer(win_x, win_y); - } finally { - lock.unlock(); - } -} -/** - * @param window cast=(GdkWindow *) - * @param rectangle cast=(GdkRectangle *),flags=no_out - */ -public static final native void _gdk_window_begin_paint_rect(long /*int*/ window, GdkRectangle rectangle); -public static final void gdk_window_begin_paint_rect(long /*int*/ window, GdkRectangle rectangle) { - lock.lock(); - try { - _gdk_window_begin_paint_rect(window, rectangle); - } finally { - lock.unlock(); - } -} -/** - * @method flags=dynamic - * @param window cast=(GdkWindow *) - */ -public static final native long /*int*/ _gdk_window_create_similar_surface(long /*int*/ window, int content, int width, int height); -public static final long /*int*/ gdk_window_create_similar_surface(long /*int*/ window, int content, int width, int height) { - lock.lock(); - try { - return _gdk_window_create_similar_surface(window, content, width, height); - } finally { - lock.unlock(); - } -} -/** @param window cast=(GdkWindow *) */ -public static final native void _gdk_window_destroy(long /*int*/ window); -public static final void gdk_window_destroy(long /*int*/ window) { - lock.lock(); - try { - _gdk_window_destroy(window); - } finally { - lock.unlock(); - } -} -/** @param window cast=(GdkWindow *) */ -public static final native void _gdk_window_end_paint(long /*int*/ window); -public static final void gdk_window_end_paint(long /*int*/ window) { - lock.lock(); - try { - _gdk_window_end_paint(window); - } finally { - lock.unlock(); - } -} -/** @param window cast=(GdkWindow *) */ -public static final native long /*int*/ _gdk_window_get_children(long /*int*/ window); -public static final long /*int*/ gdk_window_get_children(long /*int*/ window) { - lock.lock(); - try { - return _gdk_window_get_children(window); - } finally { - lock.unlock(); - } -} -/** @param window cast=(GdkWindow *) */ -public static final native int _gdk_window_get_events(long /*int*/ window); -public static final int gdk_window_get_events(long /*int*/ window) { - lock.lock(); - try { - return _gdk_window_get_events(window); - } finally { - lock.unlock(); - } -} -/** @param window cast=(GdkWindow *) */ -public static final native void _gdk_window_focus(long /*int*/ window, int timestamp); -public static final void gdk_window_focus(long /*int*/ window, int timestamp) { - lock.lock(); - try { - _gdk_window_focus(window, timestamp); - } finally { - lock.unlock(); - } -} -/** - * @param window cast=(GdkWindow *) - * @param rect cast=(GdkRectangle *),flags=no_in - */ -public static final native void _gdk_window_get_frame_extents(long /*int*/ window, GdkRectangle rect); -public static final void gdk_window_get_frame_extents(long /*int*/ window, GdkRectangle rect) { - lock.lock(); - try { - _gdk_window_get_frame_extents(window, rect); - } finally { - lock.unlock(); - } -} -/** - * @method flags=dynamic - * @param window cast=(GdkWindow *) - * @param x_offset cast=(gint *) - * @param y_offset cast=(gint *) - */ -public static final native void _gdk_window_get_internal_paint_info(long /*int*/ window, long /*int*/ [] real_drawable, int[] x_offset, int[] y_offset); -public static final void gdk_window_get_internal_paint_info(long /*int*/ window, long /*int*/ [] real_drawable, int[] x_offset, int[] y_offset) { - lock.lock(); - try { - _gdk_window_get_internal_paint_info(window, real_drawable, x_offset, y_offset); - } finally { - lock.unlock(); - } -} -/** - * @param window cast=(GdkWindow *) - * @param x cast=(gint *) - * @param y cast=(gint *) - */ -public static final native int _gdk_window_get_origin(long /*int*/ window, int[] x, int[] y); -public static final int gdk_window_get_origin(long /*int*/ window, int[] x, int[] y) { - lock.lock(); - try { - return _gdk_window_get_origin(window, x, y); - } finally { - lock.unlock(); - } -} -/** - * @method flags=dynamic - * @param window cast=(GdkWindow *) - * @param device cast=(GdkDevice *) - * @param x cast=(gint *) - * @param y cast=(gint *) - * @param mask cast=(GdkModifierType *) - */ -public static final native long /*int*/ _gdk_window_get_device_position(long /*int*/ window, long /*int*/ device, int[] x, int[] y, int[] mask); -public static final long /*int*/ gdk_window_get_device_position(long /*int*/ window, long /*int*/ device, int[] x, int[] y, int[] mask) { - lock.lock(); - try { - return _gdk_window_get_device_position(window, device, x, y, mask); - } finally { - lock.unlock(); - } -} -/** @param window cast=(GdkWindow *) */ -public static final native long /*int*/ _gdk_window_get_parent(long /*int*/ window); -public static final long /*int*/ gdk_window_get_parent(long /*int*/ window) { - lock.lock(); - try { - return _gdk_window_get_parent(window); - } finally { - lock.unlock(); - } -} -/** - * @method flags=dynamic - * @param window cast=(GdkWindow *) - * @param x cast=(gint *) - * @param y cast=(gint *) - * @param mask cast=(GdkModifierType *) - */ -public static final native long /*int*/ _gdk_window_get_pointer(long /*int*/ window, int[] x, int[] y, int[] mask); -public static final long /*int*/ gdk_window_get_pointer(long /*int*/ window, int[] x, int[] y, int[] mask) { - lock.lock(); - try { - return _gdk_window_get_pointer(window, x, y, mask); - } finally { - lock.unlock(); - } -} -/** - * @param window cast=(GdkWindow *) - * @param x cast=(gint *) - * @param y cast=(gint *) - */ -public static final native void _gdk_window_get_position(long /*int*/ window, int[] x, int[] y); -public static final void gdk_window_get_position(long /*int*/ window, int[] x, int[] y) { - lock.lock(); - try { - _gdk_window_get_position(window, x, y); - } finally { - lock.unlock(); - } -} -/** - * @param window cast=(GdkWindow *) - * @param x cast=(gint *) - * @param y cast=(gint *) - */ -public static final native void _gdk_window_get_root_origin(long /*int*/ window, int[] x, int[] y); -public static final void gdk_window_get_root_origin(long /*int*/ window, int[] x, int[] y) { - lock.lock(); - try { - _gdk_window_get_root_origin(window, x, y); - } finally { - lock.unlock(); - } -} -/** - * @param window cast=(GdkWindow *) - * @param data cast=(gpointer *) - */ -public static final native void _gdk_window_get_user_data(long /*int*/ window, long /*int*/[] data); -public static final void gdk_window_get_user_data(long /*int*/ window, long /*int*/[] data) { - lock.lock(); - try { - _gdk_window_get_user_data(window, data); - } finally { - lock.unlock(); - } -} -/** @param window cast=(GdkWindow *) */ -public static final native void _gdk_window_hide(long /*int*/ window); -public static final void gdk_window_hide(long /*int*/ window) { - lock.lock(); - try { - _gdk_window_hide(window); - } finally { - lock.unlock(); - } -} -/** - * @param window cast=(GdkWindow *) - * @param rectangle cast=(GdkRectangle *),flags=no_out - * @param invalidate_children cast=(gboolean) - */ -public static final native void _gdk_window_invalidate_rect(long /*int*/ window, GdkRectangle rectangle, boolean invalidate_children); -public static final void gdk_window_invalidate_rect(long /*int*/ window, GdkRectangle rectangle, boolean invalidate_children) { - lock.lock(); - try { - _gdk_window_invalidate_rect(window, rectangle, invalidate_children); - } finally { - lock.unlock(); - } -} -/** - * @method flags=dynamic - * @param window cast=(GdkWindow *) - * @param invalidate_children cast=(gboolean) - */ -public static final native void _gdk_window_invalidate_region(long /*int*/ window, long /*int*/ region, boolean invalidate_children); -public static final void gdk_window_invalidate_region(long /*int*/ window, long /*int*/ region, boolean invalidate_children) { - lock.lock(); - try { - _gdk_window_invalidate_region(window, region, invalidate_children); - } finally { - lock.unlock(); - } -} -/** @param window cast=(GdkWindow *) */ -public static final native boolean _gdk_window_is_visible(long /*int*/ window); -public static final boolean gdk_window_is_visible(long /*int*/ window) { - lock.lock(); - try { - return _gdk_window_is_visible(window); - } finally { - lock.unlock(); - } -} -/** @param window cast=(GdkWindow *) */ -public static final native void _gdk_window_move(long /*int*/ window, int x, int y); -public static final void gdk_window_move(long /*int*/ window, int x, int y) { - lock.lock(); - try { - _gdk_window_move(window, x, y); - } finally { - lock.unlock(); - } -} -/** @param window cast=(GdkWindow *) */ -public static final native void _gdk_window_move_resize(long /*int*/ window, int x, int y, int width, int height); -public static final void gdk_window_move_resize(long /*int*/ window, int x, int y, int width, int height) { - lock.lock(); - try { - _gdk_window_move_resize(window, x, y, width, height); - } finally { - lock.unlock(); - } -} -/** - * @param parent cast=(GdkWindow *) - * @param attributes flags=no_out - */ -public static final native long /*int*/ _gdk_window_new(long /*int*/ parent, GdkWindowAttr attributes, int attributes_mask); -public static final long /*int*/ gdk_window_new(long /*int*/ parent, GdkWindowAttr attributes, int attributes_mask) { - lock.lock(); - try { - return _gdk_window_new(parent, attributes, attributes_mask); - } finally { - lock.unlock(); - } -} -/** @param window cast=(GdkWindow *) */ -public static final native void _gdk_window_lower(long /*int*/ window); -public static final void gdk_window_lower(long /*int*/ window) { - lock.lock(); - try { - _gdk_window_lower(window); - } finally { - lock.unlock(); - } -} -/** - * @method flags=dynamic - */ -public static final native void _gdk_window_process_all_updates(); -public static final void gdk_window_process_all_updates() { - lock.lock(); - try { - _gdk_window_process_all_updates(); - } finally { - lock.unlock(); - } -} -/** - * @method flags=dynamic - * @param window cast=(GdkWindow *) - * @param update_children cast=(gboolean) - */ -public static final native void _gdk_window_process_updates(long /*int*/ window, boolean update_children); -public static final void gdk_window_process_updates(long /*int*/ window, boolean update_children) { - lock.lock(); - try { - _gdk_window_process_updates(window, update_children); - } finally { - lock.unlock(); - } -} -/** @param window cast=(GdkWindow *) */ -public static final native void _gdk_window_raise(long /*int*/ window); -public static final void gdk_window_raise(long /*int*/ window) { - lock.lock(); - try { - _gdk_window_raise(window); - } finally { - lock.unlock(); - } -} -/** @param window cast=(GdkWindow *) */ -public static final native void _gdk_window_resize(long /*int*/ window, int width, int height); -public static final void gdk_window_resize(long /*int*/ window, int width, int height) { - lock.lock(); - try { - _gdk_window_resize(window, width, height); - } finally { - lock.unlock(); - } -} -/** - * @method flags=dynamic - * @param window cast=(GdkWindow *) - * @param sibling cast=(GdkWindow *) - * @param above cast=(gboolean) - */ -public static final native void _gdk_window_restack(long /*int*/ window, long /*int*/ sibling, boolean above); -public static final void gdk_window_restack(long /*int*/ window, long /*int*/ sibling, boolean above) { - lock.lock(); - try { - _gdk_window_restack(window, sibling, above); - } finally { - lock.unlock(); - } -} -/** @method flags=dynamic */ -public static final native void _gdk_window_set_background_pattern(long /*int*/ window, long /*int*/ pattern); -public static final void gdk_window_set_background_pattern(long /*int*/ window, long /*int*/ pattern) { - lock.lock(); - try { - _gdk_window_set_background_pattern(window, pattern); - } finally { - lock.unlock(); - } -} -/** - * @method flags=dynamic - * @param window cast=(GdkWindow *) - * @param parent_relative cast=(gboolean) - */ -public static final native void _gdk_window_set_back_pixmap(long /*int*/ window, long /*int*/ pixmap, boolean parent_relative); -public static final void gdk_window_set_back_pixmap(long /*int*/ window, long /*int*/ pixmap, boolean parent_relative) { - lock.lock(); - try { - _gdk_window_set_back_pixmap(window, pixmap, parent_relative); - } finally { - lock.unlock(); - } -} -/** - * @param window cast=(GdkWindow *) - * @param cursor cast=(GdkCursor *) - */ -public static final native void _gdk_window_set_cursor(long /*int*/ window, long /*int*/ cursor); -public static final void gdk_window_set_cursor(long /*int*/ window, long /*int*/ cursor) { - lock.lock(); - try { - _gdk_window_set_cursor(window, cursor); - } finally { - lock.unlock(); - } -} -/** - * @param window cast=(GdkWindow *) - * @param decorations cast=(GdkWMDecoration) - */ -public static final native void _gdk_window_set_decorations(long /*int*/ window, int decorations); -public static final void gdk_window_set_decorations(long /*int*/ window, int decorations) { - lock.lock(); - try { - _gdk_window_set_decorations(window, decorations); - } finally { - lock.unlock(); - } -} -/** - * @param window cast=(GdkWindow *) - * @param functions cast=(GdkWMFunction) - */ -public static final native void _gdk_window_set_functions(long /*int*/ window, int functions); -public static final void gdk_window_set_functions(long /*int*/ window, int functions) { - lock.lock(); - try { - _gdk_window_set_functions(window, functions); - } finally { - lock.unlock(); - } -} -/** @param window cast=(GdkWindow *) */ -public static final native void _gdk_window_set_events(long /*int*/ window, int event_mask); -public static final void gdk_window_set_events(long /*int*/ window, int event_mask) { - lock.lock(); - try { - _gdk_window_set_events(window, event_mask); - } finally { - lock.unlock(); - } -} -/** - * @param window cast=(GdkWindow *) - * @param override_redirect cast=(gboolean) - */ -public static final native void _gdk_window_set_override_redirect(long /*int*/ window, boolean override_redirect); -public static final void gdk_window_set_override_redirect(long /*int*/ window, boolean override_redirect) { - lock.lock(); - try { - _gdk_window_set_override_redirect(window, override_redirect); - } finally { - lock.unlock(); - } -} -/** - * @param window cast=(GdkWindow *) - * @param user_data cast=(gpointer) - */ -public static final native void _gdk_window_set_user_data(long /*int*/ window, long /*int*/ user_data); -public static final void gdk_window_set_user_data(long /*int*/ window, long /*int*/ user_data) { - lock.lock(); - try { - _gdk_window_set_user_data(window, user_data); - } finally { - lock.unlock(); - } -} -/** - * @method flags=dynamic - * @param window cast=(GdkWindow *) - */ -public static final native void _gdk_window_shape_combine_region (long /*int*/ window, long /*int*/ shape_region, int offset_x, int offset_y); -public static final void gdk_window_shape_combine_region (long /*int*/ window, long /*int*/ shape_region, int offset_x, int offset_y) { - lock.lock(); - try { - _gdk_window_shape_combine_region(window, shape_region, offset_x, offset_y); - } finally { - lock.unlock(); - } -} -/** @param window cast=(GdkWindow *) */ -public static final native void _gdk_window_show(long /*int*/ window); -public static final void gdk_window_show(long /*int*/ window) { - lock.lock(); - try { - _gdk_window_show(window); - } finally { - lock.unlock(); - } -} -/** @param window cast=(GdkWindow *) */ -public static final native void _gdk_window_show_unraised(long /*int*/ window); -public static final void gdk_window_show_unraised(long /*int*/ window) { - lock.lock(); - try { - _gdk_window_show_unraised(window); - } finally { - lock.unlock(); - } -} - /** @method flags=dynamic */ public static final native boolean _FcConfigAppFontAddFile(long /*int*/ config, byte[] file); public static final boolean FcConfigAppFontAddFile(long /*int*/ config, byte[] file) { @@ -6718,92 +4188,6 @@ public static final int access (byte [] path, int amode) { */ public static final native int strcmp (long /*int*/ s1, byte [] s2); - -//Add ability to debug gtk warnings for SWT snippets via SWT_FATAL_WARNINGS=1 -// env variable. Please see Eclipse bug 471477 -// NOTE: this is a custom function in os_custom.h/c. -public static final native void _swt_debug_on_fatal_warnings(); -public static final void swt_debug_on_fatal_warnings() { - lock.lock(); - try { - _swt_debug_on_fatal_warnings (); - } finally { - lock.unlock(); - } -} -public static final native long /*int*/ _swt_fixed_get_type(); -public static final long /*int*/ swt_fixed_get_type() { - lock.lock(); - try { - return _swt_fixed_get_type(); - } finally { - lock.unlock(); - } -} -public static final native long /*int*/ _swt_fixed_accessible_get_type(); -public static final long /*int*/ swt_fixed_accessible_get_type() { - lock.lock(); - try { - return _swt_fixed_accessible_get_type(); - } finally { - lock.unlock(); - } -} -/** - * @param obj cast=(AtkObject*) - * @param is_native cast=(gboolean) - * @param to_map cast=(GtkWidget *) - */ -public static final native void _swt_fixed_accessible_register_accessible(long /*int*/ obj, boolean is_native, long /*int*/ to_map); -public static final void swt_fixed_accessible_register_accessible(long /*int*/ obj, boolean is_native, long /*int*/ to_map) { - lock.lock(); - try { - _swt_fixed_accessible_register_accessible(obj, is_native, to_map); - } finally { - lock.unlock(); - } -} -/** - * @param fixed cast=(SwtFixed*) - * @param widget cast=(GtkWidget*) - * @param sibling cast=(GtkWidget*) - */ -public static final native void _swt_fixed_restack(long /*int*/ fixed, long /*int*/ widget, long /*int*/ sibling, boolean above); -public static final void swt_fixed_restack(long /*int*/ fixed, long /*int*/ widget, long /*int*/ sibling, boolean above) { - lock.lock(); - try { - _swt_fixed_restack(fixed, widget, sibling, above); - } finally { - lock.unlock(); - } -} -/** - * @param fixed cast=(SwtFixed*) - * @param widget cast=(GtkWidget*) - */ -public static final native void _swt_fixed_move(long /*int*/ fixed, long /*int*/ widget, int x, int y); -public static final void swt_fixed_move(long /*int*/ fixed, long /*int*/ widget, int x, int y) { - lock.lock(); - try { - _swt_fixed_move(fixed, widget, x, y); - } finally { - lock.unlock(); - } -} -/** - * @param fixed cast=(SwtFixed*) - * @param widget cast=(GtkWidget*) - */ -public static final native void _swt_fixed_resize(long /*int*/ fixed, long /*int*/ widget, int width, int height); -public static final void swt_fixed_resize(long /*int*/ fixed, long /*int*/ widget, int width, int height) { - lock.lock(); - try { - _swt_fixed_resize(fixed, widget, width, height); - } finally { - lock.unlock(); - } -} - public static final String getThemeName() { byte[] themeNameBytes = getThemeNameBytes(); String themeName = "unknown"; @@ -6842,7 +4226,7 @@ public static final byte [] getThemeNameBytes() { */ public static final void setDarkThemePreferred(boolean preferred){ if (!GTK.GTK3) return; //only applicable to GTK3 - gdk_flush(); + GDK.gdk_flush(); g_object_set(GTK.gtk_settings_get_default(), GTK.gtk_application_prefer_dark_theme, preferred, 0); g_object_notify(GTK.gtk_settings_get_default(), diff --git a/bundles/org.eclipse.swt/Eclipse SWT Printing/gtk/org/eclipse/swt/printing/PrintDialog.java b/bundles/org.eclipse.swt/Eclipse SWT Printing/gtk/org/eclipse/swt/printing/PrintDialog.java index 5119dc2467..e35613a97e 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT Printing/gtk/org/eclipse/swt/printing/PrintDialog.java +++ b/bundles/org.eclipse.swt/Eclipse SWT Printing/gtk/org/eclipse/swt/printing/PrintDialog.java @@ -399,7 +399,7 @@ public PrinterData open() { * code outside of SWT (i.e AWT, etc). It ensures that the current * thread leaves the GTK lock acquired by the function above. */ - OS.gdk_threads_leave(); + GDK.gdk_threads_leave(); display.sendPostExternalEventDispatchEvent (); if (GTK.gtk_window_get_modal (handle)) { display.setData (SET_MODAL_DIALOG, oldModal); diff --git a/bundles/org.eclipse.swt/Eclipse SWT Printing/gtk/org/eclipse/swt/printing/Printer.java b/bundles/org.eclipse.swt/Eclipse SWT Printing/gtk/org/eclipse/swt/printing/Printer.java index 0e123fb107..a26da90a55 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT Printing/gtk/org/eclipse/swt/printing/Printer.java +++ b/bundles/org.eclipse.swt/Eclipse SWT Printing/gtk/org/eclipse/swt/printing/Printer.java @@ -99,7 +99,7 @@ public static PrinterData[] getPrinterList() { * code outside of SWT (i.e AWT, etc). It ensures that the current * thread leaves the GTK lock acquired by the function above. */ - OS.gdk_threads_leave(); + GDK.gdk_threads_leave(); printerCallback.dispose (); return printerList; } @@ -147,7 +147,7 @@ public static PrinterData getDefaultPrinterData() { * code outside of SWT (i.e AWT, etc). It ensures that the current * thread leaves the GTK lock acquired by the function above. */ - OS.gdk_threads_leave(); + GDK.gdk_threads_leave(); printerCallback.dispose (); return findData; } @@ -174,7 +174,7 @@ static long /*int*/ gtkPrinterFromPrinterData(PrinterData data) { * code outside of SWT (i.e AWT, etc). It ensures that the current * thread leaves the GTK lock acquired by the function above. */ - OS.gdk_threads_leave(); + GDK.gdk_threads_leave(); printerCallback.dispose (); return findPrinter; } diff --git a/bundles/org.eclipse.swt/Eclipse SWT Program/gtk/org/eclipse/swt/program/Program.java b/bundles/org.eclipse.swt/Eclipse SWT Program/gtk/org/eclipse/swt/program/Program.java index cfedfc0c81..8bf591c2be 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT Program/gtk/org/eclipse/swt/program/Program.java +++ b/bundles/org.eclipse.swt/Eclipse SWT Program/gtk/org/eclipse/swt/program/Program.java @@ -154,11 +154,11 @@ public ImageData getImageData() { if (gicon_info != 0) { long /*int*/ pixbuf = GTK.gtk_icon_info_load_icon(gicon_info, null); if (pixbuf != 0) { - int stride = OS.gdk_pixbuf_get_rowstride(pixbuf); - long /*int*/ pixels = OS.gdk_pixbuf_get_pixels(pixbuf); - int height = OS.gdk_pixbuf_get_height(pixbuf); - int width = OS.gdk_pixbuf_get_width(pixbuf); - boolean hasAlpha = OS.gdk_pixbuf_get_has_alpha(pixbuf); + int stride = GDK.gdk_pixbuf_get_rowstride(pixbuf); + long /*int*/ pixels = GDK.gdk_pixbuf_get_pixels(pixbuf); + int height = GDK.gdk_pixbuf_get_height(pixbuf); + int width = GDK.gdk_pixbuf_get_width(pixbuf); + boolean hasAlpha = GDK.gdk_pixbuf_get_has_alpha(pixbuf); byte[] srcData = new byte[stride * height]; C.memmove(srcData, pixels, srcData.length); OS.g_object_unref(pixbuf); diff --git a/bundles/org.eclipse.swt/Eclipse SWT WebKit/gtk/org/eclipse/swt/browser/WebKit.java b/bundles/org.eclipse.swt/Eclipse SWT WebKit/gtk/org/eclipse/swt/browser/WebKit.java index c035a50dc6..b4eee43e69 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT WebKit/gtk/org/eclipse/swt/browser/WebKit.java +++ b/bundles/org.eclipse.swt/Eclipse SWT WebKit/gtk/org/eclipse/swt/browser/WebKit.java @@ -698,33 +698,33 @@ static long /*int*/ JSDOMEventProc (long /*int*/ arg0, long /*int*/ event, long (WEBKIT1 && !browser.webBrowser.jsEnabled) || (WEBKIT2 && Arrays.binarySearch(w2_passThroughSwtEvents, user_data) >= 0)){ /* this instance does need to use the GDK event to create an SWT event to send */ - switch (OS.GDK_EVENT_TYPE (event)) { - case OS.GDK_KEY_PRESS: { + switch (GDK.GDK_EVENT_TYPE (event)) { + case GDK.GDK_KEY_PRESS: { if (browser.isFocusControl ()) { final GdkEventKey gdkEvent = new GdkEventKey (); OS.memmove (gdkEvent, event, GdkEventKey.sizeof); switch (gdkEvent.keyval) { - case OS.GDK_ISO_Left_Tab: - case OS.GDK_Tab: { - if ((gdkEvent.state & (OS.GDK_CONTROL_MASK | OS.GDK_MOD1_MASK)) == 0) { + case GDK.GDK_ISO_Left_Tab: + case GDK.GDK_Tab: { + if ((gdkEvent.state & (GDK.GDK_CONTROL_MASK | GDK.GDK_MOD1_MASK)) == 0) { browser.getDisplay ().asyncExec (() -> { if (browser.isDisposed ()) return; if (browser.getDisplay ().getFocusControl () == null) { - int traversal = (gdkEvent.state & OS.GDK_SHIFT_MASK) != 0 ? SWT.TRAVERSE_TAB_PREVIOUS : SWT.TRAVERSE_TAB_NEXT; + int traversal = (gdkEvent.state & GDK.GDK_SHIFT_MASK) != 0 ? SWT.TRAVERSE_TAB_PREVIOUS : SWT.TRAVERSE_TAB_NEXT; browser.traverse (traversal); } }); } break; } - case OS.GDK_Escape: { + case GDK.GDK_Escape: { Event keyEvent = new Event (); keyEvent.widget = browser; keyEvent.type = SWT.KeyDown; keyEvent.keyCode = keyEvent.character = SWT.ESC; - if ((gdkEvent.state & OS.GDK_MOD1_MASK) != 0) keyEvent.stateMask |= SWT.ALT; - if ((gdkEvent.state & OS.GDK_SHIFT_MASK) != 0) keyEvent.stateMask |= SWT.SHIFT; - if ((gdkEvent.state & OS.GDK_CONTROL_MASK) != 0) keyEvent.stateMask |= SWT.CONTROL; + if ((gdkEvent.state & GDK.GDK_MOD1_MASK) != 0) keyEvent.stateMask |= SWT.ALT; + if ((gdkEvent.state & GDK.GDK_SHIFT_MASK) != 0) keyEvent.stateMask |= SWT.SHIFT; + if ((gdkEvent.state & GDK.GDK_CONTROL_MASK) != 0) keyEvent.stateMask |= SWT.CONTROL; try { // to avoid deadlocks, evaluate() should not block during listener. See Bug 512001 // I.e, evaluate() can be called and script will be executed, but no return value will be provided. nonBlockingEvaluate++; @@ -1888,18 +1888,18 @@ boolean handleDOMEvent (long /*int*/ event, int type) { GdkEventKey gdkEvent = new GdkEventKey (); OS.memmove (gdkEvent, eventPtr, GdkEventKey.sizeof); switch (gdkEvent.type) { - case OS.GDK_KEY_PRESS: - case OS.GDK_KEY_RELEASE: + case GDK.GDK_KEY_PRESS: + case GDK.GDK_KEY_RELEASE: keyEventState = gdkEvent.state; break; } - OS.gdk_event_free (eventPtr); + GDK.gdk_event_free (eventPtr); } int keyCode = (int)WebKitGTK.webkit_dom_ui_event_get_key_code (event); int charCode = (int)WebKitGTK.webkit_dom_ui_event_get_char_code (event); - boolean altKey = (keyEventState & OS.GDK_MOD1_MASK) != 0; - boolean ctrlKey = (keyEventState & OS.GDK_CONTROL_MASK) != 0; - boolean shiftKey = (keyEventState & OS.GDK_SHIFT_MASK) != 0; + boolean altKey = (keyEventState & GDK.GDK_MOD1_MASK) != 0; + boolean ctrlKey = (keyEventState & GDK.GDK_CONTROL_MASK) != 0; + boolean shiftKey = (keyEventState & GDK.GDK_SHIFT_MASK) != 0; return handleKeyEvent(typeString, keyCode, charCode, altKey, ctrlKey, shiftKey, false); } diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/graphics/Color.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/graphics/Color.java index d4b8a03730..530ceb81ff 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/graphics/Color.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/graphics/Color.java @@ -230,8 +230,8 @@ void destroy() { device.gdkColors[pixel] = null; } } - long /*int*/ colormap = OS.gdk_colormap_get_system(); - OS.gdk_colormap_free_colors(colormap, handle, 1); + long /*int*/ colormap = GDK.gdk_colormap_get_system(); + GDK.gdk_colormap_free_colors(colormap, handle, 1); handle = null; } } @@ -505,11 +505,11 @@ void init(int red, int green, int blue, int alpha) { gdkColor.green = (short)((green & 0xFF) | ((green & 0xFF) << 8)); gdkColor.blue = (short)((blue & 0xFF) | ((blue & 0xFF) << 8)); this.alpha = alpha; - long /*int*/ colormap = OS.gdk_colormap_get_system(); - if (!OS.gdk_colormap_alloc_color(colormap, gdkColor, true, true)) { + long /*int*/ colormap = GDK.gdk_colormap_get_system(); + if (!GDK.gdk_colormap_alloc_color(colormap, gdkColor, true, true)) { /* Allocate black. */ gdkColor = new GdkColor(); - OS.gdk_colormap_alloc_color(colormap, gdkColor, true, true); + GDK.gdk_colormap_alloc_color(colormap, gdkColor, true, true); } handle = gdkColor; if (device.colorRefCount != null) { diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/graphics/Cursor.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/graphics/Cursor.java index e311da5b7d..6b100f9319 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/graphics/Cursor.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/graphics/Cursor.java @@ -139,32 +139,32 @@ public Cursor(Device device, int style) { byte[] name = null; switch (style) { case SWT.CURSOR_APPSTARTING: name = Converter.wcsToMbcs("progress", true) ; break; - case SWT.CURSOR_ARROW: shape = OS.GDK_LEFT_PTR; break; - case SWT.CURSOR_WAIT: shape = OS.GDK_WATCH; break; - case SWT.CURSOR_CROSS: shape = OS.GDK_CROSS; break; - case SWT.CURSOR_HAND: shape = OS.GDK_HAND2; break; - case SWT.CURSOR_HELP: shape = OS.GDK_QUESTION_ARROW; break; - case SWT.CURSOR_SIZEALL: shape = OS.GDK_FLEUR; break; - case SWT.CURSOR_SIZENESW: shape = OS.GDK_SIZING; name=Converter.wcsToMbcs("nesw-resize", true); break; - case SWT.CURSOR_SIZENS: shape = OS.GDK_DOUBLE_ARROW; break; - case SWT.CURSOR_SIZENWSE: shape = OS.GDK_SIZING; name=Converter.wcsToMbcs("nwse-resize", true); break; - case SWT.CURSOR_SIZEWE: shape = OS.GDK_SB_H_DOUBLE_ARROW; break; - case SWT.CURSOR_SIZEN: shape = OS.GDK_TOP_SIDE; break; - case SWT.CURSOR_SIZES: shape = OS.GDK_BOTTOM_SIDE; break; - case SWT.CURSOR_SIZEE: shape = OS.GDK_RIGHT_SIDE; break; - case SWT.CURSOR_SIZEW: shape = OS.GDK_LEFT_SIDE; break; - case SWT.CURSOR_SIZENE: shape = OS.GDK_TOP_RIGHT_CORNER; break; - case SWT.CURSOR_SIZESE: shape = OS.GDK_BOTTOM_RIGHT_CORNER; break; - case SWT.CURSOR_SIZESW: shape = OS.GDK_BOTTOM_LEFT_CORNER; break; - case SWT.CURSOR_SIZENW: shape = OS.GDK_TOP_LEFT_CORNER; break; - case SWT.CURSOR_UPARROW: shape = OS.GDK_SB_UP_ARROW; break; - case SWT.CURSOR_IBEAM: shape = OS.GDK_XTERM; break; - case SWT.CURSOR_NO: shape = OS.GDK_X_CURSOR; name=Converter.wcsToMbcs("not-allowed", true) ; break; + case SWT.CURSOR_ARROW: shape = GDK.GDK_LEFT_PTR; break; + case SWT.CURSOR_WAIT: shape = GDK.GDK_WATCH; break; + case SWT.CURSOR_CROSS: shape = GDK.GDK_CROSS; break; + case SWT.CURSOR_HAND: shape = GDK.GDK_HAND2; break; + case SWT.CURSOR_HELP: shape = GDK.GDK_QUESTION_ARROW; break; + case SWT.CURSOR_SIZEALL: shape = GDK.GDK_FLEUR; break; + case SWT.CURSOR_SIZENESW: shape = GDK.GDK_SIZING; name=Converter.wcsToMbcs("nesw-resize", true); break; + case SWT.CURSOR_SIZENS: shape = GDK.GDK_DOUBLE_ARROW; break; + case SWT.CURSOR_SIZENWSE: shape = GDK.GDK_SIZING; name=Converter.wcsToMbcs("nwse-resize", true); break; + case SWT.CURSOR_SIZEWE: shape = GDK.GDK_SB_H_DOUBLE_ARROW; break; + case SWT.CURSOR_SIZEN: shape = GDK.GDK_TOP_SIDE; break; + case SWT.CURSOR_SIZES: shape = GDK.GDK_BOTTOM_SIDE; break; + case SWT.CURSOR_SIZEE: shape = GDK.GDK_RIGHT_SIDE; break; + case SWT.CURSOR_SIZEW: shape = GDK.GDK_LEFT_SIDE; break; + case SWT.CURSOR_SIZENE: shape = GDK.GDK_TOP_RIGHT_CORNER; break; + case SWT.CURSOR_SIZESE: shape = GDK.GDK_BOTTOM_RIGHT_CORNER; break; + case SWT.CURSOR_SIZESW: shape = GDK.GDK_BOTTOM_LEFT_CORNER; break; + case SWT.CURSOR_SIZENW: shape = GDK.GDK_TOP_LEFT_CORNER; break; + case SWT.CURSOR_UPARROW: shape = GDK.GDK_SB_UP_ARROW; break; + case SWT.CURSOR_IBEAM: shape = GDK.GDK_XTERM; break; + case SWT.CURSOR_NO: shape = GDK.GDK_X_CURSOR; name=Converter.wcsToMbcs("not-allowed", true) ; break; default: SWT.error(SWT.ERROR_INVALID_ARGUMENT); } if (name != null) { - handle = OS.gdk_cursor_new_from_name (OS.gdk_display_get_default(), name); + handle = GDK.gdk_cursor_new_from_name (GDK.gdk_display_get_default(), name); } if (handle == 0) { if (shape == 0 && style == SWT.CURSOR_APPSTARTING) { @@ -174,7 +174,7 @@ public Cursor(Device device, int style) { System.arraycopy(APPSTARTING_MASK, 0, mask, 0, mask.length); handle = createCursor(src, mask, 32, 32, 2, 2, true); } else { - handle = OS.gdk_cursor_new_for_display(OS.gdk_display_get_default(), shape); + handle = GDK.gdk_cursor_new_for_display(GDK.gdk_display_get_default(), shape); } } if (handle == 0) SWT.error(SWT.ERROR_NO_HANDLES); @@ -307,14 +307,14 @@ public Cursor(Device device, ImageData source, int hotspotX, int hotspotY) { SWT.error(SWT.ERROR_INVALID_ARGUMENT); } long /*int*/ display = 0; - if (OS.gdk_display_supports_cursor_color(display = OS.gdk_display_get_default ())) { + if (GDK.gdk_display_supports_cursor_color(display = GDK.gdk_display_get_default ())) { int width = source.width; int height = source.height; PaletteData palette = source.palette; - long /*int*/ pixbuf = OS.gdk_pixbuf_new(OS.GDK_COLORSPACE_RGB, true, 8, width, height); + long /*int*/ pixbuf = GDK.gdk_pixbuf_new(GDK.GDK_COLORSPACE_RGB, true, 8, width, height); if (pixbuf == 0) SWT.error(SWT.ERROR_NO_HANDLES); - int stride = OS.gdk_pixbuf_get_rowstride(pixbuf); - long /*int*/ data = OS.gdk_pixbuf_get_pixels(pixbuf); + int stride = GDK.gdk_pixbuf_get_rowstride(pixbuf); + long /*int*/ data = GDK.gdk_pixbuf_get_pixels(pixbuf); byte[] buffer = source.data; if (!palette.isDirect || source.depth != 24 || stride != source.bytesPerLine || palette.redMask != 0xFF000000 || palette.greenMask != 0xFF0000 || palette.blueMask != 0xFF00) { buffer = new byte[source.width * source.height * 4]; @@ -368,7 +368,7 @@ public Cursor(Device device, ImageData source, int hotspotX, int hotspotY) { } } C.memmove(data, buffer, stride * height); - handle = OS.gdk_cursor_new_from_pixbuf(display, pixbuf, hotspotX, hotspotY); + handle = GDK.gdk_cursor_new_from_pixbuf(display, pixbuf, hotspotX, hotspotY); OS.g_object_unref(pixbuf); } else { @@ -498,24 +498,24 @@ long /*int*/ createCursor(byte[] sourceData, byte[] maskData, int width, int hei offset += 4; } } - long /*int*/ pixbuf = OS.gdk_pixbuf_new(OS.GDK_COLORSPACE_RGB, true, 8, width, height); + long /*int*/ pixbuf = GDK.gdk_pixbuf_new(GDK.GDK_COLORSPACE_RGB, true, 8, width, height); if (pixbuf == 0) SWT.error(SWT.ERROR_NO_HANDLES); - int stride = OS.gdk_pixbuf_get_rowstride(pixbuf); - long /*int*/ pixels = OS.gdk_pixbuf_get_pixels(pixbuf); + int stride = GDK.gdk_pixbuf_get_rowstride(pixbuf); + long /*int*/ pixels = GDK.gdk_pixbuf_get_pixels(pixbuf); C.memmove(pixels, data, stride * height); - long /*int*/ cursor = OS.gdk_cursor_new_from_pixbuf(OS.gdk_display_get_default(), pixbuf, hotspotX, hotspotY); + long /*int*/ cursor = GDK.gdk_cursor_new_from_pixbuf(GDK.gdk_display_get_default(), pixbuf, hotspotX, hotspotY); OS.g_object_unref(pixbuf); return cursor; } - long /*int*/ sourcePixmap = OS.gdk_bitmap_create_from_data(0, sourceData, width, height); - long /*int*/ maskPixmap = OS.gdk_bitmap_create_from_data(0, maskData, width, height); + long /*int*/ sourcePixmap = GDK.gdk_bitmap_create_from_data(0, sourceData, width, height); + long /*int*/ maskPixmap = GDK.gdk_bitmap_create_from_data(0, maskData, width, height); long /*int*/ cursor = 0; if (sourcePixmap != 0 && maskPixmap != 0) { GdkColor foreground = new GdkColor(); if (!reverse) foreground.red = foreground.green = foreground.blue = (short)0xFFFF; GdkColor background = new GdkColor(); if (reverse) background.red = background.green = background.blue = (short)0xFFFF; - cursor = OS.gdk_cursor_new_from_pixmap (sourcePixmap, maskPixmap, foreground, background, hotspotX, hotspotY); + cursor = GDK.gdk_cursor_new_from_pixmap (sourcePixmap, maskPixmap, foreground, background, hotspotX, hotspotY); } if (sourcePixmap != 0) OS.g_object_unref (sourcePixmap); if (maskPixmap != 0) OS.g_object_unref (maskPixmap); @@ -613,7 +613,7 @@ void gdk_cursor_unref (long /*int*/ cursor) { if (GTK.GTK3) { OS.g_object_unref (cursor); } else { - OS.gdk_cursor_unref(cursor); + GDK.gdk_cursor_unref(cursor); } } diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/graphics/Device.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/graphics/Device.java index 38d45f547a..7541ace68b 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/graphics/Device.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/graphics/Device.java @@ -423,7 +423,7 @@ public FontData[] getFontList (String faceName, boolean scalable) { int[] n_families = new int[1]; long /*int*/[] faces = new long /*int*/[1]; int[] n_faces = new int[1]; - long /*int*/ context = OS.gdk_pango_context_get(); + long /*int*/ context = GDK.gdk_pango_context_get(); OS.pango_context_list_families(context, families, n_families); int nFds = 0; FontData[] fds = new FontData[faceName != null ? 4 : n_families[0]]; @@ -466,8 +466,8 @@ public FontData[] getFontList (String faceName, boolean scalable) { } Point getScreenDPI () { - int widthMM = OS.gdk_screen_width_mm (); - int width = OS.gdk_screen_width (); + int widthMM = GDK.gdk_screen_width_mm (); + int width = GDK.gdk_screen_width (); int dpi = Compatibility.round (254 * width, widthMM * 10); return new Point (dpi, dpi); } @@ -674,7 +674,7 @@ protected void init () { /* Load certain CSS globally to save native GTK calls */ if (GTK.GTK3) { - long /*int*/ screen = OS.gdk_screen_get_default(); + long /*int*/ screen = GDK.gdk_screen_get_default(); long /*int*/ provider = GTK.gtk_css_provider_new(); String resourcePath = ""; if (screen != 0 && provider != 0) { @@ -863,12 +863,12 @@ protected void release () { if (gdkColors != null) { if (!GTK.GTK3) { - long /*int*/ colormap = OS.gdk_colormap_get_system(); + long /*int*/ colormap = GDK.gdk_colormap_get_system(); for (int i = 0; i < gdkColors.length; i++) { GdkColor color = gdkColors [i]; if (color != null) { while (colorRefCount [i] > 0) { - OS.gdk_colormap_free_colors(colormap, color, 1); + GDK.gdk_colormap_free_colors(colormap, color, 1); --colorRefCount [i]; } } @@ -1014,12 +1014,12 @@ int _getDPIx () { * @since 3.105 */ protected int getDeviceZoom() { - long /*int*/ screen = OS.gdk_screen_get_default(); - int dpi = (int) OS.gdk_screen_get_resolution (screen); + long /*int*/ screen = GDK.gdk_screen_get_default(); + int dpi = (int) GDK.gdk_screen_get_resolution (screen); if (dpi <= 0) dpi = 96; // gdk_screen_get_resolution returns -1 in case of error if (GTK.GTK_VERSION > OS.VERSION(3, 9, 0)) { - int monitor_num = OS.gdk_screen_get_monitor_at_point (screen, 0, 0); - int scale = OS.gdk_screen_get_monitor_scale_factor (screen, monitor_num); + int monitor_num = GDK.gdk_screen_get_monitor_at_point (screen, 0, 0); + int scale = GDK.gdk_screen_get_monitor_scale_factor (screen, monitor_num); dpi = dpi * scale; } return DPIUtil.mapDPIToZoom (dpi); diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/graphics/GC.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/graphics/GC.java index 0f718ffc9a..d010224650 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/graphics/GC.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/graphics/GC.java @@ -367,9 +367,9 @@ void checkGC (int mask) { } long /*int*/ convertRgn(long /*int*/ rgn, double[] matrix) { - long /*int*/ newRgn = OS.gdk_region_new(); + long /*int*/ newRgn = GDK.gdk_region_new(); if (isIdentity(matrix)) { - OS.gdk_region_union(newRgn, rgn); + GDK.gdk_region_union(newRgn, rgn); return newRgn; } int[] nRects = new int[1]; @@ -400,9 +400,9 @@ long /*int*/ convertRgn(long /*int*/ rgn, double[] matrix) { Cairo.cairo_matrix_transform_point(matrix, x, y); pointArray[6] = (int)x[0]; pointArray[7] = (int)Math.round(y[0]); - long /*int*/ polyRgn = Region.gdk_region_polygon(pointArray, pointArray.length / 2, OS.GDK_EVEN_ODD_RULE); - OS.gdk_region_union(newRgn, polyRgn); - OS.gdk_region_destroy(polyRgn); + long /*int*/ polyRgn = Region.gdk_region_polygon(pointArray, pointArray.length / 2, GDK.GDK_EVEN_ODD_RULE); + GDK.gdk_region_union(newRgn, polyRgn); + GDK.gdk_region_destroy(polyRgn); } if (rects[0] != 0) OS.g_free(rects[0]); return newRgn; @@ -439,7 +439,7 @@ void copyAreaInPixels(Image image, int x, int y) { if (data.image != null) { Cairo.cairo_set_source_surface(cairo, data.image.surface, 0, 0); } else if (data.drawable != 0) { - OS.gdk_cairo_set_source_window(cairo, data.drawable, 0, 0); + GDK.gdk_cairo_set_source_window(cairo, data.drawable, 0, 0); } else { Cairo.cairo_destroy(cairo); return; @@ -517,7 +517,7 @@ void copyAreaInPixels(int srcX, int srcY, int width, int height, int destX, int Cairo.cairo_translate(handle, deltaX, deltaY); Cairo.cairo_set_operator(handle, Cairo.CAIRO_OPERATOR_SOURCE); Cairo.cairo_push_group(handle); - OS.gdk_cairo_set_source_window(handle, drawable, 0, 0); + GDK.gdk_cairo_set_source_window(handle, drawable, 0, 0); Cairo.cairo_paint(handle); Cairo.cairo_pop_group_to_source(handle); Cairo.cairo_rectangle(handle, destX - deltaX, destY - deltaY, width, height); @@ -527,24 +527,24 @@ void copyAreaInPixels(int srcX, int srcY, int width, int height, int destX, int if (paint) { long /*int*/ visibleRegion; if (GTK.GTK3) { - visibleRegion = OS.gdk_window_get_visible_region (drawable); + visibleRegion = GDK.gdk_window_get_visible_region (drawable); } else { - visibleRegion = OS.gdk_drawable_get_visible_region (drawable); + visibleRegion = GDK.gdk_drawable_get_visible_region (drawable); } GdkRectangle srcRect = new GdkRectangle (); srcRect.x = srcX; srcRect.y = srcY; srcRect.width = width; srcRect.height = height; - long /*int*/ copyRegion = OS.gdk_region_rectangle (srcRect); - OS.gdk_region_intersect(copyRegion, visibleRegion); - long /*int*/ invalidateRegion = OS.gdk_region_rectangle (srcRect); - OS.gdk_region_subtract (invalidateRegion, visibleRegion); - OS.gdk_region_offset (invalidateRegion, deltaX, deltaY); - OS.gdk_window_invalidate_region(drawable, invalidateRegion, false); - OS.gdk_region_destroy (visibleRegion); - OS.gdk_region_destroy (copyRegion); - OS.gdk_region_destroy (invalidateRegion); + long /*int*/ copyRegion = GDK.gdk_region_rectangle (srcRect); + GDK.gdk_region_intersect(copyRegion, visibleRegion); + long /*int*/ invalidateRegion = GDK.gdk_region_rectangle (srcRect); + GDK.gdk_region_subtract (invalidateRegion, visibleRegion); + GDK.gdk_region_offset (invalidateRegion, deltaX, deltaY); + GDK.gdk_window_invalidate_region(drawable, invalidateRegion, false); + GDK.gdk_region_destroy (visibleRegion); + GDK.gdk_region_destroy (copyRegion); + GDK.gdk_region_destroy (invalidateRegion); } } if (data.image == null & paint) { @@ -555,7 +555,7 @@ void copyAreaInPixels(int srcX, int srcY, int width, int height, int destX, int rect.y = srcY; rect.width = Math.max (0, width); rect.height = Math.max (0, height); - OS.gdk_window_invalidate_rect (drawable, rect, false); + GDK.gdk_window_invalidate_rect (drawable, rect, false); // OS.gdk_window_clear_area_e(drawable, srcX, srcY, width, height); } else { if (deltaX != 0) { @@ -565,7 +565,7 @@ void copyAreaInPixels(int srcX, int srcY, int width, int height, int destX, int rect.y = srcY; rect.width = Math.abs(deltaX); rect.height = Math.max (0, height); - OS.gdk_window_invalidate_rect (drawable, rect, false); + GDK.gdk_window_invalidate_rect (drawable, rect, false); // OS.gdk_window_clear_area_e(drawable, newX, srcY, Math.abs(deltaX), height); } if (deltaY != 0) { @@ -575,7 +575,7 @@ void copyAreaInPixels(int srcX, int srcY, int width, int height, int destX, int rect.y = newY; rect.width = Math.max (0, width); rect.height = Math.abs(deltaY); - OS.gdk_window_invalidate_rect (drawable, rect, false); + GDK.gdk_window_invalidate_rect (drawable, rect, false); // OS.gdk_window_clear_area_e(drawable, srcX, newY, width, Math.abs(deltaY)); } } @@ -583,7 +583,7 @@ void copyAreaInPixels(int srcX, int srcY, int width, int height, int destX, int } void createLayout() { - long /*int*/ context = OS.gdk_pango_context_get(); + long /*int*/ context = GDK.gdk_pango_context_get(); if (context == 0) SWT.error(SWT.ERROR_NO_HANDLES); data.context = context; long /*int*/ layout = OS.pango_layout_new(context); @@ -611,7 +611,7 @@ void destroy() { /* Free resources */ long /*int*/ clipRgn = data.clipRgn; - if (clipRgn != 0) OS.gdk_region_destroy(clipRgn); + if (clipRgn != 0) GDK.gdk_region_destroy(clipRgn); Image image = data.image; if (image != null) { image.memGC = null; @@ -2001,23 +2001,23 @@ Rectangle getClippingInPixels() { long /*int*/ clipRgn = data.clipRgn; long /*int*/ damageRgn = data.damageRgn; if (clipRgn != 0 || damageRgn != 0 || cairo != 0) { - long /*int*/ rgn = OS.gdk_region_new(); + long /*int*/ rgn = GDK.gdk_region_new(); GdkRectangle rect = new GdkRectangle(); rect.width = width; rect.height = height; - OS.gdk_region_union_with_rect(rgn, rect); + GDK.gdk_region_union_with_rect(rgn, rect); if (damageRgn != 0) { - OS.gdk_region_intersect (rgn, damageRgn); + GDK.gdk_region_intersect (rgn, damageRgn); } /* Intersect visible bounds with clipping */ if (clipRgn != 0) { /* Convert clipping to device space if needed */ if (data.clippingTransform != null) { clipRgn = convertRgn(clipRgn, data.clippingTransform); - OS.gdk_region_intersect(rgn, clipRgn); - OS.gdk_region_destroy(clipRgn); + GDK.gdk_region_intersect(rgn, clipRgn); + GDK.gdk_region_destroy(clipRgn); } else { - OS.gdk_region_intersect(rgn, clipRgn); + GDK.gdk_region_intersect(rgn, clipRgn); } } /* Convert to user space */ @@ -2026,11 +2026,11 @@ Rectangle getClippingInPixels() { Cairo.cairo_get_matrix(cairo, matrix); Cairo.cairo_matrix_invert(matrix); clipRgn = convertRgn(rgn, matrix); - OS.gdk_region_destroy(rgn); + GDK.gdk_region_destroy(rgn); rgn = clipRgn; } - OS.gdk_region_get_clipbox(rgn, rect); - OS.gdk_region_destroy(rgn); + GDK.gdk_region_get_clipbox(rgn, rect); + GDK.gdk_region_destroy(rgn); x = rect.x; y = rect.y; width = rect.width; @@ -2058,7 +2058,7 @@ public void getClipping(Region region) { if (region == null) SWT.error(SWT.ERROR_NULL_ARGUMENT); if (region.isDisposed()) SWT.error(SWT.ERROR_INVALID_ARGUMENT); long /*int*/ clipping = region.handle; - OS.gdk_region_subtract(clipping, clipping); + GDK.gdk_region_subtract(clipping, clipping); long /*int*/ cairo = data.cairo; long /*int*/ clipRgn = data.clipRgn; if (clipRgn == 0) { @@ -2067,19 +2067,19 @@ public void getClipping(Region region) { getSize(width, height); rect.width = width[0]; rect.height = height[0]; - OS.gdk_region_union_with_rect(clipping, rect); + GDK.gdk_region_union_with_rect(clipping, rect); } else { /* Convert clipping to device space if needed */ if (data.clippingTransform != null) { long /*int*/ rgn = convertRgn(clipRgn, data.clippingTransform); - OS.gdk_region_union(clipping, rgn); - OS.gdk_region_destroy(rgn); + GDK.gdk_region_union(clipping, rgn); + GDK.gdk_region_destroy(rgn); } else { - OS.gdk_region_union(clipping, clipRgn); + GDK.gdk_region_union(clipping, clipRgn); } } if (data.damageRgn != 0) { - OS.gdk_region_intersect(clipping, data.damageRgn); + GDK.gdk_region_intersect(clipping, data.damageRgn); } /* Convert to user space */ if (cairo != 0) { @@ -2087,9 +2087,9 @@ public void getClipping(Region region) { Cairo.cairo_get_matrix(cairo, matrix); Cairo.cairo_matrix_invert(matrix); long /*int*/ rgn = convertRgn(clipping, matrix); - OS.gdk_region_subtract(clipping, clipping); - OS.gdk_region_union(clipping, rgn); - OS.gdk_region_destroy(rgn); + GDK.gdk_region_subtract(clipping, clipping); + GDK.gdk_region_union(clipping, rgn); + GDK.gdk_region_destroy(rgn); } } @@ -2391,8 +2391,8 @@ void getSize(int[] width, int[] height) { return; } if (data.drawable != 0) { - width[0] = OS.gdk_window_get_width(data.drawable); - height[0] = OS.gdk_window_get_height(data.drawable); + width[0] = GDK.gdk_window_get_width(data.drawable); + height[0] = GDK.gdk_window_get_height(data.drawable); return; } long /*int*/ surface = Cairo.cairo_get_target(handle); @@ -2562,7 +2562,7 @@ void init(Drawable drawable, GCData data, long /*int*/ gdkGC) { void initCairo() { long /*int*/ cairo = data.cairo; if (cairo != 0) return; - data.cairo = cairo = OS.gdk_cairo_create(data.drawable); + data.cairo = cairo = GDK.gdk_cairo_create(data.drawable); if (cairo == 0) SWT.error(SWT.ERROR_NO_HANDLES); data.disposeCairo = true; Cairo.cairo_set_fill_rule(cairo, Cairo.CAIRO_FILL_RULE_EVEN_ODD); @@ -2831,7 +2831,7 @@ static void setCairoFont(long /*int*/ cairo, long /*int*/ font) { } static void setCairoRegion(long /*int*/ cairo, long /*int*/ rgn) { - OS.gdk_cairo_region(cairo, rgn); + GDK.gdk_cairo_region(cairo, rgn); } static void setCairoPatternColor(long /*int*/ pattern, int offset, Color c, int alpha) { @@ -2851,7 +2851,7 @@ static void setCairoPatternColor(long /*int*/ pattern, int offset, Color c, int void setCairoClip(long /*int*/ damageRgn, long /*int*/ clipRgn) { long /*int*/ cairo = data.cairo; if (data.drawable != 0 && !GTK.GTK3) { - OS.gdk_cairo_reset_clip(cairo, data.drawable); + GDK.gdk_cairo_reset_clip(cairo, data.drawable); } else { Cairo.cairo_reset_clip(cairo); } @@ -2875,15 +2875,15 @@ void setClipping(long /*int*/ clipRgn) { long /*int*/ cairo = data.cairo; if (clipRgn == 0) { if (data.clipRgn != 0) { - OS.gdk_region_destroy(data.clipRgn); + GDK.gdk_region_destroy(data.clipRgn); data.clipRgn = 0; } data.clippingTransform = null; setCairoClip(data.damageRgn, 0); } else { - if (data.clipRgn == 0) data.clipRgn = OS.gdk_region_new(); - OS.gdk_region_subtract(data.clipRgn, data.clipRgn); - OS.gdk_region_union(data.clipRgn, clipRgn); + if (data.clipRgn == 0) data.clipRgn = GDK.gdk_region_new(); + GDK.gdk_region_subtract(data.clipRgn, data.clipRgn); + GDK.gdk_region_union(data.clipRgn, clipRgn); if (data.clippingTransform == null) data.clippingTransform = new double[6]; Cairo.cairo_get_matrix(cairo, data.clippingTransform); setCairoClip(data.damageRgn, clipRgn); @@ -2922,10 +2922,10 @@ void setClippingInPixels(int x, int y, int width, int height) { rect.y = y; rect.width = width; rect.height = height; - long /*int*/ clipRgn = OS.gdk_region_new(); - OS.gdk_region_union_with_rect(clipRgn, rect); + long /*int*/ clipRgn = GDK.gdk_region_new(); + GDK.gdk_region_union_with_rect(clipRgn, rect); setClipping(clipRgn); - OS.gdk_region_destroy(clipRgn); + GDK.gdk_region_destroy(clipRgn); } /** diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/graphics/Image.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/graphics/Image.java index b64516bccf..baa98024b3 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/graphics/Image.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/graphics/Image.java @@ -792,7 +792,7 @@ void initNative(String filename) { char [] chars = new char [length]; filename.getChars (0, length, chars, 0); byte [] buffer = Converter.wcsToMbcs(chars, true); - long /*int*/ pixbuf = OS.gdk_pixbuf_new_from_file(buffer, null); + long /*int*/ pixbuf = GDK.gdk_pixbuf_new_from_file(buffer, null); if (pixbuf != 0) { try { createFromPixbuf (SWT.BITMAP, pixbuf); @@ -805,11 +805,11 @@ void initNative(String filename) { void createFromPixbuf(int type, long /*int*/ pixbuf) { this.type = type; - boolean hasAlpha = OS.gdk_pixbuf_get_has_alpha(pixbuf); - int width = this.width = OS.gdk_pixbuf_get_width(pixbuf); - int height = this.height = OS.gdk_pixbuf_get_height(pixbuf); - int stride = OS.gdk_pixbuf_get_rowstride(pixbuf); - long /*int*/ pixels = OS.gdk_pixbuf_get_pixels(pixbuf); + boolean hasAlpha = GDK.gdk_pixbuf_get_has_alpha(pixbuf); + int width = this.width = GDK.gdk_pixbuf_get_width(pixbuf); + int height = this.height = GDK.gdk_pixbuf_get_height(pixbuf); + int stride = GDK.gdk_pixbuf_get_rowstride(pixbuf); + long /*int*/ pixels = GDK.gdk_pixbuf_get_pixels(pixbuf); int format = hasAlpha ? Cairo.CAIRO_FORMAT_ARGB32 : Cairo.CAIRO_FORMAT_RGB24; surface = Cairo.cairo_image_surface_create(format, width, height); if (surface == 0) SWT.error(SWT.ERROR_NO_HANDLES); @@ -910,17 +910,17 @@ void createSurface() { /* Generate the mask if necessary. */ if (transparentPixel != -1) createMask(); int[] w = new int[1], h = new int[1]; - OS.gdk_pixmap_get_size(pixmap, w, h); + GDK.gdk_pixmap_get_size(pixmap, w, h); int width = w[0], height = h[0]; this.width = width; this.height = height; if (mask != 0 || alpha != -1 || alphaData != null) { - long /*int*/ pixbuf = OS.gdk_pixbuf_new(OS.GDK_COLORSPACE_RGB, true, 8, width, height); + long /*int*/ pixbuf = GDK.gdk_pixbuf_new(GDK.GDK_COLORSPACE_RGB, true, 8, width, height); if (pixbuf == 0) SWT.error(SWT.ERROR_NO_HANDLES); - long /*int*/ colormap = OS.gdk_colormap_get_system(); - OS.gdk_pixbuf_get_from_drawable(pixbuf, pixmap, colormap, 0, 0, 0, 0, width, height); - int stride = OS.gdk_pixbuf_get_rowstride(pixbuf); - long /*int*/ pixels = OS.gdk_pixbuf_get_pixels(pixbuf); + long /*int*/ colormap = GDK.gdk_colormap_get_system(); + GDK.gdk_pixbuf_get_from_drawable(pixbuf, pixmap, colormap, 0, 0, 0, 0, width, height); + int stride = GDK.gdk_pixbuf_get_rowstride(pixbuf); + long /*int*/ pixels = GDK.gdk_pixbuf_get_pixels(pixbuf); byte[] line = new byte[stride]; int oa, or, og, ob; if (OS.BIG_ENDIAN) { @@ -928,12 +928,12 @@ void createSurface() { } else { oa = 3; or = 2; og = 1; ob = 0; } - if (mask != 0 && OS.gdk_drawable_get_depth(mask) == 1) { - long /*int*/ maskPixbuf = OS.gdk_pixbuf_new(OS.GDK_COLORSPACE_RGB, false, 8, width, height); + if (mask != 0 && GDK.gdk_drawable_get_depth(mask) == 1) { + long /*int*/ maskPixbuf = GDK.gdk_pixbuf_new(GDK.GDK_COLORSPACE_RGB, false, 8, width, height); if (maskPixbuf == 0) SWT.error(SWT.ERROR_NO_HANDLES); - OS.gdk_pixbuf_get_from_drawable(maskPixbuf, mask, 0, 0, 0, 0, 0, width, height); - int maskStride = OS.gdk_pixbuf_get_rowstride(maskPixbuf); - long /*int*/ maskPixels = OS.gdk_pixbuf_get_pixels(maskPixbuf); + GDK.gdk_pixbuf_get_from_drawable(maskPixbuf, mask, 0, 0, 0, 0, 0, width, height); + int maskStride = GDK.gdk_pixbuf_get_rowstride(maskPixbuf); + long /*int*/ maskPixels = GDK.gdk_pixbuf_get_pixels(maskPixbuf); byte[] maskLine = new byte[maskStride]; long /*int*/ offset = pixels, maskOffset = maskPixels; for (int y=0; y<height; y++) { @@ -1021,9 +1021,9 @@ void createSurface() { Cairo.cairo_surface_mark_dirty(surface); OS.g_object_unref(pixbuf); } else { - long /*int*/ xDisplay = OS.gdk_x11_display_get_xdisplay(OS.gdk_display_get_default()); - long /*int*/ xDrawable = OS.GDK_PIXMAP_XID(pixmap); - long /*int*/ xVisual = OS.gdk_x11_visual_get_xvisual(OS.gdk_visual_get_system()); + long /*int*/ xDisplay = GDK.gdk_x11_display_get_xdisplay(GDK.gdk_display_get_default()); + long /*int*/ xDrawable = GDK.GDK_PIXMAP_XID(pixmap); + long /*int*/ xVisual = GDK.gdk_x11_visual_get_xvisual(GDK.gdk_visual_get_system()); surface = Cairo.cairo_xlib_surface_create(xDisplay, xDrawable, xVisual, width, height); } /* Destroy the image mask if the there is a GC created on the image */ @@ -1137,7 +1137,7 @@ public Rectangle getBoundsInPixels() { return new Rectangle(0, 0, width, height); } int[] w = new int[1]; int[] h = new int[1]; - OS.gdk_pixmap_get_size(pixmap, w, h); + GDK.gdk_pixmap_get_size(pixmap, w, h); return new Rectangle(0, 0, width = w[0], height = h[0]); } @@ -1374,7 +1374,7 @@ void init(int width, int height) { this.type = SWT.BITMAP; /* Create the pixmap */ - surface = OS.gdk_window_create_similar_surface(OS.gdk_get_default_root_window(), Cairo.CAIRO_CONTENT_COLOR, width, height); + surface = GDK.gdk_window_create_similar_surface(GDK.gdk_get_default_root_window(), Cairo.CAIRO_CONTENT_COLOR, width, height); if (surface == 0) SWT.error(SWT.ERROR_NO_HANDLES); long /*int*/ cairo = Cairo.cairo_create(surface); if (cairo == 0) SWT.error(SWT.ERROR_NO_HANDLES); diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/graphics/Region.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/graphics/Region.java index f2a15a1ba8..4b895d9170 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/graphics/Region.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/graphics/Region.java @@ -81,7 +81,7 @@ public Region() { */ public Region(Device device) { super(device); - handle = OS.gdk_region_new(); + handle = GDK.gdk_region_new(); if (handle == 0) SWT.error(SWT.ERROR_NO_HANDLES); init(); } @@ -93,7 +93,7 @@ Region(Device device, long /*int*/ handle) { static long /*int*/ gdk_region_polygon(int[] pointArray, int npoints, int fill_rule) { if (!GTK.GTK3) { - return OS.gdk_region_polygon(pointArray, npoints, fill_rule); + return GDK.gdk_region_polygon(pointArray, npoints, fill_rule); } //TODO this does not perform well and could fail if the polygon is too big int minX = pointArray[0], maxX = minX; @@ -117,21 +117,21 @@ static long /*int*/ gdk_region_polygon(int[] pointArray, int npoints, int fill_r Cairo.cairo_close_path(cairo); Cairo.cairo_set_source_rgb(cairo, 1, 1, 1); int cairo_rule = Cairo.CAIRO_FILL_RULE_WINDING; - if (fill_rule == OS.GDK_EVEN_ODD_RULE) { + if (fill_rule == GDK.GDK_EVEN_ODD_RULE) { cairo_rule = Cairo.CAIRO_FILL_RULE_EVEN_ODD; } Cairo.cairo_set_fill_rule(cairo, cairo_rule); Cairo.cairo_fill(cairo); Cairo.cairo_destroy(cairo); - long /*int*/ polyRgn = OS.gdk_cairo_region_create_from_surface(surface); - OS.gdk_region_offset (polyRgn, minX, minY); + long /*int*/ polyRgn = GDK.gdk_cairo_region_create_from_surface(surface); + GDK.gdk_region_offset (polyRgn, minX, minY); Cairo.cairo_surface_destroy(surface); return polyRgn; } static void gdk_region_get_rectangles(long /*int*/ region, long /*int*/[] rectangles, int[] n_rectangles) { if (!GTK.GTK3) { - OS.gdk_region_get_rectangles (region, rectangles, n_rectangles); + GDK.gdk_region_get_rectangles (region, rectangles, n_rectangles); return; } int num = Cairo.cairo_region_num_rectangles (region); @@ -170,9 +170,9 @@ void addInPixels (int[] pointArray) { * with enough points for a polygon. */ if (pointArray.length < 6) return; - long /*int*/ polyRgn = gdk_region_polygon(pointArray, pointArray.length / 2, OS.GDK_EVEN_ODD_RULE); - OS.gdk_region_union(handle, polyRgn); - OS.gdk_region_destroy(polyRgn); + long /*int*/ polyRgn = gdk_region_polygon(pointArray, pointArray.length / 2, GDK.GDK_EVEN_ODD_RULE); + GDK.gdk_region_union(handle, polyRgn); + GDK.gdk_region_destroy(polyRgn); } /** @@ -227,7 +227,7 @@ void addInPixels(int x, int y, int width, int height) { gdkRect.y = y; gdkRect.width = width; gdkRect.height = height; - OS.gdk_region_union_with_rect(handle, gdkRect); + GDK.gdk_region_union_with_rect(handle, gdkRect); } /** @@ -249,7 +249,7 @@ public void add(Region region) { if (isDisposed()) SWT.error(SWT.ERROR_GRAPHIC_DISPOSED); if (region == null) SWT.error(SWT.ERROR_NULL_ARGUMENT); if (region.isDisposed()) SWT.error(SWT.ERROR_INVALID_ARGUMENT); - OS.gdk_region_union(handle, region.handle); + GDK.gdk_region_union(handle, region.handle); } /** @@ -270,7 +270,7 @@ public boolean contains(int x, int y) { return contains(new Point(x, y)); } boolean containsInPixels(int x, int y) { - return OS.gdk_region_point_in(handle, x, y); + return GDK.gdk_region_point_in(handle, x, y); } /** @@ -299,7 +299,7 @@ boolean containsInPixels(Point pt) { @Override void destroy() { - OS.gdk_region_destroy(handle); + GDK.gdk_region_destroy(handle); handle = 0; } @@ -340,7 +340,7 @@ public Rectangle getBounds() { } Rectangle getBoundsInPixels() { GdkRectangle gdkRect = new GdkRectangle(); - OS.gdk_region_get_clipbox(handle, gdkRect); + GDK.gdk_region_get_clipbox(handle, gdkRect); return new Rectangle(gdkRect.x, gdkRect.y, gdkRect.width, gdkRect.height); } @@ -435,9 +435,9 @@ void intersectInPixels(int x, int y, int width, int height) { gdkRect.y = y; gdkRect.width = width; gdkRect.height = height; - long /*int*/ rectRgn = OS.gdk_region_rectangle(gdkRect); - OS.gdk_region_intersect(handle, rectRgn); - OS.gdk_region_destroy(rectRgn); + long /*int*/ rectRgn = GDK.gdk_region_rectangle(gdkRect); + GDK.gdk_region_intersect(handle, rectRgn); + GDK.gdk_region_destroy(rectRgn); } /** @@ -461,7 +461,7 @@ public void intersect(Region region) { if (isDisposed()) SWT.error(SWT.ERROR_GRAPHIC_DISPOSED); if (region == null) SWT.error(SWT.ERROR_NULL_ARGUMENT); if (region.isDisposed()) SWT.error(SWT.ERROR_INVALID_ARGUMENT); - OS.gdk_region_intersect(handle, region.handle); + GDK.gdk_region_intersect(handle, region.handle); } /** @@ -492,7 +492,7 @@ boolean intersectsInPixels (int x, int y, int width, int height) { gdkRect.y = y; gdkRect.width = width; gdkRect.height = height; - return OS.gdk_region_rect_in(handle, gdkRect) != OS.GDK_OVERLAP_RECTANGLE_OUT; + return GDK.gdk_region_rect_in(handle, gdkRect) != GDK.GDK_OVERLAP_RECTANGLE_OUT; } /** * Returns <code>true</code> if the given rectangle intersects @@ -549,7 +549,7 @@ public boolean isDisposed() { */ public boolean isEmpty() { if (isDisposed()) SWT.error(SWT.ERROR_GRAPHIC_DISPOSED); - return OS.gdk_region_empty(handle); + return GDK.gdk_region_empty(handle); } /** @@ -580,9 +580,9 @@ void subtractInPixels (int[] pointArray) { * with enough points for a polygon. */ if (pointArray.length < 6) return; - long /*int*/ polyRgn = gdk_region_polygon(pointArray, pointArray.length / 2, OS.GDK_EVEN_ODD_RULE); - OS.gdk_region_subtract(handle, polyRgn); - OS.gdk_region_destroy(polyRgn); + long /*int*/ polyRgn = gdk_region_polygon(pointArray, pointArray.length / 2, GDK.GDK_EVEN_ODD_RULE); + GDK.gdk_region_subtract(handle, polyRgn); + GDK.gdk_region_destroy(polyRgn); } /** * Subtracts the given rectangle from the collection of polygons @@ -640,9 +640,9 @@ void subtractInPixels(int x, int y, int width, int height) { gdkRect.y = y; gdkRect.width = width; gdkRect.height = height; - long /*int*/ rectRgn = OS.gdk_region_rectangle(gdkRect); - OS.gdk_region_subtract(handle, rectRgn); - OS.gdk_region_destroy(rectRgn); + long /*int*/ rectRgn = GDK.gdk_region_rectangle(gdkRect); + GDK.gdk_region_subtract(handle, rectRgn); + GDK.gdk_region_destroy(rectRgn); } /** @@ -666,7 +666,7 @@ public void subtract(Region region) { if (isDisposed()) SWT.error(SWT.ERROR_GRAPHIC_DISPOSED); if (region == null) SWT.error(SWT.ERROR_NULL_ARGUMENT); if (region.isDisposed()) SWT.error(SWT.ERROR_INVALID_ARGUMENT); - OS.gdk_region_subtract(handle, region.handle); + GDK.gdk_region_subtract(handle, region.handle); } /** @@ -688,7 +688,7 @@ public void translate (int x, int y) { } void translateInPixels (int x, int y) { - OS.gdk_region_offset (handle, x, y); + GDK.gdk_region_offset (handle, x, y); } /** diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/graphics/TextLayout.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/graphics/TextLayout.java index 1f081ef238..286b94f4c1 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/graphics/TextLayout.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/graphics/TextLayout.java @@ -78,7 +78,7 @@ public final class TextLayout extends Resource { public TextLayout (Device device) { super(device); device = this.device; - context = OS.gdk_pango_context_get(); + context = GDK.gdk_pango_context_get(); if (context == 0) SWT.error(SWT.ERROR_NO_HANDLES); OS.pango_context_set_language(context, GTK.gtk_get_default_language()); OS.pango_context_set_base_dir(context, OS.PANGO_DIRECTION_LTR); @@ -614,9 +614,9 @@ void drawWithCairo(GC gc, int x, int y, int start, int end, boolean fullSelectio drawBorder(gc, x, y, null); } int[] ranges = new int[]{start, end}; - long /*int*/ rgn = OS.gdk_pango_layout_get_clip_region(layout, x, y, ranges, ranges.length / 2); + long /*int*/ rgn = GDK.gdk_pango_layout_get_clip_region(layout, x, y, ranges, ranges.length / 2); if (rgn != 0) { - OS.gdk_cairo_region(cairo, rgn); + GDK.gdk_cairo_region(cairo, rgn); Cairo.cairo_clip(cairo); if (GTK.GTK3) { Cairo.cairo_set_source_rgba(cairo, bg.handleRGBA.red, bg.handleRGBA.green, bg.handleRGBA.blue, bg.handleRGBA.alpha); @@ -624,7 +624,7 @@ void drawWithCairo(GC gc, int x, int y, int start, int end, boolean fullSelectio Cairo.cairo_set_source_rgba(cairo, (bg.handle.red & 0xFFFF) / (float)0xFFFF, (bg.handle.green & 0xFFFF) / (float)0xFFFF, (bg.handle.blue & 0xFFFF) / (float)0xFFFF, data.alpha / (float)0xFF); } Cairo.cairo_paint(cairo); - OS.gdk_region_destroy(rgn); + GDK.gdk_region_destroy(rgn); } if (GTK.GTK3) { Cairo.cairo_set_source_rgba(cairo, fg.handleRGBA.red, fg.handleRGBA.green, fg.handleRGBA.blue, fg.handleRGBA.alpha); @@ -661,7 +661,7 @@ void drawBorder(GC gc, int x, int y, Color selectionColor) { int byteStart = (int)/*64*/(OS.g_utf16_offset_to_pointer(ptr, start) - ptr); int byteEnd = (int)/*64*/(OS.g_utf16_offset_to_pointer(ptr, end + 1) - ptr); int[] ranges = new int[]{byteStart, byteEnd}; - long /*int*/ rgn = OS.gdk_pango_layout_get_clip_region(layout, x, y, ranges, ranges.length / 2); + long /*int*/ rgn = GDK.gdk_pango_layout_get_clip_region(layout, x, y, ranges, ranges.length / 2); if (rgn != 0) { int[] nRects = new int[1]; long /*int*/[] rects = new long /*int*/[1]; @@ -708,7 +708,7 @@ void drawBorder(GC gc, int x, int y, Color selectionColor) { } Cairo.cairo_stroke(cairo); if (rects[0] != 0) OS.g_free(rects[0]); - OS.gdk_region_destroy(rgn); + GDK.gdk_region_destroy(rgn); } } } @@ -845,7 +845,7 @@ Rectangle getBoundsInPixels(int start, int end) { byteStart = Math.min(byteStart, strlen); byteEnd = Math.min(byteEnd, strlen); int[] ranges = new int[]{byteStart, byteEnd}; - long /*int*/ clipRegion = OS.gdk_pango_layout_get_clip_region(layout, 0, 0, ranges, 1); + long /*int*/ clipRegion = GDK.gdk_pango_layout_get_clip_region(layout, 0, 0, ranges, 1); if (clipRegion == 0) return new Rectangle(0, 0, 0, 0); GdkRectangle rect = new GdkRectangle(); @@ -857,7 +857,7 @@ Rectangle getBoundsInPixels(int start, int end) { PangoRectangle pangoRect = new PangoRectangle(); long /*int*/ iter = OS.pango_layout_get_iter(layout); if (iter == 0) SWT.error(SWT.ERROR_NO_HANDLES); - long /*int*/ linesRegion = OS.gdk_region_new(); + long /*int*/ linesRegion = GDK.gdk_region_new(); if (linesRegion == 0) SWT.error(SWT.ERROR_NO_HANDLES); int lineEnd = 0; do { @@ -872,14 +872,14 @@ Rectangle getBoundsInPixels(int start, int end) { rect.y = OS.PANGO_PIXELS(pangoRect.y); rect.width = OS.PANGO_PIXELS(pangoRect.width); rect.height = OS.PANGO_PIXELS(pangoRect.height); - OS.gdk_region_union_with_rect(linesRegion, rect); + GDK.gdk_region_union_with_rect(linesRegion, rect); } while (lineEnd + 1 <= byteEnd); - OS.gdk_region_intersect(clipRegion, linesRegion); - OS.gdk_region_destroy(linesRegion); + GDK.gdk_region_intersect(clipRegion, linesRegion); + GDK.gdk_region_destroy(linesRegion); OS.pango_layout_iter_free(iter); - OS.gdk_region_get_clipbox(clipRegion, rect); - OS.gdk_region_destroy(clipRegion); + GDK.gdk_region_get_clipbox(clipRegion, rect); + GDK.gdk_region_destroy(clipRegion); if (OS.pango_context_get_base_dir(context) == OS.PANGO_DIRECTION_RTL) { rect.x = width() - rect.x - rect.width; } diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/internal/ImageList.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/internal/ImageList.java index ea88e4dbba..a8853fc651 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/internal/ImageList.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/internal/ImageList.java @@ -52,10 +52,10 @@ public static long /*int*/ createPixbuf(Image image) { int width = Cairo.cairo_image_surface_get_width(surface); int height = Cairo.cairo_image_surface_get_height(surface); boolean hasAlpha = format == Cairo.CAIRO_FORMAT_ARGB32; - long /*int*/ pixbuf = OS.gdk_pixbuf_new (OS.GDK_COLORSPACE_RGB, hasAlpha, 8, width, height); + long /*int*/ pixbuf = GDK.gdk_pixbuf_new (GDK.GDK_COLORSPACE_RGB, hasAlpha, 8, width, height); if (pixbuf == 0) SWT.error (SWT.ERROR_NO_HANDLES); - int stride = OS.gdk_pixbuf_get_rowstride (pixbuf); - long /*int*/ pixels = OS.gdk_pixbuf_get_pixels (pixbuf); + int stride = GDK.gdk_pixbuf_get_rowstride (pixbuf); + long /*int*/ pixels = GDK.gdk_pixbuf_get_pixels (pixbuf); int oa, or, og, ob; if (OS.BIG_ENDIAN) { oa = 0; or = 1; og = 2; ob = 3; @@ -188,21 +188,21 @@ public void remove (Image image) { void set (int index, Image image) { long /*int*/ pixbuf = createPixbuf (image); - int w = OS.gdk_pixbuf_get_width(pixbuf); - int h = OS.gdk_pixbuf_get_height(pixbuf); + int w = GDK.gdk_pixbuf_get_width(pixbuf); + int h = GDK.gdk_pixbuf_get_height(pixbuf); if (width == -1 || height == -1) { width = w; height = h; } if (w != width || h != height) { - long /*int*/ scaledPixbuf = OS.gdk_pixbuf_scale_simple(pixbuf, width, height, OS.GDK_INTERP_BILINEAR); + long /*int*/ scaledPixbuf = GDK.gdk_pixbuf_scale_simple(pixbuf, width, height, GDK.GDK_INTERP_BILINEAR); OS.g_object_unref (pixbuf); pixbuf = scaledPixbuf; } long /*int*/ oldPixbuf = pixbufs [index]; if (oldPixbuf != 0) { if (images [index] == image) { - OS.gdk_pixbuf_copy_area (pixbuf, 0, 0, width, height, oldPixbuf, 0, 0); + GDK.gdk_pixbuf_copy_area (pixbuf, 0, 0, width, height, oldPixbuf, 0, 0); OS.g_object_unref (pixbuf); pixbuf = oldPixbuf; } else { diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Button.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Button.java index 54c75f285f..a431f6c4c8 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Button.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Button.java @@ -184,7 +184,7 @@ void connectPaint () { * is drawn on the Button is not re-drawn. See bug 483791. */ if (GTK.GTK_VERSION >= OS.VERSION (3, 9, 0) && boxHandle != 0) { - int paintMask = OS.GDK_EXPOSURE_MASK; + int paintMask = GDK.GDK_EXPOSURE_MASK; GTK.gtk_widget_add_events (boxHandle, paintMask); OS.g_signal_connect_closure_by_id (boxHandle, display.signalIds [DRAW], 0, display.getClosure (EXPOSE_EVENT_INVERSE), false); diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Canvas.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Canvas.java index d65a08e66b..cdfb57c867 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Canvas.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Canvas.java @@ -335,9 +335,9 @@ void scrollInPixels (int destX, int destY, int x, int y, int width, int height, long /*int*/ window = paintWindow (); long /*int*/ visibleRegion; if (GTK.GTK3) { - visibleRegion = OS.gdk_window_get_visible_region (window); + visibleRegion = GDK.gdk_window_get_visible_region (window); } else { - visibleRegion = OS.gdk_drawable_get_visible_region (window); + visibleRegion = GDK.gdk_drawable_get_visible_region (window); } GdkRectangle srcRect = new GdkRectangle (); srcRect.x = x; @@ -371,13 +371,13 @@ void scrollInPixels (int destX, int destY, int x, int y, int width, int height, } srcRect.width = width; srcRect.height = height; - long /*int*/ copyRegion = OS.gdk_region_rectangle (srcRect); - OS.gdk_region_intersect(copyRegion, visibleRegion); - long /*int*/ invalidateRegion = OS.gdk_region_rectangle (srcRect); - OS.gdk_region_subtract (invalidateRegion, visibleRegion); - OS.gdk_region_offset (invalidateRegion, deltaX, deltaY); + long /*int*/ copyRegion = GDK.gdk_region_rectangle (srcRect); + GDK.gdk_region_intersect(copyRegion, visibleRegion); + long /*int*/ invalidateRegion = GDK.gdk_region_rectangle (srcRect); + GDK.gdk_region_subtract (invalidateRegion, visibleRegion); + GDK.gdk_region_offset (invalidateRegion, deltaX, deltaY); GdkRectangle copyRect = new GdkRectangle(); - OS.gdk_region_get_clipbox (copyRegion, copyRect); + GDK.gdk_region_get_clipbox (copyRegion, copyRect); if (copyRect.width != 0 && copyRect.height != 0) { update (); } @@ -387,12 +387,12 @@ void scrollInPixels (int destX, int destY, int x, int y, int width, int height, redrawWidget (x, y, width, height, false, false, false); redrawWidget (destX, destY, width, height, false, false, false); } else { - long /*int*/ cairo = OS.gdk_cairo_create(window); + long /*int*/ cairo = GDK.gdk_cairo_create(window); if (Cairo.cairo_version() < Cairo.CAIRO_VERSION_ENCODE(1, 12, 0)) { - OS.gdk_cairo_set_source_window(cairo, window, 0, 0); + GDK.gdk_cairo_set_source_window(cairo, window, 0, 0); } else { Cairo.cairo_push_group(cairo); - OS.gdk_cairo_set_source_window(cairo, window, 0, 0); + GDK.gdk_cairo_set_source_window(cairo, window, 0, 0); Cairo.cairo_paint(cairo); Cairo.cairo_pop_group_to_source(cairo); } @@ -409,7 +409,7 @@ void scrollInPixels (int destX, int destY, int x, int y, int width, int height, rect.y = y; rect.width = width; rect.height = height; - OS.gdk_region_union_with_rect (invalidateRegion, rect); + GDK.gdk_region_union_with_rect (invalidateRegion, rect); } else { GdkRectangle rect = new GdkRectangle (); if (deltaX != 0) { @@ -419,7 +419,7 @@ void scrollInPixels (int destX, int destY, int x, int y, int width, int height, rect.y = y; rect.width = Math.abs(deltaX); rect.height = height; - OS.gdk_region_union_with_rect (invalidateRegion, rect); + GDK.gdk_region_union_with_rect (invalidateRegion, rect); } if (deltaY != 0) { int newY = destY - deltaY; @@ -428,14 +428,14 @@ void scrollInPixels (int destX, int destY, int x, int y, int width, int height, rect.y = newY; rect.width = width; rect.height = Math.abs(deltaY); - OS.gdk_region_union_with_rect (invalidateRegion, rect); + GDK.gdk_region_union_with_rect (invalidateRegion, rect); } } - OS.gdk_window_invalidate_region(window, invalidateRegion, all); + GDK.gdk_window_invalidate_region(window, invalidateRegion, all); } - OS.gdk_region_destroy (visibleRegion); - OS.gdk_region_destroy (copyRegion); - OS.gdk_region_destroy (invalidateRegion); + GDK.gdk_region_destroy (visibleRegion); + GDK.gdk_region_destroy (copyRegion); + GDK.gdk_region_destroy (invalidateRegion); if (all) { Control [] children = _getChildren (); for (int i=0; i<children.length; i++) { diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Caret.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Caret.java index 8a699e4947..d7b5cd6b4a 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Caret.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Caret.java @@ -101,7 +101,7 @@ boolean drawCaret () { if (parent.isDisposed ()) return false; if (GTK.GTK_VERSION < OS.VERSION (3, 22, 0)) { long /*int*/ window = parent.paintWindow (); - long /*int*/ cairo = OS.gdk_cairo_create(window); + long /*int*/ cairo = GDK.gdk_cairo_create(window); if (cairo == 0) error(SWT.ERROR_NO_HANDLES); Cairo.cairo_set_source_rgba(cairo, 1.0, 1.0, 1.0, 1.0); Cairo.cairo_set_operator(cairo, Cairo.CAIRO_OPERATOR_DIFFERENCE); diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/ColorDialog.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/ColorDialog.java index cd4655d1b1..397a74a6ff 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/ColorDialog.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/ColorDialog.java @@ -240,7 +240,7 @@ public RGB open () { * code outside of SWT (i.e AWT, etc). It ensures that the current * thread leaves the GTK lock acquired by the function above. */ - OS.gdk_threads_leave(); + GDK.gdk_threads_leave(); display.sendPostExternalEventDispatchEvent (); if ((style & SWT.RIGHT_TO_LEFT) != 0) { OS.g_signal_remove_emission_hook (signalId, hookId); @@ -286,7 +286,7 @@ public RGB open () { for (int i=0; i<length; i++) { String colorString = gdkColorStrings[i]; buffer = Converter.wcsToMbcs (colorString, true); - OS.gdk_color_parse(buffer, color); + GDK.gdk_color_parse(buffer, color); int redI = (color.red >> 8) & 0xFF; int greenI = (color.green >> 8) & 0xFF; int blueI = (color.blue >> 8) & 0xFF; diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Combo.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Combo.java index 1b3f181536..b2174e230c 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Combo.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Combo.java @@ -555,7 +555,7 @@ void deregister () { @Override boolean filterKey (int keyval, long /*int*/ event) { - int time = OS.gdk_event_get_time (event); + int time = GDK.gdk_event_get_time (event); if (time != lastEventTime) { lastEventTime = time; long /*int*/ imContext = imContext (); @@ -744,7 +744,7 @@ void hookEvents () { } void hookEvents(long /*int*/ [] handles) { - int eventMask = OS.GDK_POINTER_MOTION_MASK | OS.GDK_BUTTON_PRESS_MASK | OS.GDK_BUTTON_RELEASE_MASK; + int eventMask = GDK.GDK_POINTER_MOTION_MASK | GDK.GDK_BUTTON_PRESS_MASK | GDK.GDK_BUTTON_RELEASE_MASK; for (int i=0; i<handles.length; i++) { long /*int*/ eventHandle = handles [i]; if (eventHandle != 0) { @@ -1232,7 +1232,7 @@ long /*int*/ gtk_button_press_event (long /*int*/ widget, long /*int*/ event) { */ GdkEventButton gdkEvent = new GdkEventButton (); OS.memmove (gdkEvent, event, GdkEventButton.sizeof); - if (gdkEvent.type == OS.GDK_BUTTON_PRESS && gdkEvent.button == 1) { + if (gdkEvent.type == GDK.GDK_BUTTON_PRESS && gdkEvent.button == 1) { return gtk_button_press_event(widget, event, false); } return super.gtk_button_press_event (widget, event); @@ -1274,11 +1274,11 @@ long /*int*/ gtk_changed (long /*int*/ widget) { GdkEventKey gdkEvent = new GdkEventKey (); OS.memmove (gdkEvent, eventPtr, GdkEventKey.sizeof); switch (gdkEvent.type) { - case OS.GDK_KEY_PRESS: + case GDK.GDK_KEY_PRESS: keyPress = true; break; } - OS.gdk_event_free (eventPtr); + GDK.gdk_event_free (eventPtr); } if (keyPress) { postEvent (SWT.Modify); @@ -1371,7 +1371,7 @@ long /*int*/ gtk_event_after (long /*int*/ widget, long /*int*/ gdkEvent) { GdkEvent event = new GdkEvent (); OS.memmove (event, gdkEvent, GdkEvent.sizeof); switch (event.type) { - case OS.GDK_BUTTON_PRESS: { + case GDK.GDK_BUTTON_PRESS: { GdkEventButton gdkEventButton = new GdkEventButton (); OS.memmove (gdkEventButton, gdkEvent, GdkEventButton.sizeof); if (gdkEventButton.button == 1) { @@ -1384,7 +1384,7 @@ long /*int*/ gtk_event_after (long /*int*/ widget, long /*int*/ gdkEvent) { } break; } - case OS.GDK_FOCUS_CHANGE: { + case GDK.GDK_FOCUS_CHANGE: { if ((style & SWT.READ_ONLY) == 0) { GdkEventFocus gdkEventFocus = new GdkEventFocus (); OS.memmove (gdkEventFocus, gdkEvent, GdkEventFocus.sizeof); @@ -1472,14 +1472,14 @@ long /*int*/ gtk_key_press_event (long /*int*/ widget, long /*int*/ event) { int newIndex = oldIndex; int key = keyEvent.keyval; switch (key) { - case OS.GDK_Down: - case OS.GDK_KP_Down: + case GDK.GDK_Down: + case GDK.GDK_KP_Down: if (oldIndex != (items.length - 1)) { newIndex = oldIndex + 1; } break; - case OS.GDK_Up: - case OS.GDK_KP_Up: + case GDK.GDK_Up: + case GDK.GDK_KP_Up: if (oldIndex != -1 && oldIndex != 0) { newIndex = oldIndex - 1; } @@ -1490,12 +1490,12 @@ long /*int*/ gtk_key_press_event (long /*int*/ widget, long /*int*/ event) { * a page at a time. The fix is to emulate this behavior for * gtk_combo_box_entry. */ - case OS.GDK_Page_Up: - case OS.GDK_KP_Page_Up: + case GDK.GDK_Page_Up: + case GDK.GDK_KP_Page_Up: newIndex = 0; break; - case OS.GDK_Page_Down: - case OS.GDK_KP_Page_Down: + case GDK.GDK_Page_Down: + case GDK.GDK_KP_Page_Down: newIndex = items.length - 1; break; } @@ -1599,7 +1599,7 @@ long /*int*/ paintWindow () { GTK.gtk_widget_realize (childHandle); long /*int*/ window = gtk_widget_get_window (childHandle); if ((style & SWT.READ_ONLY) != 0) return window; - long /*int*/ children = OS.gdk_window_get_children (window); + long /*int*/ children = GDK.gdk_window_get_children (window); if (children != 0) { /* * The only direct child of GtkComboBox since 3.20 is GtkBox thus the children @@ -2338,8 +2338,8 @@ boolean checkSubwindow () { boolean translateTraversal (GdkEventKey keyEvent) { int key = keyEvent.keyval; switch (key) { - case OS.GDK_KP_Enter: - case OS.GDK_Return: { + case GDK.GDK_KP_Enter: + case GDK.GDK_Return: { long /*int*/ imContext = imContext (); if (imContext != 0) { long /*int*/ [] preeditString = new long /*int*/ [1]; @@ -2366,11 +2366,11 @@ String verifyText (String string, int start, int end) { GdkEventKey gdkEvent = new GdkEventKey (); OS.memmove (gdkEvent, eventPtr, GdkEventKey.sizeof); switch (gdkEvent.type) { - case OS.GDK_KEY_PRESS: + case GDK.GDK_KEY_PRESS: setKeyState (event, gdkEvent); break; } - OS.gdk_event_free (eventPtr); + GDK.gdk_event_free (eventPtr); } /* * It is possible (but unlikely), that application diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Composite.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Composite.java index e88356b997..261911403e 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Composite.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Composite.java @@ -408,11 +408,11 @@ void drawBackgroundInPixels (GC gc, int x, int y, int width, int height, int off if (surface == 0) { long /*int*/ drawable = control.backgroundImage.pixmap; int [] w = new int [1], h = new int [1]; - OS.gdk_pixmap_get_size (drawable, w, h); + GDK.gdk_pixmap_get_size (drawable, w, h); if (OS.isX11()) { - long /*int*/ xDisplay = OS.gdk_x11_display_get_xdisplay(OS.gdk_display_get_default()); - long /*int*/ xVisual = OS.gdk_x11_visual_get_xvisual (OS.gdk_visual_get_system()); - long /*int*/ xDrawable = OS.GDK_PIXMAP_XID (drawable); + long /*int*/ xDisplay = GDK.gdk_x11_display_get_xdisplay(GDK.gdk_display_get_default()); + long /*int*/ xVisual = GDK.gdk_x11_visual_get_xvisual (GDK.gdk_visual_get_system()); + long /*int*/ xDrawable = GDK.GDK_PIXMAP_XID (drawable); surface = Cairo.cairo_xlib_surface_create (xDisplay, xDrawable, xVisual, w [0], h [0]); } else { surface = Cairo.cairo_image_surface_create(Cairo.CAIRO_FORMAT_ARGB32, w [0], h [0]); @@ -531,15 +531,15 @@ void fixZOrder () { long /*int*/ parentWindow = gtk_widget_get_window (parentHandle); if (parentWindow == 0) return; long /*int*/ [] userData = new long /*int*/ [1]; - long /*int*/ windowList = OS.gdk_window_get_children (parentWindow); + long /*int*/ windowList = GDK.gdk_window_get_children (parentWindow); if (windowList != 0) { long /*int*/ windows = windowList; while (windows != 0) { long /*int*/ window = OS.g_list_data (windows); if (window != redrawWindow) { - OS.gdk_window_get_user_data (window, userData); + GDK.gdk_window_get_user_data (window, userData); if (userData [0] == 0 || OS.G_OBJECT_TYPE (userData [0]) != display.gtk_fixed_get_type ()) { - OS.gdk_window_lower (window); + GDK.gdk_window_lower (window); } } windows = OS.g_list_next (windows); @@ -740,21 +740,21 @@ long /*int*/ gtk_expose_event (long /*int*/ widget, long /*int*/ eventPtr) { OS.memmove(gdkEvent, eventPtr, GdkEventExpose.sizeof); long /*int*/ [] rectangles = new long /*int*/ [1]; int [] n_rectangles = new int [1]; - OS.gdk_region_get_rectangles (gdkEvent.region, rectangles, n_rectangles); + GDK.gdk_region_get_rectangles (gdkEvent.region, rectangles, n_rectangles); GdkRectangle rect = new GdkRectangle (); for (int i=0; i<n_rectangles[0]; i++) { Event event = new Event (); OS.memmove (rect, rectangles [0] + i * GdkRectangle.sizeof, GdkRectangle.sizeof); event.setBounds (DPIUtil.autoScaleDown (new Rectangle(rect.x, rect.y, rect.width, rect.height))); if ((style & SWT.MIRRORED) != 0) event.x = DPIUtil.autoScaleDown (getClientWidth ()) - event.width - event.x; - long /*int*/ damageRgn = OS.gdk_region_new (); - OS.gdk_region_union_with_rect (damageRgn, rect); + long /*int*/ damageRgn = GDK.gdk_region_new (); + GDK.gdk_region_union_with_rect (damageRgn, rect); GCData data = new GCData (); data.damageRgn = damageRgn; GC gc = event.gc = GC.gtk_new (this, data); sendEvent (SWT.Paint, event); gc.dispose (); - OS.gdk_region_destroy (damageRgn); + GDK.gdk_region_destroy (damageRgn); event.gc = null; } OS.g_free (rectangles [0]); @@ -776,8 +776,8 @@ long /*int*/ gtk_key_press_event (long /*int*/ widget, long /*int*/ event) { OS.memmove (keyEvent, event, GdkEventKey.sizeof); int key = keyEvent.keyval; switch (key) { - case OS.GDK_Return: - case OS.GDK_KP_Enter: return 1; + case GDK.GDK_Return: + case GDK.GDK_KP_Enter: return 1; } } return result; @@ -814,9 +814,9 @@ long /*int*/ gtk_realize (long /*int*/ widget) { long /*int*/ window = gtk_widget_get_window (paintHandle ()); if (window != 0) { if (GTK.GTK3) { - OS.gdk_window_set_background_pattern(window, 0); + GDK.gdk_window_set_background_pattern(window, 0); } else { - OS.gdk_window_set_back_pixmap (window, 0, false); + GDK.gdk_window_set_back_pixmap (window, 0, false); } } } @@ -838,7 +838,7 @@ long /*int*/ gtk_style_set (long /*int*/ widget, long /*int*/ previousStyle) { long /*int*/ result = super.gtk_style_set (widget, previousStyle); if ((style & SWT.NO_BACKGROUND) != 0) { long /*int*/ window = gtk_widget_get_window (paintHandle ()); - if (window != 0) OS.gdk_window_set_back_pixmap (window, 0, false); + if (window != 0) GDK.gdk_window_set_back_pixmap (window, 0, false); } return result; } @@ -851,7 +851,7 @@ boolean hasBorder () { void hookEvents () { super.hookEvents (); if ((state & CANVAS) != 0) { - GTK.gtk_widget_add_events (handle, OS.GDK_POINTER_MOTION_HINT_MASK); + GTK.gtk_widget_add_events (handle, GDK.GDK_POINTER_MOTION_HINT_MASK); if (scrolledHandle != 0) { OS.g_signal_connect_closure (scrolledHandle, OS.scroll_child, display.getClosure (SCROLL_CHILD), false); } @@ -1293,7 +1293,7 @@ void moveChildren(int oldWidth) { int clientWidth = getClientWidth (); x = clientWidth - controlWidth - x; if (child.enableWindow != 0) { - OS.gdk_window_move (child.enableWindow, x, y); + GDK.gdk_window_move (child.enableWindow, x, y); } child.moveHandle (x, y); /* diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Control.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Control.java index 0bcce5b60c..11a7ccf09f 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Control.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Control.java @@ -133,7 +133,7 @@ public Control (Composite parent, int style) { void connectPaint () { long /*int*/ paintHandle = paintHandle (); - int paintMask = OS.GDK_EXPOSURE_MASK; + int paintMask = GDK.GDK_EXPOSURE_MASK; GTK.gtk_widget_add_events (paintHandle, paintMask); OS.g_signal_connect_closure_by_id (paintHandle, display.signalIds [DRAW], 0, display.getClosure (EXPOSE_EVENT_INVERSE), false); @@ -163,10 +163,10 @@ void drawBackground (Control control, long /*int*/ window, long /*int*/ region, } void drawBackground (Control control, long /*int*/ window, long /*int*/ cr, long /*int*/ region, int x, int y, int width, int height) { - long /*int*/ cairo = cr != 0 ? cr : OS.gdk_cairo_create(window); + long /*int*/ cairo = cr != 0 ? cr : GDK.gdk_cairo_create(window); if (cairo == 0) error (SWT.ERROR_NO_HANDLES); if (region != 0) { - OS.gdk_cairo_region(cairo, region); + GDK.gdk_cairo_region(cairo, region); Cairo.cairo_clip(cairo); } if (control.backgroundImage != null) { @@ -338,7 +338,7 @@ boolean hasFocus () { void hookEvents () { /* Connect the keyboard signals */ long /*int*/ focusHandle = focusHandle (); - int focusMask = OS.GDK_KEY_PRESS_MASK | OS.GDK_KEY_RELEASE_MASK | OS.GDK_FOCUS_CHANGE_MASK; + int focusMask = GDK.GDK_KEY_PRESS_MASK | GDK.GDK_KEY_RELEASE_MASK | GDK.GDK_FOCUS_CHANGE_MASK; GTK.gtk_widget_add_events (focusHandle, focusMask); OS.g_signal_connect_closure_by_id (focusHandle, display.signalIds [POPUP_MENU], 0, display.getClosure (POPUP_MENU), false); OS.g_signal_connect_closure_by_id (focusHandle, display.signalIds [SHOW_HELP], 0, display.getClosure (SHOW_HELP), false); @@ -350,7 +350,7 @@ void hookEvents () { /* Connect the mouse signals */ long /*int*/ eventHandle = eventHandle (); - int eventMask = OS.GDK_POINTER_MOTION_MASK | OS.GDK_BUTTON_PRESS_MASK | OS.GDK_BUTTON_RELEASE_MASK | OS.GDK_SCROLL_MASK | OS.GDK_SMOOTH_SCROLL_MASK; + int eventMask = GDK.GDK_POINTER_MOTION_MASK | GDK.GDK_BUTTON_PRESS_MASK | GDK.GDK_BUTTON_RELEASE_MASK | GDK.GDK_SCROLL_MASK | GDK.GDK_SMOOTH_SCROLL_MASK; GTK.gtk_widget_add_events (eventHandle, eventMask); OS.g_signal_connect_closure_by_id (eventHandle, display.signalIds [BUTTON_PRESS_EVENT], 0, display.getClosure (BUTTON_PRESS_EVENT), false); OS.g_signal_connect_closure_by_id (eventHandle, display.signalIds [BUTTON_RELEASE_EVENT], 0, display.getClosure (BUTTON_RELEASE_EVENT), false); @@ -359,7 +359,7 @@ void hookEvents () { /* Connect enter/exit signals */ long /*int*/ enterExitHandle = enterExitHandle (); - int enterExitMask = OS.GDK_ENTER_NOTIFY_MASK | OS.GDK_LEAVE_NOTIFY_MASK; + int enterExitMask = GDK.GDK_ENTER_NOTIFY_MASK | GDK.GDK_LEAVE_NOTIFY_MASK; GTK.gtk_widget_add_events (enterExitHandle, enterExitMask); OS.g_signal_connect_closure_by_id (enterExitHandle, display.signalIds [ENTER_NOTIFY_EVENT], 0, display.getClosure (ENTER_NOTIFY_EVENT), false); OS.g_signal_connect_closure_by_id (enterExitHandle, display.signalIds [LEAVE_NOTIFY_EVENT], 0, display.getClosure (LEAVE_NOTIFY_EVENT), false); @@ -485,10 +485,10 @@ public boolean print (GC gc) { } long /*int*/ window = gtk_widget_get_window (topHandle); GCData data = gc.getGCData (); - OS.gdk_window_process_updates (window, true); + GDK.gdk_window_process_updates (window, true); long /*int*/ drawable = data.drawable; - if (drawable == 0) drawable = OS.gdk_get_default_root_window(); - printWidget (gc, drawable, OS.gdk_drawable_get_depth (drawable), 0, 0); + if (drawable == 0) drawable = GDK.gdk_get_default_root_window(); + printWidget (gc, drawable, GDK.gdk_drawable_get_depth (drawable), 0, 0); return true; } @@ -502,35 +502,35 @@ void printWidget (GC gc, long /*int*/ drawable, int depth, int x, int y) { } void printWindow (boolean first, Control control, GC gc, long /*int*/ drawable, int depth, long /*int*/ window, int x, int y) { - if (OS.gdk_drawable_get_depth (window) != depth) return; + if (GDK.gdk_drawable_get_depth (window) != depth) return; GdkRectangle rect = new GdkRectangle (); int [] width = new int [1], height = new int [1]; gdk_window_get_size (window, width, height); rect.width = width [0]; rect.height = height [0]; - OS.gdk_window_begin_paint_rect (window, rect); + GDK.gdk_window_begin_paint_rect (window, rect); long /*int*/ [] real_drawable = new long /*int*/ [1]; int [] x_offset = new int [1], y_offset = new int [1]; - OS.gdk_window_get_internal_paint_info (window, real_drawable, x_offset, y_offset); + GDK.gdk_window_get_internal_paint_info (window, real_drawable, x_offset, y_offset); long /*int*/ [] userData = new long /*int*/ [1]; - OS.gdk_window_get_user_data (window, userData); + GDK.gdk_window_get_user_data (window, userData); if (userData [0] != 0) { - long /*int*/ eventPtr = OS.gdk_event_new (OS.GDK_EXPOSE); + long /*int*/ eventPtr = GDK.gdk_event_new (GDK.GDK_EXPOSE); GdkEventExpose event = new GdkEventExpose (); - event.type = OS.GDK_EXPOSE; + event.type = GDK.GDK_EXPOSE; event.window = OS.g_object_ref (window); event.area_width = rect.width; event.area_height = rect.height; - event.region = OS.gdk_region_rectangle (rect); + event.region = GDK.gdk_region_rectangle (rect); OS.memmove (eventPtr, event, GdkEventExpose.sizeof); GTK.gtk_widget_send_expose (userData [0], eventPtr); - OS.gdk_event_free (eventPtr); + GDK.gdk_event_free (eventPtr); } int destX = x, destY = y, destWidth = width [0], destHeight = height [0]; if (!first) { int [] cX = new int [1], cY = new int [1]; - OS.gdk_window_get_position (window, cX, cY); - long /*int*/ parentWindow = OS.gdk_window_get_parent (window); + GDK.gdk_window_get_position (window, cX, cY); + long /*int*/ parentWindow = GDK.gdk_window_get_parent (window); int [] pW = new int [1], pH = new int [1]; gdk_window_get_size (parentWindow, pW, pH); destX = x - cX [0]; @@ -540,9 +540,9 @@ void printWindow (boolean first, Control control, GC gc, long /*int*/ drawable, } GCData gcData = gc.getGCData(); long /*int*/ cairo = gcData.cairo; - long /*int*/ xDisplay = OS.gdk_x11_display_get_xdisplay(OS.gdk_display_get_default()); - long /*int*/ xVisual = OS.gdk_x11_visual_get_xvisual(OS.gdk_visual_get_system()); - long /*int*/ xDrawable = OS.GDK_PIXMAP_XID(real_drawable [0]); + long /*int*/ xDisplay = GDK.gdk_x11_display_get_xdisplay(GDK.gdk_display_get_default()); + long /*int*/ xVisual = GDK.gdk_x11_visual_get_xvisual(GDK.gdk_visual_get_system()); + long /*int*/ xDrawable = GDK.GDK_PIXMAP_XID(real_drawable [0]); long /*int*/ surface = Cairo.cairo_xlib_surface_create(xDisplay, xDrawable, xVisual, width [0], height [0]); if (surface == 0) error(SWT.ERROR_NO_HANDLES); Cairo.cairo_save(cairo); @@ -561,20 +561,20 @@ void printWindow (boolean first, Control control, GC gc, long /*int*/ drawable, Cairo.cairo_restore(cairo); Cairo.cairo_pattern_destroy(pattern); Cairo.cairo_surface_destroy(surface); - OS.gdk_window_end_paint (window); - long /*int*/ children = OS.gdk_window_get_children (window); + GDK.gdk_window_end_paint (window); + long /*int*/ children = GDK.gdk_window_get_children (window); if (children != 0) { long /*int*/ windows = children; while (windows != 0) { long /*int*/ child = OS.g_list_data (windows); - if (OS.gdk_window_is_visible (child)) { + if (GDK.gdk_window_is_visible (child)) { long /*int*/ [] data = new long /*int*/ [1]; - OS.gdk_window_get_user_data (child, data); + GDK.gdk_window_get_user_data (child, data); if (data [0] != 0) { Widget widget = display.findWidget (data [0]); if (widget == null || widget == control) { int [] x_pos = new int [1], y_pos = new int [1]; - OS.gdk_window_get_position (child, x_pos, y_pos); + GDK.gdk_window_get_position (child, x_pos, y_pos); printWindow (false, control, gc, drawable, depth, child, x + x_pos [0], y + y_pos [0]); } } @@ -972,7 +972,7 @@ void modifyStyle (long /*int*/ handle, long /*int*/ style) { * has had a region set on it, the region is lost. The * fix is to set the region again. */ - if (region != null) OS.gdk_window_shape_combine_region (gtk_widget_get_window (topHandle ()), region.handle, 0, 0); + if (region != null) GDK.gdk_window_shape_combine_region (gtk_widget_get_window (topHandle ()), region.handle, 0, 0); } void moveHandle (int x, int y) { @@ -1059,7 +1059,7 @@ int setBounds (int x, int y, int width, int height, boolean move, boolean resize sameOrigin = x == oldX && y == oldY; if (!sameOrigin) { if (enableWindow != 0) { - OS.gdk_window_move (enableWindow, x, y); + GDK.gdk_window_move (enableWindow, x, y); } moveHandle (x, y); } @@ -1074,10 +1074,10 @@ int setBounds (int x, int y, int width, int height, boolean move, boolean resize int newWidth = Math.max (1, width); int newHeight = Math.max (1, height); if (redrawWindow != 0) { - OS.gdk_window_resize (redrawWindow, newWidth, newHeight); + GDK.gdk_window_resize (redrawWindow, newWidth, newHeight); } if (enableWindow != 0) { - OS.gdk_window_resize (enableWindow, newWidth, newHeight); + GDK.gdk_window_resize (enableWindow, newWidth, newHeight); } resizeHandle (newWidth, newHeight); } @@ -1122,13 +1122,13 @@ int setBounds (int x, int y, int width, int height, boolean move, boolean resize state = (height == 0) ? state | ZERO_HEIGHT : state & ~ZERO_HEIGHT; if ((state & (ZERO_WIDTH | ZERO_HEIGHT)) != 0) { if (enableWindow != 0) { - OS.gdk_window_hide (enableWindow); + GDK.gdk_window_hide (enableWindow); } GTK.gtk_widget_hide (topHandle); } else { if ((state & HIDDEN) == 0) { if (enableWindow != 0) { - OS.gdk_window_show_unraised (enableWindow); + GDK.gdk_window_show_unraised (enableWindow); } GTK.gtk_widget_show (topHandle); } @@ -1322,7 +1322,7 @@ public void setRegion (Region region) { if (region != null && region.isDisposed()) error (SWT.ERROR_INVALID_ARGUMENT); long /*int*/ window = gtk_widget_get_window (topHandle ()); long /*int*/ shape_region = (region == null) ? 0 : region.handle; - OS.gdk_window_shape_combine_region (window, shape_region, 0, 0); + GDK.gdk_window_shape_combine_region (window, shape_region, 0, 0); this.region = region; } @@ -1543,7 +1543,7 @@ public Point toControl (int x, int y) { checkWidget (); long /*int*/ window = eventWindow (); int [] origin_x = new int [1], origin_y = new int [1]; - OS.gdk_window_get_origin (window, origin_x, origin_y); + GDK.gdk_window_get_origin (window, origin_x, origin_y); x -= DPIUtil.autoScaleDown (origin_x [0]); y -= DPIUtil.autoScaleDown (origin_y [0]); if ((style & SWT.MIRRORED) != 0) x = DPIUtil.autoScaleDown (getClientWidth ()) - x; @@ -1600,7 +1600,7 @@ public Point toDisplay (int x, int y) { checkWidget(); long /*int*/ window = eventWindow (); int [] origin_x = new int [1], origin_y = new int [1]; - OS.gdk_window_get_origin (window, origin_x, origin_y); + GDK.gdk_window_get_origin (window, origin_x, origin_y); if ((style & SWT.MIRRORED) != 0) x = DPIUtil.autoScaleDown (getClientWidth ()) - x; x += DPIUtil.autoScaleDown (origin_x [0]); y += DPIUtil.autoScaleDown (origin_y [0]); @@ -1611,7 +1611,7 @@ Point toDisplayInPixels (int x, int y) { checkWidget(); long /*int*/ window = eventWindow (); int [] origin_x = new int [1], origin_y = new int [1]; - OS.gdk_window_get_origin (window, origin_x, origin_y); + GDK.gdk_window_get_origin (window, origin_x, origin_y); if ((style & SWT.MIRRORED) != 0) x = getClientWidth () - x; x += origin_x [0]; y += origin_y [0]; @@ -2560,7 +2560,7 @@ boolean dragDetect (int x, int y, boolean filter, boolean dragOnTimeout, boolean long timeout = System.currentTimeMillis() + 500; display.sendPreExternalEventDispatchEvent(); while (System.currentTimeMillis() < timeout) { - eventPtr = OS.gdk_event_get (); + eventPtr = GDK.gdk_event_get (); if (eventPtr != 0) { break; } else { @@ -2578,11 +2578,11 @@ boolean dragDetect (int x, int y, boolean filter, boolean dragOnTimeout, boolean display.sendPostExternalEventDispatchEvent(); if (dragging) return true; //428852 if (eventPtr == 0) return dragOnTimeout; - switch (OS.GDK_EVENT_TYPE (eventPtr)) { - case OS.GDK_MOTION_NOTIFY: { + switch (GDK.GDK_EVENT_TYPE (eventPtr)) { + case GDK.GDK_MOTION_NOTIFY: { GdkEventMotion gdkMotionEvent = new GdkEventMotion (); OS.memmove (gdkMotionEvent, eventPtr, GdkEventMotion.sizeof); - if ((gdkMotionEvent.state & OS.GDK_BUTTON1_MASK) != 0) { + if ((gdkMotionEvent.state & GDK.GDK_BUTTON1_MASK) != 0) { if (GTK.gtk_drag_check_threshold (handle, x, y, (int) gdkMotionEvent.x, (int) gdkMotionEvent.y)) { dragging = true; quit = true; @@ -2594,25 +2594,25 @@ boolean dragDetect (int x, int y, boolean filter, boolean dragOnTimeout, boolean gdk_window_get_device_position (gdkMotionEvent.window, newX, newY, null); break; } - case OS.GDK_KEY_PRESS: - case OS.GDK_KEY_RELEASE: { + case GDK.GDK_KEY_PRESS: + case GDK.GDK_KEY_RELEASE: { GdkEventKey gdkEvent = new GdkEventKey (); OS.memmove (gdkEvent, eventPtr, GdkEventKey.sizeof); - if (gdkEvent.keyval == OS.GDK_Escape) quit = true; + if (gdkEvent.keyval == GDK.GDK_Escape) quit = true; break; } - case OS.GDK_BUTTON_RELEASE: - case OS.GDK_BUTTON_PRESS: - case OS.GDK_2BUTTON_PRESS: - case OS.GDK_3BUTTON_PRESS: { - OS.gdk_event_put (eventPtr); + case GDK.GDK_BUTTON_RELEASE: + case GDK.GDK_BUTTON_PRESS: + case GDK.GDK_2BUTTON_PRESS: + case GDK.GDK_3BUTTON_PRESS: { + GDK.gdk_event_put (eventPtr); quit = true; break; } default: GTK.gtk_main_do_event (eventPtr); } - OS.gdk_event_free (eventPtr); + GDK.gdk_event_free (eventPtr); } } return dragging; @@ -2657,7 +2657,7 @@ long /*int*/ fixedMapProc (long /*int*/ widget) { OS.g_list_free (widgetList); } if (GTK.gtk_widget_get_has_window (widget)) { - OS.gdk_window_show_unraised (gtk_widget_get_window (widget)); + GDK.gdk_window_show_unraised (gtk_widget_get_window (widget)); } return 0; } @@ -3071,9 +3071,9 @@ public Menu getMenu () { */ public Monitor getMonitor () { checkWidget (); - long /*int*/ screen = OS.gdk_screen_get_default (); + long /*int*/ screen = GDK.gdk_screen_get_default (); if (screen != 0) { - int monitorNumber = OS.gdk_screen_get_monitor_at_window (screen, paintWindow ()); + int monitorNumber = GDK.gdk_screen_get_monitor_at_window (screen, paintWindow ()); Monitor[] monitors = display.getMonitors (); if (monitorNumber >= 0 && monitorNumber < monitors.length) { @@ -3259,7 +3259,7 @@ long /*int*/ gtk_button_press_event (long /*int*/ widget, long /*int*/ event) { long /*int*/ gtk_button_press_event (long /*int*/ widget, long /*int*/ event, boolean sendMouseDown) { GdkEventButton gdkEvent = new GdkEventButton (); OS.memmove (gdkEvent, event, GdkEventButton.sizeof); - if (gdkEvent.type == OS.GDK_3BUTTON_PRESS) return 0; + if (gdkEvent.type == GDK.GDK_3BUTTON_PRESS) return 0; /* * When a shell is created with SWT.ON_TOP and SWT.NO_FOCUS, @@ -3272,15 +3272,15 @@ long /*int*/ gtk_button_press_event (long /*int*/ widget, long /*int*/ event, bo shell.forceActive(); } long /*int*/ result = 0; - if (gdkEvent.type == OS.GDK_BUTTON_PRESS) { + if (gdkEvent.type == GDK.GDK_BUTTON_PRESS) { boolean dragging = false; display.clickCount = 1; - long /*int*/ nextEvent = OS.gdk_event_peek (); + long /*int*/ nextEvent = GDK.gdk_event_peek (); if (nextEvent != 0) { - int eventType = OS.GDK_EVENT_TYPE (nextEvent); - if (eventType == OS.GDK_2BUTTON_PRESS) display.clickCount = 2; - if (eventType == OS.GDK_3BUTTON_PRESS) display.clickCount = 3; - OS.gdk_event_free (nextEvent); + int eventType = GDK.GDK_EVENT_TYPE (nextEvent); + if (eventType == GDK.GDK_2BUTTON_PRESS) display.clickCount = 2; + if (eventType == GDK.GDK_3BUTTON_PRESS) display.clickCount = 3; + GDK.gdk_event_free (nextEvent); } /* * Feature in GTK: DND detection for X.11 & Wayland support is done through motion notify event @@ -3378,8 +3378,8 @@ long /*int*/ gtk_enter_notify_event (long /*int*/ widget, long /*int*/ event) { * requests to check the field. */ if (gdkEvent.subwindow != 0 && checkSubwindow ()) return 0; - if (gdkEvent.mode != OS.GDK_CROSSING_NORMAL && gdkEvent.mode != OS.GDK_CROSSING_UNGRAB) return 0; - if ((gdkEvent.state & (OS.GDK_BUTTON1_MASK | OS.GDK_BUTTON2_MASK | OS.GDK_BUTTON3_MASK)) != 0) return 0; + if (gdkEvent.mode != GDK.GDK_CROSSING_NORMAL && gdkEvent.mode != GDK.GDK_CROSSING_UNGRAB) return 0; + if ((gdkEvent.state & (GDK.GDK_BUTTON1_MASK | GDK.GDK_BUTTON2_MASK | GDK.GDK_BUTTON3_MASK)) != 0) return 0; if (display.currentControl != null && !display.currentControl.isDisposed ()) { display.removeMouseHoverTimeout (display.currentControl.handle); display.currentControl.sendMouseEvent (SWT.MouseExit, 0, gdkEvent.time, gdkEvent.x_root, gdkEvent.y_root, false, gdkEvent.state); @@ -3400,7 +3400,7 @@ long /*int*/ gtk_event_after (long /*int*/ widget, long /*int*/ gdkEvent) { GdkEvent event = new GdkEvent (); OS.memmove (event, gdkEvent, GdkEvent.sizeof); switch (event.type) { - case OS.GDK_BUTTON_PRESS: { + case GDK.GDK_BUTTON_PRESS: { if (widget != eventHandle ()) break; /* * Pop up the context menu in the event_after signal to allow @@ -3416,7 +3416,7 @@ long /*int*/ gtk_event_after (long /*int*/ widget, long /*int*/ gdkEvent) { } break; } - case OS.GDK_FOCUS_CHANGE: { + case GDK.GDK_FOCUS_CHANGE: { if (!isFocusHandle (widget)) break; GdkEventFocus gdkEventFocus = new GdkEventFocus (); OS.memmove (gdkEventFocus, gdkEvent, GdkEventFocus.sizeof); @@ -3459,7 +3459,7 @@ long /*int*/ gtk_draw (long /*int*/ widget, long /*int*/ cairo) { if ((state & OBSCURED) != 0) return 0; if (!hooksPaint ()) return 0; GdkRectangle rect = new GdkRectangle (); - OS.gdk_cairo_get_clip_rectangle (cairo, rect); + GDK.gdk_cairo_get_clip_rectangle (cairo, rect); Event event = new Event (); event.count = 1; Rectangle eventBounds = DPIUtil.autoScaleDown (new Rectangle (rect.x, rect.y, rect.width, rect.height)); @@ -3591,8 +3591,8 @@ long /*int*/ gtk_leave_notify_event (long /*int*/ widget, long /*int*/ event) { if (sendLeaveNotify () || display.getCursorControl () == null) { GdkEventCrossing gdkEvent = new GdkEventCrossing (); OS.memmove (gdkEvent, event, GdkEventCrossing.sizeof); - if (gdkEvent.mode != OS.GDK_CROSSING_NORMAL && gdkEvent.mode != OS.GDK_CROSSING_UNGRAB) return 0; - if ((gdkEvent.state & (OS.GDK_BUTTON1_MASK | OS.GDK_BUTTON2_MASK | OS.GDK_BUTTON3_MASK)) != 0) return 0; + if (gdkEvent.mode != GDK.GDK_CROSSING_NORMAL && gdkEvent.mode != GDK.GDK_CROSSING_UNGRAB) return 0; + if ((gdkEvent.state & (GDK.GDK_BUTTON1_MASK | GDK.GDK_BUTTON2_MASK | GDK.GDK_BUTTON3_MASK)) != 0) return 0; result = sendMouseEvent (SWT.MouseExit, 0, gdkEvent.time, gdkEvent.x_root, gdkEvent.y_root, false, gdkEvent.state) ? 0 : 1; display.currentControl = null; } @@ -3606,7 +3606,7 @@ long /*int*/ gtk_mnemonic_activate (long /*int*/ widget, long /*int*/ arg1) { if (eventPtr != 0) { GdkEventKey keyEvent = new GdkEventKey (); OS.memmove (keyEvent, eventPtr, GdkEventKey.sizeof); - if (keyEvent.type == OS.GDK_KEY_PRESS) { + if (keyEvent.type == GDK.GDK_KEY_PRESS) { Control focusControl = display.getFocusControl (); long /*int*/ focusHandle = focusControl != null ? focusControl.focusHandle () : 0; if (focusHandle != 0) { @@ -3616,7 +3616,7 @@ long /*int*/ gtk_mnemonic_activate (long /*int*/ widget, long /*int*/ arg1) { } result = 1; } - OS.gdk_event_free (eventPtr); + GDK.gdk_event_free (eventPtr); } return result; } @@ -3645,7 +3645,7 @@ long /*int*/ gtk_motion_notify_event (long /*int*/ widget, long /*int*/ event) { GTK.gtk_event_controller_handle_event(dragGesture,event); GdkEventButton gdkEvent1 = new GdkEventButton (); OS.memmove (gdkEvent1, event, GdkEventButton.sizeof); - if (gdkEvent1.type == OS.GDK_3BUTTON_PRESS) return 0; + if (gdkEvent1.type == GDK.GDK_3BUTTON_PRESS) return 0; if (sendDragEvent (gdkEvent1.button, gdkEvent1.state, (int) gdkEvent1.x, (int) gdkEvent1.y, false)){ return 1; } @@ -3711,18 +3711,18 @@ long /*int*/ gtk_scroll_event (long /*int*/ widget, long /*int*/ eventPtr) { GdkEventScroll gdkEvent = new GdkEventScroll (); OS.memmove (gdkEvent, eventPtr, GdkEventScroll.sizeof); switch (gdkEvent.direction) { - case OS.GDK_SCROLL_UP: + case GDK.GDK_SCROLL_UP: return sendMouseEvent (SWT.MouseWheel, 0, 3, SWT.SCROLL_LINE, true, gdkEvent.time, gdkEvent.x_root, gdkEvent.y_root, false, gdkEvent.state) ? 0 : 1; - case OS.GDK_SCROLL_DOWN: + case GDK.GDK_SCROLL_DOWN: return sendMouseEvent (SWT.MouseWheel, 0, -3, SWT.SCROLL_LINE, true, gdkEvent.time, gdkEvent.x_root, gdkEvent.y_root, false, gdkEvent.state) ? 0 : 1; - case OS.GDK_SCROLL_LEFT: + case GDK.GDK_SCROLL_LEFT: return sendMouseEvent (SWT.MouseHorizontalWheel, 0, 3, 0, true, gdkEvent.time, gdkEvent.x_root, gdkEvent.y_root, false, gdkEvent.state) ? 0 : 1; - case OS.GDK_SCROLL_RIGHT: + case GDK.GDK_SCROLL_RIGHT: return sendMouseEvent (SWT.MouseHorizontalWheel, 0, -3, 0, true, gdkEvent.time, gdkEvent.x_root, gdkEvent.y_root, false, gdkEvent.state) ? 0 : 1; - case OS.GDK_SCROLL_SMOOTH: + case GDK.GDK_SCROLL_SMOOTH: long /*int*/ result = 0; double[] delta_x = new double[1], delta_y = new double [1]; - if (OS.gdk_event_get_scroll_deltas (eventPtr, delta_x, delta_y)) { + if (GDK.gdk_event_get_scroll_deltas (eventPtr, delta_x, delta_y)) { if (delta_x [0] != 0) { result = (sendMouseEvent (SWT.MouseHorizontalWheel, 0, (int)(-3 * delta_x [0]), 0, true, gdkEvent.time, gdkEvent.x_root, gdkEvent.y_root, false, gdkEvent.state) ? 0 : 1); } @@ -3784,7 +3784,7 @@ public long /*int*/ internal_new_GC (GCData data) { if (gc != 0) { Cairo.cairo_reference (gc); } else { - gc = OS.gdk_cairo_create (window); + gc = GDK.gdk_cairo_create (window); } if (gc == 0) error (SWT.ERROR_NO_HANDLES); if (data != null) { @@ -4102,7 +4102,7 @@ void redrawWidget (int x, int y, int width, int height, boolean redrawAll, boole rect.width = Math.max (0, width); rect.height = Math.max (0, height); } - OS.gdk_window_invalidate_rect (window, rect, all); + GDK.gdk_window_invalidate_rect (window, rect, all); } @Override @@ -4155,8 +4155,8 @@ void releaseWidget () { GTK.gtk_im_context_set_client_window (imHandle, 0); } if (enableWindow != 0) { - OS.gdk_window_set_user_data (enableWindow, 0); - OS.gdk_window_destroy (enableWindow); + GDK.gdk_window_set_user_data (enableWindow, 0); + GDK.gdk_window_destroy (enableWindow); enableWindow = 0; } redrawWindow = 0; @@ -4175,7 +4175,7 @@ void releaseWidget () { } void restackWindow (long /*int*/ window, long /*int*/ sibling, boolean above) { - OS.gdk_window_restack (window, sibling, above); + GDK.gdk_window_restack (window, sibling, above); } boolean sendDragEvent (int button, int stateMask, int x, int y, boolean isStateMask) { @@ -4317,7 +4317,7 @@ boolean sendMouseEvent (int type, int button, int count, int detail, boolean sen } else { long /*int*/ window = eventWindow (); int [] origin_x = new int [1], origin_y = new int [1]; - OS.gdk_window_get_origin (window, origin_x, origin_y); + GDK.gdk_window_get_origin (window, origin_x, origin_y); Rectangle eventRect = new Rectangle ((int)x - origin_x [0], (int)y - origin_y [0], 0, 0); event.setBounds (DPIUtil.autoScaleDown (eventRect)); } @@ -4654,13 +4654,13 @@ void setBackgroundPixmap (Image image) { long /*int*/ window = gtk_widget_get_window (paintHandle ()); if (window != 0) { if (image.pixmap != 0) { - OS.gdk_window_set_back_pixmap (window, image.pixmap, false); + GDK.gdk_window_set_back_pixmap (window, image.pixmap, false); } else if (image.surface != 0) { if (GTK.GTK3) { long /*int*/ pattern = Cairo.cairo_pattern_create_for_surface(image.surface); if (pattern == 0) SWT.error(SWT.ERROR_NO_HANDLES); Cairo.cairo_pattern_set_extend(pattern, Cairo.CAIRO_EXTEND_REPEAT); - OS.gdk_window_set_background_pattern(window, pattern); + GDK.gdk_window_set_background_pattern(window, pattern); Cairo.cairo_pattern_destroy(pattern); } /* @@ -4736,11 +4736,11 @@ public void setCursor (Cursor cursor) { void setCursor (long /*int*/ cursor) { long /*int*/ window = eventWindow (); if (window != 0) { - OS.gdk_window_set_cursor (window, cursor); + GDK.gdk_window_set_cursor (window, cursor); if (!OS.isX11()) { // Wayland - OS.gdk_flush (); + GDK.gdk_flush (); } else { - long /*int*/ xDisplay = OS.gdk_x11_display_get_xdisplay(OS.gdk_display_get_default()); + long /*int*/ xDisplay = GDK.gdk_x11_display_get_xdisplay(GDK.gdk_display_get_default()); OS.XFlush (xDisplay); } } @@ -4840,9 +4840,9 @@ public void setEnabled (boolean enabled) { attributes.width = (state & ZERO_WIDTH) != 0 ? 0 : allocation.width; attributes.height = (state & ZERO_HEIGHT) != 0 ? 0 : allocation.height; attributes.event_mask = (0xFFFFFFFF & ~OS.ExposureMask); - attributes.wclass = OS.GDK_INPUT_ONLY; - attributes.window_type = OS.GDK_WINDOW_CHILD; - enableWindow = OS.gdk_window_new (window, attributes, OS.GDK_WA_X | OS.GDK_WA_Y); + attributes.wclass = GDK.GDK_INPUT_ONLY; + attributes.window_type = GDK.GDK_WINDOW_CHILD; + enableWindow = GDK.gdk_window_new (window, attributes, GDK.GDK_WA_X | GDK.GDK_WA_Y); if (enableWindow != 0) { /* 427776: we need to listen to all enter-notify-event signals to * see if this new GdkWindow has been added to a widget's internal @@ -4851,9 +4851,9 @@ public void setEnabled (boolean enabled) { if (enterNotifyEventFunc != null) enterNotifyEventId = OS.g_signal_add_emission_hook (enterNotifyEventSignalId, 0, enterNotifyEventFunc.getAddress (), enableWindow, 0); - OS.gdk_window_set_user_data (enableWindow, parentHandle); + GDK.gdk_window_set_user_data (enableWindow, parentHandle); restackWindow (enableWindow, gtk_widget_get_window (topHandle), true); - if (GTK.gtk_widget_get_visible (topHandle)) OS.gdk_window_show_unraised (enableWindow); + if (GTK.gtk_widget_get_visible (topHandle)) GDK.gdk_window_show_unraised (enableWindow); } } if (fixFocus) fixFocus (control); @@ -4878,8 +4878,8 @@ void cleanupEnableWindow() { } } - OS.gdk_window_set_user_data (enableWindow, 0); - OS.gdk_window_destroy (enableWindow); + GDK.gdk_window_set_user_data (enableWindow, 0); + GDK.gdk_window_destroy (enableWindow); enableWindow = 0; } @@ -5382,9 +5382,9 @@ public void setRedraw (boolean redraw) { if (redrawWindow != 0) { long /*int*/ window = paintWindow (); /* Explicitly hiding the window avoids flicker on GTK+ >= 2.6 */ - OS.gdk_window_hide (redrawWindow); - OS.gdk_window_destroy (redrawWindow); - OS.gdk_window_set_events (window, GTK.gtk_widget_get_events (paintHandle ())); + GDK.gdk_window_hide (redrawWindow); + GDK.gdk_window_destroy (redrawWindow); + GDK.gdk_window_set_events (window, GTK.gtk_widget_get_events (paintHandle ())); redrawWindow = 0; } } @@ -5396,22 +5396,22 @@ public void setRedraw (boolean redraw) { GdkWindowAttr attributes = new GdkWindowAttr (); attributes.width = rect.width; attributes.height = rect.height; - attributes.event_mask = OS.GDK_EXPOSURE_MASK; - attributes.window_type = OS.GDK_WINDOW_CHILD; - redrawWindow = OS.gdk_window_new (window, attributes, 0); + attributes.event_mask = GDK.GDK_EXPOSURE_MASK; + attributes.window_type = GDK.GDK_WINDOW_CHILD; + redrawWindow = GDK.gdk_window_new (window, attributes, 0); if (redrawWindow != 0) { - int mouseMask = OS.GDK_BUTTON_PRESS_MASK | OS.GDK_BUTTON_RELEASE_MASK | - OS.GDK_ENTER_NOTIFY_MASK | OS.GDK_LEAVE_NOTIFY_MASK | - OS.GDK_POINTER_MOTION_MASK | OS.GDK_POINTER_MOTION_HINT_MASK | - OS.GDK_BUTTON_MOTION_MASK | OS.GDK_BUTTON1_MOTION_MASK | - OS.GDK_BUTTON2_MOTION_MASK | OS.GDK_BUTTON3_MOTION_MASK; - OS.gdk_window_set_events (window, OS.gdk_window_get_events (window) & ~mouseMask); + int mouseMask = GDK.GDK_BUTTON_PRESS_MASK | GDK.GDK_BUTTON_RELEASE_MASK | + GDK.GDK_ENTER_NOTIFY_MASK | GDK.GDK_LEAVE_NOTIFY_MASK | + GDK.GDK_POINTER_MOTION_MASK | GDK.GDK_POINTER_MOTION_HINT_MASK | + GDK.GDK_BUTTON_MOTION_MASK | GDK.GDK_BUTTON1_MOTION_MASK | + GDK.GDK_BUTTON2_MOTION_MASK | GDK.GDK_BUTTON3_MOTION_MASK; + GDK.gdk_window_set_events (window, GDK.gdk_window_get_events (window) & ~mouseMask); if (GTK.GTK3) { - OS.gdk_window_set_background_pattern(redrawWindow, 0); + GDK.gdk_window_set_background_pattern(redrawWindow, 0); } else { - OS.gdk_window_set_back_pixmap (redrawWindow, 0, false); + GDK.gdk_window_set_back_pixmap (redrawWindow, 0, false); } - OS.gdk_window_show (redrawWindow); + GDK.gdk_window_show (redrawWindow); } } } @@ -5549,7 +5549,7 @@ public void setVisible (boolean visible) { if (isDisposed ()) return; state &= ~HIDDEN; if ((state & (ZERO_WIDTH | ZERO_HEIGHT)) == 0) { - if (enableWindow != 0) OS.gdk_window_show_unraised (enableWindow); + if (enableWindow != 0) GDK.gdk_window_show_unraised (enableWindow); GTK.gtk_widget_show (topHandle); } } else { @@ -5585,7 +5585,7 @@ public void setVisible (boolean visible) { } GTK.gtk_widget_hide (topHandle); if (isDisposed ()) return; - if (enableWindow != 0) OS.gdk_window_hide (enableWindow); + if (enableWindow != 0) GDK.gdk_window_hide (enableWindow); sendEvent (SWT.Hide); } } @@ -5642,12 +5642,12 @@ void setZOrder (Control sibling, boolean above, boolean fixRelations, boolean fi long /*int*/ redrawWindow = fixChildren ? parent.redrawWindow : 0; if (!OS.GDK_WINDOWING_X11 () || (siblingWindow == 0 && (!above || redrawWindow == 0))) { if (above) { - OS.gdk_window_raise (window); - if (redrawWindow != 0) OS.gdk_window_raise (redrawWindow); - if (enableWindow != 0) OS.gdk_window_raise (enableWindow); + GDK.gdk_window_raise (window); + if (redrawWindow != 0) GDK.gdk_window_raise (redrawWindow); + if (enableWindow != 0) GDK.gdk_window_raise (enableWindow); } else { - if (enableWindow != 0) OS.gdk_window_lower (enableWindow); - OS.gdk_window_lower (window); + if (enableWindow != 0) GDK.gdk_window_lower (enableWindow); + GDK.gdk_window_lower (window); } } else { long /*int*/ siblingW = siblingWindow != 0 ? siblingWindow : redrawWindow; @@ -5978,14 +5978,14 @@ boolean translateMnemonic (Event event, Control control) { } boolean translateMnemonic (int keyval, GdkEventKey gdkEvent) { - long key = OS.gdk_keyval_to_unicode (keyval); + long key = GDK.gdk_keyval_to_unicode (keyval); if (key < 0x20) return false; if (gdkEvent.state == 0) { int code = traversalCode (keyval, gdkEvent); if ((code & SWT.TRAVERSE_MNEMONIC) == 0) return false; } else { Shell shell = _getShell (); - int mask = OS.GDK_CONTROL_MASK | OS.GDK_SHIFT_MASK | OS.GDK_MOD1_MASK; + int mask = GDK.GDK_CONTROL_MASK | GDK.GDK_SHIFT_MASK | GDK.GDK_MOD1_MASK; if ((gdkEvent.state & mask) != GTK.gtk_window_get_mnemonic_modifier (shell.shellHandle)) return false; } Decorations shell = menuShell (); @@ -6005,39 +6005,39 @@ boolean translateTraversal (GdkEventKey keyEvent) { int code = traversalCode (key, keyEvent); boolean all = false; switch (key) { - case OS.GDK_Escape: { + case GDK.GDK_Escape: { all = true; detail = SWT.TRAVERSE_ESCAPE; break; } - case OS.GDK_KP_Enter: - case OS.GDK_Return: { + case GDK.GDK_KP_Enter: + case GDK.GDK_Return: { all = true; detail = SWT.TRAVERSE_RETURN; break; } - case OS.GDK_ISO_Left_Tab: - case OS.GDK_Tab: { - boolean next = (keyEvent.state & OS.GDK_SHIFT_MASK) == 0; + case GDK.GDK_ISO_Left_Tab: + case GDK.GDK_Tab: { + boolean next = (keyEvent.state & GDK.GDK_SHIFT_MASK) == 0; detail = next ? SWT.TRAVERSE_TAB_NEXT : SWT.TRAVERSE_TAB_PREVIOUS; break; } - case OS.GDK_Up: - case OS.GDK_Left: - case OS.GDK_Down: - case OS.GDK_Right: { - boolean next = key == OS.GDK_Down || key == OS.GDK_Right; + case GDK.GDK_Up: + case GDK.GDK_Left: + case GDK.GDK_Down: + case GDK.GDK_Right: { + boolean next = key == GDK.GDK_Down || key == GDK.GDK_Right; if (parent != null && (parent.style & SWT.MIRRORED) != 0) { - if (key == OS.GDK_Left || key == OS.GDK_Right) next = !next; + if (key == GDK.GDK_Left || key == GDK.GDK_Right) next = !next; } detail = next ? SWT.TRAVERSE_ARROW_NEXT : SWT.TRAVERSE_ARROW_PREVIOUS; break; } - case OS.GDK_Page_Up: - case OS.GDK_Page_Down: { + case GDK.GDK_Page_Up: + case GDK.GDK_Page_Down: { all = true; - if ((keyEvent.state & OS.GDK_CONTROL_MASK) == 0) return false; - detail = key == OS.GDK_Page_Down ? SWT.TRAVERSE_PAGE_NEXT : SWT.TRAVERSE_PAGE_PREVIOUS; + if ((keyEvent.state & GDK.GDK_CONTROL_MASK) == 0) return false; + detail = key == GDK.GDK_Page_Down ? SWT.TRAVERSE_PAGE_NEXT : SWT.TRAVERSE_PAGE_PREVIOUS; break; } default: @@ -6195,9 +6195,9 @@ void update (boolean all, boolean flush) { * It's worth checking whether can be removed on all GTK 3 versions. */ if (GTK.GTK_VERSION < OS.VERSION(3, 16, 0)) { - OS.gdk_window_process_updates (window, all); + GDK.gdk_window_process_updates (window, all); } - OS.gdk_flush (); + GDK.gdk_flush (); } void updateBackgroundMode () { @@ -6233,7 +6233,7 @@ long /*int*/ windowProc (long /*int*/ handle, long /*int*/ arg0, long /*int*/ us if (GTK.GTK3) { long /*int*/ cairo = arg0; GdkRectangle rect = new GdkRectangle (); - OS.gdk_cairo_get_clip_rectangle (cairo, rect); + GDK.gdk_cairo_get_clip_rectangle (cairo, rect); if (control == null) control = this; long /*int*/ window = GTK.gtk_widget_get_window (handle); if (window != 0) { @@ -6266,7 +6266,7 @@ Point getWindowOrigin () { int [] y = new int [1]; long /*int*/ window = eventWindow (); - OS.gdk_window_get_origin (window, x, y); + GDK.gdk_window_get_origin (window, x, y); return new Point (x [0], y [0]); } diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/DateTime.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/DateTime.java index d75635a303..424e8fb1e3 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/DateTime.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/DateTime.java @@ -957,7 +957,7 @@ void hookEvents () { if (isCalendar ()) { hookEventsForCalendar (); } else { - int eventMask = OS.GDK_POINTER_MOTION_MASK | OS.GDK_BUTTON_PRESS_MASK | OS.GDK_BUTTON_RELEASE_MASK; + int eventMask = GDK.GDK_POINTER_MOTION_MASK | GDK.GDK_BUTTON_PRESS_MASK | GDK.GDK_BUTTON_RELEASE_MASK; GTK.gtk_widget_add_events (textEntryHandle, eventMask); @@ -1851,7 +1851,7 @@ boolean onNumberKeyInput (int key) { private String keyToString (int key) { //If numberpad keys were pressed. - if (key >= OS.GDK_KP_0 && key <= OS.GDK_KP_9) { + if (key >= GDK.GDK_KP_0 && key <= GDK.GDK_KP_9) { //convert numberpad button to regular key; key -= 65408; } @@ -1948,35 +1948,35 @@ long /*int*/ gtk_key_press_event (long /*int*/ widget, long /*int*/ event) { OS.memmove (keyEvent, event, GdkEventKey.sizeof); int key = keyEvent.keyval; switch (key) { - case OS.GDK_Up: - case OS.GDK_KP_Up: + case GDK.GDK_Up: + case GDK.GDK_KP_Up: incrementField (+1); commitCurrentField (); break; - case OS.GDK_Down: - case OS.GDK_KP_Down: + case GDK.GDK_Down: + case GDK.GDK_KP_Down: incrementField (-1); commitCurrentField (); break; - case OS.GDK_Right: - case OS.GDK_KP_Right: + case GDK.GDK_Right: + case GDK.GDK_KP_Right: selectField ((currentField + 1) % fieldCount); sendEvent (SWT.Traverse); break; - case OS.GDK_Left: - case OS.GDK_KP_Left: + case GDK.GDK_Left: + case GDK.GDK_KP_Left: int index = currentField - 1; selectField (index < 0 ? fieldCount - 1 : index); sendEvent (SWT.Traverse); break; - case OS.GDK_Home: - case OS.GDK_KP_Home: + case GDK.GDK_Home: + case GDK.GDK_KP_Home: /* Set the value of the current field to its minimum */ fieldName = fieldNames[currentField]; setTextField (fieldName, calendar.getActualMinimum (fieldName), true, true); break; - case OS.GDK_End: - case OS.GDK_KP_End: + case GDK.GDK_End: + case GDK.GDK_KP_End: /* Set the value of the current field to its maximum */ fieldName = fieldNames[currentField]; setTextField (fieldName, calendar.getActualMaximum (fieldName), true, true); diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/DirectoryDialog.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/DirectoryDialog.java index 1778beef6a..c28e8521cb 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/DirectoryDialog.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/DirectoryDialog.java @@ -214,7 +214,7 @@ String openChooserDialog () { * code outside of SWT (i.e AWT, etc). It ensures that the current * thread leaves the GTK lock acquired by the function above. */ - OS.gdk_threads_leave(); + GDK.gdk_threads_leave(); display.sendPostExternalEventDispatchEvent (); if ((style & SWT.RIGHT_TO_LEFT) != 0) { OS.g_signal_remove_emission_hook (signalId, hookId); diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Display.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Display.java index d76cf88750..cd9a2264f3 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Display.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Display.java @@ -343,96 +343,96 @@ public class Display extends Device { static final int [] [] KeyTable = { /* Keyboard and Mouse Masks */ - {OS.GDK_Alt_L, SWT.ALT}, - {OS.GDK_Alt_R, SWT.ALT}, - {OS.GDK_Meta_L, SWT.ALT}, - {OS.GDK_Meta_R, SWT.ALT}, - {OS.GDK_Shift_L, SWT.SHIFT}, - {OS.GDK_Shift_R, SWT.SHIFT}, - {OS.GDK_Control_L, SWT.CONTROL}, - {OS.GDK_Control_R, SWT.CONTROL}, + {GDK.GDK_Alt_L, SWT.ALT}, + {GDK.GDK_Alt_R, SWT.ALT}, + {GDK.GDK_Meta_L, SWT.ALT}, + {GDK.GDK_Meta_R, SWT.ALT}, + {GDK.GDK_Shift_L, SWT.SHIFT}, + {GDK.GDK_Shift_R, SWT.SHIFT}, + {GDK.GDK_Control_L, SWT.CONTROL}, + {GDK.GDK_Control_R, SWT.CONTROL}, // {OS.GDK_????, SWT.COMMAND}, // {OS.GDK_????, SWT.COMMAND}, /* Non-Numeric Keypad Keys */ - {OS.GDK_Up, SWT.ARROW_UP}, - {OS.GDK_KP_Up, SWT.ARROW_UP}, - {OS.GDK_Down, SWT.ARROW_DOWN}, - {OS.GDK_KP_Down, SWT.ARROW_DOWN}, - {OS.GDK_Left, SWT.ARROW_LEFT}, - {OS.GDK_KP_Left, SWT.ARROW_LEFT}, - {OS.GDK_Right, SWT.ARROW_RIGHT}, - {OS.GDK_KP_Right, SWT.ARROW_RIGHT}, - {OS.GDK_Page_Up, SWT.PAGE_UP}, - {OS.GDK_KP_Page_Up, SWT.PAGE_UP}, - {OS.GDK_Page_Down, SWT.PAGE_DOWN}, - {OS.GDK_KP_Page_Down, SWT.PAGE_DOWN}, - {OS.GDK_Home, SWT.HOME}, - {OS.GDK_KP_Home, SWT.HOME}, - {OS.GDK_End, SWT.END}, - {OS.GDK_KP_End, SWT.END}, - {OS.GDK_Insert, SWT.INSERT}, - {OS.GDK_KP_Insert, SWT.INSERT}, + {GDK.GDK_Up, SWT.ARROW_UP}, + {GDK.GDK_KP_Up, SWT.ARROW_UP}, + {GDK.GDK_Down, SWT.ARROW_DOWN}, + {GDK.GDK_KP_Down, SWT.ARROW_DOWN}, + {GDK.GDK_Left, SWT.ARROW_LEFT}, + {GDK.GDK_KP_Left, SWT.ARROW_LEFT}, + {GDK.GDK_Right, SWT.ARROW_RIGHT}, + {GDK.GDK_KP_Right, SWT.ARROW_RIGHT}, + {GDK.GDK_Page_Up, SWT.PAGE_UP}, + {GDK.GDK_KP_Page_Up, SWT.PAGE_UP}, + {GDK.GDK_Page_Down, SWT.PAGE_DOWN}, + {GDK.GDK_KP_Page_Down, SWT.PAGE_DOWN}, + {GDK.GDK_Home, SWT.HOME}, + {GDK.GDK_KP_Home, SWT.HOME}, + {GDK.GDK_End, SWT.END}, + {GDK.GDK_KP_End, SWT.END}, + {GDK.GDK_Insert, SWT.INSERT}, + {GDK.GDK_KP_Insert, SWT.INSERT}, /* Virtual and Ascii Keys */ - {OS.GDK_BackSpace, SWT.BS}, - {OS.GDK_Return, SWT.CR}, - {OS.GDK_Delete, SWT.DEL}, - {OS.GDK_KP_Delete, SWT.DEL}, - {OS.GDK_Escape, SWT.ESC}, - {OS.GDK_Linefeed, SWT.LF}, - {OS.GDK_Tab, SWT.TAB}, - {OS.GDK_ISO_Left_Tab, SWT.TAB}, + {GDK.GDK_BackSpace, SWT.BS}, + {GDK.GDK_Return, SWT.CR}, + {GDK.GDK_Delete, SWT.DEL}, + {GDK.GDK_KP_Delete, SWT.DEL}, + {GDK.GDK_Escape, SWT.ESC}, + {GDK.GDK_Linefeed, SWT.LF}, + {GDK.GDK_Tab, SWT.TAB}, + {GDK.GDK_ISO_Left_Tab, SWT.TAB}, /* Functions Keys */ - {OS.GDK_F1, SWT.F1}, - {OS.GDK_F2, SWT.F2}, - {OS.GDK_F3, SWT.F3}, - {OS.GDK_F4, SWT.F4}, - {OS.GDK_F5, SWT.F5}, - {OS.GDK_F6, SWT.F6}, - {OS.GDK_F7, SWT.F7}, - {OS.GDK_F8, SWT.F8}, - {OS.GDK_F9, SWT.F9}, - {OS.GDK_F10, SWT.F10}, - {OS.GDK_F11, SWT.F11}, - {OS.GDK_F12, SWT.F12}, - {OS.GDK_F13, SWT.F13}, - {OS.GDK_F14, SWT.F14}, - {OS.GDK_F15, SWT.F15}, - {OS.GDK_F16, SWT.F16}, - {OS.GDK_F17, SWT.F17}, - {OS.GDK_F18, SWT.F18}, - {OS.GDK_F19, SWT.F19}, - {OS.GDK_F20, SWT.F20}, + {GDK.GDK_F1, SWT.F1}, + {GDK.GDK_F2, SWT.F2}, + {GDK.GDK_F3, SWT.F3}, + {GDK.GDK_F4, SWT.F4}, + {GDK.GDK_F5, SWT.F5}, + {GDK.GDK_F6, SWT.F6}, + {GDK.GDK_F7, SWT.F7}, + {GDK.GDK_F8, SWT.F8}, + {GDK.GDK_F9, SWT.F9}, + {GDK.GDK_F10, SWT.F10}, + {GDK.GDK_F11, SWT.F11}, + {GDK.GDK_F12, SWT.F12}, + {GDK.GDK_F13, SWT.F13}, + {GDK.GDK_F14, SWT.F14}, + {GDK.GDK_F15, SWT.F15}, + {GDK.GDK_F16, SWT.F16}, + {GDK.GDK_F17, SWT.F17}, + {GDK.GDK_F18, SWT.F18}, + {GDK.GDK_F19, SWT.F19}, + {GDK.GDK_F20, SWT.F20}, /* Numeric Keypad Keys */ - {OS.GDK_KP_Multiply, SWT.KEYPAD_MULTIPLY}, - {OS.GDK_KP_Add, SWT.KEYPAD_ADD}, - {OS.GDK_KP_Enter, SWT.KEYPAD_CR}, - {OS.GDK_KP_Subtract, SWT.KEYPAD_SUBTRACT}, - {OS.GDK_KP_Decimal, SWT.KEYPAD_DECIMAL}, - {OS.GDK_KP_Divide, SWT.KEYPAD_DIVIDE}, - {OS.GDK_KP_0, SWT.KEYPAD_0}, - {OS.GDK_KP_1, SWT.KEYPAD_1}, - {OS.GDK_KP_2, SWT.KEYPAD_2}, - {OS.GDK_KP_3, SWT.KEYPAD_3}, - {OS.GDK_KP_4, SWT.KEYPAD_4}, - {OS.GDK_KP_5, SWT.KEYPAD_5}, - {OS.GDK_KP_6, SWT.KEYPAD_6}, - {OS.GDK_KP_7, SWT.KEYPAD_7}, - {OS.GDK_KP_8, SWT.KEYPAD_8}, - {OS.GDK_KP_9, SWT.KEYPAD_9}, - {OS.GDK_KP_Equal, SWT.KEYPAD_EQUAL}, + {GDK.GDK_KP_Multiply, SWT.KEYPAD_MULTIPLY}, + {GDK.GDK_KP_Add, SWT.KEYPAD_ADD}, + {GDK.GDK_KP_Enter, SWT.KEYPAD_CR}, + {GDK.GDK_KP_Subtract, SWT.KEYPAD_SUBTRACT}, + {GDK.GDK_KP_Decimal, SWT.KEYPAD_DECIMAL}, + {GDK.GDK_KP_Divide, SWT.KEYPAD_DIVIDE}, + {GDK.GDK_KP_0, SWT.KEYPAD_0}, + {GDK.GDK_KP_1, SWT.KEYPAD_1}, + {GDK.GDK_KP_2, SWT.KEYPAD_2}, + {GDK.GDK_KP_3, SWT.KEYPAD_3}, + {GDK.GDK_KP_4, SWT.KEYPAD_4}, + {GDK.GDK_KP_5, SWT.KEYPAD_5}, + {GDK.GDK_KP_6, SWT.KEYPAD_6}, + {GDK.GDK_KP_7, SWT.KEYPAD_7}, + {GDK.GDK_KP_8, SWT.KEYPAD_8}, + {GDK.GDK_KP_9, SWT.KEYPAD_9}, + {GDK.GDK_KP_Equal, SWT.KEYPAD_EQUAL}, /* Other keys */ - {OS.GDK_Caps_Lock, SWT.CAPS_LOCK}, - {OS.GDK_Num_Lock, SWT.NUM_LOCK}, - {OS.GDK_Scroll_Lock, SWT.SCROLL_LOCK}, - {OS.GDK_Pause, SWT.PAUSE}, - {OS.GDK_Break, SWT.BREAK}, - {OS.GDK_Print, SWT.PRINT_SCREEN}, - {OS.GDK_Help, SWT.HELP}, + {GDK.GDK_Caps_Lock, SWT.CAPS_LOCK}, + {GDK.GDK_Num_Lock, SWT.NUM_LOCK}, + {GDK.GDK_Scroll_Lock, SWT.SCROLL_LOCK}, + {GDK.GDK_Pause, SWT.PAUSE}, + {GDK.GDK_Break, SWT.BREAK}, + {GDK.GDK_Print, SWT.PRINT_SCREEN}, + {GDK.GDK_Help, SWT.HELP}, }; @@ -855,11 +855,11 @@ public void asyncExec (Runnable runnable) { */ public void beep () { if (!isValidThread ()) error (SWT.ERROR_THREAD_INVALID_ACCESS); - OS.gdk_beep(); + GDK.gdk_beep(); if (!OS.isX11()) { - OS.gdk_flush (); + GDK.gdk_flush (); } else { - long /*int*/ xDisplay = OS.gdk_x11_display_get_xdisplay(OS.gdk_display_get_default()); + long /*int*/ xDisplay = GDK.gdk_x11_display_get_xdisplay(GDK.gdk_display_get_default()); OS.XFlush (xDisplay); } } @@ -898,14 +898,14 @@ long /*int*/ checkIfEventProc (long /*int*/ display, long /*int*/ xEvent, long / default: return 0; } - long /*int*/ window = OS.gdk_x11_window_lookup_for_display(OS.gdk_display_get_default(), OS.X_EVENT_WINDOW (xEvent)); + long /*int*/ window = GDK.gdk_x11_window_lookup_for_display(GDK.gdk_display_get_default(), OS.X_EVENT_WINDOW (xEvent)); if (window == 0) return 0; if (flushWindow != 0) { if (flushAll) { long /*int*/ tempWindow = window; do { if (tempWindow == flushWindow) break; - } while ((tempWindow = OS.gdk_window_get_parent (tempWindow)) != 0); + } while ((tempWindow = GDK.gdk_window_get_parent (tempWindow)) != 0); if (tempWindow != flushWindow) return 0; } else { if (window != flushWindow) return 0; @@ -919,7 +919,7 @@ long /*int*/ checkIfEventProc (long /*int*/ display, long /*int*/ xEvent, long / flushRect.y = exposeEvent.y; flushRect.width = Math.max (0, exposeEvent.width); flushRect.height = Math.max (0, exposeEvent.height); - OS.gdk_window_invalidate_rect (window, flushRect, true); + GDK.gdk_window_invalidate_rect (window, flushRect, true); exposeEvent.type = -1; OS.memmove (xEvent, exposeEvent, XExposeEvent.sizeof); break; @@ -1013,7 +1013,7 @@ void createDisplay (DeviceData data) { } //set GTK+ Theme name as property for introspection purposes System.setProperty("org.eclipse.swt.internal.gtk.theme", OS.getThemeName()); - if (OS.isX11()) xDisplay = OS.gdk_x11_get_default_xdisplay(); + if (OS.isX11()) xDisplay = GDK.gdk_x11_get_default_xdisplay(); int major = GTK.gtk_major_version (); long /*int*/ ptr; if (major == GTK3_MAJOR) { @@ -1119,7 +1119,7 @@ void createDisplay (DeviceData data) { GTK.gtk_widget_set_default_direction (GTK.GTK_TEXT_DIR_LTR); byte [] buffer = Converter.wcsToMbcs (APP_NAME, true); OS.g_set_prgname (buffer); - OS.gdk_set_program_class (buffer); + GDK.gdk_set_program_class (buffer); if (!GTK.GTK3) { byte [] flatStyle = Converter.wcsToMbcs ("style \"swt-flat\" { GtkToolbar::shadow-type = none } widget \"*.swt-toolbar-flat\" style : highest \"swt-flat\"", true); //$NON-NLS-1$ GTK.gtk_rc_parse_string (flatStyle); @@ -1134,28 +1134,28 @@ void createDisplay (DeviceData data) { eventCallback = new Callback (this, "eventProc", 2); //$NON-NLS-1$ eventProc = eventCallback.getAddress (); if (eventProc == 0) error (SWT.ERROR_NO_MORE_CALLBACKS); - OS.gdk_event_handler_set (eventProc, 0, 0); + GDK.gdk_event_handler_set (eventProc, 0, 0); filterCallback = new Callback (this, "filterProc", 3); //$NON-NLS-1$ filterProc = filterCallback.getAddress (); if (filterProc == 0) error (SWT.ERROR_NO_MORE_CALLBACKS); - OS.gdk_window_add_filter (0, filterProc, 0); + GDK.gdk_window_add_filter (0, filterProc, 0); byte[] atomName = Converter.wcsToMbcs ("SWT_Window_" + APP_NAME, true); //$NON-NLS-1$ - long /*int*/ atom = OS.gdk_atom_intern(atomName, false); - OS.gdk_selection_owner_set(GTK.gtk_widget_get_window(shellHandle), atom, OS.CurrentTime, false); - OS.gdk_selection_owner_get(atom); + long /*int*/ atom = GDK.gdk_atom_intern(atomName, false); + GDK.gdk_selection_owner_set(GTK.gtk_widget_get_window(shellHandle), atom, OS.CurrentTime, false); + GDK.gdk_selection_owner_get(atom); signalCallback = new Callback (this, "signalProc", 3); //$NON-NLS-1$ signalProc = signalCallback.getAddress (); if (signalProc == 0) error (SWT.ERROR_NO_MORE_CALLBACKS); - GTK.gtk_widget_add_events (shellHandle, OS.GDK_PROPERTY_CHANGE_MASK); + GTK.gtk_widget_add_events (shellHandle, GDK.GDK_PROPERTY_CHANGE_MASK); OS.g_signal_connect (shellHandle, OS.property_notify_event, signalProc, PROPERTY_NOTIFY); latinKeyGroup = findLatinKeyGroup (); keysChangedCallback = new Callback (this, "keysChangedProc", 2); //$NON-NLS-1$ keysChangedProc = keysChangedCallback.getAddress (); if (keysChangedProc == 0) error (SWT.ERROR_NO_MORE_CALLBACKS); - OS.g_signal_connect (OS.gdk_keymap_get_default (), OS.keys_changed, keysChangedProc, 0); + OS.g_signal_connect (GDK.gdk_keymap_get_default (), OS.keys_changed, keysChangedProc, 0); } /** @@ -1166,14 +1166,14 @@ void createDisplay (DeviceData data) { private int findLatinKeyGroup () { int result = 0; Map<Integer, Integer> groupKeysCount = new HashMap<> (); - long /*int*/ keymap = OS.gdk_keymap_get_default (); + long /*int*/ keymap = GDK.gdk_keymap_get_default (); // count all key groups for Latin alphabet - for (int keyval = OS.GDK_KEY_a; keyval <= OS.GDK_KEY_z; keyval++) { + for (int keyval = GDK.GDK_KEY_a; keyval <= GDK.GDK_KEY_z; keyval++) { long /*int*/[] keys = new long /*int*/[1]; int [] n_keys = new int [1]; - if (OS.gdk_keymap_get_entries_for_keyval (keymap, keyval, keys, n_keys)) { + if (GDK.gdk_keymap_get_entries_for_keyval (keymap, keyval, keys, n_keys)) { GdkKeymapKey key_entry = new GdkKeymapKey (); for (int key = 0; key < n_keys [0]; key++) { OS.memmove (key_entry, keys [0] + key * GdkKeymapKey.sizeof, GdkKeymapKey.sizeof); @@ -1223,11 +1223,11 @@ Image createImage (String name) { byte[] buffer = Converter.wcsToMbcs (name, true); long /*int*/ pixbuf = GTK.gtk_icon_theme_load_icon(GTK.gtk_icon_theme_get_default(), buffer, 48, GTK.GTK_ICON_LOOKUP_FORCE_SIZE, 0); if (pixbuf == 0) return null; - int width = OS.gdk_pixbuf_get_width (pixbuf); - int height = OS.gdk_pixbuf_get_height (pixbuf); - int stride = OS.gdk_pixbuf_get_rowstride (pixbuf); - boolean hasAlpha = OS.gdk_pixbuf_get_has_alpha (pixbuf); - long /*int*/ pixels = OS.gdk_pixbuf_get_pixels (pixbuf); + int width = GDK.gdk_pixbuf_get_width (pixbuf); + int height = GDK.gdk_pixbuf_get_height (pixbuf); + int stride = GDK.gdk_pixbuf_get_rowstride (pixbuf); + boolean hasAlpha = GDK.gdk_pixbuf_get_has_alpha (pixbuf); + long /*int*/ pixels = GDK.gdk_pixbuf_get_pixels (pixbuf); byte [] data = new byte [stride * height]; C.memmove (data, pixels, data.length); OS.g_object_unref (pixbuf); @@ -1358,13 +1358,13 @@ long /*int*/ eventProc (long /*int*/ event, long /*int*/ data) { * outside of gtk_main_do_event() seems to always * return zero. */ - int time = OS.gdk_event_get_time (event); + int time = GDK.gdk_event_get_time (event); if (time != 0) lastEventTime = time; - int eventType = OS.GDK_EVENT_TYPE (event); + int eventType = GDK.GDK_EVENT_TYPE (event); switch (eventType) { - case OS.GDK_BUTTON_PRESS: - case OS.GDK_KEY_PRESS: + case GDK.GDK_BUTTON_PRESS: + case GDK.GDK_KEY_PRESS: lastUserEventTime = time; } boolean dispatch = true; @@ -1378,7 +1378,7 @@ long /*int*/ eventProc (long /*int*/ event, long /*int*/ data) { } } if (!dispatch) { - addGdkEvent (OS.gdk_event_copy (event)); + addGdkEvent (GDK.gdk_event_copy (event)); return 0; } dispatch = true; @@ -1534,12 +1534,12 @@ static long /*int*/ rendererRenderProc (long /*int*/ cell, long /*int*/ window, } void flushExposes (long /*int*/ window, boolean all) { - OS.gdk_flush (); - OS.gdk_flush (); + GDK.gdk_flush (); + GDK.gdk_flush (); if (OS.isX11()) { this.flushWindow = window; this.flushAll = all; - long /*int*/ xDisplay = OS.gdk_x11_display_get_xdisplay(OS.gdk_display_get_default()); + long /*int*/ xDisplay = GDK.gdk_x11_display_get_xdisplay(GDK.gdk_display_get_default()); long /*int*/ xEvent = OS.g_malloc (XEvent.sizeof); OS.XCheckIfEvent (xDisplay, xEvent, checkIfEventProc, 0); OS.g_free (xEvent); @@ -1583,7 +1583,7 @@ public Rectangle getBounds () { Rectangle getBoundsInPixels () { checkDevice (); - return new Rectangle (0, 0, OS.gdk_screen_width (), OS.gdk_screen_height ()); + return new Rectangle (0, 0, GDK.gdk_screen_width (), GDK.gdk_screen_height ()); } /** @@ -1644,7 +1644,7 @@ public Control getCursorControl () { long /*int*/ [] user_data = new long /*int*/ [1]; long /*int*/ window = gdk_device_get_window_at_position (x,y); if (window != 0) { - OS.gdk_window_get_user_data (window, user_data); + GDK.gdk_window_get_user_data (window, user_data); handle = user_data [0]; } else { /* @@ -1653,7 +1653,7 @@ public Control getCursorControl () { * XQueryPointer to find the containing GDK window. */ if (!OS.isX11()) return null; - OS.gdk_error_trap_push (); + GDK.gdk_error_trap_push (); int[] unusedInt = new int[1]; long /*int*/[] unusedPtr = new long /*int*/[1], buffer = new long /*int*/[1]; long /*int*/ xWindow, xParent = OS.XDefaultRootWindow (xDisplay); @@ -1664,14 +1664,14 @@ public Control getCursorControl () { } if ((xWindow = buffer [0]) != 0) { xParent = xWindow; - long /*int*/ gdkWindow = OS.gdk_x11_window_lookup_for_display(OS.gdk_display_get_default(), xWindow); + long /*int*/ gdkWindow = GDK.gdk_x11_window_lookup_for_display(GDK.gdk_display_get_default(), xWindow); if (gdkWindow != 0) { - OS.gdk_window_get_user_data (gdkWindow, user_data); + GDK.gdk_window_get_user_data (gdkWindow, user_data); if (user_data[0] != 0) handle = user_data[0]; } } } while (xWindow != 0); - OS.gdk_error_trap_pop (); + GDK.gdk_error_trap_pop (); } if (handle == 0) return null; do { @@ -2330,7 +2330,7 @@ GdkRGBA gtk_css_property_to_rgba(String property) { String [] propertyParsed = new String [1]; //Note that we still need to remove the ";" character from the input string propertyParsed = property.split (";"); - OS.gdk_rgba_parse (rgba, Converter.wcsToMbcs (propertyParsed[0], true)); + GDK.gdk_rgba_parse (rgba, Converter.wcsToMbcs (propertyParsed[0], true)); return rgba; } @@ -2365,7 +2365,7 @@ String gtk_rgba_to_css_string (GdkRGBA rgba) { // If we have a null RGBA, set it to the default COLOR_WIDGET_BACKGROUND. toConvert = COLOR_WIDGET_BACKGROUND_RGBA; } - long /*int*/ str = OS.gdk_rgba_to_string (toConvert); + long /*int*/ str = GDK.gdk_rgba_to_string (toConvert); int length = C.strlen (str); byte [] buffer = new byte [length]; C.memmove (buffer, str, length); @@ -2554,7 +2554,7 @@ public boolean getHighContrast () { @Override public int getDepth () { checkDevice (); - return OS.gdk_visual_get_depth(OS.gdk_visual_get_system()); + return GDK.gdk_visual_get_depth(GDK.gdk_visual_get_system()); } /** @@ -2613,13 +2613,13 @@ Dialog getModalDialog () { */ Rectangle getWorkArea() { byte[] name = Converter.wcsToMbcs ("_NET_WORKAREA", true); //$NON-NLS-1$ - long /*int*/ atom = OS.gdk_atom_intern (name, true); - if (atom == OS.GDK_NONE) return null; + long /*int*/ atom = GDK.gdk_atom_intern (name, true); + if (atom == GDK.GDK_NONE) return null; long /*int*/[] actualType = new long /*int*/[1]; int[] actualFormat = new int[1]; int[] actualLength = new int[1]; long /*int*/[] data = new long /*int*/[1]; - if (!OS.gdk_property_get (OS.gdk_get_default_root_window(), atom, OS.GDK_NONE, 0, 16, 0, actualType, actualFormat, actualLength, data)) { + if (!GDK.gdk_property_get (GDK.gdk_get_default_root_window(), atom, GDK.GDK_NONE, 0, 16, 0, actualType, actualFormat, actualLength, data)) { return null; } Rectangle result = null; @@ -2649,14 +2649,14 @@ public Monitor [] getMonitors () { checkDevice (); Monitor [] monitors = null; Rectangle workArea = DPIUtil.autoScaleDown (getWorkArea ()); - long /*int*/ screen = OS.gdk_screen_get_default (); + long /*int*/ screen = GDK.gdk_screen_get_default (); if (screen != 0) { - int monitorCount = OS.gdk_screen_get_n_monitors (screen); + int monitorCount = GDK.gdk_screen_get_n_monitors (screen); if (monitorCount > 0) { monitors = new Monitor [monitorCount]; GdkRectangle dest = new GdkRectangle (); for (int i = 0; i < monitorCount; i++) { - OS.gdk_screen_get_monitor_geometry (screen, i, dest); + GDK.gdk_screen_get_monitor_geometry (screen, i, dest); Monitor monitor = new Monitor (); monitor.handle = i; monitor.x = DPIUtil.autoScaleDown (dest.x); @@ -2667,7 +2667,7 @@ public Monitor [] getMonitors () { if (GTK.GTK_VERSION >= OS.VERSION (3, 4, 0)) { // workarea was defined in GTK 3.4. If present, it will return the best results // since it takes into account per-monitor trim - OS.gdk_screen_get_monitor_workarea (screen, i, dest); + GDK.gdk_screen_get_monitor_workarea (screen, i, dest); monitor.clientX = DPIUtil.autoScaleDown (dest.x); monitor.clientY = DPIUtil.autoScaleDown (dest.y); monitor.clientWidth = DPIUtil.autoScaleDown (dest.width); @@ -2742,10 +2742,10 @@ public Monitor getPrimaryMonitor () { int primaryMonitorIndex = 0; //attempt to find actual primary monitor if one is configured: - long /*int*/ screen = OS.gdk_screen_get_default (); + long /*int*/ screen = GDK.gdk_screen_get_default (); if (screen != 0) { //if no primary monitor is configured by the user, this returns 0. - primaryMonitorIndex = OS.gdk_screen_get_primary_monitor (screen); + primaryMonitorIndex = GDK.gdk_screen_get_primary_monitor (screen); } return monitors [primaryMonitorIndex]; } @@ -3360,8 +3360,8 @@ void initializeSystemColors () { } else { COLOR_LINK_FOREGROUND = initializeColorLinkForeground(tooltipShellHandle); - long /*int*/ colormap = OS.gdk_colormap_get_system(); - OS.gdk_colormap_alloc_color(colormap, COLOR_LINK_FOREGROUND, true, true); + long /*int*/ colormap = GDK.gdk_colormap_get_system(); + GDK.gdk_colormap_alloc_color(colormap, COLOR_LINK_FOREGROUND, true, true); /* Get Tooltip resources */ long /*int*/ tooltipStyle = GTK.gtk_widget_get_style (tooltipShellHandle); @@ -3451,7 +3451,7 @@ GdkColor initializeColorLinkForeground (long /*int*/ tooltipShellHandle) { GdkColor gdkColor = new GdkColor(); if (linkColor [0] != 0) { OS.memmove (gdkColor, linkColor[0], GdkColor.sizeof); - OS.gdk_color_free (linkColor [0]); + GDK.gdk_color_free (linkColor [0]); } else { gdkColor.blue = (short)0xeeee; } @@ -3885,9 +3885,9 @@ void initializeWindowManager () { /* Get the window manager name */ windowManager = ""; //$NON-NLS-1$ if (OS.isX11()) { - long /*int*/ screen = OS.gdk_screen_get_default (); + long /*int*/ screen = GDK.gdk_screen_get_default (); if (screen != 0) { - long /*int*/ ptr2 = OS.gdk_x11_screen_get_window_manager_name (screen); + long /*int*/ ptr2 = GDK.gdk_x11_screen_get_window_manager_name (screen); if (ptr2 != 0) { int length = C.strlen (ptr2); if (length > 0) { @@ -3945,8 +3945,8 @@ public void internal_dispose_GC (long /*int*/ hDC, GCData data) { @Override public long /*int*/ internal_new_GC (GCData data) { if (isDisposed()) error(SWT.ERROR_DEVICE_DISPOSED); - long /*int*/ root = OS.gdk_get_default_root_window(); - long /*int*/ gc = OS.gdk_cairo_create (root); + long /*int*/ root = GDK.gdk_get_default_root_window(); + long /*int*/ gc = GDK.gdk_cairo_create (root); if (gc == 0) error (SWT.ERROR_NO_HANDLES); //TODO how gdk_gc_set_subwindow is done in cairo? if (data != null) { @@ -4308,7 +4308,7 @@ public boolean post (Event event) { if (!OS.isX11()) { return false; } - long /*int*/ xDisplay = OS.gdk_x11_display_get_xdisplay(OS.gdk_display_get_default()); + long /*int*/ xDisplay = GDK.gdk_x11_display_get_xdisplay(GDK.gdk_display_get_default()); int type = event.type; switch (type) { case SWT.KeyDown: @@ -4319,12 +4319,12 @@ public boolean post (Event event) { if (keyCode == 0) { char key = event.character; switch (key) { - case SWT.BS: keysym = OS.GDK_BackSpace; break; - case SWT.CR: keysym = OS.GDK_Return; break; - case SWT.DEL: keysym = OS.GDK_Delete; break; - case SWT.ESC: keysym = OS.GDK_Escape; break; - case SWT.TAB: keysym = OS.GDK_Tab; break; - case SWT.LF: keysym = OS.GDK_Linefeed; break; + case SWT.BS: keysym = GDK.GDK_BackSpace; break; + case SWT.CR: keysym = GDK.GDK_Return; break; + case SWT.DEL: keysym = GDK.GDK_Delete; break; + case SWT.ESC: keysym = GDK.GDK_Escape; break; + case SWT.TAB: keysym = GDK.GDK_Tab; break; + case SWT.LF: keysym = GDK.GDK_Linefeed; break; default: keysym = key; } @@ -4350,9 +4350,9 @@ public boolean post (Event event) { case 5: button = 7; break; default: return false; } - long /*int*/ gdkDisplay = OS.gdk_display_get_default(); - long /*int*/ gdkScreen = OS.gdk_screen_get_default(); - long /*int*/ gdkWindow = OS.gdk_screen_get_active_window(gdkScreen); + long /*int*/ gdkDisplay = GDK.gdk_display_get_default(); + long /*int*/ gdkScreen = GDK.gdk_screen_get_default(); + long /*int*/ gdkWindow = GDK.gdk_screen_get_active_window(gdkScreen); int[] x = new int[1], y = new int[1]; if (gdkWindow == 0) { // Under some window managers or wayland gdk can not determine the active window and passing null @@ -4360,13 +4360,13 @@ public boolean post (Event event) { return false; } if (GTK.GTK3) { - long /*int*/ gdkDeviceManager = OS.gdk_display_get_device_manager(gdkDisplay); - long /*int*/ gdkPointer = OS.gdk_device_manager_get_client_pointer(gdkDeviceManager); - OS.gdk_window_get_device_position(gdkWindow, gdkPointer, x, y, new int[1]); + long /*int*/ gdkDeviceManager = GDK.gdk_display_get_device_manager(gdkDisplay); + long /*int*/ gdkPointer = GDK.gdk_device_manager_get_client_pointer(gdkDeviceManager); + GDK.gdk_window_get_device_position(gdkWindow, gdkPointer, x, y, new int[1]); } else { - OS.gdk_window_get_pointer(gdkWindow, x, y, new int[1]); + GDK.gdk_window_get_pointer(gdkWindow, x, y, new int[1]); } - OS.gdk_test_simulate_button(gdkWindow, x[0], y[0], button, 0, type == SWT.MouseDown ? OS.GDK_BUTTON_PRESS: OS.GDK_BUTTON_RELEASE); + GDK.gdk_test_simulate_button(gdkWindow, x[0], y[0], button, 0, type == SWT.MouseDown ? GDK.GDK_BUTTON_PRESS: GDK.GDK_BUTTON_RELEASE); return true; } /* @@ -4415,9 +4415,9 @@ void putGdkEvents () { long /*int*/ event = gdkEvents [i]; Widget widget = gdkEventWidgets [i]; if (widget == null || !widget.isDisposed ()) { - OS.gdk_event_put (event); + GDK.gdk_event_put (event); } - OS.gdk_event_free (event); + GDK.gdk_event_free (event); gdkEvents [i] = 0; gdkEventWidgets [i] = null; } @@ -4462,7 +4462,7 @@ public boolean readAndDispatch () { * code outside of SWT (i.e AWT, etc). It ensures that the current * thread leaves the GTK lock before calling the function below. */ - OS.gdk_threads_leave(); + GDK.gdk_threads_leave(); events |= OS.g_main_context_iteration (0, false); if (events) { runDeferredEvents (); @@ -4551,7 +4551,7 @@ void releaseDisplay () { /* Dispose xfilter callback */ if (filterProc != 0) { - OS.gdk_window_remove_filter(0, filterProc, 0); + GDK.gdk_window_remove_filter(0, filterProc, 0); } filterCallback.dispose(); filterCallback = null; filterProc = 0; @@ -4662,7 +4662,7 @@ void releaseDisplay () { COLOR_INFO_BACKGROUND = COLOR_INFO_FOREGROUND = COLOR_LINK_FOREGROUND = null; /* Dispose the event callback */ - OS.gdk_event_handler_set (0, 0, 0); + GDK.gdk_event_handler_set (0, 0, 0); eventCallback.dispose (); eventCallback = null; /* Dispose the hidden shell */ @@ -5052,14 +5052,14 @@ public void setCursorLocation (int x, int y) { } void setCursorLocationInPixels (Point location) { - long /*int*/ gdkDisplay = OS.gdk_display_get_default(); - long /*int*/ gdkScreen = OS.gdk_screen_get_default(); + long /*int*/ gdkDisplay = GDK.gdk_display_get_default(); + long /*int*/ gdkScreen = GDK.gdk_screen_get_default(); if (!GTK.GTK3) { - OS.gdk_display_warp_pointer(gdkDisplay, gdkScreen, location.x, location.y); + GDK.gdk_display_warp_pointer(gdkDisplay, gdkScreen, location.x, location.y); } else { - long /*int*/ gdkDeviceManager = OS.gdk_display_get_device_manager(gdkDisplay); - long /*int*/ gdkPointer = OS.gdk_device_manager_get_client_pointer(gdkDeviceManager); - OS.gdk_device_warp(gdkPointer, gdkScreen, location.x, location.y); + long /*int*/ gdkDeviceManager = GDK.gdk_display_get_device_manager(gdkDisplay); + long /*int*/ gdkPointer = GDK.gdk_device_manager_get_client_pointer(gdkDeviceManager); + GDK.gdk_device_warp(gdkPointer, gdkScreen, location.x, location.y); } } @@ -5812,7 +5812,7 @@ public void update () { * It's worth checking whether can be removed on all GTK 3 versions. */ if (GTK.GTK_VERSION < OS.VERSION(3, 16, 0)) { - OS.gdk_window_process_all_updates (); + GDK.gdk_window_process_all_updates (); } } @@ -5874,27 +5874,27 @@ long /*int*/ gdk_window_get_device_position (long /*int*/ window, int[] x, int[] if (GTK.GTK3) { long /*int*/ display = 0; if( window != 0) { - display = OS.gdk_window_get_display (window); + display = GDK.gdk_window_get_display (window); } else { - window = OS.gdk_get_default_root_window (); - display = OS.gdk_window_get_display (window); + window = GDK.gdk_get_default_root_window (); + display = GDK.gdk_window_get_display (window); } - long /*int*/ device_manager = OS.gdk_display_get_device_manager (display); - long /*int*/ pointer = OS.gdk_device_manager_get_client_pointer (device_manager); - return OS.gdk_window_get_device_position(window, pointer, x, y, mask); + long /*int*/ device_manager = GDK.gdk_display_get_device_manager (display); + long /*int*/ pointer = GDK.gdk_device_manager_get_client_pointer (device_manager); + return GDK.gdk_window_get_device_position(window, pointer, x, y, mask); } else { - return OS.gdk_window_get_pointer (window, x, y, mask); + return GDK.gdk_window_get_pointer (window, x, y, mask); } } long /*int*/ gdk_device_get_window_at_position (int[] win_x, int[] win_y) { if (GTK.GTK3) { - long /*int*/ display = OS.gdk_display_get_default (); - long /*int*/ device_manager = OS.gdk_display_get_device_manager (display); - long /*int*/ device = OS.gdk_device_manager_get_client_pointer (device_manager); - return OS.gdk_device_get_window_at_position (device, win_x, win_y); + long /*int*/ display = GDK.gdk_display_get_default (); + long /*int*/ device_manager = GDK.gdk_display_get_device_manager (display); + long /*int*/ device = GDK.gdk_device_manager_get_client_pointer (device_manager); + return GDK.gdk_device_get_window_at_position (device, win_x, win_y); } else { - return OS.gdk_window_at_pointer (win_x, win_y); + return GDK.gdk_window_at_pointer (win_x, win_y); } } diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/ExpandBar.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/ExpandBar.java index 675d56edd7..4ec8973919 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/ExpandBar.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/ExpandBar.java @@ -325,10 +325,10 @@ long /*int*/ gtk_key_press_event (long /*int*/ widget, long /*int*/ event) { OS.memmove (gdkEvent, event, GdkEventKey.sizeof); boolean next = false; switch (gdkEvent.keyval) { - case OS.GDK_Up: - case OS.GDK_Left: next = false; break; - case OS.GDK_Down: - case OS.GDK_Right: next = true; break; + case GDK.GDK_Up: + case GDK.GDK_Left: next = false; break; + case GDK.GDK_Down: + case GDK.GDK_Right: next = true; break; default: return result; } int start = index, offset = next ? 1 : -1; diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/FileDialog.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/FileDialog.java index 475aa4f71b..cf4aa5b618 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/FileDialog.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/FileDialog.java @@ -353,7 +353,7 @@ String openChooserDialog () { * code outside of SWT (i.e AWT, etc). It ensures that the current * thread leaves the GTK lock acquired by the function above. */ - OS.gdk_threads_leave(); + GDK.gdk_threads_leave(); display.sendPostExternalEventDispatchEvent (); if ((style & SWT.RIGHT_TO_LEFT) != 0) { OS.g_signal_remove_emission_hook (signalId, hookId); diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/FontDialog.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/FontDialog.java index 267e7dec72..d862a945f9 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/FontDialog.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/FontDialog.java @@ -199,7 +199,7 @@ public FontData open () { * code outside of SWT (i.e AWT, etc). It ensures that the current * thread leaves the GTK lock acquired by the function above. */ - OS.gdk_threads_leave(); + GDK.gdk_threads_leave(); display.sendPostExternalEventDispatchEvent (); if ((style & SWT.RIGHT_TO_LEFT) != 0) { OS.g_signal_remove_emission_hook (signalId, hookId); diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Label.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Label.java index 7b12f858a9..cda63c4f8d 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Label.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Label.java @@ -122,7 +122,7 @@ void connectPaint () { * is drawn on the Label is not re-drawn. See bug 483791. */ if (GTK.GTK_VERSION >= OS.VERSION (3, 9, 0) && labelHandle != 0) { - int paintMask = OS.GDK_EXPOSURE_MASK; + int paintMask = GDK.GDK_EXPOSURE_MASK; GTK.gtk_widget_add_events (labelHandle, paintMask); OS.g_signal_connect_closure_by_id (labelHandle, display.signalIds [DRAW], 0, display.getClosure (EXPOSE_EVENT_INVERSE), false); diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Link.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Link.java index 2680748f8c..716caf8987 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Link.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Link.java @@ -330,7 +330,7 @@ long /*int*/ gtk_button_press_event (long /*int*/ widget, long /*int*/ event) { if (result != 0) return result; GdkEventButton gdkEvent = new GdkEventButton (); OS.memmove (gdkEvent, event, GdkEventButton.sizeof); - if (gdkEvent.button == 1 && gdkEvent.type == OS.GDK_BUTTON_PRESS) { + if (gdkEvent.button == 1 && gdkEvent.type == GDK.GDK_BUTTON_PRESS) { if (focusIndex != -1) setFocus (); int x = (int) gdkEvent.x; int y = (int) gdkEvent.y; @@ -410,7 +410,7 @@ long /*int*/ gtk_event_after (long /*int*/ widget, long /*int*/ gdkEvent) { GdkEvent event = new GdkEvent (); OS.memmove (event, gdkEvent, GdkEvent.sizeof); switch (event.type) { - case OS.GDK_FOCUS_CHANGE: + case GDK.GDK_FOCUS_CHANGE: redraw (); break; } @@ -425,20 +425,20 @@ long /*int*/ gtk_key_press_event (long /*int*/ widget, long /*int*/ eventPtr) { GdkEventKey gdkEvent = new GdkEventKey (); OS.memmove (gdkEvent, eventPtr, GdkEventKey.sizeof); switch (gdkEvent.keyval) { - case OS.GDK_Return: - case OS.GDK_KP_Enter: - case OS.GDK_space: + case GDK.GDK_Return: + case GDK.GDK_KP_Enter: + case GDK.GDK_space: Event event = new Event (); event.text = ids [focusIndex]; sendSelectionEvent (SWT.Selection, event, true); break; - case OS.GDK_Tab: + case GDK.GDK_Tab: if (focusIndex < offsets.length - 1) { focusIndex++; redraw (); } break; - case OS.GDK_ISO_Left_Tab: + case GDK.GDK_ISO_Left_Tab: if (focusIndex > 0) { focusIndex--; redraw (); @@ -457,7 +457,7 @@ long /*int*/ gtk_motion_notify_event (long /*int*/ widget, long /*int*/ event) { int x = (int) gdkEvent.x; int y = (int) gdkEvent.y; if ((style & SWT.MIRRORED) != 0) x = getClientWidth () - x; - if ((gdkEvent.state & OS.GDK_BUTTON1_MASK) != 0) { + if ((gdkEvent.state & GDK.GDK_BUTTON1_MASK) != 0) { int oldSelection = selection.y; selection.y = DPIUtil.autoScaleUp(layout.getOffset (x, y, null)); if (selection.y != oldSelection) { @@ -850,10 +850,10 @@ void styleLinkParts() { int traversalCode (int key, GdkEventKey event) { if (offsets.length == 0) return 0; int bits = super.traversalCode (key, event); - if (key == OS.GDK_Tab && focusIndex < offsets.length - 1) { + if (key == GDK.GDK_Tab && focusIndex < offsets.length - 1) { return bits & ~SWT.TRAVERSE_TAB_NEXT; } - if (key == OS.GDK_ISO_Left_Tab && focusIndex > 0) { + if (key == GDK.GDK_ISO_Left_Tab && focusIndex > 0) { return bits & ~SWT.TRAVERSE_TAB_PREVIOUS; } return bits; diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/List.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/List.java index 00a639be4c..245ae0e7b7 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/List.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/List.java @@ -794,8 +794,8 @@ long /*int*/ gtk_changed (long /*int*/ widget) { @Override long /*int*/ gtk_event_after (long /*int*/ widget, long /*int*/ gdkEvent) { - switch (OS.GDK_EVENT_TYPE (gdkEvent)) { - case OS.GDK_EXPOSE: { + switch (GDK.GDK_EVENT_TYPE (gdkEvent)) { + case GDK.GDK_EXPOSE: { /* * Bug in GTK. SWT connects the expose-event 'after' the default * handler of the signal. If the tree has no children, then GTK @@ -825,9 +825,9 @@ long /*int*/ gtk_button_press_event (long /*int*/ widget, long /*int*/ event) { GdkEventButton gdkEvent = new GdkEventButton (); OS.memmove (gdkEvent, event, GdkEventButton.sizeof); if ((state & DRAG_DETECT) != 0 && hooks (SWT.DragDetect) && - !OS.isX11() && gdkEvent.type == OS.GDK_BUTTON_PRESS) { // Wayland + !OS.isX11() && gdkEvent.type == GDK.GDK_BUTTON_PRESS) { // Wayland // check to see if there is another event coming in that is not a double/triple click, this is to prevent Bug 514531 - long /*int*/ nextEvent = OS.gdk_event_peek (); + long /*int*/ nextEvent = GDK.gdk_event_peek (); if (nextEvent == 0) { long /*int*/ [] path = new long /*int*/ [1]; long /*int*/ selection = GTK.gtk_tree_view_get_selection (handle); @@ -836,8 +836,8 @@ long /*int*/ gtk_button_press_event (long /*int*/ widget, long /*int*/ event) { // selection count is used in the case of clicking an already selected item while holding Control selectionCountOnPress = getSelectionCount(); if (GTK.gtk_tree_selection_path_is_selected (selection, path[0])) { - if (((gdkEvent.state & (OS.GDK_CONTROL_MASK|OS.GDK_SHIFT_MASK)) == 0) || - ((gdkEvent.state & OS.GDK_CONTROL_MASK) != 0)) { + if (((gdkEvent.state & (GDK.GDK_CONTROL_MASK|GDK.GDK_SHIFT_MASK)) == 0) || + ((gdkEvent.state & GDK.GDK_CONTROL_MASK) != 0)) { /** * Disable selection on a mouse click if there are multiple items already selected. Also, * if control is currently being held down, we will designate the selection logic over to release @@ -851,7 +851,7 @@ long /*int*/ gtk_button_press_event (long /*int*/ widget, long /*int*/ event) { } } } else { - OS.gdk_event_free (nextEvent); + GDK.gdk_event_free (nextEvent); } } /* @@ -864,7 +864,7 @@ long /*int*/ gtk_button_press_event (long /*int*/ widget, long /*int*/ event) { */ int button = gdkEvent.button; - if (button == 3 && gdkEvent.type == OS.GDK_BUTTON_PRESS) { + if (button == 3 && gdkEvent.type == GDK.GDK_BUTTON_PRESS) { long /*int*/ [] path = new long /*int*/ [1]; if (GTK.gtk_tree_view_get_path_at_pos (handle, (int)gdkEvent.x, (int)gdkEvent.y, path, null, null, null)) { if (path [0] != 0) { @@ -896,7 +896,7 @@ long /*int*/ gtk_button_press_event (long /*int*/ widget, long /*int*/ event) { } //If Mouse double-click pressed, manually send a DefaultSelection. See Bug 312568. - if (gdkEvent.type == OS.GDK_2BUTTON_PRESS) { + if (gdkEvent.type == GDK.GDK_2BUTTON_PRESS) { sendTreeDefaultSelection (); } @@ -933,12 +933,12 @@ long /*int*/ gtk_button_release_event (long /*int*/ widget, long /*int*/ event) if (GTK.gtk_tree_view_get_path_at_pos (handle, (int)gdkEvent.x, (int)gdkEvent.y, path, null, null, null) && path[0] != 0 && GTK.gtk_tree_selection_path_is_selected (selection, path[0])) { selectionCountOnRelease = getSelectionCount(); - if ((gdkEvent.state & (OS.GDK_CONTROL_MASK|OS.GDK_SHIFT_MASK)) == 0) { + if ((gdkEvent.state & (GDK.GDK_CONTROL_MASK|GDK.GDK_SHIFT_MASK)) == 0) { GTK.gtk_tree_view_set_cursor(handle, path[0], 0, false); } // Check to see if there has been a new tree item selected when holding Control in Path. // If not, deselect the item. - if ((gdkEvent.state & OS.GDK_CONTROL_MASK) != 0 && selectionCountOnRelease == selectionCountOnPress) { + if ((gdkEvent.state & GDK.GDK_CONTROL_MASK) != 0 && selectionCountOnRelease == selectionCountOnPress) { GTK.gtk_tree_selection_unselect_path (selection,path[0]); } } @@ -953,10 +953,10 @@ long /*int*/ gtk_button_release_event (long /*int*/ widget, long /*int*/ event) void keyPressDefaultSelectionHandler (long /*int*/ event, int key) { int keymask = gdk_event_get_state (event); switch (key) { - case OS.GDK_Return: + case GDK.GDK_Return: // Send DefaultSelectionEvent when: Enter, Shift+Enter, Ctrl+Enter, Alt+Enter are pressed. // Not when (Meta|Super|Hyper)+Enter, reason is stateMask is not provided on Gtk. Does not trigger on Win32 either. - if ((keymask & (OS.GDK_SUPER_MASK | OS.GDK_META_MASK | OS.GDK_HYPER_MASK)) == 0) { + if ((keymask & (GDK.GDK_SUPER_MASK | GDK.GDK_META_MASK | GDK.GDK_HYPER_MASK)) == 0) { sendTreeDefaultSelection (); } break; diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Menu.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Menu.java index 3816dca0e6..3b667b4d3d 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Menu.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Menu.java @@ -238,12 +238,12 @@ void _setVisible (boolean visible) { */ long /*int*/ eventPtr = GTK.gtk_get_current_event(); if (eventPtr == 0) { - eventPtr = OS.gdk_event_new(OS.GDK_BUTTON_PRESS); + eventPtr = GDK.gdk_event_new(GDK.GDK_BUTTON_PRESS); GdkEventButton event = new GdkEventButton (); - event.type = OS.GDK_BUTTON_PRESS; + event.type = GDK.GDK_BUTTON_PRESS; event.window = OS.g_object_ref(GTK.gtk_widget_get_window (getShell().handle)); - long /*int*/ device_manager = OS.gdk_display_get_device_manager (OS.gdk_display_get_default ()); - event.device = OS.gdk_device_manager_get_client_pointer (device_manager); + long /*int*/ device_manager = GDK.gdk_display_get_device_manager (GDK.gdk_display_get_default ()); + event.device = GDK.gdk_device_manager_get_client_pointer (device_manager); event.time = display.getLastEventTime (); OS.memmove (eventPtr, event, GdkEventButton.sizeof); GTK.gtk_menu_popup_at_pointer (handle, eventPtr); @@ -254,24 +254,24 @@ void _setVisible (boolean visible) { * If we are running on the Wayland the best way to pop-up a menu * is by using the location of the mouse pointer. See bug 530059. */ - long /*int*/ seat = OS.gdk_event_get_seat(eventPtr); - long /*int*/ pointer = OS.gdk_seat_get_pointer(seat); - long /*int*/ deviceWindow = OS.gdk_device_get_window_at_position(pointer, null, null); + long /*int*/ seat = GDK.gdk_event_get_seat(eventPtr); + long /*int*/ pointer = GDK.gdk_seat_get_pointer(seat); + long /*int*/ deviceWindow = GDK.gdk_device_get_window_at_position(pointer, null, null); OS.g_object_ref(deviceWindow); /* * The event is most likely a button or key press. If it isn't * we don't want it -- fall back to the event found with * gtk_get_current_event(). */ - int eventType = OS.gdk_event_get_event_type(eventPtr); + int eventType = GDK.gdk_event_get_event_type(eventPtr); switch (eventType) { - case OS.GDK_BUTTON_PRESS: + case GDK.GDK_BUTTON_PRESS: GdkEventButton eventButton = new GdkEventButton(); OS.memmove (eventButton, eventPtr, GdkEventButton.sizeof); eventButton.window = deviceWindow; OS.memmove(eventPtr, eventButton, GdkEventButton.sizeof); break; - case OS.GDK_KEY_PRESS: + case GDK.GDK_KEY_PRESS: GdkEventKey eventKey = new GdkEventKey(); OS.memmove (eventKey, eventPtr, GdkEventKey.sizeof); eventKey.window = deviceWindow; @@ -281,7 +281,7 @@ void _setVisible (boolean visible) { } } GTK.gtk_menu_popup_at_pointer (handle, eventPtr); - OS.gdk_event_free (eventPtr); + GDK.gdk_event_free (eventPtr); } } else { sendEvent (SWT.Hide); @@ -467,7 +467,7 @@ void fixMenus (Decorations newParent) { } long /*int*/ window = gtk_widget_get_window (handle); int [] origin_x = new int [1], origin_y = new int [1]; - OS.gdk_window_get_origin (window, origin_x, origin_y); + GDK.gdk_window_get_origin (window, origin_x, origin_y); GtkAllocation allocation = new GtkAllocation (); GTK.gtk_widget_get_allocation (handle, allocation); int x = origin_x [0] + allocation.x; diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/MenuItem.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/MenuItem.java index 55598109b6..7766195916 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/MenuItem.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/MenuItem.java @@ -1132,16 +1132,16 @@ void updateAccelerator (long /*int*/ accelGroup, boolean add) { if (accelerator == 0 || !getEnabled ()) return; if ((accelerator & SWT.COMMAND) != 0) return; int mask = 0; - if ((accelerator & SWT.ALT) != 0) mask |= OS.GDK_MOD1_MASK; - if ((accelerator & SWT.SHIFT) != 0) mask |= OS.GDK_SHIFT_MASK; - if ((accelerator & SWT.CONTROL) != 0) mask |= OS.GDK_CONTROL_MASK; + if ((accelerator & SWT.ALT) != 0) mask |= GDK.GDK_MOD1_MASK; + if ((accelerator & SWT.SHIFT) != 0) mask |= GDK.GDK_SHIFT_MASK; + if ((accelerator & SWT.CONTROL) != 0) mask |= GDK.GDK_CONTROL_MASK; int keysym = accelerator & SWT.KEY_MASK; int newKey = Display.untranslateKey (keysym); if (newKey != 0) { keysym = newKey; } else { switch (keysym) { - case '\r': keysym = OS.GDK_Return; break; + case '\r': keysym = GDK.GDK_Return; break; default: keysym = Converter.wcsToMbcs ((char) keysym); } } @@ -1169,14 +1169,14 @@ private MaskKeysym getMaskKeysym() { int plusIndex = text.indexOf('+', start); while (plusIndex != -1) { String maskStr = text.substring(start, plusIndex); - if (maskStr.equals("Ctrl")) maskKeysym.mask |= OS.GDK_CONTROL_MASK; - if (maskStr.equals("Shift")) maskKeysym.mask |= OS.GDK_SHIFT_MASK; - if (maskStr.equals("Alt")) maskKeysym.mask |= OS.GDK_MOD1_MASK; + if (maskStr.equals("Ctrl")) maskKeysym.mask |= GDK.GDK_CONTROL_MASK; + if (maskStr.equals("Shift")) maskKeysym.mask |= GDK.GDK_SHIFT_MASK; + if (maskStr.equals("Alt")) maskKeysym.mask |= GDK.GDK_MOD1_MASK; start = plusIndex + 1; plusIndex = text.indexOf('+', start); } if ("Enter".equals(text.substring(start))) { - maskKeysym.keysym = OS.GDK_ISO_Enter; + maskKeysym.keysym = GDK.GDK_ISO_Enter; } switch (text.length() - start) { case 1: @@ -1186,27 +1186,27 @@ private MaskKeysym getMaskKeysym() { case 2: if (text.charAt(start) == 'F') { switch (text.charAt(start + 1)) { - case '1': maskKeysym.keysym = OS.GDK_F1; break; - case '2': maskKeysym.keysym = OS.GDK_F2; break; - case '3': maskKeysym.keysym = OS.GDK_F3; break; - case '4': maskKeysym.keysym = OS.GDK_F4; break; - case '5': maskKeysym.keysym = OS.GDK_F5; break; - case '6': maskKeysym.keysym = OS.GDK_F6; break; - case '7': maskKeysym.keysym = OS.GDK_F7; break; - case '8': maskKeysym.keysym = OS.GDK_F8; break; - case '9': maskKeysym.keysym = OS.GDK_F9; break; + case '1': maskKeysym.keysym = GDK.GDK_F1; break; + case '2': maskKeysym.keysym = GDK.GDK_F2; break; + case '3': maskKeysym.keysym = GDK.GDK_F3; break; + case '4': maskKeysym.keysym = GDK.GDK_F4; break; + case '5': maskKeysym.keysym = GDK.GDK_F5; break; + case '6': maskKeysym.keysym = GDK.GDK_F6; break; + case '7': maskKeysym.keysym = GDK.GDK_F7; break; + case '8': maskKeysym.keysym = GDK.GDK_F8; break; + case '9': maskKeysym.keysym = GDK.GDK_F9; break; } } break; case 3: if (text.charAt(start) == 'F' && text.charAt(start + 1) == '1') { switch (text.charAt(start + 2)) { - case '0': maskKeysym.keysym = OS.GDK_F10; break; - case '1': maskKeysym.keysym = OS.GDK_F11; break; - case '2': maskKeysym.keysym = OS.GDK_F12; break; - case '3': maskKeysym.keysym = OS.GDK_F13; break; - case '4': maskKeysym.keysym = OS.GDK_F14; break; - case '5': maskKeysym.keysym = OS.GDK_F15; break; + case '0': maskKeysym.keysym = GDK.GDK_F10; break; + case '1': maskKeysym.keysym = GDK.GDK_F11; break; + case '2': maskKeysym.keysym = GDK.GDK_F12; break; + case '3': maskKeysym.keysym = GDK.GDK_F13; break; + case '4': maskKeysym.keysym = GDK.GDK_F14; break; + case '5': maskKeysym.keysym = GDK.GDK_F15; break; } } break; diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/MessageBox.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/MessageBox.java index 55f462e479..ec291e3c25 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/MessageBox.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/MessageBox.java @@ -193,7 +193,7 @@ public int open () { * code outside of SWT (i.e AWT, etc). It ensures that the current * thread leaves the GTK lock acquired by the function above. */ - OS.gdk_threads_leave(); + GDK.gdk_threads_leave(); display.sendPostExternalEventDispatchEvent (); if ((style & SWT.RIGHT_TO_LEFT) != 0) { OS.g_signal_remove_emission_hook (signalId, hookId); diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/ProgressBar.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/ProgressBar.java index 2a01856d1e..391795ef80 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/ProgressBar.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/ProgressBar.java @@ -321,8 +321,8 @@ void updateBar (int selection, int minimum, int maximum) { * outstanding redraws to be delivered. */ long /*int*/ window = paintWindow (); - OS.gdk_window_process_updates (window, false); - OS.gdk_flush (); + GDK.gdk_window_process_updates (window, false); + GDK.gdk_flush (); } } diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Sash.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Sash.java index 54abcb70ff..e649080f4e 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Sash.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Sash.java @@ -142,8 +142,8 @@ void createHandle (int index) { if (handle == 0) error (SWT.ERROR_NO_HANDLES); GTK.gtk_widget_set_has_window (handle, true); GTK.gtk_widget_set_can_focus (handle, true); - int type = (style & SWT.VERTICAL) != 0 ? OS.GDK_SB_H_DOUBLE_ARROW : OS.GDK_SB_V_DOUBLE_ARROW; - defaultCursor = OS.gdk_cursor_new_for_display (OS.gdk_display_get_default(), type); + int type = (style & SWT.VERTICAL) != 0 ? GDK.GDK_SB_H_DOUBLE_ARROW : GDK.GDK_SB_V_DOUBLE_ARROW; + defaultCursor = GDK.gdk_cursor_new_for_display (GDK.gdk_display_get_default(), type); } void drawBand (int x, int y, int width, int height) { @@ -151,17 +151,17 @@ void drawBand (int x, int y, int width, int height) { long /*int*/ window = gtk_widget_get_window (parent.paintHandle()); if (window == 0) return; byte [] bits = {-86, 85, -86, 85, -86, 85, -86, 85}; - long /*int*/ stipplePixmap = OS.gdk_bitmap_create_from_data (window, bits, 8, 8); - long /*int*/ gc = OS.gdk_gc_new (window); - long /*int*/ colormap = OS.gdk_colormap_get_system(); + long /*int*/ stipplePixmap = GDK.gdk_bitmap_create_from_data (window, bits, 8, 8); + long /*int*/ gc = GDK.gdk_gc_new (window); + long /*int*/ colormap = GDK.gdk_colormap_get_system(); GdkColor color = new GdkColor (); - OS.gdk_color_white (colormap, color); - OS.gdk_gc_set_foreground (gc, color); - OS.gdk_gc_set_stipple (gc, stipplePixmap); - OS.gdk_gc_set_subwindow (gc, OS.GDK_INCLUDE_INFERIORS); - OS.gdk_gc_set_fill (gc, OS.GDK_STIPPLED); - OS.gdk_gc_set_function (gc, OS.GDK_XOR); - OS.gdk_draw_rectangle (window, gc, 1, x, y, width, height); + GDK.gdk_color_white (colormap, color); + GDK.gdk_gc_set_foreground (gc, color); + GDK.gdk_gc_set_stipple (gc, stipplePixmap); + GDK.gdk_gc_set_subwindow (gc, GDK.GDK_INCLUDE_INFERIORS); + GDK.gdk_gc_set_fill (gc, GDK.GDK_STIPPLED); + GDK.gdk_gc_set_function (gc, GDK.GDK_XOR); + GDK.gdk_draw_rectangle (window, gc, 1, x, y, width, height); OS.g_object_unref (stipplePixmap); OS.g_object_unref (gc); } @@ -174,11 +174,11 @@ long /*int*/ gtk_button_press_event (long /*int*/ widget, long /*int*/ eventPtr) OS.memmove (gdkEvent, eventPtr, GdkEventButton.sizeof); int button = gdkEvent.button; if (button != 1) return 0; - if (gdkEvent.type == OS.GDK_2BUTTON_PRESS) return 0; - if (gdkEvent.type == OS.GDK_3BUTTON_PRESS) return 0; + if (gdkEvent.type == GDK.GDK_2BUTTON_PRESS) return 0; + if (gdkEvent.type == GDK.GDK_3BUTTON_PRESS) return 0; long /*int*/ window = gtk_widget_get_window (widget); int [] origin_x = new int [1], origin_y = new int [1]; - OS.gdk_window_get_origin (window, origin_x, origin_y); + GDK.gdk_window_get_origin (window, origin_x, origin_y); startX = (int) (gdkEvent.x_root - origin_x [0]); startY = (int) (gdkEvent.y_root - origin_y [0]); GtkAllocation allocation = new GtkAllocation (); @@ -284,19 +284,19 @@ long /*int*/ gtk_key_press_event (long /*int*/ widget, long /*int*/ eventPtr) { OS.memmove (gdkEvent, eventPtr, GdkEventKey.sizeof); int keyval = gdkEvent.keyval; switch (keyval) { - case OS.GDK_Left: - case OS.GDK_Right: - case OS.GDK_Up: - case OS.GDK_Down: + case GDK.GDK_Left: + case GDK.GDK_Right: + case GDK.GDK_Up: + case GDK.GDK_Down: int xChange = 0, yChange = 0; int stepSize = PAGE_INCREMENT; - if ((gdkEvent.state & OS.GDK_CONTROL_MASK) != 0) stepSize = INCREMENT; + if ((gdkEvent.state & GDK.GDK_CONTROL_MASK) != 0) stepSize = INCREMENT; if ((style & SWT.VERTICAL) != 0) { - if (keyval == OS.GDK_Up || keyval == OS.GDK_Down) break; - xChange = keyval == OS.GDK_Left ? -stepSize : stepSize; + if (keyval == GDK.GDK_Up || keyval == GDK.GDK_Down) break; + xChange = keyval == GDK.GDK_Left ? -stepSize : stepSize; } else { - if (keyval == OS.GDK_Left ||keyval == OS.GDK_Right) break; - yChange = keyval == OS.GDK_Up ? -stepSize : stepSize; + if (keyval == GDK.GDK_Left ||keyval == GDK.GDK_Right) break; + yChange = keyval == GDK.GDK_Up ? -stepSize : stepSize; } int parentBorder = 0; GtkAllocation allocation = new GtkAllocation (); @@ -316,9 +316,9 @@ long /*int*/ gtk_key_press_event (long /*int*/ widget, long /*int*/ eventPtr) { /* Ensure that the pointer image does not change */ long /*int*/ window = gtk_widget_get_window (handle); - int grabMask = OS.GDK_POINTER_MOTION_MASK | OS.GDK_BUTTON_RELEASE_MASK; + int grabMask = GDK.GDK_POINTER_MOTION_MASK | GDK.GDK_BUTTON_RELEASE_MASK; long /*int*/ gdkCursor = cursor != null ? cursor.handle : defaultCursor; - int ptrGrabResult = gdk_pointer_grab (window, OS.GDK_OWNERSHIP_NONE, false, grabMask, window, gdkCursor, OS.GDK_CURRENT_TIME); + int ptrGrabResult = gdk_pointer_grab (window, GDK.GDK_OWNERSHIP_NONE, false, grabMask, window, gdkCursor, GDK.GDK_CURRENT_TIME); /* The event must be sent because its doit flag is used. */ Event event = new Event (); @@ -327,7 +327,7 @@ long /*int*/ gtk_key_press_event (long /*int*/ widget, long /*int*/ eventPtr) { event.setBounds (DPIUtil.autoScaleDown (eventRect)); if ((parent.style & SWT.MIRRORED) != 0) event.x = DPIUtil.autoScaleDown (parent.getClientWidth () - width) - event.x; sendSelectionEvent (SWT.Selection, event, true); - if (ptrGrabResult == OS.GDK_GRAB_SUCCESS) gdk_pointer_ungrab (window, OS.GDK_CURRENT_TIME); + if (ptrGrabResult == GDK.GDK_GRAB_SUCCESS) gdk_pointer_ungrab (window, GDK.GDK_CURRENT_TIME); if (isDisposed ()) break; if (event.doit) { @@ -369,12 +369,12 @@ long /*int*/ gtk_motion_notify_event (long /*int*/ widget, long /*int*/ eventPtr eventState = mask [0]; } else { int [] origin_x = new int [1], origin_y = new int [1]; - OS.gdk_window_get_origin (gdkEvent.window, origin_x, origin_y); + GDK.gdk_window_get_origin (gdkEvent.window, origin_x, origin_y); eventX = (int) (gdkEvent.x_root - origin_x [0]); eventY = (int) (gdkEvent.y_root - origin_y [0]); eventState = gdkEvent.state; } - if ((eventState & OS.GDK_BUTTON1_MASK) == 0) return 0; + if ((eventState & GDK.GDK_BUTTON1_MASK) == 0) return 0; GtkAllocation allocation = new GtkAllocation (); GTK.gtk_widget_get_allocation (handle, allocation); int x = allocation.x; @@ -428,7 +428,7 @@ long /*int*/ gtk_realize (long /*int*/ widget) { @Override void hookEvents () { super.hookEvents (); - GTK.gtk_widget_add_events (handle, OS.GDK_POINTER_MOTION_HINT_MASK); + GTK.gtk_widget_add_events (handle, GDK.GDK_POINTER_MOTION_HINT_MASK); } @Override diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/ScrollBar.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/ScrollBar.java index b7c1ad9718..2f6b4479f6 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/ScrollBar.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/ScrollBar.java @@ -360,11 +360,11 @@ Rectangle getThumbBoundsInPixels () { Rectangle rect = new Rectangle(x, y, width, height); int [] origin_x = new int [1], origin_y = new int [1]; long /*int*/ window = gtk_widget_get_window (parent.scrolledHandle); - if (window != 0) OS.gdk_window_get_origin (window, origin_x, origin_y); + if (window != 0) GDK.gdk_window_get_origin (window, origin_x, origin_y); rect.x += origin_x [0]; rect.y += origin_y [0]; window = gtk_widget_get_window (parent.handle); - if (window != 0) OS.gdk_window_get_origin (window, origin_x, origin_y); + if (window != 0) GDK.gdk_window_get_origin (window, origin_x, origin_y); rect.x -= origin_x [0]; rect.y -= origin_y [0]; return rect; @@ -437,11 +437,11 @@ Rectangle getThumbTrackBoundsInPixels () { Rectangle rect = new Rectangle(x, y, width, height); int [] origin_x = new int [1], origin_y = new int [1]; long /*int*/ window = gtk_widget_get_window (parent.scrolledHandle); - if (window != 0) OS.gdk_window_get_origin (window, origin_x, origin_y); + if (window != 0) GDK.gdk_window_get_origin (window, origin_x, origin_y); rect.x += origin_x [0]; rect.y += origin_y [0]; window = gtk_widget_get_window (parent.handle); - if (window != 0) OS.gdk_window_get_origin (window, origin_x, origin_y); + if (window != 0) GDK.gdk_window_get_origin (window, origin_x, origin_y); rect.x -= origin_x [0]; rect.y -= origin_y [0]; return rect; @@ -531,7 +531,7 @@ long /*int*/ gtk_event_after (long /*int*/ widget, long /*int*/ gdkEvent) { GdkEvent gtkEvent = new GdkEvent (); OS.memmove (gtkEvent, gdkEvent, GdkEvent.sizeof); switch (gtkEvent.type) { - case OS.GDK_BUTTON_RELEASE: { + case GDK.GDK_BUTTON_RELEASE: { GdkEventButton gdkEventButton = new GdkEventButton (); OS.memmove (gdkEventButton, gdkEvent, GdkEventButton.sizeof); if (gdkEventButton.button == 1 && detail == GTK.GTK_SCROLL_JUMP) { diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Scrollable.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Scrollable.java index bbb9d3e17e..365beb10ca 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Scrollable.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Scrollable.java @@ -311,9 +311,9 @@ long /*int*/ gtk_scroll_event (long /*int*/ widget, long /*int*/ eventPtr) { ScrollBar scrollBar; GdkEventScroll gdkEvent = new GdkEventScroll (); OS.memmove (gdkEvent, eventPtr, GdkEventScroll.sizeof); - if (gdkEvent.direction == OS.GDK_SCROLL_SMOOTH) { + if (gdkEvent.direction == GDK.GDK_SCROLL_SMOOTH) { double[] delta_x = new double[1], delta_y = new double [1]; - if (OS.gdk_event_get_scroll_deltas (eventPtr, delta_x, delta_y)) { + if (GDK.gdk_event_get_scroll_deltas (eventPtr, delta_x, delta_y)) { if (delta_x [0] != 0) { scrollBar = horizontalBar; if (scrollBar != null && !GTK.gtk_widget_get_visible (scrollBar.handle) && scrollBar.getEnabled()) { @@ -340,7 +340,7 @@ long /*int*/ gtk_scroll_event (long /*int*/ widget, long /*int*/ eventPtr) { } } } else { - if (gdkEvent.direction == OS.GDK_SCROLL_UP || gdkEvent.direction == OS.GDK_SCROLL_DOWN) { + if (gdkEvent.direction == GDK.GDK_SCROLL_UP || gdkEvent.direction == GDK.GDK_SCROLL_DOWN) { scrollBar = verticalBar; } else { scrollBar = horizontalBar; @@ -350,7 +350,7 @@ long /*int*/ gtk_scroll_event (long /*int*/ widget, long /*int*/ eventPtr) { gtk_adjustment_get (scrollBar.adjustmentHandle, adjustment); /* Calculate wheel delta to match GTK+ 2.4 and higher */ int wheel_delta = (int) Math.pow(adjustment.page_size, 2.0 / 3.0); - if (gdkEvent.direction == OS.GDK_SCROLL_UP || gdkEvent.direction == OS.GDK_SCROLL_LEFT) + if (gdkEvent.direction == GDK.GDK_SCROLL_UP || gdkEvent.direction == GDK.GDK_SCROLL_LEFT) wheel_delta = -wheel_delta; int value = (int) Math.max(adjustment.lower, Math.min(adjustment.upper - adjustment.page_size, adjustment.value + wheel_delta)); @@ -452,7 +452,7 @@ void redrawWidget (int x, int y, int width, int height, boolean redrawAll, boole rect.width = Math.max (0, width); rect.height = Math.max (0, height); } - OS.gdk_window_invalidate_rect (window, rect, all); + GDK.gdk_window_invalidate_rect (window, rect, all); } @Override diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Shell.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Shell.java index 15977a82d1..5eeaf1ed27 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Shell.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Shell.java @@ -480,7 +480,7 @@ void adjustTrim () { int height = allocation.height; long /*int*/ window = gtk_widget_get_window (shellHandle); GdkRectangle rect = new GdkRectangle (); - OS.gdk_window_get_frame_extents (window, rect); + GDK.gdk_window_get_frame_extents (window, rect); int trimWidth = Math.max (0, rect.width - width); int trimHeight = Math.max (0, rect.height - height); /* @@ -573,17 +573,17 @@ void bringToTop (boolean force) { long /*int*/ window = gtk_widget_get_window (shellHandle); if ((xFocus || (style & SWT.ON_TOP) != 0)) { if (OS.isX11()) { - long /*int*/ xDisplay = OS.gdk_x11_display_get_xdisplay(OS.gdk_window_get_display(window)); + long /*int*/ xDisplay = GDK.gdk_x11_display_get_xdisplay(GDK.gdk_window_get_display(window)); long /*int*/ xWindow; if (GTK.GTK3) { - xWindow = OS.gdk_x11_window_get_xid (window); + xWindow = GDK.gdk_x11_window_get_xid (window); } else { - xWindow = OS.gdk_x11_drawable_get_xid (window); + xWindow = GDK.gdk_x11_drawable_get_xid (window); } - OS.gdk_error_trap_push (); + GDK.gdk_error_trap_push (); /* Use CurrentTime instead of the last event time to ensure that the shell becomes active */ OS.XSetInputFocus (xDisplay, xWindow, OS.RevertToParent, OS.CurrentTime); - OS.gdk_error_trap_pop (); + GDK.gdk_error_trap_pop (); } else { if (GTK.GTK_VERSION >= OS.VERSION(3, 20, 0)) { if(GTK.gtk_widget_get_visible(shellHandle)) { @@ -593,8 +593,8 @@ void bringToTop (boolean force) { long /*int*/ gdkSeatGrabPrepareFunc = gdkSeatGrabCallback.getAddress(); if (gdkSeatGrabPrepareFunc == 0) SWT.error (SWT.ERROR_NO_MORE_CALLBACKS); GTK.gtk_grab_add(shellHandle); - long /*int*/ seat = OS.gdk_display_get_default_seat(OS.gdk_window_get_display(window)); - OS.gdk_seat_grab(seat, window, 1, true, 0, 0, gdkSeatGrabPrepareFunc, shellHandle); + long /*int*/ seat = GDK.gdk_display_get_default_seat(GDK.gdk_window_get_display(window)); + GDK.gdk_seat_grab(seat, window, 1, true, 0, 0, gdkSeatGrabPrepareFunc, shellHandle); } } } else { @@ -605,9 +605,9 @@ void bringToTop (boolean force) { * user event time. */ if (display.windowManager.toLowerCase ().equals ("metacity")) { - OS.gdk_window_focus (window, display.lastUserEventTime); + GDK.gdk_window_focus (window, display.lastUserEventTime); } else { - OS.gdk_window_focus (window, OS.GDK_CURRENT_TIME); + GDK.gdk_window_focus (window, GDK.GDK_CURRENT_TIME); } } display.activeShell = this; @@ -799,7 +799,7 @@ long /*int*/ filterProc (long /*int*/ xEvent, long /*int*/ gdkEvent, long /*int* sendEvent (SWT.Activate); if (isDisposed ()) return 0; if (isCustomResize ()) { - OS.gdk_window_invalidate_rect (gtk_widget_get_window (shellHandle), null, false); + GDK.gdk_window_invalidate_rect (gtk_widget_get_window (shellHandle), null, false); } break; } @@ -820,7 +820,7 @@ long /*int*/ filterProc (long /*int*/ xEvent, long /*int*/ gdkEvent, long /*int* } if (isDisposed ()) return 0; if (isCustomResize ()) { - OS.gdk_window_invalidate_rect (gtk_widget_get_window (shellHandle), null, false); + GDK.gdk_window_invalidate_rect (gtk_widget_get_window (shellHandle), null, false); } break; } @@ -879,13 +879,13 @@ void hookEvents () { OS.g_signal_connect_closure (shellHandle, OS.move_focus, display.getClosure (MOVE_FOCUS), false); if (!GTK.GTK3) { long /*int*/ window = gtk_widget_get_window (shellHandle); - OS.gdk_window_add_filter (window, display.filterProc, shellHandle); + GDK.gdk_window_add_filter (window, display.filterProc, shellHandle); } else { OS.g_signal_connect_closure_by_id (shellHandle, display.signalIds [FOCUS_IN_EVENT], 0, display.getClosure (FOCUS_IN_EVENT), false); OS.g_signal_connect_closure_by_id (shellHandle, display.signalIds [FOCUS_OUT_EVENT], 0, display.getClosure (FOCUS_OUT_EVENT), false); } if (isCustomResize ()) { - int mask = OS.GDK_POINTER_MOTION_MASK | OS.GDK_BUTTON_RELEASE_MASK | OS.GDK_BUTTON_PRESS_MASK | OS.GDK_ENTER_NOTIFY_MASK | OS.GDK_LEAVE_NOTIFY_MASK; + int mask = GDK.GDK_POINTER_MOTION_MASK | GDK.GDK_BUTTON_RELEASE_MASK | GDK.GDK_BUTTON_PRESS_MASK | GDK.GDK_ENTER_NOTIFY_MASK | GDK.GDK_LEAVE_NOTIFY_MASK; GTK.gtk_widget_add_events (shellHandle, mask); OS.g_signal_connect_closure_by_id (shellHandle, display.signalIds [EXPOSE_EVENT], 0, display.getClosure (EXPOSE_EVENT), false); OS.g_signal_connect_closure_by_id (shellHandle, display.signalIds [LEAVE_NOTIFY_EVENT], 0, display.getClosure (LEAVE_NOTIFY_EVENT), false); @@ -1038,21 +1038,21 @@ int getResizeMode (double x, double y) { int border = GTK.gtk_container_get_border_width (shellHandle); int mode = 0; if (y >= height - border) { - mode = OS.GDK_BOTTOM_SIDE ; - if (x >= width - border - 16) mode = OS.GDK_BOTTOM_RIGHT_CORNER; - else if (x <= border + 16) mode = OS.GDK_BOTTOM_LEFT_CORNER; + mode = GDK.GDK_BOTTOM_SIDE ; + if (x >= width - border - 16) mode = GDK.GDK_BOTTOM_RIGHT_CORNER; + else if (x <= border + 16) mode = GDK.GDK_BOTTOM_LEFT_CORNER; } else if (x >= width - border) { - mode = OS.GDK_RIGHT_SIDE; - if (y >= height - border - 16) mode = OS.GDK_BOTTOM_RIGHT_CORNER; - else if (y <= border + 16) mode = OS.GDK_TOP_RIGHT_CORNER; + mode = GDK.GDK_RIGHT_SIDE; + if (y >= height - border - 16) mode = GDK.GDK_BOTTOM_RIGHT_CORNER; + else if (y <= border + 16) mode = GDK.GDK_TOP_RIGHT_CORNER; } else if (y <= border) { - mode = OS.GDK_TOP_SIDE; - if (x <= border + 16) mode = OS.GDK_TOP_LEFT_CORNER; - else if (x >= width - border - 16) mode = OS.GDK_TOP_RIGHT_CORNER; + mode = GDK.GDK_TOP_SIDE; + if (x <= border + 16) mode = GDK.GDK_TOP_LEFT_CORNER; + else if (x >= width - border - 16) mode = GDK.GDK_TOP_RIGHT_CORNER; } else if (x <= border) { - mode = OS.GDK_LEFT_SIDE; - if (y <= border + 16) mode = OS.GDK_TOP_LEFT_CORNER; - else if (y >= height - border - 16) mode = OS.GDK_BOTTOM_LEFT_CORNER; + mode = GDK.GDK_LEFT_SIDE; + if (y <= border + 16) mode = GDK.GDK_TOP_LEFT_CORNER; + else if (y >= height - border - 16) mode = GDK.GDK_BOTTOM_LEFT_CORNER; } return mode; } @@ -1295,7 +1295,7 @@ long /*int*/ gtk_button_press_event (long /*int*/ widget, long /*int*/ event) { if (!OS.isX11() && GTK.GTK_VERSION >= OS.VERSION(3, 20, 0)) { if ((style & SWT.ON_TOP) != 0 && (style & SWT.NO_FOCUS) == 0) { GTK.gtk_grab_remove(shellHandle); - OS.gdk_seat_ungrab(OS.gdk_event_get_seat(event)); + GDK.gdk_seat_ungrab(GDK.gdk_event_get_seat(event)); GTK.gtk_widget_hide(shellHandle); } } @@ -1443,9 +1443,9 @@ long /*int*/ gtk_leave_notify_event (long /*int*/ widget, long /*int*/ event) { if (isCustomResize ()) { GdkEventCrossing gdkEvent = new GdkEventCrossing (); OS.memmove (gdkEvent, event, GdkEventCrossing.sizeof); - if ((gdkEvent.state & OS.GDK_BUTTON1_MASK) == 0) { + if ((gdkEvent.state & GDK.GDK_BUTTON1_MASK) == 0) { long /*int*/ window = gtk_widget_get_window (shellHandle); - OS.gdk_window_set_cursor (window, 0); + GDK.gdk_window_set_cursor (window, 0); display.resizeMode = 0; } } @@ -1471,7 +1471,7 @@ long /*int*/ gtk_motion_notify_event (long /*int*/ widget, long /*int*/ event) { if (isCustomResize ()) { GdkEventMotion gdkEvent = new GdkEventMotion (); OS.memmove (gdkEvent, event, GdkEventMotion.sizeof); - if ((gdkEvent.state & OS.GDK_BUTTON1_MASK) != 0) { + if ((gdkEvent.state & GDK.GDK_BUTTON1_MASK) != 0) { int border = GTK.gtk_container_get_border_width (shellHandle); int dx = (int)(gdkEvent.x_root - display.resizeLocationX); int dy = (int)(gdkEvent.y_root - display.resizeLocationY); @@ -1482,43 +1482,43 @@ long /*int*/ gtk_motion_notify_event (long /*int*/ widget, long /*int*/ event) { int newWidth = Math.max(width - dx, Math.max(minWidth, border + border)); int newHeight = Math.max(height - dy, Math.max(minHeight, border + border)); switch (display.resizeMode) { - case OS.GDK_LEFT_SIDE: + case GDK.GDK_LEFT_SIDE: x += width - newWidth; width = newWidth; break; - case OS.GDK_TOP_LEFT_CORNER: + case GDK.GDK_TOP_LEFT_CORNER: x += width - newWidth; width = newWidth; y += height - newHeight; height = newHeight; break; - case OS.GDK_TOP_SIDE: + case GDK.GDK_TOP_SIDE: y += height - newHeight; height = newHeight; break; - case OS.GDK_TOP_RIGHT_CORNER: + case GDK.GDK_TOP_RIGHT_CORNER: width = Math.max(width + dx, Math.max(minWidth, border + border)); y += height - newHeight; height = newHeight; break; - case OS.GDK_RIGHT_SIDE: + case GDK.GDK_RIGHT_SIDE: width = Math.max(width + dx, Math.max(minWidth, border + border)); break; - case OS.GDK_BOTTOM_RIGHT_CORNER: + case GDK.GDK_BOTTOM_RIGHT_CORNER: width = Math.max(width + dx, Math.max(minWidth, border + border)); height = Math.max(height + dy, Math.max(minHeight, border + border)); break; - case OS.GDK_BOTTOM_SIDE: + case GDK.GDK_BOTTOM_SIDE: height = Math.max(height + dy, Math.max(minHeight, border + border)); break; - case OS.GDK_BOTTOM_LEFT_CORNER: + case GDK.GDK_BOTTOM_LEFT_CORNER: x += width - newWidth; width = newWidth; height = Math.max(height + dy, Math.max(minHeight, border + border)); break; } if (x != display.resizeBoundsX || y != display.resizeBoundsY) { - OS.gdk_window_move_resize (gtk_widget_get_window (shellHandle), x, y, width, height); + GDK.gdk_window_move_resize (gtk_widget_get_window (shellHandle), x, y, width, height); } else { GTK.gtk_window_resize (shellHandle, width, height); } @@ -1526,8 +1526,8 @@ long /*int*/ gtk_motion_notify_event (long /*int*/ widget, long /*int*/ event) { int mode = getResizeMode (gdkEvent.x, gdkEvent.y); if (mode != display.resizeMode) { long /*int*/ window = gtk_widget_get_window (shellHandle); - long /*int*/ cursor = OS.gdk_cursor_new_for_display (OS.gdk_display_get_default(), mode); - OS.gdk_window_set_cursor (window, cursor); + long /*int*/ cursor = GDK.gdk_cursor_new_for_display (GDK.gdk_display_get_default(), mode); + GDK.gdk_window_set_cursor (window, cursor); gdk_cursor_unref (cursor); display.resizeMode = mode; } @@ -1608,31 +1608,31 @@ long /*int*/ gtk_realize (long /*int*/ widget) { int functions = 0; if ((style & SWT.NO_TRIM) == 0) { if ((style & SWT.MIN) != 0) { - decorations |= OS.GDK_DECOR_MINIMIZE; - functions |= OS.GDK_FUNC_MINIMIZE; + decorations |= GDK.GDK_DECOR_MINIMIZE; + functions |= GDK.GDK_FUNC_MINIMIZE; } if ((style & SWT.MAX) != 0) { - decorations |= OS.GDK_DECOR_MAXIMIZE; - functions |= OS.GDK_FUNC_MAXIMIZE; + decorations |= GDK.GDK_DECOR_MAXIMIZE; + functions |= GDK.GDK_FUNC_MAXIMIZE; } if ((style & SWT.RESIZE) != 0) { - decorations |= OS.GDK_DECOR_RESIZEH; - functions |= OS.GDK_FUNC_RESIZE; + decorations |= GDK.GDK_DECOR_RESIZEH; + functions |= GDK.GDK_FUNC_RESIZE; } - if ((style & SWT.BORDER) != 0) decorations |= OS.GDK_DECOR_BORDER; - if ((style & SWT.MENU) != 0) decorations |= OS.GDK_DECOR_MENU; - if ((style & SWT.TITLE) != 0) decorations |= OS.GDK_DECOR_TITLE; - if ((style & SWT.CLOSE) != 0) functions |= OS.GDK_FUNC_CLOSE; + if ((style & SWT.BORDER) != 0) decorations |= GDK.GDK_DECOR_BORDER; + if ((style & SWT.MENU) != 0) decorations |= GDK.GDK_DECOR_MENU; + if ((style & SWT.TITLE) != 0) decorations |= GDK.GDK_DECOR_TITLE; + if ((style & SWT.CLOSE) != 0) functions |= GDK.GDK_FUNC_CLOSE; /* * Feature in GTK. Under some Window Managers (Sawmill), in order * to get any border at all from the window manager it is necessary to * set GDK_DECOR_BORDER. The fix is to force these bits when any * kind of border is requested. */ - if ((style & SWT.RESIZE) != 0) decorations |= OS.GDK_DECOR_BORDER; - if ((style & SWT.NO_MOVE) == 0) functions |= OS.GDK_FUNC_MOVE; + if ((style & SWT.RESIZE) != 0) decorations |= GDK.GDK_DECOR_BORDER; + if ((style & SWT.NO_MOVE) == 0) functions |= GDK.GDK_FUNC_MOVE; } - OS.gdk_window_set_decorations (window, decorations); + GDK.gdk_window_set_decorations (window, decorations); /* * For systems running Metacity, this call forces the style hints to @@ -1640,14 +1640,14 @@ long /*int*/ gtk_realize (long /*int*/ widget) { * set by the function gdk_window_set_decorations (window, * decorations) are ignored by the window manager. */ - OS.gdk_window_set_functions(window, functions); + GDK.gdk_window_set_functions(window, functions); } else if ((style & SWT.NO_MOVE) != 0) { // if the GDK_FUNC_ALL bit is present, all the other style // bits specified as a parameter will be removed from the window - OS.gdk_window_set_functions (window, OS.GDK_FUNC_ALL | OS.GDK_FUNC_MOVE); + GDK.gdk_window_set_functions (window, GDK.GDK_FUNC_ALL | GDK.GDK_FUNC_MOVE); } if ((style & SWT.ON_TOP) != 0) { - OS.gdk_window_set_override_redirect (window, true); + GDK.gdk_window_set_override_redirect (window, true); } return result; } @@ -1656,10 +1656,10 @@ long /*int*/ gtk_realize (long /*int*/ widget) { long /*int*/ gtk_window_state_event (long /*int*/ widget, long /*int*/ event) { GdkEventWindowState gdkEvent = new GdkEventWindowState (); OS.memmove (gdkEvent, event, GdkEventWindowState.sizeof); - minimized = (gdkEvent.new_window_state & OS.GDK_WINDOW_STATE_ICONIFIED) != 0; - maximized = (gdkEvent.new_window_state & OS.GDK_WINDOW_STATE_MAXIMIZED) != 0; - fullScreen = (gdkEvent.new_window_state & OS.GDK_WINDOW_STATE_FULLSCREEN) != 0; - if ((gdkEvent.changed_mask & OS.GDK_WINDOW_STATE_ICONIFIED) != 0) { + minimized = (gdkEvent.new_window_state & GDK.GDK_WINDOW_STATE_ICONIFIED) != 0; + maximized = (gdkEvent.new_window_state & GDK.GDK_WINDOW_STATE_MAXIMIZED) != 0; + fullScreen = (gdkEvent.new_window_state & GDK.GDK_WINDOW_STATE_FULLSCREEN) != 0; + if ((gdkEvent.changed_mask & GDK.GDK_WINDOW_STATE_ICONIFIED) != 0) { if (minimized) { sendEvent (SWT.Iconify); } else { @@ -1889,10 +1889,10 @@ public void setAlpha (int alpha) { void resizeBounds (int width, int height, boolean notify) { if (redrawWindow != 0) { - OS.gdk_window_resize (redrawWindow, width, height); + GDK.gdk_window_resize (redrawWindow, width, height); } if (enableWindow != 0) { - OS.gdk_window_resize (enableWindow, width, height); + GDK.gdk_window_resize (enableWindow, width, height); } int border = GTK.gtk_container_get_border_width (shellHandle); int boxWidth = width - 2*border; @@ -1984,11 +1984,11 @@ int setBounds (int x, int y, int width, int height, boolean move, boolean resize @Override void setCursor (long /*int*/ cursor) { if (enableWindow != 0) { - OS.gdk_window_set_cursor (enableWindow, cursor); + GDK.gdk_window_set_cursor (enableWindow, cursor); if (!OS.isX11()) { - OS.gdk_flush (); + GDK.gdk_flush (); } else { - long /*int*/ xDisplay = OS.gdk_x11_display_get_xdisplay(OS.gdk_display_get_default()); + long /*int*/ xDisplay = GDK.gdk_x11_display_get_xdisplay(GDK.gdk_display_get_default()); OS.XFlush (xDisplay); } } @@ -2028,16 +2028,16 @@ public void setEnabled (boolean enabled) { attributes.width = rect.width; attributes.height = rect.height; attributes.event_mask = (0xFFFFFFFF & ~OS.ExposureMask); - attributes.wclass = OS.GDK_INPUT_ONLY; - attributes.window_type = OS.GDK_WINDOW_CHILD; - enableWindow = OS.gdk_window_new (window, attributes, 0); + attributes.wclass = GDK.GDK_INPUT_ONLY; + attributes.window_type = GDK.GDK_WINDOW_CHILD; + enableWindow = GDK.gdk_window_new (window, attributes, 0); if (enableWindow != 0) { if (cursor != null) { - OS.gdk_window_set_cursor (enableWindow, cursor.handle); + GDK.gdk_window_set_cursor (enableWindow, cursor.handle); if (!OS.isX11()) { - OS.gdk_flush (); + GDK.gdk_flush (); } else { - long /*int*/ xDisplay = OS.gdk_x11_display_get_xdisplay(OS.gdk_display_get_default()); + long /*int*/ xDisplay = GDK.gdk_x11_display_get_xdisplay(GDK.gdk_display_get_default()); OS.XFlush (xDisplay); } } @@ -2048,8 +2048,8 @@ public void setEnabled (boolean enabled) { if (enterNotifyEventFunc != null) enterNotifyEventId = OS.g_signal_add_emission_hook (enterNotifyEventSignalId, 0, enterNotifyEventFunc.getAddress (), enableWindow, 0); - OS.gdk_window_set_user_data (enableWindow, parentHandle); - OS.gdk_window_show (enableWindow); + GDK.gdk_window_set_user_data (enableWindow, parentHandle); + GDK.gdk_window_show (enableWindow); } } if (fixFocus) fixFocus (control); @@ -2123,14 +2123,14 @@ void setInitialBounds () { width = allocation.width; height = allocation.height; } else { - width = OS.gdk_screen_width () * 5 / 8; - height = OS.gdk_screen_height () * 5 / 8; - long /*int*/ screen = OS.gdk_screen_get_default (); + width = GDK.gdk_screen_width () * 5 / 8; + height = GDK.gdk_screen_height () * 5 / 8; + long /*int*/ screen = GDK.gdk_screen_get_default (); if (screen != 0) { - if (OS.gdk_screen_get_n_monitors (screen) > 1) { - int monitorNumber = OS.gdk_screen_get_monitor_at_window (screen, paintWindow ()); + if (GDK.gdk_screen_get_n_monitors (screen) > 1) { + int monitorNumber = GDK.gdk_screen_get_monitor_at_window (screen, paintWindow ()); GdkRectangle dest = new GdkRectangle (); - OS.gdk_screen_get_monitor_geometry (screen, monitorNumber, dest); + GDK.gdk_screen_get_monitor_geometry (screen, monitorNumber, dest); width = dest.width * 5 / 8; height = dest.height * 5 / 8; } @@ -2222,7 +2222,7 @@ void setMinimumSizeInPixels (int width, int height) { GdkGeometry geometry = new GdkGeometry (); minWidth = geometry.min_width = Math.max (width, trimWidth ()) - trimWidth (); minHeight = geometry.min_height = Math.max (height, trimHeight ()) - trimHeight (); - GTK.gtk_window_set_geometry_hints (shellHandle, 0, geometry, OS.GDK_HINT_MIN_SIZE); + GTK.gtk_window_set_geometry_hints (shellHandle, 0, geometry, GDK.GDK_HINT_MIN_SIZE); } /** @@ -2319,7 +2319,7 @@ public void setRegion (Region region) { //copied from Region: static void gdk_region_get_rectangles(long /*int*/ region, long /*int*/[] rectangles, int[] n_rectangles) { if (!GTK.GTK3) { - OS.gdk_region_get_rectangles (region, rectangles, n_rectangles); + GDK.gdk_region_get_rectangles (region, rectangles, n_rectangles); return; } int num = Cairo.cairo_region_num_rectangles (region); @@ -2344,7 +2344,7 @@ static Region mirrorRegion (Region region) { for (int i = 0; i < nRects [0]; i++) { OS.memmove (rect, rects[0] + (i * GdkRectangle.sizeof), GdkRectangle.sizeof); rect.x = bounds.x + bounds.width - rect.x - rect.width; - OS.gdk_region_union_with_rect (mirrored.handle, rect); + GDK.gdk_region_union_with_rect (mirrored.handle, rect); } if (rects [0] != 0) OS.g_free (rects [0]); return mirrored; @@ -2398,7 +2398,7 @@ public void setVisible (boolean visible) { * up in front of the full-screen window. */ if (parent!=null && parent.getShell().getFullScreen()) { - GTK.gtk_window_set_type_hint(shellHandle, OS.GDK_WINDOW_TYPE_HINT_DIALOG); + GTK.gtk_window_set_type_hint(shellHandle, GDK.GDK_WINDOW_TYPE_HINT_DIALOG); } } else { updateModal (); @@ -2430,17 +2430,17 @@ public void setVisible (boolean visible) { * if it has editable fields and is running Wayland. Refer to bug 515773. */ GTK.gtk_widget_show (shellHandle); - if (enableWindow != 0) OS.gdk_window_raise (enableWindow); + if (enableWindow != 0) GDK.gdk_window_raise (enableWindow); if (isDisposed ()) return; if (!(OS.isX11() && GTK.GTK_IS_PLUG (shellHandle))) { display.dispatchEvents = new int [] { - OS.GDK_EXPOSE, - OS.GDK_FOCUS_CHANGE, - OS.GDK_CONFIGURE, - OS.GDK_MAP, - OS.GDK_UNMAP, - OS.GDK_NO_EXPOSE, - OS.GDK_WINDOW_STATE + GDK.GDK_EXPOSE, + GDK.GDK_FOCUS_CHANGE, + GDK.GDK_CONFIGURE, + GDK.GDK_MAP, + GDK.GDK_UNMAP, + GDK.GDK_NO_EXPOSE, + GDK.GDK_WINDOW_STATE }; Display display = this.display; display.putGdkEvents(); @@ -2453,7 +2453,7 @@ public void setVisible (boolean visible) { * code outside of SWT (i.e AWT, etc). It ensures that the current * thread leaves the GTK lock before calling the function below. */ - OS.gdk_threads_leave(); + GDK.gdk_threads_leave(); OS.g_main_context_iteration (0, false); if (isDisposed ()) break; iconic = minimized || (shell != null && shell.minimized); @@ -2469,7 +2469,7 @@ public void setVisible (boolean visible) { mapped = true; if ((style & mask) != 0) { - gdk_pointer_ungrab (GTK.gtk_widget_get_window (shellHandle), OS.GDK_CURRENT_TIME); + gdk_pointer_ungrab (GTK.gtk_widget_get_window (shellHandle), GDK.GDK_CURRENT_TIME); } opened = true; if (!moved) { @@ -2499,8 +2499,8 @@ public void setVisible (boolean visible) { if (!OS.isX11() && GTK.GTK_VERSION >= OS.VERSION(3, 20, 0)) { if ((style & SWT.ON_TOP) != 0 && (style & SWT.NO_FOCUS) == 0) { GTK.gtk_grab_remove(shellHandle); - OS.gdk_seat_ungrab(OS.gdk_display_get_default_seat( - OS.gdk_window_get_display(GTK.gtk_widget_get_window(shellHandle)))); + GDK.gdk_seat_ungrab(GDK.gdk_display_get_default_seat( + GDK.gdk_window_get_display(GTK.gtk_widget_get_window(shellHandle)))); } } GTK.gtk_widget_hide (shellHandle); @@ -2559,11 +2559,11 @@ long /*int*/ sizeAllocateProc (long /*int*/ handle, long /*int*/ arg0, long /*in int [] x = new int [1], y = new int [1]; gdk_window_get_device_position (0, x, y, null); y [0] += offset; - long /*int*/ screen = OS.gdk_screen_get_default (); + long /*int*/ screen = GDK.gdk_screen_get_default (); if (screen != 0) { - int monitorNumber = OS.gdk_screen_get_monitor_at_point (screen, x[0], y[0]); + int monitorNumber = GDK.gdk_screen_get_monitor_at_point (screen, x[0], y[0]); GdkRectangle dest = new GdkRectangle (); - OS.gdk_screen_get_monitor_geometry (screen, monitorNumber, dest); + GDK.gdk_screen_get_monitor_geometry (screen, monitorNumber, dest); GtkAllocation allocation = new GtkAllocation (); GTK.gtk_widget_get_allocation (handle, allocation); int width = allocation.width; @@ -2732,8 +2732,8 @@ public void dispose () { if (!OS.isX11() && GTK.GTK_VERSION >= OS.VERSION(3, 20, 0)) { if ((style & SWT.ON_TOP) != 0 && (style & SWT.NO_FOCUS) == 0) { GTK.gtk_grab_remove(shellHandle); - OS.gdk_seat_ungrab(OS.gdk_display_get_default_seat( - OS.gdk_window_get_display(GTK.gtk_widget_get_window(shellHandle)))); + GDK.gdk_seat_ungrab(GDK.gdk_display_get_default_seat( + GDK.gdk_window_get_display(GTK.gtk_widget_get_window(shellHandle)))); } } GTK.gtk_widget_hide (shellHandle); @@ -2773,7 +2773,7 @@ Rectangle getBoundsInPixels () { if ((state & Widget.DISPOSE_SENT) == 0) { GTK.gtk_window_get_position (shellHandle, x, y); } else { - OS.gdk_window_get_root_origin(GTK.gtk_widget_get_window(shellHandle), x, y); + GDK.gdk_window_get_root_origin(GTK.gtk_widget_get_window(shellHandle), x, y); } GtkAllocation allocation = new GtkAllocation (); GTK.gtk_widget_get_allocation (vboxHandle, allocation); @@ -2827,7 +2827,7 @@ void releaseWidget () { group = modalGroup = 0; if (!GTK.GTK3) { long /*int*/ window = gtk_widget_get_window (shellHandle); - OS.gdk_window_remove_filter(window, display.filterProc, shellHandle); + GDK.gdk_window_remove_filter(window, display.filterProc, shellHandle); } lastActive = null; if (regionToDispose != null) { diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Slider.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Slider.java index 8b67a8b99d..327a12fc10 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Slider.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Slider.java @@ -223,7 +223,7 @@ long /*int*/ gtk_event_after (long /*int*/ widget, long /*int*/ gdkEvent) { GdkEvent gtkEvent = new GdkEvent (); OS.memmove (gtkEvent, gdkEvent, GdkEvent.sizeof); switch (gtkEvent.type) { - case OS.GDK_BUTTON_RELEASE: { + case GDK.GDK_BUTTON_RELEASE: { GdkEventButton gdkEventButton = new GdkEventButton (); OS.memmove (gdkEventButton, gdkEvent, GdkEventButton.sizeof); if (gdkEventButton.button == 1 && detail == SWT.DRAG) { diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Spinner.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Spinner.java index 5c783fba4c..fb08b65cb5 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Spinner.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Spinner.java @@ -389,7 +389,7 @@ long /*int*/ enterExitHandle () { @Override boolean filterKey (int keyval, long /*int*/ event) { - int time = OS.gdk_event_get_time (event); + int time = GDK.gdk_event_get_time (event); if (time != lastEventTime) { lastEventTime = time; long /*int*/ imContext = imContext (); @@ -646,11 +646,11 @@ long /*int*/ gtk_changed (long /*int*/ widget) { GdkEventKey gdkEvent = new GdkEventKey (); OS.memmove (gdkEvent, eventPtr, GdkEventKey.sizeof); switch (gdkEvent.type) { - case OS.GDK_KEY_PRESS: + case GDK.GDK_KEY_PRESS: keyPress = true; break; } - OS.gdk_event_free (eventPtr); + GDK.gdk_event_free (eventPtr); } if (keyPress) { postEvent (SWT.Modify); @@ -828,7 +828,7 @@ long /*int*/ imContext () { @Override long /*int*/ paintWindow () { long /*int*/ window = super.paintWindow (); - long /*int*/ children = OS.gdk_window_get_children (window); + long /*int*/ children = GDK.gdk_window_get_children (window); if (children != 0) window = OS.g_list_data (children); OS.g_list_free (children); return window; @@ -963,7 +963,7 @@ void setBackgroundGdkColor (GdkColor color) { @Override void setCursor (long /*int*/ cursor) { long /*int*/ defaultCursor = 0; - if (cursor == 0) defaultCursor = OS.gdk_cursor_new_for_display (OS.gdk_display_get_default(), OS.GDK_XTERM); + if (cursor == 0) defaultCursor = GDK.gdk_cursor_new_for_display (GDK.gdk_display_get_default(), GDK.GDK_XTERM); super.setCursor (cursor != 0 ? cursor : defaultCursor); if (cursor == 0) gdk_cursor_unref (defaultCursor); } @@ -1238,8 +1238,8 @@ boolean checkSubwindow () { boolean translateTraversal (GdkEventKey keyEvent) { int key = keyEvent.keyval; switch (key) { - case OS.GDK_KP_Enter: - case OS.GDK_Return: { + case GDK.GDK_KP_Enter: + case GDK.GDK_Return: { long /*int*/ imContext = imContext (); if (imContext != 0) { long /*int*/ [] preeditString = new long /*int*/ [1]; @@ -1266,11 +1266,11 @@ String verifyText (String string, int start, int end) { GdkEventKey gdkEvent = new GdkEventKey (); OS.memmove (gdkEvent, eventPtr, GdkEventKey.sizeof); switch (gdkEvent.type) { - case OS.GDK_KEY_PRESS: + case GDK.GDK_KEY_PRESS: setKeyState (event, gdkEvent); break; } - OS.gdk_event_free (eventPtr); + GDK.gdk_event_free (eventPtr); } int index = 0; if (GTK.gtk_spin_button_get_digits (handle) > 0) { diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Table.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Table.java index ad4f8f2e9b..e3d144152e 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Table.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Table.java @@ -237,10 +237,10 @@ long /*int*/ cellDataProc (long /*int*/ tree_column, long /*int*/ cell, long /*i if (ptr [0] != 0) { if (GTK.GTK3) { OS.g_object_set (cell, OS.cell_background_rgba, ptr[0], 0); - OS.gdk_rgba_free (ptr [0]); + GDK.gdk_rgba_free (ptr [0]); } else { OS.g_object_set (cell, OS.cell_background_gdk, ptr[0], 0); - OS.gdk_color_free (ptr [0]); + GDK.gdk_color_free (ptr [0]); } } } @@ -250,10 +250,10 @@ long /*int*/ cellDataProc (long /*int*/ tree_column, long /*int*/ cell, long /*i if (ptr [0] != 0) { if (GTK.GTK3) { OS.g_object_set (cell, OS.foreground_rgba, ptr [0], 0); - OS.gdk_rgba_free (ptr [0]); + GDK.gdk_rgba_free (ptr [0]); } else { OS.g_object_set (cell, OS.foreground_gdk, ptr [0], 0); - OS.gdk_color_free (ptr [0]); + GDK.gdk_color_free (ptr [0]); } } ptr [0] = 0; @@ -579,17 +579,17 @@ void createColumn (TableColumn column, int index) { GTK.gtk_list_store_set (newModel, newItem, j, ptr [0], -1); if (ptr [0] != 0) { if (GTK.GTK3) { - if (types[j] == OS.GDK_TYPE_RGBA()) { - OS.gdk_rgba_free(ptr[0]); + if (types[j] == GDK.GDK_TYPE_RGBA()) { + GDK.gdk_rgba_free(ptr[0]); } } else { - if (types[j] == OS.GDK_TYPE_COLOR()) { - OS.gdk_color_free(ptr[0]); + if (types[j] == GDK.GDK_TYPE_COLOR()) { + GDK.gdk_color_free(ptr[0]); } } if (types [j] == OS.G_TYPE_STRING ()) { OS.g_free ((ptr [0])); - } else if (types [j] == OS.GDK_TYPE_PIXBUF()) { + } else if (types [j] == GDK.GDK_TYPE_PIXBUF()) { OS.g_object_unref (ptr [0]); } else if (types [j] == OS.PANGO_TYPE_FONT_DESCRIPTION()) { OS.pango_font_description_free (ptr [0]); @@ -1061,9 +1061,9 @@ void destroyItem (TableColumn column) { if (ptr [0] != 0) { if (j == FOREGROUND_COLUMN || j == BACKGROUND_COLUMN) { if (GTK.GTK3) { - OS.gdk_rgba_free (ptr [0]); + GDK.gdk_rgba_free (ptr [0]); } else { - OS.gdk_color_free (ptr [0]); + GDK.gdk_color_free (ptr [0]); } } else if (j == FONT_COLUMN) { OS.pango_font_description_free (ptr [0]); @@ -1080,18 +1080,18 @@ void destroyItem (TableColumn column) { GTK.gtk_list_store_set (newModel, newItem, FIRST_COLUMN + CELL_FOREGROUND, ptr [0], -1); if (ptr [0] != 0) { if (GTK.GTK3) { - OS.gdk_rgba_free (ptr [0]); + GDK.gdk_rgba_free (ptr [0]); } else { - OS.gdk_color_free (ptr [0]); + GDK.gdk_color_free (ptr [0]); } } GTK.gtk_tree_model_get (oldModel, oldItem, column.modelIndex + CELL_BACKGROUND, ptr, -1); GTK.gtk_list_store_set (newModel, newItem, FIRST_COLUMN + CELL_BACKGROUND, ptr [0], -1); if (ptr [0] != 0) { if (GTK.GTK3) { - OS.gdk_rgba_free (ptr [0]); + GDK.gdk_rgba_free (ptr [0]); } else { - OS.gdk_color_free (ptr [0]); + GDK.gdk_color_free (ptr [0]); } } GTK.gtk_tree_model_get (oldModel, oldItem, column.modelIndex + CELL_FONT, ptr, -1); @@ -1249,9 +1249,9 @@ Rectangle getClientAreaInPixels () { long /*int*/ fixedWindow = gtk_widget_get_window (fixedHandle); long /*int*/ binWindow = GTK.gtk_tree_view_get_bin_window (handle); int [] binX = new int [1], binY = new int [1]; - OS.gdk_window_get_origin (binWindow, binX, binY); + GDK.gdk_window_get_origin (binWindow, binX, binY); int [] fixedX = new int [1], fixedY = new int [1]; - OS.gdk_window_get_origin (fixedWindow, fixedX, fixedY); + GDK.gdk_window_get_origin (fixedWindow, fixedX, fixedY); long /*int*/ clientHandle = clientHandle (); GtkAllocation allocation = new GtkAllocation (); GTK.gtk_widget_get_allocation (clientHandle, allocation); @@ -1329,15 +1329,15 @@ long /*int*/[] getColumnTypes (int columnCount) { // per row data types [CHECKED_COLUMN] = OS.G_TYPE_BOOLEAN (); types [GRAYED_COLUMN] = OS.G_TYPE_BOOLEAN (); - types [FOREGROUND_COLUMN] = GTK.GTK3? OS.GDK_TYPE_RGBA() : OS.GDK_TYPE_COLOR (); - types [BACKGROUND_COLUMN] = GTK.GTK3? OS.GDK_TYPE_RGBA() : OS.GDK_TYPE_COLOR (); + types [FOREGROUND_COLUMN] = GTK.GTK3? GDK.GDK_TYPE_RGBA() : GDK.GDK_TYPE_COLOR (); + types [BACKGROUND_COLUMN] = GTK.GTK3? GDK.GDK_TYPE_RGBA() : GDK.GDK_TYPE_COLOR (); types [FONT_COLUMN] = OS.PANGO_TYPE_FONT_DESCRIPTION (); // per cell data for (int i=FIRST_COLUMN; i<types.length; i+=CELL_TYPES) { - types [i + CELL_PIXBUF] = OS.GDK_TYPE_PIXBUF (); + types [i + CELL_PIXBUF] = GDK.GDK_TYPE_PIXBUF (); types [i + CELL_TEXT] = OS.G_TYPE_STRING (); - types [i + CELL_FOREGROUND] = GTK.GTK3? OS.GDK_TYPE_RGBA() : OS.GDK_TYPE_COLOR (); - types [i + CELL_BACKGROUND] = GTK.GTK3? OS.GDK_TYPE_RGBA() : OS.GDK_TYPE_COLOR (); + types [i + CELL_FOREGROUND] = GTK.GTK3? GDK.GDK_TYPE_RGBA() : GDK.GDK_TYPE_COLOR (); + types [i + CELL_BACKGROUND] = GTK.GTK3? GDK.GDK_TYPE_RGBA() : GDK.GDK_TYPE_COLOR (); types [i + CELL_FONT] = OS.PANGO_TYPE_FONT_DESCRIPTION (); } return types; @@ -1570,9 +1570,9 @@ int getHeaderHeightInPixels () { long /*int*/ fixedWindow = gtk_widget_get_window (fixedHandle); long /*int*/ binWindow = GTK.gtk_tree_view_get_bin_window (handle); int [] binY = new int [1]; - OS.gdk_window_get_origin (binWindow, null, binY); + GDK.gdk_window_get_origin (binWindow, null, binY); int [] fixedY = new int [1]; - OS.gdk_window_get_origin (fixedWindow, null, fixedY); + GDK.gdk_window_get_origin (fixedWindow, null, fixedY); return binY [0] - fixedY [0]; } @@ -2062,9 +2062,9 @@ long /*int*/ gtk_button_press_event (long /*int*/ widget, long /*int*/ event) { * selected, we can give the DnD handling to MOTION-NOTIFY. Seee Bug 503431 */ if ((state & DRAG_DETECT) != 0 && hooks (SWT.DragDetect) && - !OS.isX11() && gdkEvent.type == OS.GDK_BUTTON_PRESS) { // Wayland + !OS.isX11() && gdkEvent.type == GDK.GDK_BUTTON_PRESS) { // Wayland // check to see if there is another event coming in that is not a double/triple click, this is to prevent Bug 514531 - long /*int*/ nextEvent = OS.gdk_event_peek (); + long /*int*/ nextEvent = GDK.gdk_event_peek (); if (nextEvent == 0) { long /*int*/ [] path = new long /*int*/ [1]; long /*int*/ selection = GTK.gtk_tree_view_get_selection (handle); @@ -2073,8 +2073,8 @@ long /*int*/ gtk_button_press_event (long /*int*/ widget, long /*int*/ event) { // selection count is used in the case of clicking an already selected item while holding Control selectionCountOnPress = getSelectionCount(); if (GTK.gtk_tree_selection_path_is_selected (selection, path[0])) { - if (((gdkEvent.state & (OS.GDK_CONTROL_MASK|OS.GDK_SHIFT_MASK)) == 0) || - ((gdkEvent.state & OS.GDK_CONTROL_MASK) != 0)) { + if (((gdkEvent.state & (GDK.GDK_CONTROL_MASK|GDK.GDK_SHIFT_MASK)) == 0) || + ((gdkEvent.state & GDK.GDK_CONTROL_MASK) != 0)) { /** * Disable selection on a mouse click if there are multiple items already selected. Also, * if control is currently being held down, we will designate the selection logic over to release @@ -2088,7 +2088,7 @@ long /*int*/ gtk_button_press_event (long /*int*/ widget, long /*int*/ event) { } } } else { - OS.gdk_event_free (nextEvent); + GDK.gdk_event_free (nextEvent); } } /* @@ -2100,7 +2100,7 @@ long /*int*/ gtk_button_press_event (long /*int*/ widget, long /*int*/ event) { * run the default handler when the item is already part of the current selection. */ int button = gdkEvent.button; - if (button == 3 && gdkEvent.type == OS.GDK_BUTTON_PRESS) { + if (button == 3 && gdkEvent.type == GDK.GDK_BUTTON_PRESS) { long /*int*/ [] path = new long /*int*/ [1]; if (GTK.gtk_tree_view_get_path_at_pos (handle, (int)gdkEvent.x, (int)gdkEvent.y, path, null, null, null)) { if (path [0] != 0) { @@ -2132,7 +2132,7 @@ long /*int*/ gtk_button_press_event (long /*int*/ widget, long /*int*/ event) { } //If Mouse double-click pressed, manually send a DefaultSelection. See Bug 312568. - if (gdkEvent.type == OS.GDK_2BUTTON_PRESS) { + if (gdkEvent.type == GDK.GDK_2BUTTON_PRESS) { sendTreeDefaultSelection (); } @@ -2155,10 +2155,10 @@ long /*int*/ gtk_key_press_event (long /*int*/ widget, long /*int*/ event) { void keyPressDefaultSelectionHandler (long /*int*/ event, int key) { int keymask = gdk_event_get_state (event); switch (key) { - case OS.GDK_Return: + case GDK.GDK_Return: // Send DefaultSelectionEvent when: Enter, Shift+Enter, Ctrl+Enter, Alt+Enter are pressed. // Not when (Meta|Super|Hyper)+Enter, reason is stateMask is not provided on Gtk. Does not trigger on Win32 either. - if ((keymask & (OS.GDK_SUPER_MASK | OS.GDK_META_MASK | OS.GDK_HYPER_MASK)) == 0) { + if ((keymask & (GDK.GDK_SUPER_MASK | GDK.GDK_META_MASK | GDK.GDK_HYPER_MASK)) == 0) { sendTreeDefaultSelection (); } break; @@ -2204,12 +2204,12 @@ long /*int*/ gtk_button_release_event (long /*int*/ widget, long /*int*/ event) if (GTK.gtk_tree_view_get_path_at_pos (handle, (int)gdkEvent.x, (int)gdkEvent.y, path, null, null, null) && path[0] != 0 && GTK.gtk_tree_selection_path_is_selected (selection, path[0])) { selectionCountOnRelease = getSelectionCount(); - if ((gdkEvent.state & (OS.GDK_CONTROL_MASK|OS.GDK_SHIFT_MASK)) == 0) { + if ((gdkEvent.state & (GDK.GDK_CONTROL_MASK|GDK.GDK_SHIFT_MASK)) == 0) { GTK.gtk_tree_view_set_cursor(handle, path[0], 0, false); } // Check to see if there has been a new tree item selected when holding Control in Path. // If not, deselect the item. - if ((gdkEvent.state & OS.GDK_CONTROL_MASK) != 0 && selectionCountOnRelease == selectionCountOnPress) { + if ((gdkEvent.state & GDK.GDK_CONTROL_MASK) != 0 && selectionCountOnRelease == selectionCountOnPress) { GTK.gtk_tree_selection_unselect_path (selection,path[0]); } } @@ -2230,8 +2230,8 @@ long /*int*/ gtk_changed (long /*int*/ widget) { @Override long /*int*/ gtk_event_after (long /*int*/ widget, long /*int*/ gdkEvent) { - switch (OS.GDK_EVENT_TYPE (gdkEvent)) { - case OS.GDK_EXPOSE: { + switch (GDK.GDK_EVENT_TYPE (gdkEvent)) { + case GDK.GDK_EXPOSE: { /* * Bug in GTK. SWT connects the expose-event 'after' the default * handler of the signal. If the tree has no children, then GTK @@ -2296,7 +2296,7 @@ long /*int*/ gtk_expose_event (long /*int*/ widget, long /*int*/ eventPtr) { @Override long /*int*/ gtk_motion_notify_event (long /*int*/ widget, long /*int*/ event) { - long /*int*/ window = OS.GDK_EVENT_WINDOW (event); + long /*int*/ window = GDK.GDK_EVENT_WINDOW (event); if (window != GTK.gtk_tree_view_get_bin_window (handle)) return 0; return super.gtk_motion_notify_event (widget, event); } @@ -2933,9 +2933,9 @@ void rendererRender (long /*int*/ cell, long /*int*/ cr, long /*int*/ window, lo if (ptr [0] != 0) { drawState |= SWT.BACKGROUND; if (GTK.GTK3) { - OS.gdk_rgba_free (ptr [0]); + GDK.gdk_rgba_free (ptr [0]); } else { - OS.gdk_color_free (ptr [0]); + GDK.gdk_color_free (ptr [0]); } } if ((flags & GTK.GTK_CELL_RENDERER_SELECTED) != 0) drawState |= SWT.SELECTED; @@ -2950,7 +2950,7 @@ void rendererRender (long /*int*/ cell, long /*int*/ cr, long /*int*/ window, lo // A workaround for https://bugs.eclipse.org/bugs/show_bug.cgi?id=459117 if (cr != 0 && GTK.GTK_VERSION > OS.VERSION(3, 9, 0) && GTK.GTK_VERSION <= OS.VERSION(3, 14, 8)) { GdkRectangle r2 = new GdkRectangle (); - OS.gdk_cairo_get_clip_rectangle (cr, r2); + GDK.gdk_cairo_get_clip_rectangle (cr, r2); rect.x = r2.x; rect.width = r2.width; } @@ -3010,7 +3010,7 @@ void rendererRender (long /*int*/ cell, long /*int*/ cr, long /*int*/ window, lo if ((style & SWT.MIRRORED) != 0) rect.x = getClientWidth () - rect.width - rect.x; if (GTK.GTK_VERSION >= OS.VERSION(3, 9, 0) && cr != 0) { GdkRectangle r = new GdkRectangle(); - OS.gdk_cairo_get_clip_rectangle(cr, r); + GDK.gdk_cairo_get_clip_rectangle(cr, r); Rectangle rect2 = DPIUtil.autoScaleDown(new Rectangle(rect.x, r.y, r.width, r.height)); // Caveat: rect2 is necessary because GC#setClipping(Rectangle) got broken by bug 446075 gc.setClipping(rect2.x, rect2.y, rect2.width, rect2.height); @@ -3105,7 +3105,7 @@ void rendererRender (long /*int*/ cell, long /*int*/ cr, long /*int*/ window, lo // A workaround for https://bugs.eclipse.org/bugs/show_bug.cgi?id=459117 if (cr != 0 && GTK.GTK_VERSION > OS.VERSION(3, 9, 0) && GTK.GTK_VERSION <= OS.VERSION(3, 14, 8)) { GdkRectangle r2 = new GdkRectangle (); - OS.gdk_cairo_get_clip_rectangle (cr, r2); + GDK.gdk_cairo_get_clip_rectangle (cr, r2); rect.x = r2.x; rect.width = r2.width; } diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/TableColumn.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/TableColumn.java index d9a3574314..84b8fccd21 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/TableColumn.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/TableColumn.java @@ -348,9 +348,9 @@ long /*int*/ gtk_clicked (long /*int*/ widget) { if (eventPtr != 0) { GdkEventButton gdkEvent = new GdkEventButton (); OS.memmove (gdkEvent, eventPtr, GdkEventButton.sizeof); - OS.gdk_event_free (eventPtr); + GDK.gdk_event_free (eventPtr); switch (gdkEvent.type) { - case OS.GDK_BUTTON_RELEASE: { + case GDK.GDK_BUTTON_RELEASE: { int clickTime = display.getDoubleClickTime (); int eventTime = gdkEvent.time, eventButton = gdkEvent.button; if (lastButton == eventButton && lastTime != 0 && Math.abs (lastTime - eventTime) <= clickTime) { @@ -371,7 +371,7 @@ long /*int*/ gtk_event_after (long /*int*/ widget, long /*int*/ gdkEvent) { GdkEvent event = new GdkEvent (); OS.memmove (event, gdkEvent, GdkEvent.sizeof); switch (event.type) { - case OS.GDK_BUTTON_PRESS: { + case GDK.GDK_BUTTON_PRESS: { GdkEventButton gdkEventButton = new GdkEventButton (); OS.memmove (gdkEventButton, gdkEvent, GdkEventButton.sizeof); if (gdkEventButton.button == 3) { @@ -739,15 +739,15 @@ void setWidthInPixels (int width) { if (buttonHandle != 0) { long /*int*/ window = GTK.gtk_widget_get_parent_window (buttonHandle); if (window != 0) { - long /*int*/ windowList = OS.gdk_window_get_children (window); + long /*int*/ windowList = GDK.gdk_window_get_children (window); if (windowList != 0) { long /*int*/ windows = windowList; long /*int*/ [] userData = new long /*int*/ [1]; while (windows != 0) { long /*int*/ child = OS.g_list_data (windows); - OS.gdk_window_get_user_data (child, userData); + GDK.gdk_window_get_user_data (child, userData); if (userData[0] == buttonHandle) { - OS.gdk_window_lower (child); + GDK.gdk_window_lower (child); break; } windows = OS.g_list_next (windows); diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/TableItem.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/TableItem.java index 2a965f2084..6efb227d7a 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/TableItem.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/TableItem.java @@ -134,12 +134,12 @@ Color _getBackground () { if (GTK.GTK3) { GdkRGBA gdkRGBA = new GdkRGBA (); OS.memmove(gdkRGBA, ptr [0], GdkRGBA.sizeof); - OS.gdk_rgba_free (ptr [0]); + GDK.gdk_rgba_free (ptr [0]); return Color.gtk_new(display, gdkRGBA); } else { GdkColor gdkColor = new GdkColor (); OS.memmove (gdkColor, ptr [0], GdkColor.sizeof); - OS.gdk_color_free (ptr [0]); + GDK.gdk_color_free (ptr [0]); return Color.gtk_new (display, gdkColor); } } @@ -154,12 +154,12 @@ Color _getBackground (int index) { if (GTK.GTK3) { GdkRGBA gdkRGBA = new GdkRGBA (); OS.memmove(gdkRGBA, ptr [0], GdkRGBA.sizeof); - OS.gdk_rgba_free (ptr [0]); + GDK.gdk_rgba_free (ptr [0]); return Color.gtk_new(display, gdkRGBA); } else { GdkColor gdkColor = new GdkColor (); OS.memmove (gdkColor, ptr [0], GdkColor.sizeof); - OS.gdk_color_free (ptr [0]); + GDK.gdk_color_free (ptr [0]); return Color.gtk_new (display, gdkColor); } } @@ -177,12 +177,12 @@ Color _getForeground () { if (GTK.GTK3) { GdkRGBA gdkRGBA = new GdkRGBA (); OS.memmove(gdkRGBA, ptr [0], GdkRGBA.sizeof); - OS.gdk_rgba_free (ptr [0]); + GDK.gdk_rgba_free (ptr [0]); return Color.gtk_new(display, gdkRGBA); } else { GdkColor gdkColor = new GdkColor (); OS.memmove (gdkColor, ptr [0], GdkColor.sizeof); - OS.gdk_color_free (ptr [0]); + GDK.gdk_color_free (ptr [0]); return Color.gtk_new (display, gdkColor); } } @@ -197,12 +197,12 @@ Color _getForeground (int index) { if (GTK.GTK3) { GdkRGBA gdkRGBA = new GdkRGBA (); OS.memmove(gdkRGBA, ptr [0], GdkRGBA.sizeof); - OS.gdk_rgba_free (ptr [0]); + GDK.gdk_rgba_free (ptr [0]); return Color.gtk_new(display, gdkRGBA); } else { GdkColor gdkColor = new GdkColor (); OS.memmove (gdkColor, ptr [0], GdkColor.sizeof); - OS.gdk_color_free (ptr [0]); + GDK.gdk_color_free (ptr [0]); return Color.gtk_new (display, gdkColor); } } diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Text.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Text.java index 17482e3aca..47fef2209e 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Text.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Text.java @@ -690,7 +690,7 @@ public void copy () { if ((style & SWT.SINGLE) != 0) { GTK.gtk_editable_copy_clipboard (handle); } else { - long /*int*/ clipboard = GTK.gtk_clipboard_get (OS.GDK_NONE); + long /*int*/ clipboard = GTK.gtk_clipboard_get (GDK.GDK_NONE); clearSegments (true); GTK.gtk_text_buffer_copy_clipboard (bufferHandle, clipboard); applySegments (); @@ -714,7 +714,7 @@ public void cut () { if ((style & SWT.SINGLE) != 0) { GTK.gtk_editable_cut_clipboard (handle); } else { - long /*int*/ clipboard = GTK.gtk_clipboard_get (OS.GDK_NONE); + long /*int*/ clipboard = GTK.gtk_clipboard_get (GDK.GDK_NONE); clearSegments (true); GTK.gtk_text_buffer_cut_clipboard (bufferHandle, clipboard, GTK.gtk_text_view_get_editable (handle)); applySegments (); @@ -788,7 +788,7 @@ long /*int*/ eventWindow () { @Override boolean filterKey (int keyval, long /*int*/ event) { - int time = OS.gdk_event_get_time (event); + int time = GDK.gdk_event_get_time (event); if (time != lastEventTime) { lastEventTime = time; long /*int*/ imContext = imContext (); @@ -1471,8 +1471,8 @@ long /*int*/ gtk_button_press_event (long /*int*/ widget, long /*int*/ event) { OS.memmove (gdkEvent, event, GdkEventButton.sizeof); if (!doubleClick) { switch (gdkEvent.type) { - case OS.GDK_2BUTTON_PRESS: - case OS.GDK_3BUTTON_PRESS: + case GDK.GDK_2BUTTON_PRESS: + case GDK.GDK_3BUTTON_PRESS: return 1; } } @@ -1494,11 +1494,11 @@ long /*int*/ gtk_changed (long /*int*/ widget) { GdkEventKey gdkEvent = new GdkEventKey (); OS.memmove (gdkEvent, eventPtr, GdkEventKey.sizeof); switch (gdkEvent.type) { - case OS.GDK_KEY_PRESS: + case GDK.GDK_KEY_PRESS: keyPress = true; break; } - OS.gdk_event_free (eventPtr); + GDK.gdk_event_free (eventPtr); } if (keyPress) { postEvent (SWT.Modify); @@ -1650,7 +1650,7 @@ long /*int*/ gtk_event_after (long /*int*/ widget, long /*int*/ gdkEvent) { GdkEvent event = new GdkEvent (); OS.memmove (event, gdkEvent, GdkEvent.sizeof); switch (event.type) { - case OS.GDK_FOCUS_CHANGE: + case GDK.GDK_FOCUS_CHANGE: GdkEventFocus gdkEventFocus = new GdkEventFocus (); OS.memmove (gdkEventFocus, gdkEvent, GdkEventFocus.sizeof); if (gdkEventFocus.in == 0) { @@ -1714,13 +1714,13 @@ void drawMessage (long /*int*/ cr) { Point thickness = getThickness (handle); x += thickness.x; y += thickness.y; - long /*int*/ cairo = cr != 0 ? cr : OS.gdk_cairo_create(window); + long /*int*/ cairo = cr != 0 ? cr : GDK.gdk_cairo_create(window); Cairo.cairo_set_source_rgba(cairo, textRGBA.red, textRGBA.green, textRGBA.blue, textRGBA.alpha); } else { long /*int*/ style = GTK.gtk_widget_get_style (handle); GTK.gtk_style_get_text (style, GTK.GTK_STATE_INSENSITIVE, textColor); GTK.gtk_style_get_base (style, GTK.GTK_STATE_NORMAL, baseColor); - long /*int*/ cairo = cr != 0 ? cr : OS.gdk_cairo_create(window); + long /*int*/ cairo = cr != 0 ? cr : GDK.gdk_cairo_create(window); Cairo.cairo_set_source_rgba_compatibility (cairo, textColor); Cairo.cairo_move_to(cairo, x, y); OS.pango_cairo_show_layout(cairo, layout); @@ -1838,7 +1838,7 @@ long /*int*/ gtk_key_press_event (long /*int*/ widget, long /*int*/ event) { if (hooks (SWT.Segments) || filters (SWT.Segments)) { GdkEventKey gdkEvent = new GdkEventKey (); OS.memmove (gdkEvent, event, GdkEventKey.sizeof); - if (gdkEvent.length > 0 && (gdkEvent.state & (OS.GDK_MOD1_MASK | OS.GDK_CONTROL_MASK)) == 0) { + if (gdkEvent.length > 0 && (gdkEvent.state & (GDK.GDK_MOD1_MASK | GDK.GDK_CONTROL_MASK)) == 0) { handleSegments = true; if (segments != null) { clearSegments (true); @@ -2097,7 +2097,7 @@ private void scrollIfNotVisible(byte [] iter, byte [] scrollTo, boolean insert) long /*int*/ paintWindow () { if ((style & SWT.SINGLE) != 0) { long /*int*/ window = super.paintWindow (); - long /*int*/ children = OS.gdk_window_get_children (window); + long /*int*/ children = GDK.gdk_window_get_children (window); if (children != 0) { /* * When search or cancel icons are added to Text, those @@ -2133,7 +2133,7 @@ public void paste () { if ((style & SWT.SINGLE) != 0) { GTK.gtk_editable_paste_clipboard (handle); } else { - long /*int*/ clipboard = GTK.gtk_clipboard_get (OS.GDK_NONE); + long /*int*/ clipboard = GTK.gtk_clipboard_get (GDK.GDK_NONE); clearSegments (true); GTK.gtk_text_buffer_paste_clipboard (bufferHandle, clipboard, null, GTK.gtk_text_view_get_editable (handle)); applySegments (); @@ -2336,7 +2336,7 @@ void setBackgroundGdkRGBA (long /*int*/ context, long /*int*/ handle, GdkRGBA rg @Override void setCursor (long /*int*/ cursor) { long /*int*/ defaultCursor = 0; - if (cursor == 0) defaultCursor = OS.gdk_cursor_new_for_display (OS.gdk_display_get_default(), OS.GDK_XTERM); + if (cursor == 0) defaultCursor = GDK.gdk_cursor_new_for_display (GDK.gdk_display_get_default(), GDK.GDK_XTERM); super.setCursor (cursor != 0 ? cursor : defaultCursor); if (cursor == 0) gdk_cursor_unref (defaultCursor); } @@ -2857,8 +2857,8 @@ int translateOffset (int offset) { boolean translateTraversal (GdkEventKey keyEvent) { int key = keyEvent.keyval; switch (key) { - case OS.GDK_KP_Enter: - case OS.GDK_Return: { + case GDK.GDK_KP_Enter: + case GDK.GDK_Return: { long /*int*/ imContext = imContext (); if (imContext != 0) { long /*int*/ [] preeditString = new long /*int*/ [1]; @@ -2880,9 +2880,9 @@ int traversalCode (int key, GdkEventKey event) { if ((style & SWT.READ_ONLY) != 0) return bits; if ((style & SWT.MULTI) != 0) { bits &= ~SWT.TRAVERSE_RETURN; - if (key == OS.GDK_Tab && event != null) { - boolean next = (event.state & OS.GDK_SHIFT_MASK) == 0; - if (next && (event.state & OS.GDK_CONTROL_MASK) == 0) { + if (key == GDK.GDK_Tab && event != null) { + boolean next = (event.state & GDK.GDK_SHIFT_MASK) == 0; + if (next && (event.state & GDK.GDK_CONTROL_MASK) == 0) { bits &= ~(SWT.TRAVERSE_TAB_NEXT | SWT.TRAVERSE_TAB_PREVIOUS); } } @@ -2909,11 +2909,11 @@ String verifyText (String string, int start, int end) { GdkEventKey gdkEvent = new GdkEventKey (); OS.memmove (gdkEvent, eventPtr, GdkEventKey.sizeof); switch (gdkEvent.type) { - case OS.GDK_KEY_PRESS: + case GDK.GDK_KEY_PRESS: setKeyState (event, gdkEvent); break; } - OS.gdk_event_free (eventPtr); + GDK.gdk_event_free (eventPtr); } /* * It is possible (but unlikely), that application diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/ToolItem.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/ToolItem.java index 13e270d51f..ae22539f08 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/ToolItem.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/ToolItem.java @@ -513,10 +513,10 @@ long /*int*/ gtk_clicked (long /*int*/ widget) { OS.memmove (gdkEvent, eventPtr, GdkEvent.sizeof); long /*int*/ topHandle = topHandle(); switch (gdkEvent.type) { - case OS.GDK_KEY_RELEASE: //Fall Through.. - case OS.GDK_BUTTON_PRESS: - case OS.GDK_2BUTTON_PRESS: - case OS.GDK_BUTTON_RELEASE: { + case GDK.GDK_KEY_RELEASE: //Fall Through.. + case GDK.GDK_BUTTON_PRESS: + case GDK.GDK_2BUTTON_PRESS: + case GDK.GDK_BUTTON_RELEASE: { boolean isArrow = false; if (widget == arrowHandle) { isArrow = true; @@ -540,7 +540,7 @@ long /*int*/ gtk_clicked (long /*int*/ widget) { break; } } - OS.gdk_event_free (eventPtr); + GDK.gdk_event_free (eventPtr); } } if ((style & SWT.RADIO) != 0) { @@ -687,7 +687,7 @@ long /*int*/ gtk_event_after (long /*int*/ widget, long /*int*/ gdkEvent) { GdkEvent event = new GdkEvent (); OS.memmove (event, gdkEvent, GdkEvent.sizeof); switch (event.type) { - case OS.GDK_BUTTON_PRESS: { + case GDK.GDK_BUTTON_PRESS: { GdkEventButton gdkEventButton = new GdkEventButton (); OS.memmove (gdkEventButton, gdkEvent, GdkEventButton.sizeof); if (gdkEventButton.button == 3) { @@ -773,11 +773,11 @@ void hookEvents () { * to the parent. */ int mask = - OS.GDK_EXPOSURE_MASK | OS.GDK_POINTER_MOTION_MASK | - OS.GDK_BUTTON_PRESS_MASK | OS.GDK_BUTTON_RELEASE_MASK | - OS.GDK_ENTER_NOTIFY_MASK | OS.GDK_LEAVE_NOTIFY_MASK | - OS.GDK_KEY_PRESS_MASK | OS.GDK_KEY_RELEASE_MASK | - OS.GDK_FOCUS_CHANGE_MASK; + GDK.GDK_EXPOSURE_MASK | GDK.GDK_POINTER_MOTION_MASK | + GDK.GDK_BUTTON_PRESS_MASK | GDK.GDK_BUTTON_RELEASE_MASK | + GDK.GDK_ENTER_NOTIFY_MASK | GDK.GDK_LEAVE_NOTIFY_MASK | + GDK.GDK_KEY_PRESS_MASK | GDK.GDK_KEY_RELEASE_MASK | + GDK.GDK_FOCUS_CHANGE_MASK; GTK.gtk_widget_add_events (eventHandle, mask); OS.g_signal_connect_closure_by_id (eventHandle, display.signalIds [BUTTON_PRESS_EVENT], 0, display.getClosure (BUTTON_PRESS_EVENT), false); OS.g_signal_connect_closure_by_id (eventHandle, display.signalIds [BUTTON_RELEASE_EVENT], 0, display.getClosure (BUTTON_RELEASE_EVENT), false); diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/ToolTip.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/ToolTip.java index f81b1d1d88..e803212a32 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/ToolTip.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/ToolTip.java @@ -136,7 +136,7 @@ public void addSelectionListener (SelectionListener listener) { } void configure () { - long /*int*/ screen = OS.gdk_screen_get_default (); + long /*int*/ screen = GDK.gdk_screen_get_default (); GTK.gtk_widget_realize (handle); /* * Feature in GTK: using gdk_screen_get_monitor_at_window() does not accurately get the correct monitor on the machine. @@ -144,10 +144,10 @@ void configure () { * the coordinates for where the tooltip should appear on the host. */ Point point = getLocation(); - boolean multipleMonitors = (OS.gdk_screen_get_n_monitors(screen) > 1) ? true : false; - int monitorNumber = OS.gdk_screen_get_monitor_at_point(screen, point.x, point.y); + boolean multipleMonitors = (GDK.gdk_screen_get_n_monitors(screen) > 1) ? true : false; + int monitorNumber = GDK.gdk_screen_get_monitor_at_point(screen, point.x, point.y); GdkRectangle dest = new GdkRectangle (); - OS.gdk_screen_get_monitor_geometry (screen, monitorNumber, dest); + GDK.gdk_screen_get_monitor_geometry (screen, monitorNumber, dest); point = getSize (dest.width / 4); int w = point.x; int h = point.y; @@ -157,7 +157,7 @@ void configure () { GTK.gtk_window_resize (handle, w, h + TIP_HEIGHT); int[] polyline; spikeAbove = dest.height >= y + h + TIP_HEIGHT; - if ((dest.width >= x + w) || (multipleMonitors && OS.gdk_screen_width() >= x + w)) { + if ((dest.width >= x + w) || (multipleMonitors && GDK.gdk_screen_width() >= x + w)) { if (dest.height >= y + h + TIP_HEIGHT) { int t = TIP_HEIGHT; polyline = new int[] { @@ -264,7 +264,7 @@ void configure () { GTK.gtk_widget_shape_combine_region (handle, region.handle); } else { long /*int*/ window = gtk_widget_get_window (handle); - OS.gdk_window_shape_combine_region (window, region.handle, 0, 0); + GDK.gdk_window_shape_combine_region (window, region.handle, 0, 0); } region.dispose (); } @@ -285,7 +285,7 @@ void createHandle (int index) { } else { GTK.gtk_widget_modify_bg (handle, GTK.GTK_STATE_NORMAL, background.handle); } - GTK.gtk_window_set_type_hint (handle, OS.GDK_WINDOW_TYPE_HINT_TOOLTIP); + GTK.gtk_window_set_type_hint (handle, GDK.GDK_WINDOW_TYPE_HINT_TOOLTIP); } } @@ -478,7 +478,7 @@ void drawTooltip (long /*int*/ cr) { long /*int*/ window = gtk_widget_get_window (handle); int x = BORDER + PADDING; int y = BORDER + PADDING; - long /*int*/ cairo = cr != 0 ? cr : OS.gdk_cairo_create(window); + long /*int*/ cairo = cr != 0 ? cr : GDK.gdk_cairo_create(window); if (cairo == 0) error (SWT.ERROR_NO_HANDLES); int count = borderPolygon.length / 2; if (count != 0) { @@ -501,7 +501,7 @@ void drawTooltip (long /*int*/ cr) { } if (buffer != null) { long /*int*/ pixbuf = GTK.gtk_icon_theme_load_icon(GTK.gtk_icon_theme_get_default(), buffer, GTK.GTK_ICON_SIZE_MENU, 0, 0); - OS.gdk_cairo_set_source_pixbuf(cairo, pixbuf, x, y); + GDK.gdk_cairo_set_source_pixbuf(cairo, pixbuf, x, y); Cairo.cairo_paint (cairo); OS.g_object_unref (pixbuf); x += IMAGE_SIZE; @@ -510,9 +510,9 @@ void drawTooltip (long /*int*/ cr) { int [] w = new int [1], h = new int [1]; Color foreground = display.getSystemColor (SWT.COLOR_INFO_FOREGROUND); if (GTK.GTK3) { - OS.gdk_cairo_set_source_rgba(cairo,foreground.handleRGBA); + GDK.gdk_cairo_set_source_rgba(cairo,foreground.handleRGBA); } else { - OS.gdk_cairo_set_source_color(cairo,foreground.handle); + GDK.gdk_cairo_set_source_color(cairo,foreground.handle); } Cairo.cairo_move_to(cairo, x,y ); OS.pango_cairo_show_layout(cairo, layoutText); @@ -523,9 +523,9 @@ void drawTooltip (long /*int*/ cr) { x = BORDER + PADDING + INSET; Color foreground = display.getSystemColor (SWT.COLOR_INFO_FOREGROUND); if (GTK.GTK3) { - OS.gdk_cairo_set_source_rgba(cairo,foreground.handleRGBA); + GDK.gdk_cairo_set_source_rgba(cairo,foreground.handleRGBA); } else { - OS.gdk_cairo_set_source_color(cairo,foreground.handle); + GDK.gdk_cairo_set_source_color(cairo,foreground.handle); } Cairo.cairo_move_to(cairo, x, y); OS.pango_cairo_show_layout(cairo, layoutMessage); @@ -552,11 +552,11 @@ long /*int*/ gtk_size_allocate (long /*int*/ widget, long /*int*/ allocation) { Point point = getLocation (); int x = point.x; int y = point.y; - long /*int*/ screen = OS.gdk_screen_get_default (); + long /*int*/ screen = GDK.gdk_screen_get_default (); GTK.gtk_widget_realize (widget); - int monitorNumber = OS.gdk_screen_get_monitor_at_point(screen, point.x, point.y); + int monitorNumber = GDK.gdk_screen_get_monitor_at_point(screen, point.x, point.y); GdkRectangle dest = new GdkRectangle (); - OS.gdk_screen_get_monitor_geometry (screen, monitorNumber, dest); + GDK.gdk_screen_get_monitor_geometry (screen, monitorNumber, dest); GtkAllocation widgetAllocation = new GtkAllocation (); GTK.gtk_widget_get_allocation (widget, widgetAllocation); int w = widgetAllocation.width; @@ -574,7 +574,7 @@ void hookEvents () { if (GTK.GTK_VERSION >= OS.VERSION (3, 9, 0)) { OS.g_signal_connect_closure_by_id (handle, display.signalIds [EXPOSE_EVENT_INVERSE], 0, display.getClosure (EXPOSE_EVENT_INVERSE), true); } - GTK.gtk_widget_add_events (handle, OS.GDK_BUTTON_PRESS_MASK); + GTK.gtk_widget_add_events (handle, GDK.GDK_BUTTON_PRESS_MASK); OS.g_signal_connect_closure (handle, OS.button_press_event, display.getClosure (BUTTON_PRESS_EVENT), false); } } diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Tracker.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Tracker.java index 7b20b31782..568ec1ad03 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Tracker.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Tracker.java @@ -307,7 +307,7 @@ Rectangle [] computeProportions (Rectangle [] rects) { } void drawRectangles (Rectangle [] rects) { - long /*int*/ window = OS.gdk_get_default_root_window(); + long /*int*/ window = GDK.gdk_get_default_root_window(); if (parent != null) { window = gtk_widget_get_window (parent.paintHandle()); } @@ -315,7 +315,7 @@ void drawRectangles (Rectangle [] rects) { if (GTK.GTK3) { if (overlay == 0) return; GTK.gtk_widget_shape_combine_region (overlay, 0); - long /*int*/ region = OS.gdk_region_new (); + long /*int*/ region = GDK.gdk_region_new (); GdkRectangle rect = new GdkRectangle(); for (int i = 0; i < rects.length; i++) { Rectangle r = parent != null ? display.mapInPixels(parent, null, rects[i]) : rects[i]; @@ -323,38 +323,38 @@ void drawRectangles (Rectangle [] rects) { rect.y = r.y; rect.width = r.width + 1; rect.height = 1; - OS.gdk_region_union_with_rect(region, rect); + GDK.gdk_region_union_with_rect(region, rect); rect.width = 1; rect.height = r.height + 1; - OS.gdk_region_union_with_rect(region, rect); + GDK.gdk_region_union_with_rect(region, rect); rect.x = r.x + r.width; - OS.gdk_region_union_with_rect(region, rect); + GDK.gdk_region_union_with_rect(region, rect); rect.x = r.x; rect.y = r.y + r.height; rect.width = r.width + 1; rect.height = 1; - OS.gdk_region_union_with_rect(region, rect); + GDK.gdk_region_union_with_rect(region, rect); } GTK.gtk_widget_shape_combine_region (overlay, region); - OS.gdk_region_destroy (region); + GDK.gdk_region_destroy (region); long /*int*/ overlayWindow = GTK.gtk_widget_get_window (overlay); - OS.gdk_window_hide (overlayWindow); - OS.gdk_window_show (overlayWindow); + GDK.gdk_window_hide (overlayWindow); + GDK.gdk_window_show (overlayWindow); return; } - long /*int*/ gc = OS.gdk_gc_new (window); + long /*int*/ gc = GDK.gdk_gc_new (window); if (gc == 0) return; - long /*int*/ colormap = OS.gdk_colormap_get_system (); + long /*int*/ colormap = GDK.gdk_colormap_get_system (); GdkColor color = new GdkColor (); - OS.gdk_color_white (colormap, color); - OS.gdk_gc_set_foreground (gc, color); - OS.gdk_gc_set_subwindow (gc, OS.GDK_INCLUDE_INFERIORS); - OS.gdk_gc_set_function (gc, OS.GDK_XOR); + GDK.gdk_color_white (colormap, color); + GDK.gdk_gc_set_foreground (gc, color); + GDK.gdk_gc_set_subwindow (gc, GDK.GDK_INCLUDE_INFERIORS); + GDK.gdk_gc_set_function (gc, GDK.GDK_XOR); for (int i=0; i<rects.length; i++) { Rectangle rect = rects [i]; int x = rect.x; if (parent != null && (parent.style & SWT.MIRRORED) != 0) x = parent.getClientWidth () - rect.width - x; - OS.gdk_draw_rectangle (window, gc, 0, x, rect.y, rect.width, rect.height); + GDK.gdk_draw_rectangle (window, gc, 0, x, rect.y, rect.width, rect.height); } OS.g_object_unref (gc); } @@ -408,13 +408,13 @@ public boolean getStippled () { boolean grab () { long /*int*/ cursor = this.cursor != null ? this.cursor.handle : 0; - int result = gdk_pointer_grab (window, OS.GDK_OWNERSHIP_NONE, false, OS.GDK_POINTER_MOTION_MASK | OS.GDK_BUTTON_RELEASE_MASK, 0, cursor, OS.GDK_CURRENT_TIME); - return result == OS.GDK_GRAB_SUCCESS; + int result = gdk_pointer_grab (window, GDK.GDK_OWNERSHIP_NONE, false, GDK.GDK_POINTER_MOTION_MASK | GDK.GDK_BUTTON_RELEASE_MASK, 0, cursor, GDK.GDK_CURRENT_TIME); + return result == GDK.GDK_GRAB_SUCCESS; } @Override long /*int*/ gtk_button_release_event (long /*int*/ widget, long /*int*/ event) { - return gtk_mouse (OS.GDK_BUTTON_RELEASE, widget, event); + return gtk_mouse (GDK.GDK_BUTTON_RELEASE, widget, event); } @Override @@ -423,25 +423,25 @@ long /*int*/ gtk_key_press_event (long /*int*/ widget, long /*int*/ eventPtr) { if (result != 0) return result; GdkEventKey keyEvent = new GdkEventKey (); OS.memmove (keyEvent, eventPtr, GdkEventKey.sizeof); - int stepSize = ((keyEvent.state & OS.GDK_CONTROL_MASK) != 0) ? STEPSIZE_SMALL : STEPSIZE_LARGE; + int stepSize = ((keyEvent.state & GDK.GDK_CONTROL_MASK) != 0) ? STEPSIZE_SMALL : STEPSIZE_LARGE; int xChange = 0, yChange = 0; switch (keyEvent.keyval) { - case OS.GDK_Escape: + case GDK.GDK_Escape: cancelled = true; // fallthrough - case OS.GDK_Return: + case GDK.GDK_Return: tracking = false; break; - case OS.GDK_Left: + case GDK.GDK_Left: xChange = -stepSize; break; - case OS.GDK_Right: + case GDK.GDK_Right: xChange = stepSize; break; - case OS.GDK_Up: + case GDK.GDK_Up: yChange = -stepSize; break; - case OS.GDK_Down: + case GDK.GDK_Down: yChange = stepSize; break; } @@ -563,7 +563,7 @@ long /*int*/ gtk_motion_notify_event (long /*int*/ widget, long /*int*/ eventPtr grabbed = grab (); lastCursor = cursor; } - return gtk_mouse (OS.GDK_MOTION_NOTIFY, widget, eventPtr); + return gtk_mouse (GDK.GDK_MOTION_NOTIFY, widget, eventPtr); } long /*int*/ gtk_mouse (int eventType, long /*int*/ widget, long /*int*/ eventPtr) { @@ -678,7 +678,7 @@ long /*int*/ gtk_mouse (int eventType, long /*int*/ widget, long /*int*/ eventPt oldX = newX [0]; oldY = newY [0]; } - tracking = eventType != OS.GDK_BUTTON_RELEASE; + tracking = eventType != GDK.GDK_BUTTON_RELEASE; return 0; } @@ -711,7 +711,7 @@ void moveRectangles (int xChange, int yChange) { */ public boolean open () { checkWidget(); - window = OS.gdk_get_default_root_window(); + window = GDK.gdk_get_default_root_window(); if (parent != null) { window = gtk_widget_get_window (parent.paintHandle()); } @@ -738,7 +738,7 @@ public boolean open () { cursorOrientation |= hStyle; } - int mask = OS.GDK_BUTTON1_MASK | OS.GDK_BUTTON2_MASK | OS.GDK_BUTTON3_MASK; + int mask = GDK.GDK_BUTTON1_MASK | GDK.GDK_BUTTON2_MASK | GDK.GDK_BUTTON3_MASK; boolean mouseDown = (state [0] & mask) != 0; if (!mouseDown) { Point cursorPos = null; @@ -764,7 +764,7 @@ public boolean open () { GTK.gtk_window_set_title (overlay, new byte [1]); GTK.gtk_widget_realize (overlay); long /*int*/ overlayWindow = GTK.gtk_widget_get_window (overlay); - OS.gdk_window_set_override_redirect (overlayWindow, true); + GDK.gdk_window_set_override_redirect (overlayWindow, true); if (GTK.GTK_VERSION < OS.VERSION (3, 14, 0)) { GTK.gtk_widget_override_background_color (overlay, GTK.GTK_STATE_FLAG_NORMAL, new GdkRGBA()); } else { @@ -779,10 +779,10 @@ public boolean open () { } GTK.gtk_css_provider_load_from_data (provider, Converter.wcsToMbcs (css, true), -1, null); } - long /*int*/ region = OS.gdk_region_new (); + long /*int*/ region = GDK.gdk_region_new (); GTK.gtk_widget_shape_combine_region (overlay, region); GTK.gtk_widget_input_shape_combine_region (overlay, region); - OS.gdk_region_destroy (region); + GDK.gdk_region_destroy (region); Rectangle bounds = display.getBoundsInPixels(); GTK.gtk_window_move (overlay, bounds.x, bounds.y); GTK.gtk_window_resize (overlay, bounds.width, bounds.height); @@ -805,7 +805,7 @@ public boolean open () { * code outside of SWT (i.e AWT, etc). It ensures that the current * thread leaves the GTK lock before calling the function below. */ - OS.gdk_threads_leave(); + GDK.gdk_threads_leave(); OS.g_main_context_iteration (0, true); display.sendPostExternalEventDispatchEvent (); display.runAsyncMessages (false); @@ -833,18 +833,18 @@ boolean processEvent (long /*int*/ eventPtr) { OS.memmove (gdkEvent, eventPtr, GdkEvent.sizeof); long /*int*/ widget = GTK.gtk_get_event_widget (eventPtr); switch (gdkEvent.type) { - case OS.GDK_MOTION_NOTIFY: gtk_motion_notify_event (widget, eventPtr); break; - case OS.GDK_BUTTON_RELEASE: gtk_button_release_event (widget, eventPtr); break; - case OS.GDK_KEY_PRESS: gtk_key_press_event (widget, eventPtr); break; - case OS.GDK_KEY_RELEASE: gtk_key_release_event (widget, eventPtr); break; - case OS.GDK_BUTTON_PRESS: - case OS.GDK_2BUTTON_PRESS: - case OS.GDK_3BUTTON_PRESS: - case OS.GDK_ENTER_NOTIFY: - case OS.GDK_LEAVE_NOTIFY: + case GDK.GDK_MOTION_NOTIFY: gtk_motion_notify_event (widget, eventPtr); break; + case GDK.GDK_BUTTON_RELEASE: gtk_button_release_event (widget, eventPtr); break; + case GDK.GDK_KEY_PRESS: gtk_key_press_event (widget, eventPtr); break; + case GDK.GDK_KEY_RELEASE: gtk_key_release_event (widget, eventPtr); break; + case GDK.GDK_BUTTON_PRESS: + case GDK.GDK_2BUTTON_PRESS: + case GDK.GDK_3BUTTON_PRESS: + case GDK.GDK_ENTER_NOTIFY: + case GDK.GDK_LEAVE_NOTIFY: /* Do not dispatch these */ break; - case OS.GDK_EXPOSE: + case GDK.GDK_EXPOSE: update (); if (!GTK.GTK3) drawRectangles (rectangles); GTK.gtk_main_do_event (eventPtr); @@ -1096,7 +1096,7 @@ public void setStippled (boolean stippled) { } void ungrab () { - if (grabbed) gdk_pointer_ungrab (window, OS.GDK_CURRENT_TIME); + if (grabbed) gdk_pointer_ungrab (window, GDK.GDK_CURRENT_TIME); } void update () { diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/TrayItem.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/TrayItem.java index 93bbf85b25..f8ebdd3740 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/TrayItem.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/TrayItem.java @@ -251,17 +251,17 @@ long /*int*/ gtk_activate (long /*int*/ widget) { * the single-click as the current event and for the double-click in the * event queue. */ - long /*int*/ nextEvent = OS.gdk_event_peek (); + long /*int*/ nextEvent = GDK.gdk_event_peek (); if (nextEvent != 0) { - int nextEventType = OS.GDK_EVENT_TYPE (nextEvent); + int nextEventType = GDK.GDK_EVENT_TYPE (nextEvent); long /*int*/ currEvent = GTK.gtk_get_current_event (); int currEventType = 0; if (currEvent != 0) { - currEventType = OS.GDK_EVENT_TYPE (currEvent); - OS.gdk_event_free (currEvent); + currEventType = GDK.GDK_EVENT_TYPE (currEvent); + GDK.gdk_event_free (currEvent); } - OS.gdk_event_free (nextEvent); - if (currEventType == OS.GDK_BUTTON_PRESS && nextEventType == OS.GDK_2BUTTON_PRESS) { + GDK.gdk_event_free (nextEvent); + if (currEventType == GDK.GDK_BUTTON_PRESS && nextEventType == GDK.GDK_2BUTTON_PRESS) { sendSelectionEvent (SWT.DefaultSelection); } } @@ -272,12 +272,12 @@ long /*int*/ gtk_activate (long /*int*/ widget) { long /*int*/ gtk_button_press_event (long /*int*/ widget, long /*int*/ eventPtr) { GdkEventButton gdkEvent = new GdkEventButton (); OS.memmove (gdkEvent, eventPtr, GdkEventButton.sizeof); - if (gdkEvent.type == OS.GDK_3BUTTON_PRESS) return 0; - if (gdkEvent.button == 3 && gdkEvent.type == OS.GDK_BUTTON_PRESS) { + if (gdkEvent.type == GDK.GDK_3BUTTON_PRESS) return 0; + if (gdkEvent.button == 3 && gdkEvent.type == GDK.GDK_BUTTON_PRESS) { sendEvent (SWT.MenuDetect); return 0; } - if (gdkEvent.type == OS.GDK_2BUTTON_PRESS) { + if (gdkEvent.type == GDK.GDK_2BUTTON_PRESS) { sendSelectionEvent (SWT.DefaultSelection); } else { sendSelectionEvent (SWT.Selection); @@ -288,13 +288,13 @@ long /*int*/ gtk_button_press_event (long /*int*/ widget, long /*int*/ eventPtr) @Override long /*int*/ gtk_size_allocate (long /*int*/ widget, long /*int*/ allocation) { if (image != null && image.mask != 0) { - if (OS.gdk_drawable_get_depth (image.mask) == 1) { + if (GDK.gdk_drawable_get_depth (image.mask) == 1) { GtkAllocation widgetAllocation = new GtkAllocation (); GTK.gtk_widget_get_allocation (widget, widgetAllocation); int xoffset = (int) Math.floor (widgetAllocation.x + ((widgetAllocation.width -GTK.GTK_WIDGET_REQUISITION_WIDTH (widget)) * 0.5) + 0.5); int yoffset = (int) Math.floor (widgetAllocation.y + ((widgetAllocation.height - GTK.GTK_WIDGET_REQUISITION_HEIGHT (widget)) * 0.5) + 0.5); Rectangle b = image.getBoundsInPixels(); - long /*int*/ gdkImagePtr = OS.gdk_drawable_get_image (image.mask, 0, 0, b.width, b.height); + long /*int*/ gdkImagePtr = GDK.gdk_drawable_get_image (image.mask, 0, 0, b.width, b.height); if (gdkImagePtr == 0) error(SWT.ERROR_NO_HANDLES); GdkImage gdkImage = new GdkImage(); OS.memmove (gdkImage, gdkImagePtr); @@ -315,7 +315,7 @@ long /*int*/ gtk_size_allocate (long /*int*/ widget, long /*int*/ allocation) { } GTK.gtk_widget_realize (handle); long /*int*/ window = gtk_widget_get_window (handle); - OS.gdk_window_shape_combine_region (window, region.handle, 0, 0); + GDK.gdk_window_shape_combine_region (window, region.handle, 0, 0); region.dispose (); } } diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Tree.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Tree.java index ef6bacce72..58e03826da 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Tree.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Tree.java @@ -282,10 +282,10 @@ long /*int*/ cellDataProc (long /*int*/ tree_column, long /*int*/ cell, long /*i if (ptr [0] != 0) { if (GTK.GTK3) { OS.g_object_set (cell, OS.cell_background_rgba, ptr[0], 0); - OS.gdk_rgba_free(ptr [0]); + GDK.gdk_rgba_free(ptr [0]); } else { OS.g_object_set (cell, OS.cell_background_gdk, ptr[0], 0); - OS.gdk_color_free (ptr [0]); + GDK.gdk_color_free (ptr [0]); } } } @@ -295,10 +295,10 @@ long /*int*/ cellDataProc (long /*int*/ tree_column, long /*int*/ cell, long /*i if (ptr [0] != 0) { if (GTK.GTK3) { OS.g_object_set (cell, OS.foreground_rgba, ptr [0], 0); - OS.gdk_rgba_free (ptr [0]); + GDK.gdk_rgba_free (ptr [0]); } else { OS.g_object_set (cell, OS.foreground_gdk, ptr [0], 0); - OS.gdk_color_free (ptr [0]); + GDK.gdk_color_free (ptr [0]); } } ptr [0] = 0; @@ -614,17 +614,17 @@ void copyModel (long /*int*/ oldModel, int oldStart, long /*int*/ newModel, int GTK.gtk_tree_store_set (newModel, newItem, j, ptr [0], -1); if (ptr [0] != 0) { if (GTK.GTK3) { - if (types[j] == OS.GDK_TYPE_RGBA()) { - OS.gdk_rgba_free(ptr[0]); + if (types[j] == GDK.GDK_TYPE_RGBA()) { + GDK.gdk_rgba_free(ptr[0]); } } else { - if (types[j] == OS.GDK_TYPE_COLOR()) { - OS.gdk_color_free(ptr[0]); + if (types[j] == GDK.GDK_TYPE_COLOR()) { + GDK.gdk_color_free(ptr[0]); } } if (types [j] == OS.G_TYPE_STRING ()) { OS.g_free ((ptr [0])); - } else if (types[j] == OS.GDK_TYPE_PIXBUF()) { + } else if (types[j] == GDK.GDK_TYPE_PIXBUF()) { OS.g_object_unref(ptr[0]); } else if (types[j] == OS.PANGO_TYPE_FONT_DESCRIPTION()) { OS.pango_font_description_free(ptr[0]); @@ -637,17 +637,17 @@ void copyModel (long /*int*/ oldModel, int oldStart, long /*int*/ newModel, int GTK.gtk_tree_store_set (newModel, newItem, newIndex, ptr [0], -1); if (ptr[0] != 0) { if (GTK.GTK3) { - if (types[newIndex] == OS.GDK_TYPE_RGBA()) { - OS.gdk_rgba_free(ptr[0]); + if (types[newIndex] == GDK.GDK_TYPE_RGBA()) { + GDK.gdk_rgba_free(ptr[0]); } } else { - if (types[newIndex] == OS.GDK_TYPE_COLOR()) { - OS.gdk_color_free(ptr[0]); + if (types[newIndex] == GDK.GDK_TYPE_COLOR()) { + GDK.gdk_color_free(ptr[0]); } } if (types [newIndex] == OS.G_TYPE_STRING ()) { OS.g_free ((ptr [0])); - } else if (types[newIndex] == OS.GDK_TYPE_PIXBUF()) { + } else if (types[newIndex] == GDK.GDK_TYPE_PIXBUF()) { OS.g_object_unref(ptr[0]); } else if (types[newIndex] == OS.PANGO_TYPE_FONT_DESCRIPTION()) { OS.pango_font_description_free(ptr[0]); @@ -1235,9 +1235,9 @@ Rectangle getClientAreaInPixels () { long /*int*/ fixedWindow = gtk_widget_get_window (fixedHandle); long /*int*/ binWindow = GTK.gtk_tree_view_get_bin_window (handle); int [] binX = new int [1], binY = new int [1]; - OS.gdk_window_get_origin (binWindow, binX, binY); + GDK.gdk_window_get_origin (binWindow, binX, binY); int [] fixedX = new int [1], fixedY = new int [1]; - OS.gdk_window_get_origin (fixedWindow, fixedX, fixedY); + GDK.gdk_window_get_origin (fixedWindow, fixedX, fixedY); long /*int*/ clientHandle = clientHandle (); GtkAllocation allocation = new GtkAllocation (); GTK.gtk_widget_get_allocation (clientHandle, allocation); @@ -1372,15 +1372,15 @@ long /*int*/[] getColumnTypes (int columnCount) { types [ID_COLUMN] = OS.G_TYPE_INT (); types [CHECKED_COLUMN] = OS.G_TYPE_BOOLEAN (); types [GRAYED_COLUMN] = OS.G_TYPE_BOOLEAN (); - types [FOREGROUND_COLUMN] = GTK.GTK3? OS.GDK_TYPE_RGBA() : OS.GDK_TYPE_COLOR (); - types [BACKGROUND_COLUMN] = GTK.GTK3? OS.GDK_TYPE_RGBA() : OS.GDK_TYPE_COLOR (); + types [FOREGROUND_COLUMN] = GTK.GTK3? GDK.GDK_TYPE_RGBA() : GDK.GDK_TYPE_COLOR (); + types [BACKGROUND_COLUMN] = GTK.GTK3? GDK.GDK_TYPE_RGBA() : GDK.GDK_TYPE_COLOR (); types [FONT_COLUMN] = OS.PANGO_TYPE_FONT_DESCRIPTION (); // per cell data for (int i=FIRST_COLUMN; i<types.length; i+=CELL_TYPES) { - types [i + CELL_PIXBUF] = OS.GDK_TYPE_PIXBUF (); + types [i + CELL_PIXBUF] = GDK.GDK_TYPE_PIXBUF (); types [i + CELL_TEXT] = OS.G_TYPE_STRING (); - types [i + CELL_FOREGROUND] = GTK.GTK3? OS.GDK_TYPE_RGBA() : OS.GDK_TYPE_COLOR (); - types [i + CELL_BACKGROUND] = GTK.GTK3? OS.GDK_TYPE_RGBA() : OS.GDK_TYPE_COLOR (); + types [i + CELL_FOREGROUND] = GTK.GTK3? GDK.GDK_TYPE_RGBA() : GDK.GDK_TYPE_COLOR (); + types [i + CELL_BACKGROUND] = GTK.GTK3? GDK.GDK_TYPE_RGBA() : GDK.GDK_TYPE_COLOR (); types [i + CELL_FONT] = OS.PANGO_TYPE_FONT_DESCRIPTION (); } return types; @@ -1559,9 +1559,9 @@ int getHeaderHeightInPixels () { long /*int*/ fixedWindow = gtk_widget_get_window (fixedHandle); long /*int*/ binWindow = GTK.gtk_tree_view_get_bin_window (handle); int [] binY = new int [1]; - OS.gdk_window_get_origin (binWindow, null, binY); + GDK.gdk_window_get_origin (binWindow, null, binY); int [] fixedY = new int [1]; - OS.gdk_window_get_origin (fixedWindow, null, fixedY); + GDK.gdk_window_get_origin (fixedWindow, null, fixedY); return binY [0] - fixedY [0]; } @@ -2084,9 +2084,9 @@ long /*int*/ gtk_button_press_event (long /*int*/ widget, long /*int*/ event) { * selected, we can give the DnD handling to MOTION-NOTIFY. Seee Bug 503431 */ if ((state & DRAG_DETECT) != 0 && hooks (SWT.DragDetect) && - !OS.isX11() && gdkEvent.type == OS.GDK_BUTTON_PRESS) { // Wayland + !OS.isX11() && gdkEvent.type == GDK.GDK_BUTTON_PRESS) { // Wayland // check to see if there is another event coming in that is not a double/triple click, this is to prevent Bug 514531 - long /*int*/ nextEvent = OS.gdk_event_peek (); + long /*int*/ nextEvent = GDK.gdk_event_peek (); if (nextEvent == 0) { long /*int*/ [] path = new long /*int*/ [1]; long /*int*/ selection = GTK.gtk_tree_view_get_selection (handle); @@ -2095,8 +2095,8 @@ long /*int*/ gtk_button_press_event (long /*int*/ widget, long /*int*/ event) { // selection count is used in the case of clicking an already selected item while holding Control selectionCountOnPress = getSelectionCount(); if (GTK.gtk_tree_selection_path_is_selected (selection, path[0])) { - if (((gdkEvent.state & (OS.GDK_CONTROL_MASK|OS.GDK_SHIFT_MASK)) == 0) || - ((gdkEvent.state & OS.GDK_CONTROL_MASK) != 0)) { + if (((gdkEvent.state & (GDK.GDK_CONTROL_MASK|GDK.GDK_SHIFT_MASK)) == 0) || + ((gdkEvent.state & GDK.GDK_CONTROL_MASK) != 0)) { /** * Disable selection on a mouse click if there are multiple items already selected. Also, * if control is currently being held down, we will designate the selection logic over to release @@ -2110,7 +2110,7 @@ long /*int*/ gtk_button_press_event (long /*int*/ widget, long /*int*/ event) { } } } else { - OS.gdk_event_free (nextEvent); + GDK.gdk_event_free (nextEvent); } } /* @@ -2122,7 +2122,7 @@ long /*int*/ gtk_button_press_event (long /*int*/ widget, long /*int*/ event) { * run the default handler when the item is already part of the current selection. */ int button = gdkEvent.button; - if (button == 3 && gdkEvent.type == OS.GDK_BUTTON_PRESS) { + if (button == 3 && gdkEvent.type == GDK.GDK_BUTTON_PRESS) { long /*int*/ [] path = new long /*int*/ [1]; if (GTK.gtk_tree_view_get_path_at_pos (handle, (int)gdkEvent.x, (int)gdkEvent.y, path, null, null, null)) { if (path [0] != 0) { @@ -2154,7 +2154,7 @@ long /*int*/ gtk_button_press_event (long /*int*/ widget, long /*int*/ event) { } //If Mouse double-click pressed, manually send a DefaultSelection. See Bug 312568. - if (gdkEvent.type == OS.GDK_2BUTTON_PRESS) { + if (gdkEvent.type == GDK.GDK_2BUTTON_PRESS) { sendTreeDefaultSelection (); } @@ -2177,10 +2177,10 @@ long /*int*/ gtk_key_press_event (long /*int*/ widget, long /*int*/ event) { void keyPressDefaultSelectionHandler (long /*int*/ event, int key) { int keymask = gdk_event_get_state (event); switch (key) { - case OS.GDK_Return: + case GDK.GDK_Return: // Send DefaultSelectionEvent when: Enter, Shift+Enter, Ctrl+Enter, Alt+Enter are pressed. // Not when (Meta|Super|Hyper)+Enter, reason is stateMask is not provided on Gtk. Does not trigger on Win32 either. - if ((keymask & (OS.GDK_SUPER_MASK | OS.GDK_META_MASK | OS.GDK_HYPER_MASK)) == 0) { + if ((keymask & (GDK.GDK_SUPER_MASK | GDK.GDK_META_MASK | GDK.GDK_HYPER_MASK)) == 0) { sendTreeDefaultSelection (); } break; @@ -2225,12 +2225,12 @@ long /*int*/ gtk_button_release_event (long /*int*/ widget, long /*int*/ event) if (GTK.gtk_tree_view_get_path_at_pos (handle, (int)gdkEvent.x, (int)gdkEvent.y, path, null, null, null) && path[0] != 0 && GTK.gtk_tree_selection_path_is_selected (selection, path[0])) { selectionCountOnRelease = getSelectionCount(); - if ((gdkEvent.state & (OS.GDK_CONTROL_MASK|OS.GDK_SHIFT_MASK)) == 0) { + if ((gdkEvent.state & (GDK.GDK_CONTROL_MASK|GDK.GDK_SHIFT_MASK)) == 0) { GTK.gtk_tree_view_set_cursor(handle, path[0], 0, false); } // Check to see if there has been a new tree item selected when holding Control in Path. // If not, deselect the item. - if ((gdkEvent.state & OS.GDK_CONTROL_MASK) != 0 && selectionCountOnRelease == selectionCountOnPress) { + if ((gdkEvent.state & GDK.GDK_CONTROL_MASK) != 0 && selectionCountOnRelease == selectionCountOnPress) { GTK.gtk_tree_selection_unselect_path (selection,path[0]); } } @@ -2251,8 +2251,8 @@ long /*int*/ gtk_changed (long /*int*/ widget) { @Override long /*int*/ gtk_event_after (long /*int*/ widget, long /*int*/ gdkEvent) { - switch (OS.GDK_EVENT_TYPE (gdkEvent)) { - case OS.GDK_EXPOSE: { + switch (GDK.GDK_EVENT_TYPE (gdkEvent)) { + case GDK.GDK_EXPOSE: { /* * Bug in GTK. SWT connects the expose-event 'after' the default * handler of the signal. If the tree has no children, then GTK @@ -2329,7 +2329,7 @@ long /*int*/ gtk_expose_event (long /*int*/ widget, long /*int*/ eventPtr) { @Override long /*int*/ gtk_motion_notify_event (long /*int*/ widget, long /*int*/ event) { - long /*int*/ window = OS.GDK_EVENT_WINDOW (event); + long /*int*/ window = GDK.GDK_EVENT_WINDOW (event); if (window != GTK.gtk_tree_view_get_bin_window (handle)) return 0; return super.gtk_motion_notify_event (widget, event); } @@ -2982,9 +2982,9 @@ void rendererRender (long /*int*/ cell, long /*int*/ cr, long /*int*/ window, lo if (ptr [0] != 0) { drawState |= SWT.BACKGROUND; if (GTK.GTK3) { - OS.gdk_rgba_free (ptr [0]); + GDK.gdk_rgba_free (ptr [0]); } else { - OS.gdk_color_free (ptr [0]); + GDK.gdk_color_free (ptr [0]); } } if ((flags & GTK.GTK_CELL_RENDERER_SELECTED) != 0) drawState |= SWT.SELECTED; @@ -2999,7 +2999,7 @@ void rendererRender (long /*int*/ cell, long /*int*/ cr, long /*int*/ window, lo // A workaround for https://bugs.eclipse.org/bugs/show_bug.cgi?id=459117 if (cr != 0 && GTK.GTK_VERSION > OS.VERSION(3, 9, 0) && GTK.GTK_VERSION <= OS.VERSION(3, 14, 8)) { GdkRectangle r2 = new GdkRectangle (); - OS.gdk_cairo_get_clip_rectangle (cr, r2); + GDK.gdk_cairo_get_clip_rectangle (cr, r2); rect.x = r2.x; rect.width = r2.width; } @@ -3059,7 +3059,7 @@ void rendererRender (long /*int*/ cell, long /*int*/ cr, long /*int*/ window, lo if (GTK.GTK_VERSION >= OS.VERSION(3, 9, 0) && cr != 0) { GdkRectangle r = new GdkRectangle(); - OS.gdk_cairo_get_clip_rectangle(cr, r); + GDK.gdk_cairo_get_clip_rectangle(cr, r); Rectangle rect2 = DPIUtil.autoScaleDown(new Rectangle(rect.x, r.y, r.width, r.height)); // Caveat: rect2 is necessary because GC#setClipping(Rectangle) got broken by bug 446075 gc.setClipping(rect2.x, rect2.y, rect2.width, rect2.height); @@ -3143,7 +3143,7 @@ void rendererRender (long /*int*/ cell, long /*int*/ cr, long /*int*/ window, lo // A workaround for https://bugs.eclipse.org/bugs/show_bug.cgi?id=459117 if (cr != 0 && GTK.GTK_VERSION > OS.VERSION(3, 9, 0) && GTK.GTK_VERSION <= OS.VERSION(3, 14, 8)) { GdkRectangle r2 = new GdkRectangle (); - OS.gdk_cairo_get_clip_rectangle (cr, r2); + GDK.gdk_cairo_get_clip_rectangle (cr, r2); rect.x = r2.x; rect.width = r2.width; } diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/TreeColumn.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/TreeColumn.java index a8a7110e26..811a73dc68 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/TreeColumn.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/TreeColumn.java @@ -350,9 +350,9 @@ long /*int*/ gtk_clicked (long /*int*/ widget) { if (eventPtr != 0) { GdkEventButton gdkEvent = new GdkEventButton (); OS.memmove (gdkEvent, eventPtr, GdkEventButton.sizeof); - OS.gdk_event_free (eventPtr); + GDK.gdk_event_free (eventPtr); switch (gdkEvent.type) { - case OS.GDK_BUTTON_RELEASE: { + case GDK.GDK_BUTTON_RELEASE: { int clickTime = display.getDoubleClickTime (); int eventTime = gdkEvent.time, eventButton = gdkEvent.button; if (lastButton == eventButton && lastTime != 0 && Math.abs (lastTime - eventTime) <= clickTime) { @@ -373,7 +373,7 @@ long /*int*/ gtk_event_after (long /*int*/ widget, long /*int*/ gdkEvent) { GdkEvent event = new GdkEvent (); OS.memmove (event, gdkEvent, GdkEvent.sizeof); switch (event.type) { - case OS.GDK_BUTTON_PRESS: { + case GDK.GDK_BUTTON_PRESS: { GdkEventButton gdkEventButton = new GdkEventButton (); OS.memmove (gdkEventButton, gdkEvent, GdkEventButton.sizeof); if (gdkEventButton.button == 3) { @@ -725,15 +725,15 @@ void setWidthInPixels (int width) { if (buttonHandle != 0) { long /*int*/ window = GTK.gtk_widget_get_parent_window (buttonHandle); if (window != 0) { - long /*int*/ windowList = OS.gdk_window_get_children (window); + long /*int*/ windowList = GDK.gdk_window_get_children (window); if (windowList != 0) { long /*int*/ windows = windowList; long /*int*/ [] userData = new long /*int*/ [1]; while (windows != 0) { long /*int*/ child = OS.g_list_data (windows); - OS.gdk_window_get_user_data (child, userData); + GDK.gdk_window_get_user_data (child, userData); if (userData[0] == buttonHandle) { - OS.gdk_window_lower (child); + GDK.gdk_window_lower (child); break; } windows = OS.g_list_next (windows); diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/TreeItem.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/TreeItem.java index a880ad7390..25bb96b3d9 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/TreeItem.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/TreeItem.java @@ -220,12 +220,12 @@ Color _getBackground () { if (GTK.GTK3) { GdkRGBA gdkRGBA = new GdkRGBA (); OS.memmove(gdkRGBA, ptr [0], GdkRGBA.sizeof); - OS.gdk_rgba_free (ptr [0]); + GDK.gdk_rgba_free (ptr [0]); return Color.gtk_new(display, gdkRGBA); } else { GdkColor gdkColor = new GdkColor (); OS.memmove (gdkColor, ptr [0], GdkColor.sizeof); - OS.gdk_color_free (ptr [0]); + GDK.gdk_color_free (ptr [0]); return Color.gtk_new (display, gdkColor); } } @@ -240,12 +240,12 @@ Color _getBackground (int index) { if (GTK.GTK3) { GdkRGBA gdkRGBA = new GdkRGBA (); OS.memmove(gdkRGBA, ptr [0], GdkRGBA.sizeof); - OS.gdk_rgba_free (ptr [0]); + GDK.gdk_rgba_free (ptr [0]); return Color.gtk_new(display, gdkRGBA); } else { GdkColor gdkColor = new GdkColor (); OS.memmove (gdkColor, ptr [0], GdkColor.sizeof); - OS.gdk_color_free (ptr [0]); + GDK.gdk_color_free (ptr [0]); return Color.gtk_new (display, gdkColor); } } @@ -263,12 +263,12 @@ Color _getForeground () { if (GTK.GTK3) { GdkRGBA gdkRGBA = new GdkRGBA (); OS.memmove(gdkRGBA, ptr [0], GdkRGBA.sizeof); - OS.gdk_rgba_free (ptr [0]); + GDK.gdk_rgba_free (ptr [0]); return Color.gtk_new(display, gdkRGBA); } else { GdkColor gdkColor = new GdkColor (); OS.memmove (gdkColor, ptr [0], GdkColor.sizeof); - OS.gdk_color_free (ptr [0]); + GDK.gdk_color_free (ptr [0]); return Color.gtk_new (display, gdkColor); } } @@ -283,12 +283,12 @@ Color _getForeground (int index) { if (GTK.GTK3) { GdkRGBA gdkRGBA = new GdkRGBA (); OS.memmove(gdkRGBA, ptr [0], GdkRGBA.sizeof); - OS.gdk_rgba_free (ptr [0]); + GDK.gdk_rgba_free (ptr [0]); return Color.gtk_new(display, gdkRGBA); } else { GdkColor gdkColor = new GdkColor (); OS.memmove (gdkColor, ptr [0], GdkColor.sizeof); - OS.gdk_color_free (ptr [0]); + GDK.gdk_color_free (ptr [0]); return Color.gtk_new (display, gdkColor); } } diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Widget.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Widget.java index 45140d31d9..40fe88c29d 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Widget.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Widget.java @@ -1122,8 +1122,8 @@ boolean mnemonicHit (long /*int*/ mnemonicHandle, char key) { } boolean mnemonicMatch (long /*int*/ mnemonicHandle, char key) { - long keyval1 = OS.gdk_keyval_to_lower (OS.gdk_unicode_to_keyval (key)); - long keyval2 = OS.gdk_keyval_to_lower (GTK.gtk_label_get_mnemonic_keyval (mnemonicHandle)); + long keyval1 = GDK.gdk_keyval_to_lower (GDK.gdk_unicode_to_keyval (key)); + long keyval2 = GDK.gdk_keyval_to_lower (GTK.gtk_label_get_mnemonic_keyval (mnemonicHandle)); return keyval1 == keyval2; } @@ -1425,8 +1425,8 @@ char [] sendIMKeyEvent (int type, GdkEventKey keyEvent, char [] chars) { keyEvent = new GdkEventKey (); OS.memmove (keyEvent, ptr, GdkEventKey.sizeof); switch (keyEvent.type) { - case OS.GDK_KEY_PRESS: - case OS.GDK_KEY_RELEASE: + case GDK.GDK_KEY_PRESS: + case GDK.GDK_KEY_RELEASE: state = keyEvent.state; break; default: @@ -1457,13 +1457,13 @@ char [] sendIMKeyEvent (int type, GdkEventKey keyEvent, char [] chars) { * the key by returning null. */ if (isDisposed ()) { - if (ptr != 0) OS.gdk_event_free (ptr); + if (ptr != 0) GDK.gdk_event_free (ptr); return null; } if (event.doit) chars [count++] = chars [index]; index++; } - if (ptr != 0) OS.gdk_event_free (ptr); + if (ptr != 0) GDK.gdk_event_free (ptr); if (count == 0) return null; if (index != count) { char [] result = new char [count]; @@ -1487,18 +1487,18 @@ void sendSelectionEvent (int eventType, Event event, boolean send) { GdkEvent gdkEvent = new GdkEvent (); OS.memmove (gdkEvent, ptr, GdkEvent.sizeof); switch (gdkEvent.type) { - case OS.GDK_KEY_PRESS: - case OS.GDK_KEY_RELEASE: - case OS.GDK_BUTTON_PRESS: - case OS.GDK_2BUTTON_PRESS: - case OS.GDK_BUTTON_RELEASE: { + case GDK.GDK_KEY_PRESS: + case GDK.GDK_KEY_RELEASE: + case GDK.GDK_BUTTON_PRESS: + case GDK.GDK_2BUTTON_PRESS: + case GDK.GDK_BUTTON_RELEASE: { int [] state = new int [1]; - OS.gdk_event_get_state (ptr, state); + GDK.gdk_event_get_state (ptr, state); setInputState (event, state [0]); break; } } - OS.gdk_event_free (ptr); + GDK.gdk_event_free (ptr); } sendEvent (eventType, event, send); } @@ -1683,12 +1683,12 @@ void setForegroundColor (long /*int*/ handle, GdkColor color, boolean setStateAc } boolean setInputState (Event event, int state) { - if ((state & OS.GDK_MOD1_MASK) != 0) event.stateMask |= SWT.ALT; - if ((state & OS.GDK_SHIFT_MASK) != 0) event.stateMask |= SWT.SHIFT; - if ((state & OS.GDK_CONTROL_MASK) != 0) event.stateMask |= SWT.CONTROL; - if ((state & OS.GDK_BUTTON1_MASK) != 0) event.stateMask |= SWT.BUTTON1; - if ((state & OS.GDK_BUTTON2_MASK) != 0) event.stateMask |= SWT.BUTTON2; - if ((state & OS.GDK_BUTTON3_MASK) != 0) event.stateMask |= SWT.BUTTON3; + if ((state & GDK.GDK_MOD1_MASK) != 0) event.stateMask |= SWT.ALT; + if ((state & GDK.GDK_SHIFT_MASK) != 0) event.stateMask |= SWT.SHIFT; + if ((state & GDK.GDK_CONTROL_MASK) != 0) event.stateMask |= SWT.CONTROL; + if ((state & GDK.GDK_BUTTON1_MASK) != 0) event.stateMask |= SWT.BUTTON1; + if ((state & GDK.GDK_BUTTON2_MASK) != 0) event.stateMask |= SWT.BUTTON2; + if ((state & GDK.GDK_BUTTON3_MASK) != 0) event.stateMask |= SWT.BUTTON3; return true; } @@ -1697,31 +1697,31 @@ boolean setKeyState (Event event, GdkEventKey keyEvent) { boolean isNull = false; event.keyCode = Display.translateKey (keyEvent.keyval); switch (keyEvent.keyval) { - case OS.GDK_BackSpace: event.character = SWT.BS; break; - case OS.GDK_Linefeed: event.character = SWT.LF; break; - case OS.GDK_KP_Enter: - case OS.GDK_Return: event.character = SWT.CR; break; - case OS.GDK_KP_Delete: - case OS.GDK_Delete: event.character = SWT.DEL; break; - case OS.GDK_Escape: event.character = SWT.ESC; break; - case OS.GDK_Tab: - case OS.GDK_ISO_Left_Tab: event.character = SWT.TAB; break; + case GDK.GDK_BackSpace: event.character = SWT.BS; break; + case GDK.GDK_Linefeed: event.character = SWT.LF; break; + case GDK.GDK_KP_Enter: + case GDK.GDK_Return: event.character = SWT.CR; break; + case GDK.GDK_KP_Delete: + case GDK.GDK_Delete: event.character = SWT.DEL; break; + case GDK.GDK_Escape: event.character = SWT.ESC; break; + case GDK.GDK_Tab: + case GDK.GDK_ISO_Left_Tab: event.character = SWT.TAB; break; default: { if (event.keyCode == 0) { long [] keyval = new long [1]; int [] effective_group = new int [1], level = new int [1], consumed_modifiers = new int [1]; - if (OS.gdk_keymap_translate_keyboard_state (OS.gdk_keymap_get_default (), keyEvent.hardware_keycode, 0, display.getLatinKeyGroup(), keyval, effective_group, level, consumed_modifiers)) { - event.keyCode = (int) OS.gdk_keyval_to_unicode (keyval [0]); + if (OS.gdk_keymap_translate_keyboard_state (GDK.gdk_keymap_get_default (), keyEvent.hardware_keycode, 0, display.getLatinKeyGroup(), keyval, effective_group, level, consumed_modifiers)) { + event.keyCode = (int) GDK.gdk_keyval_to_unicode (keyval [0]); } } int key = keyEvent.keyval; - if ((keyEvent.state & OS.GDK_CONTROL_MASK) != 0 && (0 <= key && key <= 0x7F)) { + if ((keyEvent.state & GDK.GDK_CONTROL_MASK) != 0 && (0 <= key && key <= 0x7F)) { if ('a' <= key && key <= 'z') key -= 'a' - 'A'; if (64 <= key && key <= 95) key -= 64; event.character = (char) key; isNull = keyEvent.keyval == '@' && key == 0; } else { - event.character = (char) OS.gdk_keyval_to_unicode (key); + event.character = (char) GDK.gdk_keyval_to_unicode (key); } } } @@ -1734,44 +1734,44 @@ boolean setKeyState (Event event, GdkEventKey keyEvent) { void setLocationState (Event event, GdkEventKey keyEvent) { switch (keyEvent.keyval) { - case OS.GDK_Alt_L: - case OS.GDK_Shift_L: - case OS.GDK_Control_L: + case GDK.GDK_Alt_L: + case GDK.GDK_Shift_L: + case GDK.GDK_Control_L: event.keyLocation = SWT.LEFT; break; - case OS.GDK_Alt_R: - case OS.GDK_Shift_R: - case OS.GDK_Control_R: + case GDK.GDK_Alt_R: + case GDK.GDK_Shift_R: + case GDK.GDK_Control_R: event.keyLocation = SWT.RIGHT; break; - case OS.GDK_KP_0: - case OS.GDK_KP_1: - case OS.GDK_KP_2: - case OS.GDK_KP_3: - case OS.GDK_KP_4: - case OS.GDK_KP_5: - case OS.GDK_KP_6: - case OS.GDK_KP_7: - case OS.GDK_KP_8: - case OS.GDK_KP_9: - case OS.GDK_KP_Add: - case OS.GDK_KP_Decimal: - case OS.GDK_KP_Delete: - case OS.GDK_KP_Divide: - case OS.GDK_KP_Down: - case OS.GDK_KP_End: - case OS.GDK_KP_Enter: - case OS.GDK_KP_Equal: - case OS.GDK_KP_Home: - case OS.GDK_KP_Insert: - case OS.GDK_KP_Left: - case OS.GDK_KP_Multiply: - case OS.GDK_KP_Page_Down: - case OS.GDK_KP_Page_Up: - case OS.GDK_KP_Right: - case OS.GDK_KP_Subtract: - case OS.GDK_KP_Up: - case OS.GDK_Num_Lock: + case GDK.GDK_KP_0: + case GDK.GDK_KP_1: + case GDK.GDK_KP_2: + case GDK.GDK_KP_3: + case GDK.GDK_KP_4: + case GDK.GDK_KP_5: + case GDK.GDK_KP_6: + case GDK.GDK_KP_7: + case GDK.GDK_KP_8: + case GDK.GDK_KP_9: + case GDK.GDK_KP_Add: + case GDK.GDK_KP_Decimal: + case GDK.GDK_KP_Delete: + case GDK.GDK_KP_Divide: + case GDK.GDK_KP_Down: + case GDK.GDK_KP_End: + case GDK.GDK_KP_Enter: + case GDK.GDK_KP_Equal: + case GDK.GDK_KP_Home: + case GDK.GDK_KP_Insert: + case GDK.GDK_KP_Left: + case GDK.GDK_KP_Multiply: + case GDK.GDK_KP_Page_Down: + case GDK.GDK_KP_Page_Up: + case GDK.GDK_KP_Right: + case GDK.GDK_KP_Subtract: + case GDK.GDK_KP_Up: + case GDK.GDK_Num_Lock: event.keyLocation = SWT.KEYPAD; break; } @@ -1820,8 +1820,8 @@ void gtk_widget_set_visible (long /*int*/ widget, boolean visible) { } void gdk_window_get_size (long /*int*/ drawable, int[] width, int[] height) { - width[0] = OS.gdk_window_get_width (drawable); - height[0] = OS.gdk_window_get_height (drawable); + width[0] = GDK.gdk_window_get_width (drawable); + height[0] = GDK.gdk_window_get_height (drawable); } /** @@ -1832,7 +1832,7 @@ void gdk_window_get_size (long /*int*/ drawable, int[] width, int[] height) { */ int gdk_event_get_state (long /*int*/ event) { int [] state = new int [1]; - OS.gdk_event_get_state (event, state); + GDK.gdk_event_get_state (event, state); return state[0]; } @@ -1856,27 +1856,27 @@ int gdk_pointer_grab (long /*int*/ window, int grab_ownership, boolean owner_eve if (GTK.GTK3) { long /*int*/ display = 0; if( window != 0) { - display = OS.gdk_window_get_display (window); + display = GDK.gdk_window_get_display (window); } else { - window = OS.gdk_get_default_root_window (); - display = OS.gdk_window_get_display (window); + window = GDK.gdk_get_default_root_window (); + display = GDK.gdk_window_get_display (window); } - long /*int*/ device_manager = OS.gdk_display_get_device_manager (display); - long /*int*/ pointer = OS.gdk_device_manager_get_client_pointer (device_manager); - return OS.gdk_device_grab (pointer, window, grab_ownership, owner_events, event_mask, cursor, time_); + long /*int*/ device_manager = GDK.gdk_display_get_device_manager (display); + long /*int*/ pointer = GDK.gdk_device_manager_get_client_pointer (device_manager); + return GDK.gdk_device_grab (pointer, window, grab_ownership, owner_events, event_mask, cursor, time_); } else { - return OS.gdk_pointer_grab (window, owner_events, event_mask, confine_to, cursor, time_); + return GDK.gdk_pointer_grab (window, owner_events, event_mask, confine_to, cursor, time_); } } void gdk_pointer_ungrab (long /*int*/ window, int time_) { if (GTK.GTK3) { - long /*int*/ display = OS.gdk_window_get_display (window); - long /*int*/ device_manager = OS.gdk_display_get_device_manager (display); - long /*int*/ pointer = OS.gdk_device_manager_get_client_pointer (device_manager); - OS.gdk_device_ungrab (pointer, time_); + long /*int*/ display = GDK.gdk_window_get_display (window); + long /*int*/ device_manager = GDK.gdk_display_get_device_manager (display); + long /*int*/ pointer = GDK.gdk_device_manager_get_client_pointer (device_manager); + GDK.gdk_device_ungrab (pointer, time_); } else { - OS.gdk_pointer_ungrab (time_); + GDK.gdk_pointer_ungrab (time_); } } @@ -2030,7 +2030,7 @@ void gdk_cursor_unref (long /*int*/ cursor) { if (GTK.GTK3) { OS.g_object_unref (cursor); } else { - OS.gdk_cursor_unref(cursor); + GDK.gdk_cursor_unref(cursor); } } @@ -2038,16 +2038,16 @@ long /*int*/ gdk_window_get_device_position (long /*int*/ window, int[] x, int[] if (GTK.GTK3) { long /*int*/ display = 0; if( window != 0) { - display = OS.gdk_window_get_display (window); + display = GDK.gdk_window_get_display (window); } else { - window = OS.gdk_get_default_root_window (); - display = OS.gdk_window_get_display (window); + window = GDK.gdk_get_default_root_window (); + display = GDK.gdk_window_get_display (window); } - long /*int*/ device_manager = OS.gdk_display_get_device_manager (display); - long /*int*/ pointer = OS.gdk_device_manager_get_client_pointer (device_manager); - return OS.gdk_window_get_device_position(window, pointer, x, y, mask); + long /*int*/ device_manager = GDK.gdk_display_get_device_manager (display); + long /*int*/ pointer = GDK.gdk_device_manager_get_client_pointer (device_manager); + return GDK.gdk_window_get_device_position(window, pointer, x, y, mask); } else { - return OS.gdk_window_get_pointer (window, x, y, mask); + return GDK.gdk_window_get_pointer (window, x, y, mask); } } |