Mercurial > hg > xemacs-beta
comparison src/device.c @ 424:11054d720c21 r21-2-20
Import from CVS: tag r21-2-20
author | cvs |
---|---|
date | Mon, 13 Aug 2007 11:26:11 +0200 |
parents | 41dbb7a9d5f2 |
children |
comparison
equal
deleted
inserted
replaced
423:28d9c139be4c | 424:11054d720c21 |
---|---|
71 Qsize_workspace, Qsize_device_mm, Qdevice_dpi, Qnum_bit_planes, | 71 Qsize_workspace, Qsize_device_mm, Qdevice_dpi, Qnum_bit_planes, |
72 Qnum_color_cells, Qmouse_buttons, Qswap_buttons, Qshow_sounds, | 72 Qnum_color_cells, Qmouse_buttons, Qswap_buttons, Qshow_sounds, |
73 Qslow_device, Qsecurity; | 73 Qslow_device, Qsecurity; |
74 | 74 |
75 Lisp_Object Qdevicep, Qdevice_live_p; | 75 Lisp_Object Qdevicep, Qdevice_live_p; |
76 Lisp_Object Qdelete_device; | |
77 Lisp_Object Qcreate_device_hook; | 76 Lisp_Object Qcreate_device_hook; |
78 Lisp_Object Qdelete_device_hook; | 77 Lisp_Object Qdelete_device_hook; |
79 Lisp_Object Vdevice_class_list; | 78 Lisp_Object Vdevice_class_list; |
80 | 79 |
81 | 80 |
82 static Lisp_Object | 81 static Lisp_Object |
83 mark_device (Lisp_Object obj, void (*markobj) (Lisp_Object)) | 82 mark_device (Lisp_Object obj) |
84 { | 83 { |
85 struct device *d = XDEVICE (obj); | 84 struct device *d = XDEVICE (obj); |
86 | 85 |
87 markobj (d->name); | 86 mark_object (d->name); |
88 markobj (d->connection); | 87 mark_object (d->connection); |
89 markobj (d->canon_connection); | 88 mark_object (d->canon_connection); |
90 markobj (d->console); | 89 mark_object (d->console); |
91 markobj (d->selected_frame); | 90 mark_object (d->selected_frame); |
92 markobj (d->frame_with_focus_real); | 91 mark_object (d->frame_with_focus_real); |
93 markobj (d->frame_with_focus_for_hooks); | 92 mark_object (d->frame_with_focus_for_hooks); |
94 markobj (d->frame_that_ought_to_have_focus); | 93 mark_object (d->frame_that_ought_to_have_focus); |
95 markobj (d->device_class); | 94 mark_object (d->device_class); |
96 markobj (d->user_defined_tags); | 95 mark_object (d->user_defined_tags); |
97 markobj (d->pixel_to_glyph_cache.obj1); | 96 mark_object (d->pixel_to_glyph_cache.obj1); |
98 markobj (d->pixel_to_glyph_cache.obj2); | 97 mark_object (d->pixel_to_glyph_cache.obj2); |
99 | 98 |
100 markobj (d->color_instance_cache); | 99 mark_object (d->color_instance_cache); |
101 markobj (d->font_instance_cache); | 100 mark_object (d->font_instance_cache); |
102 #ifdef MULE | 101 #ifdef MULE |
103 markobj (d->charset_font_cache); | 102 mark_object (d->charset_font_cache); |
104 #endif | 103 #endif |
105 markobj (d->image_instance_cache); | 104 mark_object (d->image_instance_cache); |
106 | 105 |
107 if (d->devmeths) | 106 if (d->devmeths) |
108 { | 107 { |
109 markobj (d->devmeths->symbol); | 108 mark_object (d->devmeths->symbol); |
110 MAYBE_DEVMETH (d, mark_device, (d, markobj)); | 109 MAYBE_DEVMETH (d, mark_device, (d)); |
111 } | 110 } |
112 | 111 |
113 return (d->frame_list); | 112 return (d->frame_list); |
114 } | 113 } |
115 | 114 |
1248 DEFSUBR (Fdevice_baud_rate); | 1247 DEFSUBR (Fdevice_baud_rate); |
1249 DEFSUBR (Fdomain_device_type); | 1248 DEFSUBR (Fdomain_device_type); |
1250 | 1249 |
1251 defsymbol (&Qdevicep, "devicep"); | 1250 defsymbol (&Qdevicep, "devicep"); |
1252 defsymbol (&Qdevice_live_p, "device-live-p"); | 1251 defsymbol (&Qdevice_live_p, "device-live-p"); |
1253 defsymbol (&Qdelete_device, "delete-device"); | |
1254 | 1252 |
1255 defsymbol (&Qcreate_device_hook, "create-device-hook"); | 1253 defsymbol (&Qcreate_device_hook, "create-device-hook"); |
1256 defsymbol (&Qdelete_device_hook, "delete-device-hook"); | 1254 defsymbol (&Qdelete_device_hook, "delete-device-hook"); |
1257 | 1255 |
1258 /* Qcolor defined in general.c */ | 1256 /* Qcolor defined in general.c */ |
1297 defsymbol (&Qslow_device, "slow-device"); | 1295 defsymbol (&Qslow_device, "slow-device"); |
1298 defsymbol (&Qsecurity, "security"); | 1296 defsymbol (&Qsecurity, "security"); |
1299 } | 1297 } |
1300 | 1298 |
1301 void | 1299 void |
1300 reinit_vars_of_device (void) | |
1301 { | |
1302 staticpro_nodump (&Vdefault_device); | |
1303 Vdefault_device = Qnil; | |
1304 asynch_device_change_pending = 0; | |
1305 } | |
1306 | |
1307 void | |
1302 vars_of_device (void) | 1308 vars_of_device (void) |
1303 { | 1309 { |
1310 reinit_vars_of_device (); | |
1311 | |
1304 DEFVAR_LISP ("create-device-hook", &Vcreate_device_hook /* | 1312 DEFVAR_LISP ("create-device-hook", &Vcreate_device_hook /* |
1305 Function or functions to call when a device is created. | 1313 Function or functions to call when a device is created. |
1306 One argument, the newly-created device. | 1314 One argument, the newly-created device. |
1307 This is called after the first frame has been created, but before | 1315 This is called after the first frame has been created, but before |
1308 calling the `create-frame-hook'. | 1316 calling the `create-frame-hook'. |
1314 Function or functions to call when a device is deleted. | 1322 Function or functions to call when a device is deleted. |
1315 One argument, the to-be-deleted device. | 1323 One argument, the to-be-deleted device. |
1316 */ ); | 1324 */ ); |
1317 Vdelete_device_hook = Qnil; | 1325 Vdelete_device_hook = Qnil; |
1318 | 1326 |
1319 staticpro (&Vdefault_device); | |
1320 Vdefault_device = Qnil; | |
1321 | |
1322 asynch_device_change_pending = 0; | |
1323 | |
1324 Vdevice_class_list = list3 (Qcolor, Qgrayscale, Qmono); | 1327 Vdevice_class_list = list3 (Qcolor, Qgrayscale, Qmono); |
1325 staticpro (&Vdevice_class_list); | 1328 staticpro (&Vdevice_class_list); |
1326 | 1329 |
1327 /* Death to devices.el !!! */ | 1330 /* Death to devices.el !!! */ |
1328 Fprovide(intern("devices")); | 1331 Fprovide(intern("devices")); |