Mercurial > emacs
annotate src/fringe.c @ 90014:ade0c9a12f99
(encode_coding_iso_2022): Fix handling of charset
annotation.
author | Kenichi Handa <handa@m17n.org> |
---|---|
date | Wed, 13 Oct 2004 02:40:30 +0000 |
parents | 6c1af301b455 |
children | ff0e824afa37 |
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). |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
2 Copyright (C) 1985,86,87,88,93,94,95,97,98,99,2000,01,02,03,04 |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
3 Free Software Foundation, Inc. |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
4 |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
5 This file is part of GNU Emacs. |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
6 |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
7 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
|
8 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
|
9 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
|
10 any later version. |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
11 |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
12 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
|
13 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
|
14 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
|
15 GNU General Public License for more details. |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
16 |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
17 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
|
18 along with GNU Emacs; see the file COPYING. If not, write to |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
19 the Free Software Foundation, Inc., 59 Temple Place - Suite 330, |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
20 Boston, MA 02111-1307, USA. */ |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
21 |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
22 #include <config.h> |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
23 #include <stdio.h> |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
24 |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
25 #include "lisp.h" |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
26 #include "frame.h" |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
27 #include "window.h" |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
28 #include "dispextern.h" |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
29 #include "buffer.h" |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
30 #include "blockinput.h" |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
31 |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
32 #ifdef HAVE_WINDOW_SYSTEM |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
33 |
57258
36eef73e00fa
(Vfringe_bitmaps): New variable.
Kim F. Storm <storm@cua.dk>
parents:
57246
diff
changeset
|
34 extern Lisp_Object Qfringe; |
53879
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
35 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
|
36 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
|
37 |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
38 /* 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
|
39 |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
40 Lisp_Object Voverflow_newline_into_fringe; |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
41 |
57258
36eef73e00fa
(Vfringe_bitmaps): New variable.
Kim F. Storm <storm@cua.dk>
parents:
57246
diff
changeset
|
42 /* List of known fringe bitmap symbols. |
36eef73e00fa
(Vfringe_bitmaps): New variable.
Kim F. Storm <storm@cua.dk>
parents:
57246
diff
changeset
|
43 |
36eef73e00fa
(Vfringe_bitmaps): New variable.
Kim F. Storm <storm@cua.dk>
parents:
57246
diff
changeset
|
44 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
|
45 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
|
46 loading fringe.el. |
36eef73e00fa
(Vfringe_bitmaps): New variable.
Kim F. Storm <storm@cua.dk>
parents:
57246
diff
changeset
|
47 */ |
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 Lisp_Object Vfringe_bitmaps; |
53879
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
50 |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
51 enum fringe_bitmap_type |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
52 { |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
53 NO_FRINGE_BITMAP = 0, |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
54 UNDEF_FRINGE_BITMAP, |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
55 LEFT_TRUNCATION_BITMAP, |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
56 RIGHT_TRUNCATION_BITMAP, |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
57 UP_ARROW_BITMAP, |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
58 DOWN_ARROW_BITMAP, |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
59 CONTINUED_LINE_BITMAP, |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
60 CONTINUATION_LINE_BITMAP, |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
61 OVERLAY_ARROW_BITMAP, |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
62 TOP_LEFT_ANGLE_BITMAP, |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
63 TOP_RIGHT_ANGLE_BITMAP, |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
64 BOTTOM_LEFT_ANGLE_BITMAP, |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
65 BOTTOM_RIGHT_ANGLE_BITMAP, |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
66 LEFT_BRACKET_BITMAP, |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
67 RIGHT_BRACKET_BITMAP, |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
68 FILLED_BOX_CURSOR_BITMAP, |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
69 HOLLOW_BOX_CURSOR_BITMAP, |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
70 HOLLOW_SQUARE_BITMAP, |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
71 BAR_CURSOR_BITMAP, |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
72 HBAR_CURSOR_BITMAP, |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
73 ZV_LINE_BITMAP, |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
74 MAX_STANDARD_FRINGE_BITMAPS |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
75 }; |
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 enum fringe_bitmap_align |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
78 { |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
79 ALIGN_BITMAP_CENTER = 0, |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
80 ALIGN_BITMAP_TOP, |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
81 ALIGN_BITMAP_BOTTOM |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
82 }; |
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 struct fringe_bitmap |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
85 { |
53936
4dd0e0a7fd9e
(struct fringe_bitmap): Change member bits from char to
Kim F. Storm <storm@cua.dk>
parents:
53900
diff
changeset
|
86 unsigned short *bits; |
53879
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
87 unsigned height : 8; |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
88 unsigned width : 8; |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
89 unsigned period : 8; |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
90 unsigned align : 2; |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
91 unsigned dynamic : 1; |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
92 }; |
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 Fringe bitmaps |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
97 ***********************************************************************/ |
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 /* Undefined bitmap. A question mark. */ |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
100 /* |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
101 ..xxxx.. |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
102 .xxxxxx. |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
103 xx....xx |
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.. |
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 ........ |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
109 ...xx... |
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 */ |
53936
4dd0e0a7fd9e
(struct fringe_bitmap): Change member bits from char to
Kim F. Storm <storm@cua.dk>
parents:
53900
diff
changeset
|
112 static unsigned short unknown_bits[] = { |
53879
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
113 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
|
114 |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
115 /* An arrow like this: `<-'. */ |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
116 /* |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
117 ...xx... |
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 xxxxxx.. |
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 .xx..... |
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 */ |
53936
4dd0e0a7fd9e
(struct fringe_bitmap): Change member bits from char to
Kim F. Storm <storm@cua.dk>
parents:
53900
diff
changeset
|
126 static unsigned short left_arrow_bits[] = { |
53879
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
127 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
|
128 |
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 /* Right truncation arrow bitmap `->'. */ |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
131 /* |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
132 ...xx... |
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 ..xxxxxx |
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 .....xx. |
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 */ |
53936
4dd0e0a7fd9e
(struct fringe_bitmap): Change member bits from char to
Kim F. Storm <storm@cua.dk>
parents:
53900
diff
changeset
|
141 static unsigned short right_arrow_bits[] = { |
53879
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
142 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
|
143 |
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 /* Up arrow bitmap. */ |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
146 /* |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
147 ...xx... |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
148 ..xxxx.. |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
149 .xxxxxx. |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
150 xxxxxxxx |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
151 ...xx... |
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 */ |
53936
4dd0e0a7fd9e
(struct fringe_bitmap): Change member bits from char to
Kim F. Storm <storm@cua.dk>
parents:
53900
diff
changeset
|
156 static unsigned short up_arrow_bits[] = { |
53879
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
157 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
|
158 |
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 /* Down arrow bitmap. */ |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
161 /* |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
162 ...xx... |
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 xxxxxxxx |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
167 .xxxxxx. |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
168 ..xxxx.. |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
169 ...xx... |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
170 */ |
53936
4dd0e0a7fd9e
(struct fringe_bitmap): Change member bits from char to
Kim F. Storm <storm@cua.dk>
parents:
53900
diff
changeset
|
171 static unsigned short down_arrow_bits[] = { |
53879
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
172 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
|
173 |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
174 /* Marker for continued lines. */ |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
175 /* |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
176 ..xxxx.. |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
177 ..xxxxx. |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
178 ......xx |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
179 ..x..xxx |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
180 ..xxxxxx |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
181 ..xxxxx. |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
182 ..xxxx.. |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
183 ..xxxxx. |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
184 */ |
53936
4dd0e0a7fd9e
(struct fringe_bitmap): Change member bits from char to
Kim F. Storm <storm@cua.dk>
parents:
53900
diff
changeset
|
185 static unsigned short continued_bits[] = { |
53879
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
186 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
|
187 |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
188 /* Marker for continuation lines. */ |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
189 /* |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
190 ..xxxx.. |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
191 .xxxxx.. |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
192 xx...... |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
193 xxx..x.. |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
194 xxxxxx.. |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
195 .xxxxx.. |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
196 ..xxxx.. |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
197 .xxxxx.. |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
198 */ |
53936
4dd0e0a7fd9e
(struct fringe_bitmap): Change member bits from char to
Kim F. Storm <storm@cua.dk>
parents:
53900
diff
changeset
|
199 static unsigned short continuation_bits[] = { |
53879
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
200 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
|
201 |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
202 /* Overlay arrow bitmap. A triangular arrow. */ |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
203 /* |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
204 xx...... |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
205 xxxx.... |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
206 xxxxx... |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
207 xxxxxx.. |
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 xxxxx... |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
210 xxxx.... |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
211 xx...... |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
212 */ |
53936
4dd0e0a7fd9e
(struct fringe_bitmap): Change member bits from char to
Kim F. Storm <storm@cua.dk>
parents:
53900
diff
changeset
|
213 static unsigned short ov_bits[] = { |
53879
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
214 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
|
215 |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
216 #if 0 |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
217 /* Reverse Overlay arrow bitmap. A triangular arrow. */ |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
218 /* |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
219 ......xx |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
220 ....xxxx |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
221 ...xxxxx |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
222 ..xxxxxx |
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 ...xxxxx |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
225 ....xxxx |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
226 ......xx |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
227 */ |
53936
4dd0e0a7fd9e
(struct fringe_bitmap): Change member bits from char to
Kim F. Storm <storm@cua.dk>
parents:
53900
diff
changeset
|
228 static unsigned short rev_ov_bits[] = { |
53879
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
229 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
|
230 #endif |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
231 |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
232 /* First line bitmap. An top-left angle. */ |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
233 /* |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
234 xxxxxx.. |
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 xx...... |
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 ........ |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
242 */ |
53936
4dd0e0a7fd9e
(struct fringe_bitmap): Change member bits from char to
Kim F. Storm <storm@cua.dk>
parents:
53900
diff
changeset
|
243 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
|
244 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
|
245 |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
246 /* First line bitmap. An right-up angle. */ |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
247 /* |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
248 ..xxxxxx |
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 ......xx |
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 ........ |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
256 */ |
53936
4dd0e0a7fd9e
(struct fringe_bitmap): Change member bits from char to
Kim F. Storm <storm@cua.dk>
parents:
53900
diff
changeset
|
257 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
|
258 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
|
259 |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
260 /* Last line bitmap. An left-down angle. */ |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
261 /* |
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 xx...... |
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 xxxxxx.. |
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 */ |
53936
4dd0e0a7fd9e
(struct fringe_bitmap): Change member bits from char to
Kim F. Storm <storm@cua.dk>
parents:
53900
diff
changeset
|
271 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
|
272 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
|
273 |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
274 /* Last line bitmap. An right-down angle. */ |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
275 /* |
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 ......xx |
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 ..xxxxxx |
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 */ |
53936
4dd0e0a7fd9e
(struct fringe_bitmap): Change member bits from char to
Kim F. Storm <storm@cua.dk>
parents:
53900
diff
changeset
|
285 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
|
286 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
|
287 |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
288 /* First/last line bitmap. An left bracket. */ |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
289 /* |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
290 xxxxxx.. |
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 xx...... |
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 xxxxxx.. |
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 */ |
53936
4dd0e0a7fd9e
(struct fringe_bitmap): Change member bits from char to
Kim F. Storm <storm@cua.dk>
parents:
53900
diff
changeset
|
301 static unsigned short left_bracket_bits[] = { |
53879
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
302 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
|
303 |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
304 /* First/last line bitmap. An right bracket. */ |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
305 /* |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
306 ..xxxxxx |
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 ......xx |
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 ..xxxxxx |
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 */ |
53936
4dd0e0a7fd9e
(struct fringe_bitmap): Change member bits from char to
Kim F. Storm <storm@cua.dk>
parents:
53900
diff
changeset
|
317 static unsigned short right_bracket_bits[] = { |
53879
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
318 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
|
319 |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
320 /* 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
|
321 /* |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
322 xxxxxxx. |
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 */ |
53936
4dd0e0a7fd9e
(struct fringe_bitmap): Change member bits from char to
Kim F. Storm <storm@cua.dk>
parents:
53900
diff
changeset
|
336 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
|
337 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
|
338 |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
339 /* 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
|
340 /* |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
341 xxxxxxx. |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
342 x.....x. |
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 xxxxxxx. |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
354 */ |
53936
4dd0e0a7fd9e
(struct fringe_bitmap): Change member bits from char to
Kim F. Storm <storm@cua.dk>
parents:
53900
diff
changeset
|
355 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
|
356 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
|
357 |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
358 /* 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
|
359 /* |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
360 xx...... |
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 */ |
53936
4dd0e0a7fd9e
(struct fringe_bitmap): Change member bits from char to
Kim F. Storm <storm@cua.dk>
parents:
53900
diff
changeset
|
374 static unsigned short bar_cursor_bits[] = { |
53879
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
375 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
|
376 |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
377 /* 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
|
378 /* |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
379 xxxxxxx. |
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 */ |
53936
4dd0e0a7fd9e
(struct fringe_bitmap): Change member bits from char to
Kim F. Storm <storm@cua.dk>
parents:
53900
diff
changeset
|
382 static unsigned short hbar_cursor_bits[] = { |
53879
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
383 0xfe, 0xfe}; |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
384 |
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 /* 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
|
387 `indicate-empty-lines' is non-nil. */ |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
388 /* |
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 ..xxxx.. |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
391 ........ |
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 ..xxxx.. |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
394 ........ |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
395 */ |
53936
4dd0e0a7fd9e
(struct fringe_bitmap): Change member bits from char to
Kim F. Storm <storm@cua.dk>
parents:
53900
diff
changeset
|
396 static unsigned short zv_bits[] = { |
53879
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
397 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
|
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 |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
406 /* Hollow square bitmap. */ |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
407 /* |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
408 .xxxxxx. |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
409 .x....x. |
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 .xxxxxx. |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
414 */ |
53936
4dd0e0a7fd9e
(struct fringe_bitmap): Change member bits from char to
Kim F. Storm <storm@cua.dk>
parents:
53900
diff
changeset
|
415 static unsigned short hollow_square_bits[] = { |
53879
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
416 0x7e, 0x42, 0x42, 0x42, 0x42, 0x7e}; |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
417 |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
418 |
53936
4dd0e0a7fd9e
(struct fringe_bitmap): Change member bits from char to
Kim F. Storm <storm@cua.dk>
parents:
53900
diff
changeset
|
419 #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
|
420 #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
|
421 #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
|
422 |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
423 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
|
424 { |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
425 { 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
|
426 { 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
|
427 { 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
|
428 { 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
|
429 { 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
|
430 { 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
|
431 { 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
|
432 { 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
|
433 { 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
|
434 { 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
|
435 { 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
|
436 { 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
|
437 { 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
|
438 { 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
|
439 { 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
|
440 { 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
|
441 { 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
|
442 { 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
|
443 { 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
|
444 { 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
|
445 { 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
|
446 }; |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
447 |
57277
85230b6628b3
Remove limit on number of bitmaps.
Kim F. Storm <storm@cua.dk>
parents:
57270
diff
changeset
|
448 static struct fringe_bitmap **fringe_bitmaps; |
85230b6628b3
Remove limit on number of bitmaps.
Kim F. Storm <storm@cua.dk>
parents:
57270
diff
changeset
|
449 static unsigned *fringe_faces; |
85230b6628b3
Remove limit on number of bitmaps.
Kim F. Storm <storm@cua.dk>
parents:
57270
diff
changeset
|
450 static int max_fringe_bitmaps; |
53879
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
451 |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
452 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
|
453 |
57270 | 454 |
455 /* Lookup bitmap number for symbol BITMAP. | |
456 Return 0 if not a bitmap. */ | |
53879
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
457 |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
458 int |
57270 | 459 lookup_fringe_bitmap (bitmap) |
57258
36eef73e00fa
(Vfringe_bitmaps): New variable.
Kim F. Storm <storm@cua.dk>
parents:
57246
diff
changeset
|
460 Lisp_Object bitmap; |
36eef73e00fa
(Vfringe_bitmaps): New variable.
Kim F. Storm <storm@cua.dk>
parents:
57246
diff
changeset
|
461 { |
36eef73e00fa
(Vfringe_bitmaps): New variable.
Kim F. Storm <storm@cua.dk>
parents:
57246
diff
changeset
|
462 int bn; |
36eef73e00fa
(Vfringe_bitmaps): New variable.
Kim F. Storm <storm@cua.dk>
parents:
57246
diff
changeset
|
463 |
57270 | 464 bitmap = Fget (bitmap, Qfringe); |
57258
36eef73e00fa
(Vfringe_bitmaps): New variable.
Kim F. Storm <storm@cua.dk>
parents:
57246
diff
changeset
|
465 if (!INTEGERP (bitmap)) |
36eef73e00fa
(Vfringe_bitmaps): New variable.
Kim F. Storm <storm@cua.dk>
parents:
57246
diff
changeset
|
466 return 0; |
36eef73e00fa
(Vfringe_bitmaps): New variable.
Kim F. Storm <storm@cua.dk>
parents:
57246
diff
changeset
|
467 |
36eef73e00fa
(Vfringe_bitmaps): New variable.
Kim F. Storm <storm@cua.dk>
parents:
57246
diff
changeset
|
468 bn = XINT (bitmap); |
57270 | 469 if (bn > NO_FRINGE_BITMAP |
470 && bn < max_used_fringe_bitmap | |
471 && (bn < MAX_STANDARD_FRINGE_BITMAPS | |
472 || fringe_bitmaps[bn] != NULL)) | |
473 return bn; | |
474 | |
475 return 0; | |
57258
36eef73e00fa
(Vfringe_bitmaps): New variable.
Kim F. Storm <storm@cua.dk>
parents:
57246
diff
changeset
|
476 } |
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 /* Get fringe bitmap name for bitmap number BN. |
36eef73e00fa
(Vfringe_bitmaps): New variable.
Kim F. Storm <storm@cua.dk>
parents:
57246
diff
changeset
|
479 |
36eef73e00fa
(Vfringe_bitmaps): New variable.
Kim F. Storm <storm@cua.dk>
parents:
57246
diff
changeset
|
480 Found by traversing Vfringe_bitmaps comparing BN to the |
36eef73e00fa
(Vfringe_bitmaps): New variable.
Kim F. Storm <storm@cua.dk>
parents:
57246
diff
changeset
|
481 fringe property for each symbol. |
36eef73e00fa
(Vfringe_bitmaps): New variable.
Kim F. Storm <storm@cua.dk>
parents:
57246
diff
changeset
|
482 |
36eef73e00fa
(Vfringe_bitmaps): New variable.
Kim F. Storm <storm@cua.dk>
parents:
57246
diff
changeset
|
483 Return BN if not found in Vfringe_bitmaps. */ |
36eef73e00fa
(Vfringe_bitmaps): New variable.
Kim F. Storm <storm@cua.dk>
parents:
57246
diff
changeset
|
484 |
36eef73e00fa
(Vfringe_bitmaps): New variable.
Kim F. Storm <storm@cua.dk>
parents:
57246
diff
changeset
|
485 static Lisp_Object |
36eef73e00fa
(Vfringe_bitmaps): New variable.
Kim F. Storm <storm@cua.dk>
parents:
57246
diff
changeset
|
486 get_fringe_bitmap_name (bn) |
36eef73e00fa
(Vfringe_bitmaps): New variable.
Kim F. Storm <storm@cua.dk>
parents:
57246
diff
changeset
|
487 int bn; |
53879
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
488 { |
57258
36eef73e00fa
(Vfringe_bitmaps): New variable.
Kim F. Storm <storm@cua.dk>
parents:
57246
diff
changeset
|
489 Lisp_Object bitmaps; |
36eef73e00fa
(Vfringe_bitmaps): New variable.
Kim F. Storm <storm@cua.dk>
parents:
57246
diff
changeset
|
490 Lisp_Object num; |
36eef73e00fa
(Vfringe_bitmaps): New variable.
Kim F. Storm <storm@cua.dk>
parents:
57246
diff
changeset
|
491 |
36eef73e00fa
(Vfringe_bitmaps): New variable.
Kim F. Storm <storm@cua.dk>
parents:
57246
diff
changeset
|
492 /* Zero means no bitmap -- return nil. */ |
36eef73e00fa
(Vfringe_bitmaps): New variable.
Kim F. Storm <storm@cua.dk>
parents:
57246
diff
changeset
|
493 if (bn <= 0) |
36eef73e00fa
(Vfringe_bitmaps): New variable.
Kim F. Storm <storm@cua.dk>
parents:
57246
diff
changeset
|
494 return Qnil; |
36eef73e00fa
(Vfringe_bitmaps): New variable.
Kim F. Storm <storm@cua.dk>
parents:
57246
diff
changeset
|
495 |
36eef73e00fa
(Vfringe_bitmaps): New variable.
Kim F. Storm <storm@cua.dk>
parents:
57246
diff
changeset
|
496 bitmaps = Vfringe_bitmaps; |
36eef73e00fa
(Vfringe_bitmaps): New variable.
Kim F. Storm <storm@cua.dk>
parents:
57246
diff
changeset
|
497 num = make_number (bn); |
36eef73e00fa
(Vfringe_bitmaps): New variable.
Kim F. Storm <storm@cua.dk>
parents:
57246
diff
changeset
|
498 |
36eef73e00fa
(Vfringe_bitmaps): New variable.
Kim F. Storm <storm@cua.dk>
parents:
57246
diff
changeset
|
499 while (CONSP (bitmaps)) |
36eef73e00fa
(Vfringe_bitmaps): New variable.
Kim F. Storm <storm@cua.dk>
parents:
57246
diff
changeset
|
500 { |
36eef73e00fa
(Vfringe_bitmaps): New variable.
Kim F. Storm <storm@cua.dk>
parents:
57246
diff
changeset
|
501 Lisp_Object bitmap = XCAR (bitmaps); |
36eef73e00fa
(Vfringe_bitmaps): New variable.
Kim F. Storm <storm@cua.dk>
parents:
57246
diff
changeset
|
502 if (EQ (num, Fget (bitmap, Qfringe))) |
36eef73e00fa
(Vfringe_bitmaps): New variable.
Kim F. Storm <storm@cua.dk>
parents:
57246
diff
changeset
|
503 return bitmap; |
36eef73e00fa
(Vfringe_bitmaps): New variable.
Kim F. Storm <storm@cua.dk>
parents:
57246
diff
changeset
|
504 bitmaps = XCDR (bitmaps); |
36eef73e00fa
(Vfringe_bitmaps): New variable.
Kim F. Storm <storm@cua.dk>
parents:
57246
diff
changeset
|
505 } |
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 return num; |
53879
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
508 } |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
509 |
57258
36eef73e00fa
(Vfringe_bitmaps): New variable.
Kim F. Storm <storm@cua.dk>
parents:
57246
diff
changeset
|
510 |
53879
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
511 /* 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
|
512 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
|
513 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
|
514 drawn. |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
515 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
|
516 */ |
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 void |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
519 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
|
520 struct window *w; |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
521 struct glyph_row *row; |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
522 int left_p, overlay; |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
523 enum fringe_bitmap_type which; |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
524 { |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
525 struct frame *f = XFRAME (WINDOW_FRAME (w)); |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
526 struct draw_fringe_bitmap_params p; |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
527 struct fringe_bitmap *fb; |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
528 int period; |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
529 int face_id = DEFAULT_FACE_ID; |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
530 |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
531 p.cursor_p = 0; |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
532 p.overlay_p = (overlay & 1) == 1; |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
533 p.cursor_p = (overlay & 2) == 2; |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
534 |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
535 if (which != NO_FRINGE_BITMAP) |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
536 { |
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 else if (left_p) |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
539 { |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
540 which = row->left_fringe_bitmap; |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
541 face_id = row->left_fringe_face_id; |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
542 } |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
543 else |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
544 { |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
545 which = row->right_fringe_bitmap; |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
546 face_id = row->right_fringe_face_id; |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
547 } |
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 if (face_id == DEFAULT_FACE_ID) |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
550 face_id = fringe_faces[which]; |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
551 |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
552 fb = fringe_bitmaps[which]; |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
553 if (fb == NULL) |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
554 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
|
555 ? which : UNDEF_FRINGE_BITMAP]; |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
556 |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
557 period = fb->period; |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
558 |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
559 /* Convert row to frame coordinates. */ |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
560 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
|
561 |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
562 p.which = which; |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
563 p.bits = fb->bits; |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
564 p.wd = fb->width; |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
565 |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
566 p.h = fb->height; |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
567 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
|
568 p.h -= p.dh; |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
569 /* Clip bitmap if too high. */ |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
570 if (p.h > row->height) |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
571 p.h = row->height; |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
572 |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
573 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
|
574 |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
575 if (p.face == NULL) |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
576 { |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
577 /* Why does this happen? ++kfs */ |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
578 return; |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
579 } |
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 PREPARE_FACE_FOR_DISPLAY (f, p.face); |
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 /* 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
|
584 the fringe. */ |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
585 p.bx = -1; |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
586 if (left_p) |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
587 { |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
588 int wd = WINDOW_LEFT_FRINGE_WIDTH (w); |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
589 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
|
590 ? LEFT_MARGIN_AREA |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
591 : TEXT_AREA)); |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
592 if (p.wd > wd) |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
593 p.wd = wd; |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
594 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
|
595 |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
596 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
|
597 { |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
598 /* 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
|
599 wd -= ((!WINDOW_LEFTMOST_P (w) |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
600 && !WINDOW_HAS_VERTICAL_SCROLL_BAR (w)) |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
601 ? 1 : 0); |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
602 p.bx = x - wd; |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
603 p.nx = wd; |
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 } |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
606 else |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
607 { |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
608 int x = window_box_right (w, |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
609 (WINDOW_HAS_FRINGES_OUTSIDE_MARGINS (w) |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
610 ? RIGHT_MARGIN_AREA |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
611 : TEXT_AREA)); |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
612 int wd = WINDOW_RIGHT_FRINGE_WIDTH (w); |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
613 if (p.wd > wd) |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
614 p.wd = wd; |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
615 p.x = x + (wd - p.wd) / 2; |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
616 /* 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
|
617 the fringe. */ |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
618 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
|
619 { |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
620 p.bx = x; |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
621 p.nx = wd; |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
622 } |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
623 } |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
624 |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
625 if (p.bx >= 0) |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
626 { |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
627 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
|
628 |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
629 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
|
630 p.ny = row->visible_height; |
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 /* 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
|
634 switch (fb->align) |
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 case ALIGN_BITMAP_CENTER: |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
637 p.y += (row->height - p.h) / 2; |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
638 break; |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
639 case ALIGN_BITMAP_BOTTOM: |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
640 p.h = fb->height; |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
641 p.y += (row->visible_height - p.h); |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
642 break; |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
643 case ALIGN_BITMAP_TOP: |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
644 break; |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
645 } |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
646 |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
647 rif->draw_fringe_bitmap (w, row, &p); |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
648 } |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
649 |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
650 void |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
651 draw_fringe_bitmap (w, row, left_p) |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
652 struct window *w; |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
653 struct glyph_row *row; |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
654 int left_p; |
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 int overlay = 0; |
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 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
|
659 { |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
660 int cursor = NO_FRINGE_BITMAP; |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
661 |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
662 switch (w->phys_cursor_type) |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
663 { |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
664 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
|
665 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
|
666 cursor = HOLLOW_BOX_CURSOR_BITMAP; |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
667 else |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
668 cursor = HOLLOW_SQUARE_BITMAP; |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
669 break; |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
670 case FILLED_BOX_CURSOR: |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
671 cursor = FILLED_BOX_CURSOR_BITMAP; |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
672 break; |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
673 case BAR_CURSOR: |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
674 cursor = BAR_CURSOR_BITMAP; |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
675 break; |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
676 case HBAR_CURSOR: |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
677 cursor = HBAR_CURSOR_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 NO_CURSOR: |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
680 default: |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
681 w->phys_cursor_on_p = 0; |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
682 row->cursor_in_fringe_p = 0; |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
683 break; |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
684 } |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
685 if (cursor != NO_FRINGE_BITMAP) |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
686 { |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
687 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
|
688 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
|
689 } |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
690 } |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
691 |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
692 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
|
693 |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
694 if (left_p && row->overlay_arrow_p) |
54230
256374267423
(draw_fringe_bitmap): Use w->overlay_arrow_bitmap if set.
Kim F. Storm <storm@cua.dk>
parents:
54220
diff
changeset
|
695 draw_fringe_bitmap_1 (w, row, 1, 1, |
256374267423
(draw_fringe_bitmap): Use w->overlay_arrow_bitmap if set.
Kim F. Storm <storm@cua.dk>
parents:
54220
diff
changeset
|
696 (w->overlay_arrow_bitmap |
256374267423
(draw_fringe_bitmap): Use w->overlay_arrow_bitmap if set.
Kim F. Storm <storm@cua.dk>
parents:
54220
diff
changeset
|
697 ? w->overlay_arrow_bitmap |
256374267423
(draw_fringe_bitmap): Use w->overlay_arrow_bitmap if set.
Kim F. Storm <storm@cua.dk>
parents:
54220
diff
changeset
|
698 : OVERLAY_ARROW_BITMAP)); |
53879
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 |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
702 /* 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
|
703 function with input blocked. */ |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
704 |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
705 void |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
706 draw_row_fringe_bitmaps (w, row) |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
707 struct window *w; |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
708 struct glyph_row *row; |
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 xassert (interrupt_input_blocked); |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
711 |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
712 /* 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
|
713 don't have to draw anything. */ |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
714 if (row->visible_height <= 0) |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
715 return; |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
716 |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
717 if (WINDOW_LEFT_FRINGE_WIDTH (w) != 0) |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
718 draw_fringe_bitmap (w, row, 1); |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
719 |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
720 if (WINDOW_RIGHT_FRINGE_WIDTH (w) != 0) |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
721 draw_fringe_bitmap (w, row, 0); |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
722 } |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
723 |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
724 /* Draw the fringes of window W. Only fringes for rows marked for |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
725 update in redraw_fringe_bitmaps_p are drawn. */ |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
726 |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
727 void |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
728 draw_window_fringes (w) |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
729 struct window *w; |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
730 { |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
731 struct glyph_row *row; |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
732 int yb = window_text_bottom_y (w); |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
733 int nrows = w->current_matrix->nrows; |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
734 int y = 0, rn; |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
735 |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
736 if (w->pseudo_window_p) |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
737 return; |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
738 |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
739 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
|
740 y < yb && rn < nrows; |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
741 y += row->height, ++row, ++rn) |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
742 { |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
743 if (!row->redraw_fringe_bitmaps_p) |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
744 continue; |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
745 draw_row_fringe_bitmaps (w, row); |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
746 row->redraw_fringe_bitmaps_p = 0; |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
747 } |
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 |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
750 |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
751 /* Recalculate the bitmaps to show in the fringes of window W. |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
752 If FORCE_P is 0, only mark rows with modified bitmaps for update in |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
753 redraw_fringe_bitmaps_p; else mark all rows for update. */ |
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 int |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
756 update_window_fringes (w, force_p) |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
757 struct window *w; |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
758 int force_p; |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
759 { |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
760 struct glyph_row *row, *cur = 0; |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
761 int yb = window_text_bottom_y (w); |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
762 int rn, nrows = w->current_matrix->nrows; |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
763 int y; |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
764 int redraw_p = 0; |
57246
36ab9b017a42
(update_window_fringes): Handle new formats of
Kim F. Storm <storm@cua.dk>
parents:
54230
diff
changeset
|
765 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
|
766 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
|
767 Lisp_Object empty_pos; |
36ab9b017a42
(update_window_fringes): Handle new formats of
Kim F. Storm <storm@cua.dk>
parents:
54230
diff
changeset
|
768 Lisp_Object ind = Qnil; |
53879
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
769 |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
770 if (w->pseudo_window_p) |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
771 return 0; |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
772 |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
773 if (!MINI_WINDOW_P (w) |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
774 && (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
|
775 { |
57246
36ab9b017a42
(update_window_fringes): Handle new formats of
Kim F. Storm <storm@cua.dk>
parents:
54230
diff
changeset
|
776 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
|
777 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
|
778 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
|
779 { |
36ab9b017a42
(update_window_fringes): Handle new formats of
Kim F. Storm <storm@cua.dk>
parents:
54230
diff
changeset
|
780 Lisp_Object pos; |
36ab9b017a42
(update_window_fringes): Handle new formats of
Kim F. Storm <storm@cua.dk>
parents:
54230
diff
changeset
|
781 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
|
782 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
|
783 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
|
784 boundary_top = XCDR (pos); |
36ab9b017a42
(update_window_fringes): Handle new formats of
Kim F. Storm <storm@cua.dk>
parents:
54230
diff
changeset
|
785 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
|
786 boundary_bot = XCDR (pos); |
36ab9b017a42
(update_window_fringes): Handle new formats of
Kim F. Storm <storm@cua.dk>
parents:
54230
diff
changeset
|
787 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
|
788 arrow_top = XCDR (pos); |
36ab9b017a42
(update_window_fringes): Handle new formats of
Kim F. Storm <storm@cua.dk>
parents:
54230
diff
changeset
|
789 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
|
790 arrow_bot = XCDR (pos); |
36ab9b017a42
(update_window_fringes): Handle new formats of
Kim F. Storm <storm@cua.dk>
parents:
54230
diff
changeset
|
791 } |
53879
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
792 else |
57246
36ab9b017a42
(update_window_fringes): Handle new formats of
Kim F. Storm <storm@cua.dk>
parents:
54230
diff
changeset
|
793 ind = Qnil; |
36ab9b017a42
(update_window_fringes): Handle new formats of
Kim F. Storm <storm@cua.dk>
parents:
54230
diff
changeset
|
794 } |
53879
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
795 |
57246
36ab9b017a42
(update_window_fringes): Handle new formats of
Kim F. Storm <storm@cua.dk>
parents:
54230
diff
changeset
|
796 if (!NILP (ind)) |
36ab9b017a42
(update_window_fringes): Handle new formats of
Kim F. Storm <storm@cua.dk>
parents:
54230
diff
changeset
|
797 { |
36ab9b017a42
(update_window_fringes): Handle new formats of
Kim F. Storm <storm@cua.dk>
parents:
54230
diff
changeset
|
798 int do_eob = 1, do_bob = 1; |
53879
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
799 |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
800 for (y = 0, rn = 0; |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
801 y < yb && rn < nrows; |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
802 y += row->height, ++rn) |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
803 { |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
804 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
|
805 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
|
806 |
53879
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
807 row = w->desired_matrix->rows + rn; |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
808 if (!row->enabled_p) |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
809 row = w->current_matrix->rows + rn; |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
810 |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
811 indicate_bob_p = row->indicate_bob_p; |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
812 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
|
813 indicate_eob_p = row->indicate_eob_p; |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
814 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
|
815 |
53879
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
816 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
|
817 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
|
818 |
57246
36ab9b017a42
(update_window_fringes): Handle new formats of
Kim F. Storm <storm@cua.dk>
parents:
54230
diff
changeset
|
819 if (!NILP (boundary_top) |
53879
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
820 && MATRIX_ROW_START_CHARPOS (row) <= BUF_BEGV (XBUFFER (w->buffer))) |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
821 row->indicate_bob_p = do_bob, do_bob = 0; |
57246
36ab9b017a42
(update_window_fringes): Handle new formats of
Kim F. Storm <storm@cua.dk>
parents:
54230
diff
changeset
|
822 else if (!NILP (arrow_top) |
53879
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
823 && (WINDOW_WANTS_HEADER_LINE_P (w) ? 1 : 0) == rn) |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
824 row->indicate_top_line_p = 1; |
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 (boundary_bot) |
53879
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
827 && MATRIX_ROW_END_CHARPOS (row) >= BUF_ZV (XBUFFER (w->buffer))) |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
828 row->indicate_eob_p = do_eob, do_eob = 0; |
57246
36ab9b017a42
(update_window_fringes): Handle new formats of
Kim F. Storm <storm@cua.dk>
parents:
54230
diff
changeset
|
829 else if (!NILP (arrow_bot) |
53879
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
830 && y + row->height >= yb) |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
831 row->indicate_bottom_line_p = 1; |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
832 |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
833 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
|
834 || 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
|
835 || indicate_eob_p != row->indicate_eob_p |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
836 || 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
|
837 row->redraw_fringe_bitmaps_p = 1; |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
838 } |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
839 } |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
840 |
57246
36ab9b017a42
(update_window_fringes): Handle new formats of
Kim F. Storm <storm@cua.dk>
parents:
54230
diff
changeset
|
841 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
|
842 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
|
843 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
|
844 |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
845 for (y = 0, rn = 0; |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
846 y < yb && rn < nrows; |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
847 y += row->height, rn++) |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
848 { |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
849 enum fringe_bitmap_type left, right; |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
850 unsigned left_face_id, right_face_id; |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
851 |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
852 row = w->desired_matrix->rows + rn; |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
853 cur = w->current_matrix->rows + rn; |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
854 if (!row->enabled_p) |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
855 row = cur; |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
856 |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
857 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
|
858 |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
859 /* 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
|
860 if (WINDOW_LEFT_FRINGE_WIDTH (w) == 0) |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
861 left = NO_FRINGE_BITMAP; |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
862 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
|
863 { |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
864 left = row->left_user_fringe_bitmap; |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
865 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
|
866 } |
57246
36ab9b017a42
(update_window_fringes): Handle new formats of
Kim F. Storm <storm@cua.dk>
parents:
54230
diff
changeset
|
867 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
|
868 left = ((row->indicate_eob_p && EQ (boundary_bot, Qleft)) |
53879
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
869 ? LEFT_BRACKET_BITMAP : TOP_LEFT_ANGLE_BITMAP); |
57246
36ab9b017a42
(update_window_fringes): Handle new formats of
Kim F. Storm <storm@cua.dk>
parents:
54230
diff
changeset
|
870 else if (row->indicate_eob_p && EQ (boundary_bot, Qleft)) |
53879
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
871 left = BOTTOM_LEFT_ANGLE_BITMAP; |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
872 else if (row->truncated_on_left_p) |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
873 left = LEFT_TRUNCATION_BITMAP; |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
874 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
|
875 left = CONTINUATION_LINE_BITMAP; |
57246
36ab9b017a42
(update_window_fringes): Handle new formats of
Kim F. Storm <storm@cua.dk>
parents:
54230
diff
changeset
|
876 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
|
877 left = ZV_LINE_BITMAP; |
57246
36ab9b017a42
(update_window_fringes): Handle new formats of
Kim F. Storm <storm@cua.dk>
parents:
54230
diff
changeset
|
878 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
|
879 left = UP_ARROW_BITMAP; |
57246
36ab9b017a42
(update_window_fringes): Handle new formats of
Kim F. Storm <storm@cua.dk>
parents:
54230
diff
changeset
|
880 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
|
881 left = DOWN_ARROW_BITMAP; |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
882 else |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
883 left = NO_FRINGE_BITMAP; |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
884 |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
885 /* 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
|
886 if (WINDOW_RIGHT_FRINGE_WIDTH (w) == 0) |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
887 right = NO_FRINGE_BITMAP; |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
888 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
|
889 { |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
890 right = row->right_user_fringe_bitmap; |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
891 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
|
892 } |
57246
36ab9b017a42
(update_window_fringes): Handle new formats of
Kim F. Storm <storm@cua.dk>
parents:
54230
diff
changeset
|
893 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
|
894 right = ((row->indicate_eob_p && EQ (boundary_bot, Qright)) |
53879
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
895 ? RIGHT_BRACKET_BITMAP : TOP_RIGHT_ANGLE_BITMAP); |
57246
36ab9b017a42
(update_window_fringes): Handle new formats of
Kim F. Storm <storm@cua.dk>
parents:
54230
diff
changeset
|
896 else if (row->indicate_eob_p && EQ (boundary_bot, Qright)) |
53879
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
897 right = BOTTOM_RIGHT_ANGLE_BITMAP; |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
898 else if (row->truncated_on_right_p) |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
899 right = RIGHT_TRUNCATION_BITMAP; |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
900 else if (row->continued_p) |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
901 right = CONTINUED_LINE_BITMAP; |
57246
36ab9b017a42
(update_window_fringes): Handle new formats of
Kim F. Storm <storm@cua.dk>
parents:
54230
diff
changeset
|
902 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
|
903 right = UP_ARROW_BITMAP; |
57246
36ab9b017a42
(update_window_fringes): Handle new formats of
Kim F. Storm <storm@cua.dk>
parents:
54230
diff
changeset
|
904 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
|
905 right = DOWN_ARROW_BITMAP; |
57246
36ab9b017a42
(update_window_fringes): Handle new formats of
Kim F. Storm <storm@cua.dk>
parents:
54230
diff
changeset
|
906 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
|
907 right = ZV_LINE_BITMAP; |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
908 else |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
909 right = NO_FRINGE_BITMAP; |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
910 |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
911 if (force_p |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
912 || row->y != cur->y |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
913 || row->visible_height != cur->visible_height |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
914 || left != cur->left_fringe_bitmap |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
915 || right != cur->right_fringe_bitmap |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
916 || 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
|
917 || 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
|
918 || cur->redraw_fringe_bitmaps_p) |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
919 { |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
920 redraw_p = row->redraw_fringe_bitmaps_p = cur->redraw_fringe_bitmaps_p = 1; |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
921 cur->left_fringe_bitmap = left; |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
922 cur->right_fringe_bitmap = right; |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
923 cur->left_fringe_face_id = left_face_id; |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
924 cur->right_fringe_face_id = right_face_id; |
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 |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
927 if (row->overlay_arrow_p != cur->overlay_arrow_p) |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
928 { |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
929 redraw_p = row->redraw_fringe_bitmaps_p = cur->redraw_fringe_bitmaps_p = 1; |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
930 cur->overlay_arrow_p = row->overlay_arrow_p; |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
931 } |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
932 |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
933 row->left_fringe_bitmap = left; |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
934 row->right_fringe_bitmap = right; |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
935 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
|
936 row->right_fringe_face_id = right_face_id; |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
937 } |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
938 |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
939 return redraw_p; |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
940 } |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
941 |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
942 |
54220
50ba59282051
(Fdefine_fringe_bitmap): Fix typo in docstring.
Juanma Barranquero <lekktu@gmail.com>
parents:
54079
diff
changeset
|
943 /* 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
|
944 |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
945 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
|
946 modified and F is visible. |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
947 |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
948 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
|
949 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
|
950 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
|
951 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
|
952 |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
953 We never make the fringes narrower than specified. It is planned |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
954 to make fringe bitmaps customizable and expandable, and at that |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
955 time, the user will typically specify the minimum number of pixels |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
956 needed for his bitmaps, so we shouldn't select anything less than |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
957 what is specified. |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
958 */ |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
959 |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
960 void |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
961 compute_fringe_widths (f, redraw) |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
962 struct frame *f; |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
963 int redraw; |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
964 { |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
965 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
|
966 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
|
967 int o_cols = FRAME_FRINGE_COLS (f); |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
968 |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
969 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
|
970 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
|
971 int left_fringe_width, right_fringe_width; |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
972 |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
973 if (!NILP (left_fringe)) |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
974 left_fringe = Fcdr (left_fringe); |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
975 if (!NILP (right_fringe)) |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
976 right_fringe = Fcdr (right_fringe); |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
977 |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
978 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
|
979 XINT (left_fringe)); |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
980 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
|
981 XINT (right_fringe)); |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
982 |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
983 if (left_fringe_width || right_fringe_width) |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
984 { |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
985 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
|
986 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
|
987 int conf_wid = left_wid + right_wid; |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
988 int font_wid = FRAME_COLUMN_WIDTH (f); |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
989 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
|
990 int real_wid = cols * font_wid; |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
991 if (left_wid && right_wid) |
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 if (left_fringe_width < 0) |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
994 { |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
995 /* 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
|
996 FRAME_LEFT_FRINGE_WIDTH (f) = left_wid; |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
997 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
|
998 } |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
999 else if (right_fringe_width < 0) |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1000 { |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1001 /* 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
|
1002 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
|
1003 FRAME_RIGHT_FRINGE_WIDTH (f) = right_wid; |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1004 } |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1005 else |
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 /* Adjust both fringes with an equal amount. |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1008 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
|
1009 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
|
1010 int fill = real_wid - conf_wid; |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1011 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
|
1012 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
|
1013 } |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1014 } |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1015 else if (left_fringe_width) |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1016 { |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1017 FRAME_LEFT_FRINGE_WIDTH (f) = real_wid; |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1018 FRAME_RIGHT_FRINGE_WIDTH (f) = 0; |
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 else |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1021 { |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1022 FRAME_LEFT_FRINGE_WIDTH (f) = 0; |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1023 FRAME_RIGHT_FRINGE_WIDTH (f) = real_wid; |
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 FRAME_FRINGE_COLS (f) = cols; |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1026 } |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1027 else |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1028 { |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1029 FRAME_LEFT_FRINGE_WIDTH (f) = 0; |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1030 FRAME_RIGHT_FRINGE_WIDTH (f) = 0; |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1031 FRAME_FRINGE_COLS (f) = 0; |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1032 } |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1033 |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1034 if (redraw && FRAME_VISIBLE_P (f)) |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1035 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
|
1036 o_right != FRAME_RIGHT_FRINGE_WIDTH (f) || |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1037 o_cols != FRAME_FRINGE_COLS (f)) |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1038 redraw_frame (f); |
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 |
57258
36eef73e00fa
(Vfringe_bitmaps): New variable.
Kim F. Storm <storm@cua.dk>
parents:
57246
diff
changeset
|
1041 |
57270 | 1042 /* Free resources used by a user-defined bitmap. */ |
1043 | |
1044 int | |
57258
36eef73e00fa
(Vfringe_bitmaps): New variable.
Kim F. Storm <storm@cua.dk>
parents:
57246
diff
changeset
|
1045 destroy_fringe_bitmap (n) |
36eef73e00fa
(Vfringe_bitmaps): New variable.
Kim F. Storm <storm@cua.dk>
parents:
57246
diff
changeset
|
1046 int n; |
53879
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 struct fringe_bitmap **fbp; |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1049 |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1050 fringe_faces[n] = FRINGE_FACE_ID; |
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 fbp = &fringe_bitmaps[n]; |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1053 if (*fbp && (*fbp)->dynamic) |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1054 { |
57267
617e54beffb6
* fringe.c (destroy_fringe_bitmap, init_fringe_bitmap)
Kim F. Storm <storm@cua.dk>
parents:
57258
diff
changeset
|
1055 if (rif && rif->destroy_fringe_bitmap) |
53879
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1056 rif->destroy_fringe_bitmap (n); |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1057 xfree (*fbp); |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1058 *fbp = NULL; |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1059 } |
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 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
|
1062 && 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
|
1063 max_used_fringe_bitmap--; |
57258
36eef73e00fa
(Vfringe_bitmaps): New variable.
Kim F. Storm <storm@cua.dk>
parents:
57246
diff
changeset
|
1064 } |
53879
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1065 |
57258
36eef73e00fa
(Vfringe_bitmaps): New variable.
Kim F. Storm <storm@cua.dk>
parents:
57246
diff
changeset
|
1066 |
36eef73e00fa
(Vfringe_bitmaps): New variable.
Kim F. Storm <storm@cua.dk>
parents:
57246
diff
changeset
|
1067 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
|
1068 1, 1, 0, |
36eef73e00fa
(Vfringe_bitmaps): New variable.
Kim F. Storm <storm@cua.dk>
parents:
57246
diff
changeset
|
1069 doc: /* Destroy fringe bitmap BITMAP. |
36eef73e00fa
(Vfringe_bitmaps): New variable.
Kim F. Storm <storm@cua.dk>
parents:
57246
diff
changeset
|
1070 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
|
1071 (bitmap) |
36eef73e00fa
(Vfringe_bitmaps): New variable.
Kim F. Storm <storm@cua.dk>
parents:
57246
diff
changeset
|
1072 Lisp_Object bitmap; |
36eef73e00fa
(Vfringe_bitmaps): New variable.
Kim F. Storm <storm@cua.dk>
parents:
57246
diff
changeset
|
1073 { |
36eef73e00fa
(Vfringe_bitmaps): New variable.
Kim F. Storm <storm@cua.dk>
parents:
57246
diff
changeset
|
1074 int n; |
36eef73e00fa
(Vfringe_bitmaps): New variable.
Kim F. Storm <storm@cua.dk>
parents:
57246
diff
changeset
|
1075 |
57270 | 1076 CHECK_SYMBOL (bitmap); |
1077 n = lookup_fringe_bitmap (bitmap); | |
1078 if (!n) | |
57258
36eef73e00fa
(Vfringe_bitmaps): New variable.
Kim F. Storm <storm@cua.dk>
parents:
57246
diff
changeset
|
1079 return Qnil; |
36eef73e00fa
(Vfringe_bitmaps): New variable.
Kim F. Storm <storm@cua.dk>
parents:
57246
diff
changeset
|
1080 |
36eef73e00fa
(Vfringe_bitmaps): New variable.
Kim F. Storm <storm@cua.dk>
parents:
57246
diff
changeset
|
1081 destroy_fringe_bitmap (n); |
36eef73e00fa
(Vfringe_bitmaps): New variable.
Kim F. Storm <storm@cua.dk>
parents:
57246
diff
changeset
|
1082 |
57270 | 1083 if (n >= MAX_STANDARD_FRINGE_BITMAPS) |
57258
36eef73e00fa
(Vfringe_bitmaps): New variable.
Kim F. Storm <storm@cua.dk>
parents:
57246
diff
changeset
|
1084 { |
57270 | 1085 Vfringe_bitmaps = Fdelq (bitmap, Vfringe_bitmaps); |
57258
36eef73e00fa
(Vfringe_bitmaps): New variable.
Kim F. Storm <storm@cua.dk>
parents:
57246
diff
changeset
|
1086 /* It would be better to remove the fringe property. */ |
57270 | 1087 Fput (bitmap, Qfringe, Qnil); |
57258
36eef73e00fa
(Vfringe_bitmaps): New variable.
Kim F. Storm <storm@cua.dk>
parents:
57246
diff
changeset
|
1088 } |
57270 | 1089 |
53879
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1090 return Qnil; |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1091 } |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1092 |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1093 |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1094 /* Initialize bitmap bit. |
53936
4dd0e0a7fd9e
(struct fringe_bitmap): Change member bits from char to
Kim F. Storm <storm@cua.dk>
parents:
53900
diff
changeset
|
1095 |
4dd0e0a7fd9e
(struct fringe_bitmap): Change member bits from char to
Kim F. Storm <storm@cua.dk>
parents:
53900
diff
changeset
|
1096 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
|
1097 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
|
1098 |
53955
7d8c228c1f02
(init_fringe_bitmap) [MAC_OS, WORDS_BIG_ENDIAN]: Perform byte-swapping.
Kim F. Storm <storm@cua.dk>
parents:
53940
diff
changeset
|
1099 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
|
1100 |
7d8c228c1f02
(init_fringe_bitmap) [MAC_OS, WORDS_BIG_ENDIAN]: Perform byte-swapping.
Kim F. Storm <storm@cua.dk>
parents:
53940
diff
changeset
|
1101 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
|
1102 */ |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1103 |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1104 void |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1105 init_fringe_bitmap (which, fb, once_p) |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1106 enum fringe_bitmap_type which; |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1107 struct fringe_bitmap *fb; |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1108 int once_p; |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1109 { |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1110 if (once_p || fb->dynamic) |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1111 { |
53936
4dd0e0a7fd9e
(struct fringe_bitmap): Change member bits from char to
Kim F. Storm <storm@cua.dk>
parents:
53900
diff
changeset
|
1112 #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
|
1113 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
|
1114 = { 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
|
1115 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
|
1116 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
|
1117 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
|
1118 unsigned short *bits = fb->bits; |
53879
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1119 int j; |
53936
4dd0e0a7fd9e
(struct fringe_bitmap): Change member bits from char to
Kim F. Storm <storm@cua.dk>
parents:
53900
diff
changeset
|
1120 |
4dd0e0a7fd9e
(struct fringe_bitmap): Change member bits from char to
Kim F. Storm <storm@cua.dk>
parents:
53900
diff
changeset
|
1121 if (fb->width <= 8) |
53879
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1122 { |
53936
4dd0e0a7fd9e
(struct fringe_bitmap): Change member bits from char to
Kim F. Storm <storm@cua.dk>
parents:
53900
diff
changeset
|
1123 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
|
1124 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
|
1125 { |
4dd0e0a7fd9e
(struct fringe_bitmap): Change member bits from char to
Kim F. Storm <storm@cua.dk>
parents:
53900
diff
changeset
|
1126 unsigned short b = *bits++; |
4dd0e0a7fd9e
(struct fringe_bitmap): Change member bits from char to
Kim F. Storm <storm@cua.dk>
parents:
53900
diff
changeset
|
1127 unsigned char c; |
4dd0e0a7fd9e
(struct fringe_bitmap): Change member bits from char to
Kim F. Storm <storm@cua.dk>
parents:
53900
diff
changeset
|
1128 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
|
1129 | (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
|
1130 *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
|
1131 } |
4dd0e0a7fd9e
(struct fringe_bitmap): Change member bits from char to
Kim F. Storm <storm@cua.dk>
parents:
53900
diff
changeset
|
1132 } |
4dd0e0a7fd9e
(struct fringe_bitmap): Change member bits from char to
Kim F. Storm <storm@cua.dk>
parents:
53900
diff
changeset
|
1133 else |
4dd0e0a7fd9e
(struct fringe_bitmap): Change member bits from char to
Kim F. Storm <storm@cua.dk>
parents:
53900
diff
changeset
|
1134 { |
4dd0e0a7fd9e
(struct fringe_bitmap): Change member bits from char to
Kim F. Storm <storm@cua.dk>
parents:
53900
diff
changeset
|
1135 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
|
1136 { |
4dd0e0a7fd9e
(struct fringe_bitmap): Change member bits from char to
Kim F. Storm <storm@cua.dk>
parents:
53900
diff
changeset
|
1137 unsigned short b = *bits; |
4dd0e0a7fd9e
(struct fringe_bitmap): Change member bits from char to
Kim F. Storm <storm@cua.dk>
parents:
53900
diff
changeset
|
1138 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
|
1139 | (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
|
1140 | (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
|
1141 | (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
|
1142 *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
|
1143 } |
53879
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1144 } |
53955
7d8c228c1f02
(init_fringe_bitmap) [MAC_OS, WORDS_BIG_ENDIAN]: Perform byte-swapping.
Kim F. Storm <storm@cua.dk>
parents:
53940
diff
changeset
|
1145 #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
|
1146 |
7d8c228c1f02
(init_fringe_bitmap) [MAC_OS, WORDS_BIG_ENDIAN]: Perform byte-swapping.
Kim F. Storm <storm@cua.dk>
parents:
53940
diff
changeset
|
1147 #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
|
1148 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
|
1149 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
|
1150 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
|
1151 { |
7d8c228c1f02
(init_fringe_bitmap) [MAC_OS, WORDS_BIG_ENDIAN]: Perform byte-swapping.
Kim F. Storm <storm@cua.dk>
parents:
53940
diff
changeset
|
1152 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
|
1153 *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
|
1154 } |
7d8c228c1f02
(init_fringe_bitmap) [MAC_OS, WORDS_BIG_ENDIAN]: Perform byte-swapping.
Kim F. Storm <storm@cua.dk>
parents:
53940
diff
changeset
|
1155 #endif /* MAC_OS && WORDS_BIG_ENDIAN */ |
53879
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 |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1158 if (!once_p) |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1159 { |
57258
36eef73e00fa
(Vfringe_bitmaps): New variable.
Kim F. Storm <storm@cua.dk>
parents:
57246
diff
changeset
|
1160 destroy_fringe_bitmap (which); |
53879
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1161 |
57267
617e54beffb6
* fringe.c (destroy_fringe_bitmap, init_fringe_bitmap)
Kim F. Storm <storm@cua.dk>
parents:
57258
diff
changeset
|
1162 if (rif && rif->define_fringe_bitmap) |
53879
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1163 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
|
1164 |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1165 fringe_bitmaps[which] = fb; |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1166 if (which >= max_used_fringe_bitmap) |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1167 max_used_fringe_bitmap = which + 1; |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1168 } |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1169 } |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1170 |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1171 |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1172 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
|
1173 2, 5, 0, |
36eef73e00fa
(Vfringe_bitmaps): New variable.
Kim F. Storm <storm@cua.dk>
parents:
57246
diff
changeset
|
1174 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
|
1175 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
|
1176 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
|
1177 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
|
1178 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
|
1179 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
|
1180 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
|
1181 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
|
1182 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
|
1183 should be repeated. |
57258
36eef73e00fa
(Vfringe_bitmaps): New variable.
Kim F. Storm <storm@cua.dk>
parents:
57246
diff
changeset
|
1184 If BITMAP already exists, the existing definition is replaced. */) |
36eef73e00fa
(Vfringe_bitmaps): New variable.
Kim F. Storm <storm@cua.dk>
parents:
57246
diff
changeset
|
1185 (bitmap, bits, height, width, align) |
36eef73e00fa
(Vfringe_bitmaps): New variable.
Kim F. Storm <storm@cua.dk>
parents:
57246
diff
changeset
|
1186 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
|
1187 { |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1188 Lisp_Object len; |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1189 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
|
1190 unsigned short *b; |
53879
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1191 struct fringe_bitmap fb, *xfb; |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1192 int fill1 = 0, fill2 = 0; |
57258
36eef73e00fa
(Vfringe_bitmaps): New variable.
Kim F. Storm <storm@cua.dk>
parents:
57246
diff
changeset
|
1193 |
57270 | 1194 CHECK_SYMBOL (bitmap); |
57258
36eef73e00fa
(Vfringe_bitmaps): New variable.
Kim F. Storm <storm@cua.dk>
parents:
57246
diff
changeset
|
1195 |
53879
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1196 if (!STRINGP (bits) && !VECTORP (bits)) |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1197 bits = wrong_type_argument (Qstringp, bits); |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1198 |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1199 len = Flength (bits); |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1200 |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1201 if (NILP (height)) |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1202 h = fb.height = XINT (len); |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1203 else |
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 CHECK_NUMBER (height); |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1206 fb.height = min (XINT (height), 255); |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1207 if (fb.height > XINT (len)) |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1208 { |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1209 h = XINT (len); |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1210 fill1 = (fb.height - h) / 2; |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1211 fill2 = fb.height - h - fill1; |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1212 } |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1213 } |
54220
50ba59282051
(Fdefine_fringe_bitmap): Fix typo in docstring.
Juanma Barranquero <lekktu@gmail.com>
parents:
54079
diff
changeset
|
1214 |
53879
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1215 if (NILP (width)) |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1216 fb.width = 8; |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1217 else |
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 CHECK_NUMBER (width); |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1220 fb.width = min (XINT (width), 255); |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1221 } |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1222 |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1223 fb.period = 0; |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1224 fb.align = ALIGN_BITMAP_CENTER; |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1225 |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1226 if (CONSP (align)) |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1227 { |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1228 Lisp_Object period = XCDR (align); |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1229 if (CONSP (period)) |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1230 { |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1231 period = XCAR (period); |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1232 if (!NILP (period)) |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1233 { |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1234 fb.period = fb.height; |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1235 fb.height = 255; |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1236 } |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1237 } |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1238 align = XCAR (align); |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1239 } |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1240 if (EQ (align, Qtop)) |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1241 fb.align = ALIGN_BITMAP_TOP; |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1242 else if (EQ (align, Qbottom)) |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1243 fb.align = ALIGN_BITMAP_BOTTOM; |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1244 else if (!NILP (align) && !EQ (align, Qcenter)) |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1245 error ("Bad align argument"); |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1246 |
57277
85230b6628b3
Remove limit on number of bitmaps.
Kim F. Storm <storm@cua.dk>
parents:
57270
diff
changeset
|
1247 n = lookup_fringe_bitmap (bitmap); |
57270 | 1248 if (!n) |
53879
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1249 { |
57277
85230b6628b3
Remove limit on number of bitmaps.
Kim F. Storm <storm@cua.dk>
parents:
57270
diff
changeset
|
1250 if (max_used_fringe_bitmap < max_fringe_bitmaps) |
53966
26dc8943ee64
Lisp_Object/int mixup.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
53955
diff
changeset
|
1251 n = max_used_fringe_bitmap++; |
53879
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1252 else |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1253 { |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1254 for (n = MAX_STANDARD_FRINGE_BITMAPS; |
57277
85230b6628b3
Remove limit on number of bitmaps.
Kim F. Storm <storm@cua.dk>
parents:
57270
diff
changeset
|
1255 n < max_fringe_bitmaps; |
53879
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1256 n++) |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1257 if (fringe_bitmaps[n] == NULL) |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1258 break; |
57277
85230b6628b3
Remove limit on number of bitmaps.
Kim F. Storm <storm@cua.dk>
parents:
57270
diff
changeset
|
1259 |
85230b6628b3
Remove limit on number of bitmaps.
Kim F. Storm <storm@cua.dk>
parents:
57270
diff
changeset
|
1260 if (n == max_fringe_bitmaps) |
85230b6628b3
Remove limit on number of bitmaps.
Kim F. Storm <storm@cua.dk>
parents:
57270
diff
changeset
|
1261 { |
85230b6628b3
Remove limit on number of bitmaps.
Kim F. Storm <storm@cua.dk>
parents:
57270
diff
changeset
|
1262 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
|
1263 error ("No free fringe bitmap slots"); |
85230b6628b3
Remove limit on number of bitmaps.
Kim F. Storm <storm@cua.dk>
parents:
57270
diff
changeset
|
1264 |
85230b6628b3
Remove limit on number of bitmaps.
Kim F. Storm <storm@cua.dk>
parents:
57270
diff
changeset
|
1265 i = max_fringe_bitmaps; |
85230b6628b3
Remove limit on number of bitmaps.
Kim F. Storm <storm@cua.dk>
parents:
57270
diff
changeset
|
1266 max_fringe_bitmaps += 20; |
85230b6628b3
Remove limit on number of bitmaps.
Kim F. Storm <storm@cua.dk>
parents:
57270
diff
changeset
|
1267 fringe_bitmaps |
85230b6628b3
Remove limit on number of bitmaps.
Kim F. Storm <storm@cua.dk>
parents:
57270
diff
changeset
|
1268 = ((struct fringe_bitmap **) |
85230b6628b3
Remove limit on number of bitmaps.
Kim F. Storm <storm@cua.dk>
parents:
57270
diff
changeset
|
1269 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
|
1270 fringe_faces |
85230b6628b3
Remove limit on number of bitmaps.
Kim F. Storm <storm@cua.dk>
parents:
57270
diff
changeset
|
1271 = (unsigned *) xrealloc (fringe_faces, max_fringe_bitmaps * sizeof (unsigned)); |
85230b6628b3
Remove limit on number of bitmaps.
Kim F. Storm <storm@cua.dk>
parents:
57270
diff
changeset
|
1272 |
85230b6628b3
Remove limit on number of bitmaps.
Kim F. Storm <storm@cua.dk>
parents:
57270
diff
changeset
|
1273 for (; i < max_fringe_bitmaps; i++) |
85230b6628b3
Remove limit on number of bitmaps.
Kim F. Storm <storm@cua.dk>
parents:
57270
diff
changeset
|
1274 { |
85230b6628b3
Remove limit on number of bitmaps.
Kim F. Storm <storm@cua.dk>
parents:
57270
diff
changeset
|
1275 fringe_bitmaps[i] = NULL; |
85230b6628b3
Remove limit on number of bitmaps.
Kim F. Storm <storm@cua.dk>
parents:
57270
diff
changeset
|
1276 fringe_faces[i] = FRINGE_FACE_ID; |
85230b6628b3
Remove limit on number of bitmaps.
Kim F. Storm <storm@cua.dk>
parents:
57270
diff
changeset
|
1277 } |
85230b6628b3
Remove limit on number of bitmaps.
Kim F. Storm <storm@cua.dk>
parents:
57270
diff
changeset
|
1278 } |
53879
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1279 } |
57258
36eef73e00fa
(Vfringe_bitmaps): New variable.
Kim F. Storm <storm@cua.dk>
parents:
57246
diff
changeset
|
1280 |
57270 | 1281 Vfringe_bitmaps = Fcons (bitmap, Vfringe_bitmaps); |
1282 Fput (bitmap, Qfringe, make_number (n)); | |
53879
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 fb.dynamic = 1; |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1286 |
54079
e1b6171f91b8
(Fdefine_fringe_bitmap): Use && instead of & to avoid
Andreas Schwab <schwab@suse.de>
parents:
53970
diff
changeset
|
1287 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
|
1288 + fb.height * BYTES_PER_BITMAP_ROW); |
e1b6171f91b8
(Fdefine_fringe_bitmap): Use && instead of & to avoid
Andreas Schwab <schwab@suse.de>
parents:
53970
diff
changeset
|
1289 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
|
1290 bzero (b, fb.height); |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1291 |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1292 j = 0; |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1293 while (j < fb.height) |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1294 { |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1295 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
|
1296 b[j++] = 0; |
54079
e1b6171f91b8
(Fdefine_fringe_bitmap): Use && instead of & to avoid
Andreas Schwab <schwab@suse.de>
parents:
53970
diff
changeset
|
1297 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
|
1298 { |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1299 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
|
1300 b[j++] = NUMBERP (elt) ? XINT (elt) : 0; |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1301 } |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1302 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
|
1303 b[j++] = 0; |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1304 } |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1305 |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1306 *xfb = fb; |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1307 |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1308 init_fringe_bitmap (n, xfb, 0); |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1309 |
57270 | 1310 return bitmap; |
53879
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1311 } |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1312 |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1313 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
|
1314 1, 2, 0, |
57258
36eef73e00fa
(Vfringe_bitmaps): New variable.
Kim F. Storm <storm@cua.dk>
parents:
57246
diff
changeset
|
1315 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
|
1316 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
|
1317 (bitmap, face) |
36eef73e00fa
(Vfringe_bitmaps): New variable.
Kim F. Storm <storm@cua.dk>
parents:
57246
diff
changeset
|
1318 Lisp_Object bitmap, face; |
53879
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1319 { |
57270 | 1320 int n; |
53879
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1321 int face_id; |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1322 |
57270 | 1323 CHECK_SYMBOL (bitmap); |
1324 n = lookup_fringe_bitmap (bitmap); | |
1325 if (!n) | |
57258
36eef73e00fa
(Vfringe_bitmaps): New variable.
Kim F. Storm <storm@cua.dk>
parents:
57246
diff
changeset
|
1326 error ("Undefined fringe bitmap"); |
53879
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1327 |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1328 if (!NILP (face)) |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1329 { |
89909 | 1330 face_id = lookup_named_face (SELECTED_FRAME (), face); |
53879
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1331 if (face_id < 0) |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1332 error ("No such face"); |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1333 } |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1334 else |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1335 face_id = FRINGE_FACE_ID; |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1336 |
57270 | 1337 fringe_faces[n] = face_id; |
53879
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 return Qnil; |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1340 } |
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 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
|
1343 0, 2, 0, |
54220
50ba59282051
(Fdefine_fringe_bitmap): Fix typo in docstring.
Juanma Barranquero <lekktu@gmail.com>
parents:
54079
diff
changeset
|
1344 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
|
1345 If WINDOW is nil, use selected window. If POS is nil, use value of point |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1346 in that window. Return value is a cons (LEFT . RIGHT) where LEFT and RIGHT |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1347 are the fringe bitmap numbers for the bitmaps in the left and right fringe, |
57246
36ab9b017a42
(update_window_fringes): Handle new formats of
Kim F. Storm <storm@cua.dk>
parents:
54230
diff
changeset
|
1348 resp. If left or right fringe is empty, the corresponding element is nil. |
36ab9b017a42
(update_window_fringes): Handle new formats of
Kim F. Storm <storm@cua.dk>
parents:
54230
diff
changeset
|
1349 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
|
1350 (pos, window) |
53940
33cf8d1b409d
(Ffringe_bitmaps_at_pos): Add missing arg declarations.
Kim F. Storm <storm@cua.dk>
parents:
53936
diff
changeset
|
1351 Lisp_Object pos, window; |
53879
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 struct window *w; |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1354 struct buffer *old_buffer = NULL; |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1355 struct glyph_row *row; |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1356 int textpos; |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1357 |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1358 if (NILP (window)) |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1359 window = selected_window; |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1360 CHECK_WINDOW (window); |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1361 w = XWINDOW (window); |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1362 |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1363 if (!NILP (pos)) |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1364 { |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1365 CHECK_NUMBER_COERCE_MARKER (pos); |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1366 textpos = XINT (pos); |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1367 } |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1368 else if (w == XWINDOW (selected_window)) |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1369 textpos = PT; |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1370 else |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1371 textpos = XMARKER (w->pointm)->charpos; |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1372 |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1373 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
|
1374 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
|
1375 if (row) |
57258
36eef73e00fa
(Vfringe_bitmaps): New variable.
Kim F. Storm <storm@cua.dk>
parents:
57246
diff
changeset
|
1376 return Fcons (get_fringe_bitmap_name (row->left_fringe_bitmap), |
36eef73e00fa
(Vfringe_bitmaps): New variable.
Kim F. Storm <storm@cua.dk>
parents:
57246
diff
changeset
|
1377 get_fringe_bitmap_name (row->right_fringe_bitmap)); |
53879
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1378 else |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1379 return Qnil; |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1380 } |
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 |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1383 /*********************************************************************** |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1384 Initialization |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1385 ***********************************************************************/ |
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 void |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1388 syms_of_fringe () |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1389 { |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1390 defsubr (&Sdestroy_fringe_bitmap); |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1391 defsubr (&Sdefine_fringe_bitmap); |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1392 defsubr (&Sfringe_bitmaps_at_pos); |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1393 defsubr (&Sset_fringe_bitmap_face); |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1394 |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1395 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
|
1396 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
|
1397 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
|
1398 (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
|
1399 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
|
1400 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
|
1401 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
|
1402 Voverflow_newline_into_fringe = Qt; |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1403 |
57258
36eef73e00fa
(Vfringe_bitmaps): New variable.
Kim F. Storm <storm@cua.dk>
parents:
57246
diff
changeset
|
1404 DEFVAR_LISP ("fringe-bitmaps", &Vfringe_bitmaps, |
36eef73e00fa
(Vfringe_bitmaps): New variable.
Kim F. Storm <storm@cua.dk>
parents:
57246
diff
changeset
|
1405 doc: /* List of fringe bitmap symbols. |
36eef73e00fa
(Vfringe_bitmaps): New variable.
Kim F. Storm <storm@cua.dk>
parents:
57246
diff
changeset
|
1406 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
|
1407 Vfringe_bitmaps = Qnil; |
53879
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 |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1410 /* Initialize this module when Emacs starts. */ |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1411 |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1412 void |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1413 init_fringe_once () |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1414 { |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1415 enum fringe_bitmap_type bt; |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1416 |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1417 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
|
1418 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
|
1419 } |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1420 |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1421 void |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1422 init_fringe () |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1423 { |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1424 int i; |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1425 |
57277
85230b6628b3
Remove limit on number of bitmaps.
Kim F. Storm <storm@cua.dk>
parents:
57270
diff
changeset
|
1426 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
|
1427 |
85230b6628b3
Remove limit on number of bitmaps.
Kim F. Storm <storm@cua.dk>
parents:
57270
diff
changeset
|
1428 fringe_bitmaps |
85230b6628b3
Remove limit on number of bitmaps.
Kim F. Storm <storm@cua.dk>
parents:
57270
diff
changeset
|
1429 = (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
|
1430 fringe_faces |
85230b6628b3
Remove limit on number of bitmaps.
Kim F. Storm <storm@cua.dk>
parents:
57270
diff
changeset
|
1431 = (unsigned *) xmalloc (max_fringe_bitmaps * sizeof (unsigned)); |
85230b6628b3
Remove limit on number of bitmaps.
Kim F. Storm <storm@cua.dk>
parents:
57270
diff
changeset
|
1432 |
85230b6628b3
Remove limit on number of bitmaps.
Kim F. Storm <storm@cua.dk>
parents:
57270
diff
changeset
|
1433 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
|
1434 { |
85230b6628b3
Remove limit on number of bitmaps.
Kim F. Storm <storm@cua.dk>
parents:
57270
diff
changeset
|
1435 fringe_bitmaps[i] = NULL; |
85230b6628b3
Remove limit on number of bitmaps.
Kim F. Storm <storm@cua.dk>
parents:
57270
diff
changeset
|
1436 fringe_faces[i] = FRINGE_FACE_ID; |
85230b6628b3
Remove limit on number of bitmaps.
Kim F. Storm <storm@cua.dk>
parents:
57270
diff
changeset
|
1437 } |
53879
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 |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1440 #ifdef HAVE_NTGUI |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1441 |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1442 void |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1443 w32_init_fringe () |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1444 { |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1445 enum fringe_bitmap_type bt; |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1446 |
57267
617e54beffb6
* fringe.c (destroy_fringe_bitmap, init_fringe_bitmap)
Kim F. Storm <storm@cua.dk>
parents:
57258
diff
changeset
|
1447 if (!rif) |
617e54beffb6
* fringe.c (destroy_fringe_bitmap, init_fringe_bitmap)
Kim F. Storm <storm@cua.dk>
parents:
57258
diff
changeset
|
1448 return; |
617e54beffb6
* fringe.c (destroy_fringe_bitmap, init_fringe_bitmap)
Kim F. Storm <storm@cua.dk>
parents:
57258
diff
changeset
|
1449 |
53879
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1450 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
|
1451 { |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1452 struct fringe_bitmap *fb = &standard_bitmaps[bt]; |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1453 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
|
1454 } |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1455 } |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1456 |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1457 void |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1458 w32_reset_fringes () |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1459 { |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1460 /* Destroy row bitmaps. */ |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1461 int bt; |
54220
50ba59282051
(Fdefine_fringe_bitmap): Fix typo in docstring.
Juanma Barranquero <lekktu@gmail.com>
parents:
54079
diff
changeset
|
1462 |
57267
617e54beffb6
* fringe.c (destroy_fringe_bitmap, init_fringe_bitmap)
Kim F. Storm <storm@cua.dk>
parents:
57258
diff
changeset
|
1463 if (!rif) |
617e54beffb6
* fringe.c (destroy_fringe_bitmap, init_fringe_bitmap)
Kim F. Storm <storm@cua.dk>
parents:
57258
diff
changeset
|
1464 return; |
617e54beffb6
* fringe.c (destroy_fringe_bitmap, init_fringe_bitmap)
Kim F. Storm <storm@cua.dk>
parents:
57258
diff
changeset
|
1465 |
53879
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1466 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
|
1467 rif->destroy_fringe_bitmap (bt); |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1468 } |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1469 |
53955
7d8c228c1f02
(init_fringe_bitmap) [MAC_OS, WORDS_BIG_ENDIAN]: Perform byte-swapping.
Kim F. Storm <storm@cua.dk>
parents:
53940
diff
changeset
|
1470 #endif /* HAVE_NTGUI */ |
53879
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1471 |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1472 #endif /* HAVE_WINDOW_SYSTEM */ |
e3771c262410
New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff
changeset
|
1473 |
53900 | 1474 /* arch-tag: 04596920-43eb-473d-b319-82712338162d |
1475 (do not change this comment) */ |