changeset 100839:03cb6ea90f92

* nsfns.m (x_set_foreground_color, x_set_background_color) (x_set_cursor_color, x_set_icon_name, x_explicitly_set_name) (x_set_title, x_set_icon_type, x_set_cursor_type): Rename to use x_ prefix instead of ns_. Update references. (syms_of_nsfns): Add a FIXME comment. * nsterm.m (x_set_cursor_type): New prototype. (setValuesFromPanel): Use it instead of the old ns_ prefixed name.
author Dan Nicolaescu <dann@ics.uci.edu>
date Fri, 02 Jan 2009 18:58:49 +0000
parents 5deb9f2f65ae
children 94e2c2dbfed1
files src/ChangeLog src/nsfns.m src/nsterm.m
diffstat 3 files changed, 39 insertions(+), 26 deletions(-) [+]
line wrap: on
line diff
--- a/src/ChangeLog	Fri Jan 02 18:35:15 2009 +0000
+++ b/src/ChangeLog	Fri Jan 02 18:58:49 2009 +0000
@@ -1,5 +1,14 @@
 2009-01-02  Dan Nicolaescu  <dann@ics.uci.edu>
 
+	* nsfns.m (x_set_foreground_color, x_set_background_color)
+	(x_set_cursor_color, x_set_icon_name, x_explicitly_set_name)
+	(x_set_title, x_set_icon_type, x_set_cursor_type): Rename to use
+	x_ prefix instead of ns_.  Update references.
+	(syms_of_nsfns): Add a FIXME comment.
+
+	* nsterm.m (x_set_cursor_type): New prototype.
+	(setValuesFromPanel): Use it instead of the old ns_ prefixed name.
+
 	* sysdep.c (system_process_attributes): Provide Qtime and Qctime
 	for Solaris instead of incorrectly providing Qutime and Qcutime.
 
--- a/src/nsfns.m	Fri Jan 02 18:35:15 2009 +0000
+++ b/src/nsfns.m	Fri Jan 02 18:58:49 2009 +0000
@@ -338,7 +338,7 @@
 
 
 static void
