aboutsummaryrefslogtreecommitdiffstats
path: root/src/frame.c
diff options
context:
space:
mode:
authorAdrian Robert2008-07-15 18:15:18 +0000
committerAdrian Robert2008-07-15 18:15:18 +0000
commitedfda78355c5528eee489fa8a7f9c73bf8e734f2 (patch)
tree78d2414d9791e1efc17ec9b35b438ae35602340a /src/frame.c
parent1391cd548782097e34d7856ec4f20ca90bdf2c26 (diff)
downloademacs-edfda78355c5528eee489fa8a7f9c73bf8e734f2.tar.gz
emacs-edfda78355c5528eee489fa8a7f9c73bf8e734f2.zip
merging Emacs.app (NeXTstep port)
Diffstat (limited to 'src/frame.c')
-rw-r--r--src/frame.c41
1 files changed, 35 insertions, 6 deletions
diff --git a/src/frame.c b/src/frame.c
index a4fa29bff49..617d9233889 100644
--- a/src/frame.c
+++ b/src/frame.c
@@ -32,6 +32,9 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
32#ifdef MAC_OS 32#ifdef MAC_OS
33#include "macterm.h" 33#include "macterm.h"
34#endif 34#endif
35#ifdef HAVE_NS
36#include "nsterm.h"
37#endif
35#include "buffer.h" 38#include "buffer.h"
36/* These help us bind and responding to switch-frame events. */ 39/* These help us bind and responding to switch-frame events. */
37#include "commands.h" 40#include "commands.h"
@@ -72,7 +75,7 @@ Lisp_Object Vframe_alpha_lower_limit;
72Lisp_Object Qframep, Qframe_live_p; 75Lisp_Object Qframep, Qframe_live_p;
73Lisp_Object Qicon, Qmodeline; 76Lisp_Object Qicon, Qmodeline;
74Lisp_Object Qonly; 77Lisp_Object Qonly;
75Lisp_Object Qx, Qw32, Qmac, Qpc; 78Lisp_Object Qx, Qw32, Qmac, Qpc, Qns;
76Lisp_Object Qvisible; 79Lisp_Object Qvisible;
77Lisp_Object Qdisplay_type; 80Lisp_Object Qdisplay_type;
78Lisp_Object Qbackground_mode; 81Lisp_Object Qbackground_mode;
@@ -203,7 +206,8 @@ DEFUN ("framep", Fframep, Sframep, 1, 1, 0,
203Value is t for a termcap frame (a character-only terminal), 206Value is t for a termcap frame (a character-only terminal),
204`x' for an Emacs frame that is really an X window, 207`x' for an Emacs frame that is really an X window,
205`w32' for an Emacs frame that is a window on MS-Windows display, 208`w32' for an Emacs frame that is a window on MS-Windows display,
206`mac' for an Emacs frame on a Macintosh display, 209`mac' for an Emacs frame on a Macintosh 8/9 X-Carbon display,
210`ns' for an Emacs frame on a GNUstep or Macintosh Cocoa display,
207`pc' for a direct-write MS-DOS frame. 211`pc' for a direct-write MS-DOS frame.
208See also `frame-live-p'. */) 212See also `frame-live-p'. */)
209 (object) 213 (object)
@@ -224,6 +228,8 @@ See also `frame-live-p'. */)
224 return Qpc; 228 return Qpc;
225 case output_mac: 229 case output_mac:
226 return Qmac; 230 return Qmac;
231 case output_ns:
232 return Qns;
227 default: 233 default:
228 abort (); 234 abort ();
229 } 235 }
@@ -551,6 +557,11 @@ make_initial_frame (void)
551 FRAME_CAN_HAVE_SCROLL_BARS (f) = 0; 557 FRAME_CAN_HAVE_SCROLL_BARS (f) = 0;
552 FRAME_VERTICAL_SCROLL_BAR_TYPE (f) = vertical_scroll_bar_none; 558 FRAME_VERTICAL_SCROLL_BAR_TYPE (f) = vertical_scroll_bar_none;
553 559
560#ifdef CANNOT_DUMP
561 if (!noninteractive)
562 init_frame_faces (f);
563#endif
564
554 return f; 565 return f;
555} 566}
556 567
@@ -880,6 +891,12 @@ do_switch_frame (frame, track, for_deletion)
880 891
881 Fselect_window (XFRAME (frame)->selected_window, Qnil); 892 Fselect_window (XFRAME (frame)->selected_window, Qnil);
882 893
894#ifdef NS_IMPL_COCOA
895 /* term gets no other notification of this */
896 if (for_deletion)
897 Fraise_frame(Qnil);
898#endif
899
883 /* We want to make sure that the next event generates a frame-switch 900 /* We want to make sure that the next event generates a frame-switch
884 event to the appropriate frame. This seems kludgy to me, but 901 event to the appropriate frame. This seems kludgy to me, but
885 before you take it out, make sure that evaluating something like 902 before you take it out, make sure that evaluating something like
@@ -2969,8 +2986,9 @@ x_set_frame_parameters (f, alist)
2969 2986
2970 old_value = get_frame_param (f, prop); 2987 old_value = get_frame_param (f, prop);
2971 fullscreen_is_being_set |= EQ (prop, Qfullscreen); 2988 fullscreen_is_being_set |= EQ (prop, Qfullscreen);
2972 2989#ifndef HAVE_NS /* PENDING: ensure font attrs change goes through */
2973 if (NILP (Fequal (val, old_value))) 2990 if (NILP (Fequal (val, old_value)))
2991#endif
2974 { 2992 {
2975 store_frame_param (f, prop, val); 2993 store_frame_param (f, prop, val);
2976 2994
@@ -3949,6 +3967,9 @@ x_get_arg (dpyinfo, alist, param, attribute, class, type)
3949 case RES_TYPE_BOOLEAN: 3967 case RES_TYPE_BOOLEAN:
3950 tem = Fdowncase (tem); 3968 tem = Fdowncase (tem);
3951 if (!strcmp (SDATA (tem), "on") 3969 if (!strcmp (SDATA (tem), "on")
3970#ifdef HAVE_NS
3971 || !strcmp(SDATA(tem), "yes")
3972#endif
3952 || !strcmp (SDATA (tem), "true")) 3973 || !strcmp (SDATA (tem), "true"))
3953 return Qt; 3974 return Qt;
3954 else 3975 else
@@ -3964,9 +3985,15 @@ x_get_arg (dpyinfo, alist, param, attribute, class, type)
3964 Lisp_Object lower; 3985 Lisp_Object lower;
3965 lower = Fdowncase (tem); 3986 lower = Fdowncase (tem);
3966 if (!strcmp (SDATA (lower), "on") 3987 if (!strcmp (SDATA (lower), "on")
3988#ifdef HAVE_NS
3989 || !strcmp(SDATA(lower), "yes")
3990#endif
3967 || !strcmp (SDATA (lower), "true")) 3991 || !strcmp (SDATA (lower), "true"))
3968 return Qt; 3992 return Qt;
3969 else if (!strcmp (SDATA (lower), "off") 3993 else if (!strcmp (SDATA (lower), "off")
3994#ifdef HAVE_NS
3995 || !strcmp(SDATA(lower), "no")
3996#endif
3970 || !strcmp (SDATA (lower), "false")) 3997 || !strcmp (SDATA (lower), "false"))
3971 return Qnil; 3998 return Qnil;
3972 else 3999 else
@@ -4366,6 +4393,8 @@ syms_of_frame ()
4366 staticpro (&Qpc); 4393 staticpro (&Qpc);
4367 Qmac = intern ("mac"); 4394 Qmac = intern ("mac");
4368 staticpro (&Qmac); 4395 staticpro (&Qmac);
4396 Qns = intern ("ns");
4397 staticpro (&Qns);
4369 Qvisible = intern ("visible"); 4398 Qvisible = intern ("visible");
4370 staticpro (&Qvisible); 4399 staticpro (&Qvisible);
4371 Qbuffer_predicate = intern ("buffer-predicate"); 4400 Qbuffer_predicate = intern ("buffer-predicate");
@@ -4473,8 +4502,8 @@ Setting this variable does not affect existing frames, only new ones. */);
4473 DEFVAR_LISP ("default-frame-scroll-bars", &Vdefault_frame_scroll_bars, 4502 DEFVAR_LISP ("default-frame-scroll-bars", &Vdefault_frame_scroll_bars,
4474 doc: /* Default position of scroll bars on this window-system. */); 4503 doc: /* Default position of scroll bars on this window-system. */);
4475#ifdef HAVE_WINDOW_SYSTEM 4504#ifdef HAVE_WINDOW_SYSTEM
4476#if defined(HAVE_NTGUI) || defined(MAC_OS) 4505#if defined(HAVE_NTGUI) || defined(MAC_OS) || defined(NS_IMPL_COCOA)
4477 /* MS-Windows has scroll bars on the right by default. */ 4506 /* MS-Windows and Mac OS X have scroll bars on the right by default. */
4478 Vdefault_frame_scroll_bars = Qright; 4507 Vdefault_frame_scroll_bars = Qright;
4479#else 4508#else
4480 Vdefault_frame_scroll_bars = Qleft; 4509 Vdefault_frame_scroll_bars = Qleft;
@@ -4540,7 +4569,7 @@ You should set this variable to tell Emacs how your window manager
4540handles focus, since there is no way in general for Emacs to find out 4569handles focus, since there is no way in general for Emacs to find out
4541automatically. */); 4570automatically. */);
4542#ifdef HAVE_WINDOW_SYSTEM 4571#ifdef HAVE_WINDOW_SYSTEM
4543#if defined(HAVE_NTGUI) || defined(MAC_OS) 4572#if defined(HAVE_NTGUI) || defined(MAC_OS) || defined(HAVE_NS)
4544 focus_follows_mouse = 0; 4573 focus_follows_mouse = 0;
4545#else 4574#else
4546 focus_follows_mouse = 1; 4575 focus_follows_mouse = 1;