| | 498 | ;;; Inspect Device Capability/Intrinsic Facilities |
|---|
| | 499 | ;;; Emulation layer for functions of xfuns.c |
|---|
| | 500 | |
|---|
| | 501 | (defsubst mw32-emulate-x-display-argument (display) |
|---|
| | 502 | (cond ((stringp display) nil) |
|---|
| | 503 | ((framep display) display) |
|---|
| | 504 | ((null display) display) |
|---|
| | 505 | (t |
|---|
| | 506 | (error "%S must be STRING or FRAME" display)))) |
|---|
| | 507 | |
|---|
| | 508 | (defun x-display-pixel-width (display) |
|---|
| | 509 | (mw32-get-device-capability |
|---|
| | 510 | 'width |
|---|
| | 511 | (mw32-emulate-x-display-argument display))) |
|---|
| | 512 | (defun x-display-pixel-height (display) |
|---|
| | 513 | (mw32-get-device-capability |
|---|
| | 514 | 'height |
|---|
| | 515 | (mw32-emulate-x-display-argument display))) |
|---|
| | 516 | (defun x-display-pixel-planes (display) |
|---|
| | 517 | (mw32-get-device-capability |
|---|
| | 518 | ;; Notice that the meaning of "PLANES" in X are different |
|---|
| | 519 | ;; from that in Windows. |
|---|
| | 520 | 'color-bits |
|---|
| | 521 | (mw32-emulate-x-display-argument display))) |
|---|
| | 522 | (defun x-display-mm-height (display) |
|---|
| | 523 | (mw32-get-device-capability |
|---|
| | 524 | 'height-in-mm |
|---|
| | 525 | (mw32-emulate-x-display-argument display))) |
|---|
| | 526 | (defun x-display-mm-width (display) |
|---|
| | 527 | (mw32-get-device-capability |
|---|
| | 528 | 'width-in-mm |
|---|
| | 529 | (mw32-emulate-x-display-argument display))) |
|---|
| | 530 | (defun x-display-visual-class (display) |
|---|
| | 531 | (let ((c (x-display-pixel-planes display)) |
|---|
| | 532 | (n (mw32-get-device-capability |
|---|
| | 533 | 'colors))) |
|---|
| | 534 | (cond ((= n full) 'true-color) |
|---|
| | 535 | ((= n 1) 'static-gray) |
|---|
| | 536 | ((> c (log c n)) 'pseudo-color) |
|---|
| | 537 | (t 'static-color)))) |
|---|
| | 538 | |
|---|
| | 539 | ;; dummy vals. |
|---|
| | 540 | (defun x-server-max-request-size (display) 65535) |
|---|
| | 541 | (defun x-server-vendor (display) "MW32") |
|---|
| | 542 | (defun x-server-version (display) (list 11 0 1)) |
|---|
| | 543 | ;; We should use multi-monitor APIs in the future. |
|---|
| | 544 | (defun x-display-screens (display) 1) |
|---|
| | 545 | (defun x-display-backing-store (display) 'not-useful) |
|---|
| | 546 | (defun x-display-save-under (display) nil) |
|---|
| | 547 | |
|---|
| | 548 | ;;; |
|---|