Mercurial > hg > xemacs-beta
diff 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 |
line wrap: on
line diff
--- a/src/device-tty.c Mon Aug 13 10:32:23 2007 +0200 +++ b/src/device-tty.c Mon Aug 13 10:33:18 2007 +0200 @@ -180,20 +180,22 @@ #endif /* SIGWINCH */ -static int -tty_device_pixel_width (struct device *d) +static Lisp_Object +tty_device_system_metrics (struct device *d, + enum device_metrics m) { struct console *con = XCONSOLE (DEVICE_CONSOLE (d)); - return CONSOLE_TTY_DATA (con)->width; -} + switch (m) + { + case size_device: + return Fcons (make_int (CONSOLE_TTY_DATA (con)->width), + make_int (CONSOLE_TTY_DATA (con)->height)); + break; + } -static int -tty_device_pixel_height (struct device *d) -{ - struct console *con = XCONSOLE (DEVICE_CONSOLE (d)); - return CONSOLE_TTY_DATA (con)->height; + /* Do not know such property */ + return Qnil; } - /************************************************************************/ /* initialization */ @@ -215,8 +217,7 @@ #ifdef SIGWINCH CONSOLE_HAS_METHOD (tty, asynch_device_change); #endif /* SIGWINCH */ - CONSOLE_HAS_METHOD (tty, device_pixel_width); - CONSOLE_HAS_METHOD (tty, device_pixel_height); + CONSOLE_HAS_METHOD (tty, device_system_metrics); } void