aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/nsfns.m257
1 files changed, 126 insertions, 131 deletions
diff --git a/src/nsfns.m b/src/nsfns.m
index 72ac1ece4b3..9e4cb61ce11 100644
--- a/src/nsfns.m
+++ b/src/nsfns.m
@@ -135,14 +135,14 @@ check_ns_frame (Lisp_Object frame)
135 f = XFRAME (frame); 135 f = XFRAME (frame);
136 } 136 }
137 if (! FRAME_NS_P (f)) 137 if (! FRAME_NS_P (f))
138 error ("non-NS frame used"); 138 error ("non-Nextstep frame used");
139 return f; 139 return f;
140} 140}
141 141
142 142
143/* Let the user specify an NS display with a frame. 143/* Let the user specify an Nextstep display with a frame.
144 nil stands for the selected frame--or, if that is not an NS frame, 144 nil stands for the selected frame--or, if that is not an Nextstep frame,
145 the first NS display on the list. */ 145 the first Nextstep display on the list. */
146static struct ns_display_info * 146static struct ns_display_info *
147check_ns_display_info (Lisp_Object frame) 147check_ns_display_info (Lisp_Object frame)
148{ 148{
@@ -154,14 +154,14 @@ check_ns_display_info (Lisp_Object frame)
154 else if (ns_display_list != 0) 154 else if (ns_display_list != 0)
155 return ns_display_list; 155 return ns_display_list;
156 else 156 else
157 error ("NS windows are not in use or not initialized"); 157 error ("Nextstep windows are not in use or not initialized");
158 } 158 }
159 else if (INTEGERP (frame)) 159 else if (INTEGERP (frame))
160 { 160 {
161 struct terminal *t = get_terminal (frame, 1); 161 struct terminal *t = get_terminal (frame, 1);
162 162
163 if (t->type != output_ns) 163 if (t->type != output_ns)
164 error ("Terminal %d is not an NS display", XINT (frame)); 164 error ("Terminal %d is not a Nextstep display", XINT (frame));
165 165
166 return t->display_info.ns; 166 return t->display_info.ns;
167 } 167 }
@@ -174,7 +174,7 @@ check_ns_display_info (Lisp_Object frame)
174 CHECK_LIVE_FRAME (frame); 174 CHECK_LIVE_FRAME (frame);
175 f = XFRAME (frame); 175 f = XFRAME (frame);
176 if (! FRAME_NS_P (f)) 176 if (! FRAME_NS_P (f))
177 error ("non-NS frame used"); 177 error ("non-Nextstep frame used");
178 return FRAME_NS_DISPLAY_INFO (f); 178 return FRAME_NS_DISPLAY_INFO (f);
179 } 179 }
180 return NULL; /* shut compiler up */ 180 return NULL; /* shut compiler up */
@@ -972,7 +972,7 @@ ns_set_cursor_type (struct frame *f, Lisp_Object arg, Lisp_Object oldval)
972static void 972static void
973ns_set_mouse_color (struct frame *f, Lisp_Object arg, Lisp_Object oldval) 973ns_set_mouse_color (struct frame *f, Lisp_Object arg, Lisp_Object oldval)
974{ 974{
975 /* don't think we can do this on NS */ 975 /* don't think we can do this on Nextstep */
976} 976}
977 977
978 978
@@ -1014,8 +1014,8 @@ frame_parm_handler ns_frame_parm_handlers[] =
1014 x_set_autoraise, /* generic OK */ 1014 x_set_autoraise, /* generic OK */
1015 x_set_autolower, /* generic OK */ 1015 x_set_autolower, /* generic OK */
1016 ns_set_background_color, 1016 ns_set_background_color,
1017 0, /* x_set_border_color, may be impossible under NS */ 1017 0, /* x_set_border_color, may be impossible under Nextstep */
1018 0, /* x_set_border_width, may be impossible under NS */ 1018 0, /* x_set_border_width, may be impossible under Nextstep */
1019 ns_set_cursor_color, 1019 ns_set_cursor_color,
1020 ns_set_cursor_type, 1020 ns_set_cursor_type,
1021 x_set_font, /* generic OK */ 1021 x_set_font, /* generic OK */
@@ -1046,12 +1046,12 @@ frame_parm_handler ns_frame_parm_handlers[] =
1046 1046
1047DEFUN ("x-create-frame", Fns_create_frame, Sns_create_frame, 1047DEFUN ("x-create-frame", Fns_create_frame, Sns_create_frame,
1048 1, 1, 0, 1048 1, 1, 0,
1049 "Make a new NS window, which is called a \"frame\" in Emacs terms.\n\ 1049 "Make a new Nextstep window, called a \"frame\" in Emacs terms.
1050Return an Emacs frame object representing the X window.\n\ 1050Return an Emacs frame object.
1051ALIST is an alist of frame parameters.\n\ 1051PARMS is an alist of frame parameters.
1052If the parameters specify that the frame should not have a minibuffer,\n\ 1052If the parameters specify that the frame should not have a minibuffer,
1053and do not specify a specific minibuffer window to use,\n\ 1053and do not specify a specific minibuffer window to use,
1054then `default-minibuffer-frame' must be a frame whose minibuffer can\n\ 1054then `default-minibuffer-frame' must be a frame whose minibuffer can
1055be shared by the new frame.") 1055be shared by the new frame.")
1056 (parms) 1056 (parms)
1057 Lisp_Object parms; 1057 Lisp_Object parms;
@@ -1213,7 +1213,7 @@ be shared by the new frame.")
1213 "background", "Background", RES_TYPE_STRING); 1213 "background", "Background", RES_TYPE_STRING);
1214 x_default_parameter (f, parms, Qcursor_color, build_string ("grey"), 1214 x_default_parameter (f, parms, Qcursor_color, build_string ("grey"),
1215 "cursorColor", "CursorColor", RES_TYPE_STRING); 1215 "cursorColor", "CursorColor", RES_TYPE_STRING);
1216 /* FIXME: not suppported yet in NS */ 1216 /* FIXME: not suppported yet in Nextstep */
1217 x_default_parameter (f, parms, Qline_spacing, Qnil, 1217 x_default_parameter (f, parms, Qline_spacing, Qnil,
1218 "lineSpacing", "LineSpacing", RES_TYPE_NUMBER); 1218 "lineSpacing", "LineSpacing", RES_TYPE_NUMBER);
1219 x_default_parameter (f, parms, Qleft_fringe, Qnil, 1219 x_default_parameter (f, parms, Qleft_fringe, Qnil,
@@ -1271,7 +1271,7 @@ be shared by the new frame.")
1271 f->no_split = minibuffer_only || (!EQ (tem, Qunbound) && !EQ (tem, Qnil)); 1271 f->no_split = minibuffer_only || (!EQ (tem, Qunbound) && !EQ (tem, Qnil));
1272 1272
1273 /* NOTE: on other terms, this is done in set_mouse_color, however this 1273 /* NOTE: on other terms, this is done in set_mouse_color, however this
1274 was not getting called under NS */ 1274 was not getting called under Nextstep */
1275 f->output_data.ns->text_cursor = [NSCursor IBeamCursor]; 1275 f->output_data.ns->text_cursor = [NSCursor IBeamCursor];
1276 f->output_data.ns->nontext_cursor = [NSCursor arrowCursor]; 1276 f->output_data.ns->nontext_cursor = [NSCursor arrowCursor];
1277 f->output_data.ns->modeline_cursor = [NSCursor pointingHandCursor]; 1277 f->output_data.ns->modeline_cursor = [NSCursor pointingHandCursor];
@@ -1424,9 +1424,10 @@ DEFUN ("ns-popup-color-panel", Fns_popup_color_panel, Sns_popup_color_panel,
1424 1424
1425 1425
1426DEFUN ("ns-read-file-name", Fns_read_file_name, Sns_read_file_name, 1, 4, 0, 1426DEFUN ("ns-read-file-name", Fns_read_file_name, Sns_read_file_name, 1, 4, 0,
1427 "As read-file-name except that NS panels are used for querying, and\n\ 1427 "Use a graphical panel to read a file name, using prompt PROMPT.
1428args are slightly different. Nil returned if no selection made.\n\ 1428Optional arg DIR, if non-nil, supplies a default directory.
1429Set ISLOAD non-nil if file being read for a save.") 1429Optional arg ISLOAD, if non-nil, means read a file name for saving.
1430Optional arg INIT, if non-nil, provides a default file name to use.")
1430 (prompt, dir, isLoad, init) 1431 (prompt, dir, isLoad, init)
1431 Lisp_Object prompt, dir, isLoad, init; 1432 Lisp_Object prompt, dir, isLoad, init;
1432{ 1433{
@@ -1487,7 +1488,7 @@ Set ISLOAD non-nil if file being read for a save.")
1487 1488
1488 1489
1489DEFUN ("ns-get-resource", Fns_get_resource, Sns_get_resource, 2, 2, 0, 1490DEFUN ("ns-get-resource", Fns_get_resource, Sns_get_resource, 2, 2, 0,
1490 "Return the value of the property NAME of OWNER from the defaults database.\n\ 1491 "Return the value of the property NAME of OWNER from the defaults database.
1491If OWNER is nil, Emacs is assumed.") 1492If OWNER is nil, Emacs is assumed.")
1492 (owner, name) 1493 (owner, name)
1493 Lisp_Object owner, name; 1494 Lisp_Object owner, name;
@@ -1508,14 +1509,13 @@ If OWNER is nil, Emacs is assumed.")
1508 1509
1509 if (value) 1510 if (value)
1510 return build_string (value); 1511 return build_string (value);
1511/*fprintf (stderr, "Nothing found for NS resource '%s'.\n", SDATA (name)); */
1512 return Qnil; 1512 return Qnil;
1513} 1513}
1514 1514
1515 1515
1516DEFUN ("ns-set-resource", Fns_set_resource, Sns_set_resource, 3, 3, 0, 1516DEFUN ("ns-set-resource", Fns_set_resource, Sns_set_resource, 3, 3, 0,
1517 "Set property NAME of OWNER to VALUE, from the defaults database.\n\ 1517 "Set property NAME of OWNER to VALUE, from the defaults database.
1518If OWNER is nil, Emacs is assumed.\n\ 1518If OWNER is nil, Emacs is assumed.
1519If VALUE is nil, the default is removed.") 1519If VALUE is nil, the default is removed.")
1520 (owner, name, value) 1520 (owner, name, value)
1521 Lisp_Object owner, name, value; 1521 Lisp_Object owner, name, value;
@@ -1545,8 +1545,9 @@ If VALUE is nil, the default is removed.")
1545 1545
1546 1546
1547DEFUN ("ns-set-alpha", Fns_set_alpha, Sns_set_alpha, 2, 2, 0, 1547DEFUN ("ns-set-alpha", Fns_set_alpha, Sns_set_alpha, 2, 2, 0,
1548 "Return a color same as given with alpha set to given value\n\ 1548 "Return a color equivalent to COLOR with alpha setting ALPHA.
1549from 0 to 1, where 1 is fully opaque.") 1549The argument ALPHA should be a number between 0 and 1, where 0 is full
1550transparency and 1 is opaque.")
1550 (color, alpha) 1551 (color, alpha)
1551 Lisp_Object color; 1552 Lisp_Object color;
1552 Lisp_Object alpha; 1553 Lisp_Object alpha;
@@ -1572,8 +1573,7 @@ from 0 to 1, where 1 is fully opaque.")
1572DEFUN ("ns-server-max-request-size", Fns_server_max_request_size, 1573DEFUN ("ns-server-max-request-size", Fns_server_max_request_size,
1573 Sns_server_max_request_size, 1574 Sns_server_max_request_size,
1574 0, 1, 0, 1575 0, 1, 0,
1575 "This function is only present for completeness. It does not return\n\ 1576 "This function is a no-op. It is only present for completeness.")
1576a usable result for NS windows.")
1577 (display) 1577 (display)
1578 Lisp_Object display; 1578 Lisp_Object display;
1579{ 1579{
@@ -1585,10 +1585,9 @@ a usable result for NS windows.")
1585 1585
1586 1586
1587DEFUN ("ns-server-vendor", Fns_server_vendor, Sns_server_vendor, 0, 1, 0, 1587DEFUN ("ns-server-vendor", Fns_server_vendor, Sns_server_vendor, 0, 1, 0,
1588 "Returns the vendor ID string of the NS server of display DISPLAY.\n\ 1588 "Return the vendor ID string of Nextstep display server DISPLAY.
1589The optional argument DISPLAY specifies which display to ask about.\n\ 1589DISPLAY should be either a frame or a display name (a string).
1590DISPLAY should be either a frame or a display name (a string).\n\ 1590If omitted or nil, the selected frame's display is used.")
1591If omitted or nil, that stands for the selected frame's display.")
1592 (display) 1591 (display)
1593 Lisp_Object display; 1592 Lisp_Object display;
1594{ 1593{
@@ -1602,11 +1601,10 @@ If omitted or nil, that stands for the selected frame's display.")
1602 1601
1603 1602
1604DEFUN ("ns-server-version", Fns_server_version, Sns_server_version, 0, 1, 0, 1603DEFUN ("ns-server-version", Fns_server_version, Sns_server_version, 0, 1, 0,
1605 "Returns the version number of the NS release of display DISPLAY.\n\ 1604 "Return the version number of Nextstep display server DISPLAY.
1606See also the function `ns-server-vendor'.\n\n\ 1605DISPLAY should be either a frame or a display name (a string).
1607The optional argument DISPLAY specifies which display to ask about.\n\ 1606If omitted or nil, the selected frame's display is used.
1608DISPLAY should be either a frame or a display name (a string).\n\ 1607See also the function `ns-server-vendor'.")
1609If omitted or nil, that stands for the selected frame's display.")
1610 (display) 1608 (display)
1611 Lisp_Object display; 1609 Lisp_Object display;
1612{ 1610{
@@ -1616,10 +1614,9 @@ If omitted or nil, that stands for the selected frame's display.")
1616 1614
1617 1615
1618DEFUN ("ns-display-screens", Fns_display_screens, Sns_display_screens, 0, 1, 0, 1616DEFUN ("ns-display-screens", Fns_display_screens, Sns_display_screens, 0, 1, 0,
1619 "Returns the number of screens on the NS server of display DISPLAY.\n\ 1617 "Return the number of screens on Nextstep display server DISPLAY.
1620The optional argument DISPLAY specifies which display to ask about.\n\ 1618DISPLAY should be a frame, the display name as a string, or a terminal ID.
1621DISPLAY should be either a frame, a display name (a string), or terminal ID.\n\ 1619If omitted or nil, the selected frame's display is used.")
1622If omitted or nil, that stands for the selected frame's display.")
1623 (display) 1620 (display)
1624 Lisp_Object display; 1621 Lisp_Object display;
1625{ 1622{
@@ -1634,10 +1631,9 @@ If omitted or nil, that stands for the selected frame's display.")
1634 1631
1635DEFUN ("ns-display-mm-height", Fns_display_mm_height, Sns_display_mm_height, 1632DEFUN ("ns-display-mm-height", Fns_display_mm_height, Sns_display_mm_height,
1636 0, 1, 0, 1633 0, 1, 0,
1637 "Returns the height in millimeters of the NS display DISPLAY.\n\ 1634 "Return the height of Nextstep display server DISPLAY, in millimeters.
1638The optional argument DISPLAY specifies which display to ask about.\n\ 1635DISPLAY should be a frame, the display name as a string, or a terminal ID.
1639DISPLAY should be either a frame, a display name (a string), or terminal ID.\n\ 1636If omitted or nil, the selected frame's display is used.")
1640If omitted or nil, that stands for the selected frame's display.")
1641 (display) 1637 (display)
1642 Lisp_Object display; 1638 Lisp_Object display;
1643{ 1639{
@@ -1649,10 +1645,9 @@ If omitted or nil, that stands for the selected frame's display.")
1649 1645
1650DEFUN ("ns-display-mm-width", Fns_display_mm_width, Sns_display_mm_width, 1646DEFUN ("ns-display-mm-width", Fns_display_mm_width, Sns_display_mm_width,
1651 0, 1, 0, 1647 0, 1, 0,
1652 "Returns the width in millimeters of the NS display DISPLAY.\n\ 1648 "Return the width of Nextstep display server DISPLAY, in millimeters.
1653The optional argument DISPLAY specifies which display to ask about.\n\ 1649DISPLAY should be a frame, the display name as a string, or a terminal ID.
1654DISPLAY should be either a frame, a display name (a string), or terminal ID.\n\ 1650If omitted or nil, the selected frame's display is used.")
1655If omitted or nil, that stands for the selected frame's display.")
1656 (display) 1651 (display)
1657 Lisp_Object display; 1652 Lisp_Object display;
1658{ 1653{
@@ -1664,12 +1659,10 @@ If omitted or nil, that stands for the selected frame's display.")
1664 1659
1665DEFUN ("ns-display-backing-store", Fns_display_backing_store, 1660DEFUN ("ns-display-backing-store", Fns_display_backing_store,
1666 Sns_display_backing_store, 0, 1, 0, 1661 Sns_display_backing_store, 0, 1, 0,
1667 "Returns an indication of whether NS display DISPLAY does backing store.\n\ 1662 "Return whether the Nexstep display DISPLAY supports backing store.
1668The value may be `buffered', `retained', or `non-retained'.\n\ 1663The value may be `buffered', `retained', or `non-retained'.
1669The optional argument DISPLAY specifies which display to ask about.\n\ 1664DISPLAY should be a frame, the display name as a string, or a terminal ID.
1670DISPLAY should be either a frame, display name (a string), or terminal ID.\n\ 1665If omitted or nil, the selected frame's display is used.")
1671If omitted or nil, that stands for the selected frame's display.\n\
1672Under NS, this may differ for each frame.")
1673 (display) 1666 (display)
1674 Lisp_Object display; 1667 Lisp_Object display;
1675{ 1668{
@@ -1691,12 +1684,11 @@ Under NS, this may differ for each frame.")
1691 1684
1692DEFUN ("ns-display-visual-class", Fns_display_visual_class, 1685DEFUN ("ns-display-visual-class", Fns_display_visual_class,
1693 Sns_display_visual_class, 0, 1, 0, 1686 Sns_display_visual_class, 0, 1, 0,
1694 "Returns the visual class of the NS display DISPLAY.\n\ 1687 "Return the visual class of the Nextstep display server DISPLAY.
1695The value is one of the symbols `static-gray', `gray-scale',\n\ 1688The value is one of the symbols `static-gray', `gray-scale',
1696`static-color', `pseudo-color', `true-color', or `direct-color'.\n\n\ 1689`static-color', `pseudo-color', `true-color', or `direct-color'.
1697The optional argument DISPLAY specifies which display to ask about.\n\ 1690DISPLAY should be a frame, the display name as a string, or a terminal ID.
1698DISPLAY should be either a frame, a display name (a string), or terminal ID.\n\ 1691If omitted or nil, the selected frame's display is used.")
1699If omitted or nil, that stands for the selected frame's display.")
1700 (display) 1692 (display)
1701 Lisp_Object display; 1693 Lisp_Object display;
1702{ 1694{
@@ -1715,18 +1707,17 @@ If omitted or nil, that stands for the selected frame's display.")
1715 else if ( depth == NSBestDepth (NSCalibratedRGBColorSpace, 8, 24, NO, NULL)) 1707 else if ( depth == NSBestDepth (NSCalibratedRGBColorSpace, 8, 24, NO, NULL))
1716 return intern ("direct-color"); 1708 return intern ("direct-color");
1717 else 1709 else
1718 /* color mgmt as far as we do it is really handled by NS itself anyway */ 1710 /* color mgmt as far as we do it is really handled by Nextstep itself anyway */
1719 return intern ("direct-color"); 1711 return intern ("direct-color");
1720} 1712}
1721 1713
1722 1714
1723DEFUN ("ns-display-save-under", Fns_display_save_under, 1715DEFUN ("ns-display-save-under", Fns_display_save_under,
1724 Sns_display_save_under, 0, 1, 0, 1716 Sns_display_save_under, 0, 1, 0,
1725 "Returns t if the NS display DISPLAY supports the save-under feature.\n\ 1717 "Non-nil if the Nextstep display server supports the save-under feature.
1726The optional argument DISPLAY specifies which display to ask about.\n\ 1718The optional argument DISPLAY specifies which display to ask about.
1727DISPLAY should be either a frame, a display name (a string), or terminal ID.\n\ 1719DISPLAY should be a frame, the display name as a string, or a terminal ID.
1728If omitted or nil, that stands for the selected frame's display.\n\ 1720If omitted or nil, the selected frame's display is used.")
1729Under NS, this may differ for each frame.")
1730 (display) 1721 (display)
1731 Lisp_Object display; 1722 Lisp_Object display;
1732{ 1723{
@@ -1748,8 +1739,8 @@ Under NS, this may differ for each frame.")
1748 1739
1749 1740
1750DEFUN ("ns-open-connection", Fns_open_connection, Sns_open_connection, 1741DEFUN ("ns-open-connection", Fns_open_connection, Sns_open_connection,
1751 1, 3, 0, "Open a connection to a NS server.\n\ 1742 1, 3, 0, "Open a connection to a Nextstep display server.
1752DISPLAY is the name of the display to connect to.\n\ 1743DISPLAY is the name of the display to connect to.
1753Optional arguments XRM-STRING and MUST-SUCCEED are currently ignored.") 1744Optional arguments XRM-STRING and MUST-SUCCEED are currently ignored.")
1754 (display, resource_string, must_succeed) 1745 (display, resource_string, must_succeed)
1755 Lisp_Object display, resource_string, must_succeed; 1746 Lisp_Object display, resource_string, must_succeed;
@@ -1787,9 +1778,8 @@ Optional arguments XRM-STRING and MUST-SUCCEED are currently ignored.")
1787 1778
1788 1779
1789DEFUN ("ns-close-connection", Fns_close_connection, Sns_close_connection, 1780DEFUN ("ns-close-connection", Fns_close_connection, Sns_close_connection,
1790 1, 1, 0, "Close the connection to the current NS server.\n\ 1781 1, 1, 0, "Close the connection to the current Nextstep display server.
1791The second argument DISPLAY is currently ignored, but nil would stand for\n\ 1782The second argument DISPLAY is currently ignored.")
1792the selected frame's display.")
1793 (display) 1783 (display)
1794 Lisp_Object display; 1784 Lisp_Object display;
1795{ 1785{
@@ -1827,9 +1817,9 @@ DEFUN ("ns-hide-others", Fns_hide_others, Sns_hide_others,
1827} 1817}
1828 1818
1829DEFUN ("ns-hide-emacs", Fns_hide_emacs, Sns_hide_emacs, 1819DEFUN ("ns-hide-emacs", Fns_hide_emacs, Sns_hide_emacs,
1830 1, 1, 0, "If ON is non-nil, the entire emacs application is hidden.\n\ 1820 1, 1, 0, "If ON is non-nil, the entire emacs application is hidden.
1831Otherwise if emacs is hidden, it is unhidden.\n\ 1821Otherwise if emacs is hidden, it is unhidden.
1832If ON is equal to 'activate, emacs is unhidden and becomes\n\ 1822If ON is equal to `activate', emacs is unhidden and becomes
1833the active application.") 1823the active application.")
1834 (on) 1824 (on)
1835 Lisp_Object on; 1825 Lisp_Object on;
@@ -1916,9 +1906,10 @@ The font names are _NOT_ X names. */)
1916 1906
1917 1907
1918DEFUN ("ns-font-name", Fns_font_name, Sns_font_name, 1, 1, 0, 1908DEFUN ("ns-font-name", Fns_font_name, Sns_font_name, 1, 1, 0,
1919 "Determine font postscript or family name from a font name string or\n\ 1909 "Determine font postscript or family name for font NAME.
1920XLFD string. If string contains fontset' and not 'fontset-startup' it is\n\ 1910NAME should be a string containing either the font name or an XLFD
1921left alone.") 1911font descriptor. If string contains `fontset' and not
1912`fontset-startup', it is left alone.")
1922 (name) 1913 (name)
1923 Lisp_Object name; 1914 Lisp_Object name;
1924{ 1915{
@@ -1936,7 +1927,7 @@ left alone.")
1936 1927
1937 1928
1938DEFUN ("ns-list-colors", Fns_list_colors, Sns_list_colors, 0, 1, 0, 1929DEFUN ("ns-list-colors", Fns_list_colors, Sns_list_colors, 0, 1, 0,
1939 "Return a list of all available colors.\n\ 1930 "Return a list of all available colors.
1940The optional argument FRAME is currently ignored.") 1931The optional argument FRAME is currently ignored.")
1941 (frame) 1932 (frame)
1942 Lisp_Object frame; 1933 Lisp_Object frame;
@@ -1949,7 +1940,7 @@ The optional argument FRAME is currently ignored.")
1949 { 1940 {
1950 CHECK_FRAME (frame); 1941 CHECK_FRAME (frame);
1951 if (! FRAME_NS_P (XFRAME (frame))) 1942 if (! FRAME_NS_P (XFRAME (frame)))
1952 error ("non-NS frame used in `ns-list-colors'"); 1943 error ("non-Nextstep frame used in `ns-list-colors'");
1953 } 1944 }
1954 1945
1955 BLOCK_INPUT; 1946 BLOCK_INPUT;
@@ -1977,7 +1968,7 @@ The optional argument FRAME is currently ignored.")
1977 1968
1978 1969
1979DEFUN ("ns-list-services", Fns_list_services, Sns_list_services, 0, 0, 0, 1970DEFUN ("ns-list-services", Fns_list_services, Sns_list_services, 0, 0, 0,
1980 "List NS services by querying NSApp.") 1971 "List available Nextstep services by querying NSApp.")
1981 () 1972 ()
1982{ 1973{
1983 Lisp_Object ret = Qnil; 1974 Lisp_Object ret = Qnil;
@@ -2027,8 +2018,10 @@ DEFUN ("ns-list-services", Fns_list_services, Sns_list_services, 0, 0, 0,
2027 2018
2028 2019
2029DEFUN ("ns-perform-service", Fns_perform_service, Sns_perform_service, 2020DEFUN ("ns-perform-service", Fns_perform_service, Sns_perform_service,
2030 2, 2, 0, "Perform NS SERVICE on SEND which is either a string or nil.\n\ 2021 2, 2, 0, "Perform Nextstep SERVICE on SEND.
2031Returns result of service as string or nil if no result.") 2022SEND should be either a string or nil.
2023The return value is the result of the service, as string, or nil if
2024there was no result.")
2032 (service, send) 2025 (service, send)
2033 Lisp_Object service, send; 2026 Lisp_Object service, send;
2034{ 2027{
@@ -2057,7 +2050,7 @@ Returns result of service as string or nil if no result.")
2057 2050
2058DEFUN ("ns-convert-utf8-nfd-to-nfc", Fns_convert_utf8_nfd_to_nfc, 2051DEFUN ("ns-convert-utf8-nfd-to-nfc", Fns_convert_utf8_nfd_to_nfc,
2059 Sns_convert_utf8_nfd_to_nfc, 1, 1, 0, 2052 Sns_convert_utf8_nfd_to_nfc, 1, 1, 0,
2060 "Composes character sequences in UTF-8 normal form NFD string STR to produce a normal (composed normal form NFC) string.") 2053 "Return an NFC string that matches the UTF-8 NFD string STR.")
2061 (str) 2054 (str)
2062 Lisp_Object str; 2055 Lisp_Object str;
2063{ 2056{
@@ -2193,7 +2186,7 @@ x_sync (Lisp_Object frame)
2193 2186
2194 2187
2195DEFUN ("xw-color-defined-p", Fns_color_defined_p, Sns_color_defined_p, 1, 2, 0, 2188DEFUN ("xw-color-defined-p", Fns_color_defined_p, Sns_color_defined_p, 1, 2, 0,
2196 "Return t if the current NS display supports the color named COLOR.\n\ 2189 "Return t if the current Nextstep display supports the color COLOR.
2197The optional argument FRAME is currently ignored.") 2190The optional argument FRAME is currently ignored.")
2198 (color, frame) 2191 (color, frame)
2199 Lisp_Object color, frame; 2192 Lisp_Object color, frame;
@@ -2205,9 +2198,9 @@ The optional argument FRAME is currently ignored.")
2205 2198
2206 2199
2207DEFUN ("xw-color-values", Fns_color_values, Sns_color_values, 1, 2, 0, 2200DEFUN ("xw-color-values", Fns_color_values, Sns_color_values, 1, 2, 0,
2208 "Return a description of the color named COLOR.\n\ 2201 "Return a description of the color named COLOR.
2209The value is a list of integer RGBA values--(RED GREEN BLUE ALPHA).\n\ 2202The value is a list of integer RGBA values--(RED GREEN BLUE ALPHA).
2210These values appear to range from 0 to 65280; white is (65280 65280 65280 0).\n\ 2203These values appear to range from 0 to 65280; white is (65280 65280 65280 0).
2211The optional argument FRAME is currently ignored.") 2204The optional argument FRAME is currently ignored.")
2212 (color, frame) 2205 (color, frame)
2213 Lisp_Object color, frame; 2206 Lisp_Object color, frame;
@@ -2234,9 +2227,9 @@ The optional argument FRAME is currently ignored.")
2234 2227
2235 2228
2236DEFUN ("xw-display-color-p", Fxw_display_color_p, Sxw_display_color_p, 0, 1, 0, 2229DEFUN ("xw-display-color-p", Fxw_display_color_p, Sxw_display_color_p, 0, 1, 0,
2237 "Return t if the NS display supports color.\n\ 2230 "Return t if the Nextstep display supports color.
2238The optional argument DISPLAY specifies which display to ask about.\n\ 2231The optional argument DISPLAY specifies which display to ask about.
2239DISPLAY should be either a frame, a display name (a string), or terminal ID.\n\ 2232DISPLAY should be either a frame, a display name (a string), or terminal ID.
2240If omitted or nil, that stands for the selected frame's display.") 2233If omitted or nil, that stands for the selected frame's display.")
2241 (display) 2234 (display)
2242 Lisp_Object display; 2235 Lisp_Object display;
@@ -2255,10 +2248,10 @@ If omitted or nil, that stands for the selected frame's display.")
2255 2248
2256DEFUN ("x-display-grayscale-p", Fx_display_grayscale_p, 2249DEFUN ("x-display-grayscale-p", Fx_display_grayscale_p,
2257 Sx_display_grayscale_p, 0, 1, 0, 2250 Sx_display_grayscale_p, 0, 1, 0,
2258 "Return t if the NS display supports shades of gray.\n\ 2251 "Return t if the Nextstep display supports shades of gray.
2259Note that color displays do support shades of gray.\n\ 2252Note that color displays do support shades of gray.
2260The optional argument DISPLAY specifies which display to ask about.\n\ 2253The optional argument DISPLAY specifies which display to ask about.
2261DISPLAY should be either a frame, a display name (a string), or terminal ID.\n\ 2254DISPLAY should be either a frame, a display name (a string), or terminal ID.
2262If omitted or nil, that stands for the selected frame's display.") 2255If omitted or nil, that stands for the selected frame's display.")
2263 (display) 2256 (display)
2264 Lisp_Object display; 2257 Lisp_Object display;
@@ -2273,9 +2266,9 @@ If omitted or nil, that stands for the selected frame's display.")
2273 2266
2274DEFUN ("x-display-pixel-width", Fns_display_pixel_width, Sns_display_pixel_width, 2267DEFUN ("x-display-pixel-width", Fns_display_pixel_width, Sns_display_pixel_width,
2275 0, 1, 0, 2268 0, 1, 0,
2276 "Returns the width in pixels of the NS display DISPLAY.\n\ 2269 "Returns the width in pixels of the Nextstep display DISPLAY.
2277The optional argument DISPLAY specifies which display to ask about.\n\ 2270The optional argument DISPLAY specifies which display to ask about.
2278DISPLAY should be either a frame, a display name (a string), or terminal ID.\n\ 2271DISPLAY should be either a frame, a display name (a string), or terminal ID.
2279If omitted or nil, that stands for the selected frame's display.") 2272If omitted or nil, that stands for the selected frame's display.")
2280 (display) 2273 (display)
2281 Lisp_Object display; 2274 Lisp_Object display;
@@ -2287,9 +2280,9 @@ If omitted or nil, that stands for the selected frame's display.")
2287 2280
2288DEFUN ("x-display-pixel-height", Fns_display_pixel_height, 2281DEFUN ("x-display-pixel-height", Fns_display_pixel_height,
2289 Sns_display_pixel_height, 0, 1, 0, 2282 Sns_display_pixel_height, 0, 1, 0,
2290 "Returns the height in pixels of the NS display DISPLAY.\n\ 2283 "Returns the height in pixels of the Nextstep display DISPLAY.
2291The optional argument DISPLAY specifies which display to ask about.\n\ 2284The optional argument DISPLAY specifies which display to ask about.
2292DISPLAY should be either a frame, a display name (a string), or terminal ID.\n\ 2285DISPLAY should be either a frame, a display name (a string), or terminal ID.
2293If omitted or nil, that stands for the selected frame's display.") 2286If omitted or nil, that stands for the selected frame's display.")
2294 (display) 2287 (display)
2295 Lisp_Object display; 2288 Lisp_Object display;
@@ -2300,12 +2293,14 @@ If omitted or nil, that stands for the selected frame's display.")
2300 2293
2301DEFUN ("display-usable-bounds", Fns_display_usable_bounds, 2294DEFUN ("display-usable-bounds", Fns_display_usable_bounds,
2302 Sns_display_usable_bounds, 0, 1, 0, 2295 Sns_display_usable_bounds, 0, 1, 0,
2303 "Returns a list of integers in form (left top width height) describing the \ 2296 "Return the bounds of the usable part of the screen.
2304usable screen area excluding reserved areas such as the Mac menu and doc, or \ 2297The return value is a list of integers (LEFT TOP WIDTH HEIGHT), which
2305the Windows task bar.\n \ 2298are the boundaries of the usable part of the screen, excluding areas
2306The optional argument DISPLAY specifies which display to ask about.\n\ 2299reserved for the Mac menu, dock, and so forth.
2307DISPLAY should be either a frame, a display name (a string), or terminal ID.\n\ 2300
2308If omitted or nil, that stands for the selected frame's display.") 2301The screen queried corresponds to DISPLAY, which should be either a
2302frame, a display name (a string), or terminal ID. If omitted or nil,
2303that stands for the selected frame's display.")
2309 (display) 2304 (display)
2310 Lisp_Object display; 2305 Lisp_Object display;
2311{ 2306{
@@ -2326,9 +2321,9 @@ If omitted or nil, that stands for the selected frame's display.")
2326 2321
2327DEFUN ("x-display-planes", Fx_display_planes, Sns_display_planes, 2322DEFUN ("x-display-planes", Fx_display_planes, Sns_display_planes,
2328 0, 1, 0, 2323 0, 1, 0,
2329 "Returns the number of bitplanes of the NS display DISPLAY.\n\ 2324 "Returns the number of bitplanes of the Nextstep display DISPLAY.
2330The optional argument DISPLAY specifies which display to ask about.\n\ 2325The optional argument DISPLAY specifies which display to ask about.
2331DISPLAY should be either a frame, a display name (a string), or terminal ID.\n\ 2326DISPLAY should be either a frame, a display name (a string), or terminal ID.
2332If omitted or nil, that stands for the selected frame's display.") 2327If omitted or nil, that stands for the selected frame's display.")
2333 (display) 2328 (display)
2334 Lisp_Object display; 2329 Lisp_Object display;
@@ -2341,9 +2336,9 @@ If omitted or nil, that stands for the selected frame's display.")
2341 2336
2342DEFUN ("x-display-color-cells", Fns_display_color_cells, 2337DEFUN ("x-display-color-cells", Fns_display_color_cells,
2343 Sns_display_color_cells, 0, 1, 0, 2338 Sns_display_color_cells, 0, 1, 0,
2344 "Returns the number of color cells of the NS display DISPLAY.\n\ 2339 "Returns the number of color cells of the Nextstep display DISPLAY.
2345The optional argument DISPLAY specifies which display to ask about.\n\ 2340The optional argument DISPLAY specifies which display to ask about.
2346DISPLAY should be either a frame, a display name (a string), or terminal ID.\n\ 2341DISPLAY should be either a frame, a display name (a string), or terminal ID.
2347If omitted or nil, that stands for the selected frame's display.") 2342If omitted or nil, that stands for the selected frame's display.")
2348 (display) 2343 (display)
2349 Lisp_Object display; 2344 Lisp_Object display;
@@ -2522,23 +2517,23 @@ syms_of_nsfns ()
2522 staticpro (&Qfontsize); 2517 staticpro (&Qfontsize);
2523 2518
2524 DEFVAR_LISP ("ns-icon-type-alist", &Vns_icon_type_alist, 2519 DEFVAR_LISP ("ns-icon-type-alist", &Vns_icon_type_alist,
2525 "Alist of elements (REGEXP . IMAGE) for images of icons associated to\n\ 2520 "Alist of elements (REGEXP . IMAGE) for images of icons associated to frames.
2526frames. If the title of a frame matches REGEXP, then IMAGE.tiff is\n\ 2521If the title of a frame matches REGEXP, then IMAGE.tiff is
2527selected as the image of the icon representing the frame when it's\n\ 2522selected as the image of the icon representing the frame when it's
2528miniaturized. If an element is t, then Emacs tries to select an icon\n\ 2523miniaturized. If an element is t, then Emacs tries to select an icon
2529based on the filetype of the visited file.\n\ 2524based on the filetype of the visited file.
2530\n\ 2525
2531The images have to be installed in a folder called English.lproj in the\n\ 2526The images have to be installed in a folder called English.lproj in the
2532Emacs.app folder. You have to restart Emacs after installing new icons.\n\ 2527Emacs folder. You have to restart Emacs after installing new icons.
2533\n\ 2528
2534Example: Install an icon Gnus.tiff and execute the following code\n\ 2529Example: Install an icon Gnus.tiff and execute the following code
2535\n\ 2530
2536 (setq ns-icon-type-alist\n\ 2531 (setq ns-icon-type-alist
2537 (append ns-icon-type-alist\n\ 2532 (append ns-icon-type-alist
2538 '((\"^\\\\*\\\\(Group\\\\*$\\\\|Summary \\\\|Article\\\\*$\\\\)\"\n\ 2533 '((\"^\\\\*\\\\(Group\\\\*$\\\\|Summary \\\\|Article\\\\*$\\\\)\"
2539 . \"Gnus\"))))\n\ 2534 . \"Gnus\"))))
2540\n\ 2535
2541When you miniaturize a Group, Summary or Article frame, Gnus.tiff will\n\ 2536When you miniaturize a Group, Summary or Article frame, Gnus.tiff will
2542be used as the image of the icon representing the frame."); 2537be used as the image of the icon representing the frame.");
2543 Vns_icon_type_alist = Fcons (Qt, Qnil); 2538 Vns_icon_type_alist = Fcons (Qt, Qnil);
2544 2539