void adwaita_draw_flat_box (GtkStyle *style, GdkWindow *window, GtkStateType state_type, GtkShadowType shadow_type, GdkRectangle *area, GtkWidget *widget, const gchar *detail, gint x, gint y, gint width, gint height) { const gchar *app_name; GTK_STYLE_CLASS (adwaita_style_parent_class)->draw_flat_box (style, window, state_type, shadow_type, area, widget, detail, x, y, width, height); /* HACK: this is totally awful, but I don't see a better way to "tag" the OO.o hierarchy */ if (!GTK_IS_WINDOW (widget) || (gtk_window_get_window_type (GTK_WINDOW (widget)) != GTK_WINDOW_TOPLEVEL)) return; app_name = g_get_application_name (); if (g_str_has_prefix (app_name, "OpenOffice.org")) do_toplevel_hack (widget, "openoffice-toplevel"); else if (g_str_has_prefix (app_name, "LibreOffice")) do_toplevel_hack (widget, "libreoffice-toplevel"); }
JNIEXPORT jint JNICALL Java_org_gnome_gtk_GtkWindow_gtk_1window_1get_1window_1type ( JNIEnv* env, jclass cls, jlong _self ) { GtkWindowType result; jint _result; GtkWindow* self; // convert parameter self self = (GtkWindow*) _self; // call function result = gtk_window_get_window_type(self); // cleanup parameter self // translate return value to JNI type _result = (jint) result; // and finally return _result; }