diff options
Diffstat (limited to 'libjava/gnu/awt/gtk/natGtkWindowPeer.cc')
-rw-r--r-- | libjava/gnu/awt/gtk/natGtkWindowPeer.cc | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/libjava/gnu/awt/gtk/natGtkWindowPeer.cc b/libjava/gnu/awt/gtk/natGtkWindowPeer.cc new file mode 100644 index 0000000..d3f05c9 --- /dev/null +++ b/libjava/gnu/awt/gtk/natGtkWindowPeer.cc @@ -0,0 +1,40 @@ +// This file was created by `gcjh -stubs'. -*- c++ -*- +// +// This file is intended to give you a head start on implementing native +// methods using CNI. +// Be aware: running `gcjh -stubs ' once more for this class may +// overwrite any edits you have made to this file. + +#include <gnu/awt/gtk/GtkWindowPeer.h> +#include <gcj/cni.h> + +#include <gtk/gtk.h> + +void +gnu::awt::gtk::GtkWindowPeer::toBack () +{ + GDK_THREADS_ENTER (); + gdk_window_lower (GTK_WIDGET (ptr)->window); + GDK_THREADS_LEAVE (); +} + +void +gnu::awt::gtk::GtkWindowPeer::toFront () +{ + GDK_THREADS_ENTER (); + gdk_window_raise (GTK_WIDGET (ptr)->window); + GDK_THREADS_LEAVE (); +} + +void +gnu::awt::gtk::GtkWindowPeer::create () +{ + if (ptr == NULL) + { + GDK_THREADS_ENTER (); + ptr = (gnu::gcj::RawData *) gtk_window_new(GTK_WINDOW_POPUP); + GDK_THREADS_LEAVE (); + } + + gnu::awt::gtk::GtkContainerPeer::create(); +} |