Mercurial > hg > xemacs-beta
comparison src/device-x.c @ 282:c42ec1d1cded r21-0b39
Import from CVS: tag r21-0b39
author | cvs |
---|---|
date | Mon, 13 Aug 2007 10:33:18 +0200 |
parents | 7df0dd720c89 |
children | 558f606b08ae |
comparison
equal
deleted
inserted
replaced
281:090b52736db2 | 282:c42ec1d1cded |
---|---|
95 {"-fontset", "*FontSet", XrmoptionSepArg, NULL}, | 95 {"-fontset", "*FontSet", XrmoptionSepArg, NULL}, |
96 }; | 96 }; |
97 | 97 |
98 /* Functions to synchronize mirroring resources and specifiers */ | 98 /* Functions to synchronize mirroring resources and specifiers */ |
99 int in_resource_setting; | 99 int in_resource_setting; |
100 int in_specifier_change_function; | |
101 | |
102 | 100 |
103 /************************************************************************/ | 101 /************************************************************************/ |
104 /* helper functions */ | 102 /* helper functions */ |
105 /************************************************************************/ | 103 /************************************************************************/ |
106 | 104 |
1395 (device)) | 1393 (device)) |
1396 { | 1394 { |
1397 return make_int (DEVICE_X_DEPTH (decode_x_device (device))); | 1395 return make_int (DEVICE_X_DEPTH (decode_x_device (device))); |
1398 } | 1396 } |
1399 | 1397 |
1400 static int | 1398 static Lisp_Object |
1401 x_device_pixel_width (struct device *d) | 1399 x_device_system_metrics (struct device *d, |
1400 enum device_metrics m) | |
1402 { | 1401 { |
1403 Display *dpy = DEVICE_X_DISPLAY (d); | 1402 Display *dpy = DEVICE_X_DISPLAY (d); |
1404 | 1403 |
1405 return DisplayWidth (dpy, DefaultScreen (dpy)); | 1404 switch (m) |
1406 } | 1405 { |
1407 | 1406 case size_device: |
1408 static int | 1407 return Fcons (make_int (DisplayWidth (dpy, DefaultScreen (dpy))), |
1409 x_device_pixel_height (struct device *d) | 1408 make_int (DisplayHeight (dpy, DefaultScreen (dpy)))); |
1410 { | 1409 break; |
1411 Display *dpy = DEVICE_X_DISPLAY (d); | 1410 case size_device_mm: |
1412 | 1411 return Fcons (make_int (DisplayWidthMM (dpy, DefaultScreen (dpy))), |
1413 return DisplayHeight (dpy, DefaultScreen (dpy)); | 1412 make_int (DisplayHeightMM (dpy, DefaultScreen (dpy)))); |
1414 } | 1413 break; |
1415 | 1414 case num_bit_planes: |
1416 static int | 1415 return make_int (DisplayPlanes (dpy, DefaultScreen (dpy))); |
1417 x_device_mm_width (struct device *d) | 1416 break; |
1418 { | 1417 case num_color_cells: |
1419 Display *dpy = DEVICE_X_DISPLAY (d); | 1418 return make_int (DisplayCells (dpy, DefaultScreen (dpy))); |
1420 | 1419 break; |
1421 return DisplayWidthMM (dpy, DefaultScreen (dpy)); | 1420 } |
1422 } | 1421 |
1423 | 1422 /* Do not know such property */ |
1424 static int | 1423 return Qnil; |
1425 x_device_mm_height (struct device *d) | |
1426 { | |
1427 Display *dpy = DEVICE_X_DISPLAY (d); | |
1428 | |
1429 return DisplayHeightMM (dpy, DefaultScreen (dpy)); | |
1430 } | |
1431 | |
1432 static int | |
1433 x_device_bitplanes (struct device *d) | |
1434 { | |
1435 Display *dpy = DEVICE_X_DISPLAY (d); | |
1436 | |
1437 return DisplayPlanes (dpy, DefaultScreen (dpy)); | |
1438 } | |
1439 | |
1440 static int | |
1441 x_device_color_cells (struct device *d) | |
1442 { | |
1443 Display *dpy = DEVICE_X_DISPLAY (d); | |
1444 | |
1445 return DisplayCells (dpy, DefaultScreen (dpy)); | |
1446 } | 1424 } |
1447 | 1425 |
1448 DEFUN ("x-server-vendor", Fx_server_vendor, 0, 1, 0, /* | 1426 DEFUN ("x-server-vendor", Fx_server_vendor, 0, 1, 0, /* |
1449 Return the vendor ID string of the X server `device' on. | 1427 Return the vendor ID string of the X server `device' on. |
1450 */ | 1428 */ |
1711 { | 1689 { |
1712 CONSOLE_HAS_METHOD (x, init_device); | 1690 CONSOLE_HAS_METHOD (x, init_device); |
1713 CONSOLE_HAS_METHOD (x, finish_init_device); | 1691 CONSOLE_HAS_METHOD (x, finish_init_device); |
1714 CONSOLE_HAS_METHOD (x, mark_device); | 1692 CONSOLE_HAS_METHOD (x, mark_device); |
1715 CONSOLE_HAS_METHOD (x, delete_device); | 1693 CONSOLE_HAS_METHOD (x, delete_device); |
1716 CONSOLE_HAS_METHOD (x, device_pixel_width); | 1694 CONSOLE_HAS_METHOD (x, device_system_metrics); |
1717 CONSOLE_HAS_METHOD (x, device_pixel_height); | |
1718 CONSOLE_HAS_METHOD (x, device_mm_width); | |
1719 CONSOLE_HAS_METHOD (x, device_mm_height); | |
1720 CONSOLE_HAS_METHOD (x, device_bitplanes); | |
1721 CONSOLE_HAS_METHOD (x, device_color_cells); | |
1722 | 1695 |
1723 { | 1696 { |
1724 /* Initialize variables to speed up X resource interactions */ | 1697 /* Initialize variables to speed up X resource interactions */ |
1725 CONST char *valid_resource_chars = | 1698 CONST char *valid_resource_chars = |
1726 "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_"; | 1699 "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_"; |
1788 | 1761 |
1789 error_expected = 0; | 1762 error_expected = 0; |
1790 error_occurred = 0; | 1763 error_occurred = 0; |
1791 | 1764 |
1792 in_resource_setting = 0; | 1765 in_resource_setting = 0; |
1793 in_specifier_change_function = 0; | 1766 } |
1794 } |