Mercurial > emacs
changeset 25523:9e9eeb68482e
(Fframep) [macintosh]: Handle mac frame type.
(syms_of_frame_1): Initialize Qmac.
(make_terminal_frame) [macintosh]: Initialize output_data.mac fields.
(Fmake_terminal_frame) [macintosh]: Add an alternate error check.
(Fmodify_frame_parameters) [macintosh]: Call
mac_set_frame_parameter in macterm.c.
author | Richard M. Stallman <rms@gnu.org> |
---|---|
date | Fri, 03 Sep 1999 18:39:38 +0000 |
parents | c675d8210bda |
children | 095548b9a36c |
files | src/frame.c |
diffstat | 1 files changed, 51 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/src/frame.c Fri Sep 03 18:29:30 1999 +0000 +++ b/src/frame.c Fri Sep 03 18:39:38 1999 +0000 @@ -41,6 +41,11 @@ #include "dosfns.h" #endif +#ifdef macintosh +extern struct mac_output *NewMacWindow (); +extern void DisposeMacWindow (struct mac_output *); +#endif + /* Evaluate this expression to rebuild the section of syms_of_frame that initializes and staticpros the symbols declared below. Note that Emacs 18 has a bug that keeps C-x C-e from being able to @@ -90,6 +95,7 @@ Lisp_Object Qx; Lisp_Object Qw32; Lisp_Object Qpc; +Lisp_Object Qmac; Lisp_Object Qvisible; Lisp_Object Qbuffer_predicate; Lisp_Object Qbuffer_list; @@ -132,6 +138,8 @@ staticpro (&Qw32); Qpc = intern ("pc"); staticpro (&Qpc); + Qmac = intern ("mac"); + staticpro (&Qmac); Qvisible = intern ("visible"); staticpro (&Qvisible); Qbuffer_predicate = intern ("buffer-predicate"); @@ -244,6 +252,8 @@ return Qw32; case output_msdos_raw: return Qpc; + case output_mac: + return Qmac; default: abort (); } @@ -539,9 +549,27 @@ #ifdef MSDOS f->output_data.x = &the_only_x_display; f->output_method = output_msdos_raw; -#else /* not MSDOS */ +#endif /* MSDOS */ + +#ifdef macintosh + f->output_data.mac = NewMacWindow(f); + f->output_data.mac->background_pixel = 0xffffff; + f->output_data.mac->foreground_pixel = 0; + f->output_data.mac->n_param_faces = 0; + f->output_data.mac->n_computed_faces = 0; + f->output_data.mac->size_computed_faces = 0; + f->output_method = output_mac; + f->auto_raise = 1; + f->auto_lower = 1; + init_frame_faces (f); +#endif /* macintosh */ + +#ifndef MSDOS +#ifndef macintosh f->output_data.nothing = 1; /* Nonzero means frame isn't deleted. */ #endif +#endif + if (!noninteractive) init_frame_faces (f); return f; @@ -558,18 +586,24 @@ Lisp_Object parms; { struct frame *f; - Lisp_Object frame; - Lisp_Object tem; + Lisp_Object frame, tem; #ifdef MSDOS if (selected_frame->output_method != output_msdos_raw) abort (); +#else /* not MSDOS */ + +#ifdef macintosh + if (selected_frame->output_method != output_mac) + error ("Not running on a Macintosh screen; cannot make a new Macintosh frame"); #else if (selected_frame->output_method != output_termcap) error ("Not using an ASCII terminal now; cannot make a new ASCII frame"); #endif +#endif /* not MSDOS */ f = make_terminal_frame (); + change_frame_size (f, FRAME_HEIGHT (selected_frame), FRAME_WIDTH (selected_frame), 0, 0, 0); adjust_glyphs (f); @@ -1224,6 +1258,14 @@ x_destroy_window (f); #endif +/* Done by x_destroy_window above already */ +#if 0 +#ifdef macintosh + if (FRAME_MAC_P (f)) + DisposeMacWindow (f->output_data.mac); +#endif +#endif + f->output_data.nothing = 0; /* If we've deleted the last_nonminibuf_frame, then try to find @@ -2029,6 +2071,12 @@ IT_set_frame_parameters (f, alist); else #endif +#ifdef macintosh + if (FRAME_MAC_P (f)) + mac_set_frame_parameters (f, alist); + else +#endif + { int length = XINT (Flength (alist)); int i;