diff options
| author | Richard M. Stallman | 1999-09-03 18:39:38 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 1999-09-03 18:39:38 +0000 |
| commit | 574a1a902e1166d94c0267bba737a419f22f449d (patch) | |
| tree | 977743ade4136dcff43c845546da15e66369ce09 /src | |
| parent | 052062e0d8e39f43bceb9747d8812781f0357b72 (diff) | |
| download | emacs-574a1a902e1166d94c0267bba737a419f22f449d.tar.gz emacs-574a1a902e1166d94c0267bba737a419f22f449d.zip | |
(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.
Diffstat (limited to 'src')
| -rw-r--r-- | src/frame.c | 54 |
1 files changed, 51 insertions, 3 deletions
diff --git a/src/frame.c b/src/frame.c index a650d077d41..bfd4b2d4919 100644 --- a/src/frame.c +++ b/src/frame.c | |||
| @@ -41,6 +41,11 @@ Boston, MA 02111-1307, USA. */ | |||
| 41 | #include "dosfns.h" | 41 | #include "dosfns.h" |
| 42 | #endif | 42 | #endif |
| 43 | 43 | ||
| 44 | #ifdef macintosh | ||
| 45 | extern struct mac_output *NewMacWindow (); | ||
| 46 | extern void DisposeMacWindow (struct mac_output *); | ||
| 47 | #endif | ||
| 48 | |||
| 44 | /* Evaluate this expression to rebuild the section of syms_of_frame | 49 | /* Evaluate this expression to rebuild the section of syms_of_frame |
| 45 | that initializes and staticpros the symbols declared below. Note | 50 | that initializes and staticpros the symbols declared below. Note |
| 46 | that Emacs 18 has a bug that keeps C-x C-e from being able to | 51 | that Emacs 18 has a bug that keeps C-x C-e from being able to |
| @@ -90,6 +95,7 @@ Lisp_Object Qwidth; | |||
| 90 | Lisp_Object Qx; | 95 | Lisp_Object Qx; |
| 91 | Lisp_Object Qw32; | 96 | Lisp_Object Qw32; |
| 92 | Lisp_Object Qpc; | 97 | Lisp_Object Qpc; |
| 98 | Lisp_Object Qmac; | ||
| 93 | Lisp_Object Qvisible; | 99 | Lisp_Object Qvisible; |
| 94 | Lisp_Object Qbuffer_predicate; | 100 | Lisp_Object Qbuffer_predicate; |
| 95 | Lisp_Object Qbuffer_list; | 101 | Lisp_Object Qbuffer_list; |
| @@ -132,6 +138,8 @@ syms_of_frame_1 () | |||
| 132 | staticpro (&Qw32); | 138 | staticpro (&Qw32); |
| 133 | Qpc = intern ("pc"); | 139 | Qpc = intern ("pc"); |
| 134 | staticpro (&Qpc); | 140 | staticpro (&Qpc); |
| 141 | Qmac = intern ("mac"); | ||
| 142 | staticpro (&Qmac); | ||
| 135 | Qvisible = intern ("visible"); | 143 | Qvisible = intern ("visible"); |
| 136 | staticpro (&Qvisible); | 144 | staticpro (&Qvisible); |
| 137 | Qbuffer_predicate = intern ("buffer-predicate"); | 145 | Qbuffer_predicate = intern ("buffer-predicate"); |
| @@ -244,6 +252,8 @@ See also `frame-live-p'.") | |||
| 244 | return Qw32; | 252 | return Qw32; |
| 245 | case output_msdos_raw: | 253 | case output_msdos_raw: |
| 246 | return Qpc; | 254 | return Qpc; |
| 255 | case output_mac: | ||
| 256 | return Qmac; | ||
| 247 | default: | 257 | default: |
| 248 | abort (); | 258 | abort (); |
| 249 | } | 259 | } |
| @@ -539,9 +549,27 @@ make_terminal_frame () | |||
| 539 | #ifdef MSDOS | 549 | #ifdef MSDOS |
| 540 | f->output_data.x = &the_only_x_display; | 550 | f->output_data.x = &the_only_x_display; |
| 541 | f->output_method = output_msdos_raw; | 551 | f->output_method = output_msdos_raw; |
| 542 | #else /* not MSDOS */ | 552 | #endif /* MSDOS */ |
| 553 | |||
| 554 | #ifdef macintosh | ||
| 555 | f->output_data.mac = NewMacWindow(f); | ||
| 556 | f->output_data.mac->background_pixel = 0xffffff; | ||
| 557 | f->output_data.mac->foreground_pixel = 0; | ||
| 558 | f->output_data.mac->n_param_faces = 0; | ||
| 559 | f->output_data.mac->n_computed_faces = 0; | ||
| 560 | f->output_data.mac->size_computed_faces = 0; | ||
| 561 | f->output_method = output_mac; | ||
| 562 | f->auto_raise = 1; | ||
| 563 | f->auto_lower = 1; | ||
| 564 | init_frame_faces (f); | ||
| 565 | #endif /* macintosh */ | ||
| 566 | |||
| 567 | #ifndef MSDOS | ||
| 568 | #ifndef macintosh | ||
| 543 | f->output_data.nothing = 1; /* Nonzero means frame isn't deleted. */ | 569 | f->output_data.nothing = 1; /* Nonzero means frame isn't deleted. */ |
| 544 | #endif | 570 | #endif |
| 571 | #endif | ||
| 572 | |||
| 545 | if (!noninteractive) | 573 | if (!noninteractive) |
| 546 | init_frame_faces (f); | 574 | init_frame_faces (f); |
| 547 | return f; | 575 | return f; |
| @@ -558,18 +586,24 @@ Note that changing the size of one terminal frame automatically affects all.") | |||
| 558 | Lisp_Object parms; | 586 | Lisp_Object parms; |
| 559 | { | 587 | { |
| 560 | struct frame *f; | 588 | struct frame *f; |
| 561 | Lisp_Object frame; | 589 | Lisp_Object frame, tem; |
| 562 | Lisp_Object tem; | ||
| 563 | 590 | ||
| 564 | #ifdef MSDOS | 591 | #ifdef MSDOS |
| 565 | if (selected_frame->output_method != output_msdos_raw) | 592 | if (selected_frame->output_method != output_msdos_raw) |
| 566 | abort (); | 593 | abort (); |
| 594 | #else /* not MSDOS */ | ||
| 595 | |||
| 596 | #ifdef macintosh | ||
| 597 | if (selected_frame->output_method != output_mac) | ||
| 598 | error ("Not running on a Macintosh screen; cannot make a new Macintosh frame"); | ||
| 567 | #else | 599 | #else |
| 568 | if (selected_frame->output_method != output_termcap) | 600 | if (selected_frame->output_method != output_termcap) |
| 569 | error ("Not using an ASCII terminal now; cannot make a new ASCII frame"); | 601 | error ("Not using an ASCII terminal now; cannot make a new ASCII frame"); |
| 570 | #endif | 602 | #endif |
| 603 | #endif /* not MSDOS */ | ||
| 571 | 604 | ||
| 572 | f = make_terminal_frame (); | 605 | f = make_terminal_frame (); |
| 606 | |||
| 573 | change_frame_size (f, FRAME_HEIGHT (selected_frame), | 607 | change_frame_size (f, FRAME_HEIGHT (selected_frame), |
| 574 | FRAME_WIDTH (selected_frame), 0, 0, 0); | 608 | FRAME_WIDTH (selected_frame), 0, 0, 0); |
| 575 | adjust_glyphs (f); | 609 | adjust_glyphs (f); |
| @@ -1224,6 +1258,14 @@ but if the second optional argument FORCE is non-nil, you may do so.") | |||
| 1224 | x_destroy_window (f); | 1258 | x_destroy_window (f); |
| 1225 | #endif | 1259 | #endif |
| 1226 | 1260 | ||
| 1261 | /* Done by x_destroy_window above already */ | ||
| 1262 | #if 0 | ||
| 1263 | #ifdef macintosh | ||
| 1264 | if (FRAME_MAC_P (f)) | ||
| 1265 | DisposeMacWindow (f->output_data.mac); | ||
| 1266 | #endif | ||
| 1267 | #endif | ||
| 1268 | |||
| 1227 | f->output_data.nothing = 0; | 1269 | f->output_data.nothing = 0; |
| 1228 | 1270 | ||
| 1229 | /* If we've deleted the last_nonminibuf_frame, then try to find | 1271 | /* If we've deleted the last_nonminibuf_frame, then try to find |
| @@ -2029,6 +2071,12 @@ so that `frame-parameters' will return them.") | |||
| 2029 | IT_set_frame_parameters (f, alist); | 2071 | IT_set_frame_parameters (f, alist); |
| 2030 | else | 2072 | else |
| 2031 | #endif | 2073 | #endif |
| 2074 | #ifdef macintosh | ||
| 2075 | if (FRAME_MAC_P (f)) | ||
| 2076 | mac_set_frame_parameters (f, alist); | ||
| 2077 | else | ||
| 2078 | #endif | ||
| 2079 | |||
| 2032 | { | 2080 | { |
| 2033 | int length = XINT (Flength (alist)); | 2081 | int length = XINT (Flength (alist)); |
| 2034 | int i; | 2082 | int i; |