Mercurial > hg > xemacs-beta
comparison src/device-x.c @ 288:e11d67e05968 r21-0b42
Import from CVS: tag r21-0b42
author | cvs |
---|---|
date | Mon, 13 Aug 2007 10:35:54 +0200 |
parents | 558f606b08ae |
children | 54f7aa390f4f |
comparison
equal
deleted
inserted
replaced
287:13a0bd77a29d | 288:e11d67e05968 |
---|---|
1363 { | 1363 { |
1364 return Vdefault_x_device; | 1364 return Vdefault_x_device; |
1365 } | 1365 } |
1366 | 1366 |
1367 DEFUN ("x-display-visual-class", Fx_display_visual_class, 0, 1, 0, /* | 1367 DEFUN ("x-display-visual-class", Fx_display_visual_class, 0, 1, 0, /* |
1368 Return the visual class of the X display `device' is using. | 1368 Return the visual class of the X display DEVICE is using. |
1369 This can be altered from the default at startup using the XResource "EmacsVisual". | 1369 This can be altered from the default at startup using the XResource "EmacsVisual". |
1370 The returned value will be one of the symbols `static-gray', `gray-scale', | 1370 The returned value will be one of the symbols `static-gray', `gray-scale', |
1371 `static-color', `pseudo-color', `true-color', or `direct-color'. | 1371 `static-color', `pseudo-color', `true-color', or `direct-color'. |
1372 */ | 1372 */ |
1373 (device)) | 1373 (device)) |
1386 return Qnil; /* suppress compiler warning */ | 1386 return Qnil; /* suppress compiler warning */ |
1387 } | 1387 } |
1388 } | 1388 } |
1389 | 1389 |
1390 DEFUN ("x-display-visual-depth", Fx_display_visual_depth, 0, 1, 0, /* | 1390 DEFUN ("x-display-visual-depth", Fx_display_visual_depth, 0, 1, 0, /* |
1391 Return the bitplane depth of the visual the X display `device' is using. | 1391 Return the bitplane depth of the visual the X display DEVICE is using. |
1392 */ | 1392 */ |
1393 (device)) | 1393 (device)) |
1394 { | 1394 { |
1395 return make_int (DEVICE_X_DEPTH (decode_x_device (device))); | 1395 return make_int (DEVICE_X_DEPTH (decode_x_device (device))); |
1396 } | 1396 } |
1404 switch (m) | 1404 switch (m) |
1405 { | 1405 { |
1406 case DM_size_device: | 1406 case DM_size_device: |
1407 return Fcons (make_int (DisplayWidth (dpy, DefaultScreen (dpy))), | 1407 return Fcons (make_int (DisplayWidth (dpy, DefaultScreen (dpy))), |
1408 make_int (DisplayHeight (dpy, DefaultScreen (dpy)))); | 1408 make_int (DisplayHeight (dpy, DefaultScreen (dpy)))); |
1409 break; | |
1410 case DM_size_device_mm: | 1409 case DM_size_device_mm: |
1411 return Fcons (make_int (DisplayWidthMM (dpy, DefaultScreen (dpy))), | 1410 return Fcons (make_int (DisplayWidthMM (dpy, DefaultScreen (dpy))), |
1412 make_int (DisplayHeightMM (dpy, DefaultScreen (dpy)))); | 1411 make_int (DisplayHeightMM (dpy, DefaultScreen (dpy)))); |
1413 break; | |
1414 case DM_num_bit_planes: | 1412 case DM_num_bit_planes: |
1415 return make_int (DisplayPlanes (dpy, DefaultScreen (dpy))); | 1413 return make_int (DisplayPlanes (dpy, DefaultScreen (dpy))); |
1416 break; | |
1417 case DM_num_color_cells: | 1414 case DM_num_color_cells: |
1418 return make_int (DisplayCells (dpy, DefaultScreen (dpy))); | 1415 return make_int (DisplayCells (dpy, DefaultScreen (dpy))); |
1419 break; | 1416 default: /* No such device metric property for X devices */ |
1420 } | 1417 return Qunbound; |
1421 | 1418 } |
1422 /* Do not know such property */ | |
1423 return Qunbound; | |
1424 } | 1419 } |
1425 | 1420 |
1426 DEFUN ("x-server-vendor", Fx_server_vendor, 0, 1, 0, /* | 1421 DEFUN ("x-server-vendor", Fx_server_vendor, 0, 1, 0, /* |
1427 Return the vendor ID string of the X server `device' on. | 1422 Return the vendor ID string of the X server DEVICE is on. |
1423 Return the empty string if the vendor ID string cannot be determined. | |
1428 */ | 1424 */ |
1429 (device)) | 1425 (device)) |
1430 { | 1426 { |
1431 Display *dpy = get_x_display (device); | 1427 Display *dpy = get_x_display (device); |
1432 char *vendor = ServerVendor (dpy); | 1428 char *vendor = ServerVendor (dpy); |
1433 | 1429 |
1434 return build_string (vendor ? vendor : ""); | 1430 return build_string (vendor ? vendor : ""); |
1435 } | 1431 } |
1436 | 1432 |
1437 DEFUN ("x-server-version", Fx_server_version, 0, 1, 0, /* | 1433 DEFUN ("x-server-version", Fx_server_version, 0, 1, 0, /* |
1438 Return the version numbers of the X server `device' is on. | 1434 Return the version numbers of the X server DEVICE is on. |
1439 The returned value is a list of three integers: the major and minor | 1435 The returned value is a list of three integers: the major and minor |
1440 version numbers of the X Protocol in use, and the vendor-specific release | 1436 version numbers of the X Protocol in use, and the vendor-specific release |
1441 number. See also `x-server-vendor'. | 1437 number. See also `x-server-vendor'. |
1442 */ | 1438 */ |
1443 (device)) | 1439 (device)) |
1737 just reside in C. | 1733 just reside in C. |
1738 */ ); | 1734 */ ); |
1739 Vx_initial_argv_list = Qnil; | 1735 Vx_initial_argv_list = Qnil; |
1740 | 1736 |
1741 DEFVAR_BOOL ("x-seppuku-on-epipe", &x_seppuku_on_epipe /* | 1737 DEFVAR_BOOL ("x-seppuku-on-epipe", &x_seppuku_on_epipe /* |
1742 When non-nil terminate XEmacs immediately on SIGPIPE from the X server. | 1738 When non-nil, terminate XEmacs immediately on SIGPIPE from the X server. |
1743 XEmacs doesn't terminate properly on some systems. | 1739 XEmacs doesn't terminate properly on some systems. |
1744 When this variable is non-nil, XEmacs will commit immediate suicide | 1740 When this variable is non-nil, XEmacs will commit immediate suicide |
1745 when it gets a sigpipe from the X Server. | 1741 when it gets a sigpipe from the X Server. |
1746 */ ); | 1742 */ ); |
1747 x_seppuku_on_epipe = 0; | 1743 x_seppuku_on_epipe = 0; |