comparison src/gutter.c @ 440:8de8e3f6228a r21-2-28

Import from CVS: tag r21-2-28
author cvs
date Mon, 13 Aug 2007 11:33:38 +0200
parents 84b14dcb0985
children abe6d1db359e
comparison
equal deleted inserted replaced
439:357dd071b03c 440:8de8e3f6228a
220 Lisp_Object frame; 220 Lisp_Object frame;
221 Lisp_Object window = FRAME_LAST_NONMINIBUF_WINDOW (f); 221 Lisp_Object window = FRAME_LAST_NONMINIBUF_WINDOW (f);
222 struct device *d = XDEVICE (f->device); 222 struct device *d = XDEVICE (f->device);
223 struct window* w = XWINDOW (window); 223 struct window* w = XWINDOW (window);
224 int x, y, width, height, ypos; 224 int x, y, width, height, ypos;
225 int line; 225 int line, border_width;
226 int border_width = FRAME_GUTTER_BORDER_WIDTH (f, pos); 226 face_index findex;
227 face_index findex = get_builtin_face_cache_index (w, Vgui_element_face);
228 display_line_dynarr* ddla, *cdla; 227 display_line_dynarr* ddla, *cdla;
229 struct display_line *dl; 228 struct display_line *dl;
230 int cdla_len; 229 int cdla_len;
230
231 if (!WINDOW_LIVE_P (w))
232 return;
233
234 border_width = FRAME_GUTTER_BORDER_WIDTH (f, pos);
235 findex = get_builtin_face_cache_index (w, Vgui_element_face);
231 236
232 if (!f->current_display_lines) 237 if (!f->current_display_lines)
233 f->current_display_lines = Dynarr_new (display_line); 238 f->current_display_lines = Dynarr_new (display_line);
234 if (!f->desired_display_lines) 239 if (!f->desired_display_lines)
235 f->desired_display_lines = Dynarr_new (display_line); 240 f->desired_display_lines = Dynarr_new (display_line);
982 #endif 987 #endif
983 #ifdef HAVE_X_WINDOWS 988 #ifdef HAVE_X_WINDOWS
984 fb = Fcons (Fcons (list1 (Qx), Qautodetect), fb); 989 fb = Fcons (Fcons (list1 (Qx), Qautodetect), fb);
985 #endif 990 #endif
986 #ifdef HAVE_MS_WINDOWS 991 #ifdef HAVE_MS_WINDOWS
992 fb = Fcons (Fcons (list1 (Qmsprinter), Qautodetect), fb);
987 fb = Fcons (Fcons (list1 (Qmswindows), Qautodetect), fb); 993 fb = Fcons (Fcons (list1 (Qmswindows), Qautodetect), fb);
988 #endif 994 #endif
989 if (!NILP (fb)) 995 if (!NILP (fb))
990 set_specifier_fallback (Vdefault_gutter_height, fb); 996 set_specifier_fallback (Vdefault_gutter_height, fb);
991 997
995 #endif 1001 #endif
996 #ifdef HAVE_X_WINDOWS 1002 #ifdef HAVE_X_WINDOWS
997 fb = Fcons (Fcons (list1 (Qx), make_int (DEFAULT_GUTTER_WIDTH)), fb); 1003 fb = Fcons (Fcons (list1 (Qx), make_int (DEFAULT_GUTTER_WIDTH)), fb);
998 #endif 1004 #endif
999 #ifdef HAVE_MS_WINDOWS 1005 #ifdef HAVE_MS_WINDOWS
1006 fb = Fcons (Fcons (list1 (Qmsprinter), Qzero), fb);
1000 fb = Fcons (Fcons (list1 (Qmswindows), 1007 fb = Fcons (Fcons (list1 (Qmswindows),
1001 make_int (DEFAULT_GUTTER_WIDTH)), fb); 1008 make_int (DEFAULT_GUTTER_WIDTH)), fb);
1002 #endif 1009 #endif
1003 if (!NILP (fb)) 1010 if (!NILP (fb))
1004 set_specifier_fallback (Vdefault_gutter_width, fb); 1011 set_specifier_fallback (Vdefault_gutter_width, fb);
1091 #endif 1098 #endif
1092 #ifdef HAVE_X_WINDOWS 1099 #ifdef HAVE_X_WINDOWS
1093 fb = Fcons (Fcons (list1 (Qx), make_int (DEFAULT_GUTTER_BORDER_WIDTH)), fb); 1100 fb = Fcons (Fcons (list1 (Qx), make_int (DEFAULT_GUTTER_BORDER_WIDTH)), fb);
1094 #endif 1101 #endif
1095 #ifdef HAVE_MS_WINDOWS 1102 #ifdef HAVE_MS_WINDOWS
1103 fb = Fcons (Fcons (list1 (Qmsprinter), Qzero), fb);
1096 fb = Fcons (Fcons (list1 (Qmswindows), make_int (DEFAULT_GUTTER_BORDER_WIDTH)), fb); 1104 fb = Fcons (Fcons (list1 (Qmswindows), make_int (DEFAULT_GUTTER_BORDER_WIDTH)), fb);
1097 #endif 1105 #endif
1098 if (!NILP (fb)) 1106 if (!NILP (fb))
1099 set_specifier_fallback (Vdefault_gutter_border_width, fb); 1107 set_specifier_fallback (Vdefault_gutter_border_width, fb);
1100 1108
1189 set_specifier_fallback (Vgutter_visible_p[TOP_GUTTER], 1197 set_specifier_fallback (Vgutter_visible_p[TOP_GUTTER],
1190 Vdefault_gutter_visible_p); 1198 Vdefault_gutter_visible_p);
1191 set_specifier_fallback (Vgutter_visible_p[BOTTOM_GUTTER], fb); 1199 set_specifier_fallback (Vgutter_visible_p[BOTTOM_GUTTER], fb);
1192 set_specifier_fallback (Vgutter_visible_p[LEFT_GUTTER], fb); 1200 set_specifier_fallback (Vgutter_visible_p[LEFT_GUTTER], fb);
1193 set_specifier_fallback (Vgutter_visible_p[RIGHT_GUTTER], fb); 1201 set_specifier_fallback (Vgutter_visible_p[RIGHT_GUTTER], fb);
1194 1202 }
1195 }