comparison src/frame-gtk.c @ 5125:b5df3737028a ben-lisp-object

merge
author Ben Wing <ben@xemacs.org>
date Wed, 24 Feb 2010 01:58:04 -0600
parents d1247f3cc363 3c3c1d139863
children 2a462149bd6a
comparison
equal deleted inserted replaced
5124:623d57b7fbe8 5125:b5df3737028a
59 #define UNMAPPED_DATA_IDENTIFIER "xemacs::initially_unmapped" 59 #define UNMAPPED_DATA_IDENTIFIER "xemacs::initially_unmapped"
60 60
61 #define STUPID_X_SPECIFIC_GTK_STUFF 61 #define STUPID_X_SPECIFIC_GTK_STUFF
62 62
63 #ifdef STUPID_X_SPECIFIC_GTK_STUFF 63 #ifdef STUPID_X_SPECIFIC_GTK_STUFF
64 #include <gdk/gdkx.h> 64 #include "sysgdkx.h"
65 #endif 65 #endif
66 66
67 /* Default properties to use when creating frames. */ 67 /* Default properties to use when creating frames. */
68 Lisp_Object Vdefault_gtk_frame_plist; 68 Lisp_Object Vdefault_gtk_frame_plist;
69 69
328 328
329 /* Optimize for common ASCII case */ 329 /* Optimize for common ASCII case */
330 for (ptr = value; *ptr; ptr++) 330 for (ptr = value; *ptr; ptr++)
331 if (!byte_ascii_p (*ptr)) 331 if (!byte_ascii_p (*ptr))
332 { 332 {
333 char *tmp; 333 char *tmp = ITEXT_TO_EXTERNAL (value, Qctext);
334 C_STRING_TO_EXTERNAL (value, tmp, Qctext);
335 the_text = tmp; 334 the_text = tmp;
336 break; 335 break;
337 } 336 }
338 } 337 }
339 #endif /* MULE */ 338 #endif /* MULE */
808 #ifdef HAVE_MENUBARS 807 #ifdef HAVE_MENUBARS
809 int menubar_visible; 808 int menubar_visible;
810 #endif 809 #endif
811 810
812 if (STRINGP (f->name)) 811 if (STRINGP (f->name))
813 TO_EXTERNAL_FORMAT (LISP_STRING, f->name, C_STRING_ALLOCA, name, Qctext); 812 name = LISP_STRING_TO_EXTERNAL (f->name, Qctext);
814 else 813 else
815 name = "emacs"; 814 name = "emacs";
816 815
817 FRAME_GTK_TOP_LEVEL_FRAME_P (f) = 1; 816 FRAME_GTK_TOP_LEVEL_FRAME_P (f) = 1;
818 817
984 FRAME_GTK_MENUBAR_DATA (f) = Qnil; 983 FRAME_GTK_MENUBAR_DATA (f) = Qnil;
985 for (i = 0; i < 3; i++) 984 for (i = 0; i < 3; i++)
986 FRAME_GTK_LISP_WIDGETS (f)[i] = Qnil; 985 FRAME_GTK_LISP_WIDGETS (f)[i] = Qnil;
987 986
988 /* 987 /*
989 Hashtables of callback data for glyphs on the frame. Make them EQ because 988 Hashtables of callback data for glyphs on the frame. [[ Make them EQ
990 we only use ints as keys. Otherwise we run into stickiness in redisplay 989 because we only use ints as keys. Otherwise we run into stickiness in
991 because internal_equal() can QUIT. See enter_redisplay_critical_section(). 990 redisplay because internal_equal() can QUIT. See
991 enter_redisplay_critical_section() ]] -- probably not true any more,
992 now that we have internal_equal_trapping_problems(). --ben
992 */ 993 */
993 FRAME_GTK_WIDGET_INSTANCE_HASH_TABLE (f) = 994 FRAME_GTK_WIDGET_INSTANCE_HASH_TABLE (f) =
994 make_lisp_hash_table (50, HASH_TABLE_VALUE_WEAK, HASH_TABLE_EQ); 995 make_lisp_hash_table (50, HASH_TABLE_VALUE_WEAK, HASH_TABLE_EQ);
995 FRAME_GTK_WIDGET_CALLBACK_HASH_TABLE (f) = 996 FRAME_GTK_WIDGET_CALLBACK_HASH_TABLE (f) =
996 make_lisp_hash_table (50, HASH_TABLE_VALUE_WEAK, HASH_TABLE_EQ); 997 make_lisp_hash_table (50, HASH_TABLE_VALUE_WEAK, HASH_TABLE_EQ);
1153 different program. Since the ID is an unsigned long, we return it as 1154 different program. Since the ID is an unsigned long, we return it as
1154 a string. 1155 a string.
1155 */ 1156 */
1156 (frame)) 1157 (frame))
1157 { 1158 {
1158 char str[255]; 1159 Ascbyte str[255];
1159 struct frame *f = decode_gtk_frame (frame); 1160 struct frame *f = decode_gtk_frame (frame);
1160 1161
1161 /* Arrrrggghhh... this defeats the whole purpose of using Gdk... do we really need this? */ 1162 /* Arrrrggghhh... this defeats the whole purpose of using Gdk... do we really need this? */
1162 sprintf (str, "%lu", GDK_WINDOW_XWINDOW( GET_GTK_WIDGET_WINDOW (FRAME_GTK_TEXT_WIDGET (f)))); 1163 sprintf (str, "%lu", GDK_WINDOW_XWINDOW( GET_GTK_WIDGET_WINDOW (FRAME_GTK_TEXT_WIDGET (f))));
1163 return build_string (str); 1164 return build_ascstring (str);
1164 } 1165 }
1165 #endif 1166 #endif
1166 1167
1167 1168
1168 /************************************************************************/ 1169 /************************************************************************/
1349 GtkWidget *w = FRAME_GTK_SHELL_WIDGET (f); 1350 GtkWidget *w = FRAME_GTK_SHELL_WIDGET (f);
1350 1351
1351 gtk_widget_destroy (w); 1352 gtk_widget_destroy (w);
1352 1353
1353 if (FRAME_GTK_GEOM_FREE_ME_PLEASE (f)) 1354 if (FRAME_GTK_GEOM_FREE_ME_PLEASE (f))
1354 xfree (FRAME_GTK_GEOM_FREE_ME_PLEASE (f), char *); 1355 xfree (FRAME_GTK_GEOM_FREE_ME_PLEASE (f));
1355 #ifndef NEW_GC 1356 #ifndef NEW_GC
1356 xfree (f->frame_data, void *); 1357 xfree (f->frame_data);
1357 #endif /* not NEW_GC */ 1358 #endif /* not NEW_GC */
1358 f->frame_data = 0; 1359 f->frame_data = 0;
1359 } 1360 }
1360 1361
1361 static void 1362 static void