+2003-09-16 Thomas Fitzsimmons <fitzsim@redhat.com>
+
+ * gnu/java/awt/peer/gtk/GtkEmbeddedWindowPeer.java (construct):
+ Remove method declaration.
+ (create()): Call native create.
+ (create(int)): New method.
+ * jni/gtk-peer/gnu_java_awt_peer_gtk_GtkEmbeddedWindowPeer.c:
+ (create): Add window_id parameter. Call gtk_plug_new with
+ window_id parameter.
+ (construct): Remove method implementation.
+
2003-09-16 Mohan Embar <gnustuff@thisiscool.com>
* Makefile.am: (MOSTLYCLEANFILES) Removed libtool objects.
-/* GtkEmbeddedWindowPeer.java -- Implements FramePeer using a GtkPlug
+/* GtkEmbeddedWindowPeer.java -- Implements EmbeddedWindowPeer using a
+ GtkPlug
Copyright (C) 2003 Free Software Foundation, Inc.
This file is part of GNU Classpath.
public class GtkEmbeddedWindowPeer extends GtkFramePeer
implements EmbeddedWindowPeer
{
- native void create();
- native void construct (int window_id);
+ native void create(int window_id);
+
+ void create ()
+ {
+ create (((EmbeddedWindow) awtComponent).getHandle());
+ }
public GtkEmbeddedWindowPeer (EmbeddedWindow w)
{
super (w);
- construct (w.getHandle());
}
}
JNIEXPORT void JNICALL
Java_gnu_java_awt_peer_gtk_GtkEmbeddedWindowPeer_create
- (JNIEnv *env, jobject obj)
+ (JNIEnv *env, jobject obj, jint window_id)
{
- gpointer window;
+ GtkWidget *window;
GtkWidget *vbox, *layout;
gdk_threads_enter ();
- /* Create an "unplugged" GtkPlug. */
- window = gtk_plug_new (0);
+ window = gtk_plug_new (window_id);
vbox = gtk_vbox_new (0, 0);
layout = gtk_layout_new (NULL, NULL);
NSA_SET_PTR (env, obj, window);
}
-
-JNIEXPORT void JNICALL
-Java_gnu_java_awt_peer_gtk_GtkEmbeddedWindowPeer_construct
- (JNIEnv *env, jobject obj, jint window_id)
-{
- void *ptr;
-
- ptr = NSA_GET_PTR (env, obj);
-
- gdk_threads_enter ();
-
- gtk_plug_construct (GTK_PLUG (ptr), window_id);
-
- gdk_threads_leave ();
-}