Mercurial > hg > xemacs-beta
annotate src/gutter.h @ 5087:818eeb72e0fb
Remove man/custom.texi.
See xemacs-patches message with ID
<870180fe1003021222u127ff3b0k4bf98df856178e68@mail.gmail.com> and also
<d7ba68911002191546u3f5c31c3x14128bf4bdbcf17e@mail.gmail.com> in xemacs-beta.
| author | Jerry James <james@xemacs.org> |
|---|---|
| date | Tue, 02 Mar 2010 13:25:45 -0700 |
| parents | d372b17f63ce |
| children | 0ca81354c4c7 |
| 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 | |
| 7 XEmacs is free software; you can redistribute it and/or modify it | |
| 8 under the terms of the GNU General Public License as published by the | |
| 9 Free Software Foundation; either version 2, or (at your option) any | |
| 10 later version. | |
| 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 | |
| 18 along with XEmacs; see the file COPYING. If not, write to | |
| 19 the Free Software Foundation, Inc., 59 Temple Place - Suite 330, | |
| 20 Boston, MA 02111-1307, USA. */ | |
| 21 | |
| 22 /* Synched up with: Not in FSF. */ | |
| 23 | |
| 440 | 24 #ifndef INCLUDED_gutter_h_ |
| 25 #define INCLUDED_gutter_h_ | |
| 428 | 26 |
| 27 #include "specifier.h" | |
| 28 | |
| 434 | 29 #define DEVICE_SUPPORTS_GUTTERS_P(d) HAS_DEVMETH_P (d, output_frame_gutters) |
| 428 | 30 |
| 31 DECLARE_SPECIFIER_TYPE (gutter); | |
| 32 #define XGUTTER_SPECIFIER(x) XSPECIFIER_TYPE (x, gutter) | |
| 33 #define GUTTER_SPECIFIERP(x) SPECIFIER_TYPEP (x, gutter) | |
| 34 #define CHECK_GUTTER_SPECIFIER(x) CHECK_SPECIFIER_TYPE (x, gutter) | |
| 35 #define CONCHECK_GUTTER_SPECIFIER(x) CONCHECK_SPECIFIER_TYPE (x, gutter) | |
| 36 | |
| 37 #define DEFAULT_GUTTER_WIDTH 40 | |
| 38 #define DEFAULT_GUTTER_BORDER_WIDTH 2 | |
| 39 | |
| 40 extern Lisp_Object Qgutter; | |
| 41 | |
| 42 extern Lisp_Object Vgutter_size[4]; | |
| 43 extern Lisp_Object Vgutter_border_width[4]; | |
| 44 void update_frame_gutters (struct frame *f); | |
| 442 | 45 void update_frame_gutter_geometry (struct frame *f); |
| 46 void mark_gutters (struct frame* f); | |
| 428 | 47 void init_frame_gutters (struct frame *f); |
| 48 void init_device_gutters (struct device *d); | |
| 49 void init_global_gutters (struct device *d); | |
| 50 void free_frame_gutters (struct frame *f); | |
| 51 void redraw_exposed_gutters (struct frame *f, int x, int y, int width, | |
| 52 int height); | |
| 53 void reset_gutter_display_lines (struct frame* f); | |
| 442 | 54 void gutter_extent_signal_changed_region_maybe (Lisp_Object obj, |
| 665 | 55 Charbpos start, Charbpos end); |
| 446 | 56 int display_boxes_in_gutter_p (struct frame *f, struct display_box* db, |
| 57 struct display_glyph_area* dga); | |
| 428 | 58 |
| 59 #define WINDOW_GUTTER_BORDER_WIDTH(w, pos) \ | |
| 442 | 60 (INTP ((w)->gutter_border_width[pos]) ? XINT ((w)->gutter_border_width[pos]) : 0) |
| 428 | 61 #define WINDOW_GUTTER_SIZE(w, pos) \ |
| 442 | 62 (INTP ((w)->gutter_size[pos]) ? XINT ((w)->gutter_size[pos]) : 0) |
| 428 | 63 #define WINDOW_GUTTER_SIZE_INTERNAL(w, pos) \ |
| 442 | 64 (INTP ((w)->real_gutter_size[pos]) ? XINT ((w)->real_gutter_size[pos]) : 0) |
| 428 | 65 #define WINDOW_GUTTER_VISIBLE(w, pos) \ |
| 442 | 66 ((w)->gutter_visible_p[pos]) |
| 428 | 67 #define WINDOW_GUTTER(w, pos) \ |
| 442 | 68 ((w)->real_gutter[pos]) |
| 69 #define RAW_WINDOW_GUTTER(w, pos) \ | |
| 70 ((w)->gutter[pos]) | |
| 428 | 71 |
| 72 #define WINDOW_REAL_GUTTER_SIZE(w, pos) \ | |
| 73 (!NILP (WINDOW_GUTTER_VISIBLE (w, pos)) \ | |
| 74 ? WINDOW_GUTTER_SIZE_INTERNAL (w, pos) \ | |
| 75 : 0) | |
| 76 #define WINDOW_REAL_GUTTER_VISIBLE(f, pos) \ | |
| 77 (WINDOW_REAL_GUTTER_SIZE (f, pos) > 0) | |
| 78 #define WINDOW_REAL_GUTTER_BORDER_WIDTH(f, pos) \ | |
| 79 ((!NILP (WINDOW_GUTTER_VISIBLE (f, pos)) \ | |
| 80 && WINDOW_GUTTER_SIZE_INTERNAL (f,pos) > 0) \ | |
| 81 ? WINDOW_GUTTER_BORDER_WIDTH (f, pos) \ | |
| 82 : 0) | |
| 83 #define WINDOW_REAL_GUTTER_BOUNDS(f, pos) \ | |
| 84 (WINDOW_REAL_GUTTER_SIZE (f,pos) + \ | |
| 85 2 * WINDOW_REAL_GUTTER_BORDER_WIDTH (f,pos)) | |
| 86 | |
| 87 /* these macros predicate size on position and type of window */ | |
| 88 #define WINDOW_REAL_TOP_GUTTER_BOUNDS(w) \ | |
|
5077
d372b17f63ce
clean up toolbar/gutter edge geometry
Ben Wing <ben@xemacs.org>
parents:
826
diff
changeset
|
89 WINDOW_REAL_GUTTER_BOUNDS (w,TOP_EDGE) |
| 428 | 90 #define WINDOW_REAL_BOTTOM_GUTTER_BOUNDS(w) \ |
|
5077
d372b17f63ce
clean up toolbar/gutter edge geometry
Ben Wing <ben@xemacs.org>
parents:
826
diff
changeset
|
91 WINDOW_REAL_GUTTER_BOUNDS (w,BOTTOM_EDGE) |
| 428 | 92 #define WINDOW_REAL_LEFT_GUTTER_BOUNDS(w) \ |
|
5077
d372b17f63ce
clean up toolbar/gutter edge geometry
Ben Wing <ben@xemacs.org>
parents:
826
diff
changeset
|
93 WINDOW_REAL_GUTTER_BOUNDS (w,LEFT_EDGE) |
| 428 | 94 #define WINDOW_REAL_RIGHT_GUTTER_BOUNDS(w) \ |
|
5077
d372b17f63ce
clean up toolbar/gutter edge geometry
Ben Wing <ben@xemacs.org>
parents:
826
diff
changeset
|
95 WINDOW_REAL_GUTTER_BOUNDS (w,RIGHT_EDGE) |
| 428 | 96 |
| 97 #define FRAME_GUTTER_VISIBLE(f, pos) \ | |
| 98 WINDOW_REAL_GUTTER_VISIBLE (XWINDOW (FRAME_LAST_NONMINIBUF_WINDOW (f)), pos) | |
| 99 #define FRAME_GUTTER_SIZE(f, pos) \ | |
| 100 WINDOW_REAL_GUTTER_SIZE (XWINDOW (FRAME_LAST_NONMINIBUF_WINDOW (f)), pos) | |
| 101 #define FRAME_GUTTER_BOUNDS(f, pos) \ | |
| 102 WINDOW_REAL_GUTTER_BOUNDS (XWINDOW (FRAME_LAST_NONMINIBUF_WINDOW (f)), pos) | |
| 103 #define FRAME_GUTTER_BORDER_WIDTH(f, pos) \ | |
| 104 WINDOW_REAL_GUTTER_BORDER_WIDTH (XWINDOW (FRAME_LAST_NONMINIBUF_WINDOW (f)), pos) | |
| 105 | |
| 106 #define FRAME_GUTTER(f, pos) \ | |
| 107 WINDOW_GUTTER (XWINDOW (FRAME_LAST_NONMINIBUF_WINDOW (f)), pos) | |
| 108 | |
| 109 /* these macros predicate size on position and type of window */ | |
| 110 #define FRAME_TOP_GUTTER_BOUNDS(f) \ | |
|
5077
d372b17f63ce
clean up toolbar/gutter edge geometry
Ben Wing <ben@xemacs.org>
parents:
826
diff
changeset
|
111 WINDOW_REAL_GUTTER_BOUNDS (XWINDOW (FRAME_LAST_NONMINIBUF_WINDOW (f)), TOP_EDGE) |
| 428 | 112 #define FRAME_BOTTOM_GUTTER_BOUNDS(f) \ |
|
5077
d372b17f63ce
clean up toolbar/gutter edge geometry
Ben Wing <ben@xemacs.org>
parents:
826
diff
changeset
|
113 WINDOW_REAL_GUTTER_BOUNDS (XWINDOW (FRAME_LAST_NONMINIBUF_WINDOW (f)), BOTTOM_EDGE) |
| 428 | 114 #define FRAME_LEFT_GUTTER_BOUNDS(f) \ |
|
5077
d372b17f63ce
clean up toolbar/gutter edge geometry
Ben Wing <ben@xemacs.org>
parents:
826
diff
changeset
|
115 WINDOW_REAL_GUTTER_BOUNDS (XWINDOW (FRAME_LAST_NONMINIBUF_WINDOW (f)), LEFT_EDGE) |
| 428 | 116 #define FRAME_RIGHT_GUTTER_BOUNDS(f) \ |
|
5077
d372b17f63ce
clean up toolbar/gutter edge geometry
Ben Wing <ben@xemacs.org>
parents:
826
diff
changeset
|
117 WINDOW_REAL_GUTTER_BOUNDS (XWINDOW (FRAME_LAST_NONMINIBUF_WINDOW (f)), RIGHT_EDGE) |
| 428 | 118 |
| 440 | 119 #endif /* INCLUDED_gutter_h_ */ |
