< prev index next >

modules/graphics/src/main/native-glass/gtk/glass_general.h

Print this page

        

*** 1,7 **** /* ! * Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this --- 1,7 ---- /* ! * Copyright (c) 2011, 2018, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this
*** 25,49 **** #ifndef GLASS_GENERAL_H #define GLASS_GENERAL_H #include <jni.h> - #include <stdint.h> #include <X11/Xlib.h> #include <gdk/gdk.h> #include <gtk/gtk.h> #define JLONG_TO_PTR(value) ((void*)(intptr_t)(value)) #define PTR_TO_JLONG(value) ((jlong)(intptr_t)(value)) #define FILE_PREFIX "file://" #define URI_LIST_COMMENT_PREFIX "#" #define URI_LIST_LINE_BREAK "\r\n" extern JNIEnv* mainEnv; // Use only with main loop thread!!! #include <exception> struct jni_exception: public std::exception { jni_exception(jthrowable _th): throwable(_th), message() { jclass jc = mainEnv->FindClass("java/lang/Throwable"); --- 25,60 ---- #ifndef GLASS_GENERAL_H #define GLASS_GENERAL_H #include <jni.h> #include <stdint.h> #include <X11/Xlib.h> #include <gdk/gdk.h> + #include <gdk/gdkx.h> #include <gtk/gtk.h> + #include "wrapped.h" + + #if GTK_CHECK_VERSION(3, 0, 0) + #if ! GTK_CHECK_VERSION(3, 8, 0) + #error GTK development version is not the minimum 3.8 + #endif + #define GLASS_GTK3 + #endif + #define JLONG_TO_PTR(value) ((void*)(intptr_t)(value)) #define PTR_TO_JLONG(value) ((jlong)(intptr_t)(value)) #define FILE_PREFIX "file://" #define URI_LIST_COMMENT_PREFIX "#" #define URI_LIST_LINE_BREAK "\r\n" extern JNIEnv* mainEnv; // Use only with main loop thread!!! + #define GLASS_GDK_KEY_CONSTANT(key) (GDK_KEY_ ## key) + #include <exception> struct jni_exception: public std::exception { jni_exception(jthrowable _th): throwable(_th), message() { jclass jc = mainEnv->FindClass("java/lang/Throwable");
*** 245,251 **** --- 256,353 ---- gsize get_files_count(gchar **uris); jobject uris_to_java(JNIEnv *env, gchar **uris, gboolean files); + #ifdef __cplusplus + extern "C" { + #endif + + extern jboolean gtk_verbose; + + void + glass_widget_set_visual (GtkWidget *widget, GdkVisual *visual); + + gint + glass_gdk_visual_get_depth (GdkVisual * visual); + + GdkScreen * + glass_gdk_window_get_screen(GdkWindow * gdkWindow); + + gboolean + glass_gdk_mouse_devices_grab(GdkWindow * gdkWindow); + + gboolean + glass_gdk_mouse_devices_grab_with_cursor(GdkWindow * gdkWindow, GdkCursor *cursor, gboolean owner_events); + + void + glass_gdk_mouse_devices_ungrab(); + + void + glass_gdk_master_pointer_grab(GdkWindow *window, GdkCursor *cursor); + + void + glass_gdk_master_pointer_ungrab(); + + void + glass_gdk_master_pointer_get_position(gint *x, gint *y); + + gboolean + glass_gdk_device_is_grabbed(GdkDevice *device); + + void + glass_gdk_device_ungrab(GdkDevice *device); + + GdkWindow * + glass_gdk_device_get_window_at_position( + GdkDevice *device, gint *x, gint *y); + + void + glass_gtk_configure_transparency_and_realize(GtkWidget *window, + gboolean transparent); + + const guchar * + glass_gtk_selection_data_get_data_with_length( + GtkSelectionData * selectionData, + gint * length); + + void + glass_gtk_window_configure_from_visual(GtkWidget *widget, GdkVisual *visual); + + void + glass_gdk_window_get_size(GdkWindow *window, gint *w, gint *h); + + void + glass_gdk_display_get_pointer(GdkDisplay* display, gint* x, gint *y); + + void + glass_gdk_x11_display_set_window_scale(GdkDisplay *display, gint scale); + + gboolean + glass_configure_window_transparency(GtkWidget *window, gboolean transparent); + + GdkPixbuf * + glass_pixbuf_from_window(GdkWindow *window, + gint srcx, gint srcy, + gint width, gint height); + + void + glass_window_apply_shape_mask(GdkWindow *window, + void* data, uint width, uint height); + + void + glass_window_reset_input_shape_mask(GdkWindow *window); + + GdkWindow * + glass_gdk_drag_context_get_dest_window (GdkDragContext * context); + + guint + glass_settings_get_guint_opt (const gchar *schema_name, + const gchar *key_name, + int defval); + + #ifdef __cplusplus + } + #endif + #endif /* GLASS_GENERAL_H */
< prev index next >