comparison src/gutter.h @ 404:2f8bb876ab1d r21-2-32

Import from CVS: tag r21-2-32
author cvs
date Mon, 13 Aug 2007 11:16:07 +0200
parents a86b2b5e0111
children
comparison
equal deleted inserted replaced
403:9f011ab08d48 404:2f8bb876ab1d
52 extern Lisp_Object Qgutter; 52 extern Lisp_Object Qgutter;
53 53
54 extern Lisp_Object Vgutter_size[4]; 54 extern Lisp_Object Vgutter_size[4];
55 extern Lisp_Object Vgutter_border_width[4]; 55 extern Lisp_Object Vgutter_border_width[4];
56 void update_frame_gutters (struct frame *f); 56 void update_frame_gutters (struct frame *f);
57 void update_frame_gutter_geometry (struct frame *f);
57 void mark_gutters (struct frame* f); 58 void mark_gutters (struct frame* f);
58 void init_frame_gutters (struct frame *f); 59 void init_frame_gutters (struct frame *f);
59 void init_device_gutters (struct device *d); 60 void init_device_gutters (struct device *d);
60 void init_global_gutters (struct device *d); 61 void init_global_gutters (struct device *d);
61 void free_frame_gutters (struct frame *f); 62 void free_frame_gutters (struct frame *f);
62 void redraw_exposed_gutters (struct frame *f, int x, int y, int width, 63 void redraw_exposed_gutters (struct frame *f, int x, int y, int width,
63 int height); 64 int height);
64 void reset_gutter_display_lines (struct frame* f); 65 void reset_gutter_display_lines (struct frame* f);
66 void gutter_extent_signal_changed_region_maybe (Lisp_Object obj,
67 Bufpos start, Bufpos end);
65 68
66 #define WINDOW_GUTTER_BORDER_WIDTH(w, pos) \ 69 #define WINDOW_GUTTER_BORDER_WIDTH(w, pos) \
67 (NILP ((w)->gutter_border_width[pos]) ? 0 : XINT ((w)->gutter_border_width[pos])) 70 (INTP ((w)->gutter_border_width[pos]) ? XINT ((w)->gutter_border_width[pos]) : 0)
68 #define WINDOW_GUTTER_SIZE(w, pos) \ 71 #define WINDOW_GUTTER_SIZE(w, pos) \
69 (NILP ((w)->gutter_size[pos]) ? 0 : XINT ((w)->gutter_size[pos])) 72 (INTP ((w)->gutter_size[pos]) ? XINT ((w)->gutter_size[pos]) : 0)
70 #define WINDOW_GUTTER_SIZE_INTERNAL(w, pos) \ 73 #define WINDOW_GUTTER_SIZE_INTERNAL(w, pos) \
71 (NILP ((w)->real_gutter_size[pos]) ? 0 : XINT ((w)->real_gutter_size[pos])) 74 (INTP ((w)->real_gutter_size[pos]) ? XINT ((w)->real_gutter_size[pos]) : 0)
72 #define WINDOW_GUTTER_VISIBLE(w, pos) \ 75 #define WINDOW_GUTTER_VISIBLE(w, pos) \
73 ((w)->gutter_visible_p[pos]) 76 ((w)->gutter_visible_p[pos])
74 #define WINDOW_GUTTER(w, pos) \ 77 #define WINDOW_GUTTER(w, pos) \
75 ((w)->gutter[pos]) 78 ((w)->real_gutter[pos])
79 #define RAW_WINDOW_GUTTER(w, pos) \
80 ((w)->gutter[pos])
76 81
77 #define WINDOW_REAL_GUTTER_SIZE(w, pos) \ 82 #define WINDOW_REAL_GUTTER_SIZE(w, pos) \
78 (!NILP (WINDOW_GUTTER_VISIBLE (w, pos)) \ 83 (!NILP (WINDOW_GUTTER_VISIBLE (w, pos)) \
79 ? WINDOW_GUTTER_SIZE_INTERNAL (w, pos) \ 84 ? WINDOW_GUTTER_SIZE_INTERNAL (w, pos) \
80 : 0) 85 : 0)
89 (WINDOW_REAL_GUTTER_SIZE (f,pos) + \ 94 (WINDOW_REAL_GUTTER_SIZE (f,pos) + \
90 2 * WINDOW_REAL_GUTTER_BORDER_WIDTH (f,pos)) 95 2 * WINDOW_REAL_GUTTER_BORDER_WIDTH (f,pos))
91 96
92 /* these macros predicate size on position and type of window */ 97 /* these macros predicate size on position and type of window */
93 #define WINDOW_REAL_TOP_GUTTER_BOUNDS(w) \ 98 #define WINDOW_REAL_TOP_GUTTER_BOUNDS(w) \
94 ((!MINI_WINDOW_P (w) && window_is_highest (w)) ? \ 99 WINDOW_REAL_GUTTER_BOUNDS (w,TOP_GUTTER)
95 WINDOW_REAL_GUTTER_BOUNDS (w,TOP_GUTTER) : 0)
96 #define WINDOW_REAL_BOTTOM_GUTTER_BOUNDS(w) \ 100 #define WINDOW_REAL_BOTTOM_GUTTER_BOUNDS(w) \
97 ((!MINI_WINDOW_P (w) && window_is_lowest (w)) ? \ 101 WINDOW_REAL_GUTTER_BOUNDS (w,BOTTOM_GUTTER)
98 WINDOW_REAL_GUTTER_BOUNDS (w,BOTTOM_GUTTER) : 0)
99 #define WINDOW_REAL_LEFT_GUTTER_BOUNDS(w) \ 102 #define WINDOW_REAL_LEFT_GUTTER_BOUNDS(w) \
100 ((!MINI_WINDOW_P (w) && window_is_leftmost (w)) ? \ 103 WINDOW_REAL_GUTTER_BOUNDS (w,LEFT_GUTTER)
101 WINDOW_REAL_GUTTER_BOUNDS (w,LEFT_GUTTER) : 0)
102 #define WINDOW_REAL_RIGHT_GUTTER_BOUNDS(w) \ 104 #define WINDOW_REAL_RIGHT_GUTTER_BOUNDS(w) \
103 ((!MINI_WINDOW_P (w) && window_is_rightmost (w)) ? \ 105 WINDOW_REAL_GUTTER_BOUNDS (w,RIGHT_GUTTER)
104 WINDOW_REAL_GUTTER_BOUNDS (w,RIGHT_GUTTER) : 0)
105 106
106 #define FRAME_GUTTER_VISIBLE(f, pos) \ 107 #define FRAME_GUTTER_VISIBLE(f, pos) \
107 WINDOW_REAL_GUTTER_VISIBLE (XWINDOW (FRAME_LAST_NONMINIBUF_WINDOW (f)), pos) 108 WINDOW_REAL_GUTTER_VISIBLE (XWINDOW (FRAME_LAST_NONMINIBUF_WINDOW (f)), pos)
108 #define FRAME_GUTTER_SIZE(f, pos) \ 109 #define FRAME_GUTTER_SIZE(f, pos) \
109 WINDOW_REAL_GUTTER_SIZE (XWINDOW (FRAME_LAST_NONMINIBUF_WINDOW (f)), pos) 110 WINDOW_REAL_GUTTER_SIZE (XWINDOW (FRAME_LAST_NONMINIBUF_WINDOW (f)), pos)