src/solaris/native/sun/awt/gtk2_interface.c
Print this page
*** 1,7 ****
/*
! * Copyright (c) 2005, 2011, 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) 2005, 2012, 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
*** 430,439 ****
--- 430,472 ----
return result;
}
}
/**
+ * Functions for awt_Desktop.c
+ */
+ gboolean gtk2_show_uri_load() {
+ gboolean success = TRUE;
+ dlerror();
+ fp_gtk_show_uri = dl_symbol("gtk_show_uri");
+ const char *dlsym_error = dlerror();
+ const char *gtk_version = fp_gtk_check_version(2, 14, 0);
+ if ( gtk_version != NULL) {
+ // The gtk_show_uri is available from GTK+ 2.14
+ #ifdef INTERNAL_BUILD
+ fprintf (stderr, "The version of GTK is %s. "
+ "The gtk_show_uri function is supported "
+ "since GTK+ 2.14.\n", gtk_version);
+ #endif /* INTERNAL_BUILD */
+ success = FALSE;
+ }
+ if (dlsym_error) {
+ #ifdef INTERNAL_BUILD
+ fprintf (stderr, "Cannot load symbol: %s \n", dlsym_error);
+ #endif /* INTERNAL_BUILD */
+ success = FALSE;
+ }
+ if (fp_gtk_show_uri == NULL) {
+ #ifdef INTERNAL_BUILD
+ fprintf(stderr, "dlsym(gtk_show_uri) returned NULL\n");
+ #endif /* INTERNAL_BUILD */
+ success = FALSE;
+ }
+ return success;
+ }
+
+ /**
* Functions for sun_awt_X11_GtkFileDialogPeer.c
*/
void gtk2_file_chooser_load()
{
fp_gtk_file_chooser_get_filename = dl_symbol(