X-Git-Url: http://git.chise.org/gitweb/?a=blobdiff_plain;f=src%2Fwindow.h;h=8a793369d63645eba50a150414bf0c6e33d67b9b;hb=492b0041a5894a974da0406d1d5c6114ed496b3e;hp=fd2e2916566cfd172649c67b8253373218c32562;hpb=77dcef404dc78635f6ffa8f71a803d2bc7cc8921;p=chise%2Fxemacs-chise.git.1 diff --git a/src/window.h b/src/window.h index fd2e291..8a79336 100644 --- a/src/window.h +++ b/src/window.h @@ -24,8 +24,8 @@ Boston, MA 02111-1307, USA. */ /* Synched up with: FSF 19.30. */ -#ifndef _XEMACS_WINDOW_H_ -#define _XEMACS_WINDOW_H_ +#ifndef INCLUDED_window_h_ +#define INCLUDED_window_h_ #include "redisplay.h" #ifdef HAVE_SCROLLBARS @@ -129,7 +129,15 @@ struct window /* Number of columns display within the window is scrolled to the left. */ int hscroll; /* Idem for the window's modeline */ - int modeline_hscroll; + Charcount modeline_hscroll; + /* Amount to clip off the top line for pixel-based scrolling. Point + will remain constant but this will be incremented to + incrementally shift lines up. */ + int top_yoffset; + /* Amount to clip off the left of the lines for pixel-based + scrolling. Hscroll will remain constant but this will be + incremented to incrementally shift lines left.*/ + int left_xoffset; /* Number saying how recently window was selected */ Lisp_Object use_time; /* text.modified of displayed buffer as of last time display completed */ @@ -145,8 +153,14 @@ struct window face_cachel_dynarr *face_cachels; /* glyph cache elements correct for this window and its current buffer */ glyph_cachel_dynarr *glyph_cachels; - - + /* we cannot have a per-device cache of widgets / subwindows because + each visible instance needs to be a separate instance. The lowest + level of granularity we can get easily is the window that the + subwindow is in. This will fail if we attach the same subwindow + twice to a buffer. However, we are quite unlikely to do this, + especially with buttons which will need individual callbacks. The + proper solution is probably not worth the effort. */ + Lisp_Object subwindow_instance_cache; /* List of starting positions for display lines. Only valid if buffer has not changed. */ line_start_cache_dynarr *line_start_cache; @@ -170,6 +184,9 @@ struct window must run the redisplay-end-trigger-functions. */ Lisp_Object redisplay_end_trigger; + /* Set by the extent code when extents in the gutter are changed. */ + int gutter_extent_modiff[4]; + /* Set by redisplay to the last position seen. This is used to implement the redisplay-end-trigger-functions. */ Bufpos last_redisplay_pos; @@ -248,7 +265,6 @@ DECLARE_LRECORD (window, struct window); #define XWINDOW(x) XRECORD (x, window, struct window) #define XSETWINDOW(x, p) XSETRECORD (x, p, window) #define WINDOWP(x) RECORDP (x, window) -#define GC_WINDOWP(x) GC_RECORDP (x, window) #define CHECK_WINDOW(x) CHECK_RECORD (x, window) #define CONCHECK_WINDOW(x) CONCHECK_RECORD (x, window) @@ -284,6 +300,13 @@ DECLARE_LRECORD (window, struct window); windows_changed = 1; \ } while (0) +/* #### This should be fixed not to call MARK_FRAME_CHANGED because + faces are cached per window. Also, other code which changes window's + face should use this macro. +*/ +#define MARK_WINDOW_FACES_CHANGED(w) \ + MARK_FRAME_FACES_CHANGED (XFRAME ((w)->frame)) + #define WINDOW_TTY_P(w) FRAME_TTY_P (XFRAME ((w)->frame)) #define WINDOW_X_P(w) FRAME_X_P (XFRAME ((w)->frame)) #define WINDOW_NS_P(w) FRAME_NS_P (XFRAME ((w)->frame)) @@ -294,10 +317,10 @@ DECLARE_LRECORD (window_configuration, struct window_config); EXFUN (Fget_buffer_window, 3); EXFUN (Fmove_to_window_line, 2); EXFUN (Frecenter, 2); -EXFUN (Freplace_buffer_in_windows, 1); +EXFUN (Freplace_buffer_in_windows, 3); EXFUN (Fselect_window, 2); EXFUN (Fselected_window, 1); -EXFUN (Fset_window_buffer, 2); +EXFUN (Fset_window_buffer, 3); EXFUN (Fset_window_hscroll, 2); EXFUN (Fset_window_point, 2); EXFUN (Fset_window_start, 3); @@ -323,6 +346,8 @@ int window_char_height (struct window *, int include_gutters_p); int window_displayed_height (struct window *); int window_is_leftmost (struct window *w); int window_is_rightmost (struct window *w); +int window_is_lowest (struct window *w); +int window_is_highest (struct window *w); int window_truncation_on (struct window *w); int window_needs_vertical_divider (struct window *); int window_scrollbar_width (struct window *w); @@ -334,9 +359,9 @@ int window_top_gutter_height (struct window *w); int window_bottom_gutter_height (struct window *w); int window_left_gutter_width (struct window *w, int modeline); int window_right_gutter_width (struct window *w, int modeline); -int window_bottom_toolbar_height (struct window *w); void delete_all_subwindows (struct window *w); +void undedicate_windows (Lisp_Object buffer, Lisp_Object frame); void set_window_pixheight (Lisp_Object window, int pixheight, int nodelete); void set_window_pixwidth (Lisp_Object window, int pixwidth, @@ -346,6 +371,8 @@ void window_scroll (Lisp_Object window, Lisp_Object n, int direction, int buffer_window_count (struct buffer *b, struct frame *f); int buffer_window_mru (struct window *w); void check_frame_size (struct frame *frame, int *rows, int *cols); +int frame_pixsize_valid_p (struct frame *frame, int width, int height); +int frame_size_valid_p (struct frame *frame, int rows, int cols); struct window *decode_window (Lisp_Object window); struct window *find_window_by_pixel_pos (int pix_x, int pix_y, Lisp_Object win); @@ -368,13 +395,18 @@ int invalidate_vertical_divider_cache_in_window (struct window *w, int window_divider_width (struct window *w); #define WINDOW_FRAME(w) ((w)->frame) +#define WINDOW_XFRAME(w) XFRAME (WINDOW_FRAME (w)) #define WINDOW_BUFFER(w) ((w)->buffer) +#define WINDOW_XBUFFER(w) XBUFFER (WINDOW_BUFFER (w)) #define WINDOW_DEVICE(w) FRAME_DEVICE (XFRAME (WINDOW_FRAME (w))) +#define WINDOW_XDEVICE(w) XDEVICE (WINDOW_DEVICE (w)) #define WINDOW_CONSOLE(w) DEVICE_CONSOLE (XDEVICE (WINDOW_DEVICE (w))) +#define WINDOW_XCONSOLE(w) XCONSOLE (WINDOW_CONSOLE (w)) /* XEmacs window size and positioning macros. */ #define WINDOW_TOP(w) ((w)->pixel_top) #define WINDOW_TEXT_TOP(w) (WINDOW_TOP (w) + window_top_gutter_height (w)) +#define WINDOW_TEXT_TOP_CLIP(w) ((w)->top_yoffset) #define WINDOW_BOTTOM(w) ((w)->pixel_top + (w)->pixel_height) #define WINDOW_TEXT_BOTTOM(w) (WINDOW_BOTTOM (w) - window_bottom_gutter_height (w)) #define WINDOW_LEFT(w) ((w)->pixel_left) @@ -410,4 +442,4 @@ int window_divider_width (struct window *w); #endif /* emacs */ -#endif /* _XEMACS_WINDOW_H_ */ +#endif /* INCLUDED_window_h_ */