Mercurial > hg > xemacs-beta
annotate src/gutter.h @ 5938:699264ac20f1 cygwin
tls.h (why?) and skip-ascii.h added
| author | Henry Thompson <ht@markup.co.uk> |
|---|---|
| date | Wed, 08 Dec 2021 18:43:18 +0000 |
| parents | 56144c8593a8 |
| children | 77d7b77909c2 |
| rev | line source |
|---|---|
| 428 | 1 /* Define general gutter support. |
| 2 Copyright (C) 1999 Andy Piper. | |
|
5077
d372b17f63ce
clean up toolbar/gutter edge geometry
Ben Wing <ben@xemacs.org>
parents:
826
diff
changeset
|
3 Copyright (C) 2010 Ben Wing. |
| 428 | 4 |
| 5 This file is part of XEmacs. | |
| 6 | |
|
5402
308d34e9f07d
Changed bulk of GPLv2 or later files identified by script
Mats Lidell <matsl@xemacs.org>
parents:
5090
diff
changeset
|
7 XEmacs is free software: you can redistribute it and/or modify it |
| 428 | 8 under the terms of the GNU General Public License as published by the |
|
5402
308d34e9f07d
Changed bulk of GPLv2 or later files identified by script
Mats Lidell <matsl@xemacs.org>
parents:
5090
diff
changeset
|
9 Free Software Foundation, either version 3 of the License, or (at your |
|
308d34e9f07d
Changed bulk of GPLv2 or later files identified by script
Mats Lidell <matsl@xemacs.org>
parents:
5090
diff
changeset
|
10 option) any later version. |
| 428 | 11 |
| 12 XEmacs is distributed in the hope that it will be useful, but WITHOUT | |
| 13 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | |
| 14 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License | |
| 15 for more details. | |
| 16 | |
| 17 You should have received a copy of the GNU General Public License | |
|
5402
308d34e9f07d
Changed bulk of GPLv2 or later files identified by script
Mats Lidell <matsl@xemacs.org>
parents:
5090
diff
changeset
|
18 along with XEmacs. If not, see <http://www.gnu.org/licenses/>. */ |
| 428 | 19 |
| 20 /* Synched up with: Not in FSF. */ | |
| 21 | |
| 440 | 22 #ifndef INCLUDED_gutter_h_ |
| 23 #define INCLUDED_gutter_h_ | |
| 428 | 24 |
| 25 #include "specifier.h" | |
| 26 | |
| 434 | 27 #define DEVICE_SUPPORTS_GUTTERS_P(d) HAS_DEVMETH_P (d, output_frame_gutters) |
| 428 | 28 |
| 29 DECLARE_SPECIFIER_TYPE (gutter); | |
| 30 #define XGUTTER_SPECIFIER(x) XSPECIFIER_TYPE (x, gutter) | |
| 31 #define GUTTER_SPECIFIERP(x) SPECIFIER_TYPEP (x, gutter) | |
| 32 #define CHECK_GUTTER_SPECIFIER(x) CHECK_SPECIFIER_TYPE (x, gutter) | |
| 33 #define CONCHECK_GUTTER_SPECIFIER(x) CONCHECK_SPECIFIER_TYPE (x, gutter) | |
| 34 | |
| 35 #define DEFAULT_GUTTER_WIDTH 40 | |
| 36 #define DEFAULT_GUTTER_BORDER_WIDTH 2 | |
| 37 | |
| 38 extern Lisp_Object Qgutter; | |
| 39 | |
| 40 extern Lisp_Object Vgutter_size[4]; | |
| 41 extern Lisp_Object Vgutter_border_width[4]; | |
| 42 void update_frame_gutters (struct frame *f); | |
| 442 | 43 void update_frame_gutter_geometry (struct frame *f); |
| 44 void mark_gutters (struct frame* f); | |
| 428 | 45 void init_frame_gutters (struct frame *f); |
| 46 void init_device_gutters (struct device *d); | |
| 47 void init_global_gutters (struct device *d); | |
| 48 void free_frame_gutters (struct frame *f); | |
| 49 void redraw_exposed_gutters (struct frame *f, int x, int y, int width, | |
| 50 int height); | |
| 51 void reset_gutter_display_lines (struct frame* f); | |
| 442 | 52 void gutter_extent_signal_changed_region_maybe (Lisp_Object obj, |
| 665 | 53 Charbpos start, Charbpos end); |
| 446 | 54 int display_boxes_in_gutter_p (struct frame *f, struct display_box* db, |
| 55 struct display_glyph_area* dga); | |
| 428 | 56 |
| 57 #define WINDOW_GUTTER_BORDER_WIDTH(w, pos) \ | |
|
5581
56144c8593a8
Mechanically change INT to FIXNUM in our sources.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5402
diff
changeset
|
58 (FIXNUMP ((w)->gutter_border_width[pos]) ? XFIXNUM ((w)->gutter_border_width[pos]) : 0) |
| 428 | 59 #define WINDOW_GUTTER_SIZE(w, pos) \ |
|
5581
56144c8593a8
Mechanically change INT to FIXNUM in our sources.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5402
diff
changeset
|
60 (FIXNUMP ((w)->gutter_size[pos]) ? XFIXNUM ((w)->gutter_size[pos]) : 0) |
| 428 | 61 #define WINDOW_GUTTER_SIZE_INTERNAL(w, pos) \ |
|
5581
56144c8593a8
Mechanically change INT to FIXNUM in our sources.
Aidan Kehoe <kehoea@parhasard.net>
parents:
5402
diff
changeset
|
62 (FIXNUMP ((w)->real_gutter_size[pos]) ? XFIXNUM ((w)->real_gutter_size[pos]) : 0) |
| 428 | 63 #define WINDOW_GUTTER_VISIBLE(w, pos) \ |
| 442 | 64 ((w)->gutter_visible_p[pos]) |
| 428 | 65 #define WINDOW_GUTTER(w, pos) \ |
| 442 | 66 ((w)->real_gutter[pos]) |
| 67 #define RAW_WINDOW_GUTTER(w, pos) \ | |
| 68 ((w)->gutter[pos]) | |
| 428 | 69 |
| 70 #define WINDOW_REAL_GUTTER_SIZE(w, pos) \ | |
| 71 (!NILP (WINDOW_GUTTER_VISIBLE (w, pos)) \ | |
| 72 ? WINDOW_GUTTER_SIZE_INTERNAL (w, pos) \ | |
| 73 : 0) | |
| 74 #define WINDOW_REAL_GUTTER_VISIBLE(f, pos) \ | |
| 75 (WINDOW_REAL_GUTTER_SIZE (f, pos) > 0) | |
| 76 #define WINDOW_REAL_GUTTER_BORDER_WIDTH(f, pos) \ | |
| 77 ((!NILP (WINDOW_GUTTER_VISIBLE (f, pos)) \ | |
| 78 && WINDOW_GUTTER_SIZE_INTERNAL (f,pos) > 0) \ | |
| 79 ? WINDOW_GUTTER_BORDER_WIDTH (f, pos) \ | |
| 80 : 0) | |
| 81 #define WINDOW_REAL_GUTTER_BOUNDS(f, pos) \ | |
| 82 (WINDOW_REAL_GUTTER_SIZE (f,pos) + \ | |
| 83 2 * WINDOW_REAL_GUTTER_BORDER_WIDTH (f,pos)) | |
| 84 | |
| 85 /* these macros predicate size on position and type of window */ | |
| 86 #define WINDOW_REAL_TOP_GUTTER_BOUNDS(w) \ | |
| 5090 | 87 WINDOW_REAL_GUTTER_BOUNDS (w, TOP_EDGE) |
| 428 | 88 #define WINDOW_REAL_BOTTOM_GUTTER_BOUNDS(w) \ |
| 5090 | 89 WINDOW_REAL_GUTTER_BOUNDS (w, BOTTOM_EDGE) |
| 428 | 90 #define WINDOW_REAL_LEFT_GUTTER_BOUNDS(w) \ |
| 5090 | 91 WINDOW_REAL_GUTTER_BOUNDS (w, LEFT_EDGE) |
| 428 | 92 #define WINDOW_REAL_RIGHT_GUTTER_BOUNDS(w) \ |
| 5090 | 93 WINDOW_REAL_GUTTER_BOUNDS (w, RIGHT_EDGE) |
| 428 | 94 |
| 95 #define FRAME_GUTTER_VISIBLE(f, pos) \ | |
| 96 WINDOW_REAL_GUTTER_VISIBLE (XWINDOW (FRAME_LAST_NONMINIBUF_WINDOW (f)), pos) | |
| 97 #define FRAME_GUTTER_SIZE(f, pos) \ | |
| 98 WINDOW_REAL_GUTTER_SIZE (XWINDOW (FRAME_LAST_NONMINIBUF_WINDOW (f)), pos) | |
| 99 #define FRAME_GUTTER_BOUNDS(f, pos) \ | |
| 100 WINDOW_REAL_GUTTER_BOUNDS (XWINDOW (FRAME_LAST_NONMINIBUF_WINDOW (f)), pos) | |
| 101 #define FRAME_GUTTER_BORDER_WIDTH(f, pos) \ | |
| 102 WINDOW_REAL_GUTTER_BORDER_WIDTH (XWINDOW (FRAME_LAST_NONMINIBUF_WINDOW (f)), pos) | |
| 103 | |
| 104 #define FRAME_GUTTER(f, pos) \ | |
| 105 WINDOW_GUTTER (XWINDOW (FRAME_LAST_NONMINIBUF_WINDOW (f)), pos) | |
| 106 | |
| 107 /* these macros predicate size on position and type of window */ | |
| 5090 | 108 #define FRAME_TOP_GUTTER_BOUNDS(f) FRAME_GUTTER_BOUNDS (f, TOP_EDGE) |
| 109 #define FRAME_BOTTOM_GUTTER_BOUNDS(f) FRAME_GUTTER_BOUNDS (f, BOTTOM_EDGE) | |
| 110 #define FRAME_LEFT_GUTTER_BOUNDS(f) FRAME_GUTTER_BOUNDS (f, LEFT_EDGE) | |
| 111 #define FRAME_RIGHT_GUTTER_BOUNDS(f) FRAME_GUTTER_BOUNDS (f, RIGHT_EDGE) | |
| 428 | 112 |
| 440 | 113 #endif /* INCLUDED_gutter_h_ */ |
