2003-03-10 21:47:38 -05:00
|
|
|
;; Copyright (c) 2001-2003 by Norbert Freudemann, David Frese
|
2001-09-20 10:41:01 -04:00
|
|
|
|
2003-03-10 21:47:38 -05:00
|
|
|
(define-record-type visual :visual
|
|
|
|
(make-visual cpointer)
|
|
|
|
visual?
|
|
|
|
(cpointer visual:cpointer))
|
2001-09-20 10:41:01 -04:00
|
|
|
|
2003-03-10 21:47:38 -05:00
|
|
|
(define-exported-binding "scx-visual" :visual)
|
2002-02-08 12:09:43 -05:00
|
|
|
|
|
|
|
(define-enumerated-type visual-class :visual-class
|
2003-03-10 21:47:38 -05:00
|
|
|
visual-class? visual-classes visual-class-name visual-class-index
|
2002-02-08 12:09:43 -05:00
|
|
|
(static-gray gray-scale static-color pseudo-color true-color direct-color))
|
|
|
|
|
2003-03-10 21:47:38 -05:00
|
|
|
(define-exported-binding "scx-visual-class" :visual-class)
|
|
|
|
(define-exported-binding "scx-visual-classes" visual-classes)
|
2002-02-08 12:09:43 -05:00
|
|
|
|
2003-03-10 21:47:38 -05:00
|
|
|
(define-record-type visual-info :visual-info
|
|
|
|
(make-visual-info visual visualid screen-number depth class red-mask
|
|
|
|
green-mask blue-mask colormap-size bits-per-rgb)
|
|
|
|
visual-info?
|
|
|
|
(visual visual-info:visual)
|
|
|
|
(visualid visual-info:visualid set-visual-info:visualid!)
|
|
|
|
(screen-number visual-info:screen-number set-visual-info:screen-number!)
|
|
|
|
(depth visual-info:depth set-visual-info:depth!)
|
|
|
|
(class visual-info:class set-visual-info:class!)
|
|
|
|
(red-mask visual-info:red-mask set-visual-info:red-mask!)
|
|
|
|
(green-mask visual-info:green-mask set-visual-info:green-mask!)
|
|
|
|
(blue-mask visual-info:blue-mask set-visual-info:blue-mask!)
|
|
|
|
(bits-per-rgb visual-info:bits-per-rgb set-visual-info:bits-per-rgb!)
|
|
|
|
(colormap-size visual-info:colormap-size set-visual-info:colormap-size!))
|
|
|
|
|
|
|
|
(define-exported-binding "scx-visual-info" :visual-info)
|
|
|
|
|
|
|
|
(define (empty-visual-info)
|
|
|
|
(make-visual #f #f #f #f #f #f #f #f #f #f))
|
|
|
|
|
|
|
|
;; *** obtain visual information *************************************
|
|
|
|
|
|
|
|
;; returns a list of visual-infos that match the visual-info
|
|
|
|
;; template. #f entries in the template are ignored. Use
|
|
|
|
;; (empty-visual-info) to create a visual-info with all entries set to
|
|
|
|
;; #f.
|
2003-05-01 17:05:33 -04:00
|
|
|
(import-xlib-function get-visual-infos (display template)
|
2003-03-10 21:47:38 -05:00
|
|
|
"scx_Get_Visual_Info")
|
2002-02-08 12:09:43 -05:00
|
|
|
|
2003-03-10 21:47:38 -05:00
|
|
|
;; returns a visual-info or #f
|
2003-05-01 17:05:33 -04:00
|
|
|
(import-xlib-function match-visual-info (display screen-number depth class)
|
2003-03-10 21:47:38 -05:00
|
|
|
"scx_Match_Visual_Info")
|
2002-02-08 12:09:43 -05:00
|
|
|
|
2003-03-10 21:47:38 -05:00
|
|
|
(import-lambda-definition visualid-from-visual (visual)
|
|
|
|
"scx_VisualIDFromVisual")
|