42 |
JNIEXPORT void JNICALL Java_gnu_java_awt_peer_gtk_GtkButtonPeer_create |
JNIEXPORT void JNICALL Java_gnu_java_awt_peer_gtk_GtkButtonPeer_create |
43 |
(JNIEnv *env, jobject obj) |
(JNIEnv *env, jobject obj) |
44 |
{ |
{ |
45 |
GtkButton *button; |
GtkWidget *button; |
46 |
|
|
47 |
gdk_threads_enter (); |
gdk_threads_enter (); |
48 |
button = gtk_button_new(); |
button = gtk_button_new(); |
49 |
gtk_widget_show (GTK_WIDGET(button)); |
gtk_widget_show (button); |
50 |
gdk_threads_leave (); |
gdk_threads_leave (); |
51 |
NSA_SET_PTR (env, obj, button); |
NSA_SET_PTR (env, obj, button); |
52 |
} |
} |
74 |
gdk_threads_enter(); |
gdk_threads_enter(); |
75 |
|
|
76 |
font_desc = pango_font_description_from_string (font_name); |
font_desc = pango_font_description_from_string (font_name); |
77 |
pango_font_description_set_size (font_desc, size); |
pango_font_description_set_size (font_desc, size * PANGO_SCALE); |
78 |
|
|
79 |
gtk_widget_modify_font (GTK_WIDGET(label), font_desc); |
gtk_widget_modify_font (GTK_WIDGET(label), font_desc); |
80 |
|
|
81 |
pango_font_description_free (font_desc); |
pango_font_description_free (font_desc); |
82 |
|
|
83 |
gdk_threads_leave(); |
gdk_threads_leave(); |