-ns_set_foreground_color (struct frame *f, Lisp_Object arg, Lisp_Object oldval)
+x_set_foreground_color (struct frame *f, Lisp_Object arg, Lisp_Object oldval)
 {
   NSColor *col;
 
@@ -363,7 +363,7 @@
 
 
 static void
-ns_set_background_color (struct frame *f, Lisp_Object arg, Lisp_Object oldval)
+x_set_background_color (struct frame *f, Lisp_Object arg, Lisp_Object oldval)
 {
   struct face *face;
   NSColor *col;
@@ -412,7 +412,7 @@
 
 
 static void
-ns_set_cursor_color (struct frame *f, Lisp_Object arg, Lisp_Object oldval)
+x_set_cursor_color (struct frame *f, Lisp_Object arg, Lisp_Object oldval)
 {
   NSColor *col;
 
@@ -435,10 +435,10 @@
 
 
 static void
-ns_set_icon_name (struct frame *f, Lisp_Object arg, Lisp_Object oldval)
+x_set_icon_name (struct frame *f, Lisp_Object arg, Lisp_Object oldval)
 {
   NSView *view = FRAME_NS_VIEW (f);
-  NSTRACE (ns_set_icon_name);
+  NSTRACE (x_set_icon_name);
 
   if (ns_in_resize)
     return;
@@ -581,9 +581,9 @@
    specified a name for the frame; the name will override any set by the
    redisplay code.  */
 static void
-ns_explicitly_set_name (FRAME_PTR f, Lisp_Object arg, Lisp_Object oldval)
+x_explicitly_set_name (FRAME_PTR f, Lisp_Object arg, Lisp_Object oldval)
 {
-  NSTRACE (ns_explicitly_set_name);
+  NSTRACE (x_explicitly_set_name);
   ns_set_name_iconic (f, arg, 1);
   ns_set_name (f, arg, 1);
 }
@@ -614,9 +614,9 @@
    suggesting a new name, which lisp code should override; if
    F->explicit_name is set, ignore the new name; otherwise, set it.  */
 static void
-ns_set_title (struct frame *f, Lisp_Object name, Lisp_Object old_name)
+x_set_title (struct frame *f, Lisp_Object name, Lisp_Object old_name)
 {
-  NSTRACE (ns_set_title);
+  NSTRACE (x_set_title);
   /* Don't change the title if it's already NAME.  */
   if (EQ (name, f->title))
     return;
@@ -844,13 +844,13 @@
 
 
 static void
-ns_set_icon_type (struct frame *f, Lisp_Object arg, Lisp_Object oldval)
+x_set_icon_type (struct frame *f, Lisp_Object arg, Lisp_Object oldval)
 {
   EmacsView *view = FRAME_NS_VIEW (f);
   id image = nil;
   BOOL setMini = YES;
 
-  NSTRACE (ns_set_icon_type);
+  NSTRACE (x_set_icon_type);
 
   if (!NILP (arg) && SYMBOLP (arg))
     {
@@ -926,9 +926,9 @@
     }
 }
 
-/* this is like x_set_cursor_type defined in xfns.c */
+/* This is the same as the xfns.c definition.  */
 void
-ns_set_cursor_type (f, arg, oldval)
+x_set_cursor_type (f, arg, oldval)
      FRAME_PTR f;
      Lisp_Object arg, oldval;
 {
@@ -942,7 +942,7 @@
 /* 23: called to set mouse pointer color, but all other terms use it to
        initialize pointer types (and don't set the color ;) */
 static void
-ns_set_mouse_color (struct frame *f, Lisp_Object arg, Lisp_Object oldval)
+x_set_mouse_color (struct frame *f, Lisp_Object arg, Lisp_Object oldval)
 {
   /* don't think we can do this on Nextstep */
 }
@@ -1019,21 +1019,21 @@
 {
   x_set_autoraise, /* generic OK */
   x_set_autolower, /* generic OK */
-  ns_set_background_color,
+  x_set_background_color,
   0, /* x_set_border_color,  may be impossible under Nextstep */
   0, /* x_set_border_width,  may be impossible under Nextstep */
-  ns_set_cursor_color,
-  ns_set_cursor_type,
+  x_set_cursor_color,
+  x_set_cursor_type,
   x_set_font, /* generic OK */
-  ns_set_foreground_color,
-  ns_set_icon_name,
-  ns_set_icon_type,
+  x_set_foreground_color,
+  x_set_icon_name,
+  x_set_icon_type,
   x_set_internal_border_width, /* generic OK */
   x_set_menu_bar_lines,
-  ns_set_mouse_color,
-  ns_explicitly_set_name,
+  x_set_mouse_color,
+  x_explicitly_set_name,
   x_set_scroll_bar_width, /* generic OK */
-  ns_set_title,
+  x_set_title,
   x_set_unsplittable, /* generic OK */
   x_set_vertical_scroll_bars, /* generic OK */
   x_set_visibility, /* generic OK */
@@ -2657,6 +2657,8 @@
 
   Qnone = intern ("none");
   staticpro (&Qnone);
+  /* FIXME: Because of the typo below, Qbuffered probably never did
+     anything useful, so it might as well be removed. */
   Qbuffered = intern ("bufferd");
   staticpro (&Qbuffered);
   Qfontsize = intern ("fontsize");
--- a/src/nsterm.m	Fri Jan 02 18:35:15 2009 +0000
+++ b/src/nsterm.m	Fri Jan 02 18:58:49 2009 +0000
@@ -297,9 +297,11 @@
   ns_send_appdefined (-1);                                    \
   }
 
+void x_set_cursor_type (struct frame *, Lisp_Object, Lisp_Object);
+
 /* TODO: get rid of need for these forward declarations */
-static void ns_condemn_scroll_bars (struct frame *f),
-            ns_judge_scroll_bars (struct frame *f);
+static void ns_condemn_scroll_bars (struct frame *f);
+static void ns_judge_scroll_bars (struct frame *f);
 
 /* unused variables needed for compatibility reasons */
 int x_use_underline_position_properties, x_underline_at_descent_line;
@@ -6100,7 +6102,7 @@
     }
 
   store_frame_param (frame, Qcursor_type, cursor_type);
-  ns_set_cursor_type(frame, cursor_type, Qnil);  /* FIXME: do only if changed */
+  x_set_cursor_type (frame, cursor_type, Qnil);  /* FIXME: do only if changed */
 
   ns_alternate_modifier = ns_mod_to_lisp (altTag);
   ns_command_modifier = ns_mod_to_lisp (cmdTag);