< prev index next >
src/solaris/native/sun/xawt/awt_Desktop.c
Print this page
@@ -1,7 +1,7 @@
/*
- * Copyright (c) 2005, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 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
@@ -22,11 +22,11 @@
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
#include "jni_util.h"
-#include "gtk2_interface.h"
+#include "gtk_interface.h"
#include "gnome_interface.h"
static gboolean gtk_has_been_loaded = FALSE;
static gboolean gnome_has_been_loaded = FALSE;
@@ -34,18 +34,18 @@
* Class: sun_awt_X11_XDesktopPeer
* Method: init
* Signature: ()Z
*/
JNIEXPORT jboolean JNICALL Java_sun_awt_X11_XDesktopPeer_init
- (JNIEnv *env, jclass cls)
+ (JNIEnv *env, jclass cls, jint version, jboolean verbose)
{
if (gtk_has_been_loaded || gnome_has_been_loaded) {
return JNI_TRUE;
}
- if (gtk2_load(env) && gtk2_show_uri_load(env)) {
+ if (gtk_load(env, version, verbose) && gtk->show_uri_load(env)) {
gtk_has_been_loaded = TRUE;
return JNI_TRUE;
} else if (gnome_load()) {
gnome_has_been_loaded = TRUE;
return JNI_TRUE;
@@ -72,13 +72,13 @@
}
return JNI_FALSE;
}
if (gtk_has_been_loaded) {
- fp_gdk_threads_enter();
- success = fp_gtk_show_uri(NULL, url_c, GDK_CURRENT_TIME, NULL);
- fp_gdk_threads_leave();
+ gtk->gdk_threads_enter();
+ success = gtk->gtk_show_uri(NULL, url_c, GDK_CURRENT_TIME, NULL);
+ gtk->gdk_threads_leave();
} else if (gnome_has_been_loaded) {
success = (*gnome_url_show)(url_c, NULL);
}
(*env)->ReleaseByteArrayElements(env, url_j, (signed char*)url_c, 0);
< prev index next >