annotate tests/gutter-test.el @ 5624:c39052c921b5

New "foreback" face property. -------------------- ChangeLog entries follow: -------------------- lisp/ChangeLog addition: 2011-12-27 Didier Verna <didier@xemacs.org> * cl-macs.el (face-foreback): New defsetf. * faces.el (set-face-property): Document the foreback property. * faces.el (face-foreback): * faces.el (face-foreback-instance): * faces.el (face-foreback-name): * faces.el (set-face-foreback): New functions. * faces.el (face-equal): * faces.el (init-other-random-faces): * cus-face.el (custom-face-attributes): * x-faces.el (x-init-face-from-resources): Handle the foreback property. src/ChangeLog addition: 2011-12-27 Didier Verna <didier@xemacs.org> * faces.h (struct Lisp_Face): New 'foreback slot. * faces.h (struct face_cachel): New 'foreback and 'foreback_specified slots. * faces.h (WINDOW_FACE_CACHEL_FOREBACK): * faces.h (FACE_FOREBACK): New macros. * faces.c: Declare Qforeback. * lisp.h: Externalize it. * faces.c (syms_of_faces): Define it. * faces.c (vars_of_faces): Update built-in face specifiers. * faces.c (complex_vars_of_faces): Update specifier fallbacks. * faces.c (mark_face): * faces.c (face_equal): * faces.c (face_getprop): * faces.c (face_putprop): * faces.c (face_remprop): * faces.c (face_plist): * faces.c (reset_face): * faces.c (update_face_inheritance_mapper): * faces.c (Fmake_face): * faces.c (mark_face_cachels): * faces.c (update_face_cachel_data): * faces.c (merge_face_cachel_data): * faces.c (reset_face_cachel): * faces.c (face_property_was_changed): * faces.c (Fcopy_face): * fontcolor.c (face_color_validate): Handle the foreback property. * redisplay-msw.c (mswindows_output_blank): * redisplay-msw.c (mswindows_output_string): * redisplay-output.c (redisplay_clear_region): * redisplay-xlike-inc.c (XLIKE_output_string): * redisplay-xlike-inc.c (XLIKE_output_blank): Use the face's foreback color instead of the foreground one for drawing a background bitmap.
author Didier Verna <didier@xemacs.org>
date Tue, 27 Dec 2011 17:07:23 +0100
parents 308d34e9f07d
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
4781
8a653fbe5c27 Add copyright and GPL v2 or later notices to Andy Piper's contributions, with
Jerry James <james@xemacs.org>
parents: 863
diff changeset
1 ;;; Copyright (C) 1998 Andy Piper
8a653fbe5c27 Add copyright and GPL v2 or later notices to Andy Piper's contributions, with
Jerry James <james@xemacs.org>
parents: 863
diff changeset
2
5402
308d34e9f07d Changed bulk of GPLv2 or later files identified by script
Mats Lidell <matsl@xemacs.org>
parents: 4781
diff changeset
3 ;; This file is part of XEmacs.
308d34e9f07d Changed bulk of GPLv2 or later files identified by script
Mats Lidell <matsl@xemacs.org>
parents: 4781
diff changeset
4 ;;
308d34e9f07d Changed bulk of GPLv2 or later files identified by script
Mats Lidell <matsl@xemacs.org>
parents: 4781
diff changeset
5 ;; XEmacs is free software: you can redistribute it and/or modify it
308d34e9f07d Changed bulk of GPLv2 or later files identified by script
Mats Lidell <matsl@xemacs.org>
parents: 4781
diff changeset
6 ;; under the terms of the GNU General Public License as published by the
308d34e9f07d Changed bulk of GPLv2 or later files identified by script
Mats Lidell <matsl@xemacs.org>
parents: 4781
diff changeset
7 ;; Free Software Foundation, either version 3 of the License, or (at your
308d34e9f07d Changed bulk of GPLv2 or later files identified by script
Mats Lidell <matsl@xemacs.org>
parents: 4781
diff changeset
8 ;; option) any later version.
308d34e9f07d Changed bulk of GPLv2 or later files identified by script
Mats Lidell <matsl@xemacs.org>
parents: 4781
diff changeset
9 ;;
308d34e9f07d Changed bulk of GPLv2 or later files identified by script
Mats Lidell <matsl@xemacs.org>
parents: 4781
diff changeset
10 ;; XEmacs is distributed in the hope that it will be useful, but WITHOUT
308d34e9f07d Changed bulk of GPLv2 or later files identified by script
Mats Lidell <matsl@xemacs.org>
parents: 4781
diff changeset
11 ;; ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
308d34e9f07d Changed bulk of GPLv2 or later files identified by script
Mats Lidell <matsl@xemacs.org>
parents: 4781
diff changeset
12 ;; FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
308d34e9f07d Changed bulk of GPLv2 or later files identified by script
Mats Lidell <matsl@xemacs.org>
parents: 4781
diff changeset
13 ;; for more details.
308d34e9f07d Changed bulk of GPLv2 or later files identified by script
Mats Lidell <matsl@xemacs.org>
parents: 4781
diff changeset
14 ;;
308d34e9f07d Changed bulk of GPLv2 or later files identified by script
Mats Lidell <matsl@xemacs.org>
parents: 4781
diff changeset
15 ;; You should have received a copy of the GNU General Public License
308d34e9f07d Changed bulk of GPLv2 or later files identified by script
Mats Lidell <matsl@xemacs.org>
parents: 4781
diff changeset
16 ;; along with XEmacs. If not, see <http://www.gnu.org/licenses/>.
4781
8a653fbe5c27 Add copyright and GPL v2 or later notices to Andy Piper's contributions, with
Jerry James <james@xemacs.org>
parents: 863
diff changeset
17
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 398
diff changeset
18 (setq str "Hello\nAgain")
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 398
diff changeset
19 (setq str-ext (make-extent 0 5 str))
398
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
20 (set-extent-begin-glyph
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 398
diff changeset
21 str-ext
398
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
22 (make-glyph [xpm :file "../etc/xemacs-icon.xpm"]))
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 398
diff changeset
23 (set-extent-property str-ext 'mouse-face 'highlight)
398
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
24
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 398
diff changeset
25 (setq str2 "Hello\n")
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 398
diff changeset
26 (setq str2-ext (make-extent 0 1 str2))
398
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
27 (set-extent-begin-glyph
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 398
diff changeset
28 str2-ext
398
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
29 (make-glyph
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
30 [button :width 5 :height 1
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
31 :face modeline-mousable
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 398
diff changeset
32 :callback (set-specifier bottom-gutter-visible-p '(str2))
398
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
33 :descriptor "ok" :selected t]))
74fd4e045ea6 Import from CVS: tag r21-2-29
cvs
parents:
diff changeset
34
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 398
diff changeset
35 (set-specifier bottom-gutter-height 'autodetect)
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 398
diff changeset
36 (set-specifier bottom-gutter-border-width 2)
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 398
diff changeset
37
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 398
diff changeset
38 (set-gutter-element
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 398
diff changeset
39 bottom-gutter 'str
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 398
diff changeset
40 (make-glyph
863
42375619fa45 [xemacs-hg @ 2002-06-04 06:03:59 by andyp]
andyp
parents: 442
diff changeset
41 [layout :orientation vertical :margin-width 4
42375619fa45 [xemacs-hg @ 2002-06-04 06:03:59 by andyp]
andyp
parents: 442
diff changeset
42 :vertically-justify center :horizontally-justify left
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 398
diff changeset
43 :items ([string :data "Fontifying glyphs.c..."]
863
42375619fa45 [xemacs-hg @ 2002-06-04 06:03:59 by andyp]
andyp
parents: 442
diff changeset
44 [layout :orientation horizontal
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 398
diff changeset
45 :items
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 398
diff changeset
46 ([progress-gauge :value 0 :pixel-height 24
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 398
diff changeset
47 :pixel-width 250 :descriptor
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 398
diff changeset
48 "Progress"]
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 398
diff changeset
49 [button :pixel-height 24
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 398
diff changeset
50 :descriptor " Stop "
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 398
diff changeset
51 :callback (quote quit)])])]))
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 398
diff changeset
52
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 398
diff changeset
53 (set-gutter-element-visible-p bottom-gutter-visible-p 'str t)
863
42375619fa45 [xemacs-hg @ 2002-06-04 06:03:59 by andyp]
andyp
parents: 442
diff changeset
54 (set-gutter-element left-gutter 'str2 str2)
42375619fa45 [xemacs-hg @ 2002-06-04 06:03:59 by andyp]
andyp
parents: 442
diff changeset
55 (set-gutter-element-visible-p left-gutter-visible-p 'str2 t)
442
abe6d1db359e Import from CVS: tag r21-2-36
cvs
parents: 398
diff changeset
56