123 |
gtk_container_add (GTK_CONTAINER (window_widget), fixed); |
gtk_container_add (GTK_CONTAINER (window_widget), fixed); |
124 |
|
|
125 |
gtk_widget_show (fixed); |
gtk_widget_show (fixed); |
|
gtk_widget_realize (window_widget); |
|
126 |
|
|
127 |
if (decorated) |
if (decorated) |
128 |
window_get_frame_extents (window_widget, &top, &left, &bottom, &right); |
window_get_frame_extents (window_widget, &top, &left, &bottom, &right); |
223 |
} |
} |
224 |
|
|
225 |
JNIEXPORT void JNICALL |
JNIEXPORT void JNICALL |
|
Java_gnu_java_awt_peer_gtk_GtkWindowPeer_connectJObject |
|
|
(JNIEnv *env, jobject obj) |
|
|
{ |
|
|
void *ptr; |
|
|
|
|
|
ptr = NSA_GET_PTR (env, obj); |
|
|
|
|
|
gdk_threads_enter (); |
|
|
|
|
|
gtk_widget_realize (GTK_WIDGET (ptr)); |
|
|
|
|
|
connect_awt_hook (env, obj, 1, GTK_WIDGET (ptr)->window); |
|
|
|
|
|
gdk_threads_leave (); |
|
|
} |
|
|
|
|
|
JNIEXPORT void JNICALL |
|
226 |
Java_gnu_java_awt_peer_gtk_GtkWindowPeer_connectSignals |
Java_gnu_java_awt_peer_gtk_GtkWindowPeer_connectSignals |
227 |
(JNIEnv *env, jobject obj) |
(JNIEnv *env, jobject obj) |
228 |
{ |
{ |
234 |
|
|
235 |
gdk_threads_enter (); |
gdk_threads_enter (); |
236 |
|
|
|
gtk_widget_realize (GTK_WIDGET (ptr)); |
|
|
|
|
237 |
g_signal_connect (G_OBJECT (ptr), "event", |
g_signal_connect (G_OBJECT (ptr), "event", |
238 |
G_CALLBACK (pre_event_handler), *gref); |
G_CALLBACK (pre_event_handler), *gref); |
239 |
|
|
264 |
g_signal_connect (G_OBJECT (ptr), "property-notify-event", |
g_signal_connect (G_OBJECT (ptr), "property-notify-event", |
265 |
G_CALLBACK (window_property_changed_cb), *gref); |
G_CALLBACK (window_property_changed_cb), *gref); |
266 |
|
|
267 |
|
g_signal_connect_after (G_OBJECT (ptr), "realize", |
268 |
|
G_CALLBACK (connect_awt_hook_cb), *gref); |
269 |
|
|
270 |
gdk_threads_leave (); |
gdk_threads_leave (); |
271 |
} |
} |
272 |
|
|
339 |
height = (height < 1) ? 1 : height; |
height = (height < 1) ? 1 : height; |
340 |
|
|
341 |
gdk_threads_enter (); |
gdk_threads_enter (); |
342 |
|
|
343 |
gtk_window_move (GTK_WINDOW(ptr), x, y); |
gtk_window_move (GTK_WINDOW(ptr), x, y); |
344 |
/* The call to gdk_window_move is needed in addition to the call to |
/* The call to gdk_window_move is needed in addition to the call to |
345 |
gtk_window_move. If gdk_window_move isn't called, then the |
gtk_window_move. If gdk_window_move isn't called, then the |
353 |
|
|
354 |
Instead of being at the position set by setLocation, the window |
Instead of being at the position set by setLocation, the window |
355 |
is reshown at the position to which it was moved manually. */ |
is reshown at the position to which it was moved manually. */ |
356 |
gdk_window_move (GTK_WIDGET (ptr)->window, x, y); |
if (GTK_WIDGET (ptr)->window != NULL) |
357 |
|
gdk_window_move (GTK_WIDGET (ptr)->window, x, y); |
358 |
|
|
359 |
/* Need to change the widget's request size. */ |
/* Need to change the widget's request size. */ |
360 |
gtk_widget_set_size_request (GTK_WIDGET(ptr), width, height); |
gtk_widget_set_size_request (GTK_WIDGET(ptr), width, height); |