Mercurial > hg > xemacs-beta
comparison src/frame-msw.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 | d305f4207861 |
children | 229bd619740a |
comparison
equal
deleted
inserted
replaced
3091:c22d8984148c | 3092:141c2920ea48 |
---|---|
90 { XD_LISP_OBJECT, offsetof (struct mswindows_frame, widget_hash_table2) }, | 90 { XD_LISP_OBJECT, offsetof (struct mswindows_frame, widget_hash_table2) }, |
91 { XD_LISP_OBJECT, offsetof (struct mswindows_frame, widget_hash_table3) }, | 91 { XD_LISP_OBJECT, offsetof (struct mswindows_frame, widget_hash_table3) }, |
92 { XD_END } | 92 { XD_END } |
93 }; | 93 }; |
94 | 94 |
95 #ifdef NEW_GC | |
96 DEFINE_LRECORD_IMPLEMENTATION ("mswindows-frame", mswindows_frame, | |
97 1, /*dumpable-flag*/ | |
98 0, 0, 0, 0, 0, | |
99 mswindows_frame_data_description_1, | |
100 Lisp_Mswindows_Frame); | |
101 #else /* not NEW_GC */ | |
95 extern const struct sized_memory_description mswindows_frame_data_description; | 102 extern const struct sized_memory_description mswindows_frame_data_description; |
96 | 103 |
97 const struct sized_memory_description mswindows_frame_data_description = { | 104 const struct sized_memory_description mswindows_frame_data_description = { |
98 sizeof (struct mswindows_frame), mswindows_frame_data_description_1 | 105 sizeof (struct mswindows_frame), mswindows_frame_data_description_1 |
99 }; | 106 }; |
107 #endif /* not NEW_GC */ | |
100 | 108 |
101 /*---------------------------------------------------------------------*/ | 109 /*---------------------------------------------------------------------*/ |
102 /*----- DISPLAY FRAME -----*/ | 110 /*----- DISPLAY FRAME -----*/ |
103 /*---------------------------------------------------------------------*/ | 111 /*---------------------------------------------------------------------*/ |
104 | 112 |
163 | 171 |
164 height = Fplist_get (props, Qheight, Qnil); | 172 height = Fplist_get (props, Qheight, Qnil); |
165 if (!NILP (height)) | 173 if (!NILP (height)) |
166 CHECK_INT (height); | 174 CHECK_INT (height); |
167 | 175 |
176 #ifdef NEW_GC | |
177 f->frame_data = alloc_lrecord_type (struct mswindows_frame, | |
178 &lrecord_mswindows_frame); | |
179 #else /* not NEW_GC */ | |
168 f->frame_data = xnew_and_zero (struct mswindows_frame); | 180 f->frame_data = xnew_and_zero (struct mswindows_frame); |
181 #endif /* not NEW_GC */ | |
169 FRAME_MSWINDOWS_TARGET_RECT (f) = xnew_and_zero (XEMACS_RECT_WH); | 182 FRAME_MSWINDOWS_TARGET_RECT (f) = xnew_and_zero (XEMACS_RECT_WH); |
170 | 183 |
171 FRAME_MSWINDOWS_TARGET_RECT (f)->left = NILP (left) ? -1 : abs (XINT (left)); | 184 FRAME_MSWINDOWS_TARGET_RECT (f)->left = NILP (left) ? -1 : abs (XINT (left)); |
172 FRAME_MSWINDOWS_TARGET_RECT (f)->top = NILP (top) ? -1 : abs (XINT (top)); | 185 FRAME_MSWINDOWS_TARGET_RECT (f)->top = NILP (top) ? -1 : abs (XINT (top)); |
173 FRAME_MSWINDOWS_TARGET_RECT (f)->width = NILP (width) ? -1 : | 186 FRAME_MSWINDOWS_TARGET_RECT (f)->width = NILP (width) ? -1 : |
338 #ifdef HAVE_DIALOGS | 351 #ifdef HAVE_DIALOGS |
339 mswindows_unregister_popup_frame (wrap_frame (f)); | 352 mswindows_unregister_popup_frame (wrap_frame (f)); |
340 #endif | 353 #endif |
341 ReleaseDC (FRAME_MSWINDOWS_HANDLE (f), FRAME_MSWINDOWS_DC (f)); | 354 ReleaseDC (FRAME_MSWINDOWS_HANDLE (f), FRAME_MSWINDOWS_DC (f)); |
342 DestroyWindow (FRAME_MSWINDOWS_HANDLE (f)); | 355 DestroyWindow (FRAME_MSWINDOWS_HANDLE (f)); |
356 #ifdef NEW_GC | |
357 mc_free (f->frame_data); | |
358 #else /* not NEW_GC */ | |
343 xfree (f->frame_data, void *); | 359 xfree (f->frame_data, void *); |
360 #endif /* not NEW_GC */ | |
344 } | 361 } |
345 f->frame_data = 0; | 362 f->frame_data = 0; |
346 } | 363 } |
347 | 364 |
348 static void | 365 static void |
1183 } | 1200 } |
1184 | 1201 |
1185 void | 1202 void |
1186 syms_of_frame_mswindows (void) | 1203 syms_of_frame_mswindows (void) |
1187 { | 1204 { |
1205 #ifdef NEW_GC | |
1206 INIT_LRECORD_IMPLEMENTATION (mswindows_frame); | |
1207 #endif /* NEW_GC */ | |
1188 } | 1208 } |
1189 | 1209 |
1190 void | 1210 void |
1191 reinit_vars_of_frame_mswindows (void) | 1211 reinit_vars_of_frame_mswindows (void) |
1192 { | 1212 { |