626
627 typedef void (*GDestroyNotify)(gpointer data);
628
629 typedef void (*GCallback)(void);
630
631 typedef struct _GClosure GClosure;
632
633 typedef void (*GClosureNotify)(gpointer data, GClosure *closure);
634
635 typedef enum {
636 G_CONNECT_AFTER = 1 << 0, G_CONNECT_SWAPPED = 1 << 1
637 } GConnectFlags;
638
639 typedef struct _GThreadFunctions GThreadFunctions;
640
641 /*
642 * Converts java.lang.String object to UTF-8 character string.
643 */
644 const char *getStrFor(JNIEnv *env, jstring value);
645
646 /*
647 * Check whether the gtk2 library is available and meets the minimum
648 * version requirement. If the library is already loaded this method has no
649 * effect and returns success.
650 * Returns FALSE on failure and TRUE on success.
651 */
652 gboolean gtk2_check_version();
653
654 /**
655 * Returns :
656 * NULL if the GTK+ library is compatible with the given version, or a string
657 * describing the version mismatch.
658 */
659 gchar* (*fp_gtk_check_version)(guint required_major, guint required_minor,
660 guint required_micro);
661 /*
662 * Load the gtk2 library. If the library is already loaded this method has no
663 * effect and returns success.
664 * Returns FALSE on failure and TRUE on success.
665 */
666 gboolean gtk2_load();
667
668 /*
669 * Loads fp_gtk_show_uri function pointer. This initialization is
670 * separated because the function is required only
671 * for java.awt.Desktop API. The function relies on initialization in
672 * gtk2_load, so it must be invoked only after a successful gtk2_load
673 * invocation
674 */
675 gboolean gtk2_show_uri_load();
676
677 /*
678 * Unload the gtk2 library. If the library is already unloaded this method has
679 * no effect and returns success.
680 * Returns FALSE on failure and TRUE on success.
681 */
682 gboolean gtk2_unload();
683
684 void gtk2_paint_arrow(WidgetType widget_type, GtkStateType state_type,
685 GtkShadowType shadow_type, const gchar *detail,
686 gint x, gint y, gint width, gint height,
783 GtkFileFilterFlags needed, GtkFileFilterFunc func, gpointer data,
784 GDestroyNotify notify);
785 void (*fp_gtk_file_chooser_set_filter)(GtkFileChooser *chooser,
786 GtkFileFilter *filter);
787 GType (*fp_gtk_file_chooser_get_type)(void);
788 GtkFileFilter* (*fp_gtk_file_filter_new)(void);
789 void (*fp_gtk_file_chooser_set_do_overwrite_confirmation)(
790 GtkFileChooser *chooser, gboolean do_overwrite_confirmation);
791 void (*fp_gtk_file_chooser_set_select_multiple)(
792 GtkFileChooser *chooser, gboolean select_multiple);
793 gchar* (*fp_gtk_file_chooser_get_current_folder)(GtkFileChooser *chooser);
794 GSList* (*fp_gtk_file_chooser_get_filenames)(GtkFileChooser *chooser);
795 guint (*fp_gtk_g_slist_length)(GSList *list);
796 gulong (*fp_g_signal_connect_data)(gpointer instance,
797 const gchar *detailed_signal, GCallback c_handler, gpointer data,
798 GClosureNotify destroy_data, GConnectFlags connect_flags);
799 void (*fp_gtk_widget_show)(GtkWidget *widget);
800 void (*fp_gtk_main)(void);
801 guint (*fp_gtk_main_level)(void);
802
803
804 void (*fp_g_thread_init)(GThreadFunctions *vtable);
805 void (*fp_gdk_threads_init)(void);
806 void (*fp_gdk_threads_enter)(void);
807 void (*fp_gdk_threads_leave)(void);
808
809 gboolean (*fp_gtk_show_uri)(GdkScreen *screen, const gchar *uri,
810 guint32 timestamp, GError **error);
811
812 #endif /* !_GTK2_INTERFACE_H */
|
626
627 typedef void (*GDestroyNotify)(gpointer data);
628
629 typedef void (*GCallback)(void);
630
631 typedef struct _GClosure GClosure;
632
633 typedef void (*GClosureNotify)(gpointer data, GClosure *closure);
634
635 typedef enum {
636 G_CONNECT_AFTER = 1 << 0, G_CONNECT_SWAPPED = 1 << 1
637 } GConnectFlags;
638
639 typedef struct _GThreadFunctions GThreadFunctions;
640
641 /*
642 * Converts java.lang.String object to UTF-8 character string.
643 */
644 const char *getStrFor(JNIEnv *env, jstring value);
645
646 /**
647 * Returns :
648 * NULL if the GLib library is compatible with the given version, or a string
649 * describing the version mismatch.
650 */
651 gchar* (*fp_glib_check_version)(guint required_major, guint required_minor,
652 guint required_micro);
653
654 /*
655 * Check whether the gtk2 library is available and meets the minimum
656 * version requirement. If the library is already loaded this method has no
657 * effect and returns success.
658 * Returns FALSE on failure and TRUE on success.
659 */
660 gboolean gtk2_check_version();
661
662 /**
663 * Returns :
664 * NULL if the GTK+ library is compatible with the given version, or a string
665 * describing the version mismatch.
666 */
667 gchar* (*fp_gtk_check_version)(guint required_major, guint required_minor,
668 guint required_micro);
669 /*
670 * Load the gtk2 library. If the library is already loaded this method has no
671 * effect and returns success.
672 * Returns FALSE on failure and TRUE on success.
673 */
674 gboolean gtk2_load(JNIEnv *env);
675
676 /*
677 * Loads fp_gtk_show_uri function pointer. This initialization is
678 * separated because the function is required only
679 * for java.awt.Desktop API. The function relies on initialization in
680 * gtk2_load, so it must be invoked only after a successful gtk2_load
681 * invocation
682 */
683 gboolean gtk2_show_uri_load();
684
685 /*
686 * Unload the gtk2 library. If the library is already unloaded this method has
687 * no effect and returns success.
688 * Returns FALSE on failure and TRUE on success.
689 */
690 gboolean gtk2_unload();
691
692 void gtk2_paint_arrow(WidgetType widget_type, GtkStateType state_type,
693 GtkShadowType shadow_type, const gchar *detail,
694 gint x, gint y, gint width, gint height,
791 GtkFileFilterFlags needed, GtkFileFilterFunc func, gpointer data,
792 GDestroyNotify notify);
793 void (*fp_gtk_file_chooser_set_filter)(GtkFileChooser *chooser,
794 GtkFileFilter *filter);
795 GType (*fp_gtk_file_chooser_get_type)(void);
796 GtkFileFilter* (*fp_gtk_file_filter_new)(void);
797 void (*fp_gtk_file_chooser_set_do_overwrite_confirmation)(
798 GtkFileChooser *chooser, gboolean do_overwrite_confirmation);
799 void (*fp_gtk_file_chooser_set_select_multiple)(
800 GtkFileChooser *chooser, gboolean select_multiple);
801 gchar* (*fp_gtk_file_chooser_get_current_folder)(GtkFileChooser *chooser);
802 GSList* (*fp_gtk_file_chooser_get_filenames)(GtkFileChooser *chooser);
803 guint (*fp_gtk_g_slist_length)(GSList *list);
804 gulong (*fp_g_signal_connect_data)(gpointer instance,
805 const gchar *detailed_signal, GCallback c_handler, gpointer data,
806 GClosureNotify destroy_data, GConnectFlags connect_flags);
807 void (*fp_gtk_widget_show)(GtkWidget *widget);
808 void (*fp_gtk_main)(void);
809 guint (*fp_gtk_main_level)(void);
810
811
812 /**
813 * This function is available for GLIB > 2.20, so it MUST be
814 * called within (fp_glib_check_version(2, 20, 0) == NULL) check.
815 */
816 gboolean (*fp_g_thread_get_initialized)(void);
817
818 void (*fp_g_thread_init)(GThreadFunctions *vtable);
819 void (*fp_gdk_threads_init)(void);
820 void (*fp_gdk_threads_enter)(void);
821 void (*fp_gdk_threads_leave)(void);
822
823 gboolean (*fp_gtk_show_uri)(GdkScreen *screen, const gchar *uri,
824 guint32 timestamp, GError **error);
825
826 #endif /* !_GTK2_INTERFACE_H */
|