/* Functions for the NeXT/Open/GNUstep and MacOSX window system.
-Copyright (C) 1989, 1992-1994, 2005-2006, 2008-2013 Free Software
+Copyright (C) 1989, 1992-1994, 2005-2006, 2008-2014 Free Software
Foundation, Inc.
This file is part of GNU Emacs.
#ifdef NS_IMPL_COCOA
#include <IOKit/graphics/IOGraphicsLib.h>
+#if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5
+#include "macfont.h"
+#endif
#endif
#if 0
struct frame *sf = XFRAME (selected_frame);
if (FRAME_NS_P (sf) && FRAME_LIVE_P (sf))
- dpyinfo = FRAME_NS_DISPLAY_INFO (sf);
+ dpyinfo = FRAME_DISPLAY_INFO (sf);
else if (x_display_list != 0)
dpyinfo = x_display_list;
else
dpyinfo = ns_display_info_for_name (object);
else
{
- FRAME_PTR f = decode_window_system_frame (object);
- dpyinfo = FRAME_NS_DISPLAY_INFO (f);
+ struct frame *f = decode_window_system_frame (object);
+ dpyinfo = FRAME_DISPLAY_INFO (f);
}
return dpyinfo;
struct ns_display_info *
ns_display_info_for_name (Lisp_Object name)
{
- Lisp_Object names;
struct ns_display_info *dpyinfo;
CHECK_STRING (name);
- for (dpyinfo = x_display_list, names = ns_display_name_list;
- dpyinfo;
- dpyinfo = dpyinfo->next, names = XCDR (names))
- {
- Lisp_Object tem;
- tem = Fstring_equal (XCAR (XCAR (names)), name);
- if (!NILP (tem))
- return dpyinfo;
- }
+ for (dpyinfo = x_display_list; dpyinfo; dpyinfo = dpyinfo->next)
+ if (!NILP (Fstring_equal (XCAR (dpyinfo->name_list_element), name)))
+ return dpyinfo;
- error ("Emacs for OpenStep does not yet support multi-display.");
+ error ("Emacs for Nextstep does not yet support multi-display");
Fx_open_connection (name, Qnil, Qnil);
dpyinfo = x_display_list;
if (dpyinfo == 0)
- error ("OpenStep on %s not responding.\n", SDATA (name));
+ error ("Display on %s not responding.\n", SDATA (name));
return dpyinfo;
}
if (!NILP (f->title))
arg = f->title;
else
- /* explicit name and no icon-name -> explicit_name */
+ /* Explicit name and no icon-name -> explicit_name. */
if (f->explicit_name)
arg = f->name;
else
{
- /* no explicit name and no icon-name ->
- name has to be rebuild from icon_title_format */
- windows_or_buffers_changed++;
+ /* No explicit name and no icon-name ->
+ name has to be rebuild from icon_title_format. */
+ windows_or_buffers_changed = 62;
return;
}
}
/* Don't change the name if it's already NAME. */
- if ([[view window] miniwindowTitle] &&
- ([[[view window] miniwindowTitle]
+ if ([[view window] miniwindowTitle]
+ && ([[[view window] miniwindowTitle]
isEqualToString: [NSString stringWithUTF8String:
- SSDATA (arg)]]))
+ SSDATA (arg)]]))
return;
[[view window] setMiniwindowTitle:
}
static void
-ns_set_name_internal (FRAME_PTR f, Lisp_Object name)
+ns_set_name_internal (struct frame *f, Lisp_Object name)
{
struct gcpro gcpro1;
Lisp_Object encoded_name, encoded_icon_name;
str = [NSString stringWithUTF8String: SSDATA (encoded_icon_name)];
- if ([[view window] miniwindowTitle] &&
- ! [[[view window] miniwindowTitle] isEqualToString: str])
+ if ([[view window] miniwindowTitle]
+ && ! [[[view window] miniwindowTitle] isEqualToString: str])
[[view window] setMiniwindowTitle: str];
}
/* If we're switching from explicit to implicit, we had better
update the mode lines and thereby update the title. */
if (f->explicit_name && NILP (name))
- update_mode_lines = 1;
+ update_mode_lines = 21;
f->explicit_name = ! NILP (name);
}
return;
if (NILP (name))
- name = build_string([ns_app_name UTF8String]);
+ name = build_string ([ns_app_name UTF8String]);
else
CHECK_STRING (name);
fset_name (f, name);
- /* title overrides explicit name */
+ /* Title overrides explicit name. */
if (! NILP (f->title))
name = f->title;
specified a name for the frame; the name will override any set by the
redisplay code. */
static void
-x_explicitly_set_name (FRAME_PTR f, Lisp_Object arg, Lisp_Object oldval)
+x_explicitly_set_name (struct frame *f, Lisp_Object arg, Lisp_Object oldval)
{
NSTRACE (x_explicitly_set_name);
ns_set_name (f, arg, 1);
name; names set this way will never override names set by the user's
lisp code. */
void
-x_implicitly_set_name (FRAME_PTR f, Lisp_Object arg, Lisp_Object oldval)
+x_implicitly_set_name (struct frame *f, Lisp_Object arg, Lisp_Object oldval)
{
NSTRACE (x_implicitly_set_name);
if (EQ (name, f->title))
return;
- update_mode_lines = 1;
+ update_mode_lines = 22;
fset_title (f, name);
}
}
- x_set_window_size (f, 0, f->text_cols, f->text_lines);
+ x_set_window_size (f, 0, f->text_cols, f->text_lines, 0);
}
ns_lisp_to_cursor_type (Lisp_Object arg)
{
char *str;
- if (XTYPE (arg) == Lisp_String)
+ if (STRINGP (arg))
str = SSDATA (arg);
- else if (XTYPE (arg) == Lisp_Symbol)
+ else if (SYMBOLP (arg))
str = SSDATA (SYMBOL_NAME (arg));
else return -1;
if (!strcmp (str, "box")) return FILLED_BOX_CURSOR;
/* This is the same as the xfns.c definition. */
static void
-x_set_cursor_type (FRAME_PTR f, Lisp_Object arg, Lisp_Object oldval)
+x_set_cursor_type (struct frame *f, Lisp_Object arg, Lisp_Object oldval)
{
set_frame_cursor_types (f, arg);
-
- /* Make sure the cursor gets redrawn. */
- cursor_type_changed = 1;
}
-\f
/* called to set mouse pointer color, but all other terms use it to
initialize pointer types (and don't set the color ;) */
static Lisp_Object
ns_appkit_version_str (void)
{
- char tmp[80];
+ char tmp[256];
#ifdef NS_IMPL_GNUSTEP
sprintf(tmp, "gnustep-gui-%s", Xstr(GNUSTEP_GUI_VERSION));
#elif defined (NS_IMPL_COCOA)
- sprintf(tmp, "apple-appkit-%.2f", NSAppKitVersionNumber);
+ NSString *osversion
+ = [[NSProcessInfo processInfo] operatingSystemVersionString];
+ sprintf(tmp, "appkit-%.2f %s",
+ NSAppKitVersionNumber,
+ [osversion UTF8String]);
#else
tmp = "ns-unknown";
#endif
x_set_icon_name,
x_set_icon_type,
x_set_internal_border_width, /* generic OK */
+ 0, /* x_set_right_divider_width */
+ 0, /* x_set_bottom_divider_width */
x_set_menu_bar_lines,
x_set_mouse_color,
x_explicitly_set_name,
/* Handler for signals raised during x_create_frame.
FRAME is the frame which is partially constructed. */
-static Lisp_Object
+static void
unwind_create_frame (Lisp_Object frame)
{
struct frame *f = XFRAME (frame);
display is disconnected after the frame has become official, but
before x_create_frame removes the unwind protect. */
if (!FRAME_LIVE_P (f))
- return Qnil;
+ return;
/* If frame is ``official'', nothing to do. */
if (NILP (Fmemq (frame, Vframe_list)))
{
#if defined GLYPH_DEBUG && defined ENABLE_CHECKING
- struct ns_display_info *dpyinfo = FRAME_X_DISPLAY_INFO (f);
+ struct ns_display_info *dpyinfo = FRAME_DISPLAY_INFO (f);
#endif
x_free_frame_resources (f);
/* Check that reference counts are indeed correct. */
eassert (dpyinfo->terminal->image_cache->refcount == image_cache_refcount);
#endif
- return Qt;
}
-
- return Qnil;
}
/*
};
int i;
- for (i = 0; i < sizeof (r)/sizeof (r[0]); ++i)
+ for (i = 0; i < ARRAYELTS (r); ++i)
{
if (NILP (Fassq (r[i].tem, parms)))
{
Lisp_Object frame, tem;
Lisp_Object name;
int minibuffer_only = 0;
- int window_prompting = 0;
+ long window_prompting = 0;
int width, height;
- ptrdiff_t count = specpdl_ptr - specpdl;
struct gcpro gcpro1, gcpro2, gcpro3, gcpro4;
Lisp_Object display;
struct ns_display_info *dpyinfo = NULL;
if (! STRINGP (f->icon_name))
fset_icon_name (f, Qnil);
- FRAME_NS_DISPLAY_INFO (f) = dpyinfo;
+ FRAME_DISPLAY_INFO (f) = dpyinfo;
+
+ dynwind_begin ();
- /* With FRAME_NS_DISPLAY_INFO set up, this unwind-protect is safe. */
+ /* With FRAME_DISPLAY_INFO set up, this unwind-protect is safe. */
record_unwind_protect (unwind_create_frame, frame);
f->output_data.ns->window_desc = desc_ctr++;
}
else
{
- f->output_data.ns->parent_desc = FRAME_NS_DISPLAY_INFO (f)->root_window;
+ f->output_data.ns->parent_desc = FRAME_DISPLAY_INFO (f)->root_window;
f->output_data.ns->explicit_parent = 0;
}
}
block_input ();
+
+#ifdef NS_IMPL_COCOA
+#if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5
+ if (CTGetCoreTextVersion != NULL
+ && CTGetCoreTextVersion () >= kCTVersionNumber10_5)
+ mac_register_font_driver (f);
+#endif
+#endif
register_font_driver (&nsfont_driver, f);
+
x_default_parameter (f, parms, Qfont_backend, Qnil,
"fontBackend", "FontBackend", RES_TYPE_STRING);
x_default_parameter (f, parms, Qfontsize,
make_number (0 /*(int)[font pointSize]*/),
"fontSize", "FontSize", RES_TYPE_NUMBER);
+ // Remove ' Regular', not handled by backends.
+ char *fontname = xstrdup ([[font displayName] UTF8String]);
+ int len = strlen (fontname);
+ if (len > 8 && strcmp (fontname + len - 8, " Regular") == 0)
+ fontname[len-8] = '\0';
x_default_parameter (f, parms, Qfont,
- build_string ([[font fontName] UTF8String]),
+ build_string (fontname),
"font", "Font", RES_TYPE_STRING);
+ xfree (fontname);
}
unblock_input ();
init_frame_faces (f);
+ /* Read comment about this code in corresponding place in xfns.c. */
+ width = FRAME_TEXT_WIDTH (f);
+ height = FRAME_TEXT_HEIGHT (f);
+ FRAME_TEXT_HEIGHT (f) = 0;
+ SET_FRAME_WIDTH (f, 0);
+ change_frame_size (f, width, height, 1, 0, 0, 1);
+
/* The resources controlling the menu-bar and tool-bar are
processed specially at startup, and reflected in the mode
variables; ignore them here. */
f->output_data.ns->hand_cursor = [NSCursor pointingHandCursor];
f->output_data.ns->hourglass_cursor = [NSCursor disappearingItemCursor];
f->output_data.ns->horizontal_drag_cursor = [NSCursor resizeLeftRightCursor];
- FRAME_NS_DISPLAY_INFO (f)->vertical_scroll_bar_cursor
+ f->output_data.ns->vertical_drag_cursor = [NSCursor resizeUpDownCursor];
+ FRAME_DISPLAY_INFO (f)->vertical_scroll_bar_cursor
= [NSCursor arrowCursor];
f->output_data.ns->current_pointer = f->output_data.ns->text_cursor;
x_default_parameter (f, parms, Qfullscreen, Qnil,
"fullscreen", "Fullscreen", RES_TYPE_SYMBOL);
- width = FRAME_COLS (f);
- height = FRAME_LINES (f);
-
- SET_FRAME_COLS (f, 0);
- FRAME_LINES (f) = 0;
- change_frame_size (f, height, width, 1, 0, 0);
+ width = FRAME_TEXT_WIDTH (f);
+ height = FRAME_TEXT_HEIGHT (f);
+ FRAME_TEXT_HEIGHT (f) = 0;
+ SET_FRAME_WIDTH (f, 0);
+ change_frame_size (f, width, height, 1, 0, 0, 1);
if (! f->output_data.ns->explicit_parent)
{
and similar functions. */
Vwindow_list = Qnil;
- return unbind_to (count, frame);
+ dynwind_end ();
+ return frame;
}
-
-DEFUN ("x-focus-frame", Fx_focus_frame, Sx_focus_frame, 1, 1, 0,
- doc: /* Set the input focus to FRAME.
-FRAME nil means use the selected frame. */)
- (Lisp_Object frame)
+void
+x_focus_frame (struct frame *f)
{
- struct frame *f = decode_window_system_frame (frame);
- struct ns_display_info *dpyinfo = FRAME_NS_DISPLAY_INFO (f);
+ struct ns_display_info *dpyinfo = FRAME_DISPLAY_INFO (f);
if (dpyinfo->x_focus_frame != f)
{
[[view window] makeKeyAndOrderFront: view];
unblock_input ();
}
-
- return Qnil;
}
{
struct frame *f = decode_window_system_frame (frame);
id fm = [NSFontManager sharedFontManager];
-
- [fm setSelectedFont: ((struct nsfont_info *)f->output_data.ns->font)->nsfont
- isMultiple: NO];
+ struct font *font = f->output_data.ns->font;
+ NSFont *nsfont;
+ if (EQ (font->driver->type, Qns))
+ nsfont = ((struct nsfont_info *)font)->nsfont;
+#if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5
+ else
+ nsfont = (NSFont *) macfont_get_nsctfont (font);
+#endif
+ [fm setSelectedFont: nsfont isMultiple: NO];
[fm orderFrontFontPanel: NSApp];
return Qnil;
}
if (dpyinfo == 0)
{
if (!NILP (must_succeed))
- fatal ("OpenStep on %s not responding.\n",
+ fatal ("Display on %s not responding.\n",
SSDATA (display));
else
- error ("OpenStep on %s not responding.\n",
+ error ("Display on %s not responding.\n",
SSDATA (display));
}
doc: /* Return the list of display names that Emacs has connections to. */)
(void)
{
- Lisp_Object tail, result;
+ Lisp_Object result = Qnil;
+ struct ns_display_info *ndi;
- result = Qnil;
- for (tail = ns_display_name_list; CONSP (tail); tail = XCDR (tail))
- result = Fcons (XCAR (XCAR (tail)), result);
+ for (ndi = x_display_list; ndi; ndi = ndi->next)
+ result = Fcons (XCAR (ndi->name_list_element), result);
return result;
}
ns_string_to_pasteboard (pb, send);
if (NSPerformService (svcName, pb) == NO)
- Fsignal (Qquit, Fcons (build_string ("service not available"), Qnil));
+ Fsignal (Qquit, list1 (build_string ("service not available")));
if ([[pb types] count] == 0)
return build_string ("");
/* TODO: If GNUstep ever implements precomposedStringWithCanonicalMapping,
remove this. */
NSString *utfStr;
+ Lisp_Object ret = Qnil;
+ NSAutoreleasePool *pool;
CHECK_STRING (str);
+ pool = [[NSAutoreleasePool alloc] init];
utfStr = [NSString stringWithUTF8String: SSDATA (str)];
#ifdef NS_IMPL_COCOA
+ if (utfStr)
utfStr = [utfStr precomposedStringWithCanonicalMapping];
#endif
- return build_string ([utfStr UTF8String]);
+ if (utfStr)
+ {
+ const char *cstr = [utfStr UTF8String];
+ if (cstr)
+ ret = build_string (cstr);
+ }
+
+ [pool release];
+ if (NILP (ret))
+ error ("Invalid UTF-8");
+
+ return ret;
}
returnDescriptor = [scriptObject executeAndReturnError: &errorDict];
[scriptObject release];
-
*result = Qnil;
if (returnDescriptor != NULL)
Lisp_Object result;
int status;
NSEvent *nxev;
+ struct input_event ev;
CHECK_STRING (script);
check_window_system (NULL);
// If there are other events, the event loop may exit. Keep running
// until the script has been handled. */
+ ns_init_events (&ev);
while (! NILP (as_script))
[NSApp run];
+ ns_finish_events ();
status = as_status;
as_status = 0;
wid - 1) / wid;
}
-
-extern const char *x_get_string_resource (XrmDatabase, char *, char *);
-
-
/* terms impl this instead of x-get-resource directly */
-const char *
-x_get_string_resource (XrmDatabase rdb, char *name, char *class)
+char *
+x_get_string_resource (XrmDatabase rdb, const char *name, const char *class)
{
/* remove appname prefix; TODO: allow for !="Emacs" */
- char *toCheck = class + (!strncmp (class, "Emacs.", 6) ? 6 : 0);
- const char *res;
+ const char *res, *toCheck = class + (!strncmp (class, "Emacs.", 6) ? 6 : 0);
+
check_window_system (NULL);
if (inhibit_x_resources)
return NULL;
res = ns_get_defaults_value (toCheck);
- return !res ? NULL :
- (!c_strncasecmp (res, "YES", 3) ? "true" :
- (!c_strncasecmp (res, "NO", 2) ? "false" : res));
+ return (!res ? NULL :
+ (!c_strncasecmp (res, "YES", 3) ? "true" :
+ (!c_strncasecmp (res, "NO", 2) ? "false" : (char *) res)));
}
Lisp_Object
x_get_focus_frame (struct frame *frame)
{
- struct ns_display_info *dpyinfo = FRAME_NS_DISPLAY_INFO (frame);
+ struct ns_display_info *dpyinfo = FRAME_DISPLAY_INFO (frame);
Lisp_Object nsfocus;
if (!dpyinfo->x_focus_frame)
return nsfocus;
}
-
-int
-x_pixel_width (struct frame *f)
-{
- return FRAME_PIXEL_WIDTH (f);
-}
-
-
-int
-x_pixel_height (struct frame *f)
-{
- return FRAME_PIXEL_HEIGHT (f);
-}
-
-
-void
-x_sync (struct frame *f)
-{
- /* XXX Not implemented XXX */
- return;
-}
-
-
-
/* ==========================================================================
Lisp definitions that, for whatever reason, we can't alias as 'ns-XXX'.
if (ns_lisp_to_color (color, &col))
return Qnil;
- [[col colorUsingColorSpaceName: NSCalibratedRGBColorSpace]
+ [[col colorUsingDefaultColorSpace]
getRed: &red green: &green blue: &blue alpha: &alpha];
return list3i (lrint (red * 65280), lrint (green * 65280),
lrint (blue * 65280));
}
#ifdef NS_IMPL_COCOA
-/* Returns the name for the screen that DICT came from, or NULL.
+
+/* Returns the name for the screen that OBJ represents, or NULL.
Caller must free return value.
*/
static char *
-ns_screen_name (CGDirectDisplayID did)
+ns_get_name_from_ioreg (io_object_t obj)
{
char *name = NULL;
+
NSDictionary *info = (NSDictionary *)
- IODisplayCreateInfoDictionary (CGDisplayIOServicePort (did),
- kIODisplayOnlyPreferredName);
- NSDictionary *names
- = [info objectForKey:
- [NSString stringWithUTF8String:kDisplayProductName]];
-
- if ([names count] > 0) {
- NSString *n = [names objectForKey: [[names allKeys] objectAtIndex:0]];
- if (n != nil)
- name = xstrdup ([n UTF8String]);
- }
+ IODisplayCreateInfoDictionary (obj, kIODisplayOnlyPreferredName);
+ NSDictionary *names = [info objectForKey:
+ [NSString stringWithUTF8String:
+ kDisplayProductName]];
+
+ if ([names count] > 0)
+ {
+ NSString *n = [names objectForKey: [[names allKeys]
+ objectAtIndex:0]];
+ if (n != nil) name = xstrdup ([n UTF8String]);
+ }
[info release];
+
+ return name;
+}
+
+/* Returns the name for the screen that DID came from, or NULL.
+ Caller must free return value.
+*/
+
+static char *
+ns_screen_name (CGDirectDisplayID did)
+{
+ char *name = NULL;
+
+#if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_9
+ mach_port_t masterPort;
+ io_iterator_t it;
+ io_object_t obj;
+
+ // CGDisplayIOServicePort is deprecated. Do it another (harder) way.
+
+ if (IOMasterPort (MACH_PORT_NULL, &masterPort) != kIOReturnSuccess
+ || IOServiceGetMatchingServices (masterPort,
+ IOServiceMatching ("IONDRVDevice"),
+ &it) != kIOReturnSuccess)
+ return name;
+
+ /* Must loop until we find a name. Many devices can have the same unit
+ number (represents different GPU parts), but only one has a name. */
+ while (! name && (obj = IOIteratorNext (it)))
+ {
+ CFMutableDictionaryRef props;
+ const void *val;
+
+ if (IORegistryEntryCreateCFProperties (obj,
+ &props,
+ kCFAllocatorDefault,
+ kNilOptions) == kIOReturnSuccess
+ && props != nil
+ && (val = CFDictionaryGetValue(props, @"IOFBDependentIndex")))
+ {
+ unsigned nr = [(NSNumber *)val unsignedIntegerValue];
+ if (nr == CGDisplayUnitNumber (did))
+ name = ns_get_name_from_ioreg (obj);
+ }
+
+ CFRelease (props);
+ IOObjectRelease (obj);
+ }
+
+ IOObjectRelease (it);
+
+#else
+
+ name = ns_get_name_from_ioreg (CGDisplayIOServicePort (did));
+
+#endif
return name;
}
#endif
if (n_monitors == 0)
return Qnil;
- monitors = (struct MonitorInfo *) xzalloc (n_monitors * sizeof (*monitors));
+ monitors = xzalloc (n_monitors * sizeof *monitors);
for (i = 0; i < [screens count]; ++i)
{
{
Lisp_Object left, top;
EmacsView *view = FRAME_NS_VIEW (f);
+ struct ns_display_info *dpyinfo = FRAME_DISPLAY_INFO (f);
NSPoint pt;
/* Start with user-specified or mouse position. */
if (!INTEGERP (left) || !INTEGERP (top))
{
- pt = last_mouse_motion_position;
+ pt.x = dpyinfo->last_mouse_motion_x;
+ pt.y = dpyinfo->last_mouse_motion_y;
/* Convert to screen coordinates */
pt = [view convertPoint: pt toView: nil];
pt = [[view window] convertBaseToScreen: pt];
{
/* Absolute coordinates. */
pt.x = XINT (left);
- pt.y = x_display_pixel_height (FRAME_NS_DISPLAY_INFO (f)) - XINT (top)
+ pt.y = x_display_pixel_height (FRAME_DISPLAY_INFO (f)) - XINT (top)
- height;
}
else if (pt.x + XINT (dx) <= 0)
*root_x = 0; /* Can happen for negative dx */
else if (pt.x + XINT (dx) + width
- <= x_display_pixel_width (FRAME_NS_DISPLAY_INFO (f)))
+ <= x_display_pixel_width (FRAME_DISPLAY_INFO (f)))
/* It fits to the right of the pointer. */
*root_x = pt.x + XINT (dx);
else if (width + XINT (dx) <= pt.x)
/* It fits below the pointer. */
*root_y = pt.y - height - XINT (dy);
else if (pt.y + XINT (dy) + height
- <= x_display_pixel_height (FRAME_NS_DISPLAY_INFO (f)))
+ <= x_display_pixel_height (FRAME_DISPLAY_INFO (f)))
/* It fits above the pointer */
*root_y = pt.y + XINT (dy);
else
/* Put it on the top. */
- *root_y = x_display_pixel_height (FRAME_NS_DISPLAY_INFO (f)) - height;
+ *root_y = x_display_pixel_height (FRAME_DISPLAY_INFO (f)) - height;
}
{
int root_x, root_y;
struct gcpro gcpro1, gcpro2, gcpro3, gcpro4;
- ptrdiff_t count = SPECPDL_INDEX ();
struct frame *f;
char *str;
NSSize size;
+ dynwind_begin ();
specbind (Qinhibit_redisplay, Qt);
GCPRO4 (string, parms, frame, timeout);
unblock_input ();
UNGCPRO;
- return unbind_to (count, Qnil);
+ dynwind_end ();
+ return Qnil;
}
void
syms_of_nsfns (void)
{
+#include "nsfns.x"
+
Qfontsize = intern_c_string ("fontsize");
staticpro (&Qfontsize);
When you miniaturize a Group, Summary or Article frame, Gnus.tiff will
be used as the image of the icon representing the frame. */);
- Vns_icon_type_alist = Fcons (Qt, Qnil);
+ Vns_icon_type_alist = list1 (Qt);
DEFVAR_LISP ("ns-version-string", Vns_version_string,
doc: /* Toolkit version for NS Windowing. */);
Vns_version_string = ns_appkit_version_str ();
- defsubr (&Sns_read_file_name);
- defsubr (&Sns_get_resource);
- defsubr (&Sns_set_resource);
- defsubr (&Sxw_display_color_p); /* this and next called directly by C code */
- defsubr (&Sx_display_grayscale_p);
- defsubr (&Sns_font_name);
- defsubr (&Sns_list_colors);
-#ifdef NS_IMPL_COCOA
- defsubr (&Sns_do_applescript);
-#endif
- defsubr (&Sxw_color_defined_p);
- defsubr (&Sxw_color_values);
- defsubr (&Sx_server_max_request_size);
- defsubr (&Sx_server_vendor);
- defsubr (&Sx_server_version);
- defsubr (&Sx_display_pixel_width);
- defsubr (&Sx_display_pixel_height);
- defsubr (&Sns_display_monitor_attributes_list);
- defsubr (&Sx_display_mm_width);
- defsubr (&Sx_display_mm_height);
- defsubr (&Sx_display_screens);
- defsubr (&Sx_display_planes);
- defsubr (&Sx_display_color_cells);
- defsubr (&Sx_display_visual_class);
- defsubr (&Sx_display_backing_store);
- defsubr (&Sx_display_save_under);
- defsubr (&Sx_create_frame);
- defsubr (&Sx_open_connection);
- defsubr (&Sx_close_connection);
- defsubr (&Sx_display_list);
-
- defsubr (&Sns_hide_others);
- defsubr (&Sns_hide_emacs);
- defsubr (&Sns_emacs_info_panel);
- defsubr (&Sns_list_services);
- defsubr (&Sns_perform_service);
- defsubr (&Sns_convert_utf8_nfd_to_nfc);
- defsubr (&Sx_focus_frame);
- defsubr (&Sns_popup_font_panel);
- defsubr (&Sns_popup_color_panel);
-
- defsubr (&Sx_show_tip);
- defsubr (&Sx_hide_tip);
-
as_status = 0;
as_script = Qnil;
as_result = 0;