annotate src/fringe.c @ 111773:7db1ebaea814

mail/rmailmm.el (rmail-mime-insert-multipart): For unsupported multipart subtypes, insert all as usual.
author Kenichi Handa <handa@m17n.org>
date Fri, 26 Nov 2010 21:58:41 +0900
parents f6f0d450d542
children 60516122d066 376148b31b5e
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
53879
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
1 /* Fringe handling (split from xdisp.c).
64770
a0d1312ede66 Update years in copyright notice; nfc.
Thien-Thi Nguyen <ttn@gnuvola.org>
parents: 64084
diff changeset
2 Copyright (C) 1985, 1986, 1987, 1988, 1993, 1994, 1995, 1997,
75227
e90d04cd455a Update copyright for years from Emacs 21 to present (mainly adding
Glenn Morris <rgm@gnu.org>
parents: 71834
diff changeset
3 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
106815
1d1d5d9bd884 Add 2010 to copyright years.
Glenn Morris <rgm@gnu.org>
parents: 105959
diff changeset
4 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
53879
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
5
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
6 This file is part of GNU Emacs.
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
7
94963
8971ddf55736 Switch to recommended form of GPLv3 permissions notice.
Glenn Morris <rgm@gnu.org>
parents: 94420
diff changeset
8 GNU Emacs is free software: you can redistribute it and/or modify
53879
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
9 it under the terms of the GNU General Public License as published by
94963
8971ddf55736 Switch to recommended form of GPLv3 permissions notice.
Glenn Morris <rgm@gnu.org>
parents: 94420
diff changeset
10 the Free Software Foundation, either version 3 of the License, or
8971ddf55736 Switch to recommended form of GPLv3 permissions notice.
Glenn Morris <rgm@gnu.org>
parents: 94420
diff changeset
11 (at your option) any later version.
53879
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
12
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
13 GNU Emacs is distributed in the hope that it will be useful,
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
14 but WITHOUT ANY WARRANTY; without even the implied warranty of
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
16 GNU General Public License for more details.
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
17
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
18 You should have received a copy of the GNU General Public License
94963
8971ddf55736 Switch to recommended form of GPLv3 permissions notice.
Glenn Morris <rgm@gnu.org>
parents: 94420
diff changeset
19 along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
53879
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
20
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
21 #include <config.h>
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
22 #include <stdio.h>
105669
68dd71358159 * alloc.c: Do not define struct catchtag.
Dan Nicolaescu <dann@ics.uci.edu>
parents: 103062
diff changeset
23 #include <setjmp.h>
53879
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"
83037
03a73693678e Merged in changes from CVS HEAD
Karoly Lorentey <lorentey@elte.hu>
parents: 53970
diff changeset
31 #include "termhooks.h"
53879
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
32
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
33 #ifdef HAVE_WINDOW_SYSTEM
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
34
57258
36eef73e00fa (Vfringe_bitmaps): New variable.
Kim F. Storm <storm@cua.dk>
parents: 57246
diff changeset
35 extern Lisp_Object Qfringe;
53879
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
36 extern Lisp_Object Qtop, Qbottom, Qcenter;
57246
36ab9b017a42 (update_window_fringes): Handle new formats of
Kim F. Storm <storm@cua.dk>
parents: 54230
diff changeset
37 extern Lisp_Object Qup, Qdown, Qleft, Qright;
53879
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
38
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
39 /* Non-nil means that newline may flow into the right fringe. */
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
40
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
41 Lisp_Object Voverflow_newline_into_fringe;
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
42
57258
36eef73e00fa (Vfringe_bitmaps): New variable.
Kim F. Storm <storm@cua.dk>
parents: 57246
diff changeset
43 /* List of known fringe bitmap symbols.
36eef73e00fa (Vfringe_bitmaps): New variable.
Kim F. Storm <storm@cua.dk>
parents: 57246
diff changeset
44
36eef73e00fa (Vfringe_bitmaps): New variable.
Kim F. Storm <storm@cua.dk>
parents: 57246
diff changeset
45 The fringe bitmap number is stored in the `fringe' property on
36eef73e00fa (Vfringe_bitmaps): New variable.
Kim F. Storm <storm@cua.dk>
parents: 57246
diff changeset
46 those symbols. Names for the built-in bitmaps are installed by
36eef73e00fa (Vfringe_bitmaps): New variable.
Kim F. Storm <storm@cua.dk>
parents: 57246
diff changeset
47 loading fringe.el.
36eef73e00fa (Vfringe_bitmaps): New variable.
Kim F. Storm <storm@cua.dk>
parents: 57246
diff changeset
48 */
36eef73e00fa (Vfringe_bitmaps): New variable.
Kim F. Storm <storm@cua.dk>
parents: 57246
diff changeset
49
36eef73e00fa (Vfringe_bitmaps): New variable.
Kim F. Storm <storm@cua.dk>
parents: 57246
diff changeset
50 Lisp_Object Vfringe_bitmaps;
53879
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
51
69049
28b3892bfcda (enum fringe_bitmap_type): Remove. Change all uses
Kim F. Storm <storm@cua.dk>
parents: 68651
diff changeset
52 /* Fringe bitmaps are represented in three different ways:
28b3892bfcda (enum fringe_bitmap_type): Remove. Change all uses
Kim F. Storm <storm@cua.dk>
parents: 68651
diff changeset
53
28b3892bfcda (enum fringe_bitmap_type): Remove. Change all uses
Kim F. Storm <storm@cua.dk>
parents: 68651
diff changeset
54 Logical bitmaps are used internally to denote things like
28b3892bfcda (enum fringe_bitmap_type): Remove. Change all uses
Kim F. Storm <storm@cua.dk>
parents: 68651
diff changeset
55 'end-of-buffer', 'left-truncation', 'overlay-arrow', etc.
28b3892bfcda (enum fringe_bitmap_type): Remove. Change all uses
Kim F. Storm <storm@cua.dk>
parents: 68651
diff changeset
56
28b3892bfcda (enum fringe_bitmap_type): Remove. Change all uses
Kim F. Storm <storm@cua.dk>
parents: 68651
diff changeset
57 Physical bitmaps specify the visual appearence of the bitmap,
28b3892bfcda (enum fringe_bitmap_type): Remove. Change all uses
Kim F. Storm <storm@cua.dk>
parents: 68651
diff changeset
58 e.g. 'bottom-left-angle', 'left-arrow', 'left-triangle', etc.
28b3892bfcda (enum fringe_bitmap_type): Remove. Change all uses
Kim F. Storm <storm@cua.dk>
parents: 68651
diff changeset
59 User defined bitmaps are physical bitmaps.
28b3892bfcda (enum fringe_bitmap_type): Remove. Change all uses
Kim F. Storm <storm@cua.dk>
parents: 68651
diff changeset
60
28b3892bfcda (enum fringe_bitmap_type): Remove. Change all uses
Kim F. Storm <storm@cua.dk>
parents: 68651
diff changeset
61 Internally, fringe bitmaps for a specific display row are
28b3892bfcda (enum fringe_bitmap_type): Remove. Change all uses
Kim F. Storm <storm@cua.dk>
parents: 68651
diff changeset
62 represented as a simple integer that is used as an index
28b3892bfcda (enum fringe_bitmap_type): Remove. Change all uses
Kim F. Storm <storm@cua.dk>
parents: 68651
diff changeset
63 into the table of all defined bitmaps. This index is stored
28b3892bfcda (enum fringe_bitmap_type): Remove. Change all uses
Kim F. Storm <storm@cua.dk>
parents: 68651
diff changeset
64 in the `fringe' property of the physical bitmap symbol.
28b3892bfcda (enum fringe_bitmap_type): Remove. Change all uses
Kim F. Storm <storm@cua.dk>
parents: 68651
diff changeset
65
28b3892bfcda (enum fringe_bitmap_type): Remove. Change all uses
Kim F. Storm <storm@cua.dk>
parents: 68651
diff changeset
66 Logical bitmaps are mapped to physical bitmaps through the
28b3892bfcda (enum fringe_bitmap_type): Remove. Change all uses
Kim F. Storm <storm@cua.dk>
parents: 68651
diff changeset
67 buffer-local `fringe-indicator-alist' variable.
28b3892bfcda (enum fringe_bitmap_type): Remove. Change all uses
Kim F. Storm <storm@cua.dk>
parents: 68651
diff changeset
68
28b3892bfcda (enum fringe_bitmap_type): Remove. Change all uses
Kim F. Storm <storm@cua.dk>
parents: 68651
diff changeset
69 Each element of this alist is a cons (LOGICAL . PHYSICAL)
28b3892bfcda (enum fringe_bitmap_type): Remove. Change all uses
Kim F. Storm <storm@cua.dk>
parents: 68651
diff changeset
70 mapping a logical bitmap to a physical bitmap.
28b3892bfcda (enum fringe_bitmap_type): Remove. Change all uses
Kim F. Storm <storm@cua.dk>
parents: 68651
diff changeset
71 PHYSICAL is either a symbol to use in both left and right fringe,
28b3892bfcda (enum fringe_bitmap_type): Remove. Change all uses
Kim F. Storm <storm@cua.dk>
parents: 68651
diff changeset
72 or a cons of two symbols (LEFT . RIGHT) denoting different
28b3892bfcda (enum fringe_bitmap_type): Remove. Change all uses
Kim F. Storm <storm@cua.dk>
parents: 68651
diff changeset
73 bitmaps to use in left and right fringe.
28b3892bfcda (enum fringe_bitmap_type): Remove. Change all uses
Kim F. Storm <storm@cua.dk>
parents: 68651
diff changeset
74
28b3892bfcda (enum fringe_bitmap_type): Remove. Change all uses
Kim F. Storm <storm@cua.dk>
parents: 68651
diff changeset
75 LOGICAL is first looked up in the window's buffer's buffer-local
28b3892bfcda (enum fringe_bitmap_type): Remove. Change all uses
Kim F. Storm <storm@cua.dk>
parents: 68651
diff changeset
76 value of the fringe-indicator-alist variable, and if not present,
28b3892bfcda (enum fringe_bitmap_type): Remove. Change all uses
Kim F. Storm <storm@cua.dk>
parents: 68651
diff changeset
77 in the global value of fringe-indicator-alist.
28b3892bfcda (enum fringe_bitmap_type): Remove. Change all uses
Kim F. Storm <storm@cua.dk>
parents: 68651
diff changeset
78
28b3892bfcda (enum fringe_bitmap_type): Remove. Change all uses
Kim F. Storm <storm@cua.dk>
parents: 68651
diff changeset
79 If LOGICAL is not present in either alist, or the PHYSICAL value
28b3892bfcda (enum fringe_bitmap_type): Remove. Change all uses
Kim F. Storm <storm@cua.dk>
parents: 68651
diff changeset
80 found is nil, no bitmap is shown for the logical bitmap.
28b3892bfcda (enum fringe_bitmap_type): Remove. Change all uses
Kim F. Storm <storm@cua.dk>
parents: 68651
diff changeset
81
28b3892bfcda (enum fringe_bitmap_type): Remove. Change all uses
Kim F. Storm <storm@cua.dk>
parents: 68651
diff changeset
82 The `left-fringe' and `right-fringe' display properties
28b3892bfcda (enum fringe_bitmap_type): Remove. Change all uses
Kim F. Storm <storm@cua.dk>
parents: 68651
diff changeset
83 must specify physical bitmap symbols.
28b3892bfcda (enum fringe_bitmap_type): Remove. Change all uses
Kim F. Storm <storm@cua.dk>
parents: 68651
diff changeset
84 */
28b3892bfcda (enum fringe_bitmap_type): Remove. Change all uses
Kim F. Storm <storm@cua.dk>
parents: 68651
diff changeset
85
28b3892bfcda (enum fringe_bitmap_type): Remove. Change all uses
Kim F. Storm <storm@cua.dk>
parents: 68651
diff changeset
86 extern Lisp_Object Qunknown;
28b3892bfcda (enum fringe_bitmap_type): Remove. Change all uses
Kim F. Storm <storm@cua.dk>
parents: 68651
diff changeset
87 Lisp_Object Qtruncation, Qcontinuation, Qoverlay_arrow;
28b3892bfcda (enum fringe_bitmap_type): Remove. Change all uses
Kim F. Storm <storm@cua.dk>
parents: 68651
diff changeset
88 Lisp_Object Qempty_line, Qtop_bottom;
28b3892bfcda (enum fringe_bitmap_type): Remove. Change all uses
Kim F. Storm <storm@cua.dk>
parents: 68651
diff changeset
89 extern Lisp_Object Qbar, Qhbar, Qbox, Qhollow;
28b3892bfcda (enum fringe_bitmap_type): Remove. Change all uses
Kim F. Storm <storm@cua.dk>
parents: 68651
diff changeset
90 Lisp_Object Qhollow_small;
53879
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
91
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
92 enum fringe_bitmap_align
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 ALIGN_BITMAP_CENTER = 0,
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
95 ALIGN_BITMAP_TOP,
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
96 ALIGN_BITMAP_BOTTOM
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 struct fringe_bitmap
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
100 {
53936
4dd0e0a7fd9e (struct fringe_bitmap): Change member bits from char to
Kim F. Storm <storm@cua.dk>
parents: 53900
diff changeset
101 unsigned short *bits;
53879
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
102 unsigned height : 8;
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
103 unsigned width : 8;
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
104 unsigned period : 8;
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
105 unsigned align : 2;
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
106 unsigned dynamic : 1;
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
107 };
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
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
110 /***********************************************************************
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
111 Fringe bitmaps
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
112 ***********************************************************************/
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
113
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
114 /* Undefined bitmap. A question mark. */
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
115 /*
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
116 ..xxxx..
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
117 .xxxxxx.
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
118 xx....xx
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
119 xx....xx
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
120 ....xx..
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
121 ...xx...
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 ........
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
124 ...xx...
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
125 ...xx...
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
126 */
69049
28b3892bfcda (enum fringe_bitmap_type): Remove. Change all uses
Kim F. Storm <storm@cua.dk>
parents: 68651
diff changeset
127 static unsigned short question_mark_bits[] = {
53879
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
128 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
129
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
130 /* An arrow like this: `<-'. */
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 left_arrow_bits[] = {
53879
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
142 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
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 /* Right truncation 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 ....xx..
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
149 .....xx.
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
150 ..xxxxxx
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
151 ..xxxxxx
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 right_arrow_bits[] = {
53879
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
157 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
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 /* Up 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 ..xxxx..
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
164 .xxxxxx.
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
165 xxxxxxxx
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
166 ...xx...
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
167 ...xx...
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
168 ...xx...
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 up_arrow_bits[] = {
53879
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
172 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
173
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
174
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
175 /* Down arrow bitmap. */
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
176 /*
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
177 ...xx...
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 ...xx...
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
180 ...xx...
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
181 xxxxxxxx
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
182 .xxxxxx.
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
183 ..xxxx..
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
184 ...xx...
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
185 */
53936
4dd0e0a7fd9e (struct fringe_bitmap): Change member bits from char to
Kim F. Storm <storm@cua.dk>
parents: 53900
diff changeset
186 static unsigned short down_arrow_bits[] = {
53879
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
187 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
188
69049
28b3892bfcda (enum fringe_bitmap_type): Remove. Change all uses
Kim F. Storm <storm@cua.dk>
parents: 68651
diff changeset
189 /* Marker for continuation lines. */
28b3892bfcda (enum fringe_bitmap_type): Remove. Change all uses
Kim F. Storm <storm@cua.dk>
parents: 68651
diff changeset
190 /*
28b3892bfcda (enum fringe_bitmap_type): Remove. Change all uses
Kim F. Storm <storm@cua.dk>
parents: 68651
diff changeset
191 ..xxxx..
28b3892bfcda (enum fringe_bitmap_type): Remove. Change all uses
Kim F. Storm <storm@cua.dk>
parents: 68651
diff changeset
192 .xxxxx..
28b3892bfcda (enum fringe_bitmap_type): Remove. Change all uses
Kim F. Storm <storm@cua.dk>
parents: 68651
diff changeset
193 xx......
28b3892bfcda (enum fringe_bitmap_type): Remove. Change all uses
Kim F. Storm <storm@cua.dk>
parents: 68651
diff changeset
194 xxx..x..
28b3892bfcda (enum fringe_bitmap_type): Remove. Change all uses
Kim F. Storm <storm@cua.dk>
parents: 68651
diff changeset
195 xxxxxx..
28b3892bfcda (enum fringe_bitmap_type): Remove. Change all uses
Kim F. Storm <storm@cua.dk>
parents: 68651
diff changeset
196 .xxxxx..
28b3892bfcda (enum fringe_bitmap_type): Remove. Change all uses
Kim F. Storm <storm@cua.dk>
parents: 68651
diff changeset
197 ..xxxx..
28b3892bfcda (enum fringe_bitmap_type): Remove. Change all uses
Kim F. Storm <storm@cua.dk>
parents: 68651
diff changeset
198 .xxxxx..
28b3892bfcda (enum fringe_bitmap_type): Remove. Change all uses
Kim F. Storm <storm@cua.dk>
parents: 68651
diff changeset
199 */
28b3892bfcda (enum fringe_bitmap_type): Remove. Change all uses
Kim F. Storm <storm@cua.dk>
parents: 68651
diff changeset
200 static unsigned short left_curly_arrow_bits[] = {
28b3892bfcda (enum fringe_bitmap_type): Remove. Change all uses
Kim F. Storm <storm@cua.dk>
parents: 68651
diff changeset
201 0x3c, 0x7c, 0xc0, 0xe4, 0xfc, 0x7c, 0x3c, 0x7c};
28b3892bfcda (enum fringe_bitmap_type): Remove. Change all uses
Kim F. Storm <storm@cua.dk>
parents: 68651
diff changeset
202
53879
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
203 /* Marker for continued lines. */
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
204 /*
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
205 ..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 ......xx
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
208 ..x..xxx
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
209 ..xxxxxx
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
210 ..xxxxx.
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
211 ..xxxx..
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
212 ..xxxxx.
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
213 */
69049
28b3892bfcda (enum fringe_bitmap_type): Remove. Change all uses
Kim F. Storm <storm@cua.dk>
parents: 68651
diff changeset
214 static unsigned short right_curly_arrow_bits[] = {
53879
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
215 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
216
69049
28b3892bfcda (enum fringe_bitmap_type): Remove. Change all uses
Kim F. Storm <storm@cua.dk>
parents: 68651
diff changeset
217 /* Reverse Overlay arrow bitmap. A triangular arrow. */
53879
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
218 /*
69049
28b3892bfcda (enum fringe_bitmap_type): Remove. Change all uses
Kim F. Storm <storm@cua.dk>
parents: 68651
diff changeset
219 ......xx
28b3892bfcda (enum fringe_bitmap_type): Remove. Change all uses
Kim F. Storm <storm@cua.dk>
parents: 68651
diff changeset
220 ....xxxx
28b3892bfcda (enum fringe_bitmap_type): Remove. Change all uses
Kim F. Storm <storm@cua.dk>
parents: 68651
diff changeset
221 ...xxxxx
28b3892bfcda (enum fringe_bitmap_type): Remove. Change all uses
Kim F. Storm <storm@cua.dk>
parents: 68651
diff changeset
222 ..xxxxxx
28b3892bfcda (enum fringe_bitmap_type): Remove. Change all uses
Kim F. Storm <storm@cua.dk>
parents: 68651
diff changeset
223 ..xxxxxx
28b3892bfcda (enum fringe_bitmap_type): Remove. Change all uses
Kim F. Storm <storm@cua.dk>
parents: 68651
diff changeset
224 ...xxxxx
28b3892bfcda (enum fringe_bitmap_type): Remove. Change all uses
Kim F. Storm <storm@cua.dk>
parents: 68651
diff changeset
225 ....xxxx
28b3892bfcda (enum fringe_bitmap_type): Remove. Change all uses
Kim F. Storm <storm@cua.dk>
parents: 68651
diff changeset
226 ......xx
53879
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
227 */
69049
28b3892bfcda (enum fringe_bitmap_type): Remove. Change all uses
Kim F. Storm <storm@cua.dk>
parents: 68651
diff changeset
228 static unsigned short left_triangle_bits[] = {
28b3892bfcda (enum fringe_bitmap_type): Remove. Change all uses
Kim F. Storm <storm@cua.dk>
parents: 68651
diff changeset
229 0x03, 0x0f, 0x1f, 0x3f, 0x3f, 0x1f, 0x0f, 0x03};
53879
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
230
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
231 /* Overlay arrow bitmap. A triangular arrow. */
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
232 /*
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
233 xx......
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
234 xxxx....
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
235 xxxxx...
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
236 xxxxxx..
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
237 xxxxxx..
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
238 xxxxx...
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
239 xxxx....
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 */
69049
28b3892bfcda (enum fringe_bitmap_type): Remove. Change all uses
Kim F. Storm <storm@cua.dk>
parents: 68651
diff changeset
242 static unsigned short right_triangle_bits[] = {
53879
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
243 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
244
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
245 /* First line bitmap. An top-left angle. */
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
246 /*
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
247 xxxxxx..
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 xx......
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 ........
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
255 */
53936
4dd0e0a7fd9e (struct fringe_bitmap): Change member bits from char to
Kim F. Storm <storm@cua.dk>
parents: 53900
diff changeset
256 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
257 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
258
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
259 /* First line bitmap. An right-up angle. */
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
260 /*
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
261 ..xxxxxx
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
262 ..xxxxxx
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 ........
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
269 */
53936
4dd0e0a7fd9e (struct fringe_bitmap): Change member bits from char to
Kim F. Storm <storm@cua.dk>
parents: 53900
diff changeset
270 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
271 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
272
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
273 /* Last line bitmap. An left-down angle. */
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
274 /*
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
275 ........
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
276 xx......
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 xxxxxx..
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 */
53936
4dd0e0a7fd9e (struct fringe_bitmap): Change member bits from char to
Kim F. Storm <storm@cua.dk>
parents: 53900
diff changeset
284 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
285 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
286
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
287 /* Last line bitmap. An right-down angle. */
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
288 /*
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
289 ........
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
290 ......xx
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
291 ......xx
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 ..xxxxxx
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
296 ..xxxxxx
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
297 */
53936
4dd0e0a7fd9e (struct fringe_bitmap): Change member bits from char to
Kim F. Storm <storm@cua.dk>
parents: 53900
diff changeset
298 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
299 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
300
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
301 /* First/last line bitmap. An left bracket. */
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
302 /*
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
303 xxxxxx..
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
304 xxxxxx..
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
305 xx......
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
306 xx......
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
307 xx......
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 xxxxxx..
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
312 xxxxxx..
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
313 */
53936
4dd0e0a7fd9e (struct fringe_bitmap): Change member bits from char to
Kim F. Storm <storm@cua.dk>
parents: 53900
diff changeset
314 static unsigned short left_bracket_bits[] = {
53879
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
315 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
316
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
317 /* First/last line bitmap. An right bracket. */
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
318 /*
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
319 ..xxxxxx
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
320 ..xxxxxx
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
321 ......xx
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
322 ......xx
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
323 ......xx
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
324 ......xx
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
325 ......xx
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
326 ......xx
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
327 ..xxxxxx
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
328 ..xxxxxx
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
329 */
53936
4dd0e0a7fd9e (struct fringe_bitmap): Change member bits from char to
Kim F. Storm <storm@cua.dk>
parents: 53900
diff changeset
330 static unsigned short right_bracket_bits[] = {
53879
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
331 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
332
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
333 /* 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
334 /*
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
335 xxxxxxx.
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
336 xxxxxxx.
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
337 xxxxxxx.
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
338 xxxxxxx.
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
339 xxxxxxx.
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
340 xxxxxxx.
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 xxxxxxx.
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
343 xxxxxxx.
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
344 xxxxxxx.
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
345 xxxxxxx.
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
346 xxxxxxx.
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
347 xxxxxxx.
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
348 */
69049
28b3892bfcda (enum fringe_bitmap_type): Remove. Change all uses
Kim F. Storm <storm@cua.dk>
parents: 68651
diff changeset
349 static unsigned short filled_rectangle_bits[] = {
53879
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
350 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
351
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
352 /* 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
353 /*
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
354 xxxxxxx.
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
355 x.....x.
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
356 x.....x.
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
357 x.....x.
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
358 x.....x.
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
359 x.....x.
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
360 x.....x.
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
361 x.....x.
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
362 x.....x.
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
363 x.....x.
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
364 x.....x.
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
365 x.....x.
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
366 xxxxxxx.
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
367 */
69049
28b3892bfcda (enum fringe_bitmap_type): Remove. Change all uses
Kim F. Storm <storm@cua.dk>
parents: 68651
diff changeset
368 static unsigned short hollow_rectangle_bits[] = {
53879
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
369 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
370
69049
28b3892bfcda (enum fringe_bitmap_type): Remove. Change all uses
Kim F. Storm <storm@cua.dk>
parents: 68651
diff changeset
371 /* Hollow square bitmap. */
28b3892bfcda (enum fringe_bitmap_type): Remove. Change all uses
Kim F. Storm <storm@cua.dk>
parents: 68651
diff changeset
372 /*
28b3892bfcda (enum fringe_bitmap_type): Remove. Change all uses
Kim F. Storm <storm@cua.dk>
parents: 68651
diff changeset
373 .xxxxxx.
28b3892bfcda (enum fringe_bitmap_type): Remove. Change all uses
Kim F. Storm <storm@cua.dk>
parents: 68651
diff changeset
374 .x....x.
28b3892bfcda (enum fringe_bitmap_type): Remove. Change all uses
Kim F. Storm <storm@cua.dk>
parents: 68651
diff changeset
375 .x....x.
28b3892bfcda (enum fringe_bitmap_type): Remove. Change all uses
Kim F. Storm <storm@cua.dk>
parents: 68651
diff changeset
376 .x....x.
28b3892bfcda (enum fringe_bitmap_type): Remove. Change all uses
Kim F. Storm <storm@cua.dk>
parents: 68651
diff changeset
377 .x....x.
28b3892bfcda (enum fringe_bitmap_type): Remove. Change all uses
Kim F. Storm <storm@cua.dk>
parents: 68651
diff changeset
378 .xxxxxx.
28b3892bfcda (enum fringe_bitmap_type): Remove. Change all uses
Kim F. Storm <storm@cua.dk>
parents: 68651
diff changeset
379 */
28b3892bfcda (enum fringe_bitmap_type): Remove. Change all uses
Kim F. Storm <storm@cua.dk>
parents: 68651
diff changeset
380 static unsigned short hollow_square_bits[] = {
28b3892bfcda (enum fringe_bitmap_type): Remove. Change all uses
Kim F. Storm <storm@cua.dk>
parents: 68651
diff changeset
381 0x7e, 0x42, 0x42, 0x42, 0x42, 0x7e};
28b3892bfcda (enum fringe_bitmap_type): Remove. Change all uses
Kim F. Storm <storm@cua.dk>
parents: 68651
diff changeset
382
28b3892bfcda (enum fringe_bitmap_type): Remove. Change all uses
Kim F. Storm <storm@cua.dk>
parents: 68651
diff changeset
383 /* Filled square bitmap. */
28b3892bfcda (enum fringe_bitmap_type): Remove. Change all uses
Kim F. Storm <storm@cua.dk>
parents: 68651
diff changeset
384 /*
28b3892bfcda (enum fringe_bitmap_type): Remove. Change all uses
Kim F. Storm <storm@cua.dk>
parents: 68651
diff changeset
385 .xxxxxx.
28b3892bfcda (enum fringe_bitmap_type): Remove. Change all uses
Kim F. Storm <storm@cua.dk>
parents: 68651
diff changeset
386 .xxxxxx.
28b3892bfcda (enum fringe_bitmap_type): Remove. Change all uses
Kim F. Storm <storm@cua.dk>
parents: 68651
diff changeset
387 .xxxxxx.
28b3892bfcda (enum fringe_bitmap_type): Remove. Change all uses
Kim F. Storm <storm@cua.dk>
parents: 68651
diff changeset
388 .xxxxxx.
28b3892bfcda (enum fringe_bitmap_type): Remove. Change all uses
Kim F. Storm <storm@cua.dk>
parents: 68651
diff changeset
389 .xxxxxx.
28b3892bfcda (enum fringe_bitmap_type): Remove. Change all uses
Kim F. Storm <storm@cua.dk>
parents: 68651
diff changeset
390 .xxxxxx.
28b3892bfcda (enum fringe_bitmap_type): Remove. Change all uses
Kim F. Storm <storm@cua.dk>
parents: 68651
diff changeset
391 */
28b3892bfcda (enum fringe_bitmap_type): Remove. Change all uses
Kim F. Storm <storm@cua.dk>
parents: 68651
diff changeset
392 static unsigned short filled_square_bits[] = {
28b3892bfcda (enum fringe_bitmap_type): Remove. Change all uses
Kim F. Storm <storm@cua.dk>
parents: 68651
diff changeset
393 0x7e, 0x7e, 0x7e, 0x7e, 0x7e, 0x7e};
28b3892bfcda (enum fringe_bitmap_type): Remove. Change all uses
Kim F. Storm <storm@cua.dk>
parents: 68651
diff changeset
394
53879
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
395 /* 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
396 /*
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
397 xx......
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
398 xx......
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
399 xx......
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
400 xx......
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
401 xx......
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
402 xx......
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
403 xx......
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
404 xx......
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
405 xx......
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
406 xx......
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
407 xx......
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
408 xx......
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
409 xx......
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
410 */
69049
28b3892bfcda (enum fringe_bitmap_type): Remove. Change all uses
Kim F. Storm <storm@cua.dk>
parents: 68651
diff changeset
411 static unsigned short vertical_bar_bits[] = {
53879
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
412 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
413
69063
fb4f4719e18b (horizontal_bar_bits): Rename from `horisontal_bar_bits'.
Juanma Barranquero <lekktu@gmail.com>
parents: 69049
diff changeset
414 /* HBar cursor bitmap. A horizontal bar; 2 pixels high. */
53879
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
415 /*
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
416 xxxxxxx.
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
417 xxxxxxx.
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
418 */
69063
fb4f4719e18b (horizontal_bar_bits): Rename from `horisontal_bar_bits'.
Juanma Barranquero <lekktu@gmail.com>
parents: 69049
diff changeset
419 static unsigned short horizontal_bar_bits[] = {
53879
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
420 0xfe, 0xfe};
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
421
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 /* 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
424 `indicate-empty-lines' is non-nil. */
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
425 /*
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
426 ........
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
427 ..xxxx..
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
428 ........
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
429 ........
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
430 ..xxxx..
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
431 ........
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
432 */
69049
28b3892bfcda (enum fringe_bitmap_type): Remove. Change all uses
Kim F. Storm <storm@cua.dk>
parents: 68651
diff changeset
433 static unsigned short empty_line_bits[] = {
53879
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
434 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
435 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
436 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
437 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
438 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
439 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
440 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
441 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
442
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
443
53936
4dd0e0a7fd9e (struct fringe_bitmap): Change member bits from char to
Kim F. Storm <storm@cua.dk>
parents: 53900
diff changeset
444 #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
445 #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
446 #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
447
69049
28b3892bfcda (enum fringe_bitmap_type): Remove. Change all uses
Kim F. Storm <storm@cua.dk>
parents: 68651
diff changeset
448 /* NOTE: The order of these bitmaps must match the sequence
28b3892bfcda (enum fringe_bitmap_type): Remove. Change all uses
Kim F. Storm <storm@cua.dk>
parents: 68651
diff changeset
449 used in fringe.el to define the corresponding symbols. */
28b3892bfcda (enum fringe_bitmap_type): Remove. Change all uses
Kim F. Storm <storm@cua.dk>
parents: 68651
diff changeset
450
28b3892bfcda (enum fringe_bitmap_type): Remove. Change all uses
Kim F. Storm <storm@cua.dk>
parents: 68651
diff changeset
451 struct fringe_bitmap standard_bitmaps[] =
53879
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
452 {
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
453 { NULL, 0, 0, 0, 0, 0 }, /* NO_FRINGE_BITMAP */
69049
28b3892bfcda (enum fringe_bitmap_type): Remove. Change all uses
Kim F. Storm <storm@cua.dk>
parents: 68651
diff changeset
454 { FRBITS (question_mark_bits), 8, 0, ALIGN_BITMAP_CENTER, 0 },
53879
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
455 { 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
456 { 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
457 { 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
458 { FRBITS (down_arrow_bits), 8, 0, ALIGN_BITMAP_BOTTOM, 0 },
69049
28b3892bfcda (enum fringe_bitmap_type): Remove. Change all uses
Kim F. Storm <storm@cua.dk>
parents: 68651
diff changeset
459 { FRBITS (left_curly_arrow_bits), 8, 0, ALIGN_BITMAP_CENTER, 0 },
28b3892bfcda (enum fringe_bitmap_type): Remove. Change all uses
Kim F. Storm <storm@cua.dk>
parents: 68651
diff changeset
460 { FRBITS (right_curly_arrow_bits), 8, 0, ALIGN_BITMAP_CENTER, 0 },
28b3892bfcda (enum fringe_bitmap_type): Remove. Change all uses
Kim F. Storm <storm@cua.dk>
parents: 68651
diff changeset
461 { FRBITS (left_triangle_bits), 8, 0, ALIGN_BITMAP_CENTER, 0 },
28b3892bfcda (enum fringe_bitmap_type): Remove. Change all uses
Kim F. Storm <storm@cua.dk>
parents: 68651
diff changeset
462 { FRBITS (right_triangle_bits), 8, 0, ALIGN_BITMAP_CENTER, 0 },
53879
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
463 { 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
464 { 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
465 { 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
466 { 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
467 { 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
468 { FRBITS (right_bracket_bits), 8, 0, ALIGN_BITMAP_CENTER, 0 },
69049
28b3892bfcda (enum fringe_bitmap_type): Remove. Change all uses
Kim F. Storm <storm@cua.dk>
parents: 68651
diff changeset
469 { FRBITS (filled_rectangle_bits), 8, 0, ALIGN_BITMAP_CENTER, 0 },
28b3892bfcda (enum fringe_bitmap_type): Remove. Change all uses
Kim F. Storm <storm@cua.dk>
parents: 68651
diff changeset
470 { FRBITS (hollow_rectangle_bits), 8, 0, ALIGN_BITMAP_CENTER, 0 },
28b3892bfcda (enum fringe_bitmap_type): Remove. Change all uses
Kim F. Storm <storm@cua.dk>
parents: 68651
diff changeset
471 { FRBITS (filled_square_bits), 8, 0, ALIGN_BITMAP_CENTER, 0 },
53879
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
472 { FRBITS (hollow_square_bits), 8, 0, ALIGN_BITMAP_CENTER, 0 },
69049
28b3892bfcda (enum fringe_bitmap_type): Remove. Change all uses
Kim F. Storm <storm@cua.dk>
parents: 68651
diff changeset
473 { FRBITS (vertical_bar_bits), 8, 0, ALIGN_BITMAP_CENTER, 0 },
69063
fb4f4719e18b (horizontal_bar_bits): Rename from `horisontal_bar_bits'.
Juanma Barranquero <lekktu@gmail.com>
parents: 69049
diff changeset
474 { FRBITS (horizontal_bar_bits), 8, 0, ALIGN_BITMAP_BOTTOM, 0 },
69049
28b3892bfcda (enum fringe_bitmap_type): Remove. Change all uses
Kim F. Storm <storm@cua.dk>
parents: 68651
diff changeset
475 { FRBITS (empty_line_bits), 8, 3, ALIGN_BITMAP_TOP, 0 },
53879
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
476 };
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
477
69049
28b3892bfcda (enum fringe_bitmap_type): Remove. Change all uses
Kim F. Storm <storm@cua.dk>
parents: 68651
diff changeset
478 #define NO_FRINGE_BITMAP 0
28b3892bfcda (enum fringe_bitmap_type): Remove. Change all uses
Kim F. Storm <storm@cua.dk>
parents: 68651
diff changeset
479 #define UNDEF_FRINGE_BITMAP 1
28b3892bfcda (enum fringe_bitmap_type): Remove. Change all uses
Kim F. Storm <storm@cua.dk>
parents: 68651
diff changeset
480 #define MAX_STANDARD_FRINGE_BITMAPS (sizeof(standard_bitmaps)/sizeof(standard_bitmaps[0]))
28b3892bfcda (enum fringe_bitmap_type): Remove. Change all uses
Kim F. Storm <storm@cua.dk>
parents: 68651
diff changeset
481
57277
85230b6628b3 Remove limit on number of bitmaps.
Kim F. Storm <storm@cua.dk>
parents: 57270
diff changeset
482 static struct fringe_bitmap **fringe_bitmaps;
59401
8f5e8e079790 (fringe_faces): Change to Lisp_Object pointer.
Kim F. Storm <storm@cua.dk>
parents: 58532
diff changeset
483 static Lisp_Object *fringe_faces;
57277
85230b6628b3 Remove limit on number of bitmaps.
Kim F. Storm <storm@cua.dk>
parents: 57270
diff changeset
484 static int max_fringe_bitmaps;
53879
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
485
96675
d45acf0c8d23 merging Emacs.app (NeXTstep port)
Adrian Robert <Adrian.B.Robert@gmail.com>
parents: 94963
diff changeset
486 int max_used_fringe_bitmap = MAX_STANDARD_FRINGE_BITMAPS;
53879
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
487
57270
bb98cba59362 Simplify last change.
Kim F. Storm <storm@cua.dk>
parents: 57267
diff changeset
488
bb98cba59362 Simplify last change.
Kim F. Storm <storm@cua.dk>
parents: 57267
diff changeset
489 /* Lookup bitmap number for symbol BITMAP.
bb98cba59362 Simplify last change.
Kim F. Storm <storm@cua.dk>
parents: 57267
diff changeset
490 Return 0 if not a bitmap. */
53879
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
491
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
492 int
57270
bb98cba59362 Simplify last change.
Kim F. Storm <storm@cua.dk>
parents: 57267
diff changeset
493 lookup_fringe_bitmap (bitmap)
57258
36eef73e00fa (Vfringe_bitmaps): New variable.
Kim F. Storm <storm@cua.dk>
parents: 57246
diff changeset
494 Lisp_Object bitmap;
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 int bn;
36eef73e00fa (Vfringe_bitmaps): New variable.
Kim F. Storm <storm@cua.dk>
parents: 57246
diff changeset
497
57270
bb98cba59362 Simplify last change.
Kim F. Storm <storm@cua.dk>
parents: 57267
diff changeset
498 bitmap = Fget (bitmap, Qfringe);
57258
36eef73e00fa (Vfringe_bitmaps): New variable.
Kim F. Storm <storm@cua.dk>
parents: 57246
diff changeset
499 if (!INTEGERP (bitmap))
36eef73e00fa (Vfringe_bitmaps): New variable.
Kim F. Storm <storm@cua.dk>
parents: 57246
diff changeset
500 return 0;
36eef73e00fa (Vfringe_bitmaps): New variable.
Kim F. Storm <storm@cua.dk>
parents: 57246
diff changeset
501
36eef73e00fa (Vfringe_bitmaps): New variable.
Kim F. Storm <storm@cua.dk>
parents: 57246
diff changeset
502 bn = XINT (bitmap);
57270
bb98cba59362 Simplify last change.
Kim F. Storm <storm@cua.dk>
parents: 57267
diff changeset
503 if (bn > NO_FRINGE_BITMAP
bb98cba59362 Simplify last change.
Kim F. Storm <storm@cua.dk>
parents: 57267
diff changeset
504 && bn < max_used_fringe_bitmap
bb98cba59362 Simplify last change.
Kim F. Storm <storm@cua.dk>
parents: 57267
diff changeset
505 && (bn < MAX_STANDARD_FRINGE_BITMAPS
bb98cba59362 Simplify last change.
Kim F. Storm <storm@cua.dk>
parents: 57267
diff changeset
506 || fringe_bitmaps[bn] != NULL))
bb98cba59362 Simplify last change.
Kim F. Storm <storm@cua.dk>
parents: 57267
diff changeset
507 return bn;
bb98cba59362 Simplify last change.
Kim F. Storm <storm@cua.dk>
parents: 57267
diff changeset
508
bb98cba59362 Simplify last change.
Kim F. Storm <storm@cua.dk>
parents: 57267
diff changeset
509 return 0;
57258
36eef73e00fa (Vfringe_bitmaps): New variable.
Kim F. Storm <storm@cua.dk>
parents: 57246
diff changeset
510 }
36eef73e00fa (Vfringe_bitmaps): New variable.
Kim F. Storm <storm@cua.dk>
parents: 57246
diff changeset
511
36eef73e00fa (Vfringe_bitmaps): New variable.
Kim F. Storm <storm@cua.dk>
parents: 57246
diff changeset
512 /* Get fringe bitmap name for bitmap number BN.
36eef73e00fa (Vfringe_bitmaps): New variable.
Kim F. Storm <storm@cua.dk>
parents: 57246
diff changeset
513
36eef73e00fa (Vfringe_bitmaps): New variable.
Kim F. Storm <storm@cua.dk>
parents: 57246
diff changeset
514 Found by traversing Vfringe_bitmaps comparing BN to the
36eef73e00fa (Vfringe_bitmaps): New variable.
Kim F. Storm <storm@cua.dk>
parents: 57246
diff changeset
515 fringe property for each symbol.
36eef73e00fa (Vfringe_bitmaps): New variable.
Kim F. Storm <storm@cua.dk>
parents: 57246
diff changeset
516
36eef73e00fa (Vfringe_bitmaps): New variable.
Kim F. Storm <storm@cua.dk>
parents: 57246
diff changeset
517 Return BN if not found in Vfringe_bitmaps. */
36eef73e00fa (Vfringe_bitmaps): New variable.
Kim F. Storm <storm@cua.dk>
parents: 57246
diff changeset
518
36eef73e00fa (Vfringe_bitmaps): New variable.
Kim F. Storm <storm@cua.dk>
parents: 57246
diff changeset
519 static Lisp_Object
36eef73e00fa (Vfringe_bitmaps): New variable.
Kim F. Storm <storm@cua.dk>
parents: 57246
diff changeset
520 get_fringe_bitmap_name (bn)
36eef73e00fa (Vfringe_bitmaps): New variable.
Kim F. Storm <storm@cua.dk>
parents: 57246
diff changeset
521 int bn;
53879
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
522 {
57258
36eef73e00fa (Vfringe_bitmaps): New variable.
Kim F. Storm <storm@cua.dk>
parents: 57246
diff changeset
523 Lisp_Object bitmaps;
36eef73e00fa (Vfringe_bitmaps): New variable.
Kim F. Storm <storm@cua.dk>
parents: 57246
diff changeset
524 Lisp_Object num;
36eef73e00fa (Vfringe_bitmaps): New variable.
Kim F. Storm <storm@cua.dk>
parents: 57246
diff changeset
525
36eef73e00fa (Vfringe_bitmaps): New variable.
Kim F. Storm <storm@cua.dk>
parents: 57246
diff changeset
526 /* Zero means no bitmap -- return nil. */
36eef73e00fa (Vfringe_bitmaps): New variable.
Kim F. Storm <storm@cua.dk>
parents: 57246
diff changeset
527 if (bn <= 0)
36eef73e00fa (Vfringe_bitmaps): New variable.
Kim F. Storm <storm@cua.dk>
parents: 57246
diff changeset
528 return Qnil;
36eef73e00fa (Vfringe_bitmaps): New variable.
Kim F. Storm <storm@cua.dk>
parents: 57246
diff changeset
529
36eef73e00fa (Vfringe_bitmaps): New variable.
Kim F. Storm <storm@cua.dk>
parents: 57246
diff changeset
530 bitmaps = Vfringe_bitmaps;
36eef73e00fa (Vfringe_bitmaps): New variable.
Kim F. Storm <storm@cua.dk>
parents: 57246
diff changeset
531 num = make_number (bn);
36eef73e00fa (Vfringe_bitmaps): New variable.
Kim F. Storm <storm@cua.dk>
parents: 57246
diff changeset
532
36eef73e00fa (Vfringe_bitmaps): New variable.
Kim F. Storm <storm@cua.dk>
parents: 57246
diff changeset
533 while (CONSP (bitmaps))
36eef73e00fa (Vfringe_bitmaps): New variable.
Kim F. Storm <storm@cua.dk>
parents: 57246
diff changeset
534 {
36eef73e00fa (Vfringe_bitmaps): New variable.
Kim F. Storm <storm@cua.dk>
parents: 57246
diff changeset
535 Lisp_Object bitmap = XCAR (bitmaps);
36eef73e00fa (Vfringe_bitmaps): New variable.
Kim F. Storm <storm@cua.dk>
parents: 57246
diff changeset
536 if (EQ (num, Fget (bitmap, Qfringe)))
36eef73e00fa (Vfringe_bitmaps): New variable.
Kim F. Storm <storm@cua.dk>
parents: 57246
diff changeset
537 return bitmap;
36eef73e00fa (Vfringe_bitmaps): New variable.
Kim F. Storm <storm@cua.dk>
parents: 57246
diff changeset
538 bitmaps = XCDR (bitmaps);
36eef73e00fa (Vfringe_bitmaps): New variable.
Kim F. Storm <storm@cua.dk>
parents: 57246
diff changeset
539 }
36eef73e00fa (Vfringe_bitmaps): New variable.
Kim F. Storm <storm@cua.dk>
parents: 57246
diff changeset
540
36eef73e00fa (Vfringe_bitmaps): New variable.
Kim F. Storm <storm@cua.dk>
parents: 57246
diff changeset
541 return num;
53879
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
57258
36eef73e00fa (Vfringe_bitmaps): New variable.
Kim F. Storm <storm@cua.dk>
parents: 57246
diff changeset
544
53879
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
545 /* 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
546 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
547 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
548 drawn.
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
549 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
550 */
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
551
69049
28b3892bfcda (enum fringe_bitmap_type): Remove. Change all uses
Kim F. Storm <storm@cua.dk>
parents: 68651
diff changeset
552 static void
53879
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
553 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
554 struct window *w;
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
555 struct glyph_row *row;
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
556 int left_p, overlay;
69049
28b3892bfcda (enum fringe_bitmap_type): Remove. Change all uses
Kim F. Storm <storm@cua.dk>
parents: 68651
diff changeset
557 int which;
53879
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 struct frame *f = XFRAME (WINDOW_FRAME (w));
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
560 struct draw_fringe_bitmap_params p;
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
561 struct fringe_bitmap *fb;
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
562 int period;
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
563 int face_id = DEFAULT_FACE_ID;
109296
f6f0d450d542 Fix ghost buffer boundary indicators in fringes (Bug#5634, Bug#6325).
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 108933
diff changeset
564 int offset, header_line_height;
53879
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.overlay_p = (overlay & 1) == 1;
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
567 p.cursor_p = (overlay & 2) == 2;
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
568
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
569 if (which != NO_FRINGE_BITMAP)
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
570 {
109296
f6f0d450d542 Fix ghost buffer boundary indicators in fringes (Bug#5634, Bug#6325).
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 108933
diff changeset
571 offset = 0;
53879
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 else if (left_p)
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 which = row->left_fringe_bitmap;
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
576 face_id = row->left_fringe_face_id;
109296
f6f0d450d542 Fix ghost buffer boundary indicators in fringes (Bug#5634, Bug#6325).
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 108933
diff changeset
577 offset = row->left_fringe_offset;
53879
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
578 }
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
579 else
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 which = row->right_fringe_bitmap;
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
582 face_id = row->right_fringe_face_id;
109296
f6f0d450d542 Fix ghost buffer boundary indicators in fringes (Bug#5634, Bug#6325).
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 108933
diff changeset
583 offset = row->right_fringe_offset;
53879
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
584 }
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
585
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
586 if (face_id == DEFAULT_FACE_ID)
59401
8f5e8e079790 (fringe_faces): Change to Lisp_Object pointer.
Kim F. Storm <storm@cua.dk>
parents: 58532
diff changeset
587 {
8f5e8e079790 (fringe_faces): Change to Lisp_Object pointer.
Kim F. Storm <storm@cua.dk>
parents: 58532
diff changeset
588 Lisp_Object face;
8f5e8e079790 (fringe_faces): Change to Lisp_Object pointer.
Kim F. Storm <storm@cua.dk>
parents: 58532
diff changeset
589
8f5e8e079790 (fringe_faces): Change to Lisp_Object pointer.
Kim F. Storm <storm@cua.dk>
parents: 58532
diff changeset
590 if ((face = fringe_faces[which], NILP (face))
90128
13796b0653c7 Revision: miles@gnu.org--gnu-2005/emacs--unicode--0--patch-29
Miles Bader <miles@gnu.org>
parents: 90082 60834
diff changeset
591 || (face_id = lookup_derived_face (f, face, FRINGE_FACE_ID, 0),
60834
94900ab8eef0 (draw_fringe_bitmap_1, Fset_fringe_bitmap_face):
Kim F. Storm <storm@cua.dk>
parents: 59581
diff changeset
592 face_id < 0))
59401
8f5e8e079790 (fringe_faces): Change to Lisp_Object pointer.
Kim F. Storm <storm@cua.dk>
parents: 58532
diff changeset
593 face_id = FRINGE_FACE_ID;
8f5e8e079790 (fringe_faces): Change to Lisp_Object pointer.
Kim F. Storm <storm@cua.dk>
parents: 58532
diff changeset
594 }
53879
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 fb = fringe_bitmaps[which];
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
597 if (fb == NULL)
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
598 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
599 ? which : UNDEF_FRINGE_BITMAP];
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
600
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
601 period = fb->period;
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
602
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
603 /* Convert row to frame coordinates. */
109296
f6f0d450d542 Fix ghost buffer boundary indicators in fringes (Bug#5634, Bug#6325).
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 108933
diff changeset
604 p.y = WINDOW_TO_FRAME_PIXEL_Y (w, row->y) + offset;
53879
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 p.which = which;
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
607 p.bits = fb->bits;
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
608 p.wd = fb->width;
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
609
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
610 p.h = fb->height;
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
611 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
612 p.h -= p.dh;
109296
f6f0d450d542 Fix ghost buffer boundary indicators in fringes (Bug#5634, Bug#6325).
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 108933
diff changeset
613
f6f0d450d542 Fix ghost buffer boundary indicators in fringes (Bug#5634, Bug#6325).
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 108933
diff changeset
614 /* Adjust y to the offset in the row to start drawing the bitmap. */
f6f0d450d542 Fix ghost buffer boundary indicators in fringes (Bug#5634, Bug#6325).
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 108933
diff changeset
615 switch (fb->align)
f6f0d450d542 Fix ghost buffer boundary indicators in fringes (Bug#5634, Bug#6325).
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 108933
diff changeset
616 {
f6f0d450d542 Fix ghost buffer boundary indicators in fringes (Bug#5634, Bug#6325).
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 108933
diff changeset
617 case ALIGN_BITMAP_CENTER:
f6f0d450d542 Fix ghost buffer boundary indicators in fringes (Bug#5634, Bug#6325).
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 108933
diff changeset
618 p.y += (row->height - p.h) / 2;
f6f0d450d542 Fix ghost buffer boundary indicators in fringes (Bug#5634, Bug#6325).
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 108933
diff changeset
619 break;
f6f0d450d542 Fix ghost buffer boundary indicators in fringes (Bug#5634, Bug#6325).
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 108933
diff changeset
620 case ALIGN_BITMAP_BOTTOM:
f6f0d450d542 Fix ghost buffer boundary indicators in fringes (Bug#5634, Bug#6325).
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 108933
diff changeset
621 p.y += (row->visible_height - p.h);
f6f0d450d542 Fix ghost buffer boundary indicators in fringes (Bug#5634, Bug#6325).
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 108933
diff changeset
622 break;
f6f0d450d542 Fix ghost buffer boundary indicators in fringes (Bug#5634, Bug#6325).
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 108933
diff changeset
623 case ALIGN_BITMAP_TOP:
f6f0d450d542 Fix ghost buffer boundary indicators in fringes (Bug#5634, Bug#6325).
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 108933
diff changeset
624 break;
f6f0d450d542 Fix ghost buffer boundary indicators in fringes (Bug#5634, Bug#6325).
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 108933
diff changeset
625 }
53879
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 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
628
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
629 if (p.face == NULL)
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
630 {
59401
8f5e8e079790 (fringe_faces): Change to Lisp_Object pointer.
Kim F. Storm <storm@cua.dk>
parents: 58532
diff changeset
631 /* This could happen after clearing face cache.
8f5e8e079790 (fringe_faces): Change to Lisp_Object pointer.
Kim F. Storm <storm@cua.dk>
parents: 58532
diff changeset
632 But it shouldn't happen anymore. ++kfs */
53879
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
633 return;
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
634 }
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 PREPARE_FACE_FOR_DISPLAY (f, p.face);
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
637
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
638 /* 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
639 the fringe. */
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
640 p.bx = -1;
109296
f6f0d450d542 Fix ghost buffer boundary indicators in fringes (Bug#5634, Bug#6325).
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 108933
diff changeset
641 header_line_height = WINDOW_HEADER_LINE_HEIGHT (w);
f6f0d450d542 Fix ghost buffer boundary indicators in fringes (Bug#5634, Bug#6325).
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 108933
diff changeset
642 p.by = WINDOW_TO_FRAME_PIXEL_Y (w, max (header_line_height, row->y));
f6f0d450d542 Fix ghost buffer boundary indicators in fringes (Bug#5634, Bug#6325).
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 108933
diff changeset
643 p.ny = row->visible_height;
53879
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
644 if (left_p)
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 int wd = WINDOW_LEFT_FRINGE_WIDTH (w);
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
647 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
648 ? LEFT_MARGIN_AREA
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
649 : TEXT_AREA));
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
650 if (p.wd > wd)
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
651 p.wd = wd;
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
652 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
653
109296
f6f0d450d542 Fix ghost buffer boundary indicators in fringes (Bug#5634, Bug#6325).
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 108933
diff changeset
654 if (p.wd < wd || p.y > p.by || p.y + p.h < p.by + p.ny)
53879
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 /* 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
657 wd -= ((!WINDOW_LEFTMOST_P (w)
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
658 && !WINDOW_HAS_VERTICAL_SCROLL_BAR (w))
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
659 ? 1 : 0);
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
660 p.bx = x - wd;
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
661 p.nx = wd;
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
662 }
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 else
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
665 {
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
666 int x = window_box_right (w,
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
667 (WINDOW_HAS_FRINGES_OUTSIDE_MARGINS (w)
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
668 ? RIGHT_MARGIN_AREA
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
669 : TEXT_AREA));
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
670 int wd = WINDOW_RIGHT_FRINGE_WIDTH (w);
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
671 if (p.wd > wd)
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
672 p.wd = wd;
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
673 p.x = x + (wd - p.wd) / 2;
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
674 /* 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
675 the fringe. */
109296
f6f0d450d542 Fix ghost buffer boundary indicators in fringes (Bug#5634, Bug#6325).
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 108933
diff changeset
676 if (p.wd < wd || p.y > p.by || p.y + p.h < p.by + p.ny)
53879
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
677 {
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
678 p.bx = x;
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
679 p.nx = wd;
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
680 }
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
681 }
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
682
83037
03a73693678e Merged in changes from CVS HEAD
Karoly Lorentey <lorentey@elte.hu>
parents: 53970
diff changeset
683 FRAME_RIF (f)->draw_fringe_bitmap (w, row, &p);
53879
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
69049
28b3892bfcda (enum fringe_bitmap_type): Remove. Change all uses
Kim F. Storm <storm@cua.dk>
parents: 68651
diff changeset
686 static int
28b3892bfcda (enum fringe_bitmap_type): Remove. Change all uses
Kim F. Storm <storm@cua.dk>
parents: 68651
diff changeset
687 get_logical_cursor_bitmap (w, cursor)
28b3892bfcda (enum fringe_bitmap_type): Remove. Change all uses
Kim F. Storm <storm@cua.dk>
parents: 68651
diff changeset
688 struct window *w;
28b3892bfcda (enum fringe_bitmap_type): Remove. Change all uses
Kim F. Storm <storm@cua.dk>
parents: 68651
diff changeset
689 Lisp_Object cursor;
28b3892bfcda (enum fringe_bitmap_type): Remove. Change all uses
Kim F. Storm <storm@cua.dk>
parents: 68651
diff changeset
690 {
28b3892bfcda (enum fringe_bitmap_type): Remove. Change all uses
Kim F. Storm <storm@cua.dk>
parents: 68651
diff changeset
691 Lisp_Object cmap, bm = Qnil;
28b3892bfcda (enum fringe_bitmap_type): Remove. Change all uses
Kim F. Storm <storm@cua.dk>
parents: 68651
diff changeset
692
28b3892bfcda (enum fringe_bitmap_type): Remove. Change all uses
Kim F. Storm <storm@cua.dk>
parents: 68651
diff changeset
693 if ((cmap = XBUFFER (w->buffer)->fringe_cursor_alist), !NILP (cmap))
28b3892bfcda (enum fringe_bitmap_type): Remove. Change all uses
Kim F. Storm <storm@cua.dk>
parents: 68651
diff changeset
694 {
28b3892bfcda (enum fringe_bitmap_type): Remove. Change all uses
Kim F. Storm <storm@cua.dk>
parents: 68651
diff changeset
695 bm = Fassq (cursor, cmap);
28b3892bfcda (enum fringe_bitmap_type): Remove. Change all uses
Kim F. Storm <storm@cua.dk>
parents: 68651
diff changeset
696 if (CONSP (bm))
28b3892bfcda (enum fringe_bitmap_type): Remove. Change all uses
Kim F. Storm <storm@cua.dk>
parents: 68651
diff changeset
697 {
28b3892bfcda (enum fringe_bitmap_type): Remove. Change all uses
Kim F. Storm <storm@cua.dk>
parents: 68651
diff changeset
698 if ((bm = XCDR (bm)), NILP (bm))
28b3892bfcda (enum fringe_bitmap_type): Remove. Change all uses
Kim F. Storm <storm@cua.dk>
parents: 68651
diff changeset
699 return NO_FRINGE_BITMAP;
28b3892bfcda (enum fringe_bitmap_type): Remove. Change all uses
Kim F. Storm <storm@cua.dk>
parents: 68651
diff changeset
700 return lookup_fringe_bitmap (bm);
28b3892bfcda (enum fringe_bitmap_type): Remove. Change all uses
Kim F. Storm <storm@cua.dk>
parents: 68651
diff changeset
701 }
28b3892bfcda (enum fringe_bitmap_type): Remove. Change all uses
Kim F. Storm <storm@cua.dk>
parents: 68651
diff changeset
702 }
28b3892bfcda (enum fringe_bitmap_type): Remove. Change all uses
Kim F. Storm <storm@cua.dk>
parents: 68651
diff changeset
703 if (EQ (cmap, buffer_defaults.fringe_cursor_alist))
28b3892bfcda (enum fringe_bitmap_type): Remove. Change all uses
Kim F. Storm <storm@cua.dk>
parents: 68651
diff changeset
704 return NO_FRINGE_BITMAP;
28b3892bfcda (enum fringe_bitmap_type): Remove. Change all uses
Kim F. Storm <storm@cua.dk>
parents: 68651
diff changeset
705 bm = Fassq (cursor, buffer_defaults.fringe_cursor_alist);
28b3892bfcda (enum fringe_bitmap_type): Remove. Change all uses
Kim F. Storm <storm@cua.dk>
parents: 68651
diff changeset
706 if (!CONSP (bm) || ((bm = XCDR (bm)), NILP (bm)))
28b3892bfcda (enum fringe_bitmap_type): Remove. Change all uses
Kim F. Storm <storm@cua.dk>
parents: 68651
diff changeset
707 return NO_FRINGE_BITMAP;
28b3892bfcda (enum fringe_bitmap_type): Remove. Change all uses
Kim F. Storm <storm@cua.dk>
parents: 68651
diff changeset
708 return lookup_fringe_bitmap (bm);
28b3892bfcda (enum fringe_bitmap_type): Remove. Change all uses
Kim F. Storm <storm@cua.dk>
parents: 68651
diff changeset
709 }
28b3892bfcda (enum fringe_bitmap_type): Remove. Change all uses
Kim F. Storm <storm@cua.dk>
parents: 68651
diff changeset
710
28b3892bfcda (enum fringe_bitmap_type): Remove. Change all uses
Kim F. Storm <storm@cua.dk>
parents: 68651
diff changeset
711 static int
28b3892bfcda (enum fringe_bitmap_type): Remove. Change all uses
Kim F. Storm <storm@cua.dk>
parents: 68651
diff changeset
712 get_logical_fringe_bitmap (w, bitmap, right_p, partial_p)
28b3892bfcda (enum fringe_bitmap_type): Remove. Change all uses
Kim F. Storm <storm@cua.dk>
parents: 68651
diff changeset
713 struct window *w;
28b3892bfcda (enum fringe_bitmap_type): Remove. Change all uses
Kim F. Storm <storm@cua.dk>
parents: 68651
diff changeset
714 Lisp_Object bitmap;
28b3892bfcda (enum fringe_bitmap_type): Remove. Change all uses
Kim F. Storm <storm@cua.dk>
parents: 68651
diff changeset
715 int right_p, partial_p;
28b3892bfcda (enum fringe_bitmap_type): Remove. Change all uses
Kim F. Storm <storm@cua.dk>
parents: 68651
diff changeset
716 {
28b3892bfcda (enum fringe_bitmap_type): Remove. Change all uses
Kim F. Storm <storm@cua.dk>
parents: 68651
diff changeset
717 Lisp_Object cmap, bm1 = Qnil, bm2 = Qnil, bm;
28b3892bfcda (enum fringe_bitmap_type): Remove. Change all uses
Kim F. Storm <storm@cua.dk>
parents: 68651
diff changeset
718 int ln1 = 0, ln2 = 0;
28b3892bfcda (enum fringe_bitmap_type): Remove. Change all uses
Kim F. Storm <storm@cua.dk>
parents: 68651
diff changeset
719 int ix1 = right_p;
28b3892bfcda (enum fringe_bitmap_type): Remove. Change all uses
Kim F. Storm <storm@cua.dk>
parents: 68651
diff changeset
720 int ix2 = ix1 + (partial_p ? 2 : 0);
28b3892bfcda (enum fringe_bitmap_type): Remove. Change all uses
Kim F. Storm <storm@cua.dk>
parents: 68651
diff changeset
721
28b3892bfcda (enum fringe_bitmap_type): Remove. Change all uses
Kim F. Storm <storm@cua.dk>
parents: 68651
diff changeset
722 /* Lookup in buffer-local fringe-indicator-alist before global alist.
28b3892bfcda (enum fringe_bitmap_type): Remove. Change all uses
Kim F. Storm <storm@cua.dk>
parents: 68651
diff changeset
723
28b3892bfcda (enum fringe_bitmap_type): Remove. Change all uses
Kim F. Storm <storm@cua.dk>
parents: 68651
diff changeset
724 Elements are:
28b3892bfcda (enum fringe_bitmap_type): Remove. Change all uses
Kim F. Storm <storm@cua.dk>
parents: 68651
diff changeset
725 BITMAP -- use for all
28b3892bfcda (enum fringe_bitmap_type): Remove. Change all uses
Kim F. Storm <storm@cua.dk>
parents: 68651
diff changeset
726 (L R) -- use for left right (whether partial or not)
108933
b465aa3255ed Fix typos.
Juanma Barranquero <lekktu@gmail.com>
parents: 106815
diff changeset
727 (L R PL PR) -- use for left right partial-left partial-right
69049
28b3892bfcda (enum fringe_bitmap_type): Remove. Change all uses
Kim F. Storm <storm@cua.dk>
parents: 68651
diff changeset
728 If any value in local binding is not present or t, use global value.
28b3892bfcda (enum fringe_bitmap_type): Remove. Change all uses
Kim F. Storm <storm@cua.dk>
parents: 68651
diff changeset
729
28b3892bfcda (enum fringe_bitmap_type): Remove. Change all uses
Kim F. Storm <storm@cua.dk>
parents: 68651
diff changeset
730 If partial, lookup partial bitmap in default value if not found here.
28b3892bfcda (enum fringe_bitmap_type): Remove. Change all uses
Kim F. Storm <storm@cua.dk>
parents: 68651
diff changeset
731 If not partial, or no partial spec is present, use non-partial bitmap. */
28b3892bfcda (enum fringe_bitmap_type): Remove. Change all uses
Kim F. Storm <storm@cua.dk>
parents: 68651
diff changeset
732
28b3892bfcda (enum fringe_bitmap_type): Remove. Change all uses
Kim F. Storm <storm@cua.dk>
parents: 68651
diff changeset
733 if ((cmap = XBUFFER (w->buffer)->fringe_indicator_alist), !NILP (cmap))
28b3892bfcda (enum fringe_bitmap_type): Remove. Change all uses
Kim F. Storm <storm@cua.dk>
parents: 68651
diff changeset
734 {
28b3892bfcda (enum fringe_bitmap_type): Remove. Change all uses
Kim F. Storm <storm@cua.dk>
parents: 68651
diff changeset
735 bm1 = Fassq (bitmap, cmap);
28b3892bfcda (enum fringe_bitmap_type): Remove. Change all uses
Kim F. Storm <storm@cua.dk>
parents: 68651
diff changeset
736 if (CONSP (bm1))
28b3892bfcda (enum fringe_bitmap_type): Remove. Change all uses
Kim F. Storm <storm@cua.dk>
parents: 68651
diff changeset
737 {
28b3892bfcda (enum fringe_bitmap_type): Remove. Change all uses
Kim F. Storm <storm@cua.dk>
parents: 68651
diff changeset
738 if ((bm1 = XCDR (bm1)), NILP (bm1))
28b3892bfcda (enum fringe_bitmap_type): Remove. Change all uses
Kim F. Storm <storm@cua.dk>
parents: 68651
diff changeset
739 return NO_FRINGE_BITMAP;
28b3892bfcda (enum fringe_bitmap_type): Remove. Change all uses
Kim F. Storm <storm@cua.dk>
parents: 68651
diff changeset
740 if (CONSP (bm1))
28b3892bfcda (enum fringe_bitmap_type): Remove. Change all uses
Kim F. Storm <storm@cua.dk>
parents: 68651
diff changeset
741 {
28b3892bfcda (enum fringe_bitmap_type): Remove. Change all uses
Kim F. Storm <storm@cua.dk>
parents: 68651
diff changeset
742 ln1 = XINT (Flength (bm1));
28b3892bfcda (enum fringe_bitmap_type): Remove. Change all uses
Kim F. Storm <storm@cua.dk>
parents: 68651
diff changeset
743 if (partial_p)
28b3892bfcda (enum fringe_bitmap_type): Remove. Change all uses
Kim F. Storm <storm@cua.dk>
parents: 68651
diff changeset
744 {
28b3892bfcda (enum fringe_bitmap_type): Remove. Change all uses
Kim F. Storm <storm@cua.dk>
parents: 68651
diff changeset
745 if (ln1 > ix2)
28b3892bfcda (enum fringe_bitmap_type): Remove. Change all uses
Kim F. Storm <storm@cua.dk>
parents: 68651
diff changeset
746 {
28b3892bfcda (enum fringe_bitmap_type): Remove. Change all uses
Kim F. Storm <storm@cua.dk>
parents: 68651
diff changeset
747 bm = Fnth (make_number (ix2), bm1);
28b3892bfcda (enum fringe_bitmap_type): Remove. Change all uses
Kim F. Storm <storm@cua.dk>
parents: 68651
diff changeset
748 if (!EQ (bm, Qt))
28b3892bfcda (enum fringe_bitmap_type): Remove. Change all uses
Kim F. Storm <storm@cua.dk>
parents: 68651
diff changeset
749 goto found;
28b3892bfcda (enum fringe_bitmap_type): Remove. Change all uses
Kim F. Storm <storm@cua.dk>
parents: 68651
diff changeset
750 }
28b3892bfcda (enum fringe_bitmap_type): Remove. Change all uses
Kim F. Storm <storm@cua.dk>
parents: 68651
diff changeset
751 }
28b3892bfcda (enum fringe_bitmap_type): Remove. Change all uses
Kim F. Storm <storm@cua.dk>
parents: 68651
diff changeset
752 else
28b3892bfcda (enum fringe_bitmap_type): Remove. Change all uses
Kim F. Storm <storm@cua.dk>
parents: 68651
diff changeset
753 {
28b3892bfcda (enum fringe_bitmap_type): Remove. Change all uses
Kim F. Storm <storm@cua.dk>
parents: 68651
diff changeset
754 if (ln1 > ix1)
28b3892bfcda (enum fringe_bitmap_type): Remove. Change all uses
Kim F. Storm <storm@cua.dk>
parents: 68651
diff changeset
755 {
28b3892bfcda (enum fringe_bitmap_type): Remove. Change all uses
Kim F. Storm <storm@cua.dk>
parents: 68651
diff changeset
756 bm = Fnth (make_number (ix1), bm1);
28b3892bfcda (enum fringe_bitmap_type): Remove. Change all uses
Kim F. Storm <storm@cua.dk>
parents: 68651
diff changeset
757 if (!EQ (bm, Qt))
28b3892bfcda (enum fringe_bitmap_type): Remove. Change all uses
Kim F. Storm <storm@cua.dk>
parents: 68651
diff changeset
758 goto found;
28b3892bfcda (enum fringe_bitmap_type): Remove. Change all uses
Kim F. Storm <storm@cua.dk>
parents: 68651
diff changeset
759 }
28b3892bfcda (enum fringe_bitmap_type): Remove. Change all uses
Kim F. Storm <storm@cua.dk>
parents: 68651
diff changeset
760 }
28b3892bfcda (enum fringe_bitmap_type): Remove. Change all uses
Kim F. Storm <storm@cua.dk>
parents: 68651
diff changeset
761 }
28b3892bfcda (enum fringe_bitmap_type): Remove. Change all uses
Kim F. Storm <storm@cua.dk>
parents: 68651
diff changeset
762 else if ((bm = bm1, !EQ (bm, Qt)))
28b3892bfcda (enum fringe_bitmap_type): Remove. Change all uses
Kim F. Storm <storm@cua.dk>
parents: 68651
diff changeset
763 goto found;
28b3892bfcda (enum fringe_bitmap_type): Remove. Change all uses
Kim F. Storm <storm@cua.dk>
parents: 68651
diff changeset
764 }
28b3892bfcda (enum fringe_bitmap_type): Remove. Change all uses
Kim F. Storm <storm@cua.dk>
parents: 68651
diff changeset
765 }
28b3892bfcda (enum fringe_bitmap_type): Remove. Change all uses
Kim F. Storm <storm@cua.dk>
parents: 68651
diff changeset
766
28b3892bfcda (enum fringe_bitmap_type): Remove. Change all uses
Kim F. Storm <storm@cua.dk>
parents: 68651
diff changeset
767 if (!EQ (cmap, buffer_defaults.fringe_indicator_alist)
28b3892bfcda (enum fringe_bitmap_type): Remove. Change all uses
Kim F. Storm <storm@cua.dk>
parents: 68651
diff changeset
768 && !NILP (buffer_defaults.fringe_indicator_alist))
28b3892bfcda (enum fringe_bitmap_type): Remove. Change all uses
Kim F. Storm <storm@cua.dk>
parents: 68651
diff changeset
769 {
28b3892bfcda (enum fringe_bitmap_type): Remove. Change all uses
Kim F. Storm <storm@cua.dk>
parents: 68651
diff changeset
770 bm2 = Fassq (bitmap, buffer_defaults.fringe_indicator_alist);
28b3892bfcda (enum fringe_bitmap_type): Remove. Change all uses
Kim F. Storm <storm@cua.dk>
parents: 68651
diff changeset
771 if (CONSP (bm2))
28b3892bfcda (enum fringe_bitmap_type): Remove. Change all uses
Kim F. Storm <storm@cua.dk>
parents: 68651
diff changeset
772 {
28b3892bfcda (enum fringe_bitmap_type): Remove. Change all uses
Kim F. Storm <storm@cua.dk>
parents: 68651
diff changeset
773 if ((bm2 = XCDR (bm2)), !NILP (bm2))
28b3892bfcda (enum fringe_bitmap_type): Remove. Change all uses
Kim F. Storm <storm@cua.dk>
parents: 68651
diff changeset
774 {
28b3892bfcda (enum fringe_bitmap_type): Remove. Change all uses
Kim F. Storm <storm@cua.dk>
parents: 68651
diff changeset
775 if (CONSP (bm2))
28b3892bfcda (enum fringe_bitmap_type): Remove. Change all uses
Kim F. Storm <storm@cua.dk>
parents: 68651
diff changeset
776 {
28b3892bfcda (enum fringe_bitmap_type): Remove. Change all uses
Kim F. Storm <storm@cua.dk>
parents: 68651
diff changeset
777 ln2 = XINT (Flength (bm2));
28b3892bfcda (enum fringe_bitmap_type): Remove. Change all uses
Kim F. Storm <storm@cua.dk>
parents: 68651
diff changeset
778 if (partial_p)
28b3892bfcda (enum fringe_bitmap_type): Remove. Change all uses
Kim F. Storm <storm@cua.dk>
parents: 68651
diff changeset
779 {
28b3892bfcda (enum fringe_bitmap_type): Remove. Change all uses
Kim F. Storm <storm@cua.dk>
parents: 68651
diff changeset
780 if (ln2 > ix2)
28b3892bfcda (enum fringe_bitmap_type): Remove. Change all uses
Kim F. Storm <storm@cua.dk>
parents: 68651
diff changeset
781 {
28b3892bfcda (enum fringe_bitmap_type): Remove. Change all uses
Kim F. Storm <storm@cua.dk>
parents: 68651
diff changeset
782 bm = Fnth (make_number (ix2), bm2);
28b3892bfcda (enum fringe_bitmap_type): Remove. Change all uses
Kim F. Storm <storm@cua.dk>
parents: 68651
diff changeset
783 if (!EQ (bm, Qt))
28b3892bfcda (enum fringe_bitmap_type): Remove. Change all uses
Kim F. Storm <storm@cua.dk>
parents: 68651
diff changeset
784 goto found;
28b3892bfcda (enum fringe_bitmap_type): Remove. Change all uses
Kim F. Storm <storm@cua.dk>
parents: 68651
diff changeset
785 }
28b3892bfcda (enum fringe_bitmap_type): Remove. Change all uses
Kim F. Storm <storm@cua.dk>
parents: 68651
diff changeset
786 }
28b3892bfcda (enum fringe_bitmap_type): Remove. Change all uses
Kim F. Storm <storm@cua.dk>
parents: 68651
diff changeset
787 }
28b3892bfcda (enum fringe_bitmap_type): Remove. Change all uses
Kim F. Storm <storm@cua.dk>
parents: 68651
diff changeset
788 }
28b3892bfcda (enum fringe_bitmap_type): Remove. Change all uses
Kim F. Storm <storm@cua.dk>
parents: 68651
diff changeset
789 }
28b3892bfcda (enum fringe_bitmap_type): Remove. Change all uses
Kim F. Storm <storm@cua.dk>
parents: 68651
diff changeset
790 }
28b3892bfcda (enum fringe_bitmap_type): Remove. Change all uses
Kim F. Storm <storm@cua.dk>
parents: 68651
diff changeset
791
28b3892bfcda (enum fringe_bitmap_type): Remove. Change all uses
Kim F. Storm <storm@cua.dk>
parents: 68651
diff changeset
792 if (ln1 > ix1)
28b3892bfcda (enum fringe_bitmap_type): Remove. Change all uses
Kim F. Storm <storm@cua.dk>
parents: 68651
diff changeset
793 {
28b3892bfcda (enum fringe_bitmap_type): Remove. Change all uses
Kim F. Storm <storm@cua.dk>
parents: 68651
diff changeset
794 bm = Fnth (make_number (ix1), bm1);
28b3892bfcda (enum fringe_bitmap_type): Remove. Change all uses
Kim F. Storm <storm@cua.dk>
parents: 68651
diff changeset
795 if (!EQ (bm, Qt))
28b3892bfcda (enum fringe_bitmap_type): Remove. Change all uses
Kim F. Storm <storm@cua.dk>
parents: 68651
diff changeset
796 goto found;
28b3892bfcda (enum fringe_bitmap_type): Remove. Change all uses
Kim F. Storm <storm@cua.dk>
parents: 68651
diff changeset
797 }
28b3892bfcda (enum fringe_bitmap_type): Remove. Change all uses
Kim F. Storm <storm@cua.dk>
parents: 68651
diff changeset
798
28b3892bfcda (enum fringe_bitmap_type): Remove. Change all uses
Kim F. Storm <storm@cua.dk>
parents: 68651
diff changeset
799 if (ln2 > ix1)
28b3892bfcda (enum fringe_bitmap_type): Remove. Change all uses
Kim F. Storm <storm@cua.dk>
parents: 68651
diff changeset
800 {
28b3892bfcda (enum fringe_bitmap_type): Remove. Change all uses
Kim F. Storm <storm@cua.dk>
parents: 68651
diff changeset
801 bm = Fnth (make_number (ix1), bm2);
28b3892bfcda (enum fringe_bitmap_type): Remove. Change all uses
Kim F. Storm <storm@cua.dk>
parents: 68651
diff changeset
802 if (!EQ (bm, Qt))
28b3892bfcda (enum fringe_bitmap_type): Remove. Change all uses
Kim F. Storm <storm@cua.dk>
parents: 68651
diff changeset
803 goto found;
28b3892bfcda (enum fringe_bitmap_type): Remove. Change all uses
Kim F. Storm <storm@cua.dk>
parents: 68651
diff changeset
804 return NO_FRINGE_BITMAP;
28b3892bfcda (enum fringe_bitmap_type): Remove. Change all uses
Kim F. Storm <storm@cua.dk>
parents: 68651
diff changeset
805 }
28b3892bfcda (enum fringe_bitmap_type): Remove. Change all uses
Kim F. Storm <storm@cua.dk>
parents: 68651
diff changeset
806 else if ((bm = bm2, NILP (bm)))
28b3892bfcda (enum fringe_bitmap_type): Remove. Change all uses
Kim F. Storm <storm@cua.dk>
parents: 68651
diff changeset
807 return NO_FRINGE_BITMAP;
28b3892bfcda (enum fringe_bitmap_type): Remove. Change all uses
Kim F. Storm <storm@cua.dk>
parents: 68651
diff changeset
808
28b3892bfcda (enum fringe_bitmap_type): Remove. Change all uses
Kim F. Storm <storm@cua.dk>
parents: 68651
diff changeset
809 found:
28b3892bfcda (enum fringe_bitmap_type): Remove. Change all uses
Kim F. Storm <storm@cua.dk>
parents: 68651
diff changeset
810 return lookup_fringe_bitmap (bm);
28b3892bfcda (enum fringe_bitmap_type): Remove. Change all uses
Kim F. Storm <storm@cua.dk>
parents: 68651
diff changeset
811 }
28b3892bfcda (enum fringe_bitmap_type): Remove. Change all uses
Kim F. Storm <storm@cua.dk>
parents: 68651
diff changeset
812
28b3892bfcda (enum fringe_bitmap_type): Remove. Change all uses
Kim F. Storm <storm@cua.dk>
parents: 68651
diff changeset
813
53879
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
814 void
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
815 draw_fringe_bitmap (w, row, left_p)
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
816 struct window *w;
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
817 struct glyph_row *row;
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
818 int left_p;
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
819 {
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
820 int overlay = 0;
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
821
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
822 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
823 {
69049
28b3892bfcda (enum fringe_bitmap_type): Remove. Change all uses
Kim F. Storm <storm@cua.dk>
parents: 68651
diff changeset
824 Lisp_Object cursor = Qnil;
53879
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
825
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
826 switch (w->phys_cursor_type)
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
827 {
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
828 case HOLLOW_BOX_CURSOR:
69049
28b3892bfcda (enum fringe_bitmap_type): Remove. Change all uses
Kim F. Storm <storm@cua.dk>
parents: 68651
diff changeset
829 if (row->visible_height >= STANDARD_BITMAP_HEIGHT (hollow_rectangle_bits))
28b3892bfcda (enum fringe_bitmap_type): Remove. Change all uses
Kim F. Storm <storm@cua.dk>
parents: 68651
diff changeset
830 cursor = Qhollow;
53879
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
831 else
69049
28b3892bfcda (enum fringe_bitmap_type): Remove. Change all uses
Kim F. Storm <storm@cua.dk>
parents: 68651
diff changeset
832 cursor = Qhollow_small;
53879
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
833 break;
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
834 case FILLED_BOX_CURSOR:
69049
28b3892bfcda (enum fringe_bitmap_type): Remove. Change all uses
Kim F. Storm <storm@cua.dk>
parents: 68651
diff changeset
835 cursor = Qbox;
53879
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
836 break;
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
837 case BAR_CURSOR:
69049
28b3892bfcda (enum fringe_bitmap_type): Remove. Change all uses
Kim F. Storm <storm@cua.dk>
parents: 68651
diff changeset
838 cursor = Qbar;
53879
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
839 break;
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
840 case HBAR_CURSOR:
69049
28b3892bfcda (enum fringe_bitmap_type): Remove. Change all uses
Kim F. Storm <storm@cua.dk>
parents: 68651
diff changeset
841 cursor = Qhbar;
53879
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
842 break;
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
843 case NO_CURSOR:
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
844 default:
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
845 w->phys_cursor_on_p = 0;
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
846 row->cursor_in_fringe_p = 0;
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
847 break;
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
848 }
69049
28b3892bfcda (enum fringe_bitmap_type): Remove. Change all uses
Kim F. Storm <storm@cua.dk>
parents: 68651
diff changeset
849 if (!NILP (cursor))
53879
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
850 {
69049
28b3892bfcda (enum fringe_bitmap_type): Remove. Change all uses
Kim F. Storm <storm@cua.dk>
parents: 68651
diff changeset
851 int bm = get_logical_cursor_bitmap (w, cursor);
28b3892bfcda (enum fringe_bitmap_type): Remove. Change all uses
Kim F. Storm <storm@cua.dk>
parents: 68651
diff changeset
852 if (bm != NO_FRINGE_BITMAP)
28b3892bfcda (enum fringe_bitmap_type): Remove. Change all uses
Kim F. Storm <storm@cua.dk>
parents: 68651
diff changeset
853 {
28b3892bfcda (enum fringe_bitmap_type): Remove. Change all uses
Kim F. Storm <storm@cua.dk>
parents: 68651
diff changeset
854 draw_fringe_bitmap_1 (w, row, 0, 2, bm);
28b3892bfcda (enum fringe_bitmap_type): Remove. Change all uses
Kim F. Storm <storm@cua.dk>
parents: 68651
diff changeset
855 overlay = EQ (cursor, Qbox) ? 3 : 1;
28b3892bfcda (enum fringe_bitmap_type): Remove. Change all uses
Kim F. Storm <storm@cua.dk>
parents: 68651
diff changeset
856 }
53879
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
857 }
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
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
860 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
861
61634
e188b7249c28 (draw_fringe_bitmap): Use overlay_arrow_bitmap from row
Kim F. Storm <storm@cua.dk>
parents: 60834
diff changeset
862 if (left_p && row->overlay_arrow_bitmap != NO_FRINGE_BITMAP)
69616
c00e99faf809 (draw_fringe_bitmap): Don't calculate default overlay arrow
Kim F. Storm <storm@cua.dk>
parents: 69490
diff changeset
863 draw_fringe_bitmap_1 (w, row, 1, 1, row->overlay_arrow_bitmap);
53879
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
864 }
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
865
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
866
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
867 /* 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
868 function with input blocked. */
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
869
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
870 void
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
871 draw_row_fringe_bitmaps (w, row)
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
872 struct window *w;
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
873 struct glyph_row *row;
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
874 {
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
875 xassert (interrupt_input_blocked);
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
876
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
877 /* 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
878 don't have to draw anything. */
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
879 if (row->visible_height <= 0)
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
880 return;
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
881
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
882 if (WINDOW_LEFT_FRINGE_WIDTH (w) != 0)
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
883 draw_fringe_bitmap (w, row, 1);
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 if (WINDOW_RIGHT_FRINGE_WIDTH (w) != 0)
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
886 draw_fringe_bitmap (w, row, 0);
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
887 }
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
888
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
889 /* Draw the fringes of window W. Only fringes for rows marked for
57371
3c27c0be625d (draw_window_fringes): Return value now indicates if
Kim F. Storm <storm@cua.dk>
parents: 57316
diff changeset
890 update in redraw_fringe_bitmaps_p are drawn.
3c27c0be625d (draw_window_fringes): Return value now indicates if
Kim F. Storm <storm@cua.dk>
parents: 57316
diff changeset
891
3c27c0be625d (draw_window_fringes): Return value now indicates if
Kim F. Storm <storm@cua.dk>
parents: 57316
diff changeset
892 Return >0 if left or right fringe was redrawn in any way.
3c27c0be625d (draw_window_fringes): Return value now indicates if
Kim F. Storm <storm@cua.dk>
parents: 57316
diff changeset
893
3c27c0be625d (draw_window_fringes): Return value now indicates if
Kim F. Storm <storm@cua.dk>
parents: 57316
diff changeset
894 If NO_FRINGE is non-zero, also return >0 if either fringe has zero width.
53879
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
895
57371
3c27c0be625d (draw_window_fringes): Return value now indicates if
Kim F. Storm <storm@cua.dk>
parents: 57316
diff changeset
896 A return value >0 indicates that the vertical line between windows
3c27c0be625d (draw_window_fringes): Return value now indicates if
Kim F. Storm <storm@cua.dk>
parents: 57316
diff changeset
897 needs update (as it may be drawn in the fringe).
3c27c0be625d (draw_window_fringes): Return value now indicates if
Kim F. Storm <storm@cua.dk>
parents: 57316
diff changeset
898 */
3c27c0be625d (draw_window_fringes): Return value now indicates if
Kim F. Storm <storm@cua.dk>
parents: 57316
diff changeset
899
3c27c0be625d (draw_window_fringes): Return value now indicates if
Kim F. Storm <storm@cua.dk>
parents: 57316
diff changeset
900 int
3c27c0be625d (draw_window_fringes): Return value now indicates if
Kim F. Storm <storm@cua.dk>
parents: 57316
diff changeset
901 draw_window_fringes (w, no_fringe)
53879
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
902 struct window *w;
57371
3c27c0be625d (draw_window_fringes): Return value now indicates if
Kim F. Storm <storm@cua.dk>
parents: 57316
diff changeset
903 int no_fringe;
53879
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
904 {
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
905 struct glyph_row *row;
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
906 int yb = window_text_bottom_y (w);
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
907 int nrows = w->current_matrix->nrows;
109296
f6f0d450d542 Fix ghost buffer boundary indicators in fringes (Bug#5634, Bug#6325).
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 108933
diff changeset
908 int y, rn;
57371
3c27c0be625d (draw_window_fringes): Return value now indicates if
Kim F. Storm <storm@cua.dk>
parents: 57316
diff changeset
909 int updated = 0;
53879
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 (w->pseudo_window_p)
57371
3c27c0be625d (draw_window_fringes): Return value now indicates if
Kim F. Storm <storm@cua.dk>
parents: 57316
diff changeset
912 return 0;
3c27c0be625d (draw_window_fringes): Return value now indicates if
Kim F. Storm <storm@cua.dk>
parents: 57316
diff changeset
913
3c27c0be625d (draw_window_fringes): Return value now indicates if
Kim F. Storm <storm@cua.dk>
parents: 57316
diff changeset
914 /* Must draw line if no fringe */
3c27c0be625d (draw_window_fringes): Return value now indicates if
Kim F. Storm <storm@cua.dk>
parents: 57316
diff changeset
915 if (no_fringe
3c27c0be625d (draw_window_fringes): Return value now indicates if
Kim F. Storm <storm@cua.dk>
parents: 57316
diff changeset
916 && (WINDOW_LEFT_FRINGE_WIDTH (w) == 0
3c27c0be625d (draw_window_fringes): Return value now indicates if
Kim F. Storm <storm@cua.dk>
parents: 57316
diff changeset
917 || WINDOW_RIGHT_FRINGE_WIDTH (w) == 0))
3c27c0be625d (draw_window_fringes): Return value now indicates if
Kim F. Storm <storm@cua.dk>
parents: 57316
diff changeset
918 updated++;
53879
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
919
109296
f6f0d450d542 Fix ghost buffer boundary indicators in fringes (Bug#5634, Bug#6325).
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 108933
diff changeset
920 for (y = w->vscroll, rn = 0, row = w->current_matrix->rows;
53879
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
921 y < yb && rn < nrows;
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
922 y += row->height, ++row, ++rn)
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
923 {
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
924 if (!row->redraw_fringe_bitmaps_p)
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
925 continue;
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
926 draw_row_fringe_bitmaps (w, row);
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
927 row->redraw_fringe_bitmaps_p = 0;
57371
3c27c0be625d (draw_window_fringes): Return value now indicates if
Kim F. Storm <storm@cua.dk>
parents: 57316
diff changeset
928 updated++;
53879
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
929 }
57371
3c27c0be625d (draw_window_fringes): Return value now indicates if
Kim F. Storm <storm@cua.dk>
parents: 57316
diff changeset
930
3c27c0be625d (draw_window_fringes): Return value now indicates if
Kim F. Storm <storm@cua.dk>
parents: 57316
diff changeset
931 return updated;
53879
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
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
934
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
935 /* Recalculate the bitmaps to show in the fringes of window W.
65062
8370ced2ae75 (update_window_fringes): Replace FORCE_P arg with KEEP_CURRENT_P arg;
Kim F. Storm <storm@cua.dk>
parents: 64770
diff changeset
936 Only mark rows with modified bitmaps for update in redraw_fringe_bitmaps_p.
8370ced2ae75 (update_window_fringes): Replace FORCE_P arg with KEEP_CURRENT_P arg;
Kim F. Storm <storm@cua.dk>
parents: 64770
diff changeset
937
8370ced2ae75 (update_window_fringes): Replace FORCE_P arg with KEEP_CURRENT_P arg;
Kim F. Storm <storm@cua.dk>
parents: 64770
diff changeset
938 If KEEP_CURRENT_P is 0, update current_matrix too. */
53879
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
939
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
940 int
65062
8370ced2ae75 (update_window_fringes): Replace FORCE_P arg with KEEP_CURRENT_P arg;
Kim F. Storm <storm@cua.dk>
parents: 64770
diff changeset
941 update_window_fringes (w, keep_current_p)
53879
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
942 struct window *w;
65062
8370ced2ae75 (update_window_fringes): Replace FORCE_P arg with KEEP_CURRENT_P arg;
Kim F. Storm <storm@cua.dk>
parents: 64770
diff changeset
943 int keep_current_p;
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 struct glyph_row *row, *cur = 0;
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
946 int yb = window_text_bottom_y (w);
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
947 int rn, nrows = w->current_matrix->nrows;
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
948 int y;
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
949 int redraw_p = 0;
57246
36ab9b017a42 (update_window_fringes): Handle new formats of
Kim F. Storm <storm@cua.dk>
parents: 54230
diff changeset
950 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
951 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
952 Lisp_Object empty_pos;
36ab9b017a42 (update_window_fringes): Handle new formats of
Kim F. Storm <storm@cua.dk>
parents: 54230
diff changeset
953 Lisp_Object ind = Qnil;
69049
28b3892bfcda (enum fringe_bitmap_type): Remove. Change all uses
Kim F. Storm <storm@cua.dk>
parents: 68651
diff changeset
954 #define MAX_BITMAP_CACHE (8*4)
28b3892bfcda (enum fringe_bitmap_type): Remove. Change all uses
Kim F. Storm <storm@cua.dk>
parents: 68651
diff changeset
955 int bitmap_cache[MAX_BITMAP_CACHE];
109296
f6f0d450d542 Fix ghost buffer boundary indicators in fringes (Bug#5634, Bug#6325).
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 108933
diff changeset
956 int top_ind_rn, bot_ind_rn;
f6f0d450d542 Fix ghost buffer boundary indicators in fringes (Bug#5634, Bug#6325).
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 108933
diff changeset
957 int top_ind_min_y, bot_ind_max_y;
f6f0d450d542 Fix ghost buffer boundary indicators in fringes (Bug#5634, Bug#6325).
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 108933
diff changeset
958 int top_row_ends_at_zv_p, bot_row_ends_at_zv_p;
53879
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 if (w->pseudo_window_p)
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
961 return 0;
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
962
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
963 if (!MINI_WINDOW_P (w)
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
964 && (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
965 {
57246
36ab9b017a42 (update_window_fringes): Handle new formats of
Kim F. Storm <storm@cua.dk>
parents: 54230
diff changeset
966 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
967 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
968 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
969 {
36ab9b017a42 (update_window_fringes): Handle new formats of
Kim F. Storm <storm@cua.dk>
parents: 54230
diff changeset
970 Lisp_Object pos;
36ab9b017a42 (update_window_fringes): Handle new formats of
Kim F. Storm <storm@cua.dk>
parents: 54230
diff changeset
971 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
972 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
973 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
974 boundary_top = XCDR (pos);
36ab9b017a42 (update_window_fringes): Handle new formats of
Kim F. Storm <storm@cua.dk>
parents: 54230
diff changeset
975 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
976 boundary_bot = XCDR (pos);
36ab9b017a42 (update_window_fringes): Handle new formats of
Kim F. Storm <storm@cua.dk>
parents: 54230
diff changeset
977 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
978 arrow_top = XCDR (pos);
36ab9b017a42 (update_window_fringes): Handle new formats of
Kim F. Storm <storm@cua.dk>
parents: 54230
diff changeset
979 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
980 arrow_bot = XCDR (pos);
36ab9b017a42 (update_window_fringes): Handle new formats of
Kim F. Storm <storm@cua.dk>
parents: 54230
diff changeset
981 }
53879
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
982 else
58424
99a14d81043f (update_window_fringes): Provide sensible fall-back
Kim F. Storm <storm@cua.dk>
parents: 58268
diff changeset
983 /* Anything else means boundary on left and no arrows. */
99a14d81043f (update_window_fringes): Provide sensible fall-back
Kim F. Storm <storm@cua.dk>
parents: 58268
diff changeset
984 boundary_top = boundary_bot = Qleft;
57246
36ab9b017a42 (update_window_fringes): Handle new formats of
Kim F. Storm <storm@cua.dk>
parents: 54230
diff changeset
985 }
53879
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
986
109296
f6f0d450d542 Fix ghost buffer boundary indicators in fringes (Bug#5634, Bug#6325).
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 108933
diff changeset
987 top_ind_rn = bot_ind_rn = -1;
57246
36ab9b017a42 (update_window_fringes): Handle new formats of
Kim F. Storm <storm@cua.dk>
parents: 54230
diff changeset
988 if (!NILP (ind))
36ab9b017a42 (update_window_fringes): Handle new formats of
Kim F. Storm <storm@cua.dk>
parents: 54230
diff changeset
989 {
109296
f6f0d450d542 Fix ghost buffer boundary indicators in fringes (Bug#5634, Bug#6325).
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 108933
diff changeset
990 for (y = w->vscroll, rn = 0;
53879
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
991 y < yb && rn < nrows;
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
992 y += row->height, ++rn)
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
993 {
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
994 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
995 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
996
53879
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
997 row = w->desired_matrix->rows + rn;
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
998 if (!row->enabled_p)
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
999 row = w->current_matrix->rows + rn;
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 indicate_bob_p = row->indicate_bob_p;
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
1002 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
1003 indicate_eob_p = row->indicate_eob_p;
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
1004 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
1005
53879
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
1006 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
1007 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
1008
58443
4e571414ba22 (update_window_fringes): Show top row indicator if
Kim F. Storm <storm@cua.dk>
parents: 58424
diff changeset
1009 if (!row->mode_line_p)
4e571414ba22 (update_window_fringes): Show top row indicator if
Kim F. Storm <storm@cua.dk>
parents: 58424
diff changeset
1010 {
109296
f6f0d450d542 Fix ghost buffer boundary indicators in fringes (Bug#5634, Bug#6325).
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 108933
diff changeset
1011 if (top_ind_rn < 0 && row->visible_height > 0)
58443
4e571414ba22 (update_window_fringes): Show top row indicator if
Kim F. Storm <storm@cua.dk>
parents: 58424
diff changeset
1012 {
65066
67861e2e09d6 * fringe.c (update_window_fringes): Only put TOP and BOTTOM
Kim F. Storm <storm@cua.dk>
parents: 65062
diff changeset
1013 if (MATRIX_ROW_START_CHARPOS (row) <= BUF_BEGV (XBUFFER (w->buffer))
67861e2e09d6 * fringe.c (update_window_fringes): Only put TOP and BOTTOM
Kim F. Storm <storm@cua.dk>
parents: 65062
diff changeset
1014 && !MATRIX_ROW_PARTIALLY_VISIBLE_AT_TOP_P (w, row))
58443
4e571414ba22 (update_window_fringes): Show top row indicator if
Kim F. Storm <storm@cua.dk>
parents: 58424
diff changeset
1015 row->indicate_bob_p = !NILP (boundary_top);
4e571414ba22 (update_window_fringes): Show top row indicator if
Kim F. Storm <storm@cua.dk>
parents: 58424
diff changeset
1016 else
4e571414ba22 (update_window_fringes): Show top row indicator if
Kim F. Storm <storm@cua.dk>
parents: 58424
diff changeset
1017 row->indicate_top_line_p = !NILP (arrow_top);
109296
f6f0d450d542 Fix ghost buffer boundary indicators in fringes (Bug#5634, Bug#6325).
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 108933
diff changeset
1018 top_ind_rn = rn;
58443
4e571414ba22 (update_window_fringes): Show top row indicator if
Kim F. Storm <storm@cua.dk>
parents: 58424
diff changeset
1019 }
53879
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
1020
109296
f6f0d450d542 Fix ghost buffer boundary indicators in fringes (Bug#5634, Bug#6325).
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 108933
diff changeset
1021 if (bot_ind_rn < 0)
58443
4e571414ba22 (update_window_fringes): Show top row indicator if
Kim F. Storm <storm@cua.dk>
parents: 58424
diff changeset
1022 {
66622
cf3d316b4bc0 (update_window_fringes): Undo 2005-10-27 change.
Kim F. Storm <storm@cua.dk>
parents: 66471
diff changeset
1023 if (MATRIX_ROW_END_CHARPOS (row) >= BUF_ZV (XBUFFER (w->buffer))
65066
67861e2e09d6 * fringe.c (update_window_fringes): Only put TOP and BOTTOM
Kim F. Storm <storm@cua.dk>
parents: 65062
diff changeset
1024 && !MATRIX_ROW_PARTIALLY_VISIBLE_AT_BOTTOM_P (w, row))
109296
f6f0d450d542 Fix ghost buffer boundary indicators in fringes (Bug#5634, Bug#6325).
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 108933
diff changeset
1025 row->indicate_eob_p = !NILP (boundary_bot), bot_ind_rn = rn;
58443
4e571414ba22 (update_window_fringes): Show top row indicator if
Kim F. Storm <storm@cua.dk>
parents: 58424
diff changeset
1026 else if (y + row->height >= yb)
109296
f6f0d450d542 Fix ghost buffer boundary indicators in fringes (Bug#5634, Bug#6325).
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 108933
diff changeset
1027 row->indicate_bottom_line_p = !NILP (arrow_bot), bot_ind_rn = rn;
58443
4e571414ba22 (update_window_fringes): Show top row indicator if
Kim F. Storm <storm@cua.dk>
parents: 58424
diff changeset
1028 }
4e571414ba22 (update_window_fringes): Show top row indicator if
Kim F. Storm <storm@cua.dk>
parents: 58424
diff changeset
1029 }
53879
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
1030 }
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
1031 }
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
1032
57246
36ab9b017a42 (update_window_fringes): Handle new formats of
Kim F. Storm <storm@cua.dk>
parents: 54230
diff changeset
1033 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
1034 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
1035 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
1036
69049
28b3892bfcda (enum fringe_bitmap_type): Remove. Change all uses
Kim F. Storm <storm@cua.dk>
parents: 68651
diff changeset
1037 for (y = 0; y < MAX_BITMAP_CACHE; y++)
28b3892bfcda (enum fringe_bitmap_type): Remove. Change all uses
Kim F. Storm <storm@cua.dk>
parents: 68651
diff changeset
1038 bitmap_cache[y] = -1;
28b3892bfcda (enum fringe_bitmap_type): Remove. Change all uses
Kim F. Storm <storm@cua.dk>
parents: 68651
diff changeset
1039
28b3892bfcda (enum fringe_bitmap_type): Remove. Change all uses
Kim F. Storm <storm@cua.dk>
parents: 68651
diff changeset
1040 #define LEFT_FRINGE(cache, which, partial_p) \
28b3892bfcda (enum fringe_bitmap_type): Remove. Change all uses
Kim F. Storm <storm@cua.dk>
parents: 68651
diff changeset
1041 (bitmap_cache[cache*4+partial_p] >= 0 \
28b3892bfcda (enum fringe_bitmap_type): Remove. Change all uses
Kim F. Storm <storm@cua.dk>
parents: 68651
diff changeset
1042 ? bitmap_cache[cache*4+partial_p] \
28b3892bfcda (enum fringe_bitmap_type): Remove. Change all uses
Kim F. Storm <storm@cua.dk>
parents: 68651
diff changeset
1043 : (bitmap_cache[cache*4+partial_p] = \
28b3892bfcda (enum fringe_bitmap_type): Remove. Change all uses
Kim F. Storm <storm@cua.dk>
parents: 68651
diff changeset
1044 get_logical_fringe_bitmap (w, which, 0, partial_p)))
28b3892bfcda (enum fringe_bitmap_type): Remove. Change all uses
Kim F. Storm <storm@cua.dk>
parents: 68651
diff changeset
1045
28b3892bfcda (enum fringe_bitmap_type): Remove. Change all uses
Kim F. Storm <storm@cua.dk>
parents: 68651
diff changeset
1046 #define RIGHT_FRINGE(cache, which, partial_p) \
28b3892bfcda (enum fringe_bitmap_type): Remove. Change all uses
Kim F. Storm <storm@cua.dk>
parents: 68651
diff changeset
1047 (bitmap_cache[cache*4+2+partial_p] >= 0 \
28b3892bfcda (enum fringe_bitmap_type): Remove. Change all uses
Kim F. Storm <storm@cua.dk>
parents: 68651
diff changeset
1048 ? bitmap_cache[cache*4+2+partial_p] \
28b3892bfcda (enum fringe_bitmap_type): Remove. Change all uses
Kim F. Storm <storm@cua.dk>
parents: 68651
diff changeset
1049 : (bitmap_cache[cache*4+2+partial_p] = \
28b3892bfcda (enum fringe_bitmap_type): Remove. Change all uses
Kim F. Storm <storm@cua.dk>
parents: 68651
diff changeset
1050 get_logical_fringe_bitmap (w, which, 1, partial_p)))
28b3892bfcda (enum fringe_bitmap_type): Remove. Change all uses
Kim F. Storm <storm@cua.dk>
parents: 68651
diff changeset
1051
28b3892bfcda (enum fringe_bitmap_type): Remove. Change all uses
Kim F. Storm <storm@cua.dk>
parents: 68651
diff changeset
1052
109296
f6f0d450d542 Fix ghost buffer boundary indicators in fringes (Bug#5634, Bug#6325).
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 108933
diff changeset
1053 /* Extend top-aligned top indicator (or bottom-aligned bottom
f6f0d450d542 Fix ghost buffer boundary indicators in fringes (Bug#5634, Bug#6325).
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 108933
diff changeset
1054 indicator) to adjacent rows if it doesn't fit in one row. */
f6f0d450d542 Fix ghost buffer boundary indicators in fringes (Bug#5634, Bug#6325).
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 108933
diff changeset
1055 top_ind_min_y = bot_ind_max_y = -1;
f6f0d450d542 Fix ghost buffer boundary indicators in fringes (Bug#5634, Bug#6325).
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 108933
diff changeset
1056 if (top_ind_rn >= 0)
f6f0d450d542 Fix ghost buffer boundary indicators in fringes (Bug#5634, Bug#6325).
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 108933
diff changeset
1057 {
f6f0d450d542 Fix ghost buffer boundary indicators in fringes (Bug#5634, Bug#6325).
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 108933
diff changeset
1058 int bn = NO_FRINGE_BITMAP;
f6f0d450d542 Fix ghost buffer boundary indicators in fringes (Bug#5634, Bug#6325).
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 108933
diff changeset
1059
f6f0d450d542 Fix ghost buffer boundary indicators in fringes (Bug#5634, Bug#6325).
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 108933
diff changeset
1060 row = w->desired_matrix->rows + top_ind_rn;
f6f0d450d542 Fix ghost buffer boundary indicators in fringes (Bug#5634, Bug#6325).
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 108933
diff changeset
1061 if (!row->enabled_p)
f6f0d450d542 Fix ghost buffer boundary indicators in fringes (Bug#5634, Bug#6325).
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 108933
diff changeset
1062 row = w->current_matrix->rows + top_ind_rn;
f6f0d450d542 Fix ghost buffer boundary indicators in fringes (Bug#5634, Bug#6325).
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 108933
diff changeset
1063
f6f0d450d542 Fix ghost buffer boundary indicators in fringes (Bug#5634, Bug#6325).
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 108933
diff changeset
1064 top_row_ends_at_zv_p = row->ends_at_zv_p;
f6f0d450d542 Fix ghost buffer boundary indicators in fringes (Bug#5634, Bug#6325).
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 108933
diff changeset
1065 if (row->indicate_bob_p)
f6f0d450d542 Fix ghost buffer boundary indicators in fringes (Bug#5634, Bug#6325).
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 108933
diff changeset
1066 {
f6f0d450d542 Fix ghost buffer boundary indicators in fringes (Bug#5634, Bug#6325).
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 108933
diff changeset
1067 if (EQ (boundary_top, Qleft))
f6f0d450d542 Fix ghost buffer boundary indicators in fringes (Bug#5634, Bug#6325).
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 108933
diff changeset
1068 bn = ((row->indicate_eob_p && EQ (boundary_bot, Qleft))
f6f0d450d542 Fix ghost buffer boundary indicators in fringes (Bug#5634, Bug#6325).
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 108933
diff changeset
1069 ? LEFT_FRINGE (1, Qtop_bottom, row->ends_at_zv_p)
f6f0d450d542 Fix ghost buffer boundary indicators in fringes (Bug#5634, Bug#6325).
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 108933
diff changeset
1070 : LEFT_FRINGE (2, Qtop, 0));
f6f0d450d542 Fix ghost buffer boundary indicators in fringes (Bug#5634, Bug#6325).
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 108933
diff changeset
1071 else
f6f0d450d542 Fix ghost buffer boundary indicators in fringes (Bug#5634, Bug#6325).
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 108933
diff changeset
1072 bn = ((row->indicate_eob_p && EQ (boundary_bot, Qright))
f6f0d450d542 Fix ghost buffer boundary indicators in fringes (Bug#5634, Bug#6325).
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 108933
diff changeset
1073 ? RIGHT_FRINGE (1, Qtop_bottom, row->ends_at_zv_p)
f6f0d450d542 Fix ghost buffer boundary indicators in fringes (Bug#5634, Bug#6325).
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 108933
diff changeset
1074 : RIGHT_FRINGE (2, Qtop, 0));
f6f0d450d542 Fix ghost buffer boundary indicators in fringes (Bug#5634, Bug#6325).
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 108933
diff changeset
1075 }
f6f0d450d542 Fix ghost buffer boundary indicators in fringes (Bug#5634, Bug#6325).
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 108933
diff changeset
1076 else if (row->indicate_top_line_p)
f6f0d450d542 Fix ghost buffer boundary indicators in fringes (Bug#5634, Bug#6325).
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 108933
diff changeset
1077 {
f6f0d450d542 Fix ghost buffer boundary indicators in fringes (Bug#5634, Bug#6325).
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 108933
diff changeset
1078 if (EQ (arrow_top, Qleft))
f6f0d450d542 Fix ghost buffer boundary indicators in fringes (Bug#5634, Bug#6325).
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 108933
diff changeset
1079 bn = LEFT_FRINGE (6, Qup, 0);
f6f0d450d542 Fix ghost buffer boundary indicators in fringes (Bug#5634, Bug#6325).
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 108933
diff changeset
1080 else
f6f0d450d542 Fix ghost buffer boundary indicators in fringes (Bug#5634, Bug#6325).
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 108933
diff changeset
1081 bn = RIGHT_FRINGE (6, Qup, 0);
f6f0d450d542 Fix ghost buffer boundary indicators in fringes (Bug#5634, Bug#6325).
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 108933
diff changeset
1082 }
f6f0d450d542 Fix ghost buffer boundary indicators in fringes (Bug#5634, Bug#6325).
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 108933
diff changeset
1083
f6f0d450d542 Fix ghost buffer boundary indicators in fringes (Bug#5634, Bug#6325).
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 108933
diff changeset
1084 if (bn != NO_FRINGE_BITMAP)
f6f0d450d542 Fix ghost buffer boundary indicators in fringes (Bug#5634, Bug#6325).
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 108933
diff changeset
1085 {
f6f0d450d542 Fix ghost buffer boundary indicators in fringes (Bug#5634, Bug#6325).
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 108933
diff changeset
1086 struct fringe_bitmap *fb;
f6f0d450d542 Fix ghost buffer boundary indicators in fringes (Bug#5634, Bug#6325).
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 108933
diff changeset
1087
f6f0d450d542 Fix ghost buffer boundary indicators in fringes (Bug#5634, Bug#6325).
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 108933
diff changeset
1088 fb = fringe_bitmaps[bn];
f6f0d450d542 Fix ghost buffer boundary indicators in fringes (Bug#5634, Bug#6325).
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 108933
diff changeset
1089 if (fb == NULL)
f6f0d450d542 Fix ghost buffer boundary indicators in fringes (Bug#5634, Bug#6325).
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 108933
diff changeset
1090 fb = &standard_bitmaps[bn < MAX_STANDARD_FRINGE_BITMAPS
f6f0d450d542 Fix ghost buffer boundary indicators in fringes (Bug#5634, Bug#6325).
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 108933
diff changeset
1091 ? bn : UNDEF_FRINGE_BITMAP];
f6f0d450d542 Fix ghost buffer boundary indicators in fringes (Bug#5634, Bug#6325).
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 108933
diff changeset
1092 if (fb->align == ALIGN_BITMAP_TOP && fb->period == 0)
f6f0d450d542 Fix ghost buffer boundary indicators in fringes (Bug#5634, Bug#6325).
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 108933
diff changeset
1093 {
f6f0d450d542 Fix ghost buffer boundary indicators in fringes (Bug#5634, Bug#6325).
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 108933
diff changeset
1094 struct glyph_row *row1;
f6f0d450d542 Fix ghost buffer boundary indicators in fringes (Bug#5634, Bug#6325).
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 108933
diff changeset
1095 int top_ind_max_y;
f6f0d450d542 Fix ghost buffer boundary indicators in fringes (Bug#5634, Bug#6325).
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 108933
diff changeset
1096
f6f0d450d542 Fix ghost buffer boundary indicators in fringes (Bug#5634, Bug#6325).
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 108933
diff changeset
1097 top_ind_min_y = WINDOW_HEADER_LINE_HEIGHT (w);
f6f0d450d542 Fix ghost buffer boundary indicators in fringes (Bug#5634, Bug#6325).
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 108933
diff changeset
1098 top_ind_max_y = top_ind_min_y + fb->height;
f6f0d450d542 Fix ghost buffer boundary indicators in fringes (Bug#5634, Bug#6325).
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 108933
diff changeset
1099 if (top_ind_max_y > yb)
f6f0d450d542 Fix ghost buffer boundary indicators in fringes (Bug#5634, Bug#6325).
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 108933
diff changeset
1100 top_ind_max_y = yb;
f6f0d450d542 Fix ghost buffer boundary indicators in fringes (Bug#5634, Bug#6325).
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 108933
diff changeset
1101
f6f0d450d542 Fix ghost buffer boundary indicators in fringes (Bug#5634, Bug#6325).
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 108933
diff changeset
1102 for (y = row->y + row->height, rn = top_ind_rn + 1;
f6f0d450d542 Fix ghost buffer boundary indicators in fringes (Bug#5634, Bug#6325).
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 108933
diff changeset
1103 y < top_ind_max_y && rn < nrows;
f6f0d450d542 Fix ghost buffer boundary indicators in fringes (Bug#5634, Bug#6325).
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 108933
diff changeset
1104 y += row1->height, rn++)
f6f0d450d542 Fix ghost buffer boundary indicators in fringes (Bug#5634, Bug#6325).
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 108933
diff changeset
1105 {
f6f0d450d542 Fix ghost buffer boundary indicators in fringes (Bug#5634, Bug#6325).
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 108933
diff changeset
1106 if (bot_ind_rn >= 0 && rn >= bot_ind_rn)
f6f0d450d542 Fix ghost buffer boundary indicators in fringes (Bug#5634, Bug#6325).
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 108933
diff changeset
1107 break;
f6f0d450d542 Fix ghost buffer boundary indicators in fringes (Bug#5634, Bug#6325).
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 108933
diff changeset
1108
f6f0d450d542 Fix ghost buffer boundary indicators in fringes (Bug#5634, Bug#6325).
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 108933
diff changeset
1109 row1 = w->desired_matrix->rows + rn;
f6f0d450d542 Fix ghost buffer boundary indicators in fringes (Bug#5634, Bug#6325).
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 108933
diff changeset
1110 if (!row1->enabled_p)
f6f0d450d542 Fix ghost buffer boundary indicators in fringes (Bug#5634, Bug#6325).
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 108933
diff changeset
1111 row1 = w->current_matrix->rows + rn;
f6f0d450d542 Fix ghost buffer boundary indicators in fringes (Bug#5634, Bug#6325).
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 108933
diff changeset
1112
f6f0d450d542 Fix ghost buffer boundary indicators in fringes (Bug#5634, Bug#6325).
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 108933
diff changeset
1113 row1->indicate_bob_p = row->indicate_bob_p;
f6f0d450d542 Fix ghost buffer boundary indicators in fringes (Bug#5634, Bug#6325).
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 108933
diff changeset
1114 row1->indicate_top_line_p = row->indicate_top_line_p;
f6f0d450d542 Fix ghost buffer boundary indicators in fringes (Bug#5634, Bug#6325).
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 108933
diff changeset
1115 }
f6f0d450d542 Fix ghost buffer boundary indicators in fringes (Bug#5634, Bug#6325).
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 108933
diff changeset
1116 }
f6f0d450d542 Fix ghost buffer boundary indicators in fringes (Bug#5634, Bug#6325).
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 108933
diff changeset
1117 }
f6f0d450d542 Fix ghost buffer boundary indicators in fringes (Bug#5634, Bug#6325).
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 108933
diff changeset
1118 }
f6f0d450d542 Fix ghost buffer boundary indicators in fringes (Bug#5634, Bug#6325).
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 108933
diff changeset
1119 if (bot_ind_rn >= 0)
f6f0d450d542 Fix ghost buffer boundary indicators in fringes (Bug#5634, Bug#6325).
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 108933
diff changeset
1120 {
f6f0d450d542 Fix ghost buffer boundary indicators in fringes (Bug#5634, Bug#6325).
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 108933
diff changeset
1121 int bn = NO_FRINGE_BITMAP;
f6f0d450d542 Fix ghost buffer boundary indicators in fringes (Bug#5634, Bug#6325).
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 108933
diff changeset
1122
f6f0d450d542 Fix ghost buffer boundary indicators in fringes (Bug#5634, Bug#6325).
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 108933
diff changeset
1123 row = w->desired_matrix->rows + bot_ind_rn;
f6f0d450d542 Fix ghost buffer boundary indicators in fringes (Bug#5634, Bug#6325).
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 108933
diff changeset
1124 if (!row->enabled_p)
f6f0d450d542 Fix ghost buffer boundary indicators in fringes (Bug#5634, Bug#6325).
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 108933
diff changeset
1125 row = w->current_matrix->rows + bot_ind_rn;
f6f0d450d542 Fix ghost buffer boundary indicators in fringes (Bug#5634, Bug#6325).
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 108933
diff changeset
1126
f6f0d450d542 Fix ghost buffer boundary indicators in fringes (Bug#5634, Bug#6325).
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 108933
diff changeset
1127 bot_row_ends_at_zv_p = row->ends_at_zv_p;
f6f0d450d542 Fix ghost buffer boundary indicators in fringes (Bug#5634, Bug#6325).
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 108933
diff changeset
1128 if (row->indicate_eob_p)
f6f0d450d542 Fix ghost buffer boundary indicators in fringes (Bug#5634, Bug#6325).
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 108933
diff changeset
1129 {
f6f0d450d542 Fix ghost buffer boundary indicators in fringes (Bug#5634, Bug#6325).
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 108933
diff changeset
1130 if (EQ (boundary_bot, Qleft))
f6f0d450d542 Fix ghost buffer boundary indicators in fringes (Bug#5634, Bug#6325).
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 108933
diff changeset
1131 bn = LEFT_FRINGE (3, Qbottom, row->ends_at_zv_p);
f6f0d450d542 Fix ghost buffer boundary indicators in fringes (Bug#5634, Bug#6325).
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 108933
diff changeset
1132 else
f6f0d450d542 Fix ghost buffer boundary indicators in fringes (Bug#5634, Bug#6325).
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 108933
diff changeset
1133 bn = RIGHT_FRINGE (3, Qbottom, row->ends_at_zv_p);
f6f0d450d542 Fix ghost buffer boundary indicators in fringes (Bug#5634, Bug#6325).
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 108933
diff changeset
1134 }
f6f0d450d542 Fix ghost buffer boundary indicators in fringes (Bug#5634, Bug#6325).
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 108933
diff changeset
1135 else if (row->indicate_bottom_line_p)
f6f0d450d542 Fix ghost buffer boundary indicators in fringes (Bug#5634, Bug#6325).
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 108933
diff changeset
1136 {
f6f0d450d542 Fix ghost buffer boundary indicators in fringes (Bug#5634, Bug#6325).
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 108933
diff changeset
1137 if (EQ (arrow_bot, Qleft))
f6f0d450d542 Fix ghost buffer boundary indicators in fringes (Bug#5634, Bug#6325).
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 108933
diff changeset
1138 bn = LEFT_FRINGE (7, Qdown, 0);
f6f0d450d542 Fix ghost buffer boundary indicators in fringes (Bug#5634, Bug#6325).
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 108933
diff changeset
1139 else
f6f0d450d542 Fix ghost buffer boundary indicators in fringes (Bug#5634, Bug#6325).
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 108933
diff changeset
1140 bn = RIGHT_FRINGE (7, Qdown, 0);
f6f0d450d542 Fix ghost buffer boundary indicators in fringes (Bug#5634, Bug#6325).
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 108933
diff changeset
1141 }
f6f0d450d542 Fix ghost buffer boundary indicators in fringes (Bug#5634, Bug#6325).
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 108933
diff changeset
1142
f6f0d450d542 Fix ghost buffer boundary indicators in fringes (Bug#5634, Bug#6325).
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 108933
diff changeset
1143 if (bn != NO_FRINGE_BITMAP)
f6f0d450d542 Fix ghost buffer boundary indicators in fringes (Bug#5634, Bug#6325).
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 108933
diff changeset
1144 {
f6f0d450d542 Fix ghost buffer boundary indicators in fringes (Bug#5634, Bug#6325).
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 108933
diff changeset
1145 struct fringe_bitmap *fb;
f6f0d450d542 Fix ghost buffer boundary indicators in fringes (Bug#5634, Bug#6325).
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 108933
diff changeset
1146
f6f0d450d542 Fix ghost buffer boundary indicators in fringes (Bug#5634, Bug#6325).
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 108933
diff changeset
1147 fb = fringe_bitmaps[bn];
f6f0d450d542 Fix ghost buffer boundary indicators in fringes (Bug#5634, Bug#6325).
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 108933
diff changeset
1148 if (fb == NULL)
f6f0d450d542 Fix ghost buffer boundary indicators in fringes (Bug#5634, Bug#6325).
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 108933
diff changeset
1149 fb = &standard_bitmaps[bn < MAX_STANDARD_FRINGE_BITMAPS
f6f0d450d542 Fix ghost buffer boundary indicators in fringes (Bug#5634, Bug#6325).
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 108933
diff changeset
1150 ? bn : UNDEF_FRINGE_BITMAP];
f6f0d450d542 Fix ghost buffer boundary indicators in fringes (Bug#5634, Bug#6325).
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 108933
diff changeset
1151 if (fb->align == ALIGN_BITMAP_BOTTOM && fb->period == 0)
f6f0d450d542 Fix ghost buffer boundary indicators in fringes (Bug#5634, Bug#6325).
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 108933
diff changeset
1152 {
f6f0d450d542 Fix ghost buffer boundary indicators in fringes (Bug#5634, Bug#6325).
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 108933
diff changeset
1153 struct glyph_row *row1;
f6f0d450d542 Fix ghost buffer boundary indicators in fringes (Bug#5634, Bug#6325).
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 108933
diff changeset
1154 int bot_ind_min_y;
f6f0d450d542 Fix ghost buffer boundary indicators in fringes (Bug#5634, Bug#6325).
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 108933
diff changeset
1155
f6f0d450d542 Fix ghost buffer boundary indicators in fringes (Bug#5634, Bug#6325).
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 108933
diff changeset
1156 bot_ind_max_y = row->y + row->visible_height;
f6f0d450d542 Fix ghost buffer boundary indicators in fringes (Bug#5634, Bug#6325).
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 108933
diff changeset
1157 bot_ind_min_y = bot_ind_max_y - fb->height;
f6f0d450d542 Fix ghost buffer boundary indicators in fringes (Bug#5634, Bug#6325).
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 108933
diff changeset
1158 if (bot_ind_min_y < WINDOW_HEADER_LINE_HEIGHT (w))
f6f0d450d542 Fix ghost buffer boundary indicators in fringes (Bug#5634, Bug#6325).
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 108933
diff changeset
1159 bot_ind_min_y = WINDOW_HEADER_LINE_HEIGHT (w);
f6f0d450d542 Fix ghost buffer boundary indicators in fringes (Bug#5634, Bug#6325).
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 108933
diff changeset
1160
f6f0d450d542 Fix ghost buffer boundary indicators in fringes (Bug#5634, Bug#6325).
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 108933
diff changeset
1161 for (y = row->y, rn = bot_ind_rn - 1;
f6f0d450d542 Fix ghost buffer boundary indicators in fringes (Bug#5634, Bug#6325).
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 108933
diff changeset
1162 y >= bot_ind_min_y && rn >= 0;
f6f0d450d542 Fix ghost buffer boundary indicators in fringes (Bug#5634, Bug#6325).
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 108933
diff changeset
1163 y -= row1->height, rn--)
f6f0d450d542 Fix ghost buffer boundary indicators in fringes (Bug#5634, Bug#6325).
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 108933
diff changeset
1164 {
f6f0d450d542 Fix ghost buffer boundary indicators in fringes (Bug#5634, Bug#6325).
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 108933
diff changeset
1165 if (top_ind_rn >= 0 && rn <= top_ind_rn)
f6f0d450d542 Fix ghost buffer boundary indicators in fringes (Bug#5634, Bug#6325).
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 108933
diff changeset
1166 break;
f6f0d450d542 Fix ghost buffer boundary indicators in fringes (Bug#5634, Bug#6325).
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 108933
diff changeset
1167
f6f0d450d542 Fix ghost buffer boundary indicators in fringes (Bug#5634, Bug#6325).
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 108933
diff changeset
1168 row1 = w->desired_matrix->rows + rn;
f6f0d450d542 Fix ghost buffer boundary indicators in fringes (Bug#5634, Bug#6325).
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 108933
diff changeset
1169 if (!row1->enabled_p)
f6f0d450d542 Fix ghost buffer boundary indicators in fringes (Bug#5634, Bug#6325).
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 108933
diff changeset
1170 row1 = w->current_matrix->rows + rn;
f6f0d450d542 Fix ghost buffer boundary indicators in fringes (Bug#5634, Bug#6325).
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 108933
diff changeset
1171
f6f0d450d542 Fix ghost buffer boundary indicators in fringes (Bug#5634, Bug#6325).
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 108933
diff changeset
1172 row1->indicate_eob_p = row->indicate_eob_p;
f6f0d450d542 Fix ghost buffer boundary indicators in fringes (Bug#5634, Bug#6325).
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 108933
diff changeset
1173 row1->indicate_bottom_line_p = row->indicate_bottom_line_p;
f6f0d450d542 Fix ghost buffer boundary indicators in fringes (Bug#5634, Bug#6325).
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 108933
diff changeset
1174 }
f6f0d450d542 Fix ghost buffer boundary indicators in fringes (Bug#5634, Bug#6325).
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 108933
diff changeset
1175 }
f6f0d450d542 Fix ghost buffer boundary indicators in fringes (Bug#5634, Bug#6325).
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 108933
diff changeset
1176 }
f6f0d450d542 Fix ghost buffer boundary indicators in fringes (Bug#5634, Bug#6325).
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 108933
diff changeset
1177 }
f6f0d450d542 Fix ghost buffer boundary indicators in fringes (Bug#5634, Bug#6325).
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 108933
diff changeset
1178
f6f0d450d542 Fix ghost buffer boundary indicators in fringes (Bug#5634, Bug#6325).
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 108933
diff changeset
1179 for (y = w->vscroll, rn = 0;
53879
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
1180 y < yb && rn < nrows;
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
1181 y += row->height, rn++)
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
1182 {
69049
28b3892bfcda (enum fringe_bitmap_type): Remove. Change all uses
Kim F. Storm <storm@cua.dk>
parents: 68651
diff changeset
1183 int left, right;
53879
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
1184 unsigned left_face_id, right_face_id;
109296
f6f0d450d542 Fix ghost buffer boundary indicators in fringes (Bug#5634, Bug#6325).
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 108933
diff changeset
1185 int left_offset, right_offset;
53879
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
1186
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
1187 row = w->desired_matrix->rows + rn;
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
1188 cur = w->current_matrix->rows + rn;
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
1189 if (!row->enabled_p)
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
1190 row = cur;
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
1191
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
1192 left_face_id = right_face_id = DEFAULT_FACE_ID;
109296
f6f0d450d542 Fix ghost buffer boundary indicators in fringes (Bug#5634, Bug#6325).
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 108933
diff changeset
1193 left_offset = right_offset = 0;
53879
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
1194
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
1195 /* 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
1196 if (WINDOW_LEFT_FRINGE_WIDTH (w) == 0)
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
1197 left = NO_FRINGE_BITMAP;
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
1198 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
1199 {
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
1200 left = row->left_user_fringe_bitmap;
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
1201 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
1202 }
58532
6fee0102eafe (update_window_fringes): Prefer truncation bitmaps over
Kim F. Storm <storm@cua.dk>
parents: 58443
diff changeset
1203 else if (row->truncated_on_left_p)
69049
28b3892bfcda (enum fringe_bitmap_type): Remove. Change all uses
Kim F. Storm <storm@cua.dk>
parents: 68651
diff changeset
1204 left = LEFT_FRINGE(0, Qtruncation, 0);
57246
36ab9b017a42 (update_window_fringes): Handle new formats of
Kim F. Storm <storm@cua.dk>
parents: 54230
diff changeset
1205 else if (row->indicate_bob_p && EQ (boundary_top, Qleft))
109296
f6f0d450d542 Fix ghost buffer boundary indicators in fringes (Bug#5634, Bug#6325).
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 108933
diff changeset
1206 {
f6f0d450d542 Fix ghost buffer boundary indicators in fringes (Bug#5634, Bug#6325).
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 108933
diff changeset
1207 left = ((row->indicate_eob_p && EQ (boundary_bot, Qleft))
f6f0d450d542 Fix ghost buffer boundary indicators in fringes (Bug#5634, Bug#6325).
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 108933
diff changeset
1208 ? LEFT_FRINGE (1, Qtop_bottom, top_row_ends_at_zv_p)
f6f0d450d542 Fix ghost buffer boundary indicators in fringes (Bug#5634, Bug#6325).
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 108933
diff changeset
1209 : LEFT_FRINGE (2, Qtop, 0));
f6f0d450d542 Fix ghost buffer boundary indicators in fringes (Bug#5634, Bug#6325).
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 108933
diff changeset
1210 if (top_ind_min_y >= 0)
f6f0d450d542 Fix ghost buffer boundary indicators in fringes (Bug#5634, Bug#6325).
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 108933
diff changeset
1211 left_offset = top_ind_min_y - row->y;
f6f0d450d542 Fix ghost buffer boundary indicators in fringes (Bug#5634, Bug#6325).
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 108933
diff changeset
1212 }
57246
36ab9b017a42 (update_window_fringes): Handle new formats of
Kim F. Storm <storm@cua.dk>
parents: 54230
diff changeset
1213 else if (row->indicate_eob_p && EQ (boundary_bot, Qleft))
109296
f6f0d450d542 Fix ghost buffer boundary indicators in fringes (Bug#5634, Bug#6325).
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 108933
diff changeset
1214 {
f6f0d450d542 Fix ghost buffer boundary indicators in fringes (Bug#5634, Bug#6325).
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 108933
diff changeset
1215 left = LEFT_FRINGE (3, Qbottom, bot_row_ends_at_zv_p);
f6f0d450d542 Fix ghost buffer boundary indicators in fringes (Bug#5634, Bug#6325).
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 108933
diff changeset
1216 if (bot_ind_max_y >= 0)
f6f0d450d542 Fix ghost buffer boundary indicators in fringes (Bug#5634, Bug#6325).
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 108933
diff changeset
1217 left_offset = bot_ind_max_y - (row->y + row->visible_height);
f6f0d450d542 Fix ghost buffer boundary indicators in fringes (Bug#5634, Bug#6325).
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 108933
diff changeset
1218 }
53879
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
1219 else if (MATRIX_ROW_CONTINUATION_LINE_P (row))
69049
28b3892bfcda (enum fringe_bitmap_type): Remove. Change all uses
Kim F. Storm <storm@cua.dk>
parents: 68651
diff changeset
1220 left = LEFT_FRINGE (4, Qcontinuation, 0);
57246
36ab9b017a42 (update_window_fringes): Handle new formats of
Kim F. Storm <storm@cua.dk>
parents: 54230
diff changeset
1221 else if (row->indicate_empty_line_p && EQ (empty_pos, Qleft))
69049
28b3892bfcda (enum fringe_bitmap_type): Remove. Change all uses
Kim F. Storm <storm@cua.dk>
parents: 68651
diff changeset
1222 left = LEFT_FRINGE (5, Qempty_line, 0);
57246
36ab9b017a42 (update_window_fringes): Handle new formats of
Kim F. Storm <storm@cua.dk>
parents: 54230
diff changeset
1223 else if (row->indicate_top_line_p && EQ (arrow_top, Qleft))
109296
f6f0d450d542 Fix ghost buffer boundary indicators in fringes (Bug#5634, Bug#6325).
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 108933
diff changeset
1224 {
f6f0d450d542 Fix ghost buffer boundary indicators in fringes (Bug#5634, Bug#6325).
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 108933
diff changeset
1225 left = LEFT_FRINGE (6, Qup, 0);
f6f0d450d542 Fix ghost buffer boundary indicators in fringes (Bug#5634, Bug#6325).
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 108933
diff changeset
1226 if (top_ind_min_y >= 0)
f6f0d450d542 Fix ghost buffer boundary indicators in fringes (Bug#5634, Bug#6325).
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 108933
diff changeset
1227 left_offset = top_ind_min_y - row->y;
f6f0d450d542 Fix ghost buffer boundary indicators in fringes (Bug#5634, Bug#6325).
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 108933
diff changeset
1228 }
57246
36ab9b017a42 (update_window_fringes): Handle new formats of
Kim F. Storm <storm@cua.dk>
parents: 54230
diff changeset
1229 else if (row->indicate_bottom_line_p && EQ (arrow_bot, Qleft))
109296
f6f0d450d542 Fix ghost buffer boundary indicators in fringes (Bug#5634, Bug#6325).
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 108933
diff changeset
1230 {
f6f0d450d542 Fix ghost buffer boundary indicators in fringes (Bug#5634, Bug#6325).
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 108933
diff changeset
1231 left = LEFT_FRINGE (7, Qdown, 0);
f6f0d450d542 Fix ghost buffer boundary indicators in fringes (Bug#5634, Bug#6325).
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 108933
diff changeset
1232 if (bot_ind_max_y >= 0)
f6f0d450d542 Fix ghost buffer boundary indicators in fringes (Bug#5634, Bug#6325).
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 108933
diff changeset
1233 left_offset = bot_ind_max_y - (row->y + row->visible_height);
f6f0d450d542 Fix ghost buffer boundary indicators in fringes (Bug#5634, Bug#6325).
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 108933
diff changeset
1234 }
53879
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
1235 else
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
1236 left = NO_FRINGE_BITMAP;
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 /* 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
1239 if (WINDOW_RIGHT_FRINGE_WIDTH (w) == 0)
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
1240 right = NO_FRINGE_BITMAP;
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
1241 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
1242 {
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
1243 right = row->right_user_fringe_bitmap;
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
1244 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
1245 }
58532
6fee0102eafe (update_window_fringes): Prefer truncation bitmaps over
Kim F. Storm <storm@cua.dk>
parents: 58443
diff changeset
1246 else if (row->truncated_on_right_p)
69049
28b3892bfcda (enum fringe_bitmap_type): Remove. Change all uses
Kim F. Storm <storm@cua.dk>
parents: 68651
diff changeset
1247 right = RIGHT_FRINGE (0, Qtruncation, 0);
57246
36ab9b017a42 (update_window_fringes): Handle new formats of
Kim F. Storm <storm@cua.dk>
parents: 54230
diff changeset
1248 else if (row->indicate_bob_p && EQ (boundary_top, Qright))
109296
f6f0d450d542 Fix ghost buffer boundary indicators in fringes (Bug#5634, Bug#6325).
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 108933
diff changeset
1249 {
f6f0d450d542 Fix ghost buffer boundary indicators in fringes (Bug#5634, Bug#6325).
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 108933
diff changeset
1250 right = ((row->indicate_eob_p && EQ (boundary_bot, Qright))
f6f0d450d542 Fix ghost buffer boundary indicators in fringes (Bug#5634, Bug#6325).
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 108933
diff changeset
1251 ? RIGHT_FRINGE (1, Qtop_bottom, top_row_ends_at_zv_p)
f6f0d450d542 Fix ghost buffer boundary indicators in fringes (Bug#5634, Bug#6325).
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 108933
diff changeset
1252 : RIGHT_FRINGE (2, Qtop, 0));
f6f0d450d542 Fix ghost buffer boundary indicators in fringes (Bug#5634, Bug#6325).
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 108933
diff changeset
1253 if (top_ind_min_y >= 0)
f6f0d450d542 Fix ghost buffer boundary indicators in fringes (Bug#5634, Bug#6325).
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 108933
diff changeset
1254 right_offset = top_ind_min_y - row->y;
f6f0d450d542 Fix ghost buffer boundary indicators in fringes (Bug#5634, Bug#6325).
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 108933
diff changeset
1255 }
57246
36ab9b017a42 (update_window_fringes): Handle new formats of
Kim F. Storm <storm@cua.dk>
parents: 54230
diff changeset
1256 else if (row->indicate_eob_p && EQ (boundary_bot, Qright))
109296
f6f0d450d542 Fix ghost buffer boundary indicators in fringes (Bug#5634, Bug#6325).
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 108933
diff changeset
1257 {
f6f0d450d542 Fix ghost buffer boundary indicators in fringes (Bug#5634, Bug#6325).
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 108933
diff changeset
1258 right = RIGHT_FRINGE (3, Qbottom, bot_row_ends_at_zv_p);
f6f0d450d542 Fix ghost buffer boundary indicators in fringes (Bug#5634, Bug#6325).
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 108933
diff changeset
1259 if (bot_ind_max_y >= 0)
f6f0d450d542 Fix ghost buffer boundary indicators in fringes (Bug#5634, Bug#6325).
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 108933
diff changeset
1260 right_offset = bot_ind_max_y - (row->y + row->visible_height);
f6f0d450d542 Fix ghost buffer boundary indicators in fringes (Bug#5634, Bug#6325).
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 108933
diff changeset
1261 }
53879
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
1262 else if (row->continued_p)
69049
28b3892bfcda (enum fringe_bitmap_type): Remove. Change all uses
Kim F. Storm <storm@cua.dk>
parents: 68651
diff changeset
1263 right = RIGHT_FRINGE (4, Qcontinuation, 0);
57246
36ab9b017a42 (update_window_fringes): Handle new formats of
Kim F. Storm <storm@cua.dk>
parents: 54230
diff changeset
1264 else if (row->indicate_top_line_p && EQ (arrow_top, Qright))
109296
f6f0d450d542 Fix ghost buffer boundary indicators in fringes (Bug#5634, Bug#6325).
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 108933
diff changeset
1265 {
f6f0d450d542 Fix ghost buffer boundary indicators in fringes (Bug#5634, Bug#6325).
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 108933
diff changeset
1266 right = RIGHT_FRINGE (6, Qup, 0);
f6f0d450d542 Fix ghost buffer boundary indicators in fringes (Bug#5634, Bug#6325).
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 108933
diff changeset
1267 if (top_ind_min_y >= 0)
f6f0d450d542 Fix ghost buffer boundary indicators in fringes (Bug#5634, Bug#6325).
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 108933
diff changeset
1268 right_offset = top_ind_min_y - row->y;
f6f0d450d542 Fix ghost buffer boundary indicators in fringes (Bug#5634, Bug#6325).
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 108933
diff changeset
1269 }
57246
36ab9b017a42 (update_window_fringes): Handle new formats of
Kim F. Storm <storm@cua.dk>
parents: 54230
diff changeset
1270 else if (row->indicate_bottom_line_p && EQ (arrow_bot, Qright))
109296
f6f0d450d542 Fix ghost buffer boundary indicators in fringes (Bug#5634, Bug#6325).
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 108933
diff changeset
1271 {
f6f0d450d542 Fix ghost buffer boundary indicators in fringes (Bug#5634, Bug#6325).
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 108933
diff changeset
1272 right = RIGHT_FRINGE (7, Qdown, 0);
f6f0d450d542 Fix ghost buffer boundary indicators in fringes (Bug#5634, Bug#6325).
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 108933
diff changeset
1273 if (bot_ind_max_y >= 0)
f6f0d450d542 Fix ghost buffer boundary indicators in fringes (Bug#5634, Bug#6325).
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 108933
diff changeset
1274 right_offset = bot_ind_max_y - (row->y + row->visible_height);
f6f0d450d542 Fix ghost buffer boundary indicators in fringes (Bug#5634, Bug#6325).
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 108933
diff changeset
1275 }
57246
36ab9b017a42 (update_window_fringes): Handle new formats of
Kim F. Storm <storm@cua.dk>
parents: 54230
diff changeset
1276 else if (row->indicate_empty_line_p && EQ (empty_pos, Qright))
69049
28b3892bfcda (enum fringe_bitmap_type): Remove. Change all uses
Kim F. Storm <storm@cua.dk>
parents: 68651
diff changeset
1277 right = RIGHT_FRINGE (5, Qempty_line, 0);
53879
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
1278 else
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
1279 right = NO_FRINGE_BITMAP;
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
1280
65062
8370ced2ae75 (update_window_fringes): Replace FORCE_P arg with KEEP_CURRENT_P arg;
Kim F. Storm <storm@cua.dk>
parents: 64770
diff changeset
1281 if (row->y != cur->y
53879
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
1282 || row->visible_height != cur->visible_height
58057
33d7af04fba1 (update_window_fringes): Update fringe bitmaps if
Kim F. Storm <storm@cua.dk>
parents: 57371
diff changeset
1283 || row->ends_at_zv_p != cur->ends_at_zv_p
53879
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
1284 || left != cur->left_fringe_bitmap
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
1285 || right != cur->right_fringe_bitmap
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
1286 || 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
1287 || right_face_id != cur->right_fringe_face_id
109296
f6f0d450d542 Fix ghost buffer boundary indicators in fringes (Bug#5634, Bug#6325).
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 108933
diff changeset
1288 || left_offset != cur->left_fringe_offset
f6f0d450d542 Fix ghost buffer boundary indicators in fringes (Bug#5634, Bug#6325).
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 108933
diff changeset
1289 || right_offset != cur->right_fringe_offset
53879
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
1290 || cur->redraw_fringe_bitmaps_p)
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
1291 {
65062
8370ced2ae75 (update_window_fringes): Replace FORCE_P arg with KEEP_CURRENT_P arg;
Kim F. Storm <storm@cua.dk>
parents: 64770
diff changeset
1292 redraw_p = row->redraw_fringe_bitmaps_p = 1;
8370ced2ae75 (update_window_fringes): Replace FORCE_P arg with KEEP_CURRENT_P arg;
Kim F. Storm <storm@cua.dk>
parents: 64770
diff changeset
1293 if (!keep_current_p)
8370ced2ae75 (update_window_fringes): Replace FORCE_P arg with KEEP_CURRENT_P arg;
Kim F. Storm <storm@cua.dk>
parents: 64770
diff changeset
1294 {
8370ced2ae75 (update_window_fringes): Replace FORCE_P arg with KEEP_CURRENT_P arg;
Kim F. Storm <storm@cua.dk>
parents: 64770
diff changeset
1295 cur->redraw_fringe_bitmaps_p = 1;
8370ced2ae75 (update_window_fringes): Replace FORCE_P arg with KEEP_CURRENT_P arg;
Kim F. Storm <storm@cua.dk>
parents: 64770
diff changeset
1296 cur->left_fringe_bitmap = left;
8370ced2ae75 (update_window_fringes): Replace FORCE_P arg with KEEP_CURRENT_P arg;
Kim F. Storm <storm@cua.dk>
parents: 64770
diff changeset
1297 cur->right_fringe_bitmap = right;
8370ced2ae75 (update_window_fringes): Replace FORCE_P arg with KEEP_CURRENT_P arg;
Kim F. Storm <storm@cua.dk>
parents: 64770
diff changeset
1298 cur->left_fringe_face_id = left_face_id;
8370ced2ae75 (update_window_fringes): Replace FORCE_P arg with KEEP_CURRENT_P arg;
Kim F. Storm <storm@cua.dk>
parents: 64770
diff changeset
1299 cur->right_fringe_face_id = right_face_id;
109296
f6f0d450d542 Fix ghost buffer boundary indicators in fringes (Bug#5634, Bug#6325).
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 108933
diff changeset
1300 cur->left_fringe_offset = left_offset;
f6f0d450d542 Fix ghost buffer boundary indicators in fringes (Bug#5634, Bug#6325).
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 108933
diff changeset
1301 cur->right_fringe_offset = right_offset;
65062
8370ced2ae75 (update_window_fringes): Replace FORCE_P arg with KEEP_CURRENT_P arg;
Kim F. Storm <storm@cua.dk>
parents: 64770
diff changeset
1302 }
53879
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
1303 }
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
1304
69616
c00e99faf809 (draw_fringe_bitmap): Don't calculate default overlay arrow
Kim F. Storm <storm@cua.dk>
parents: 69490
diff changeset
1305 if (row->overlay_arrow_bitmap < 0)
c00e99faf809 (draw_fringe_bitmap): Don't calculate default overlay arrow
Kim F. Storm <storm@cua.dk>
parents: 69490
diff changeset
1306 row->overlay_arrow_bitmap = get_logical_fringe_bitmap (w, Qoverlay_arrow, 0, 0);
c00e99faf809 (draw_fringe_bitmap): Don't calculate default overlay arrow
Kim F. Storm <storm@cua.dk>
parents: 69490
diff changeset
1307
61634
e188b7249c28 (draw_fringe_bitmap): Use overlay_arrow_bitmap from row
Kim F. Storm <storm@cua.dk>
parents: 60834
diff changeset
1308 if (row->overlay_arrow_bitmap != cur->overlay_arrow_bitmap)
53879
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
1309 {
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
1310 redraw_p = row->redraw_fringe_bitmaps_p = cur->redraw_fringe_bitmaps_p = 1;
61634
e188b7249c28 (draw_fringe_bitmap): Use overlay_arrow_bitmap from row
Kim F. Storm <storm@cua.dk>
parents: 60834
diff changeset
1311 cur->overlay_arrow_bitmap = row->overlay_arrow_bitmap;
53879
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
1312 }
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
1313
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
1314 row->left_fringe_bitmap = left;
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
1315 row->right_fringe_bitmap = right;
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
1316 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
1317 row->right_fringe_face_id = right_face_id;
109296
f6f0d450d542 Fix ghost buffer boundary indicators in fringes (Bug#5634, Bug#6325).
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 108933
diff changeset
1318 row->left_fringe_offset = left_offset;
f6f0d450d542 Fix ghost buffer boundary indicators in fringes (Bug#5634, Bug#6325).
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 108933
diff changeset
1319 row->right_fringe_offset = right_offset;
53879
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
1320 }
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
1321
65062
8370ced2ae75 (update_window_fringes): Replace FORCE_P arg with KEEP_CURRENT_P arg;
Kim F. Storm <storm@cua.dk>
parents: 64770
diff changeset
1322 return redraw_p && !keep_current_p;
53879
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
1323 }
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
1324
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
1325
54220
50ba59282051 (Fdefine_fringe_bitmap): Fix typo in docstring.
Juanma Barranquero <lekktu@gmail.com>
parents: 54079
diff changeset
1326 /* 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
1327
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
1328 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
1329 modified and F is visible.
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
1330
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
1331 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
1332 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
1333 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
1334 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
1335
57371
3c27c0be625d (draw_window_fringes): Return value now indicates if
Kim F. Storm <storm@cua.dk>
parents: 57316
diff changeset
1336 We never make the fringes narrower than specified.
53879
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
1337 */
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 void
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
1340 compute_fringe_widths (f, redraw)
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
1341 struct frame *f;
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
1342 int redraw;
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
1343 {
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
1344 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
1345 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
1346 int o_cols = FRAME_FRINGE_COLS (f);
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
1347
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
1348 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
1349 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
1350 int left_fringe_width, right_fringe_width;
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
1351
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
1352 if (!NILP (left_fringe))
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
1353 left_fringe = Fcdr (left_fringe);
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
1354 if (!NILP (right_fringe))
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
1355 right_fringe = Fcdr (right_fringe);
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
1356
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
1357 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
1358 XINT (left_fringe));
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
1359 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
1360 XINT (right_fringe));
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
1361
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
1362 if (left_fringe_width || right_fringe_width)
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
1363 {
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
1364 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
1365 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
1366 int conf_wid = left_wid + right_wid;
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
1367 int font_wid = FRAME_COLUMN_WIDTH (f);
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
1368 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
1369 int real_wid = cols * font_wid;
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
1370 if (left_wid && right_wid)
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
1371 {
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
1372 if (left_fringe_width < 0)
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
1373 {
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
1374 /* 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
1375 FRAME_LEFT_FRINGE_WIDTH (f) = left_wid;
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
1376 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
1377 }
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
1378 else if (right_fringe_width < 0)
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
1379 {
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
1380 /* 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
1381 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
1382 FRAME_RIGHT_FRINGE_WIDTH (f) = right_wid;
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 else
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 /* Adjust both fringes with an equal amount.
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
1387 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
1388 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
1389 int fill = real_wid - conf_wid;
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
1390 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
1391 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
1392 }
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
1393 }
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
1394 else if (left_fringe_width)
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
1395 {
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
1396 FRAME_LEFT_FRINGE_WIDTH (f) = real_wid;
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
1397 FRAME_RIGHT_FRINGE_WIDTH (f) = 0;
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
1398 }
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
1399 else
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
1400 {
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
1401 FRAME_LEFT_FRINGE_WIDTH (f) = 0;
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
1402 FRAME_RIGHT_FRINGE_WIDTH (f) = real_wid;
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
1403 }
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
1404 FRAME_FRINGE_COLS (f) = cols;
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
1405 }
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
1406 else
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
1407 {
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
1408 FRAME_LEFT_FRINGE_WIDTH (f) = 0;
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
1409 FRAME_RIGHT_FRINGE_WIDTH (f) = 0;
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
1410 FRAME_FRINGE_COLS (f) = 0;
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
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
1413 if (redraw && FRAME_VISIBLE_P (f))
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
1414 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
1415 o_right != FRAME_RIGHT_FRINGE_WIDTH (f) ||
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
1416 o_cols != FRAME_FRINGE_COLS (f))
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
1417 redraw_frame (f);
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
1418 }
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
1419
57258
36eef73e00fa (Vfringe_bitmaps): New variable.
Kim F. Storm <storm@cua.dk>
parents: 57246
diff changeset
1420
57270
bb98cba59362 Simplify last change.
Kim F. Storm <storm@cua.dk>
parents: 57267
diff changeset
1421 /* Free resources used by a user-defined bitmap. */
bb98cba59362 Simplify last change.
Kim F. Storm <storm@cua.dk>
parents: 57267
diff changeset
1422
58089
fb4cd138f0b8 (destroy_fringe_bitmap): Fix return type.
Kim F. Storm <storm@cua.dk>
parents: 58057
diff changeset
1423 void
57258
36eef73e00fa (Vfringe_bitmaps): New variable.
Kim F. Storm <storm@cua.dk>
parents: 57246
diff changeset
1424 destroy_fringe_bitmap (n)
36eef73e00fa (Vfringe_bitmaps): New variable.
Kim F. Storm <storm@cua.dk>
parents: 57246
diff changeset
1425 int n;
53879
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
1426 {
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
1427 struct fringe_bitmap **fbp;
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
1428
59401
8f5e8e079790 (fringe_faces): Change to Lisp_Object pointer.
Kim F. Storm <storm@cua.dk>
parents: 58532
diff changeset
1429 fringe_faces[n] = Qnil;
53879
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
1430
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
1431 fbp = &fringe_bitmaps[n];
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
1432 if (*fbp && (*fbp)->dynamic)
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
1433 {
83037
03a73693678e Merged in changes from CVS HEAD
Karoly Lorentey <lorentey@elte.hu>
parents: 53970
diff changeset
1434 /* XXX Is SELECTED_FRAME OK here? */
83212
f70dc61a797f Merged in changes from CVS trunk.
Karoly Lorentey <lorentey@elte.hu>
parents: 83211 57277
diff changeset
1435 struct redisplay_interface *rif = FRAME_RIF (SELECTED_FRAME ());
57267
617e54beffb6 * fringe.c (destroy_fringe_bitmap, init_fringe_bitmap)
Kim F. Storm <storm@cua.dk>
parents: 57258
diff changeset
1436 if (rif && rif->destroy_fringe_bitmap)
53879
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
1437 rif->destroy_fringe_bitmap (n);
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
1438 xfree (*fbp);
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
1439 *fbp = NULL;
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
1440 }
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 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
1443 && 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
1444 max_used_fringe_bitmap--;
57258
36eef73e00fa (Vfringe_bitmaps): New variable.
Kim F. Storm <storm@cua.dk>
parents: 57246
diff changeset
1445 }
53879
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
1446
57258
36eef73e00fa (Vfringe_bitmaps): New variable.
Kim F. Storm <storm@cua.dk>
parents: 57246
diff changeset
1447
36eef73e00fa (Vfringe_bitmaps): New variable.
Kim F. Storm <storm@cua.dk>
parents: 57246
diff changeset
1448 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
1449 1, 1, 0,
36eef73e00fa (Vfringe_bitmaps): New variable.
Kim F. Storm <storm@cua.dk>
parents: 57246
diff changeset
1450 doc: /* Destroy fringe bitmap BITMAP.
36eef73e00fa (Vfringe_bitmaps): New variable.
Kim F. Storm <storm@cua.dk>
parents: 57246
diff changeset
1451 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
1452 (bitmap)
36eef73e00fa (Vfringe_bitmaps): New variable.
Kim F. Storm <storm@cua.dk>
parents: 57246
diff changeset
1453 Lisp_Object bitmap;
36eef73e00fa (Vfringe_bitmaps): New variable.
Kim F. Storm <storm@cua.dk>
parents: 57246
diff changeset
1454 {
36eef73e00fa (Vfringe_bitmaps): New variable.
Kim F. Storm <storm@cua.dk>
parents: 57246
diff changeset
1455 int n;
36eef73e00fa (Vfringe_bitmaps): New variable.
Kim F. Storm <storm@cua.dk>
parents: 57246
diff changeset
1456
57270
bb98cba59362 Simplify last change.
Kim F. Storm <storm@cua.dk>
parents: 57267
diff changeset
1457 CHECK_SYMBOL (bitmap);
bb98cba59362 Simplify last change.
Kim F. Storm <storm@cua.dk>
parents: 57267
diff changeset
1458 n = lookup_fringe_bitmap (bitmap);
bb98cba59362 Simplify last change.
Kim F. Storm <storm@cua.dk>
parents: 57267
diff changeset
1459 if (!n)
57258
36eef73e00fa (Vfringe_bitmaps): New variable.
Kim F. Storm <storm@cua.dk>
parents: 57246
diff changeset
1460 return Qnil;
36eef73e00fa (Vfringe_bitmaps): New variable.
Kim F. Storm <storm@cua.dk>
parents: 57246
diff changeset
1461
36eef73e00fa (Vfringe_bitmaps): New variable.
Kim F. Storm <storm@cua.dk>
parents: 57246
diff changeset
1462 destroy_fringe_bitmap (n);
36eef73e00fa (Vfringe_bitmaps): New variable.
Kim F. Storm <storm@cua.dk>
parents: 57246
diff changeset
1463
57270
bb98cba59362 Simplify last change.
Kim F. Storm <storm@cua.dk>
parents: 57267
diff changeset
1464 if (n >= MAX_STANDARD_FRINGE_BITMAPS)
57258
36eef73e00fa (Vfringe_bitmaps): New variable.
Kim F. Storm <storm@cua.dk>
parents: 57246
diff changeset
1465 {
57270
bb98cba59362 Simplify last change.
Kim F. Storm <storm@cua.dk>
parents: 57267
diff changeset
1466 Vfringe_bitmaps = Fdelq (bitmap, Vfringe_bitmaps);
57258
36eef73e00fa (Vfringe_bitmaps): New variable.
Kim F. Storm <storm@cua.dk>
parents: 57246
diff changeset
1467 /* It would be better to remove the fringe property. */
57270
bb98cba59362 Simplify last change.
Kim F. Storm <storm@cua.dk>
parents: 57267
diff changeset
1468 Fput (bitmap, Qfringe, Qnil);
57258
36eef73e00fa (Vfringe_bitmaps): New variable.
Kim F. Storm <storm@cua.dk>
parents: 57246
diff changeset
1469 }
57270
bb98cba59362 Simplify last change.
Kim F. Storm <storm@cua.dk>
parents: 57267
diff changeset
1470
53879
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
1471 return Qnil;
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
1472 }
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
1473
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
1474
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
1475 /* Initialize bitmap bit.
53936
4dd0e0a7fd9e (struct fringe_bitmap): Change member bits from char to
Kim F. Storm <storm@cua.dk>
parents: 53900
diff changeset
1476
4dd0e0a7fd9e (struct fringe_bitmap): Change member bits from char to
Kim F. Storm <storm@cua.dk>
parents: 53900
diff changeset
1477 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
1478 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
1479
53955
7d8c228c1f02 (init_fringe_bitmap) [MAC_OS, WORDS_BIG_ENDIAN]: Perform byte-swapping.
Kim F. Storm <storm@cua.dk>
parents: 53940
diff changeset
1480 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
1481
7d8c228c1f02 (init_fringe_bitmap) [MAC_OS, WORDS_BIG_ENDIAN]: Perform byte-swapping.
Kim F. Storm <storm@cua.dk>
parents: 53940
diff changeset
1482 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
1483 */
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
1484
78786
7080fcd26c3e (init_fringe_bitmap) <swap nibble>: Move to file scope.
Glenn Morris <rgm@gnu.org>
parents: 78260
diff changeset
1485 #if defined (HAVE_X_WINDOWS)
105959
ba3ffbd9c422 * process.c (ifflag_def): Make flag_sym constant.
Dan Nicolaescu <dann@ics.uci.edu>
parents: 105877
diff changeset
1486 static const unsigned char swap_nibble[16] = {
84559
acac15277b75 (init_fringe_bitmap) <swap nibble>: Move to file scope.
Glenn Morris <rgm@gnu.org>
parents: 84541
diff changeset
1487 0x0, 0x8, 0x4, 0xc, /* 0000 1000 0100 1100 */
acac15277b75 (init_fringe_bitmap) <swap nibble>: Move to file scope.
Glenn Morris <rgm@gnu.org>
parents: 84541
diff changeset
1488 0x2, 0xa, 0x6, 0xe, /* 0010 1010 0110 1110 */
acac15277b75 (init_fringe_bitmap) <swap nibble>: Move to file scope.
Glenn Morris <rgm@gnu.org>
parents: 84541
diff changeset
1489 0x1, 0x9, 0x5, 0xd, /* 0001 1001 0101 1101 */
acac15277b75 (init_fringe_bitmap) <swap nibble>: Move to file scope.
Glenn Morris <rgm@gnu.org>
parents: 84541
diff changeset
1490 0x3, 0xb, 0x7, 0xf}; /* 0011 1011 0111 1111 */
78786
7080fcd26c3e (init_fringe_bitmap) <swap nibble>: Move to file scope.
Glenn Morris <rgm@gnu.org>
parents: 78260
diff changeset
1491 #endif /* HAVE_X_WINDOWS */
7080fcd26c3e (init_fringe_bitmap) <swap nibble>: Move to file scope.
Glenn Morris <rgm@gnu.org>
parents: 78260
diff changeset
1492
53879
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
1493 void
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
1494 init_fringe_bitmap (which, fb, once_p)
69049
28b3892bfcda (enum fringe_bitmap_type): Remove. Change all uses
Kim F. Storm <storm@cua.dk>
parents: 68651
diff changeset
1495 int which;
53879
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
1496 struct fringe_bitmap *fb;
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
1497 int once_p;
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
1498 {
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
1499 if (once_p || fb->dynamic)
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
1500 {
53936
4dd0e0a7fd9e (struct fringe_bitmap): Change member bits from char to
Kim F. Storm <storm@cua.dk>
parents: 53900
diff changeset
1501 #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
1502 unsigned short *bits = fb->bits;
53879
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
1503 int j;
53936
4dd0e0a7fd9e (struct fringe_bitmap): Change member bits from char to
Kim F. Storm <storm@cua.dk>
parents: 53900
diff changeset
1504
4dd0e0a7fd9e (struct fringe_bitmap): Change member bits from char to
Kim F. Storm <storm@cua.dk>
parents: 53900
diff changeset
1505 if (fb->width <= 8)
53879
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
1506 {
53936
4dd0e0a7fd9e (struct fringe_bitmap): Change member bits from char to
Kim F. Storm <storm@cua.dk>
parents: 53900
diff changeset
1507 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
1508 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
1509 {
4dd0e0a7fd9e (struct fringe_bitmap): Change member bits from char to
Kim F. Storm <storm@cua.dk>
parents: 53900
diff changeset
1510 unsigned short b = *bits++;
4dd0e0a7fd9e (struct fringe_bitmap): Change member bits from char to
Kim F. Storm <storm@cua.dk>
parents: 53900
diff changeset
1511 unsigned char c;
4dd0e0a7fd9e (struct fringe_bitmap): Change member bits from char to
Kim F. Storm <storm@cua.dk>
parents: 53900
diff changeset
1512 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
1513 | (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
1514 *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
1515 }
4dd0e0a7fd9e (struct fringe_bitmap): Change member bits from char to
Kim F. Storm <storm@cua.dk>
parents: 53900
diff changeset
1516 }
4dd0e0a7fd9e (struct fringe_bitmap): Change member bits from char to
Kim F. Storm <storm@cua.dk>
parents: 53900
diff changeset
1517 else
4dd0e0a7fd9e (struct fringe_bitmap): Change member bits from char to
Kim F. Storm <storm@cua.dk>
parents: 53900
diff changeset
1518 {
4dd0e0a7fd9e (struct fringe_bitmap): Change member bits from char to
Kim F. Storm <storm@cua.dk>
parents: 53900
diff changeset
1519 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
1520 {
4dd0e0a7fd9e (struct fringe_bitmap): Change member bits from char to
Kim F. Storm <storm@cua.dk>
parents: 53900
diff changeset
1521 unsigned short b = *bits;
4dd0e0a7fd9e (struct fringe_bitmap): Change member bits from char to
Kim F. Storm <storm@cua.dk>
parents: 53900
diff changeset
1522 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
1523 | (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
1524 | (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
1525 | (swap_nibble[(b>>12) & 0xf]));
103062
06cf3e417172 (init_fringe_bitmap) [HAVE_X_WINDOWS && WORDS_BIG_ENDIAN]:
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 100951
diff changeset
1526 b >>= (16 - fb->width);
06cf3e417172 (init_fringe_bitmap) [HAVE_X_WINDOWS && WORDS_BIG_ENDIAN]:
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 100951
diff changeset
1527 #ifdef WORDS_BIG_ENDIAN
06cf3e417172 (init_fringe_bitmap) [HAVE_X_WINDOWS && WORDS_BIG_ENDIAN]:
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 100951
diff changeset
1528 b = ((b >> 8) | (b << 8));
06cf3e417172 (init_fringe_bitmap) [HAVE_X_WINDOWS && WORDS_BIG_ENDIAN]:
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 100951
diff changeset
1529 #endif
06cf3e417172 (init_fringe_bitmap) [HAVE_X_WINDOWS && WORDS_BIG_ENDIAN]:
YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
parents: 100951
diff changeset
1530 *bits++ = b;
53936
4dd0e0a7fd9e (struct fringe_bitmap): Change member bits from char to
Kim F. Storm <storm@cua.dk>
parents: 53900
diff changeset
1531 }
53879
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
1532 }
53955
7d8c228c1f02 (init_fringe_bitmap) [MAC_OS, WORDS_BIG_ENDIAN]: Perform byte-swapping.
Kim F. Storm <storm@cua.dk>
parents: 53940
diff changeset
1533 #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
1534
53879
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
1535 }
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
1536
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
1537 if (!once_p)
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
1538 {
83214
2bd6d4c2d21c Removed C99ism in init_fringe_bitmap.
Karoly Lorentey <lorentey@elte.hu>
parents: 83213
diff changeset
1539 /* XXX Is SELECTED_FRAME OK here? */
2bd6d4c2d21c Removed C99ism in init_fringe_bitmap.
Karoly Lorentey <lorentey@elte.hu>
parents: 83213
diff changeset
1540 struct redisplay_interface *rif = FRAME_RIF (SELECTED_FRAME ());
2bd6d4c2d21c Removed C99ism in init_fringe_bitmap.
Karoly Lorentey <lorentey@elte.hu>
parents: 83213
diff changeset
1541
57258
36eef73e00fa (Vfringe_bitmaps): New variable.
Kim F. Storm <storm@cua.dk>
parents: 57246
diff changeset
1542 destroy_fringe_bitmap (which);
53879
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
1543
57267
617e54beffb6 * fringe.c (destroy_fringe_bitmap, init_fringe_bitmap)
Kim F. Storm <storm@cua.dk>
parents: 57258
diff changeset
1544 if (rif && rif->define_fringe_bitmap)
53879
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
1545 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
1546
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
1547 fringe_bitmaps[which] = fb;
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
1548 if (which >= max_used_fringe_bitmap)
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
1549 max_used_fringe_bitmap = which + 1;
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
1550 }
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
1551 }
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
1552
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
1553
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
1554 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
1555 2, 5, 0,
36eef73e00fa (Vfringe_bitmaps): New variable.
Kim F. Storm <storm@cua.dk>
parents: 57246
diff changeset
1556 doc: /* Define fringe bitmap BITMAP from BITS of size HEIGHT x WIDTH.
71659
0a57a8cfd0fa (Fdefine_fringe_bitmap): Doc fix.
Kim F. Storm <storm@cua.dk>
parents: 69616
diff changeset
1557 BITMAP is a symbol identifying 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
1558 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
1559 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
1560 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
1561 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
1562 indicating the positioning of the bitmap relative to the rows where it
94420
090cf85895a7 (Fdefine_fringe_bitmap): Doc fix.
Juanma Barranquero <lekktu@gmail.com>
parents: 91327
diff changeset
1563 is used; the default is to center the bitmap. Fifth arg may also be a
53936
4dd0e0a7fd9e (struct fringe_bitmap): Change member bits from char to
Kim F. Storm <storm@cua.dk>
parents: 53900
diff changeset
1564 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
1565 should be repeated.
57258
36eef73e00fa (Vfringe_bitmaps): New variable.
Kim F. Storm <storm@cua.dk>
parents: 57246
diff changeset
1566 If BITMAP already exists, the existing definition is replaced. */)
36eef73e00fa (Vfringe_bitmaps): New variable.
Kim F. Storm <storm@cua.dk>
parents: 57246
diff changeset
1567 (bitmap, bits, height, width, align)
36eef73e00fa (Vfringe_bitmaps): New variable.
Kim F. Storm <storm@cua.dk>
parents: 57246
diff changeset
1568 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
1569 {
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
1570 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
1571 unsigned short *b;
53879
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
1572 struct fringe_bitmap fb, *xfb;
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
1573 int fill1 = 0, fill2 = 0;
57258
36eef73e00fa (Vfringe_bitmaps): New variable.
Kim F. Storm <storm@cua.dk>
parents: 57246
diff changeset
1574
57270
bb98cba59362 Simplify last change.
Kim F. Storm <storm@cua.dk>
parents: 57267
diff changeset
1575 CHECK_SYMBOL (bitmap);
57258
36eef73e00fa (Vfringe_bitmaps): New variable.
Kim F. Storm <storm@cua.dk>
parents: 57246
diff changeset
1576
58268
fc159de41e11 (Fdefine_fringe_bitmap): Always set 'h'. Simplify.
Kim F. Storm <storm@cua.dk>
parents: 58089
diff changeset
1577 if (STRINGP (bits))
fc159de41e11 (Fdefine_fringe_bitmap): Always set 'h'. Simplify.
Kim F. Storm <storm@cua.dk>
parents: 58089
diff changeset
1578 h = SCHARS (bits);
fc159de41e11 (Fdefine_fringe_bitmap): Always set 'h'. Simplify.
Kim F. Storm <storm@cua.dk>
parents: 58089
diff changeset
1579 else if (VECTORP (bits))
fc159de41e11 (Fdefine_fringe_bitmap): Always set 'h'. Simplify.
Kim F. Storm <storm@cua.dk>
parents: 58089
diff changeset
1580 h = XVECTOR (bits)->size;
fc159de41e11 (Fdefine_fringe_bitmap): Always set 'h'. Simplify.
Kim F. Storm <storm@cua.dk>
parents: 58089
diff changeset
1581 else
71834
bf40c8c83e7a (Fdefine_fringe_bitmap): Cleanup wrong_type_argument use.
Kim F. Storm <storm@cua.dk>
parents: 71659
diff changeset
1582 wrong_type_argument (Qsequencep, bits);
53879
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
1583
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
1584 if (NILP (height))
58268
fc159de41e11 (Fdefine_fringe_bitmap): Always set 'h'. Simplify.
Kim F. Storm <storm@cua.dk>
parents: 58089
diff changeset
1585 fb.height = h;
53879
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
1586 else
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
1587 {
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
1588 CHECK_NUMBER (height);
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
1589 fb.height = min (XINT (height), 255);
58268
fc159de41e11 (Fdefine_fringe_bitmap): Always set 'h'. Simplify.
Kim F. Storm <storm@cua.dk>
parents: 58089
diff changeset
1590 if (fb.height > h)
53879
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
1591 {
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
1592 fill1 = (fb.height - h) / 2;
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
1593 fill2 = fb.height - h - fill1;
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
1594 }
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
1595 }
54220
50ba59282051 (Fdefine_fringe_bitmap): Fix typo in docstring.
Juanma Barranquero <lekktu@gmail.com>
parents: 54079
diff changeset
1596
53879
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
1597 if (NILP (width))
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
1598 fb.width = 8;
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
1599 else
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
1600 {
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
1601 CHECK_NUMBER (width);
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
1602 fb.width = min (XINT (width), 255);
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
1603 }
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
1604
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
1605 fb.period = 0;
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
1606 fb.align = ALIGN_BITMAP_CENTER;
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
1607
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
1608 if (CONSP (align))
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
1609 {
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
1610 Lisp_Object period = XCDR (align);
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
1611 if (CONSP (period))
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
1612 {
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
1613 period = XCAR (period);
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
1614 if (!NILP (period))
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
1615 {
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
1616 fb.period = fb.height;
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
1617 fb.height = 255;
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
1618 }
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
1619 }
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
1620 align = XCAR (align);
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
1621 }
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
1622 if (EQ (align, Qtop))
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
1623 fb.align = ALIGN_BITMAP_TOP;
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
1624 else if (EQ (align, Qbottom))
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
1625 fb.align = ALIGN_BITMAP_BOTTOM;
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
1626 else if (!NILP (align) && !EQ (align, Qcenter))
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
1627 error ("Bad align argument");
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
1628
57277
85230b6628b3 Remove limit on number of bitmaps.
Kim F. Storm <storm@cua.dk>
parents: 57270
diff changeset
1629 n = lookup_fringe_bitmap (bitmap);
57270
bb98cba59362 Simplify last change.
Kim F. Storm <storm@cua.dk>
parents: 57267
diff changeset
1630 if (!n)
53879
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
1631 {
57277
85230b6628b3 Remove limit on number of bitmaps.
Kim F. Storm <storm@cua.dk>
parents: 57270
diff changeset
1632 if (max_used_fringe_bitmap < max_fringe_bitmaps)
53966
26dc8943ee64 Lisp_Object/int mixup.
Stefan Monnier <monnier@iro.umontreal.ca>
parents: 53955
diff changeset
1633 n = max_used_fringe_bitmap++;
53879
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
1634 else
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
1635 {
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
1636 for (n = MAX_STANDARD_FRINGE_BITMAPS;
57277
85230b6628b3 Remove limit on number of bitmaps.
Kim F. Storm <storm@cua.dk>
parents: 57270
diff changeset
1637 n < max_fringe_bitmaps;
53879
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
1638 n++)
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
1639 if (fringe_bitmaps[n] == NULL)
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
1640 break;
57277
85230b6628b3 Remove limit on number of bitmaps.
Kim F. Storm <storm@cua.dk>
parents: 57270
diff changeset
1641
85230b6628b3 Remove limit on number of bitmaps.
Kim F. Storm <storm@cua.dk>
parents: 57270
diff changeset
1642 if (n == max_fringe_bitmaps)
85230b6628b3 Remove limit on number of bitmaps.
Kim F. Storm <storm@cua.dk>
parents: 57270
diff changeset
1643 {
85230b6628b3 Remove limit on number of bitmaps.
Kim F. Storm <storm@cua.dk>
parents: 57270
diff changeset
1644 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
1645 error ("No free fringe bitmap slots");
85230b6628b3 Remove limit on number of bitmaps.
Kim F. Storm <storm@cua.dk>
parents: 57270
diff changeset
1646
85230b6628b3 Remove limit on number of bitmaps.
Kim F. Storm <storm@cua.dk>
parents: 57270
diff changeset
1647 i = max_fringe_bitmaps;
85230b6628b3 Remove limit on number of bitmaps.
Kim F. Storm <storm@cua.dk>
parents: 57270
diff changeset
1648 max_fringe_bitmaps += 20;
85230b6628b3 Remove limit on number of bitmaps.
Kim F. Storm <storm@cua.dk>
parents: 57270
diff changeset
1649 fringe_bitmaps
85230b6628b3 Remove limit on number of bitmaps.
Kim F. Storm <storm@cua.dk>
parents: 57270
diff changeset
1650 = ((struct fringe_bitmap **)
85230b6628b3 Remove limit on number of bitmaps.
Kim F. Storm <storm@cua.dk>
parents: 57270
diff changeset
1651 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
1652 fringe_faces
59581
26fb5a3f95ac * fringe.c (Fdefine_fringe_bitmap, init_fringe): When assigning
Jan Djärv <jan.h.d@swipnet.se>
parents: 59401
diff changeset
1653 = (Lisp_Object *) xrealloc (fringe_faces, max_fringe_bitmaps * sizeof (Lisp_Object));
57277
85230b6628b3 Remove limit on number of bitmaps.
Kim F. Storm <storm@cua.dk>
parents: 57270
diff changeset
1654
85230b6628b3 Remove limit on number of bitmaps.
Kim F. Storm <storm@cua.dk>
parents: 57270
diff changeset
1655 for (; i < max_fringe_bitmaps; i++)
85230b6628b3 Remove limit on number of bitmaps.
Kim F. Storm <storm@cua.dk>
parents: 57270
diff changeset
1656 {
85230b6628b3 Remove limit on number of bitmaps.
Kim F. Storm <storm@cua.dk>
parents: 57270
diff changeset
1657 fringe_bitmaps[i] = NULL;
59401
8f5e8e079790 (fringe_faces): Change to Lisp_Object pointer.
Kim F. Storm <storm@cua.dk>
parents: 58532
diff changeset
1658 fringe_faces[i] = Qnil;
57277
85230b6628b3 Remove limit on number of bitmaps.
Kim F. Storm <storm@cua.dk>
parents: 57270
diff changeset
1659 }
85230b6628b3 Remove limit on number of bitmaps.
Kim F. Storm <storm@cua.dk>
parents: 57270
diff changeset
1660 }
53879
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
1661 }
57258
36eef73e00fa (Vfringe_bitmaps): New variable.
Kim F. Storm <storm@cua.dk>
parents: 57246
diff changeset
1662
57270
bb98cba59362 Simplify last change.
Kim F. Storm <storm@cua.dk>
parents: 57267
diff changeset
1663 Vfringe_bitmaps = Fcons (bitmap, Vfringe_bitmaps);
bb98cba59362 Simplify last change.
Kim F. Storm <storm@cua.dk>
parents: 57267
diff changeset
1664 Fput (bitmap, Qfringe, make_number (n));
53879
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
1665 }
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
1666
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
1667 fb.dynamic = 1;
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
1668
54079
e1b6171f91b8 (Fdefine_fringe_bitmap): Use && instead of & to avoid
Andreas Schwab <schwab@suse.de>
parents: 53970
diff changeset
1669 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
1670 + fb.height * BYTES_PER_BITMAP_ROW);
e1b6171f91b8 (Fdefine_fringe_bitmap): Use && instead of & to avoid
Andreas Schwab <schwab@suse.de>
parents: 53970
diff changeset
1671 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
1672 bzero (b, fb.height);
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
1673
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
1674 j = 0;
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
1675 while (j < fb.height)
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
1676 {
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
1677 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
1678 b[j++] = 0;
54079
e1b6171f91b8 (Fdefine_fringe_bitmap): Use && instead of & to avoid
Andreas Schwab <schwab@suse.de>
parents: 53970
diff changeset
1679 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
1680 {
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
1681 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
1682 b[j++] = NUMBERP (elt) ? XINT (elt) : 0;
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
1683 }
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
1684 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
1685 b[j++] = 0;
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
1686 }
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
1687
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
1688 *xfb = fb;
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
1689
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
1690 init_fringe_bitmap (n, xfb, 0);
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
1691
57270
bb98cba59362 Simplify last change.
Kim F. Storm <storm@cua.dk>
parents: 57267
diff changeset
1692 return bitmap;
53879
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
1693 }
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
1694
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
1695 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
1696 1, 2, 0,
57258
36eef73e00fa (Vfringe_bitmaps): New variable.
Kim F. Storm <storm@cua.dk>
parents: 57246
diff changeset
1697 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
1698 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
1699 (bitmap, face)
36eef73e00fa (Vfringe_bitmaps): New variable.
Kim F. Storm <storm@cua.dk>
parents: 57246
diff changeset
1700 Lisp_Object bitmap, face;
53879
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
1701 {
57270
bb98cba59362 Simplify last change.
Kim F. Storm <storm@cua.dk>
parents: 57267
diff changeset
1702 int n;
53879
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
1703 int face_id;
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
1704
57270
bb98cba59362 Simplify last change.
Kim F. Storm <storm@cua.dk>
parents: 57267
diff changeset
1705 CHECK_SYMBOL (bitmap);
bb98cba59362 Simplify last change.
Kim F. Storm <storm@cua.dk>
parents: 57267
diff changeset
1706 n = lookup_fringe_bitmap (bitmap);
bb98cba59362 Simplify last change.
Kim F. Storm <storm@cua.dk>
parents: 57267
diff changeset
1707 if (!n)
57258
36eef73e00fa (Vfringe_bitmaps): New variable.
Kim F. Storm <storm@cua.dk>
parents: 57246
diff changeset
1708 error ("Undefined fringe bitmap");
53879
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
1709
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
1710 if (!NILP (face))
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
1711 {
60834
94900ab8eef0 (draw_fringe_bitmap_1, Fset_fringe_bitmap_face):
Kim F. Storm <storm@cua.dk>
parents: 59581
diff changeset
1712 face_id = lookup_derived_face (SELECTED_FRAME (), face,
90128
13796b0653c7 Revision: miles@gnu.org--gnu-2005/emacs--unicode--0--patch-29
Miles Bader <miles@gnu.org>
parents: 90082 60834
diff changeset
1713 FRINGE_FACE_ID, 1);
53879
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
1714 if (face_id < 0)
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
1715 error ("No such face");
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
1716 }
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
1717
59401
8f5e8e079790 (fringe_faces): Change to Lisp_Object pointer.
Kim F. Storm <storm@cua.dk>
parents: 58532
diff changeset
1718 fringe_faces[n] = face;
53879
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
1719
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
1720 return Qnil;
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
1721 }
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
1722
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
1723 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
1724 0, 2, 0,
54220
50ba59282051 (Fdefine_fringe_bitmap): Fix typo in docstring.
Juanma Barranquero <lekktu@gmail.com>
parents: 54079
diff changeset
1725 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
1726 If WINDOW is nil, use selected window. If POS is nil, use value of point
57316
3eb68ef1dcb7 (Ffringe_bitmaps_at_pos): Change return value from cons
Kim F. Storm <storm@cua.dk>
parents: 57277
diff changeset
1727 in that window. Return value is a list (LEFT RIGHT OV), where LEFT
3eb68ef1dcb7 (Ffringe_bitmaps_at_pos): Change return value from cons
Kim F. Storm <storm@cua.dk>
parents: 57277
diff changeset
1728 is the symbol for the bitmap in the left fringe (or nil if no bitmap),
3eb68ef1dcb7 (Ffringe_bitmaps_at_pos): Change return value from cons
Kim F. Storm <storm@cua.dk>
parents: 57277
diff changeset
1729 RIGHT is similar for the right fringe, and OV is non-nil if there is an
3eb68ef1dcb7 (Ffringe_bitmaps_at_pos): Change return value from cons
Kim F. Storm <storm@cua.dk>
parents: 57277
diff changeset
1730 overlay arrow in the left fringe.
57246
36ab9b017a42 (update_window_fringes): Handle new formats of
Kim F. Storm <storm@cua.dk>
parents: 54230
diff changeset
1731 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
1732 (pos, window)
53940
33cf8d1b409d (Ffringe_bitmaps_at_pos): Add missing arg declarations.
Kim F. Storm <storm@cua.dk>
parents: 53936
diff changeset
1733 Lisp_Object pos, window;
53879
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
1734 {
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
1735 struct window *w;
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
1736 struct glyph_row *row;
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
1737 int textpos;
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
1738
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
1739 if (NILP (window))
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
1740 window = selected_window;
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
1741 CHECK_WINDOW (window);
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
1742 w = XWINDOW (window);
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
1743
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
1744 if (!NILP (pos))
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
1745 {
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
1746 CHECK_NUMBER_COERCE_MARKER (pos);
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
1747 textpos = XINT (pos);
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
1748 }
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
1749 else if (w == XWINDOW (selected_window))
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
1750 textpos = PT;
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
1751 else
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
1752 textpos = XMARKER (w->pointm)->charpos;
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
1753
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
1754 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
1755 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
1756 if (row)
57316
3eb68ef1dcb7 (Ffringe_bitmaps_at_pos): Change return value from cons
Kim F. Storm <storm@cua.dk>
parents: 57277
diff changeset
1757 return list3 (get_fringe_bitmap_name (row->left_fringe_bitmap),
3eb68ef1dcb7 (Ffringe_bitmaps_at_pos): Change return value from cons
Kim F. Storm <storm@cua.dk>
parents: 57277
diff changeset
1758 get_fringe_bitmap_name (row->right_fringe_bitmap),
61634
e188b7249c28 (draw_fringe_bitmap): Use overlay_arrow_bitmap from row
Kim F. Storm <storm@cua.dk>
parents: 60834
diff changeset
1759 (row->overlay_arrow_bitmap == 0 ? Qnil
e188b7249c28 (draw_fringe_bitmap): Use overlay_arrow_bitmap from row
Kim F. Storm <storm@cua.dk>
parents: 60834
diff changeset
1760 : row->overlay_arrow_bitmap < 0 ? Qt
e188b7249c28 (draw_fringe_bitmap): Use overlay_arrow_bitmap from row
Kim F. Storm <storm@cua.dk>
parents: 60834
diff changeset
1761 : get_fringe_bitmap_name (row->overlay_arrow_bitmap)));
53879
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
1762 else
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
1763 return Qnil;
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
1764 }
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
1765
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
1766
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
1767 /***********************************************************************
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
1768 Initialization
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
1769 ***********************************************************************/
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
1770
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
1771 void
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
1772 syms_of_fringe ()
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
1773 {
105877
21bdda3ded62 * xterm.c (syms_of_xterm):
Dan Nicolaescu <dann@ics.uci.edu>
parents: 105669
diff changeset
1774 Qtruncation = intern_c_string ("truncation");
69049
28b3892bfcda (enum fringe_bitmap_type): Remove. Change all uses
Kim F. Storm <storm@cua.dk>
parents: 68651
diff changeset
1775 staticpro (&Qtruncation);
105877
21bdda3ded62 * xterm.c (syms_of_xterm):
Dan Nicolaescu <dann@ics.uci.edu>
parents: 105669
diff changeset
1776 Qcontinuation = intern_c_string ("continuation");
69049
28b3892bfcda (enum fringe_bitmap_type): Remove. Change all uses
Kim F. Storm <storm@cua.dk>
parents: 68651
diff changeset
1777 staticpro (&Qcontinuation);
105877
21bdda3ded62 * xterm.c (syms_of_xterm):
Dan Nicolaescu <dann@ics.uci.edu>
parents: 105669
diff changeset
1778 Qoverlay_arrow = intern_c_string ("overlay-arrow");
69049
28b3892bfcda (enum fringe_bitmap_type): Remove. Change all uses
Kim F. Storm <storm@cua.dk>
parents: 68651
diff changeset
1779 staticpro (&Qoverlay_arrow);
105877
21bdda3ded62 * xterm.c (syms_of_xterm):
Dan Nicolaescu <dann@ics.uci.edu>
parents: 105669
diff changeset
1780 Qempty_line = intern_c_string ("empty-line");
69049
28b3892bfcda (enum fringe_bitmap_type): Remove. Change all uses
Kim F. Storm <storm@cua.dk>
parents: 68651
diff changeset
1781 staticpro (&Qempty_line);
105877
21bdda3ded62 * xterm.c (syms_of_xterm):
Dan Nicolaescu <dann@ics.uci.edu>
parents: 105669
diff changeset
1782 Qtop_bottom = intern_c_string ("top-bottom");
69049
28b3892bfcda (enum fringe_bitmap_type): Remove. Change all uses
Kim F. Storm <storm@cua.dk>
parents: 68651
diff changeset
1783 staticpro (&Qtop_bottom);
105877
21bdda3ded62 * xterm.c (syms_of_xterm):
Dan Nicolaescu <dann@ics.uci.edu>
parents: 105669
diff changeset
1784 Qhollow_small = intern_c_string ("hollow-small");
69049
28b3892bfcda (enum fringe_bitmap_type): Remove. Change all uses
Kim F. Storm <storm@cua.dk>
parents: 68651
diff changeset
1785 staticpro (&Qhollow_small);
28b3892bfcda (enum fringe_bitmap_type): Remove. Change all uses
Kim F. Storm <storm@cua.dk>
parents: 68651
diff changeset
1786
53879
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
1787 defsubr (&Sdestroy_fringe_bitmap);
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
1788 defsubr (&Sdefine_fringe_bitmap);
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
1789 defsubr (&Sfringe_bitmaps_at_pos);
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
1790 defsubr (&Sset_fringe_bitmap_face);
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
1791
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
1792 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
1793 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
1794 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
1795 (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
1796 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
1797 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
1798 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
1799 Voverflow_newline_into_fringe = Qt;
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
1800
57258
36eef73e00fa (Vfringe_bitmaps): New variable.
Kim F. Storm <storm@cua.dk>
parents: 57246
diff changeset
1801 DEFVAR_LISP ("fringe-bitmaps", &Vfringe_bitmaps,
69071
ee6d3763fda6 (syms_of_fringe) <fringe-bitmaps>: Doc fix.
Kim F. Storm <storm@cua.dk>
parents: 69063
diff changeset
1802 doc: /* List of fringe bitmap symbols. */);
57258
36eef73e00fa (Vfringe_bitmaps): New variable.
Kim F. Storm <storm@cua.dk>
parents: 57246
diff changeset
1803 Vfringe_bitmaps = Qnil;
53879
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
1804 }
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
1805
59401
8f5e8e079790 (fringe_faces): Change to Lisp_Object pointer.
Kim F. Storm <storm@cua.dk>
parents: 58532
diff changeset
1806 /* Garbage collection hook */
8f5e8e079790 (fringe_faces): Change to Lisp_Object pointer.
Kim F. Storm <storm@cua.dk>
parents: 58532
diff changeset
1807
8f5e8e079790 (fringe_faces): Change to Lisp_Object pointer.
Kim F. Storm <storm@cua.dk>
parents: 58532
diff changeset
1808 void
8f5e8e079790 (fringe_faces): Change to Lisp_Object pointer.
Kim F. Storm <storm@cua.dk>
parents: 58532
diff changeset
1809 mark_fringe_data ()
8f5e8e079790 (fringe_faces): Change to Lisp_Object pointer.
Kim F. Storm <storm@cua.dk>
parents: 58532
diff changeset
1810 {
8f5e8e079790 (fringe_faces): Change to Lisp_Object pointer.
Kim F. Storm <storm@cua.dk>
parents: 58532
diff changeset
1811 int i;
8f5e8e079790 (fringe_faces): Change to Lisp_Object pointer.
Kim F. Storm <storm@cua.dk>
parents: 58532
diff changeset
1812
8f5e8e079790 (fringe_faces): Change to Lisp_Object pointer.
Kim F. Storm <storm@cua.dk>
parents: 58532
diff changeset
1813 for (i = 0; i < max_fringe_bitmaps; i++)
8f5e8e079790 (fringe_faces): Change to Lisp_Object pointer.
Kim F. Storm <storm@cua.dk>
parents: 58532
diff changeset
1814 if (!NILP (fringe_faces[i]))
8f5e8e079790 (fringe_faces): Change to Lisp_Object pointer.
Kim F. Storm <storm@cua.dk>
parents: 58532
diff changeset
1815 mark_object (fringe_faces[i]);
8f5e8e079790 (fringe_faces): Change to Lisp_Object pointer.
Kim F. Storm <storm@cua.dk>
parents: 58532
diff changeset
1816 }
8f5e8e079790 (fringe_faces): Change to Lisp_Object pointer.
Kim F. Storm <storm@cua.dk>
parents: 58532
diff changeset
1817
53879
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
1818 /* Initialize this module when Emacs starts. */
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
1819
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
1820 void
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
1821 init_fringe_once ()
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
1822 {
69049
28b3892bfcda (enum fringe_bitmap_type): Remove. Change all uses
Kim F. Storm <storm@cua.dk>
parents: 68651
diff changeset
1823 int bt;
53879
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
1824
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
1825 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
1826 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
1827 }
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
1828
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
1829 void
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
1830 init_fringe ()
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
1831 {
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
1832 int i;
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
1833
57277
85230b6628b3 Remove limit on number of bitmaps.
Kim F. Storm <storm@cua.dk>
parents: 57270
diff changeset
1834 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
1835
85230b6628b3 Remove limit on number of bitmaps.
Kim F. Storm <storm@cua.dk>
parents: 57270
diff changeset
1836 fringe_bitmaps
85230b6628b3 Remove limit on number of bitmaps.
Kim F. Storm <storm@cua.dk>
parents: 57270
diff changeset
1837 = (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
1838 fringe_faces
59581
26fb5a3f95ac * fringe.c (Fdefine_fringe_bitmap, init_fringe): When assigning
Jan Djärv <jan.h.d@swipnet.se>
parents: 59401
diff changeset
1839 = (Lisp_Object *) xmalloc (max_fringe_bitmaps * sizeof (Lisp_Object));
57277
85230b6628b3 Remove limit on number of bitmaps.
Kim F. Storm <storm@cua.dk>
parents: 57270
diff changeset
1840
85230b6628b3 Remove limit on number of bitmaps.
Kim F. Storm <storm@cua.dk>
parents: 57270
diff changeset
1841 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
1842 {
85230b6628b3 Remove limit on number of bitmaps.
Kim F. Storm <storm@cua.dk>
parents: 57270
diff changeset
1843 fringe_bitmaps[i] = NULL;
59401
8f5e8e079790 (fringe_faces): Change to Lisp_Object pointer.
Kim F. Storm <storm@cua.dk>
parents: 58532
diff changeset
1844 fringe_faces[i] = Qnil;
57277
85230b6628b3 Remove limit on number of bitmaps.
Kim F. Storm <storm@cua.dk>
parents: 57270
diff changeset
1845 }
53879
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
1846 }
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
1847
97043
9592c50233ab Remove support for Mac Carbon.
Dan Nicolaescu <dann@ics.uci.edu>
parents: 96675
diff changeset
1848 #ifdef HAVE_NTGUI
53879
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
1849
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
1850 void
97043
9592c50233ab Remove support for Mac Carbon.
Dan Nicolaescu <dann@ics.uci.edu>
parents: 96675
diff changeset
1851 w32_init_fringe (struct redisplay_interface *rif)
53879
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
1852 {
69049
28b3892bfcda (enum fringe_bitmap_type): Remove. Change all uses
Kim F. Storm <storm@cua.dk>
parents: 68651
diff changeset
1853 int bt;
53879
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
1854
57267
617e54beffb6 * fringe.c (destroy_fringe_bitmap, init_fringe_bitmap)
Kim F. Storm <storm@cua.dk>
parents: 57258
diff changeset
1855 if (!rif)
617e54beffb6 * fringe.c (destroy_fringe_bitmap, init_fringe_bitmap)
Kim F. Storm <storm@cua.dk>
parents: 57258
diff changeset
1856 return;
617e54beffb6 * fringe.c (destroy_fringe_bitmap, init_fringe_bitmap)
Kim F. Storm <storm@cua.dk>
parents: 57258
diff changeset
1857
53879
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
1858 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
1859 {
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
1860 struct fringe_bitmap *fb = &standard_bitmaps[bt];
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
1861 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
1862 }
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
1863 }
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
1864
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
1865 void
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
1866 w32_reset_fringes ()
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
1867 {
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
1868 /* Destroy row bitmaps. */
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
1869 int bt;
83581
29192b6da477 (w32_init_fringe w32_reset_fringes) [HAVE_NTGUI]:
Jason Rumney <jasonr@gnu.org>
parents: 83554
diff changeset
1870 struct redisplay_interface *rif = FRAME_RIF (SELECTED_FRAME ());
54220
50ba59282051 (Fdefine_fringe_bitmap): Fix typo in docstring.
Juanma Barranquero <lekktu@gmail.com>
parents: 54079
diff changeset
1871
57267
617e54beffb6 * fringe.c (destroy_fringe_bitmap, init_fringe_bitmap)
Kim F. Storm <storm@cua.dk>
parents: 57258
diff changeset
1872 if (!rif)
617e54beffb6 * fringe.c (destroy_fringe_bitmap, init_fringe_bitmap)
Kim F. Storm <storm@cua.dk>
parents: 57258
diff changeset
1873 return;
617e54beffb6 * fringe.c (destroy_fringe_bitmap, init_fringe_bitmap)
Kim F. Storm <storm@cua.dk>
parents: 57258
diff changeset
1874
53879
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
1875 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
1876 rif->destroy_fringe_bitmap (bt);
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
1877 }
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
1878
53955
7d8c228c1f02 (init_fringe_bitmap) [MAC_OS, WORDS_BIG_ENDIAN]: Perform byte-swapping.
Kim F. Storm <storm@cua.dk>
parents: 53940
diff changeset
1879 #endif /* HAVE_NTGUI */
53879
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
1880
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
1881 #endif /* HAVE_WINDOW_SYSTEM */
e3771c262410 New file. Move original fringe related declarations
Kim F. Storm <storm@cua.dk>
parents:
diff changeset
1882
53900
5d607f751ba3 Resolve CVS conflicts
Miles Bader <miles@gnu.org>
parents: 53879
diff changeset
1883 /* arch-tag: 04596920-43eb-473d-b319-82712338162d
5d607f751ba3 Resolve CVS conflicts
Miles Bader <miles@gnu.org>
parents: 53879
diff changeset
1884 (do not change this comment) */