+2004-06-01 Mark Wielaard <mark@klomp.org>
+
+ * gnu/java/awt/peer/gtk/GtkComponentPeer.java (requestFocus):
+ Implement by calling gtkRequestFocus.
+ (gtkRequestFocus): New native method.
+ * native/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkComponentPeer.c
+ (Java_gnu_java_awt_peer_gtk_GtkComponentPeer_requestFocus__):
+ Renamed to ...
+ (Java_gnu_java_awt_peer_gtk_GtkComponentPeer_gtkRequestFocus):
+ New function name.
+ (filter_expose_event_handler):
+ Mark static.
+ * native/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkPopupMenuPeer.c
+ (menu_pos): Mark static.
+
2004-06-01 Michael Koch <konqueror@gmx.de>
* java/text/CollationElementIterator.java,
public void requestFocus ()
{
- gtkWidgetRequestFocus ();
- postFocusEvent (FocusEvent.FOCUS_GAINED, false);
+ gtkRequestFocus();
}
+ // Called from requestFocus, we don't want to make requestFocus itself
+ // native since several JNI header generators have difficulties with
+ // overridden and/or miranda methods. (Bug in gcjh < 3.5.)
+ native private void gtkRequestFocus ();
+
public void reshape (int x, int y, int width, int height)
{
setBounds (x, y, width, height);
}
JNIEXPORT void JNICALL
-Java_gnu_java_awt_peer_gtk_GtkComponentPeer_gtkWidgetRequestFocus
+Java_gnu_java_awt_peer_gtk_GtkComponentPeer_gtkRequestFocus
(JNIEnv *env, jobject obj)
{
void *ptr;
(*env)->ReleaseStringUTFChars (env, jname, name);
}
-gboolean
+static gboolean
filter_expose_event_handler (GtkWidget *widget, GdkEvent *event, jobject peer)
{
/*
#include "gtkpeer.h"
#include "gnu_java_awt_peer_gtk_GtkPopupMenuPeer.h"
-void menu_pos (GtkMenu *, gint *, gint *, gboolean *, gpointer);
-
struct pos
{
gint x;
gint y;
};
-void
+static void
menu_pos (GtkMenu *menu __attribute__((unused)),
gint *x, gint *y,
gboolean *push_in,
gdk_threads_enter ();
menu = GTK_MENU (GTK_MENU_ITEM (ptr1)->submenu);
gtk_menu_set_accel_group (menu, gtk_accel_group_new ());
- /* FIXME: update this to use GTK-2.4 GtkActions. */
+ /* FIXME: _gtk_accel_group_attach is a GTK-private function, so
+ we'll need a different approach here: */
#if 0
_gtk_accel_group_attach (gtk_menu_get_accel_group (menu),
G_OBJECT (gtk_widget_get_toplevel (ptr2)));