char bold, ital; /* convenience flags */
char synthItal;
float voffset; /* mean of ascender/descender offsets */
- XCharStruct max_bounds; /* 23 */
+ XCharStruct max_bounds;
/* we compute glyph codes and metrics on-demand in blocks of 256 indexed
by hibyte, lobyte */
unsigned short **glyphs; /* map unicode index to glyph */
/* Minimum font height over all fonts in font_table. */
int smallest_font_height;
- /*/23 */
struct ns_bitmap_record *bitmaps;
int bitmaps_size;
int bitmaps_last;
- /* 23 */
struct image_cache *image_cache;
struct ns_color_table *color_table;
- /* 23: DPI resolution of this screen */
+ /* DPI resolution of this screen */
double resx, resy;
- /* 23: Mask of things that cause the mouse to be grabbed */
+ /* Mask of things that cause the mouse to be grabbed */
int grabbed;
- /* 23 */
int n_planes;
- /* 23 */
int color_p;
- /* 23 */
Window root_window;
- /* 23: Xism */
+ /* Xism */
XrmDatabase xrdb;
- /* 23: The cursor to use for vertical scroll bars. */
+ /* The cursor to use for vertical scroll bars. */
Cursor vertical_scroll_bar_cursor;
- /* 23: most mouse face stuff moved in here (and reasonably so) */
+ /* most mouse face stuff moved in here as of 21+ (and reasonably so) */
int mouse_face_beg_row, mouse_face_beg_col;
int mouse_face_end_row, mouse_face_end_col;
int mouse_face_beg_x, mouse_face_beg_y;
extern Lisp_Object ns_display_name_list;
extern struct ns_display_info *ns_display_info_for_name ();
-/* 23: FIXME: these functions (we defined in nsfns) are used in various
- places, but no prototypes are provided */
struct ns_display_info *check_x_display_info (Lisp_Object frame);
FRAME_PTR check_x_frame (Lisp_Object frame);
void *toolbar;
#endif
- /* 23: NSCursors init'ed in initFrameFromEmacs */
+ /* NSCursors init'ed in initFrameFromEmacs */
Cursor text_cursor;
Cursor nontext_cursor;
Cursor modeline_cursor;
Cursor hourglass_cursor;
Cursor horizontal_drag_cursor;
- /* 23: NS-specific */
+ /* NS-specific */
Cursor current_pointer;
- /* 23: lord knows why Emacs needs to know about our Window ids.. */
+ /* lord knows why Emacs needs to know about our Window ids.. */
Window window_desc, parent_desc;
char explicit_parent;
struct ns_display_info *display_info;
};
-/* 23: this dummy decl now needed to support TTYs */
+/* this dummy decl needed to support TTYs */
struct x_output
{
unsigned long background_pixel;
#define FRAME_FONTSET(f) ((f)->output_data.ns->fontset)
-/* 23 */
#define FRAME_SMALLEST_CHAR_WIDTH(f) \
(FRAME_NS_DISPLAY_INFO (f)->smallest_char_width)
#define FRAME_SMALLEST_FONT_HEIGHT(f) \
? (min) : (((x)>(max)) ? (max) : (x)))
#define SCREENMAXBOUND(x) (IN_BOUND (-SCREENMAX, x, SCREENMAX))
-/* 23: needed somewhere... */
+/* needed somewhere... */
#define VERTICAL_SCROLL_BAR_WIDTH_TRIM (0)
ns_update_begin (struct frame *f)
/* --------------------------------------------------------------------------
Prepare for a grouped sequence of drawing calls
- 23: external (RIF) call; now split w/ and called before update_window_begin
+ external (RIF) call; whole frame, called before update_window_begin
-------------------------------------------------------------------------- */
{
NSView *view = FRAME_NS_VIEW (f);
ns_update_window_begin (struct window *w)
/* --------------------------------------------------------------------------
Prepare for a grouped sequence of drawing calls
- 23: external (RIF) call; now split with and called after update_begin
+ external (RIF) call; for one window, called after update_begin
-------------------------------------------------------------------------- */
{
struct frame *f = XFRAME (WINDOW_FRAME (w));
int mouse_face_overwritten_p)
/* --------------------------------------------------------------------------
Finished a grouped sequence of drawing calls
- 23: external (RIF) call; now split with and called before update_window_end
+ external (RIF) call; for one window called before update_end
-------------------------------------------------------------------------- */
{
struct ns_display_info *dpyinfo = FRAME_NS_DISPLAY_INFO (XFRAME (w->frame));
ns_update_end (struct frame *f)
/* --------------------------------------------------------------------------
Finished a grouped sequence of drawing calls
- 23: external (RIF) call; now split with and called after update_window_end
+ external (RIF) call; for whole frame, called after update_window_end
-------------------------------------------------------------------------- */
{
NSView *view = FRAME_NS_VIEW (f);
static void
ns_flush (struct frame *f)
/* --------------------------------------------------------------------------
- 23: external (RIF) call
+ external (RIF) call
NS impl is no-op since currently we flush in ns_update_end and elsewhere
-------------------------------------------------------------------------- */
{
}
#endif
- /*23: clipping */
+ /* clipping */
if (r)
{
[[NSGraphicsContext currentContext] saveGraphicsState];
static void
ns_clip_to_row (struct window *w, struct glyph_row *row, int area, BOOL gc)
/* --------------------------------------------------------------------------
- 23: Internal (but parallels other terms): Focus drawing on given row
+ Internal (but parallels other terms): Focus drawing on given row
-------------------------------------------------------------------------- */
{
struct frame *f = XFRAME (WINDOW_FRAME (w));
return 0;
}
- /* 23: FIXME: emacs seems to downcase everything before passing it here,
- which we can work around, except for GRAY, since gray##, where ## is
- decimal between 0 and 99, is also an X11 colorname. */
+ /* FIXME: emacs seems to downcase everything before passing it here,
+ which we can work around, except for GRAY, since gray##, where ## is
+ decimal between 0 and 99, is also an X11 colorname. */
if (name[0] == '#') /* X11 format */
{
hex = name + 1;
ns_defined_color (struct frame *f, char *name, XColor *color_def, int alloc,
char makeIndex)
/* --------------------------------------------------------------------------
- 23: Return 1 if named color found, and set color_def rgb accordingly.
+ Return 1 if named color found, and set color_def rgb accordingly.
If makeIndex and alloc are nonzero put the color in the color_table,
and set color_def pixel to the resulting index.
If makeIndex is zero, set color_def pixel to ARGB.
void
ns_clear_frame_area (struct frame *f, int x, int y, int width, int height)
/* --------------------------------------------------------------------------
- 23: External (RIF): Clear section of frame
+ External (RIF): Clear section of frame
-------------------------------------------------------------------------- */
{
NSRect r = NSMakeRect (x, y, width, height);
static void
ns_scroll_run (struct window *w, struct run *run)
/* --------------------------------------------------------------------------
- 23: External (RIF): Insert or delete n lines at line vpos
+ External (RIF): Insert or delete n lines at line vpos
-------------------------------------------------------------------------- */
{
struct frame *f = XFRAME (w->frame);
static void
ns_after_update_window_line (struct glyph_row *desired_row)
/* --------------------------------------------------------------------------
- 23: External (RIF): preparatory to fringe update after text was updated
+ External (RIF): preparatory to fringe update after text was updated
-------------------------------------------------------------------------- */
{
struct window *w = updated_window;
int x, int y, int width, int height,
int shift_by)
/* --------------------------------------------------------------------------
- 23: External (RIF): copy an area horizontally, don't worry about clearing src
+ External (RIF): copy an area horizontally, don't worry about clearing src
-------------------------------------------------------------------------- */
{
NSRect srcRect = NSMakeRect (x, y, width, height);
static inline void
ns_compute_glyph_string_overhangs (struct glyph_string *s)
/* --------------------------------------------------------------------------
- 23: External (RIF); compute left/right overhang of whole string and set in s
+ External (RIF); compute left/right overhang of whole string and set in s
-------------------------------------------------------------------------- */
{
struct face *face = FACE_FROM_ID (s->f, s->first_glyph->face_id);
ns_draw_fringe_bitmap (struct window *w, struct glyph_row *row,
struct draw_fringe_bitmap_params *p)
/* --------------------------------------------------------------------------
- 23: External (RIF); fringe-related
+ External (RIF); fringe-related
-------------------------------------------------------------------------- */
{
struct frame *f = XFRAME (WINDOW_FRAME (w));
/* --------------------------------------------------------------------------
External (hook): Post an event to ourself and keep reading events until
we read it back again. In effect process all events which were waiting.
- 23: Now we have to manage the event buffer ourselves.
+ From 21+ we have to manage the event buffer ourselves.
-------------------------------------------------------------------------- */
{
struct input_event ev;
}
-
-/* ==========================================================================
-
- Miscellaneous, mainly stubbed-out functions added in 23
-
- ========================================================================== */
-
-
void
x_wm_set_icon_position (struct frame *f, int icon_x, int icon_y)
{
+ /* XXX irrelevant under NS */
}
}
-/* 23: Needed as new part of display engine; this and next define public
- functions in this file (well, many of them, anyway). */
+/* This and next define (many of the) public functions in this file. */
/* x_... are generic versions in xdisp.c that we, and other terms, get away
with using despite presence in the "system dependent" redisplay
interface. In addition, many of the ns_ methods have code that is
static struct redisplay_interface ns_redisplay_interface =
{
ns_frame_parm_handlers,
- x_produce_glyphs, /*generic OK */
- x_write_glyphs, /*generic OK */
- x_insert_glyphs, /*generic OK */
- x_clear_end_of_line, /*generic OK */
- ns_scroll_run, /*23 */
- ns_after_update_window_line, /*23: added */
- ns_update_window_begin, /*23: split from update_begin */
- ns_update_window_end, /*23: split from update_end */
- x_cursor_to, /*generic OK */
+ x_produce_glyphs,
+ x_write_glyphs,
+ x_insert_glyphs,
+ x_clear_end_of_line,
+ ns_scroll_run,
+ ns_after_update_window_line,
+ ns_update_window_begin,
+ ns_update_window_end,
+ x_cursor_to,
ns_flush,
0, /* flush_display_optional */
- x_clear_window_mouse_face, /*generic OK */
- x_get_glyph_overhangs, /*23: generic OK */
- x_fix_overlapping_area, /*generic OK */
- ns_draw_fringe_bitmap, /*23 */
+ x_clear_window_mouse_face,
+ x_get_glyph_overhangs,
+ x_fix_overlapping_area,
+ ns_draw_fringe_bitmap,
0, /* define_fringe_bitmap */ /* FIXME: simplify ns_draw_fringe_bitmap */
0, /* destroy_fringe_bitmap */
- ns_compute_glyph_string_overhangs, /*23 */
- ns_draw_glyph_string, /*23: interface to nsfont.m */
- ns_define_frame_cursor, /*23 */
- ns_clear_frame_area, /*23 */
- ns_draw_window_cursor, /*23: revamped ns_dumpcursor */
+ ns_compute_glyph_string_overhangs,
+ ns_draw_glyph_string, /* interface to nsfont.m */
+ ns_define_frame_cursor,
+ ns_clear_frame_area,
+ ns_draw_window_cursor,
ns_draw_vertical_window_border,
ns_shift_glyphs_for_insert
};
terminal->rif = &ns_redisplay_interface;
terminal->clear_frame_hook = ns_clear_frame;
- terminal->ins_del_lines_hook = 0; /* 23: vestigial? */
- terminal->delete_glyphs_hook = 0; /* 23: vestigial? */
+ terminal->ins_del_lines_hook = 0; /* XXX vestigial? */
+ terminal->delete_glyphs_hook = 0; /* XXX vestigial? */
terminal->ring_bell_hook = ns_ring_bell;
terminal->reset_terminal_modes_hook = ns_reset_terminal_modes;
terminal->set_terminal_modes_hook = ns_set_terminal_modes;
terminal->update_begin_hook = ns_update_begin;
terminal->update_end_hook = ns_update_end;
- terminal->set_terminal_window_hook = NULL; /* 23: vestigial? */
+ terminal->set_terminal_window_hook = NULL; /* XXX vestigial? */
terminal->read_socket_hook = ns_read_socket;
terminal->frame_up_to_date_hook = ns_frame_up_to_date;
terminal->mouse_position_hook = ns_mouse_position;
terminal->frame_rehighlight_hook = ns_frame_rehighlight;
terminal->frame_raise_lower_hook = ns_frame_raise_lower;
- terminal->fullscreen_hook = 0; /*XTfullscreen_hook;//23.50 */
+ terminal->fullscreen_hook = 0; /* see XTfullscreen_hook */
terminal->set_vertical_scroll_bar_hook = ns_set_vertical_scroll_bar;
terminal->condemn_scroll_bars_hook = ns_condemn_scroll_bars;
staticpro (&last_mouse_motion_frame);
last_mouse_motion_frame = Qnil;
- /*23: now apparently we need to tell emacs what modifiers there are.. */
+ /* from 23+ we need to tell emacs what modifiers there are.. */
Qmodifier_value = intern ("modifier-value");
Qalt = intern ("alt");
Fput (Qalt, Qmodifier_value, make_number (alt_modifier));