/* NeXT/Open/GNUstep / MacOSX communication module.
- Copyright (C) 1989, 1993, 1994, 2005, 2006, 2008, 2009
+ Copyright (C) 1989, 1993, 1994, 2005, 2006, 2008, 2009, 2010
Free Software Foundation, Inc.
This file is part of GNU Emacs.
Lisp_Object ns_input_spi_name, ns_input_spi_arg;
Lisp_Object Vx_toolkit_scroll_bars;
static Lisp_Object Qmodifier_value;
-/* TODO: unsure why these defined in term files, anyway we need in keymap.c */
-Lisp_Object Qalt, Qcontrol, Qhyper, Qmeta, Qsuper;
+Lisp_Object Qalt, Qcontrol, Qhyper, Qmeta, Qsuper, Qnone;
extern Lisp_Object Qcursor_color, Qcursor_type, Qns;
/* Specifies which emacs modifier should be generated when NS receives
Return 0 if not found
-------------------------------------------------------------------------- */
{
- NSColor *temp;
- int notFound = ns_get_color (name, &temp);
-
+ NSColor *col;
NSTRACE (ns_defined_color);
- if (notFound)
- return 0;
-
+ BLOCK_INPUT;
+ if (ns_get_color (name, &col) != 0) /* Color not found */
+ {
+ UNBLOCK_INPUT;
+ return 0;
+ }
if (makeIndex && alloc)
- color_def->pixel = ns_index_color(temp, f); /* [temp retain]; */
-
- ns_query_color (temp, color_def, !makeIndex);
-
+ color_def->pixel = ns_index_color (col, f);
+ ns_query_color (col, color_def, !makeIndex);
+ UNBLOCK_INPUT;
return 1;
}
ns_antialias_threshold = 10.0;
/* from 23+ we need to tell emacs what modifiers there are.. */
- Qmodifier_value = intern ("modifier-value");
- Qalt = intern ("alt");
+ DEFSYM (Qmodifier_value, "modifier-value");
+ DEFSYM (Qalt, "alt");
+ DEFSYM (Qhyper, "hyper");
+ DEFSYM (Qmeta, "meta");
+ DEFSYM (Qsuper, "super");
+ DEFSYM (Qcontrol, "control");
+ DEFSYM (Qnone, "none");
Fput (Qalt, Qmodifier_value, make_number (alt_modifier));
- Qhyper = intern ("hyper");
Fput (Qhyper, Qmodifier_value, make_number (hyper_modifier));
- Qmeta = intern ("meta");
Fput (Qmeta, Qmodifier_value, make_number (meta_modifier));
- Qsuper = intern ("super");
Fput (Qsuper, Qmodifier_value, make_number (super_modifier));
- Qcontrol = intern ("control");
Fput (Qcontrol, Qmodifier_value, make_number (ctrl_modifier));
DEFVAR_LISP ("ns-input-file", &ns_input_file,