#ifndef _XEMACS_FRAME_H_
#define _XEMACS_FRAME_H_
+#ifdef HAVE_SCROLLBARS
#include "scrollbar.h"
+#endif
+
+#ifdef HAVE_TOOLBARS
#include "toolbar.h"
+#endif
+
#include "device.h"
+#include "glyphs.h"
+#include "redisplay.h"
#define FRAME_TYPE_NAME(f) ((f)->framemeths->name)
#define FRAME_TYPE(f) ((f)->framemeths->symbol)
struct console_methods *framemeths;
/* Size of text only area of this frame, excluding scrollbars,
- toolbars and end of line glyphs. The size can be in charactes
+ toolbars and end of line glyphs. The size can be in characters
or pixels, depending on units in which window system resizes
its windows */
int height, width;
/* Size of text-only are of the frame, in default font characters.
This may be inaccurate due to rounding error */
int char_height, char_width;
-
+
/* Size of the whole frame, including scrollbars, toolbars and end
of line glyphs, in pixels */
int pixheight, pixwidth;
int modiff;
+ /* subwindow cache elements for this frame */
+ subwindow_cachel_dynarr *subwindow_cachels;
+
#ifdef HAVE_SCROLLBARS
/* frame-local scrollbar information. See scrollbar.c. */
int scrollbar_y_offset;
unsigned int current_toolbar_size[4];
#endif
+ /* Dynamic array of display lines for gutters */
+ display_line_dynarr *current_display_lines;
+ display_line_dynarr *desired_display_lines;
+
/* A structure of auxiliary data specific to the device type.
struct x_frame is used for X window frames; defined in console-x.h */
void *frame_data;
#include "frameslots.h"
/* Nonzero if frame is currently displayed.
- Mutally exclusive with iconfied
+ Mutually exclusive with iconified
JV: This now a tristate flag:
Value : Emacs meaning :f-v-p : X meaning
0 : not displayed : nil : unmapped
unsigned int bottom_toolbar_was_visible :1;
unsigned int left_toolbar_was_visible :1;
unsigned int right_toolbar_was_visible :1;
+ /* gutter visibility */
+ unsigned int top_gutter_was_visible :1;
+ unsigned int bottom_gutter_was_visible :1;
+ unsigned int left_gutter_was_visible :1;
+ unsigned int right_gutter_was_visible :1;
/* redisplay flags */
unsigned int buffers_changed :1;
unsigned int extents_changed :1;
unsigned int faces_changed :1;
unsigned int frame_changed :1;
+ unsigned int subwindows_changed :1;
unsigned int glyphs_changed :1;
unsigned int icon_changed :1;
unsigned int menubar_changed :1;
unsigned int point_changed :1;
unsigned int size_changed :1;
unsigned int toolbar_changed :1;
+ unsigned int gutter_changed :1;
unsigned int windows_changed :1;
unsigned int windows_structure_changed :1;
unsigned int window_face_cache_reset :1; /* used by expose handler */
glyphs_changed = 1; \
} while (0)
+#define MARK_FRAME_SUBWINDOWS_CHANGED(f) do { \
+ struct frame *mfgc_f = (f); \
+ mfgc_f->subwindows_changed = 1; \
+ mfgc_f->modiff++; \
+ if (!NILP (mfgc_f->device)) \
+ { \
+ struct device *mfgc_d = XDEVICE (mfgc_f->device); \
+ MARK_DEVICE_SUBWINDOWS_CHANGED (mfgc_d); \
+ } \
+ else \
+ subwindows_changed = 1; \
+} while (0)
+
#define MARK_FRAME_TOOLBARS_CHANGED(f) do { \
struct frame *mftc_f = (f); \
mftc_f->toolbar_changed = 1; \
toolbar_changed = 1; \
} while (0)
+#define MARK_FRAME_GUTTERS_CHANGED(f) do { \
+ struct frame *mftc_f = (f); \
+ mftc_f->gutter_changed = 1; \
+ mftc_f->modiff++; \
+ if (!NILP (mftc_f->device)) \
+ { \
+ struct device *mftc_d = XDEVICE (mftc_f->device); \
+ MARK_DEVICE_GUTTERS_CHANGED (mftc_d); \
+ } \
+ else \
+ gutter_changed = 1; \
+} while (0)
+
#define MARK_FRAME_SIZE_CHANGED(f) do { \
struct frame *mfsc_f = (f); \
mfsc_f->size_changed = 1; \
#define FRAME_SCROLLBAR_HEIGHT(f) 0
#endif
+#define FW_FRAME(obj) \
+ (WINDOWP (obj) ? WINDOW_FRAME (XWINDOW (obj)) \
+ : (FRAMEP (obj) ? obj \
+ : Qnil))
+
#define FRAME_NEW_HEIGHT(f) ((f)->new_height)
#define FRAME_NEW_WIDTH(f) ((f)->new_width)
#define FRAME_CURSOR_X(f) ((f)->cursor_x)
NON_LVALUE ((f)->last_nonminibuf_window)
#define FRAME_SB_VCACHE(f) ((f)->sb_vcache)
#define FRAME_SB_HCACHE(f) ((f)->sb_hcache)
+#define FRAME_SUBWINDOW_CACHE(f) ((f)->subwindow_cachels)
#if 0 /* FSFmacs */