Mercurial > hg > xemacs-beta
comparison src/frame-gtk.c @ 3092:141c2920ea48
[xemacs-hg @ 2005-11-25 01:41:31 by crestani]
Incremental Garbage Collector
author | crestani |
---|---|
date | Fri, 25 Nov 2005 01:42:08 +0000 |
parents | dbd2a866e38a |
children | 3ef0aaf3dc34 |
comparison
equal
deleted
inserted
replaced
3091:c22d8984148c | 3092:141c2920ea48 |
---|---|
100 3 }, | 100 3 }, |
101 { XD_LISP_OBJECT, offsetof (struct gtk_frame, menubar_data) }, | 101 { XD_LISP_OBJECT, offsetof (struct gtk_frame, menubar_data) }, |
102 { XD_END } | 102 { XD_END } |
103 }; | 103 }; |
104 | 104 |
105 #ifdef NEW_GC | |
106 DEFINE_LRECORD_IMPLEMENTATION ("gtk-frame", gtk_frame, | |
107 1, /*dumpable-flag*/ | |
108 0, 0, 0, 0, 0, | |
109 gtk_frame_data_description_1, | |
110 Lisp_Gtk_Frame); | |
111 #else /* not NEW_GC */ | |
105 extern const struct sized_memory_description gtk_frame_data_description; | 112 extern const struct sized_memory_description gtk_frame_data_description; |
106 | 113 |
107 const struct sized_memory_description gtk_frame_data_description = { | 114 const struct sized_memory_description gtk_frame_data_description = { |
108 sizeof (struct gtk_frame), gtk_frame_data_description_1 | 115 sizeof (struct gtk_frame), gtk_frame_data_description_1 |
109 }; | 116 }; |
117 #endif /* not NEW_GC */ | |
110 | 118 |
111 | 119 |
112 /************************************************************************/ | 120 /************************************************************************/ |
113 /* helper functions */ | 121 /* helper functions */ |
114 /************************************************************************/ | 122 /************************************************************************/ |
964 allocate_gtk_frame_struct (struct frame *f) | 972 allocate_gtk_frame_struct (struct frame *f) |
965 { | 973 { |
966 int i; | 974 int i; |
967 | 975 |
968 /* zero out all slots. */ | 976 /* zero out all slots. */ |
977 #ifdef NEW_GC | |
978 f->frame_data = alloc_lrecord_type (struct gtk_frame, &lrecord_gtk_frame); | |
979 #else /* not NEW_GC */ | |
969 f->frame_data = xnew_and_zero (struct gtk_frame); | 980 f->frame_data = xnew_and_zero (struct gtk_frame); |
981 #endif /* not NEW_GC */ | |
970 | 982 |
971 /* yeah, except the lisp ones */ | 983 /* yeah, except the lisp ones */ |
972 FRAME_GTK_ICON_PIXMAP (f) = Qnil; | 984 FRAME_GTK_ICON_PIXMAP (f) = Qnil; |
973 FRAME_GTK_ICON_PIXMAP_MASK (f) = Qnil; | 985 FRAME_GTK_ICON_PIXMAP_MASK (f) = Qnil; |
974 FRAME_GTK_MENUBAR_DATA (f) = Qnil; | 986 FRAME_GTK_MENUBAR_DATA (f) = Qnil; |
1340 | 1352 |
1341 gtk_widget_destroy (w); | 1353 gtk_widget_destroy (w); |
1342 | 1354 |
1343 if (FRAME_GTK_GEOM_FREE_ME_PLEASE (f)) | 1355 if (FRAME_GTK_GEOM_FREE_ME_PLEASE (f)) |
1344 xfree (FRAME_GTK_GEOM_FREE_ME_PLEASE (f), char *); | 1356 xfree (FRAME_GTK_GEOM_FREE_ME_PLEASE (f), char *); |
1357 #ifdef NEW_GC | |
1358 mc_free (f->frame_data); | |
1359 #else /* not NEW_GC */ | |
1345 xfree (f->frame_data, void *); | 1360 xfree (f->frame_data, void *); |
1361 #endif /* not NEW_GC */ | |
1346 f->frame_data = 0; | 1362 f->frame_data = 0; |
1347 } | 1363 } |
1348 | 1364 |
1349 static void | 1365 static void |
1350 gtk_recompute_cell_sizes (struct frame *frm) | 1366 gtk_recompute_cell_sizes (struct frame *frm) |
1445 /************************************************************************/ | 1461 /************************************************************************/ |
1446 | 1462 |
1447 void | 1463 void |
1448 syms_of_frame_gtk (void) | 1464 syms_of_frame_gtk (void) |
1449 { | 1465 { |
1466 #ifdef NEW_GC | |
1467 INIT_LRECORD_IMPLEMENTATION (gtk_frame); | |
1468 #endif /* NEW_GC */ | |
1469 | |
1450 DEFSYMBOL (Qtext_widget); | 1470 DEFSYMBOL (Qtext_widget); |
1451 DEFSYMBOL (Qcontainer_widget); | 1471 DEFSYMBOL (Qcontainer_widget); |
1452 DEFSYMBOL (Qshell_widget); | 1472 DEFSYMBOL (Qshell_widget); |
1453 DEFSYMBOL (Qdetachable_menubar); | 1473 DEFSYMBOL (Qdetachable_menubar); |
1454 | 1474 |