char *tmp = strdup (SDATA (SYMBOL_NAME (tem)));
NSString *family;
nsfont_unescape_name (tmp);
- /* PENDING: this seems to be needed only for font names that are
- hard-coded into emacs, like 'helvetica' for splash screen */
+ /* TODO: this seems to be needed only for font names that are
+ hard-coded into emacs, like 'helvetica' for splash screen */
if (tmp)
tmp[0] = toupper (tmp[0]);
family = [NSString stringWithUTF8String: tmp];
/* Converts FONT_WEIGHT, FONT_SLANT, FONT_WIDTH to NSFont traits. */
-/* PENDING (20080601): The font backend's strategy for handling font
+/* TODO (20080601): The font backend's strategy for handling font
styles continues to evolve. When/if this stabilizes, we
can change the code here to be more sophisticated and accurate.
For now, we rely on "normal/plain" style being numeric 100. */
if (fontNames && [fontNames count] > 0)
{
NSString *fontName = [fontNames objectAtIndex: 0];
- /*PENDING: is there a more efficient way to get family name? */
+ /* XXX: is there a more efficient way to get family name? */
NSFont *font = [NSFont fontWithName: fontName size: 0];
if (font != nil)
{
NSString *family;
while (family = [families nextObject])
list = Fcons (intern ([family UTF8String]), list);
- /*PENDING: escape the name? */
+ /* FIXME: escape the name? */
if (NSFONT_TRACE)
fprintf (stderr, "nsfont: list families returning %d entries\n",
font_info = (struct nsfont_info *) XFONT_OBJECT (font_object);
font = (struct font *)font_info;
if (!font)
- return Qnil; /*PENDING: this copies w32, but causes a segfault */
+ return Qnil; /* FIXME: this copies w32, but causes a segfault */
if (NSFONT_TRACE)
{
font->relative_compose = 0;
font->font_encoder = NULL;
- /*PENDING: does anything care about this? */
+ /* TODO: does anything care about this? */
font->props[FONT_FORMAT_INDEX] = Qns;
font->props[FONT_FILE_INDEX] = Qnil;
/* set up metrics portion of font struct */
font->ascent = [sfont ascender];
font->descent = -[sfont descender];
- font->min_width = [sfont widthOfString: @"|"]; /* PENDING */
+ font->min_width = [sfont widthOfString: @"|"]; /* FIXME */
font->space_width = lrint (nsfont_char_width (sfont, ' '));
font->average_width = lrint (font_info->width);
font->max_width = lrint (font_info->max_bounds.width);
struct nsfont_info *font_info = (struct nsfont_info *)font;
int i;
- /* PENDING: this occurs apparently due to same failure to detect same font
- that causes need for cache in nsfont_open ()
- (came after unicode-2 -> trunk) */
+ /* FIXME: this occurs apparently due to same failure to detect same font
+ that causes need for cache in nsfont_open ()
+ (came after unicode-2 -> trunk) */
if (!font_info)
return;
for (i =0; i<nglyphs; i++)
{
/* get metrics for this glyph, filling cache if need be */
- /* PENDING: get metrics for whole string from an NSLayoutManager
- (if not too slow) */
+ /* TODO: get metrics for whole string from an NSLayoutManager
+ (if not too slow) */
high = (code[i] & 0xFF00) >> 8;
low = code[i] & 0x00FF;
if (!font_info->metrics[high])
int cwidth, twidth = 0;
int hi, lo;
char isComposite = 0; /* s->first_glyph->type == COMPOSITE_GLYPH; */
- /* PENDING: composition: no vertical displacement is considered. */
+ /* FIXME: composition: no vertical displacement is considered. */
t+= s->gidx; /* advance into composition */
for (i =0; i<s->nchars - s->gidx; i++, t++)
{
}
else
{
- if (!font->metrics[hi]) /*PENDING: why/how can we need this now? */
+ if (!font->metrics[hi]) /* FIXME: why/how can we need this now? */
ns_glyph_metrics (font, hi);
cwidth = font->metrics[hi][lo].width;
}
col = (NS_FACE_FOREGROUND (face) != nil
? ns_lookup_indexed_color (NS_FACE_FOREGROUND (face), s->f)
: FRAME_FOREGROUND_COLOR (s->f));
- /*PENDING: find another way to pass this */
+ /* FIXME: find another way to pass this */
bgCol = (ns_tmp_flags != NS_DUMPGLYPH_FOREGROUND ? nil
: (NS_FACE_BACKGROUND (face) != 0
? ns_lookup_indexed_color (NS_FACE_BACKGROUND (face), s->f)
g = unichars[i];
#else
g = glyphStorage->cglyphs[i];
- /*PENDING: is this a good check? maybe need to use coveredChars.. */
+ /* TODO: is this a good check? maybe need to use coveredChars.. */
if (g > numGlyphs)
g = 0xFFFF; /* hopefully unused... */
#endif
========================================================================== */
-/*23: PENDING: not currently used, but should normalize with other terms. */
+/*23: FIXME: not currently used, but should normalize with other terms. */
void
x_activate_menubar (struct frame *f)
{
}
set_buffer_internal_1 (XBUFFER (buffer));
- /* PENDING: for some reason this is not needed in other terms,
- but some menu updates call Info-extract-pointer which causes
- abort-on-error if waiting-for-input. Needs further investigation. */
+ /* TODO: for some reason this is not needed in other terms,
+ but some menu updates call Info-extract-pointer which causes
+ abort-on-error if waiting-for-input. Needs further investigation. */
owfi = waiting_for_input;
waiting_for_input = 0;
if (NILP (string))
break;
- /* PENDING: we'd like to only parse the needed submenu, but this
- was causing crashes in the _common parsing code.. need to make
- sure proper initialization done.. */
-/* if (submenu && strcmp (submenuTitle, SDATA (string)))
+ /* FIXME: we'd like to only parse the needed submenu, but this
+ was causing crashes in the _common parsing code.. need to make
+ sure proper initialization done.. */
+/* if (submenu && strcmp (submenuTitle, SDATA (string)))
continue; */
submenu_start[i] = menu_items_used;
set_buffer_internal_1 (prev);
/* Compare the new menu items with previous, and leave off if no change */
- /* PENDING: following other terms here, but seems like this should be
- done before parse stage 2 above, since its results aren't used */
+ /* FIXME: following other terms here, but seems like this should be
+ done before parse stage 2 above, since its results aren't used */
if (previous_menu_items_used
&& (!submenu || (submenu && submenu == last_submenu))
&& menu_items_used == previous_menu_items_used)
{
for (i = 0; i < previous_menu_items_used; i++)
- /* PENDING: this ALWAYS fails on Buffers menu items.. something
- about their strings causes them to change every time, so we
- double-check failures */
+ /* FIXME: this ALWAYS fails on Buffers menu items.. something
+ about their strings causes them to change every time, so we
+ double-check failures */
if (!EQ (previous_items[i], XVECTOR (menu_items)->contents[i]))
if (!(STRINGP (previous_items[i])
&& STRINGP (XVECTOR (menu_items)->contents[i])
}
}
/* The menu items are different, so store them in the frame */
- /* PENDING: this is not correct for single-submenu case */
+ /* FIXME: this is not correct for single-submenu case */
f->menu_bar_vector = menu_items;
f->menu_bar_items_used = menu_items_used;
}
else
{ /* no position given */
- /* PENDING: if called during dump, we need to stop precomputation of
+ /* FIXME: if called during dump, we need to stop precomputation of
key equivalents (see below) because the keydefs in ns-win.el have
not been loaded yet. */
if (noninteractive)
specpdl_count2 = SPECPDL_INDEX ();
#if 0
- /*PENDING: a couple of one-line differences prevent reuse */
+ /* FIXME: a couple of one-line differences prevent reuse */
wv = digest_single_submenu (0, menu_items_used, Qnil);
#else
{
Lisp_Object ns_input_spi_name, ns_input_spi_arg;
Lisp_Object Vx_toolkit_scroll_bars;
static Lisp_Object Qmodifier_value;
-/*PENDING: unsure why these defined in term files, anyway we need in keymap.c */
+/* TODO: unsure why these defined in term files, anyway we need in keymap.c */
Lisp_Object Qalt, Qcontrol, Qhyper, Qmeta, Qsuper;
extern Lisp_Object Qcursor_color, Qcursor_type, Qns;
static NSRect uRect;
static BOOL gsaved = NO;
BOOL ns_in_resize = NO;
-int ns_tmp_flags; /*PENDING */
-struct nsfont_info *ns_tmp_font; /*PENDING */
+int ns_tmp_flags; /* FIXME */
+struct nsfont_info *ns_tmp_font; /* FIXME */
/*static int debug_lock = 0; */
#ifdef NS_IMPL_COCOA
ns_send_appdefined (-1); \
}
-/*PENDING: get rid of need for these forward declarations */
+/* 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);
/* unused variables needed for compatibility reasons */
int x_use_underline_position_properties, x_underline_at_descent_line;
-/* PENDING: figure out what to do with underline_minimum_offset. */
+/* FIXME: figure out what to do with underline_minimum_offset. */
/* ==========================================================================
}
}
- /*PENDING: append to INFOPATH... */
if (!getenv ("INFOPATH"))
{
resourcePath = [resourceDir stringByAppendingPathComponent: @"info"];
r.origin.y += (r.size.height - dim.y) / 2;
r.size.width = dim.x;
r.size.height = dim.y;
- /* PENDING: cacheImageInRect under GNUSTEP does not account for
+ /* XXX: cacheImageInRect under GNUSTEP does not account for
offset in x_set_window_size, so overestimate (4 fine on Cocoa) */
surr = NSInsetRect (r, -10, -10);
ns_focus (frame, &surr, 1);
-------------------------------------------------------------------------- */
{
NSTRACE (x_make_frame_visible);
- /* PENDING: at some points in past this was not needed, as the only place that
+ /* XXX: at some points in past this was not needed, as the only place that
called this (frame.c:Fraise_frame ()) also called raise_lower;
if this ends up the case again, comment this out again. */
if (!FRAME_VISIBLE_P (f))
/* If we have a change in toolbar display, calculate height */
if (tb)
- /* PENDING: GNUstep has not yet implemented the first method below, added
- in Panther, however the second is incorrect under Cocoa. */
+ /* XXX: GNUstep has not yet implemented the first method below, added
+ in Panther, however the second is incorrect under Cocoa. */
#ifdef NS_IMPL_GNUSTEP
FRAME_NS_TOOLBAR_HEIGHT (f)
= NSHeight ([NSWindow frameRectForContentRect: NSMakeRect (0, 0, 0, 0)
return 0;
}
- /* 23: PENDING: emacs seems to downcase everything before passing it here,
- which we can work around, except for GRAY, since gray##, where ## is
- decimal between 0 and 99, is also an X11 colorname. */
+ /* 23: FIXME: emacs seems to downcase everything before passing it here,
+ which we can work around, except for GRAY, since gray##, where ## is
+ decimal between 0 and 99, is also an X11 colorname. */
if (name[0] == '#') /* X11 format */
{
hex = name + 1;
NSString *name;
NSColorList *clist;
#ifdef NS_IMPL_GNUSTEP
- /* PENDING: who is wrong, the requestor or the implementation? */
+ /* XXX: who is wrong, the requestor or the implementation? */
if ([nsname compare: @"Highlight" options: NSCaseInsensitiveSearch]
== NSOrderedSame)
nsname = @"highlightColor";
NSTRACE (x_set_mouse_pixel_position);
ns_raise_frame (f);
#if 0
- /*PENDING: this does not work, and what about GNUstep? */
+ /* FIXME: this does not work, and what about GNUstep? */
#ifdef NS_IMPL_COCOA
[FRAME_NS_VIEW (f) lockFocus];
PSsetmouse ((float)pix_x, (float)pix_y);
if (last_mouse_scroll_bar != nil && insist == 0)
{
- /* PENDING: we do not use this path at the moment because drag events will
- go directly to the EmacsScroller. Leaving code in for now. */
+ /* TODO: we do not use this path at the moment because drag events will
+ go directly to the EmacsScroller. Leaving code in for now. */
[last_mouse_scroll_bar getMouseMotionPart: (int *)part window: bar_window
x: x y: y];
if (time) *time = last_mouse_movement_time;
f = dpyinfo->x_focus_frame ? dpyinfo->x_focus_frame
: SELECTED_FRAME ();
- if (f && f->output_data.ns) /*PENDING: 2nd check no longer needed? */
+ if (f && f->output_data.ns) /* TODO: 2nd check no longer needed? */
{
view = FRAME_NS_VIEW (*fp);
BLOCK_INPUT;
- /*PENDING: add NSProgressIndicator to selected frame (see macfns.c) */
+ /* TODO: add NSProgressIndicator to selected frame (see macfns.c) */
hourglass_shown_p = 1;
UNBLOCK_INPUT;
if (!hourglass_shown_p)
return;
- /*PENDING: remove NSProgressIndicator from all frames */
+ /* TODO: remove NSProgressIndicator from all frames */
hourglass_shown_p = 0;
UNBLOCK_INPUT;
if (newBaseCol == nil)
newBaseCol = [NSColor grayColor];
- if (newBaseCol != baseCol) /* PENDING: better check */
+ if (newBaseCol != baseCol) /* TODO: better check */
{
[baseCol release];
baseCol = [newBaseCol retain];
External (RIF): Main draw-text call.
-------------------------------------------------------------------------- */
{
- /*PENDING (optimize): focus for box and contents draw */
+ /* TODO (optimize): focus for box and contents draw */
NSRect r[2];
int n;
char box_drawn_p = 0;
- WINDOW_RIGHT_FRINGE_WIDTH (s->w)));
r[0].size.width -= overrun;
- /* PENDING: Try to work between problem where a stretch glyph on
- a partially-visible bottom row will clear part of the
- modeline, and another where list-buffers headers and similar
- rows erroneously have visible_height set to 0. Not sure
- where this is coming from as other terms seem not to show. */
+ /* XXX: Try to work between problem where a stretch glyph on
+ a partially-visible bottom row will clear part of the
+ modeline, and another where list-buffers headers and similar
+ rows erroneously have visible_height set to 0. Not sure
+ where this is coming from as other terms seem not to show. */
r[0].size.height = min (s->height, s->row->visible_height);
}
to ourself, otherwise [NXApp run] will never exit. */
send_appdefined = YES;
- /*PENDING: from termhooks.h: */
+ /* TODO: from termhooks.h: */
/* XXX Please note that a non-zero value of EXPECTED only means that
there is available input on at least one of the currently opened
terminal devices -- but not necessarily on this device.
x_get_glyph_overhangs, /*23: generic OK */
x_fix_overlapping_area, /*generic OK */
ns_draw_fringe_bitmap, /*23 */
- 0, /* define_fringe_bitmap */ /*PENDING: simplify ns_draw_fringe_bitmap? */
+ 0, /* define_fringe_bitmap */ /* FIXME: simplify ns_draw_fringe_bitmap */
0, /* destroy_fringe_bitmap */
ns_compute_glyph_string_overhangs, /*23 */
ns_draw_glyph_string, /*23: interface to nsfont.m */
static void
ns_delete_display (struct ns_display_info *dpyinfo)
{
- /*PENDING... */
+ /* TODO... */
}
Qcontrol = intern ("control");
Fput (Qcontrol, Qmodifier_value, make_number (ctrl_modifier));
- /*PENDING: move to common code */
+ /* FIXME: move to common code */
DEFVAR_LISP ("x-toolkit-scroll-bars", &Vx_toolkit_scroll_bars,
doc: /* If not nil, Emacs uses toolkit scroll bars. */);
#ifdef USE_TOOLKIT_SCROLL_BARS
/* Tell emacs about this window system. */
Fprovide (intern ("ns-windowing"), Qnil);
- /* PENDING: try to move this back into lisp, ns-win.el loaded too late
- right now */
+ /* TODO: try to move this back into lisp, ns-win.el loaded too late
+ right now */
{
Lisp_Object args[3] = { intern ("ns-version-string"), build_string ("9.0"),
build_string ("NS Window system port version number.") };
return YES;
}
-/*PENDING: these may help w/IO switching btwn terminal and NSApp */
+/* TODO: these may help w/IO switching btwn terminal and NSApp */
- (void)applicationDidBecomeActive: (NSNotification *)notification
{
}
/*#if defined (COCOA_EXPERIMENTAL_CTRL_G) */
if (![[self window] isKeyWindow])
{
- /* PENDING: Using NO_SOCK_SIGIO like Carbon causes a condition in which,
- when Emacs display updates a different frame from the current one,
- and temporarily selects it, then processes some interrupt-driven
- input (dispnew.c:3878), OS will send the event to the correct NSWindow,
- but for some reason that window has its first responder set to the
- NSView most recently updated (I guess), which is not the correct one.
- UPDATE: After multi-TTY merge this happens even w/o NO_SOCK_SIGIO */
+ /* XXX: Using NO_SOCK_SIGIO like Carbon causes a condition in which,
+ when Emacs display updates a different frame from the current one,
+ and temporarily selects it, then processes some interrupt-driven
+ input (dispnew.c:3878), OS will send the event to the correct NSWindow,
+ but for some reason that window has its first responder set to the
+ NSView most recently updated (I guess), which is not the correct one.
+ UPDATE: After multi-TTY merge this happens even w/o NO_SOCK_SIGIO */
if ([[theEvent window] isKindOfClass: [EmacsWindow class]])
[[(EmacsView *)[theEvent window] delegate] keyDown: theEvent];
return;
&& !fnKeysym
&& [[theEvent characters] length] != 0)
{
- /* PENDING: the code we get will be unshifted, so if we have
+ /* XXX: the code we get will be unshifted, so if we have
a shift modifier, must convert ourselves */
if (!(flags & NSShiftKeyMask))
code = [[theEvent characters] characterAtIndex: 0];
for (i =0; i<len; i++)
{
code = [aString characterAtIndex: i];
- /* PENDING: still need this? */
+ /* TODO: still need this? */
if (code == 0x2DC)
code = '~'; /* 0x7E */
emacs_event->modifiers = 0;
return (long)self;
}
-/*PENDING: below here not yet implemented correctly, but may not be needed */
+/* TODO: below here not yet implemented correctly, but may not be needed */
- (void)doCommandBySelector: (SEL)aSelector
{
+ (float) scrollerWidth
{
- /* PENDING: if we want to allow variable widths, this is the place to do it,
- however neither GNUstep nor Cocoa support it very well */
+ /* TODO: if we want to allow variable widths, this is the place to do it,
+ however neither GNUstep nor Cocoa support it very well */
return [NSScroller scrollerWidth];
}
return self;
}
-/* PENDING: unused at moment (see ns_mouse_position) at the moment because
- drag events will go directly to the EmacsScroller. Leaving in for now. */
+/* FIXME: unused at moment (see ns_mouse_position) at the moment because
+ drag events will go directly to the EmacsScroller. Leaving in for now. */
-(void)getMouseMotionPart: (int *)part window: (Lisp_Object *)window
x: (Lisp_Object *)x y: ( Lisp_Object *)y
{
if (expandSpace != prevExpandSpace)
{
ns_expand_space = make_float (expandSpace);
- /* PENDING: more needed: store needed metrics in nsfont_info, update
+ /* TODO: more needed: store needed metrics in nsfont_info, update
frame default font max_bounds and fontp, recompute faces */
/* FRAME_LINE_HEIGHT (frame) *= (expandSpace / prevExpandSpace);
x_set_window_size (frame, 0, frame->text_cols, frame->text_lines); */
pattFam = patt;
else
pattFam = ns_xlfd_to_fontname (patt);
- /*PENDING: '*' at beginning matches literally.. */
+ /* XXX: '*' at beginning matches literally.. */
if (pattFam[0] == '*')
pattFam[0] = '.';