comparison lisp/x-mouse.el @ 442:abe6d1db359e r21-2-36

Import from CVS: tag r21-2-36
author cvs
date Mon, 13 Aug 2007 11:35:02 +0200
parents 3ecd8885ac67
children 576fb035e263
comparison
equal deleted inserted replaced
441:72a7cfa4a488 442:abe6d1db359e
98 (defun x-init-pointer-shape (device) 98 (defun x-init-pointer-shape (device)
99 "Initialize the mouse-pointers of DEVICE from the X resource database." 99 "Initialize the mouse-pointers of DEVICE from the X resource database."
100 (if x-pointers-initialized ; only do it when the first device is created 100 (if x-pointers-initialized ; only do it when the first device is created
101 nil 101 nil
102 (set-glyph-image text-pointer-glyph 102 (set-glyph-image text-pointer-glyph
103 (or (x-get-resource "textPointer" "Cursor" 'string device) 103 (or (x-get-resource "textPointer" "Cursor" 'string device nil 'warn)
104 "xterm")) 104 "xterm"))
105 (set-glyph-image selection-pointer-glyph 105 (set-glyph-image selection-pointer-glyph
106 (or (x-get-resource "selectionPointer" "Cursor" 'string device) 106 (or (x-get-resource "selectionPointer" "Cursor" 'string device
107 nil 'warn)
107 "top_left_arrow")) 108 "top_left_arrow"))
108 (set-glyph-image nontext-pointer-glyph 109 (set-glyph-image nontext-pointer-glyph
109 (or (x-get-resource "spacePointer" "Cursor" 'string device) 110 (or (x-get-resource "spacePointer" "Cursor" 'string device nil 'warn)
110 "xterm")) ; was "crosshair" 111 "xterm")) ; was "crosshair"
111 (set-glyph-image modeline-pointer-glyph 112 (set-glyph-image modeline-pointer-glyph
112 (or (x-get-resource "modeLinePointer" "Cursor" 'string device) 113 (or (x-get-resource "modeLinePointer" "Cursor" 'string device
114 nil 'warn)
113 ;; "fleur")) 115 ;; "fleur"))
114 "sb_v_double_arrow")) 116 "sb_v_double_arrow"))
115 (set-glyph-image gc-pointer-glyph 117 (set-glyph-image gc-pointer-glyph
116 (or (x-get-resource "gcPointer" "Cursor" 'string device) 118 (or (x-get-resource "gcPointer" "Cursor" 'string device nil 'warn)
117 "watch")) 119 "watch"))
118 (when (featurep 'scrollbar) 120 (when (featurep 'scrollbar)
119 (set-glyph-image 121 (set-glyph-image
120 scrollbar-pointer-glyph 122 scrollbar-pointer-glyph
121 (or (x-get-resource "scrollbarPointer" "Cursor" 'string device) 123 (or (x-get-resource "scrollbarPointer" "Cursor" 'string device
124 nil 'warn)
122 "top_left_arrow"))) 125 "top_left_arrow")))
123 (set-glyph-image busy-pointer-glyph 126 (set-glyph-image busy-pointer-glyph
124 (or (x-get-resource "busyPointer" "Cursor" 'string device) 127 (or (x-get-resource "busyPointer" "Cursor" 'string device nil 'warn)
125 "watch")) 128 "watch"))
126 (set-glyph-image toolbar-pointer-glyph 129 (set-glyph-image toolbar-pointer-glyph
127 (or (x-get-resource "toolBarPointer" "Cursor" 'string device) 130 (or (x-get-resource "toolBarPointer" "Cursor" 'string device
131 nil 'warn)
128 "left_ptr")) 132 "left_ptr"))
129 (set-glyph-image divider-pointer-glyph 133 (set-glyph-image divider-pointer-glyph
130 (or (x-get-resource "dividerPointer" "Cursor" 'string device) 134 (or (x-get-resource "dividerPointer" "Cursor" 'string device
135 nil 'warn)
131 "sb_h_double_arrow")) 136 "sb_h_double_arrow"))
132 (let ((fg 137 (let ((fg
133 (x-get-resource "pointerColor" "Foreground" 'string device))) 138 (x-get-resource "pointerColor" "Foreground" 'string device
139 nil 'warn)))
134 (and fg 140 (and fg
135 (set-face-foreground 'pointer fg))) 141 (set-face-foreground 'pointer fg)))
136 (let ((bg 142 (let ((bg
137 (x-get-resource "pointerBackground" "Background" 'string device))) 143 (x-get-resource "pointerBackground" "Background" 'string device
144 nil 'warn)))
138 (and bg 145 (and bg
139 (set-face-background 'pointer bg))) 146 (set-face-background 'pointer bg)))
140 (setq x-pointers-initialized t)) 147 (setq x-pointers-initialized t))
141 nil) 148 nil)
142 149