Mercurial > emacs
annotate src/fringe.c @ 68162:0d459faeff1a
Update copyright year.
author | Masatake YAMATO <jet@gyve.org> |
---|---|
date | Fri, 13 Jan 2006 05:22:10 +0000 |
parents | cf3d316b4bc0 |
children | 3bd95f4f2941 693e794b57bf 7beb78bc1f8e |
rev | line source |
---|---|
53879
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1 /* Fringe handling (split from xdisp.c). |
64770
a0d1312ede66
Update years in copyright notice; nfc.
Thien-Thi Nguyen <ttn@gnuvola.org>
parents:
64084
diff
changeset
|
2 Copyright (C) 1985, 1986, 1987, 1988, 1993, 1994, 1995, 1997, |
a0d1312ede66
Update years in copyright notice; nfc.
Thien-Thi Nguyen <ttn@gnuvola.org>
parents:
64084
diff
changeset
|
3 1998, 1999, 2000, 2000, 2001, 2002, 2003, 2004, |
a0d1312ede66
Update years in copyright notice; nfc.
Thien-Thi Nguyen <ttn@gnuvola.org>
parents:
64084
diff
changeset
|
4 2005 Free Software Foundation, Inc. |
53879
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
5 |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
6 This file is part of GNU Emacs. |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
7 |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
8 GNU Emacs is free software; you can redistribute it and/or modify |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
9 it under the terms of the GNU General Public License as published by |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
10 the Free Software Foundation; either version 2, or (at your option) |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
11 any later version. |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
12 |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
13 GNU Emacs is distributed in the hope that it will be useful, |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
14 but WITHOUT ANY WARRANTY; without even the implied warranty of |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
16 GNU General Public License for more details. |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
17 |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
18 You should have received a copy of the GNU General Public License |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
19 along with GNU Emacs; see the file COPYING. If not, write to |
64084 | 20 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, |
21 Boston, MA 02110-1301, USA. */ | |
53879
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
22 |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
23 #include <config.h> |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
24 #include <stdio.h> |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
25 |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
26 #include "lisp.h" |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
27 #include "frame.h" |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
28 #include "window.h" |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
29 #include "dispextern.h" |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
30 #include "buffer.h" |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
31 #include "blockinput.h" |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
32 |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
33 #ifdef HAVE_WINDOW_SYSTEM |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
34 |
57258
36eef73e00fa
(Vfringe_bitmaps): New variable.
Kim F. Storm <storm@cua.dk>
parents:
57246
diff
changeset
|
35 extern Lisp_Object Qfringe; |
53879
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
36 extern Lisp_Object Qtop, Qbottom, Qcenter; |
57246
36ab9b017a42
(update_window_fringes): Handle new formats of
Kim F. Storm <storm@cua.dk>
parents:
54230
diff
changeset
|
37 extern Lisp_Object Qup, Qdown, Qleft, Qright; |
53879
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
38 |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
39 /* Non-nil means that newline may flow into the right fringe. */ |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
40 |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
41 Lisp_Object Voverflow_newline_into_fringe; |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
42 |
57258
36eef73e00fa
(Vfringe_bitmaps): New variable.
Kim F. Storm <storm@cua.dk>
parents:
57246
diff
changeset
|
43 /* List of known fringe bitmap symbols. |
36eef73e00fa
(Vfringe_bitmaps): New variable.
Kim F. Storm <storm@cua.dk>
parents:
57246
diff
changeset
|
44 |
36eef73e00fa
(Vfringe_bitmaps): New variable.
Kim F. Storm <storm@cua.dk>
parents:
57246
diff
changeset
|
45 The fringe bitmap number is stored in the `fringe' property on |
36eef73e00fa
(Vfringe_bitmaps): New variable.
Kim F. Storm <storm@cua.dk>
parents:
57246
diff
changeset
|
46 those symbols. Names for the built-in bitmaps are installed by |
36eef73e00fa
(Vfringe_bitmaps): New variable.
Kim F. Storm <storm@cua.dk>
parents:
57246
diff
changeset
|
47 loading fringe.el. |
36eef73e00fa
(Vfringe_bitmaps): New variable.
Kim F. Storm <storm@cua.dk>
parents:
57246
diff
changeset
|
48 */ |
36eef73e00fa
(Vfringe_bitmaps): New variable.
Kim F. Storm <storm@cua.dk>
parents:
57246
diff
changeset
|
49 |
36eef73e00fa
(Vfringe_bitmaps): New variable.
Kim F. Storm <storm@cua.dk>
parents:
57246
diff
changeset
|
50 Lisp_Object Vfringe_bitmaps; |
53879
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
51 |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
52 enum fringe_bitmap_type |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
53 { |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
54 NO_FRINGE_BITMAP = 0, |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
55 UNDEF_FRINGE_BITMAP, |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
56 LEFT_TRUNCATION_BITMAP, |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
57 RIGHT_TRUNCATION_BITMAP, |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
58 UP_ARROW_BITMAP, |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
59 DOWN_ARROW_BITMAP, |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
60 CONTINUED_LINE_BITMAP, |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
61 CONTINUATION_LINE_BITMAP, |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
62 OVERLAY_ARROW_BITMAP, |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
63 TOP_LEFT_ANGLE_BITMAP, |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
64 TOP_RIGHT_ANGLE_BITMAP, |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
65 BOTTOM_LEFT_ANGLE_BITMAP, |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
66 BOTTOM_RIGHT_ANGLE_BITMAP, |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
67 LEFT_BRACKET_BITMAP, |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
68 RIGHT_BRACKET_BITMAP, |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
69 FILLED_BOX_CURSOR_BITMAP, |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
70 HOLLOW_BOX_CURSOR_BITMAP, |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
71 HOLLOW_SQUARE_BITMAP, |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
72 BAR_CURSOR_BITMAP, |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
73 HBAR_CURSOR_BITMAP, |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
74 ZV_LINE_BITMAP, |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
75 MAX_STANDARD_FRINGE_BITMAPS |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
76 }; |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
77 |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
78 enum fringe_bitmap_align |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
79 { |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
80 ALIGN_BITMAP_CENTER = 0, |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
81 ALIGN_BITMAP_TOP, |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
82 ALIGN_BITMAP_BOTTOM |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
83 }; |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
84 |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
85 struct fringe_bitmap |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
86 { |
53936
4dd0e0a7fd9e
(struct fringe_bitmap): Change member bits from char to
Kim F. Storm <storm@cua.dk>
parents:
53900
diff
changeset
|
87 unsigned short *bits; |
53879
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
88 unsigned height : 8; |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
89 unsigned width : 8; |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
90 unsigned period : 8; |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
91 unsigned align : 2; |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
92 unsigned dynamic : 1; |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
93 }; |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
94 |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
95 |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
96 /*********************************************************************** |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
97 Fringe bitmaps |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
98 ***********************************************************************/ |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
99 |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
100 /* Undefined bitmap. A question mark. */ |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
101 /* |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
102 ..xxxx.. |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
103 .xxxxxx. |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
104 xx....xx |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
105 xx....xx |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
106 ....xx.. |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
107 ...xx... |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
108 ...xx... |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
109 ........ |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
110 ...xx... |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
111 ...xx... |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
112 */ |
53936
4dd0e0a7fd9e
(struct fringe_bitmap): Change member bits from char to
Kim F. Storm <storm@cua.dk>
parents:
53900
diff
changeset
|
113 static unsigned short unknown_bits[] = { |
53879
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
114 0x3c, 0x7e, 0x7e, 0x0c, 0x18, 0x18, 0x00, 0x18, 0x18}; |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
115 |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
116 /* An arrow like this: `<-'. */ |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
117 /* |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
118 ...xx... |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
119 ..xx.... |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
120 .xx..... |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
121 xxxxxx.. |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
122 xxxxxx.. |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
123 .xx..... |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
124 ..xx.... |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
125 ...xx... |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
126 */ |
53936
4dd0e0a7fd9e
(struct fringe_bitmap): Change member bits from char to
Kim F. Storm <storm@cua.dk>
parents:
53900
diff
changeset
|
127 static unsigned short left_arrow_bits[] = { |
53879
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
128 0x18, 0x30, 0x60, 0xfc, 0xfc, 0x60, 0x30, 0x18}; |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
129 |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
130 |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
131 /* Right truncation arrow bitmap `->'. */ |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
132 /* |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
133 ...xx... |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
134 ....xx.. |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
135 .....xx. |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
136 ..xxxxxx |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
137 ..xxxxxx |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
138 .....xx. |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
139 ....xx.. |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
140 ...xx... |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
141 */ |
53936
4dd0e0a7fd9e
(struct fringe_bitmap): Change member bits from char to
Kim F. Storm <storm@cua.dk>
parents:
53900
diff
changeset
|
142 static unsigned short right_arrow_bits[] = { |
53879
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
143 0x18, 0x0c, 0x06, 0x3f, 0x3f, 0x06, 0x0c, 0x18}; |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
144 |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
145 |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
146 /* Up arrow bitmap. */ |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
147 /* |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
148 ...xx... |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
149 ..xxxx.. |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
150 .xxxxxx. |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
151 xxxxxxxx |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
152 ...xx... |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
153 ...xx... |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
154 ...xx... |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
155 ...xx... |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
156 */ |
53936
4dd0e0a7fd9e
(struct fringe_bitmap): Change member bits from char to
Kim F. Storm <storm@cua.dk>
parents:
53900
diff
changeset
|
157 static unsigned short up_arrow_bits[] = { |
53879
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
158 0x18, 0x3c, 0x7e, 0xff, 0x18, 0x18, 0x18, 0x18}; |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
159 |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
160 |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
161 /* Down arrow bitmap. */ |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
162 /* |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
163 ...xx... |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
164 ...xx... |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
165 ...xx... |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
166 ...xx... |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
167 xxxxxxxx |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
168 .xxxxxx. |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
169 ..xxxx.. |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
170 ...xx... |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
171 */ |
53936
4dd0e0a7fd9e
(struct fringe_bitmap): Change member bits from char to
Kim F. Storm <storm@cua.dk>
parents:
53900
diff
changeset
|
172 static unsigned short down_arrow_bits[] = { |
53879
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
173 0x18, 0x18, 0x18, 0x18, 0xff, 0x7e, 0x3c, 0x18}; |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
174 |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
175 /* Marker for continued lines. */ |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
176 /* |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
177 ..xxxx.. |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
178 ..xxxxx. |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
179 ......xx |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
180 ..x..xxx |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
181 ..xxxxxx |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
182 ..xxxxx. |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
183 ..xxxx.. |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
184 ..xxxxx. |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
185 */ |
53936
4dd0e0a7fd9e
(struct fringe_bitmap): Change member bits from char to
Kim F. Storm <storm@cua.dk>
parents:
53900
diff
changeset
|
186 static unsigned short continued_bits[] = { |
53879
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
187 0x3c, 0x3e, 0x03, 0x27, 0x3f, 0x3e, 0x3c, 0x3e}; |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
188 |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
189 /* Marker for continuation lines. */ |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
190 /* |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
191 ..xxxx.. |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
192 .xxxxx.. |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
193 xx...... |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
194 xxx..x.. |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
195 xxxxxx.. |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
196 .xxxxx.. |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
197 ..xxxx.. |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
198 .xxxxx.. |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
199 */ |
53936
4dd0e0a7fd9e
(struct fringe_bitmap): Change member bits from char to
Kim F. Storm <storm@cua.dk>
parents:
53900
diff
changeset
|
200 static unsigned short continuation_bits[] = { |
53879
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
201 0x3c, 0x7c, 0xc0, 0xe4, 0xfc, 0x7c, 0x3c, 0x7c}; |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
202 |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
203 /* Overlay arrow bitmap. A triangular arrow. */ |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
204 /* |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
205 xx...... |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
206 xxxx.... |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
207 xxxxx... |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
208 xxxxxx.. |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
209 xxxxxx.. |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
210 xxxxx... |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
211 xxxx.... |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
212 xx...... |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
213 */ |
53936
4dd0e0a7fd9e
(struct fringe_bitmap): Change member bits from char to
Kim F. Storm <storm@cua.dk>
parents:
53900
diff
changeset
|
214 static unsigned short ov_bits[] = { |
53879
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
215 0xc0, 0xf0, 0xf8, 0xfc, 0xfc, 0xf8, 0xf0, 0xc0}; |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
216 |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
217 #if 0 |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
218 /* Reverse Overlay arrow bitmap. A triangular arrow. */ |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
219 /* |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
220 ......xx |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
221 ....xxxx |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
222 ...xxxxx |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
223 ..xxxxxx |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
224 ..xxxxxx |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
225 ...xxxxx |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
226 ....xxxx |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
227 ......xx |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
228 */ |
53936
4dd0e0a7fd9e
(struct fringe_bitmap): Change member bits from char to
Kim F. Storm <storm@cua.dk>
parents:
53900
diff
changeset
|
229 static unsigned short rev_ov_bits[] = { |
53879
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
230 0x03, 0x0f, 0x1f, 0x3f, 0x3f, 0x1f, 0x0f, 0x03}; |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
231 #endif |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
232 |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
233 /* First line bitmap. An top-left angle. */ |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
234 /* |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
235 xxxxxx.. |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
236 xxxxxx.. |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
237 xx...... |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
238 xx...... |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
239 xx...... |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
240 xx...... |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
241 xx...... |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
242 ........ |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
243 */ |
53936
4dd0e0a7fd9e
(struct fringe_bitmap): Change member bits from char to
Kim F. Storm <storm@cua.dk>
parents:
53900
diff
changeset
|
244 static unsigned short top_left_angle_bits[] = { |
53879
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
245 0xfc, 0xfc, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0x00}; |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
246 |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
247 /* First line bitmap. An right-up angle. */ |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
248 /* |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
249 ..xxxxxx |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
250 ..xxxxxx |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
251 ......xx |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
252 ......xx |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
253 ......xx |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
254 ......xx |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
255 ......xx |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
256 ........ |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
257 */ |
53936
4dd0e0a7fd9e
(struct fringe_bitmap): Change member bits from char to
Kim F. Storm <storm@cua.dk>
parents:
53900
diff
changeset
|
258 static unsigned short top_right_angle_bits[] = { |
53879
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
259 0x3f, 0x3f, 0x03, 0x03, 0x03, 0x03, 0x03, 0x00}; |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
260 |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
261 /* Last line bitmap. An left-down angle. */ |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
262 /* |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
263 ........ |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
264 xx...... |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
265 xx...... |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
266 xx...... |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
267 xx...... |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
268 xx...... |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
269 xxxxxx.. |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
270 xxxxxx.. |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
271 */ |
53936
4dd0e0a7fd9e
(struct fringe_bitmap): Change member bits from char to
Kim F. Storm <storm@cua.dk>
parents:
53900
diff
changeset
|
272 static unsigned short bottom_left_angle_bits[] = { |
53879
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
273 0x00, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xfc, 0xfc}; |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
274 |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
275 /* Last line bitmap. An right-down angle. */ |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
276 /* |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
277 ........ |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
278 ......xx |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
279 ......xx |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
280 ......xx |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
281 ......xx |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
282 ......xx |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
283 ..xxxxxx |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
284 ..xxxxxx |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
285 */ |
53936
4dd0e0a7fd9e
(struct fringe_bitmap): Change member bits from char to
Kim F. Storm <storm@cua.dk>
parents:
53900
diff
changeset
|
286 static unsigned short bottom_right_angle_bits[] = { |
53879
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
287 0x00, 0x03, 0x03, 0x03, 0x03, 0x03, 0x3f, 0x3f}; |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
288 |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
289 /* First/last line bitmap. An left bracket. */ |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
290 /* |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
291 xxxxxx.. |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
292 xxxxxx.. |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
293 xx...... |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
294 xx...... |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
295 xx...... |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
296 xx...... |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
297 xx...... |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
298 xx...... |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
299 xxxxxx.. |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
300 xxxxxx.. |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
301 */ |
53936
4dd0e0a7fd9e
(struct fringe_bitmap): Change member bits from char to
Kim F. Storm <storm@cua.dk>
parents:
53900
diff
changeset
|
302 static unsigned short left_bracket_bits[] = { |
53879
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
303 0xfc, 0xfc, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xfc, 0xfc}; |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
304 |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
305 /* First/last line bitmap. An right bracket. */ |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
306 /* |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
307 ..xxxxxx |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
308 ..xxxxxx |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
309 ......xx |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
310 ......xx |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
311 ......xx |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
312 ......xx |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
313 ......xx |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
314 ......xx |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
315 ..xxxxxx |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
316 ..xxxxxx |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
317 */ |
53936
4dd0e0a7fd9e
(struct fringe_bitmap): Change member bits from char to
Kim F. Storm <storm@cua.dk>
parents:
53900
diff
changeset
|
318 static unsigned short right_bracket_bits[] = { |
53879
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
319 0x3f, 0x3f, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x3f, 0x3f}; |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
320 |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
321 /* Filled box cursor bitmap. A filled box; max 13 pixels high. */ |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
322 /* |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
323 xxxxxxx. |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
324 xxxxxxx. |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
325 xxxxxxx. |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
326 xxxxxxx. |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
327 xxxxxxx. |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
328 xxxxxxx. |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
329 xxxxxxx. |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
330 xxxxxxx. |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
331 xxxxxxx. |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
332 xxxxxxx. |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
333 xxxxxxx. |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
334 xxxxxxx. |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
335 xxxxxxx. |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
336 */ |
53936
4dd0e0a7fd9e
(struct fringe_bitmap): Change member bits from char to
Kim F. Storm <storm@cua.dk>
parents:
53900
diff
changeset
|
337 static unsigned short filled_box_cursor_bits[] = { |
53879
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
338 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe}; |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
339 |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
340 /* Hollow box cursor bitmap. A hollow box; max 13 pixels high. */ |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
341 /* |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
342 xxxxxxx. |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
343 x.....x. |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
344 x.....x. |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
345 x.....x. |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
346 x.....x. |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
347 x.....x. |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
348 x.....x. |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
349 x.....x. |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
350 x.....x. |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
351 x.....x. |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
352 x.....x. |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
353 x.....x. |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
354 xxxxxxx. |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
355 */ |
53936
4dd0e0a7fd9e
(struct fringe_bitmap): Change member bits from char to
Kim F. Storm <storm@cua.dk>
parents:
53900
diff
changeset
|
356 static unsigned short hollow_box_cursor_bits[] = { |
53879
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
357 0xfe, 0x82, 0x82, 0x82, 0x82, 0x82, 0x82, 0x82, 0x82, 0x82, 0x82, 0x82, 0xfe}; |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
358 |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
359 /* Bar cursor bitmap. A vertical bar; max 13 pixels high. */ |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
360 /* |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
361 xx...... |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
362 xx...... |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
363 xx...... |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
364 xx...... |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
365 xx...... |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
366 xx...... |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
367 xx...... |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
368 xx...... |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
369 xx...... |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
370 xx...... |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
371 xx...... |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
372 xx...... |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
373 xx...... |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
374 */ |
53936
4dd0e0a7fd9e
(struct fringe_bitmap): Change member bits from char to
Kim F. Storm <storm@cua.dk>
parents:
53900
diff
changeset
|
375 static unsigned short bar_cursor_bits[] = { |
53879
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
376 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0}; |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
377 |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
378 /* HBar cursor bitmap. A horisontal bar; 2 pixels high. */ |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
379 /* |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
380 xxxxxxx. |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
381 xxxxxxx. |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
382 */ |
53936
4dd0e0a7fd9e
(struct fringe_bitmap): Change member bits from char to
Kim F. Storm <storm@cua.dk>
parents:
53900
diff
changeset
|
383 static unsigned short hbar_cursor_bits[] = { |
53879
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
384 0xfe, 0xfe}; |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
385 |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
386 |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
387 /* Bitmap drawn to indicate lines not displaying text if |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
388 `indicate-empty-lines' is non-nil. */ |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
389 /* |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
390 ........ |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
391 ..xxxx.. |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
392 ........ |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
393 ........ |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
394 ..xxxx.. |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
395 ........ |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
396 */ |
53936
4dd0e0a7fd9e
(struct fringe_bitmap): Change member bits from char to
Kim F. Storm <storm@cua.dk>
parents:
53900
diff
changeset
|
397 static unsigned short zv_bits[] = { |
53879
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
398 0x00, 0x3c, 0x00, 0x00, 0x3c, 0x00, 0x00, 0x3c, 0x00, |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
399 0x00, 0x3c, 0x00, 0x00, 0x3c, 0x00, 0x00, 0x3c, 0x00, |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
400 0x00, 0x3c, 0x00, 0x00, 0x3c, 0x00, 0x00, 0x3c, 0x00, |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
401 0x00, 0x3c, 0x00, 0x00, 0x3c, 0x00, 0x00, 0x3c, 0x00, |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
402 0x00, 0x3c, 0x00, 0x00, 0x3c, 0x00, 0x00, 0x3c, 0x00, |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
403 0x00, 0x3c, 0x00, 0x00, 0x3c, 0x00, 0x00, 0x3c, 0x00, |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
404 0x00, 0x3c, 0x00, 0x00, 0x3c, 0x00, 0x00, 0x3c, 0x00, |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
405 0x00, 0x3c, 0x00, 0x00, 0x3c, 0x00, 0x00, 0x3c, 0x00}; |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
406 |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
407 /* Hollow square bitmap. */ |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
408 /* |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
409 .xxxxxx. |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
410 .x....x. |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
411 .x....x. |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
412 .x....x. |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
413 .x....x. |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
414 .xxxxxx. |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
415 */ |
53936
4dd0e0a7fd9e
(struct fringe_bitmap): Change member bits from char to
Kim F. Storm <storm@cua.dk>
parents:
53900
diff
changeset
|
416 static unsigned short hollow_square_bits[] = { |
53879
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
417 0x7e, 0x42, 0x42, 0x42, 0x42, 0x7e}; |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
418 |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
419 |
53936
4dd0e0a7fd9e
(struct fringe_bitmap): Change member bits from char to
Kim F. Storm <storm@cua.dk>
parents:
53900
diff
changeset
|
420 #define BYTES_PER_BITMAP_ROW (sizeof (unsigned short)) |
4dd0e0a7fd9e
(struct fringe_bitmap): Change member bits from char to
Kim F. Storm <storm@cua.dk>
parents:
53900
diff
changeset
|
421 #define STANDARD_BITMAP_HEIGHT(bits) (sizeof (bits)/BYTES_PER_BITMAP_ROW) |
4dd0e0a7fd9e
(struct fringe_bitmap): Change member bits from char to
Kim F. Storm <storm@cua.dk>
parents:
53900
diff
changeset
|
422 #define FRBITS(bits) bits, STANDARD_BITMAP_HEIGHT (bits) |
53879
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
423 |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
424 struct fringe_bitmap standard_bitmaps[MAX_STANDARD_FRINGE_BITMAPS] = |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
425 { |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
426 { NULL, 0, 0, 0, 0, 0 }, /* NO_FRINGE_BITMAP */ |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
427 { FRBITS (unknown_bits), 8, 0, ALIGN_BITMAP_CENTER, 0 }, |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
428 { FRBITS (left_arrow_bits), 8, 0, ALIGN_BITMAP_CENTER, 0 }, |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
429 { FRBITS (right_arrow_bits), 8, 0, ALIGN_BITMAP_CENTER, 0 }, |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
430 { FRBITS (up_arrow_bits), 8, 0, ALIGN_BITMAP_TOP, 0 }, |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
431 { FRBITS (down_arrow_bits), 8, 0, ALIGN_BITMAP_BOTTOM, 0 }, |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
432 { FRBITS (continued_bits), 8, 0, ALIGN_BITMAP_CENTER, 0 }, |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
433 { FRBITS (continuation_bits), 8, 0, ALIGN_BITMAP_CENTER, 0 }, |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
434 { FRBITS (ov_bits), 8, 0, ALIGN_BITMAP_CENTER, 0 }, |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
435 { FRBITS (top_left_angle_bits), 8, 0, ALIGN_BITMAP_TOP, 0 }, |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
436 { FRBITS (top_right_angle_bits), 8, 0, ALIGN_BITMAP_TOP, 0 }, |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
437 { FRBITS (bottom_left_angle_bits), 8, 0, ALIGN_BITMAP_BOTTOM, 0 }, |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
438 { FRBITS (bottom_right_angle_bits), 8, 0, ALIGN_BITMAP_BOTTOM, 0 }, |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
439 { FRBITS (left_bracket_bits), 8, 0, ALIGN_BITMAP_CENTER, 0 }, |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
440 { FRBITS (right_bracket_bits), 8, 0, ALIGN_BITMAP_CENTER, 0 }, |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
441 { FRBITS (filled_box_cursor_bits), 8, 0, ALIGN_BITMAP_CENTER, 0 }, |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
442 { FRBITS (hollow_box_cursor_bits), 8, 0, ALIGN_BITMAP_CENTER, 0 }, |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
443 { FRBITS (hollow_square_bits), 8, 0, ALIGN_BITMAP_CENTER, 0 }, |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
444 { FRBITS (bar_cursor_bits), 8, 0, ALIGN_BITMAP_CENTER, 0 }, |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
445 { FRBITS (hbar_cursor_bits), 8, 0, ALIGN_BITMAP_BOTTOM, 0 }, |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
446 { FRBITS (zv_bits), 8, 3, ALIGN_BITMAP_TOP, 0 }, |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
447 }; |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
448 |
57277
85230b6628b3
Remove limit on number of bitmaps.
Kim F. Storm <storm@cua.dk>
parents:
57270
diff
changeset
|
449 static struct fringe_bitmap **fringe_bitmaps; |
59401
8f5e8e079790
(fringe_faces): Change to Lisp_Object pointer.
Kim F. Storm <storm@cua.dk>
parents:
58532
diff
changeset
|
450 static Lisp_Object *fringe_faces; |
57277
85230b6628b3
Remove limit on number of bitmaps.
Kim F. Storm <storm@cua.dk>
parents:
57270
diff
changeset
|
451 static int max_fringe_bitmaps; |
53879
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
452 |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
453 static int max_used_fringe_bitmap = MAX_STANDARD_FRINGE_BITMAPS; |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
454 |
57270 | 455 |
456 /* Lookup bitmap number for symbol BITMAP. | |
457 Return 0 if not a bitmap. */ | |
53879
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
458 |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
459 int |
57270 | 460 lookup_fringe_bitmap (bitmap) |
57258
36eef73e00fa
(Vfringe_bitmaps): New variable.
Kim F. Storm <storm@cua.dk>
parents:
57246
diff
changeset
|
461 Lisp_Object bitmap; |
36eef73e00fa
(Vfringe_bitmaps): New variable.
Kim F. Storm <storm@cua.dk>
parents:
57246
diff
changeset
|
462 { |
36eef73e00fa
(Vfringe_bitmaps): New variable.
Kim F. Storm <storm@cua.dk>
parents:
57246
diff
changeset
|
463 int bn; |
36eef73e00fa
(Vfringe_bitmaps): New variable.
Kim F. Storm <storm@cua.dk>
parents:
57246
diff
changeset
|
464 |
57270 | 465 bitmap = Fget (bitmap, Qfringe); |
57258
36eef73e00fa
(Vfringe_bitmaps): New variable.
Kim F. Storm <storm@cua.dk>
parents:
57246
diff
changeset
|
466 if (!INTEGERP (bitmap)) |
36eef73e00fa
(Vfringe_bitmaps): New variable.
Kim F. Storm <storm@cua.dk>
parents:
57246
diff
changeset
|
467 return 0; |
36eef73e00fa
(Vfringe_bitmaps): New variable.
Kim F. Storm <storm@cua.dk>
parents:
57246
diff
changeset
|
468 |
36eef73e00fa
(Vfringe_bitmaps): New variable.
Kim F. Storm <storm@cua.dk>
parents:
57246
diff
changeset
|
469 bn = XINT (bitmap); |
57270 | 470 if (bn > NO_FRINGE_BITMAP |
471 && bn < max_used_fringe_bitmap | |
472 && (bn < MAX_STANDARD_FRINGE_BITMAPS | |
473 || fringe_bitmaps[bn] != NULL)) | |
474 return bn; | |
475 | |
476 return 0; | |
57258
36eef73e00fa
(Vfringe_bitmaps): New variable.
Kim F. Storm <storm@cua.dk>
parents:
57246
diff
changeset
|
477 } |
36eef73e00fa
(Vfringe_bitmaps): New variable.
Kim F. Storm <storm@cua.dk>
parents:
57246
diff
changeset
|
478 |
36eef73e00fa
(Vfringe_bitmaps): New variable.
Kim F. Storm <storm@cua.dk>
parents:
57246
diff
changeset
|
479 /* Get fringe bitmap name for bitmap number BN. |
36eef73e00fa
(Vfringe_bitmaps): New variable.
Kim F. Storm <storm@cua.dk>
parents:
57246
diff
changeset
|
480 |
36eef73e00fa
(Vfringe_bitmaps): New variable.
Kim F. Storm <storm@cua.dk>
parents:
57246
diff
changeset
|
481 Found by traversing Vfringe_bitmaps comparing BN to the |
36eef73e00fa
(Vfringe_bitmaps): New variable.
Kim F. Storm <storm@cua.dk>
parents:
57246
diff
changeset
|
482 fringe property for each symbol. |
36eef73e00fa
(Vfringe_bitmaps): New variable.
Kim F. Storm <storm@cua.dk>
parents:
57246
diff
changeset
|
483 |
36eef73e00fa
(Vfringe_bitmaps): New variable.
Kim F. Storm <storm@cua.dk>
parents:
57246
diff
changeset
|
484 Return BN if not found in Vfringe_bitmaps. */ |
36eef73e00fa
(Vfringe_bitmaps): New variable.
Kim F. Storm <storm@cua.dk>
parents:
57246
diff
changeset
|
485 |
36eef73e00fa
(Vfringe_bitmaps): New variable.
Kim F. Storm <storm@cua.dk>
parents:
57246
diff
changeset
|
486 static Lisp_Object |
36eef73e00fa
(Vfringe_bitmaps): New variable.
Kim F. Storm <storm@cua.dk>
parents:
57246
diff
changeset
|
487 get_fringe_bitmap_name (bn) |
36eef73e00fa
(Vfringe_bitmaps): New variable.
Kim F. Storm <storm@cua.dk>
parents:
57246
diff
changeset
|
488 int bn; |
53879
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
489 { |
57258
36eef73e00fa
(Vfringe_bitmaps): New variable.
Kim F. Storm <storm@cua.dk>
parents:
57246
diff
changeset
|
490 Lisp_Object bitmaps; |
36eef73e00fa
(Vfringe_bitmaps): New variable.
Kim F. Storm <storm@cua.dk>
parents:
57246
diff
changeset
|
491 Lisp_Object num; |
36eef73e00fa
(Vfringe_bitmaps): New variable.
Kim F. Storm <storm@cua.dk>
parents:
57246
diff
changeset
|
492 |
36eef73e00fa
(Vfringe_bitmaps): New variable.
Kim F. Storm <storm@cua.dk>
parents:
57246
diff
changeset
|
493 /* Zero means no bitmap -- return nil. */ |
36eef73e00fa
(Vfringe_bitmaps): New variable.
Kim F. Storm <storm@cua.dk>
parents:
57246
diff
changeset
|
494 if (bn <= 0) |
36eef73e00fa
(Vfringe_bitmaps): New variable.
Kim F. Storm <storm@cua.dk>
parents:
57246
diff
changeset
|
495 return Qnil; |
36eef73e00fa
(Vfringe_bitmaps): New variable.
Kim F. Storm <storm@cua.dk>
parents:
57246
diff
changeset
|
496 |
36eef73e00fa
(Vfringe_bitmaps): New variable.
Kim F. Storm <storm@cua.dk>
parents:
57246
diff
changeset
|
497 bitmaps = Vfringe_bitmaps; |
36eef73e00fa
(Vfringe_bitmaps): New variable.
Kim F. Storm <storm@cua.dk>
parents:
57246
diff
changeset
|
498 num = make_number (bn); |
36eef73e00fa
(Vfringe_bitmaps): New variable.
Kim F. Storm <storm@cua.dk>
parents:
57246
diff
changeset
|
499 |
36eef73e00fa
(Vfringe_bitmaps): New variable.
Kim F. Storm <storm@cua.dk>
parents:
57246
diff
changeset
|
500 while (CONSP (bitmaps)) |
36eef73e00fa
(Vfringe_bitmaps): New variable.
Kim F. Storm <storm@cua.dk>
parents:
57246
diff
changeset
|
501 { |
36eef73e00fa
(Vfringe_bitmaps): New variable.
Kim F. Storm <storm@cua.dk>
parents:
57246
diff
changeset
|
502 Lisp_Object bitmap = XCAR (bitmaps); |
36eef73e00fa
(Vfringe_bitmaps): New variable.
Kim F. Storm <storm@cua.dk>
parents:
57246
diff
changeset
|
503 if (EQ (num, Fget (bitmap, Qfringe))) |
36eef73e00fa
(Vfringe_bitmaps): New variable.
Kim F. Storm <storm@cua.dk>
parents:
57246
diff
changeset
|
504 return bitmap; |
36eef73e00fa
(Vfringe_bitmaps): New variable.
Kim F. Storm <storm@cua.dk>
parents:
57246
diff
changeset
|
505 bitmaps = XCDR (bitmaps); |
36eef73e00fa
(Vfringe_bitmaps): New variable.
Kim F. Storm <storm@cua.dk>
parents:
57246
diff
changeset
|
506 } |
36eef73e00fa
(Vfringe_bitmaps): New variable.
Kim F. Storm <storm@cua.dk>
parents:
57246
diff
changeset
|
507 |
36eef73e00fa
(Vfringe_bitmaps): New variable.
Kim F. Storm <storm@cua.dk>
parents:
57246
diff
changeset
|
508 return num; |
53879
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
509 } |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
510 |
57258
36eef73e00fa
(Vfringe_bitmaps): New variable.
Kim F. Storm <storm@cua.dk>
parents:
57246
diff
changeset
|
511 |
53879
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
512 /* Draw the bitmap WHICH in one of the left or right fringes of |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
513 window W. ROW is the glyph row for which to display the bitmap; it |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
514 determines the vertical position at which the bitmap has to be |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
515 drawn. |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
516 LEFT_P is 1 for left fringe, 0 for right fringe. |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
517 */ |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
518 |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
519 void |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
520 draw_fringe_bitmap_1 (w, row, left_p, overlay, which) |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
521 struct window *w; |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
522 struct glyph_row *row; |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
523 int left_p, overlay; |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
524 enum fringe_bitmap_type which; |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
525 { |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
526 struct frame *f = XFRAME (WINDOW_FRAME (w)); |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
527 struct draw_fringe_bitmap_params p; |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
528 struct fringe_bitmap *fb; |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
529 int period; |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
530 int face_id = DEFAULT_FACE_ID; |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
531 |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
532 p.cursor_p = 0; |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
533 p.overlay_p = (overlay & 1) == 1; |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
534 p.cursor_p = (overlay & 2) == 2; |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
535 |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
536 if (which != NO_FRINGE_BITMAP) |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
537 { |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
538 } |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
539 else if (left_p) |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
540 { |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
541 which = row->left_fringe_bitmap; |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
542 face_id = row->left_fringe_face_id; |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
543 } |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
544 else |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
545 { |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
546 which = row->right_fringe_bitmap; |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
547 face_id = row->right_fringe_face_id; |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
548 } |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
549 |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
550 if (face_id == DEFAULT_FACE_ID) |
59401
8f5e8e079790
(fringe_faces): Change to Lisp_Object pointer.
Kim F. Storm <storm@cua.dk>
parents:
58532
diff
changeset
|
551 { |
8f5e8e079790
(fringe_faces): Change to Lisp_Object pointer.
Kim F. Storm <storm@cua.dk>
parents:
58532
diff
changeset
|
552 Lisp_Object face; |
8f5e8e079790
(fringe_faces): Change to Lisp_Object pointer.
Kim F. Storm <storm@cua.dk>
parents:
58532
diff
changeset
|
553 |
8f5e8e079790
(fringe_faces): Change to Lisp_Object pointer.
Kim F. Storm <storm@cua.dk>
parents:
58532
diff
changeset
|
554 if ((face = fringe_faces[which], NILP (face)) |
60834
94900ab8eef0
(draw_fringe_bitmap_1, Fset_fringe_bitmap_face):
Kim F. Storm <storm@cua.dk>
parents:
59581
diff
changeset
|
555 || (face_id = lookup_derived_face (f, face, 'A', FRINGE_FACE_ID, 0), |
94900ab8eef0
(draw_fringe_bitmap_1, Fset_fringe_bitmap_face):
Kim F. Storm <storm@cua.dk>
parents:
59581
diff
changeset
|
556 face_id < 0)) |
59401
8f5e8e079790
(fringe_faces): Change to Lisp_Object pointer.
Kim F. Storm <storm@cua.dk>
parents:
58532
diff
changeset
|
557 face_id = FRINGE_FACE_ID; |
8f5e8e079790
(fringe_faces): Change to Lisp_Object pointer.
Kim F. Storm <storm@cua.dk>
parents:
58532
diff
changeset
|
558 } |
53879
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
559 |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
560 fb = fringe_bitmaps[which]; |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
561 if (fb == NULL) |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
562 fb = &standard_bitmaps[which < MAX_STANDARD_FRINGE_BITMAPS |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
563 ? which : UNDEF_FRINGE_BITMAP]; |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
564 |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
565 period = fb->period; |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
566 |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
567 /* Convert row to frame coordinates. */ |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
568 p.y = WINDOW_TO_FRAME_PIXEL_Y (w, row->y); |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
569 |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
570 p.which = which; |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
571 p.bits = fb->bits; |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
572 p.wd = fb->width; |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
573 |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
574 p.h = fb->height; |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
575 p.dh = (period > 0 ? (p.y % period) : 0); |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
576 p.h -= p.dh; |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
577 /* Clip bitmap if too high. */ |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
578 if (p.h > row->height) |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
579 p.h = row->height; |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
580 |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
581 p.face = FACE_FROM_ID (f, face_id); |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
582 |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
583 if (p.face == NULL) |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
584 { |
59401
8f5e8e079790
(fringe_faces): Change to Lisp_Object pointer.
Kim F. Storm <storm@cua.dk>
parents:
58532
diff
changeset
|
585 /* This could happen after clearing face cache. |
8f5e8e079790
(fringe_faces): Change to Lisp_Object pointer.
Kim F. Storm <storm@cua.dk>
parents:
58532
diff
changeset
|
586 But it shouldn't happen anymore. ++kfs */ |
53879
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
587 return; |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
588 } |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
589 |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
590 PREPARE_FACE_FOR_DISPLAY (f, p.face); |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
591 |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
592 /* Clear left fringe if no bitmap to draw or if bitmap doesn't fill |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
593 the fringe. */ |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
594 p.bx = -1; |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
595 if (left_p) |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
596 { |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
597 int wd = WINDOW_LEFT_FRINGE_WIDTH (w); |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
598 int x = window_box_left (w, (WINDOW_HAS_FRINGES_OUTSIDE_MARGINS (w) |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
599 ? LEFT_MARGIN_AREA |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
600 : TEXT_AREA)); |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
601 if (p.wd > wd) |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
602 p.wd = wd; |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
603 p.x = x - p.wd - (wd - p.wd) / 2; |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
604 |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
605 if (p.wd < wd || row->height > p.h) |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
606 { |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
607 /* If W has a vertical border to its left, don't draw over it. */ |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
608 wd -= ((!WINDOW_LEFTMOST_P (w) |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
609 && !WINDOW_HAS_VERTICAL_SCROLL_BAR (w)) |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
610 ? 1 : 0); |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
611 p.bx = x - wd; |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
612 p.nx = wd; |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
613 } |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
614 } |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
615 else |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
616 { |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
617 int x = window_box_right (w, |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
618 (WINDOW_HAS_FRINGES_OUTSIDE_MARGINS (w) |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
619 ? RIGHT_MARGIN_AREA |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
620 : TEXT_AREA)); |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
621 int wd = WINDOW_RIGHT_FRINGE_WIDTH (w); |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
622 if (p.wd > wd) |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
623 p.wd = wd; |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
624 p.x = x + (wd - p.wd) / 2; |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
625 /* Clear right fringe if no bitmap to draw of if bitmap doesn't fill |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
626 the fringe. */ |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
627 if (p.wd < wd || row->height > p.h) |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
628 { |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
629 p.bx = x; |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
630 p.nx = wd; |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
631 } |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
632 } |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
633 |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
634 if (p.bx >= 0) |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
635 { |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
636 int header_line_height = WINDOW_HEADER_LINE_HEIGHT (w); |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
637 |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
638 p.by = WINDOW_TO_FRAME_PIXEL_Y (w, max (header_line_height, row->y)); |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
639 p.ny = row->visible_height; |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
640 } |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
641 |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
642 /* Adjust y to the offset in the row to start drawing the bitmap. */ |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
643 switch (fb->align) |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
644 { |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
645 case ALIGN_BITMAP_CENTER: |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
646 p.y += (row->height - p.h) / 2; |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
647 break; |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
648 case ALIGN_BITMAP_BOTTOM: |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
649 p.h = fb->height; |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
650 p.y += (row->visible_height - p.h); |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
651 break; |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
652 case ALIGN_BITMAP_TOP: |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
653 break; |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
654 } |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
655 |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
656 rif->draw_fringe_bitmap (w, row, &p); |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
657 } |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
658 |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
659 void |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
660 draw_fringe_bitmap (w, row, left_p) |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
661 struct window *w; |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
662 struct glyph_row *row; |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
663 int left_p; |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
664 { |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
665 int overlay = 0; |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
666 |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
667 if (!left_p && row->cursor_in_fringe_p) |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
668 { |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
669 int cursor = NO_FRINGE_BITMAP; |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
670 |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
671 switch (w->phys_cursor_type) |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
672 { |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
673 case HOLLOW_BOX_CURSOR: |
53936
4dd0e0a7fd9e
(struct fringe_bitmap): Change member bits from char to
Kim F. Storm <storm@cua.dk>
parents:
53900
diff
changeset
|
674 if (row->visible_height >= STANDARD_BITMAP_HEIGHT (hollow_box_cursor_bits)) |
53879
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
675 cursor = HOLLOW_BOX_CURSOR_BITMAP; |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
676 else |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
677 cursor = HOLLOW_SQUARE_BITMAP; |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
678 break; |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
679 case FILLED_BOX_CURSOR: |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
680 cursor = FILLED_BOX_CURSOR_BITMAP; |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
681 break; |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
682 case BAR_CURSOR: |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
683 cursor = BAR_CURSOR_BITMAP; |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
684 break; |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
685 case HBAR_CURSOR: |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
686 cursor = HBAR_CURSOR_BITMAP; |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
687 break; |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
688 case NO_CURSOR: |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
689 default: |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
690 w->phys_cursor_on_p = 0; |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
691 row->cursor_in_fringe_p = 0; |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
692 break; |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
693 } |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
694 if (cursor != NO_FRINGE_BITMAP) |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
695 { |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
696 draw_fringe_bitmap_1 (w, row, 0, 2, cursor); |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
697 overlay = cursor == FILLED_BOX_CURSOR_BITMAP ? 3 : 1; |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
698 } |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
699 } |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
700 |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
701 draw_fringe_bitmap_1 (w, row, left_p, overlay, NO_FRINGE_BITMAP); |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
702 |
61634
e188b7249c28
(draw_fringe_bitmap): Use overlay_arrow_bitmap from row
Kim F. Storm <storm@cua.dk>
parents:
60834
diff
changeset
|
703 if (left_p && row->overlay_arrow_bitmap != NO_FRINGE_BITMAP) |
54230
256374267423
(draw_fringe_bitmap): Use w->overlay_arrow_bitmap if set.
Kim F. Storm <storm@cua.dk>
parents:
54220
diff
changeset
|
704 draw_fringe_bitmap_1 (w, row, 1, 1, |
61634
e188b7249c28
(draw_fringe_bitmap): Use overlay_arrow_bitmap from row
Kim F. Storm <storm@cua.dk>
parents:
60834
diff
changeset
|
705 (row->overlay_arrow_bitmap < 0 |
e188b7249c28
(draw_fringe_bitmap): Use overlay_arrow_bitmap from row
Kim F. Storm <storm@cua.dk>
parents:
60834
diff
changeset
|
706 ? OVERLAY_ARROW_BITMAP |
e188b7249c28
(draw_fringe_bitmap): Use overlay_arrow_bitmap from row
Kim F. Storm <storm@cua.dk>
parents:
60834
diff
changeset
|
707 : row->overlay_arrow_bitmap)); |
53879
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
708 } |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
709 |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
710 |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
711 /* Draw fringe bitmaps for glyph row ROW on window W. Call this |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
712 function with input blocked. */ |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
713 |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
714 void |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
715 draw_row_fringe_bitmaps (w, row) |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
716 struct window *w; |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
717 struct glyph_row *row; |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
718 { |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
719 xassert (interrupt_input_blocked); |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
720 |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
721 /* If row is completely invisible, because of vscrolling, we |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
722 don't have to draw anything. */ |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
723 if (row->visible_height <= 0) |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
724 return; |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
725 |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
726 if (WINDOW_LEFT_FRINGE_WIDTH (w) != 0) |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
727 draw_fringe_bitmap (w, row, 1); |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
728 |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
729 if (WINDOW_RIGHT_FRINGE_WIDTH (w) != 0) |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
730 draw_fringe_bitmap (w, row, 0); |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
731 } |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
732 |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
733 /* Draw the fringes of window W. Only fringes for rows marked for |
57371
3c27c0be625d
(draw_window_fringes): Return value now indicates if
Kim F. Storm <storm@cua.dk>
parents:
57316
diff
changeset
|
734 update in redraw_fringe_bitmaps_p are drawn. |
3c27c0be625d
(draw_window_fringes): Return value now indicates if
Kim F. Storm <storm@cua.dk>
parents:
57316
diff
changeset
|
735 |
3c27c0be625d
(draw_window_fringes): Return value now indicates if
Kim F. Storm <storm@cua.dk>
parents:
57316
diff
changeset
|
736 Return >0 if left or right fringe was redrawn in any way. |
3c27c0be625d
(draw_window_fringes): Return value now indicates if
Kim F. Storm <storm@cua.dk>
parents:
57316
diff
changeset
|
737 |
3c27c0be625d
(draw_window_fringes): Return value now indicates if
Kim F. Storm <storm@cua.dk>
parents:
57316
diff
changeset
|
738 If NO_FRINGE is non-zero, also return >0 if either fringe has zero width. |
53879
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
739 |
57371
3c27c0be625d
(draw_window_fringes): Return value now indicates if
Kim F. Storm <storm@cua.dk>
parents:
57316
diff
changeset
|
740 A return value >0 indicates that the vertical line between windows |
3c27c0be625d
(draw_window_fringes): Return value now indicates if
Kim F. Storm <storm@cua.dk>
parents:
57316
diff
changeset
|
741 needs update (as it may be drawn in the fringe). |
3c27c0be625d
(draw_window_fringes): Return value now indicates if
Kim F. Storm <storm@cua.dk>
parents:
57316
diff
changeset
|
742 */ |
3c27c0be625d
(draw_window_fringes): Return value now indicates if
Kim F. Storm <storm@cua.dk>
parents:
57316
diff
changeset
|
743 |
3c27c0be625d
(draw_window_fringes): Return value now indicates if
Kim F. Storm <storm@cua.dk>
parents:
57316
diff
changeset
|
744 int |
3c27c0be625d
(draw_window_fringes): Return value now indicates if
Kim F. Storm <storm@cua.dk>
parents:
57316
diff
changeset
|
745 draw_window_fringes (w, no_fringe) |
53879
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
746 struct window *w; |
57371
3c27c0be625d
(draw_window_fringes): Return value now indicates if
Kim F. Storm <storm@cua.dk>
parents:
57316
diff
changeset
|
747 int no_fringe; |
53879
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
748 { |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
749 struct glyph_row *row; |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
750 int yb = window_text_bottom_y (w); |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
751 int nrows = w->current_matrix->nrows; |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
752 int y = 0, rn; |
57371
3c27c0be625d
(draw_window_fringes): Return value now indicates if
Kim F. Storm <storm@cua.dk>
parents:
57316
diff
changeset
|
753 int updated = 0; |
53879
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
754 |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
755 if (w->pseudo_window_p) |
57371
3c27c0be625d
(draw_window_fringes): Return value now indicates if
Kim F. Storm <storm@cua.dk>
parents:
57316
diff
changeset
|
756 return 0; |
3c27c0be625d
(draw_window_fringes): Return value now indicates if
Kim F. Storm <storm@cua.dk>
parents:
57316
diff
changeset
|
757 |
3c27c0be625d
(draw_window_fringes): Return value now indicates if
Kim F. Storm <storm@cua.dk>
parents:
57316
diff
changeset
|
758 /* Must draw line if no fringe */ |
3c27c0be625d
(draw_window_fringes): Return value now indicates if
Kim F. Storm <storm@cua.dk>
parents:
57316
diff
changeset
|
759 if (no_fringe |
3c27c0be625d
(draw_window_fringes): Return value now indicates if
Kim F. Storm <storm@cua.dk>
parents:
57316
diff
changeset
|
760 && (WINDOW_LEFT_FRINGE_WIDTH (w) == 0 |
3c27c0be625d
(draw_window_fringes): Return value now indicates if
Kim F. Storm <storm@cua.dk>
parents:
57316
diff
changeset
|
761 || WINDOW_RIGHT_FRINGE_WIDTH (w) == 0)) |
3c27c0be625d
(draw_window_fringes): Return value now indicates if
Kim F. Storm <storm@cua.dk>
parents:
57316
diff
changeset
|
762 updated++; |
53879
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
763 |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
764 for (y = 0, rn = 0, row = w->current_matrix->rows; |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
765 y < yb && rn < nrows; |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
766 y += row->height, ++row, ++rn) |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
767 { |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
768 if (!row->redraw_fringe_bitmaps_p) |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
769 continue; |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
770 draw_row_fringe_bitmaps (w, row); |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
771 row->redraw_fringe_bitmaps_p = 0; |
57371
3c27c0be625d
(draw_window_fringes): Return value now indicates if
Kim F. Storm <storm@cua.dk>
parents:
57316
diff
changeset
|
772 updated++; |
53879
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
773 } |
57371
3c27c0be625d
(draw_window_fringes): Return value now indicates if
Kim F. Storm <storm@cua.dk>
parents:
57316
diff
changeset
|
774 |
3c27c0be625d
(draw_window_fringes): Return value now indicates if
Kim F. Storm <storm@cua.dk>
parents:
57316
diff
changeset
|
775 return updated; |
53879
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
776 } |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
777 |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
778 |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
779 /* Recalculate the bitmaps to show in the fringes of window W. |
65062
8370ced2ae75
(update_window_fringes): Replace FORCE_P arg with KEEP_CURRENT_P arg;
Kim F. Storm <storm@cua.dk>
parents:
64770
diff
changeset
|
780 Only mark rows with modified bitmaps for update in redraw_fringe_bitmaps_p. |
8370ced2ae75
(update_window_fringes): Replace FORCE_P arg with KEEP_CURRENT_P arg;
Kim F. Storm <storm@cua.dk>
parents:
64770
diff
changeset
|
781 |
8370ced2ae75
(update_window_fringes): Replace FORCE_P arg with KEEP_CURRENT_P arg;
Kim F. Storm <storm@cua.dk>
parents:
64770
diff
changeset
|
782 If KEEP_CURRENT_P is 0, update current_matrix too. */ |
53879
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
783 |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
784 int |
65062
8370ced2ae75
(update_window_fringes): Replace FORCE_P arg with KEEP_CURRENT_P arg;
Kim F. Storm <storm@cua.dk>
parents:
64770
diff
changeset
|
785 update_window_fringes (w, keep_current_p) |
53879
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
786 struct window *w; |
65062
8370ced2ae75
(update_window_fringes): Replace FORCE_P arg with KEEP_CURRENT_P arg;
Kim F. Storm <storm@cua.dk>
parents:
64770
diff
changeset
|
787 int keep_current_p; |
53879
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
788 { |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
789 struct glyph_row *row, *cur = 0; |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
790 int yb = window_text_bottom_y (w); |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
791 int rn, nrows = w->current_matrix->nrows; |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
792 int y; |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
793 int redraw_p = 0; |
57246
36ab9b017a42
(update_window_fringes): Handle new formats of
Kim F. Storm <storm@cua.dk>
parents:
54230
diff
changeset
|
794 Lisp_Object boundary_top = Qnil, boundary_bot = Qnil; |
36ab9b017a42
(update_window_fringes): Handle new formats of
Kim F. Storm <storm@cua.dk>
parents:
54230
diff
changeset
|
795 Lisp_Object arrow_top = Qnil, arrow_bot = Qnil; |
36ab9b017a42
(update_window_fringes): Handle new formats of
Kim F. Storm <storm@cua.dk>
parents:
54230
diff
changeset
|
796 Lisp_Object empty_pos; |
36ab9b017a42
(update_window_fringes): Handle new formats of
Kim F. Storm <storm@cua.dk>
parents:
54230
diff
changeset
|
797 Lisp_Object ind = Qnil; |
53879
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
798 |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
799 if (w->pseudo_window_p) |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
800 return 0; |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
801 |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
802 if (!MINI_WINDOW_P (w) |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
803 && (ind = XBUFFER (w->buffer)->indicate_buffer_boundaries, !NILP (ind))) |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
804 { |
57246
36ab9b017a42
(update_window_fringes): Handle new formats of
Kim F. Storm <storm@cua.dk>
parents:
54230
diff
changeset
|
805 if (EQ (ind, Qleft) || EQ (ind, Qright)) |
36ab9b017a42
(update_window_fringes): Handle new formats of
Kim F. Storm <storm@cua.dk>
parents:
54230
diff
changeset
|
806 boundary_top = boundary_bot = arrow_top = arrow_bot = ind; |
36ab9b017a42
(update_window_fringes): Handle new formats of
Kim F. Storm <storm@cua.dk>
parents:
54230
diff
changeset
|
807 else if (CONSP (ind) && CONSP (XCAR (ind))) |
36ab9b017a42
(update_window_fringes): Handle new formats of
Kim F. Storm <storm@cua.dk>
parents:
54230
diff
changeset
|
808 { |
36ab9b017a42
(update_window_fringes): Handle new formats of
Kim F. Storm <storm@cua.dk>
parents:
54230
diff
changeset
|
809 Lisp_Object pos; |
36ab9b017a42
(update_window_fringes): Handle new formats of
Kim F. Storm <storm@cua.dk>
parents:
54230
diff
changeset
|
810 if (pos = Fassq (Qt, ind), !NILP (pos)) |
36ab9b017a42
(update_window_fringes): Handle new formats of
Kim F. Storm <storm@cua.dk>
parents:
54230
diff
changeset
|
811 boundary_top = boundary_bot = arrow_top = arrow_bot = XCDR (pos); |
36ab9b017a42
(update_window_fringes): Handle new formats of
Kim F. Storm <storm@cua.dk>
parents:
54230
diff
changeset
|
812 if (pos = Fassq (Qtop, ind), !NILP (pos)) |
36ab9b017a42
(update_window_fringes): Handle new formats of
Kim F. Storm <storm@cua.dk>
parents:
54230
diff
changeset
|
813 boundary_top = XCDR (pos); |
36ab9b017a42
(update_window_fringes): Handle new formats of
Kim F. Storm <storm@cua.dk>
parents:
54230
diff
changeset
|
814 if (pos = Fassq (Qbottom, ind), !NILP (pos)) |
36ab9b017a42
(update_window_fringes): Handle new formats of
Kim F. Storm <storm@cua.dk>
parents:
54230
diff
changeset
|
815 boundary_bot = XCDR (pos); |
36ab9b017a42
(update_window_fringes): Handle new formats of
Kim F. Storm <storm@cua.dk>
parents:
54230
diff
changeset
|
816 if (pos = Fassq (Qup, ind), !NILP (pos)) |
36ab9b017a42
(update_window_fringes): Handle new formats of
Kim F. Storm <storm@cua.dk>
parents:
54230
diff
changeset
|
817 arrow_top = XCDR (pos); |
36ab9b017a42
(update_window_fringes): Handle new formats of
Kim F. Storm <storm@cua.dk>
parents:
54230
diff
changeset
|
818 if (pos = Fassq (Qdown, ind), !NILP (pos)) |
36ab9b017a42
(update_window_fringes): Handle new formats of
Kim F. Storm <storm@cua.dk>
parents:
54230
diff
changeset
|
819 arrow_bot = XCDR (pos); |
36ab9b017a42
(update_window_fringes): Handle new formats of
Kim F. Storm <storm@cua.dk>
parents:
54230
diff
changeset
|
820 } |
53879
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
821 else |
58424
99a14d81043f
(update_window_fringes): Provide sensible fall-back
Kim F. Storm <storm@cua.dk>
parents:
58268
diff
changeset
|
822 /* Anything else means boundary on left and no arrows. */ |
99a14d81043f
(update_window_fringes): Provide sensible fall-back
Kim F. Storm <storm@cua.dk>
parents:
58268
diff
changeset
|
823 boundary_top = boundary_bot = Qleft; |
57246
36ab9b017a42
(update_window_fringes): Handle new formats of
Kim F. Storm <storm@cua.dk>
parents:
54230
diff
changeset
|
824 } |
53879
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
825 |
57246
36ab9b017a42
(update_window_fringes): Handle new formats of
Kim F. Storm <storm@cua.dk>
parents:
54230
diff
changeset
|
826 if (!NILP (ind)) |
36ab9b017a42
(update_window_fringes): Handle new formats of
Kim F. Storm <storm@cua.dk>
parents:
54230
diff
changeset
|
827 { |
58443
4e571414ba22
(update_window_fringes): Show top row indicator if
Kim F. Storm <storm@cua.dk>
parents:
58424
diff
changeset
|
828 int done_top = 0, done_bot = 0; |
53879
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
829 |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
830 for (y = 0, rn = 0; |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
831 y < yb && rn < nrows; |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
832 y += row->height, ++rn) |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
833 { |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
834 unsigned indicate_bob_p, indicate_top_line_p; |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
835 unsigned indicate_eob_p, indicate_bottom_line_p; |
54220
50ba59282051
(Fdefine_fringe_bitmap): Fix typo in docstring.
Juanma Barranquero <lekktu@gmail.com>
parents:
54079
diff
changeset
|
836 |
53879
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
837 row = w->desired_matrix->rows + rn; |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
838 if (!row->enabled_p) |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
839 row = w->current_matrix->rows + rn; |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
840 |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
841 indicate_bob_p = row->indicate_bob_p; |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
842 indicate_top_line_p = row->indicate_top_line_p; |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
843 indicate_eob_p = row->indicate_eob_p; |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
844 indicate_bottom_line_p = row->indicate_bottom_line_p; |
54220
50ba59282051
(Fdefine_fringe_bitmap): Fix typo in docstring.
Juanma Barranquero <lekktu@gmail.com>
parents:
54079
diff
changeset
|
845 |
53879
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
846 row->indicate_bob_p = row->indicate_top_line_p = 0; |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
847 row->indicate_eob_p = row->indicate_bottom_line_p = 0; |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
848 |
58443
4e571414ba22
(update_window_fringes): Show top row indicator if
Kim F. Storm <storm@cua.dk>
parents:
58424
diff
changeset
|
849 if (!row->mode_line_p) |
4e571414ba22
(update_window_fringes): Show top row indicator if
Kim F. Storm <storm@cua.dk>
parents:
58424
diff
changeset
|
850 { |
4e571414ba22
(update_window_fringes): Show top row indicator if
Kim F. Storm <storm@cua.dk>
parents:
58424
diff
changeset
|
851 if (!done_top) |
4e571414ba22
(update_window_fringes): Show top row indicator if
Kim F. Storm <storm@cua.dk>
parents:
58424
diff
changeset
|
852 { |
65066
67861e2e09d6
* fringe.c (update_window_fringes): Only put TOP and BOTTOM
Kim F. Storm <storm@cua.dk>
parents:
65062
diff
changeset
|
853 if (MATRIX_ROW_START_CHARPOS (row) <= BUF_BEGV (XBUFFER (w->buffer)) |
67861e2e09d6
* fringe.c (update_window_fringes): Only put TOP and BOTTOM
Kim F. Storm <storm@cua.dk>
parents:
65062
diff
changeset
|
854 && !MATRIX_ROW_PARTIALLY_VISIBLE_AT_TOP_P (w, row)) |
58443
4e571414ba22
(update_window_fringes): Show top row indicator if
Kim F. Storm <storm@cua.dk>
parents:
58424
diff
changeset
|
855 row->indicate_bob_p = !NILP (boundary_top); |
4e571414ba22
(update_window_fringes): Show top row indicator if
Kim F. Storm <storm@cua.dk>
parents:
58424
diff
changeset
|
856 else |
4e571414ba22
(update_window_fringes): Show top row indicator if
Kim F. Storm <storm@cua.dk>
parents:
58424
diff
changeset
|
857 row->indicate_top_line_p = !NILP (arrow_top); |
4e571414ba22
(update_window_fringes): Show top row indicator if
Kim F. Storm <storm@cua.dk>
parents:
58424
diff
changeset
|
858 done_top = 1; |
4e571414ba22
(update_window_fringes): Show top row indicator if
Kim F. Storm <storm@cua.dk>
parents:
58424
diff
changeset
|
859 } |
53879
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
860 |
58443
4e571414ba22
(update_window_fringes): Show top row indicator if
Kim F. Storm <storm@cua.dk>
parents:
58424
diff
changeset
|
861 if (!done_bot) |
4e571414ba22
(update_window_fringes): Show top row indicator if
Kim F. Storm <storm@cua.dk>
parents:
58424
diff
changeset
|
862 { |
66622
cf3d316b4bc0
(update_window_fringes): Undo 2005-10-27 change.
Kim F. Storm <storm@cua.dk>
parents:
66471
diff
changeset
|
863 if (MATRIX_ROW_END_CHARPOS (row) >= BUF_ZV (XBUFFER (w->buffer)) |
65066
67861e2e09d6
* fringe.c (update_window_fringes): Only put TOP and BOTTOM
Kim F. Storm <storm@cua.dk>
parents:
65062
diff
changeset
|
864 && !MATRIX_ROW_PARTIALLY_VISIBLE_AT_BOTTOM_P (w, row)) |
58443
4e571414ba22
(update_window_fringes): Show top row indicator if
Kim F. Storm <storm@cua.dk>
parents:
58424
diff
changeset
|
865 row->indicate_eob_p = !NILP (boundary_bot), done_bot = 1; |
4e571414ba22
(update_window_fringes): Show top row indicator if
Kim F. Storm <storm@cua.dk>
parents:
58424
diff
changeset
|
866 else if (y + row->height >= yb) |
4e571414ba22
(update_window_fringes): Show top row indicator if
Kim F. Storm <storm@cua.dk>
parents:
58424
diff
changeset
|
867 row->indicate_bottom_line_p = !NILP (arrow_bot), done_bot = 1; |
4e571414ba22
(update_window_fringes): Show top row indicator if
Kim F. Storm <storm@cua.dk>
parents:
58424
diff
changeset
|
868 } |
4e571414ba22
(update_window_fringes): Show top row indicator if
Kim F. Storm <storm@cua.dk>
parents:
58424
diff
changeset
|
869 } |
53879
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
870 |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
871 if (indicate_bob_p != row->indicate_bob_p |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
872 || indicate_top_line_p != row->indicate_top_line_p |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
873 || indicate_eob_p != row->indicate_eob_p |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
874 || indicate_bottom_line_p != row->indicate_bottom_line_p) |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
875 row->redraw_fringe_bitmaps_p = 1; |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
876 } |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
877 } |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
878 |
57246
36ab9b017a42
(update_window_fringes): Handle new formats of
Kim F. Storm <storm@cua.dk>
parents:
54230
diff
changeset
|
879 empty_pos = XBUFFER (w->buffer)->indicate_empty_lines; |
36ab9b017a42
(update_window_fringes): Handle new formats of
Kim F. Storm <storm@cua.dk>
parents:
54230
diff
changeset
|
880 if (!NILP (empty_pos) && !EQ (empty_pos, Qright)) |
36ab9b017a42
(update_window_fringes): Handle new formats of
Kim F. Storm <storm@cua.dk>
parents:
54230
diff
changeset
|
881 empty_pos = WINDOW_LEFT_FRINGE_WIDTH (w) == 0 ? Qright : Qleft; |
53879
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
882 |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
883 for (y = 0, rn = 0; |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
884 y < yb && rn < nrows; |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
885 y += row->height, rn++) |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
886 { |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
887 enum fringe_bitmap_type left, right; |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
888 unsigned left_face_id, right_face_id; |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
889 |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
890 row = w->desired_matrix->rows + rn; |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
891 cur = w->current_matrix->rows + rn; |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
892 if (!row->enabled_p) |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
893 row = cur; |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
894 |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
895 left_face_id = right_face_id = DEFAULT_FACE_ID; |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
896 |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
897 /* Decide which bitmap to draw in the left fringe. */ |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
898 if (WINDOW_LEFT_FRINGE_WIDTH (w) == 0) |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
899 left = NO_FRINGE_BITMAP; |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
900 else if (row->left_user_fringe_bitmap != NO_FRINGE_BITMAP) |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
901 { |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
902 left = row->left_user_fringe_bitmap; |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
903 left_face_id = row->left_user_fringe_face_id; |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
904 } |
58532
6fee0102eafe
(update_window_fringes): Prefer truncation bitmaps over
Kim F. Storm <storm@cua.dk>
parents:
58443
diff
changeset
|
905 else if (row->truncated_on_left_p) |
6fee0102eafe
(update_window_fringes): Prefer truncation bitmaps over
Kim F. Storm <storm@cua.dk>
parents:
58443
diff
changeset
|
906 left = LEFT_TRUNCATION_BITMAP; |
57246
36ab9b017a42
(update_window_fringes): Handle new formats of
Kim F. Storm <storm@cua.dk>
parents:
54230
diff
changeset
|
907 else if (row->indicate_bob_p && EQ (boundary_top, Qleft)) |
36ab9b017a42
(update_window_fringes): Handle new formats of
Kim F. Storm <storm@cua.dk>
parents:
54230
diff
changeset
|
908 left = ((row->indicate_eob_p && EQ (boundary_bot, Qleft)) |
66622
cf3d316b4bc0
(update_window_fringes): Undo 2005-10-27 change.
Kim F. Storm <storm@cua.dk>
parents:
66471
diff
changeset
|
909 ? (row->ends_at_zv_p |
cf3d316b4bc0
(update_window_fringes): Undo 2005-10-27 change.
Kim F. Storm <storm@cua.dk>
parents:
66471
diff
changeset
|
910 ? TOP_RIGHT_ANGLE_BITMAP : LEFT_BRACKET_BITMAP) |
cf3d316b4bc0
(update_window_fringes): Undo 2005-10-27 change.
Kim F. Storm <storm@cua.dk>
parents:
66471
diff
changeset
|
911 : TOP_LEFT_ANGLE_BITMAP); |
57246
36ab9b017a42
(update_window_fringes): Handle new formats of
Kim F. Storm <storm@cua.dk>
parents:
54230
diff
changeset
|
912 else if (row->indicate_eob_p && EQ (boundary_bot, Qleft)) |
66622
cf3d316b4bc0
(update_window_fringes): Undo 2005-10-27 change.
Kim F. Storm <storm@cua.dk>
parents:
66471
diff
changeset
|
913 left = (row->ends_at_zv_p |
cf3d316b4bc0
(update_window_fringes): Undo 2005-10-27 change.
Kim F. Storm <storm@cua.dk>
parents:
66471
diff
changeset
|
914 ? TOP_RIGHT_ANGLE_BITMAP : BOTTOM_LEFT_ANGLE_BITMAP); |
53879
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
915 else if (MATRIX_ROW_CONTINUATION_LINE_P (row)) |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
916 left = CONTINUATION_LINE_BITMAP; |
57246
36ab9b017a42
(update_window_fringes): Handle new formats of
Kim F. Storm <storm@cua.dk>
parents:
54230
diff
changeset
|
917 else if (row->indicate_empty_line_p && EQ (empty_pos, Qleft)) |
53879
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
918 left = ZV_LINE_BITMAP; |
57246
36ab9b017a42
(update_window_fringes): Handle new formats of
Kim F. Storm <storm@cua.dk>
parents:
54230
diff
changeset
|
919 else if (row->indicate_top_line_p && EQ (arrow_top, Qleft)) |
53879
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
920 left = UP_ARROW_BITMAP; |
57246
36ab9b017a42
(update_window_fringes): Handle new formats of
Kim F. Storm <storm@cua.dk>
parents:
54230
diff
changeset
|
921 else if (row->indicate_bottom_line_p && EQ (arrow_bot, Qleft)) |
53879
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
922 left = DOWN_ARROW_BITMAP; |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
923 else |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
924 left = NO_FRINGE_BITMAP; |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
925 |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
926 /* Decide which bitmap to draw in the right fringe. */ |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
927 if (WINDOW_RIGHT_FRINGE_WIDTH (w) == 0) |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
928 right = NO_FRINGE_BITMAP; |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
929 else if (row->right_user_fringe_bitmap != NO_FRINGE_BITMAP) |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
930 { |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
931 right = row->right_user_fringe_bitmap; |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
932 right_face_id = row->right_user_fringe_face_id; |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
933 } |
58532
6fee0102eafe
(update_window_fringes): Prefer truncation bitmaps over
Kim F. Storm <storm@cua.dk>
parents:
58443
diff
changeset
|
934 else if (row->truncated_on_right_p) |
6fee0102eafe
(update_window_fringes): Prefer truncation bitmaps over
Kim F. Storm <storm@cua.dk>
parents:
58443
diff
changeset
|
935 right = RIGHT_TRUNCATION_BITMAP; |
57246
36ab9b017a42
(update_window_fringes): Handle new formats of
Kim F. Storm <storm@cua.dk>
parents:
54230
diff
changeset
|
936 else if (row->indicate_bob_p && EQ (boundary_top, Qright)) |
36ab9b017a42
(update_window_fringes): Handle new formats of
Kim F. Storm <storm@cua.dk>
parents:
54230
diff
changeset
|
937 right = ((row->indicate_eob_p && EQ (boundary_bot, Qright)) |
66622
cf3d316b4bc0
(update_window_fringes): Undo 2005-10-27 change.
Kim F. Storm <storm@cua.dk>
parents:
66471
diff
changeset
|
938 ? (row->ends_at_zv_p |
cf3d316b4bc0
(update_window_fringes): Undo 2005-10-27 change.
Kim F. Storm <storm@cua.dk>
parents:
66471
diff
changeset
|
939 ? TOP_LEFT_ANGLE_BITMAP : RIGHT_BRACKET_BITMAP) |
cf3d316b4bc0
(update_window_fringes): Undo 2005-10-27 change.
Kim F. Storm <storm@cua.dk>
parents:
66471
diff
changeset
|
940 : TOP_RIGHT_ANGLE_BITMAP); |
57246
36ab9b017a42
(update_window_fringes): Handle new formats of
Kim F. Storm <storm@cua.dk>
parents:
54230
diff
changeset
|
941 else if (row->indicate_eob_p && EQ (boundary_bot, Qright)) |
66622
cf3d316b4bc0
(update_window_fringes): Undo 2005-10-27 change.
Kim F. Storm <storm@cua.dk>
parents:
66471
diff
changeset
|
942 right = (row->ends_at_zv_p |
cf3d316b4bc0
(update_window_fringes): Undo 2005-10-27 change.
Kim F. Storm <storm@cua.dk>
parents:
66471
diff
changeset
|
943 ? TOP_LEFT_ANGLE_BITMAP : BOTTOM_RIGHT_ANGLE_BITMAP); |
53879
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
944 else if (row->continued_p) |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
945 right = CONTINUED_LINE_BITMAP; |
57246
36ab9b017a42
(update_window_fringes): Handle new formats of
Kim F. Storm <storm@cua.dk>
parents:
54230
diff
changeset
|
946 else if (row->indicate_top_line_p && EQ (arrow_top, Qright)) |
53879
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
947 right = UP_ARROW_BITMAP; |
57246
36ab9b017a42
(update_window_fringes): Handle new formats of
Kim F. Storm <storm@cua.dk>
parents:
54230
diff
changeset
|
948 else if (row->indicate_bottom_line_p && EQ (arrow_bot, Qright)) |
53879
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
949 right = DOWN_ARROW_BITMAP; |
57246
36ab9b017a42
(update_window_fringes): Handle new formats of
Kim F. Storm <storm@cua.dk>
parents:
54230
diff
changeset
|
950 else if (row->indicate_empty_line_p && EQ (empty_pos, Qright)) |
53879
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
951 right = ZV_LINE_BITMAP; |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
952 else |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
953 right = NO_FRINGE_BITMAP; |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
954 |
65062
8370ced2ae75
(update_window_fringes): Replace FORCE_P arg with KEEP_CURRENT_P arg;
Kim F. Storm <storm@cua.dk>
parents:
64770
diff
changeset
|
955 if (row->y != cur->y |
53879
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
956 || row->visible_height != cur->visible_height |
58057
33d7af04fba1
(update_window_fringes): Update fringe bitmaps if
Kim F. Storm <storm@cua.dk>
parents:
57371
diff
changeset
|
957 || row->ends_at_zv_p != cur->ends_at_zv_p |
53879
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
958 || left != cur->left_fringe_bitmap |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
959 || right != cur->right_fringe_bitmap |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
960 || left_face_id != cur->left_fringe_face_id |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
961 || right_face_id != cur->right_fringe_face_id |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
962 || cur->redraw_fringe_bitmaps_p) |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
963 { |
65062
8370ced2ae75
(update_window_fringes): Replace FORCE_P arg with KEEP_CURRENT_P arg;
Kim F. Storm <storm@cua.dk>
parents:
64770
diff
changeset
|
964 redraw_p = row->redraw_fringe_bitmaps_p = 1; |
8370ced2ae75
(update_window_fringes): Replace FORCE_P arg with KEEP_CURRENT_P arg;
Kim F. Storm <storm@cua.dk>
parents:
64770
diff
changeset
|
965 if (!keep_current_p) |
8370ced2ae75
(update_window_fringes): Replace FORCE_P arg with KEEP_CURRENT_P arg;
Kim F. Storm <storm@cua.dk>
parents:
64770
diff
changeset
|
966 { |
8370ced2ae75
(update_window_fringes): Replace FORCE_P arg with KEEP_CURRENT_P arg;
Kim F. Storm <storm@cua.dk>
parents:
64770
diff
changeset
|
967 cur->redraw_fringe_bitmaps_p = 1; |
8370ced2ae75
(update_window_fringes): Replace FORCE_P arg with KEEP_CURRENT_P arg;
Kim F. Storm <storm@cua.dk>
parents:
64770
diff
changeset
|
968 cur->left_fringe_bitmap = left; |
8370ced2ae75
(update_window_fringes): Replace FORCE_P arg with KEEP_CURRENT_P arg;
Kim F. Storm <storm@cua.dk>
parents:
64770
diff
changeset
|
969 cur->right_fringe_bitmap = right; |
8370ced2ae75
(update_window_fringes): Replace FORCE_P arg with KEEP_CURRENT_P arg;
Kim F. Storm <storm@cua.dk>
parents:
64770
diff
changeset
|
970 cur->left_fringe_face_id = left_face_id; |
8370ced2ae75
(update_window_fringes): Replace FORCE_P arg with KEEP_CURRENT_P arg;
Kim F. Storm <storm@cua.dk>
parents:
64770
diff
changeset
|
971 cur->right_fringe_face_id = right_face_id; |
8370ced2ae75
(update_window_fringes): Replace FORCE_P arg with KEEP_CURRENT_P arg;
Kim F. Storm <storm@cua.dk>
parents:
64770
diff
changeset
|
972 } |
53879
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
973 } |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
974 |
61634
e188b7249c28
(draw_fringe_bitmap): Use overlay_arrow_bitmap from row
Kim F. Storm <storm@cua.dk>
parents:
60834
diff
changeset
|
975 if (row->overlay_arrow_bitmap != cur->overlay_arrow_bitmap) |
53879
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
976 { |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
977 redraw_p = row->redraw_fringe_bitmaps_p = cur->redraw_fringe_bitmaps_p = 1; |
61634
e188b7249c28
(draw_fringe_bitmap): Use overlay_arrow_bitmap from row
Kim F. Storm <storm@cua.dk>
parents:
60834
diff
changeset
|
978 cur->overlay_arrow_bitmap = row->overlay_arrow_bitmap; |
53879
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
979 } |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
980 |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
981 row->left_fringe_bitmap = left; |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
982 row->right_fringe_bitmap = right; |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
983 row->left_fringe_face_id = left_face_id; |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
984 row->right_fringe_face_id = right_face_id; |
58057
33d7af04fba1
(update_window_fringes): Update fringe bitmaps if
Kim F. Storm <storm@cua.dk>
parents:
57371
diff
changeset
|
985 |
33d7af04fba1
(update_window_fringes): Update fringe bitmaps if
Kim F. Storm <storm@cua.dk>
parents:
57371
diff
changeset
|
986 if (rn > 0 && row->redraw_fringe_bitmaps_p) |
33d7af04fba1
(update_window_fringes): Update fringe bitmaps if
Kim F. Storm <storm@cua.dk>
parents:
57371
diff
changeset
|
987 row[-1].redraw_fringe_bitmaps_p = cur[-1].redraw_fringe_bitmaps_p = 1; |
53879
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
988 } |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
989 |
65062
8370ced2ae75
(update_window_fringes): Replace FORCE_P arg with KEEP_CURRENT_P arg;
Kim F. Storm <storm@cua.dk>
parents:
64770
diff
changeset
|
990 return redraw_p && !keep_current_p; |
53879
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
991 } |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
992 |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
993 |
54220
50ba59282051
(Fdefine_fringe_bitmap): Fix typo in docstring.
Juanma Barranquero <lekktu@gmail.com>
parents:
54079
diff
changeset
|
994 /* Compute actual fringe widths for frame F. |
53879
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
995 |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
996 If REDRAW is 1, redraw F if the fringe settings was actually |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
997 modified and F is visible. |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
998 |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
999 Since the combined left and right fringe must occupy an integral |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1000 number of columns, we may need to add some pixels to each fringe. |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1001 Typically, we add an equal amount (+/- 1 pixel) to each fringe, |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1002 but a negative width value is taken literally (after negating it). |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1003 |
57371
3c27c0be625d
(draw_window_fringes): Return value now indicates if
Kim F. Storm <storm@cua.dk>
parents:
57316
diff
changeset
|
1004 We never make the fringes narrower than specified. |
53879
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1005 */ |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1006 |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1007 void |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1008 compute_fringe_widths (f, redraw) |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1009 struct frame *f; |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1010 int redraw; |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1011 { |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1012 int o_left = FRAME_LEFT_FRINGE_WIDTH (f); |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1013 int o_right = FRAME_RIGHT_FRINGE_WIDTH (f); |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1014 int o_cols = FRAME_FRINGE_COLS (f); |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1015 |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1016 Lisp_Object left_fringe = Fassq (Qleft_fringe, f->param_alist); |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1017 Lisp_Object right_fringe = Fassq (Qright_fringe, f->param_alist); |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1018 int left_fringe_width, right_fringe_width; |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1019 |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1020 if (!NILP (left_fringe)) |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1021 left_fringe = Fcdr (left_fringe); |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1022 if (!NILP (right_fringe)) |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1023 right_fringe = Fcdr (right_fringe); |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1024 |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1025 left_fringe_width = ((NILP (left_fringe) || !INTEGERP (left_fringe)) ? 8 : |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1026 XINT (left_fringe)); |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1027 right_fringe_width = ((NILP (right_fringe) || !INTEGERP (right_fringe)) ? 8 : |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1028 XINT (right_fringe)); |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1029 |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1030 if (left_fringe_width || right_fringe_width) |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1031 { |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1032 int left_wid = left_fringe_width >= 0 ? left_fringe_width : -left_fringe_width; |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1033 int right_wid = right_fringe_width >= 0 ? right_fringe_width : -right_fringe_width; |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1034 int conf_wid = left_wid + right_wid; |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1035 int font_wid = FRAME_COLUMN_WIDTH (f); |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1036 int cols = (left_wid + right_wid + font_wid-1) / font_wid; |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1037 int real_wid = cols * font_wid; |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1038 if (left_wid && right_wid) |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1039 { |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1040 if (left_fringe_width < 0) |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1041 { |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1042 /* Left fringe width is fixed, adjust right fringe if necessary */ |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1043 FRAME_LEFT_FRINGE_WIDTH (f) = left_wid; |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1044 FRAME_RIGHT_FRINGE_WIDTH (f) = real_wid - left_wid; |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1045 } |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1046 else if (right_fringe_width < 0) |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1047 { |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1048 /* Right fringe width is fixed, adjust left fringe if necessary */ |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1049 FRAME_LEFT_FRINGE_WIDTH (f) = real_wid - right_wid; |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1050 FRAME_RIGHT_FRINGE_WIDTH (f) = right_wid; |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1051 } |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1052 else |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1053 { |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1054 /* Adjust both fringes with an equal amount. |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1055 Note that we are doing integer arithmetic here, so don't |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1056 lose a pixel if the total width is an odd number. */ |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1057 int fill = real_wid - conf_wid; |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1058 FRAME_LEFT_FRINGE_WIDTH (f) = left_wid + fill/2; |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1059 FRAME_RIGHT_FRINGE_WIDTH (f) = right_wid + fill - fill/2; |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1060 } |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1061 } |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1062 else if (left_fringe_width) |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1063 { |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1064 FRAME_LEFT_FRINGE_WIDTH (f) = real_wid; |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1065 FRAME_RIGHT_FRINGE_WIDTH (f) = 0; |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1066 } |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1067 else |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1068 { |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1069 FRAME_LEFT_FRINGE_WIDTH (f) = 0; |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1070 FRAME_RIGHT_FRINGE_WIDTH (f) = real_wid; |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1071 } |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1072 FRAME_FRINGE_COLS (f) = cols; |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1073 } |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1074 else |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1075 { |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1076 FRAME_LEFT_FRINGE_WIDTH (f) = 0; |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1077 FRAME_RIGHT_FRINGE_WIDTH (f) = 0; |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1078 FRAME_FRINGE_COLS (f) = 0; |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1079 } |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1080 |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1081 if (redraw && FRAME_VISIBLE_P (f)) |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1082 if (o_left != FRAME_LEFT_FRINGE_WIDTH (f) || |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1083 o_right != FRAME_RIGHT_FRINGE_WIDTH (f) || |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1084 o_cols != FRAME_FRINGE_COLS (f)) |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1085 redraw_frame (f); |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1086 } |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1087 |
57258
36eef73e00fa
(Vfringe_bitmaps): New variable.
Kim F. Storm <storm@cua.dk>
parents:
57246
diff
changeset
|
1088 |
57270 | 1089 /* Free resources used by a user-defined bitmap. */ |
1090 | |
58089
fb4cd138f0b8
(destroy_fringe_bitmap): Fix return type.
Kim F. Storm <storm@cua.dk>
parents:
58057
diff
changeset
|
1091 void |
57258
36eef73e00fa
(Vfringe_bitmaps): New variable.
Kim F. Storm <storm@cua.dk>
parents:
57246
diff
changeset
|
1092 destroy_fringe_bitmap (n) |
36eef73e00fa
(Vfringe_bitmaps): New variable.
Kim F. Storm <storm@cua.dk>
parents:
57246
diff
changeset
|
1093 int n; |
53879
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1094 { |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1095 struct fringe_bitmap **fbp; |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1096 |
59401
8f5e8e079790
(fringe_faces): Change to Lisp_Object pointer.
Kim F. Storm <storm@cua.dk>
parents:
58532
diff
changeset
|
1097 fringe_faces[n] = Qnil; |
53879
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1098 |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1099 fbp = &fringe_bitmaps[n]; |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1100 if (*fbp && (*fbp)->dynamic) |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1101 { |
57267
617e54beffb6
* fringe.c (destroy_fringe_bitmap, init_fringe_bitmap)
Kim F. Storm <storm@cua.dk>
parents:
57258
diff
changeset
|
1102 if (rif && rif->destroy_fringe_bitmap) |
53879
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1103 rif->destroy_fringe_bitmap (n); |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1104 xfree (*fbp); |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1105 *fbp = NULL; |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1106 } |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1107 |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1108 while (max_used_fringe_bitmap > MAX_STANDARD_FRINGE_BITMAPS |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1109 && fringe_bitmaps[max_used_fringe_bitmap - 1] == NULL) |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1110 max_used_fringe_bitmap--; |
57258
36eef73e00fa
(Vfringe_bitmaps): New variable.
Kim F. Storm <storm@cua.dk>
parents:
57246
diff
changeset
|
1111 } |
53879
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1112 |
57258
36eef73e00fa
(Vfringe_bitmaps): New variable.
Kim F. Storm <storm@cua.dk>
parents:
57246
diff
changeset
|
1113 |
36eef73e00fa
(Vfringe_bitmaps): New variable.
Kim F. Storm <storm@cua.dk>
parents:
57246
diff
changeset
|
1114 DEFUN ("destroy-fringe-bitmap", Fdestroy_fringe_bitmap, Sdestroy_fringe_bitmap, |
36eef73e00fa
(Vfringe_bitmaps): New variable.
Kim F. Storm <storm@cua.dk>
parents:
57246
diff
changeset
|
1115 1, 1, 0, |
36eef73e00fa
(Vfringe_bitmaps): New variable.
Kim F. Storm <storm@cua.dk>
parents:
57246
diff
changeset
|
1116 doc: /* Destroy fringe bitmap BITMAP. |
36eef73e00fa
(Vfringe_bitmaps): New variable.
Kim F. Storm <storm@cua.dk>
parents:
57246
diff
changeset
|
1117 If BITMAP overrides a standard fringe bitmap, the original bitmap is restored. */) |
36eef73e00fa
(Vfringe_bitmaps): New variable.
Kim F. Storm <storm@cua.dk>
parents:
57246
diff
changeset
|
1118 (bitmap) |
36eef73e00fa
(Vfringe_bitmaps): New variable.
Kim F. Storm <storm@cua.dk>
parents:
57246
diff
changeset
|
1119 Lisp_Object bitmap; |
36eef73e00fa
(Vfringe_bitmaps): New variable.
Kim F. Storm <storm@cua.dk>
parents:
57246
diff
changeset
|
1120 { |
36eef73e00fa
(Vfringe_bitmaps): New variable.
Kim F. Storm <storm@cua.dk>
parents:
57246
diff
changeset
|
1121 int n; |
36eef73e00fa
(Vfringe_bitmaps): New variable.
Kim F. Storm <storm@cua.dk>
parents:
57246
diff
changeset
|
1122 |
57270 | 1123 CHECK_SYMBOL (bitmap); |
1124 n = lookup_fringe_bitmap (bitmap); | |
1125 if (!n) | |
57258
36eef73e00fa
(Vfringe_bitmaps): New variable.
Kim F. Storm <storm@cua.dk>
parents:
57246
diff
changeset
|
1126 return Qnil; |
36eef73e00fa
(Vfringe_bitmaps): New variable.
Kim F. Storm <storm@cua.dk>
parents:
57246
diff
changeset
|
1127 |
36eef73e00fa
(Vfringe_bitmaps): New variable.
Kim F. Storm <storm@cua.dk>
parents:
57246
diff
changeset
|
1128 destroy_fringe_bitmap (n); |
36eef73e00fa
(Vfringe_bitmaps): New variable.
Kim F. Storm <storm@cua.dk>
parents:
57246
diff
changeset
|
1129 |
57270 | 1130 if (n >= MAX_STANDARD_FRINGE_BITMAPS) |
57258
36eef73e00fa
(Vfringe_bitmaps): New variable.
Kim F. Storm <storm@cua.dk>
parents:
57246
diff
changeset
|
1131 { |
57270 | 1132 Vfringe_bitmaps = Fdelq (bitmap, Vfringe_bitmaps); |
57258
36eef73e00fa
(Vfringe_bitmaps): New variable.
Kim F. Storm <storm@cua.dk>
parents:
57246
diff
changeset
|
1133 /* It would be better to remove the fringe property. */ |
57270 | 1134 Fput (bitmap, Qfringe, Qnil); |
57258
36eef73e00fa
(Vfringe_bitmaps): New variable.
Kim F. Storm <storm@cua.dk>
parents:
57246
diff
changeset
|
1135 } |
57270 | 1136 |
53879
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1137 return Qnil; |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1138 } |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1139 |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1140 |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1141 /* Initialize bitmap bit. |
53936
4dd0e0a7fd9e
(struct fringe_bitmap): Change member bits from char to
Kim F. Storm <storm@cua.dk>
parents:
53900
diff
changeset
|
1142 |
4dd0e0a7fd9e
(struct fringe_bitmap): Change member bits from char to
Kim F. Storm <storm@cua.dk>
parents:
53900
diff
changeset
|
1143 On X, we bit-swap the built-in bitmaps and reduce bitmap |
4dd0e0a7fd9e
(struct fringe_bitmap): Change member bits from char to
Kim F. Storm <storm@cua.dk>
parents:
53900
diff
changeset
|
1144 from short to char array if width is <= 8 bits. |
4dd0e0a7fd9e
(struct fringe_bitmap): Change member bits from char to
Kim F. Storm <storm@cua.dk>
parents:
53900
diff
changeset
|
1145 |
53955
7d8c228c1f02
(init_fringe_bitmap) [MAC_OS, WORDS_BIG_ENDIAN]: Perform byte-swapping.
Kim F. Storm <storm@cua.dk>
parents:
53940
diff
changeset
|
1146 On MAC with big-endian CPU, we need to byte-swap each short. |
7d8c228c1f02
(init_fringe_bitmap) [MAC_OS, WORDS_BIG_ENDIAN]: Perform byte-swapping.
Kim F. Storm <storm@cua.dk>
parents:
53940
diff
changeset
|
1147 |
7d8c228c1f02
(init_fringe_bitmap) [MAC_OS, WORDS_BIG_ENDIAN]: Perform byte-swapping.
Kim F. Storm <storm@cua.dk>
parents:
53940
diff
changeset
|
1148 On W32 and MAC (little endian), there's no need to do this. |
53879
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1149 */ |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1150 |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1151 void |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1152 init_fringe_bitmap (which, fb, once_p) |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1153 enum fringe_bitmap_type which; |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1154 struct fringe_bitmap *fb; |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1155 int once_p; |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1156 { |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1157 if (once_p || fb->dynamic) |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1158 { |
53936
4dd0e0a7fd9e
(struct fringe_bitmap): Change member bits from char to
Kim F. Storm <storm@cua.dk>
parents:
53900
diff
changeset
|
1159 #if defined (HAVE_X_WINDOWS) |
4dd0e0a7fd9e
(struct fringe_bitmap): Change member bits from char to
Kim F. Storm <storm@cua.dk>
parents:
53900
diff
changeset
|
1160 static unsigned char swap_nibble[16] |
4dd0e0a7fd9e
(struct fringe_bitmap): Change member bits from char to
Kim F. Storm <storm@cua.dk>
parents:
53900
diff
changeset
|
1161 = { 0x0, 0x8, 0x4, 0xc, /* 0000 1000 0100 1100 */ |
4dd0e0a7fd9e
(struct fringe_bitmap): Change member bits from char to
Kim F. Storm <storm@cua.dk>
parents:
53900
diff
changeset
|
1162 0x2, 0xa, 0x6, 0xe, /* 0010 1010 0110 1110 */ |
4dd0e0a7fd9e
(struct fringe_bitmap): Change member bits from char to
Kim F. Storm <storm@cua.dk>
parents:
53900
diff
changeset
|
1163 0x1, 0x9, 0x5, 0xd, /* 0001 1001 0101 1101 */ |
53955
7d8c228c1f02
(init_fringe_bitmap) [MAC_OS, WORDS_BIG_ENDIAN]: Perform byte-swapping.
Kim F. Storm <storm@cua.dk>
parents:
53940
diff
changeset
|
1164 0x3, 0xb, 0x7, 0xf }; /* 0011 1011 0111 1111 */ |
53936
4dd0e0a7fd9e
(struct fringe_bitmap): Change member bits from char to
Kim F. Storm <storm@cua.dk>
parents:
53900
diff
changeset
|
1165 unsigned short *bits = fb->bits; |
53879
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1166 int j; |
53936
4dd0e0a7fd9e
(struct fringe_bitmap): Change member bits from char to
Kim F. Storm <storm@cua.dk>
parents:
53900
diff
changeset
|
1167 |
4dd0e0a7fd9e
(struct fringe_bitmap): Change member bits from char to
Kim F. Storm <storm@cua.dk>
parents:
53900
diff
changeset
|
1168 if (fb->width <= 8) |
53879
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1169 { |
53936
4dd0e0a7fd9e
(struct fringe_bitmap): Change member bits from char to
Kim F. Storm <storm@cua.dk>
parents:
53900
diff
changeset
|
1170 unsigned char *cbits = (unsigned char *)fb->bits; |
4dd0e0a7fd9e
(struct fringe_bitmap): Change member bits from char to
Kim F. Storm <storm@cua.dk>
parents:
53900
diff
changeset
|
1171 for (j = 0; j < fb->height; j++) |
4dd0e0a7fd9e
(struct fringe_bitmap): Change member bits from char to
Kim F. Storm <storm@cua.dk>
parents:
53900
diff
changeset
|
1172 { |
4dd0e0a7fd9e
(struct fringe_bitmap): Change member bits from char to
Kim F. Storm <storm@cua.dk>
parents:
53900
diff
changeset
|
1173 unsigned short b = *bits++; |
4dd0e0a7fd9e
(struct fringe_bitmap): Change member bits from char to
Kim F. Storm <storm@cua.dk>
parents:
53900
diff
changeset
|
1174 unsigned char c; |
4dd0e0a7fd9e
(struct fringe_bitmap): Change member bits from char to
Kim F. Storm <storm@cua.dk>
parents:
53900
diff
changeset
|
1175 c = (unsigned char)((swap_nibble[b & 0xf] << 4) |
4dd0e0a7fd9e
(struct fringe_bitmap): Change member bits from char to
Kim F. Storm <storm@cua.dk>
parents:
53900
diff
changeset
|
1176 | (swap_nibble[(b>>4) & 0xf])); |
4dd0e0a7fd9e
(struct fringe_bitmap): Change member bits from char to
Kim F. Storm <storm@cua.dk>
parents:
53900
diff
changeset
|
1177 *cbits++ = (c >> (8 - fb->width)); |
4dd0e0a7fd9e
(struct fringe_bitmap): Change member bits from char to
Kim F. Storm <storm@cua.dk>
parents:
53900
diff
changeset
|
1178 } |
4dd0e0a7fd9e
(struct fringe_bitmap): Change member bits from char to
Kim F. Storm <storm@cua.dk>
parents:
53900
diff
changeset
|
1179 } |
4dd0e0a7fd9e
(struct fringe_bitmap): Change member bits from char to
Kim F. Storm <storm@cua.dk>
parents:
53900
diff
changeset
|
1180 else |
4dd0e0a7fd9e
(struct fringe_bitmap): Change member bits from char to
Kim F. Storm <storm@cua.dk>
parents:
53900
diff
changeset
|
1181 { |
4dd0e0a7fd9e
(struct fringe_bitmap): Change member bits from char to
Kim F. Storm <storm@cua.dk>
parents:
53900
diff
changeset
|
1182 for (j = 0; j < fb->height; j++) |
4dd0e0a7fd9e
(struct fringe_bitmap): Change member bits from char to
Kim F. Storm <storm@cua.dk>
parents:
53900
diff
changeset
|
1183 { |
4dd0e0a7fd9e
(struct fringe_bitmap): Change member bits from char to
Kim F. Storm <storm@cua.dk>
parents:
53900
diff
changeset
|
1184 unsigned short b = *bits; |
4dd0e0a7fd9e
(struct fringe_bitmap): Change member bits from char to
Kim F. Storm <storm@cua.dk>
parents:
53900
diff
changeset
|
1185 b = (unsigned short)((swap_nibble[b & 0xf] << 12) |
4dd0e0a7fd9e
(struct fringe_bitmap): Change member bits from char to
Kim F. Storm <storm@cua.dk>
parents:
53900
diff
changeset
|
1186 | (swap_nibble[(b>>4) & 0xf] << 8) |
4dd0e0a7fd9e
(struct fringe_bitmap): Change member bits from char to
Kim F. Storm <storm@cua.dk>
parents:
53900
diff
changeset
|
1187 | (swap_nibble[(b>>8) & 0xf] << 4) |
4dd0e0a7fd9e
(struct fringe_bitmap): Change member bits from char to
Kim F. Storm <storm@cua.dk>
parents:
53900
diff
changeset
|
1188 | (swap_nibble[(b>>12) & 0xf])); |
4dd0e0a7fd9e
(struct fringe_bitmap): Change member bits from char to
Kim F. Storm <storm@cua.dk>
parents:
53900
diff
changeset
|
1189 *bits++ = (b >> (16 - fb->width)); |
4dd0e0a7fd9e
(struct fringe_bitmap): Change member bits from char to
Kim F. Storm <storm@cua.dk>
parents:
53900
diff
changeset
|
1190 } |
53879
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1191 } |
53955
7d8c228c1f02
(init_fringe_bitmap) [MAC_OS, WORDS_BIG_ENDIAN]: Perform byte-swapping.
Kim F. Storm <storm@cua.dk>
parents:
53940
diff
changeset
|
1192 #endif /* HAVE_X_WINDOWS */ |
7d8c228c1f02
(init_fringe_bitmap) [MAC_OS, WORDS_BIG_ENDIAN]: Perform byte-swapping.
Kim F. Storm <storm@cua.dk>
parents:
53940
diff
changeset
|
1193 |
7d8c228c1f02
(init_fringe_bitmap) [MAC_OS, WORDS_BIG_ENDIAN]: Perform byte-swapping.
Kim F. Storm <storm@cua.dk>
parents:
53940
diff
changeset
|
1194 #if defined (MAC_OS) && defined (WORDS_BIG_ENDIAN) |
7d8c228c1f02
(init_fringe_bitmap) [MAC_OS, WORDS_BIG_ENDIAN]: Perform byte-swapping.
Kim F. Storm <storm@cua.dk>
parents:
53940
diff
changeset
|
1195 unsigned short *bits = fb->bits; |
53970
2362f6a6a58a
(init_fringe_bitmap): Define j in MAC_OS code.
Stephen Eglen <stephen@gnu.org>
parents:
53966
diff
changeset
|
1196 int j; |
53955
7d8c228c1f02
(init_fringe_bitmap) [MAC_OS, WORDS_BIG_ENDIAN]: Perform byte-swapping.
Kim F. Storm <storm@cua.dk>
parents:
53940
diff
changeset
|
1197 for (j = 0; j < fb->height; j++) |
7d8c228c1f02
(init_fringe_bitmap) [MAC_OS, WORDS_BIG_ENDIAN]: Perform byte-swapping.
Kim F. Storm <storm@cua.dk>
parents:
53940
diff
changeset
|
1198 { |
7d8c228c1f02
(init_fringe_bitmap) [MAC_OS, WORDS_BIG_ENDIAN]: Perform byte-swapping.
Kim F. Storm <storm@cua.dk>
parents:
53940
diff
changeset
|
1199 unsigned short b = *bits; |
7d8c228c1f02
(init_fringe_bitmap) [MAC_OS, WORDS_BIG_ENDIAN]: Perform byte-swapping.
Kim F. Storm <storm@cua.dk>
parents:
53940
diff
changeset
|
1200 *bits++ = ((b >> 8) & 0xff) | ((b & 0xff) << 8); |
7d8c228c1f02
(init_fringe_bitmap) [MAC_OS, WORDS_BIG_ENDIAN]: Perform byte-swapping.
Kim F. Storm <storm@cua.dk>
parents:
53940
diff
changeset
|
1201 } |
7d8c228c1f02
(init_fringe_bitmap) [MAC_OS, WORDS_BIG_ENDIAN]: Perform byte-swapping.
Kim F. Storm <storm@cua.dk>
parents:
53940
diff
changeset
|
1202 #endif /* MAC_OS && WORDS_BIG_ENDIAN */ |
53879
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1203 } |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1204 |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1205 if (!once_p) |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1206 { |
57258
36eef73e00fa
(Vfringe_bitmaps): New variable.
Kim F. Storm <storm@cua.dk>
parents:
57246
diff
changeset
|
1207 destroy_fringe_bitmap (which); |
53879
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1208 |
57267
617e54beffb6
* fringe.c (destroy_fringe_bitmap, init_fringe_bitmap)
Kim F. Storm <storm@cua.dk>
parents:
57258
diff
changeset
|
1209 if (rif && rif->define_fringe_bitmap) |
53879
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1210 rif->define_fringe_bitmap (which, fb->bits, fb->height, fb->width); |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1211 |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1212 fringe_bitmaps[which] = fb; |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1213 if (which >= max_used_fringe_bitmap) |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1214 max_used_fringe_bitmap = which + 1; |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1215 } |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1216 } |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1217 |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1218 |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1219 DEFUN ("define-fringe-bitmap", Fdefine_fringe_bitmap, Sdefine_fringe_bitmap, |
57258
36eef73e00fa
(Vfringe_bitmaps): New variable.
Kim F. Storm <storm@cua.dk>
parents:
57246
diff
changeset
|
1220 2, 5, 0, |
36eef73e00fa
(Vfringe_bitmaps): New variable.
Kim F. Storm <storm@cua.dk>
parents:
57246
diff
changeset
|
1221 doc: /* Define fringe bitmap BITMAP from BITS of size HEIGHT x WIDTH. |
36eef73e00fa
(Vfringe_bitmaps): New variable.
Kim F. Storm <storm@cua.dk>
parents:
57246
diff
changeset
|
1222 BITMAP is a symbol or string naming the new fringe bitmap. |
53936
4dd0e0a7fd9e
(struct fringe_bitmap): Change member bits from char to
Kim F. Storm <storm@cua.dk>
parents:
53900
diff
changeset
|
1223 BITS is either a string or a vector of integers. |
4dd0e0a7fd9e
(struct fringe_bitmap): Change member bits from char to
Kim F. Storm <storm@cua.dk>
parents:
53900
diff
changeset
|
1224 HEIGHT is height of bitmap. If HEIGHT is nil, use length of BITS. |
4dd0e0a7fd9e
(struct fringe_bitmap): Change member bits from char to
Kim F. Storm <storm@cua.dk>
parents:
53900
diff
changeset
|
1225 WIDTH must be an integer between 1 and 16, or nil which defaults to 8. |
57258
36eef73e00fa
(Vfringe_bitmaps): New variable.
Kim F. Storm <storm@cua.dk>
parents:
57246
diff
changeset
|
1226 Optional fifth arg ALIGN may be one of `top', `center', or `bottom', |
53936
4dd0e0a7fd9e
(struct fringe_bitmap): Change member bits from char to
Kim F. Storm <storm@cua.dk>
parents:
53900
diff
changeset
|
1227 indicating the positioning of the bitmap relative to the rows where it |
4dd0e0a7fd9e
(struct fringe_bitmap): Change member bits from char to
Kim F. Storm <storm@cua.dk>
parents:
53900
diff
changeset
|
1228 is used; the default is to center the bitmap. Fourth arg may also be a |
4dd0e0a7fd9e
(struct fringe_bitmap): Change member bits from char to
Kim F. Storm <storm@cua.dk>
parents:
53900
diff
changeset
|
1229 list (ALIGN PERIODIC) where PERIODIC non-nil specifies that the bitmap |
4dd0e0a7fd9e
(struct fringe_bitmap): Change member bits from char to
Kim F. Storm <storm@cua.dk>
parents:
53900
diff
changeset
|
1230 should be repeated. |
57258
36eef73e00fa
(Vfringe_bitmaps): New variable.
Kim F. Storm <storm@cua.dk>
parents:
57246
diff
changeset
|
1231 If BITMAP already exists, the existing definition is replaced. */) |
36eef73e00fa
(Vfringe_bitmaps): New variable.
Kim F. Storm <storm@cua.dk>
parents:
57246
diff
changeset
|
1232 (bitmap, bits, height, width, align) |
36eef73e00fa
(Vfringe_bitmaps): New variable.
Kim F. Storm <storm@cua.dk>
parents:
57246
diff
changeset
|
1233 Lisp_Object bitmap, bits, height, width, align; |
53879
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1234 { |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1235 int n, h, i, j; |
53936
4dd0e0a7fd9e
(struct fringe_bitmap): Change member bits from char to
Kim F. Storm <storm@cua.dk>
parents:
53900
diff
changeset
|
1236 unsigned short *b; |
53879
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1237 struct fringe_bitmap fb, *xfb; |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1238 int fill1 = 0, fill2 = 0; |
57258
36eef73e00fa
(Vfringe_bitmaps): New variable.
Kim F. Storm <storm@cua.dk>
parents:
57246
diff
changeset
|
1239 |
57270 | 1240 CHECK_SYMBOL (bitmap); |
57258
36eef73e00fa
(Vfringe_bitmaps): New variable.
Kim F. Storm <storm@cua.dk>
parents:
57246
diff
changeset
|
1241 |
58268
fc159de41e11
(Fdefine_fringe_bitmap): Always set 'h'. Simplify.
Kim F. Storm <storm@cua.dk>
parents:
58089
diff
changeset
|
1242 if (STRINGP (bits)) |
fc159de41e11
(Fdefine_fringe_bitmap): Always set 'h'. Simplify.
Kim F. Storm <storm@cua.dk>
parents:
58089
diff
changeset
|
1243 h = SCHARS (bits); |
fc159de41e11
(Fdefine_fringe_bitmap): Always set 'h'. Simplify.
Kim F. Storm <storm@cua.dk>
parents:
58089
diff
changeset
|
1244 else if (VECTORP (bits)) |
fc159de41e11
(Fdefine_fringe_bitmap): Always set 'h'. Simplify.
Kim F. Storm <storm@cua.dk>
parents:
58089
diff
changeset
|
1245 h = XVECTOR (bits)->size; |
fc159de41e11
(Fdefine_fringe_bitmap): Always set 'h'. Simplify.
Kim F. Storm <storm@cua.dk>
parents:
58089
diff
changeset
|
1246 else |
fc159de41e11
(Fdefine_fringe_bitmap): Always set 'h'. Simplify.
Kim F. Storm <storm@cua.dk>
parents:
58089
diff
changeset
|
1247 bits = wrong_type_argument (Qsequencep, bits); |
53879
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1248 |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1249 if (NILP (height)) |
58268
fc159de41e11
(Fdefine_fringe_bitmap): Always set 'h'. Simplify.
Kim F. Storm <storm@cua.dk>
parents:
58089
diff
changeset
|
1250 fb.height = h; |
53879
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1251 else |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1252 { |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1253 CHECK_NUMBER (height); |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1254 fb.height = min (XINT (height), 255); |
58268
fc159de41e11
(Fdefine_fringe_bitmap): Always set 'h'. Simplify.
Kim F. Storm <storm@cua.dk>
parents:
58089
diff
changeset
|
1255 if (fb.height > h) |
53879
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1256 { |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1257 fill1 = (fb.height - h) / 2; |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1258 fill2 = fb.height - h - fill1; |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1259 } |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1260 } |
54220
50ba59282051
(Fdefine_fringe_bitmap): Fix typo in docstring.
Juanma Barranquero <lekktu@gmail.com>
parents:
54079
diff
changeset
|
1261 |
53879
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1262 if (NILP (width)) |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1263 fb.width = 8; |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1264 else |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1265 { |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1266 CHECK_NUMBER (width); |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1267 fb.width = min (XINT (width), 255); |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1268 } |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1269 |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1270 fb.period = 0; |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1271 fb.align = ALIGN_BITMAP_CENTER; |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1272 |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1273 if (CONSP (align)) |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1274 { |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1275 Lisp_Object period = XCDR (align); |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1276 if (CONSP (period)) |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1277 { |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1278 period = XCAR (period); |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1279 if (!NILP (period)) |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1280 { |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1281 fb.period = fb.height; |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1282 fb.height = 255; |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1283 } |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1284 } |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1285 align = XCAR (align); |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1286 } |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1287 if (EQ (align, Qtop)) |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1288 fb.align = ALIGN_BITMAP_TOP; |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1289 else if (EQ (align, Qbottom)) |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1290 fb.align = ALIGN_BITMAP_BOTTOM; |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1291 else if (!NILP (align) && !EQ (align, Qcenter)) |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1292 error ("Bad align argument"); |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1293 |
57277
85230b6628b3
Remove limit on number of bitmaps.
Kim F. Storm <storm@cua.dk>
parents:
57270
diff
changeset
|
1294 n = lookup_fringe_bitmap (bitmap); |
57270 | 1295 if (!n) |
53879
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1296 { |
57277
85230b6628b3
Remove limit on number of bitmaps.
Kim F. Storm <storm@cua.dk>
parents:
57270
diff
changeset
|
1297 if (max_used_fringe_bitmap < max_fringe_bitmaps) |
53966
26dc8943ee64
Lisp_Object/int mixup.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
53955
diff
changeset
|
1298 n = max_used_fringe_bitmap++; |
53879
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1299 else |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1300 { |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1301 for (n = MAX_STANDARD_FRINGE_BITMAPS; |
57277
85230b6628b3
Remove limit on number of bitmaps.
Kim F. Storm <storm@cua.dk>
parents:
57270
diff
changeset
|
1302 n < max_fringe_bitmaps; |
53879
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1303 n++) |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1304 if (fringe_bitmaps[n] == NULL) |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1305 break; |
57277
85230b6628b3
Remove limit on number of bitmaps.
Kim F. Storm <storm@cua.dk>
parents:
57270
diff
changeset
|
1306 |
85230b6628b3
Remove limit on number of bitmaps.
Kim F. Storm <storm@cua.dk>
parents:
57270
diff
changeset
|
1307 if (n == max_fringe_bitmaps) |
85230b6628b3
Remove limit on number of bitmaps.
Kim F. Storm <storm@cua.dk>
parents:
57270
diff
changeset
|
1308 { |
85230b6628b3
Remove limit on number of bitmaps.
Kim F. Storm <storm@cua.dk>
parents:
57270
diff
changeset
|
1309 if ((max_fringe_bitmaps + 20) > MAX_FRINGE_BITMAPS) |
85230b6628b3
Remove limit on number of bitmaps.
Kim F. Storm <storm@cua.dk>
parents:
57270
diff
changeset
|
1310 error ("No free fringe bitmap slots"); |
85230b6628b3
Remove limit on number of bitmaps.
Kim F. Storm <storm@cua.dk>
parents:
57270
diff
changeset
|
1311 |
85230b6628b3
Remove limit on number of bitmaps.
Kim F. Storm <storm@cua.dk>
parents:
57270
diff
changeset
|
1312 i = max_fringe_bitmaps; |
85230b6628b3
Remove limit on number of bitmaps.
Kim F. Storm <storm@cua.dk>
parents:
57270
diff
changeset
|
1313 max_fringe_bitmaps += 20; |
85230b6628b3
Remove limit on number of bitmaps.
Kim F. Storm <storm@cua.dk>
parents:
57270
diff
changeset
|
1314 fringe_bitmaps |
85230b6628b3
Remove limit on number of bitmaps.
Kim F. Storm <storm@cua.dk>
parents:
57270
diff
changeset
|
1315 = ((struct fringe_bitmap **) |
85230b6628b3
Remove limit on number of bitmaps.
Kim F. Storm <storm@cua.dk>
parents:
57270
diff
changeset
|
1316 xrealloc (fringe_bitmaps, max_fringe_bitmaps * sizeof (struct fringe_bitmap *))); |
85230b6628b3
Remove limit on number of bitmaps.
Kim F. Storm <storm@cua.dk>
parents:
57270
diff
changeset
|
1317 fringe_faces |
59581
26fb5a3f95ac
* fringe.c (Fdefine_fringe_bitmap, init_fringe): When assigning
Jan Djärv <jan.h.d@swipnet.se>
parents:
59401
diff
changeset
|
1318 = (Lisp_Object *) xrealloc (fringe_faces, max_fringe_bitmaps * sizeof (Lisp_Object)); |
57277
85230b6628b3
Remove limit on number of bitmaps.
Kim F. Storm <storm@cua.dk>
parents:
57270
diff
changeset
|
1319 |
85230b6628b3
Remove limit on number of bitmaps.
Kim F. Storm <storm@cua.dk>
parents:
57270
diff
changeset
|
1320 for (; i < max_fringe_bitmaps; i++) |
85230b6628b3
Remove limit on number of bitmaps.
Kim F. Storm <storm@cua.dk>
parents:
57270
diff
changeset
|
1321 { |
85230b6628b3
Remove limit on number of bitmaps.
Kim F. Storm <storm@cua.dk>
parents:
57270
diff
changeset
|
1322 fringe_bitmaps[i] = NULL; |
59401
8f5e8e079790
(fringe_faces): Change to Lisp_Object pointer.
Kim F. Storm <storm@cua.dk>
parents:
58532
diff
changeset
|
1323 fringe_faces[i] = Qnil; |
57277
85230b6628b3
Remove limit on number of bitmaps.
Kim F. Storm <storm@cua.dk>
parents:
57270
diff
changeset
|
1324 } |
85230b6628b3
Remove limit on number of bitmaps.
Kim F. Storm <storm@cua.dk>
parents:
57270
diff
changeset
|
1325 } |
53879
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1326 } |
57258
36eef73e00fa
(Vfringe_bitmaps): New variable.
Kim F. Storm <storm@cua.dk>
parents:
57246
diff
changeset
|
1327 |
57270 | 1328 Vfringe_bitmaps = Fcons (bitmap, Vfringe_bitmaps); |
1329 Fput (bitmap, Qfringe, make_number (n)); | |
53879
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1330 } |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1331 |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1332 fb.dynamic = 1; |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1333 |
54079
e1b6171f91b8
(Fdefine_fringe_bitmap): Use && instead of & to avoid
Andreas Schwab <schwab@suse.de>
parents:
53970
diff
changeset
|
1334 xfb = (struct fringe_bitmap *) xmalloc (sizeof fb |
e1b6171f91b8
(Fdefine_fringe_bitmap): Use && instead of & to avoid
Andreas Schwab <schwab@suse.de>
parents:
53970
diff
changeset
|
1335 + fb.height * BYTES_PER_BITMAP_ROW); |
e1b6171f91b8
(Fdefine_fringe_bitmap): Use && instead of & to avoid
Andreas Schwab <schwab@suse.de>
parents:
53970
diff
changeset
|
1336 fb.bits = b = (unsigned short *) (xfb + 1); |
53879
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1337 bzero (b, fb.height); |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1338 |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1339 j = 0; |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1340 while (j < fb.height) |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1341 { |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1342 for (i = 0; i < fill1 && j < fb.height; i++) |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1343 b[j++] = 0; |
54079
e1b6171f91b8
(Fdefine_fringe_bitmap): Use && instead of & to avoid
Andreas Schwab <schwab@suse.de>
parents:
53970
diff
changeset
|
1344 for (i = 0; i < h && j < fb.height; i++) |
53879
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1345 { |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1346 Lisp_Object elt = Faref (bits, make_number (i)); |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1347 b[j++] = NUMBERP (elt) ? XINT (elt) : 0; |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1348 } |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1349 for (i = 0; i < fill2 && j < fb.height; i++) |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1350 b[j++] = 0; |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1351 } |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1352 |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1353 *xfb = fb; |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1354 |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1355 init_fringe_bitmap (n, xfb, 0); |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1356 |
57270 | 1357 return bitmap; |
53879
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1358 } |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1359 |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1360 DEFUN ("set-fringe-bitmap-face", Fset_fringe_bitmap_face, Sset_fringe_bitmap_face, |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1361 1, 2, 0, |
57258
36eef73e00fa
(Vfringe_bitmaps): New variable.
Kim F. Storm <storm@cua.dk>
parents:
57246
diff
changeset
|
1362 doc: /* Set face for fringe bitmap BITMAP to FACE. |
53879
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1363 If FACE is nil, reset face to default fringe face. */) |
57258
36eef73e00fa
(Vfringe_bitmaps): New variable.
Kim F. Storm <storm@cua.dk>
parents:
57246
diff
changeset
|
1364 (bitmap, face) |
36eef73e00fa
(Vfringe_bitmaps): New variable.
Kim F. Storm <storm@cua.dk>
parents:
57246
diff
changeset
|
1365 Lisp_Object bitmap, face; |
53879
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1366 { |
57270 | 1367 int n; |
53879
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1368 int face_id; |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1369 |
57270 | 1370 CHECK_SYMBOL (bitmap); |
1371 n = lookup_fringe_bitmap (bitmap); | |
1372 if (!n) | |
57258
36eef73e00fa
(Vfringe_bitmaps): New variable.
Kim F. Storm <storm@cua.dk>
parents:
57246
diff
changeset
|
1373 error ("Undefined fringe bitmap"); |
53879
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1374 |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1375 if (!NILP (face)) |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1376 { |
60834
94900ab8eef0
(draw_fringe_bitmap_1, Fset_fringe_bitmap_face):
Kim F. Storm <storm@cua.dk>
parents:
59581
diff
changeset
|
1377 face_id = lookup_derived_face (SELECTED_FRAME (), face, |
94900ab8eef0
(draw_fringe_bitmap_1, Fset_fringe_bitmap_face):
Kim F. Storm <storm@cua.dk>
parents:
59581
diff
changeset
|
1378 'A', FRINGE_FACE_ID, 1); |
53879
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1379 if (face_id < 0) |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1380 error ("No such face"); |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1381 } |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1382 |
59401
8f5e8e079790
(fringe_faces): Change to Lisp_Object pointer.
Kim F. Storm <storm@cua.dk>
parents:
58532
diff
changeset
|
1383 fringe_faces[n] = face; |
53879
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1384 |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1385 return Qnil; |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1386 } |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1387 |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1388 DEFUN ("fringe-bitmaps-at-pos", Ffringe_bitmaps_at_pos, Sfringe_bitmaps_at_pos, |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1389 0, 2, 0, |
54220
50ba59282051
(Fdefine_fringe_bitmap): Fix typo in docstring.
Juanma Barranquero <lekktu@gmail.com>
parents:
54079
diff
changeset
|
1390 doc: /* Return fringe bitmaps of row containing position POS in window WINDOW. |
53879
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1391 If WINDOW is nil, use selected window. If POS is nil, use value of point |
57316
3eb68ef1dcb7
(Ffringe_bitmaps_at_pos): Change return value from cons
Kim F. Storm <storm@cua.dk>
parents:
57277
diff
changeset
|
1392 in that window. Return value is a list (LEFT RIGHT OV), where LEFT |
3eb68ef1dcb7
(Ffringe_bitmaps_at_pos): Change return value from cons
Kim F. Storm <storm@cua.dk>
parents:
57277
diff
changeset
|
1393 is the symbol for the bitmap in the left fringe (or nil if no bitmap), |
3eb68ef1dcb7
(Ffringe_bitmaps_at_pos): Change return value from cons
Kim F. Storm <storm@cua.dk>
parents:
57277
diff
changeset
|
1394 RIGHT is similar for the right fringe, and OV is non-nil if there is an |
3eb68ef1dcb7
(Ffringe_bitmaps_at_pos): Change return value from cons
Kim F. Storm <storm@cua.dk>
parents:
57277
diff
changeset
|
1395 overlay arrow in the left fringe. |
57246
36ab9b017a42
(update_window_fringes): Handle new formats of
Kim F. Storm <storm@cua.dk>
parents:
54230
diff
changeset
|
1396 Return nil if POS is not visible in WINDOW. */) |
53879
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1397 (pos, window) |
53940
33cf8d1b409d
(Ffringe_bitmaps_at_pos): Add missing arg declarations.
Kim F. Storm <storm@cua.dk>
parents:
53936
diff
changeset
|
1398 Lisp_Object pos, window; |
53879
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1399 { |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1400 struct window *w; |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1401 struct glyph_row *row; |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1402 int textpos; |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1403 |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1404 if (NILP (window)) |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1405 window = selected_window; |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1406 CHECK_WINDOW (window); |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1407 w = XWINDOW (window); |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1408 |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1409 if (!NILP (pos)) |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1410 { |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1411 CHECK_NUMBER_COERCE_MARKER (pos); |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1412 textpos = XINT (pos); |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1413 } |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1414 else if (w == XWINDOW (selected_window)) |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1415 textpos = PT; |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1416 else |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1417 textpos = XMARKER (w->pointm)->charpos; |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1418 |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1419 row = MATRIX_FIRST_TEXT_ROW (w->current_matrix); |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1420 row = row_containing_pos (w, textpos, row, NULL, 0); |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1421 if (row) |
57316
3eb68ef1dcb7
(Ffringe_bitmaps_at_pos): Change return value from cons
Kim F. Storm <storm@cua.dk>
parents:
57277
diff
changeset
|
1422 return list3 (get_fringe_bitmap_name (row->left_fringe_bitmap), |
3eb68ef1dcb7
(Ffringe_bitmaps_at_pos): Change return value from cons
Kim F. Storm <storm@cua.dk>
parents:
57277
diff
changeset
|
1423 get_fringe_bitmap_name (row->right_fringe_bitmap), |
61634
e188b7249c28
(draw_fringe_bitmap): Use overlay_arrow_bitmap from row
Kim F. Storm <storm@cua.dk>
parents:
60834
diff
changeset
|
1424 (row->overlay_arrow_bitmap == 0 ? Qnil |
e188b7249c28
(draw_fringe_bitmap): Use overlay_arrow_bitmap from row
Kim F. Storm <storm@cua.dk>
parents:
60834
diff
changeset
|
1425 : row->overlay_arrow_bitmap < 0 ? Qt |
e188b7249c28
(draw_fringe_bitmap): Use overlay_arrow_bitmap from row
Kim F. Storm <storm@cua.dk>
parents:
60834
diff
changeset
|
1426 : get_fringe_bitmap_name (row->overlay_arrow_bitmap))); |
53879
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1427 else |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1428 return Qnil; |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1429 } |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1430 |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1431 |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1432 /*********************************************************************** |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1433 Initialization |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1434 ***********************************************************************/ |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1435 |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1436 void |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1437 syms_of_fringe () |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1438 { |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1439 defsubr (&Sdestroy_fringe_bitmap); |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1440 defsubr (&Sdefine_fringe_bitmap); |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1441 defsubr (&Sfringe_bitmaps_at_pos); |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1442 defsubr (&Sset_fringe_bitmap_face); |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1443 |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1444 DEFVAR_LISP ("overflow-newline-into-fringe", &Voverflow_newline_into_fringe, |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1445 doc: /* *Non-nil means that newline may flow into the right fringe. |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1446 This means that display lines which are exactly as wide as the window |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1447 (not counting the final newline) will only occupy one screen line, by |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1448 showing (or hiding) the final newline in the right fringe; when point |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1449 is at the final newline, the cursor is shown in the right fringe. |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1450 If nil, also continue lines which are exactly as wide as the window. */); |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1451 Voverflow_newline_into_fringe = Qt; |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1452 |
57258
36eef73e00fa
(Vfringe_bitmaps): New variable.
Kim F. Storm <storm@cua.dk>
parents:
57246
diff
changeset
|
1453 DEFVAR_LISP ("fringe-bitmaps", &Vfringe_bitmaps, |
36eef73e00fa
(Vfringe_bitmaps): New variable.
Kim F. Storm <storm@cua.dk>
parents:
57246
diff
changeset
|
1454 doc: /* List of fringe bitmap symbols. |
36eef73e00fa
(Vfringe_bitmaps): New variable.
Kim F. Storm <storm@cua.dk>
parents:
57246
diff
changeset
|
1455 You must (require 'fringe) to use fringe bitmap symbols in your programs." */); |
36eef73e00fa
(Vfringe_bitmaps): New variable.
Kim F. Storm <storm@cua.dk>
parents:
57246
diff
changeset
|
1456 Vfringe_bitmaps = Qnil; |
53879
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1457 } |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1458 |
59401
8f5e8e079790
(fringe_faces): Change to Lisp_Object pointer.
Kim F. Storm <storm@cua.dk>
parents:
58532
diff
changeset
|
1459 /* Garbage collection hook */ |
8f5e8e079790
(fringe_faces): Change to Lisp_Object pointer.
Kim F. Storm <storm@cua.dk>
parents:
58532
diff
changeset
|
1460 |
8f5e8e079790
(fringe_faces): Change to Lisp_Object pointer.
Kim F. Storm <storm@cua.dk>
parents:
58532
diff
changeset
|
1461 void |
8f5e8e079790
(fringe_faces): Change to Lisp_Object pointer.
Kim F. Storm <storm@cua.dk>
parents:
58532
diff
changeset
|
1462 mark_fringe_data () |
8f5e8e079790
(fringe_faces): Change to Lisp_Object pointer.
Kim F. Storm <storm@cua.dk>
parents:
58532
diff
changeset
|
1463 { |
8f5e8e079790
(fringe_faces): Change to Lisp_Object pointer.
Kim F. Storm <storm@cua.dk>
parents:
58532
diff
changeset
|
1464 int i; |
8f5e8e079790
(fringe_faces): Change to Lisp_Object pointer.
Kim F. Storm <storm@cua.dk>
parents:
58532
diff
changeset
|
1465 |
8f5e8e079790
(fringe_faces): Change to Lisp_Object pointer.
Kim F. Storm <storm@cua.dk>
parents:
58532
diff
changeset
|
1466 for (i = 0; i < max_fringe_bitmaps; i++) |
8f5e8e079790
(fringe_faces): Change to Lisp_Object pointer.
Kim F. Storm <storm@cua.dk>
parents:
58532
diff
changeset
|
1467 if (!NILP (fringe_faces[i])) |
8f5e8e079790
(fringe_faces): Change to Lisp_Object pointer.
Kim F. Storm <storm@cua.dk>
parents:
58532
diff
changeset
|
1468 mark_object (fringe_faces[i]); |
8f5e8e079790
(fringe_faces): Change to Lisp_Object pointer.
Kim F. Storm <storm@cua.dk>
parents:
58532
diff
changeset
|
1469 } |
8f5e8e079790
(fringe_faces): Change to Lisp_Object pointer.
Kim F. Storm <storm@cua.dk>
parents:
58532
diff
changeset
|
1470 |
53879
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1471 /* Initialize this module when Emacs starts. */ |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1472 |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1473 void |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1474 init_fringe_once () |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1475 { |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1476 enum fringe_bitmap_type bt; |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1477 |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1478 for (bt = NO_FRINGE_BITMAP + 1; bt < MAX_STANDARD_FRINGE_BITMAPS; bt++) |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1479 init_fringe_bitmap(bt, &standard_bitmaps[bt], 1); |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1480 } |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1481 |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1482 void |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1483 init_fringe () |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1484 { |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1485 int i; |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1486 |
57277
85230b6628b3
Remove limit on number of bitmaps.
Kim F. Storm <storm@cua.dk>
parents:
57270
diff
changeset
|
1487 max_fringe_bitmaps = MAX_STANDARD_FRINGE_BITMAPS + 20; |
85230b6628b3
Remove limit on number of bitmaps.
Kim F. Storm <storm@cua.dk>
parents:
57270
diff
changeset
|
1488 |
85230b6628b3
Remove limit on number of bitmaps.
Kim F. Storm <storm@cua.dk>
parents:
57270
diff
changeset
|
1489 fringe_bitmaps |
85230b6628b3
Remove limit on number of bitmaps.
Kim F. Storm <storm@cua.dk>
parents:
57270
diff
changeset
|
1490 = (struct fringe_bitmap **) xmalloc (max_fringe_bitmaps * sizeof (struct fringe_bitmap *)); |
85230b6628b3
Remove limit on number of bitmaps.
Kim F. Storm <storm@cua.dk>
parents:
57270
diff
changeset
|
1491 fringe_faces |
59581
26fb5a3f95ac
* fringe.c (Fdefine_fringe_bitmap, init_fringe): When assigning
Jan Djärv <jan.h.d@swipnet.se>
parents:
59401
diff
changeset
|
1492 = (Lisp_Object *) xmalloc (max_fringe_bitmaps * sizeof (Lisp_Object)); |
57277
85230b6628b3
Remove limit on number of bitmaps.
Kim F. Storm <storm@cua.dk>
parents:
57270
diff
changeset
|
1493 |
85230b6628b3
Remove limit on number of bitmaps.
Kim F. Storm <storm@cua.dk>
parents:
57270
diff
changeset
|
1494 for (i = 0; i < max_fringe_bitmaps; i++) |
85230b6628b3
Remove limit on number of bitmaps.
Kim F. Storm <storm@cua.dk>
parents:
57270
diff
changeset
|
1495 { |
85230b6628b3
Remove limit on number of bitmaps.
Kim F. Storm <storm@cua.dk>
parents:
57270
diff
changeset
|
1496 fringe_bitmaps[i] = NULL; |
59401
8f5e8e079790
(fringe_faces): Change to Lisp_Object pointer.
Kim F. Storm <storm@cua.dk>
parents:
58532
diff
changeset
|
1497 fringe_faces[i] = Qnil; |
57277
85230b6628b3
Remove limit on number of bitmaps.
Kim F. Storm <storm@cua.dk>
parents:
57270
diff
changeset
|
1498 } |
53879
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1499 } |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1500 |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1501 #ifdef HAVE_NTGUI |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1502 |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1503 void |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1504 w32_init_fringe () |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1505 { |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1506 enum fringe_bitmap_type bt; |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1507 |
57267
617e54beffb6
* fringe.c (destroy_fringe_bitmap, init_fringe_bitmap)
Kim F. Storm <storm@cua.dk>
parents:
57258
diff
changeset
|
1508 if (!rif) |
617e54beffb6
* fringe.c (destroy_fringe_bitmap, init_fringe_bitmap)
Kim F. Storm <storm@cua.dk>
parents:
57258
diff
changeset
|
1509 return; |
617e54beffb6
* fringe.c (destroy_fringe_bitmap, init_fringe_bitmap)
Kim F. Storm <storm@cua.dk>
parents:
57258
diff
changeset
|
1510 |
53879
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1511 for (bt = NO_FRINGE_BITMAP + 1; bt < MAX_STANDARD_FRINGE_BITMAPS; bt++) |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1512 { |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1513 struct fringe_bitmap *fb = &standard_bitmaps[bt]; |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1514 rif->define_fringe_bitmap (bt, fb->bits, fb->height, fb->width); |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1515 } |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1516 } |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1517 |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1518 void |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1519 w32_reset_fringes () |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1520 { |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1521 /* Destroy row bitmaps. */ |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1522 int bt; |
54220
50ba59282051
(Fdefine_fringe_bitmap): Fix typo in docstring.
Juanma Barranquero <lekktu@gmail.com>
parents:
54079
diff
changeset
|
1523 |
57267
617e54beffb6
* fringe.c (destroy_fringe_bitmap, init_fringe_bitmap)
Kim F. Storm <storm@cua.dk>
parents:
57258
diff
changeset
|
1524 if (!rif) |
617e54beffb6
* fringe.c (destroy_fringe_bitmap, init_fringe_bitmap)
Kim F. Storm <storm@cua.dk>
parents:
57258
diff
changeset
|
1525 return; |
617e54beffb6
* fringe.c (destroy_fringe_bitmap, init_fringe_bitmap)
Kim F. Storm <storm@cua.dk>
parents:
57258
diff
changeset
|
1526 |
53879
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1527 for (bt = NO_FRINGE_BITMAP + 1; bt < max_used_fringe_bitmap; bt++) |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1528 rif->destroy_fringe_bitmap (bt); |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1529 } |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1530 |
53955
7d8c228c1f02
(init_fringe_bitmap) [MAC_OS, WORDS_BIG_ENDIAN]: Perform byte-swapping.
Kim F. Storm <storm@cua.dk>
parents:
53940
diff
changeset
|
1531 #endif /* HAVE_NTGUI */ |
53879
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1532 |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1533 #endif /* HAVE_WINDOW_SYSTEM */ |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1534 |
53900 | 1535 /* arch-tag: 04596920-43eb-473d-b319-82712338162d |
1536 (do not change this comment) */ |