comparison src/device-tty.c @ 282:c42ec1d1cded r21-0b39

Import from CVS: tag r21-0b39
author cvs
date Mon, 13 Aug 2007 10:33:18 +0200
parents c5d627a313b1
children 558f606b08ae
comparison
equal deleted inserted replaced
281:090b52736db2 282:c42ec1d1cded
178 } 178 }
179 } 179 }
180 180
181 #endif /* SIGWINCH */ 181 #endif /* SIGWINCH */
182 182
183 static int 183 static Lisp_Object
184 tty_device_pixel_width (struct device *d) 184 tty_device_system_metrics (struct device *d,
185 enum device_metrics m)
185 { 186 {
186 struct console *con = XCONSOLE (DEVICE_CONSOLE (d)); 187 struct console *con = XCONSOLE (DEVICE_CONSOLE (d));
187 return CONSOLE_TTY_DATA (con)->width; 188 switch (m)
188 } 189 {
189 190 case size_device:
190 static int 191 return Fcons (make_int (CONSOLE_TTY_DATA (con)->width),
191 tty_device_pixel_height (struct device *d) 192 make_int (CONSOLE_TTY_DATA (con)->height));
192 { 193 break;
193 struct console *con = XCONSOLE (DEVICE_CONSOLE (d)); 194 }
194 return CONSOLE_TTY_DATA (con)->height; 195
195 } 196 /* Do not know such property */
196 197 return Qnil;
198 }
197 199
198 /************************************************************************/ 200 /************************************************************************/
199 /* initialization */ 201 /* initialization */
200 /************************************************************************/ 202 /************************************************************************/
201 203
213 CONSOLE_HAS_METHOD (tty, init_device); 215 CONSOLE_HAS_METHOD (tty, init_device);
214 CONSOLE_HAS_METHOD (tty, delete_device); 216 CONSOLE_HAS_METHOD (tty, delete_device);
215 #ifdef SIGWINCH 217 #ifdef SIGWINCH
216 CONSOLE_HAS_METHOD (tty, asynch_device_change); 218 CONSOLE_HAS_METHOD (tty, asynch_device_change);
217 #endif /* SIGWINCH */ 219 #endif /* SIGWINCH */
218 CONSOLE_HAS_METHOD (tty, device_pixel_width); 220 CONSOLE_HAS_METHOD (tty, device_system_metrics);
219 CONSOLE_HAS_METHOD (tty, device_pixel_height);
220 } 221 }
221 222
222 void 223 void
223 init_device_tty (void) 224 init_device_tty (void)
224 { 225 {