aboutsummaryrefslogtreecommitdiffstats
path: root/src/nsfns.m
diff options
context:
space:
mode:
authorAdrian Robert2008-10-22 12:51:29 +0000
committerAdrian Robert2008-10-22 12:51:29 +0000
commitcb83c00bd13b63c0d0752698e4ad441968bc04ac (patch)
tree5d084c901b9b4d0962875f80be6d6351b92de1bb /src/nsfns.m
parent20a360544d7e9f11e2fb2eed73e7f5e6a0d152bb (diff)
downloademacs-cb83c00bd13b63c0d0752698e4ad441968bc04ac.tar.gz
emacs-cb83c00bd13b63c0d0752698e4ad441968bc04ac.zip
* lisp/version.el (emacs-version): Change '*Step' to 'NS' for consistency with other documentation. * src/nsfns.m (ns_appkit_version): New function. (x-server-version): Use it. (syms_of_nsfns): Define ns-version-string here, not nsterm.m. (x-server-vendor): Don't check_ns(). * nsterm.m (syms_of_nsterm): Drop ns-version-string.
Diffstat (limited to 'src/nsfns.m')
-rw-r--r--src/nsfns.m45
1 files changed, 35 insertions, 10 deletions
diff --git a/src/nsfns.m b/src/nsfns.m
index f14851b698f..459c058f7ca 100644
--- a/src/nsfns.m
+++ b/src/nsfns.m
@@ -86,7 +86,10 @@ char panelOK = 0;
86 86
87/* Alist of elements (REGEXP . IMAGE) for images of icons associated 87/* Alist of elements (REGEXP . IMAGE) for images of icons associated
88 to frames.*/ 88 to frames.*/
89Lisp_Object Vns_icon_type_alist; 89static Lisp_Object Vns_icon_type_alist;
90
91/* Toolkit version support. */
92static Lisp_Object Vns_version_string;
90 93
91EmacsTooltip *ns_tooltip; 94EmacsTooltip *ns_tooltip;
92 95
@@ -950,6 +953,25 @@ ns_set_mouse_color (struct frame *f, Lisp_Object arg, Lisp_Object oldval)
950} 953}
951 954
952 955
956#define Str(x) #x
957#define Xstr(x) Str(x)
958
959static Lisp_Object
960ns_appkit_version ()
961{
962 char tmp[80];
963
964#ifdef NS_IMPL_GNUSTEP
965 sprintf(tmp, "gnustep-gui-%s", Xstr(GNUSTEP_GUI_VERSION));
966#elif defined(NS_IMPL_COCOA)
967 sprintf(tmp, "apple-appkit-%.2f", NSAppKitVersionNumber);
968#else
969 tmp = "ns-unknown";
970#endif
971 return build_string (tmp);
972}
973
974
953static void 975static void
954x_icon (struct frame *f, Lisp_Object parms) 976x_icon (struct frame *f, Lisp_Object parms)
955/* -------------------------------------------------------------------------- 977/* --------------------------------------------------------------------------
@@ -1019,6 +1041,13 @@ frame_parm_handler ns_frame_parm_handlers[] =
1019}; 1041};
1020 1042
1021 1043
1044
1045/* ==========================================================================
1046
1047 Lisp definitions
1048
1049 ========================================================================== */
1050
1022DEFUN ("x-create-frame", Fx_create_frame, Sx_create_frame, 1051DEFUN ("x-create-frame", Fx_create_frame, Sx_create_frame,
1023 1, 1, 0, 1052 1, 1, 0,
1024 doc: /* Make a new Nextstep window, called a \"frame\" in Emacs terms. 1053 doc: /* Make a new Nextstep window, called a \"frame\" in Emacs terms.
@@ -1321,12 +1350,6 @@ be shared by the new frame. */)
1321} 1350}
1322 1351
1323 1352
1324/* ==========================================================================
1325
1326 Lisp definitions
1327
1328 ========================================================================== */
1329
1330DEFUN ("x-focus-frame", Fx_focus_frame, Sx_focus_frame, 1, 1, 0, 1353DEFUN ("x-focus-frame", Fx_focus_frame, Sx_focus_frame, 1, 1, 0,
1331 doc: /* Set the input focus to FRAME. 1354 doc: /* Set the input focus to FRAME.
1332FRAME nil means use the selected frame. */) 1355FRAME nil means use the selected frame. */)
@@ -1575,7 +1598,6 @@ If omitted or nil, the selected frame's display is used. */)
1575 (display) 1598 (display)
1576 Lisp_Object display; 1599 Lisp_Object display;
1577{ 1600{
1578 check_ns ();
1579#ifdef NS_IMPL_GNUSTEP 1601#ifdef NS_IMPL_GNUSTEP
1580 return build_string ("GNU"); 1602 return build_string ("GNU");
1581#else 1603#else
@@ -1592,8 +1614,7 @@ See also the function `ns-server-vendor'. */)
1592 (display) 1614 (display)
1593 Lisp_Object display; 1615 Lisp_Object display;
1594{ 1616{
1595 /* FIXME: return GUI version on GNUstep, ?? on OS X */ 1617 return ns_appkit_version ();
1596 return build_string ("1.0");
1597} 1618}
1598 1619
1599 1620
@@ -2640,6 +2661,10 @@ When you miniaturize a Group, Summary or Article frame, Gnus.tiff will
2640be used as the image of the icon representing the frame. */); 2661be used as the image of the icon representing the frame. */);
2641 Vns_icon_type_alist = Fcons (Qt, Qnil); 2662 Vns_icon_type_alist = Fcons (Qt, Qnil);
2642 2663
2664 DEFVAR_LISP ("ns-version-string", &Vns_version_string,
2665 doc: /* Toolkit version for NS Windowing. */);
2666 Vns_version_string = ns_appkit_version ();
2667
2643 defsubr (&Sns_read_file_name); 2668 defsubr (&Sns_read_file_name);
2644 defsubr (&Sns_get_resource); 2669 defsubr (&Sns_get_resource);
2645 defsubr (&Sns_set_resource); 2670 defsubr (&Sns_set_resource);