else if (!STRINGP (oldval) && EQ (oldval, Qnil) == EQ (arg, Qnil))
return;
- f->icon_name = arg;
+ FVAR (f, icon_name) = arg;
if (NILP (arg))
{
- if (!NILP (f->title))
- arg = f->title;
+ if (!NILP (FVAR (f, title)))
+ arg = FVAR (f, title);
else
/* explicit name and no icon-name -> explicit_name */
if (f->explicit_name)
- arg = f->name;
+ arg = FVAR (f, name);
else
{
/* no explicit name and no icon-name ->
if (! [[[view window] title] isEqualToString: str])
[[view window] setTitle: str];
- if (!STRINGP (f->icon_name))
+ if (!STRINGP (FVAR (f, icon_name)))
encoded_icon_name = encoded_name;
else
- encoded_icon_name = ENCODE_UTF_8 (f->icon_name);
+ encoded_icon_name = ENCODE_UTF_8 (FVAR (f, icon_name));
str = [NSString stringWithUTF8String: SSDATA (encoded_icon_name)];
CHECK_STRING (name);
/* Don't change the name if it's already NAME. */
- if (! NILP (Fstring_equal (name, f->name)))
+ if (! NILP (Fstring_equal (name, FVAR (f, name))))
return;
- f->name = name;
+ FVAR (f, name) = name;
/* title overrides explicit name */
- if (! NILP (f->title))
- name = f->title;
+ if (! NILP (FVAR (f, title)))
+ name = FVAR (f, title);
ns_set_name_internal (f, name);
}
FVAR (f, title) = name;
if (NILP (name))
- name = f->name;
+ name = FVAR (f, name);
else
CHECK_STRING (name);
{
NSView *view;
Lisp_Object name, filename;
- Lisp_Object buf = XWINDOW (f->selected_window)->buffer;
+ Lisp_Object buf = XWINDOW (FVAR (f, selected_window))->buffer;
const char *title;
NSAutoreleasePool *pool;
struct gcpro gcpro1;
NSString *str;
NSTRACE (ns_set_name_as_filename);
- if (f->explicit_name || ! NILP (f->title) || ns_in_resize)
+ if (f->explicit_name || ! NILP (FVAR (f, title)) || ns_in_resize)
return;
BLOCK_INPUT;
[[view window] setRepresentedFilename: fstr];
[[view window] setTitle: str];
- f->name = name;
+ FVAR (f, name) = name;
}
[pool release];
{
NSView *view = FRAME_NS_VIEW (f);
NSAutoreleasePool *pool;
- if (!MINI_WINDOW_P (XWINDOW (f->selected_window)))
+ if (!MINI_WINDOW_P (XWINDOW (FVAR (f, selected_window))))
{
BLOCK_INPUT;
pool = [[NSAutoreleasePool alloc] init];
BLOCK_INPUT;
pool = [[NSAutoreleasePool alloc] init];
if (f->output_data.ns->miniimage
- && [[NSString stringWithUTF8String: SSDATA (f->name)]
+ && [[NSString stringWithUTF8String: SSDATA (FVAR (f, name))]
isEqualToString: [(NSImage *)f->output_data.ns->miniimage name]])
{
[pool release];
return;
}
- tem = assq_no_quit (Qicon_type, f->param_alist);
+ tem = assq_no_quit (Qicon_type, FVAR (f, param_alist));
if (CONSP (tem) && ! NILP (XCDR (tem)))
{
[pool release];
{
elt = XCAR (chain);
/* special case: 't' means go by file type */
- if (SYMBOLP (elt) && EQ (elt, Qt) && SSDATA (f->name)[0] == '/')
+ if (SYMBOLP (elt) && EQ (elt, Qt) && SSDATA (FVAR (f, name))[0] == '/')
{
NSString *str
- = [NSString stringWithUTF8String: SSDATA (f->name)];
+ = [NSString stringWithUTF8String: SSDATA (FVAR (f, name))];
if ([[NSFileManager defaultManager] fileExistsAtPath: str])
image = [[[NSWorkspace sharedWorkspace] iconForFile: str] retain];
}
else if (CONSP (elt) &&
STRINGP (XCAR (elt)) &&
STRINGP (XCDR (elt)) &&
- fast_string_match (XCAR (elt), f->name) >= 0)
+ fast_string_match (XCAR (elt), FVAR (f, name)) >= 0)
{
image = [EmacsImage allocInitFromFile: XCDR (elt)];
if (image == nil)
FRAME_FONTSET (f) = -1;
- f->icon_name = x_get_arg (dpyinfo, parms, Qicon_name, "iconName", "Title",
+ FVAR (f, icon_name) = x_get_arg (dpyinfo, parms, Qicon_name,
+ "iconName", "Title",
RES_TYPE_STRING);
- if (! STRINGP (f->icon_name))
- f->icon_name = Qnil;
+ if (! STRINGP (FVAR (f, icon_name)))
+ FVAR (f, icon_name) = Qnil;
FRAME_NS_DISPLAY_INFO (f) = dpyinfo;
be set. */
if (EQ (name, Qunbound) || NILP (name) || ! STRINGP (name))
{
- f->name = build_string ([ns_app_name UTF8String]);
+ FVAR (f, name) = build_string ([ns_app_name UTF8String]);
f->explicit_name = 0;
}
else
{
- f->name = name;
+ FVAR (f, name) = name;
f->explicit_name = 1;
specbind (Qx_resource_name, name);
}
by x_get_arg and friends, now go in the misc. alist of the frame. */
for (tem = parms; CONSP (tem); tem = XCDR (tem))
if (CONSP (XCAR (tem)) && !NILP (XCAR (XCAR (tem))))
- f->param_alist = Fcons (XCAR (tem), f->param_alist);
+ FVAR (f, param_alist) = Fcons (XCAR (tem), FVAR (f, param_alist));
UNGCPRO;
/* Save the frame's previous menu bar contents data */
if (previous_menu_items_used)
- memcpy (previous_items, &AREF (f->menu_bar_vector, 0),
+ memcpy (previous_items, &AREF (FVAR (f, menu_bar_vector), 0),
previous_menu_items_used * sizeof (Lisp_Object));
/* parse stage 1: extract from lisp */
save_menu_items ();
- menu_items = f->menu_bar_vector;
+ menu_items = FVAR (f, menu_bar_vector);
menu_items_allocated = VECTORP (menu_items) ? ASIZE (menu_items) : 0;
submenu_start = alloca (ASIZE (items) * sizeof *submenu_start);
submenu_end = alloca (ASIZE (items) * sizeof *submenu_end);
}
/* The menu items are different, so store them in the frame */
/* FIXME: this is not correct for single-submenu case */
- f->menu_bar_vector = menu_items;
+ FVAR (f, menu_bar_vector) = menu_items;
f->menu_bar_items_used = menu_items_used;
/* Calls restore_menu_items, etc., as they were outside */
/* update EmacsToolbar as in GtkUtils, build items list */
for (i = 0; i < f->n_tool_bar_items; ++i)
{
-#define TOOLPROP(IDX) AREF (f->tool_bar_items, \
+#define TOOLPROP(IDX) AREF (FVAR (f, tool_bar_items), \
i * TOOL_BAR_ITEM_NSLOTS + (IDX))
BOOL enabled_p = !NILP (TOOLPROP (TOOL_BAR_ITEM_ENABLED_P));
FRAME_PIXEL_HEIGHT (f) = pixelheight;
/* SET_FRAME_GARBAGED (f); // this short-circuits expose call in drawRect */
- mark_window_cursors_off (XWINDOW (f->root_window));
+ mark_window_cursors_off (XWINDOW (FVAR (f, root_window)));
cancel_mouse_face (f);
UNBLOCK_INPUT;
if (ns_drag_types)
[self registerForDraggedTypes: ns_drag_types];
- tem = f->name;
+ tem = FVAR (f, name);
name = [NSString stringWithUTF8String:
NILP (tem) ? "Emacs" : SSDATA (tem)];
[win setTitle: name];
#endif
FRAME_TOOLBAR_HEIGHT (f) = 0;
- tem = f->icon_name;
+ tem = FVAR (f, icon_name);
if (!NILP (tem))
[win setMiniwindowTitle:
[NSString stringWithUTF8String: SSDATA (tem)]];
{
NSInteger tag = [sender tag];
find_and_call_menu_selection (emacsframe, emacsframe->menu_bar_items_used,
- emacsframe->menu_bar_vector,
+ FVAR (emacsframe, menu_bar_vector),
(void *)tag);
}
emacs_event->kind = TOOL_BAR_EVENT;
/* XSETINT (emacs_event->code, 0); */
- emacs_event->arg = AREF (emacsframe->tool_bar_items,
+ emacs_event->arg = AREF (FVAR (emacsframe, tool_bar_items),
idx + TOOL_BAR_ITEM_KEY);
emacs_event->modifiers = EV_MODIFIERS (theEvent);
EV_TRAILER (theEvent);
{
Lisp_Object str = Qnil;
struct frame *f = SELECTED_FRAME ();
- struct buffer *curbuf = XBUFFER (XWINDOW (f->selected_window)->buffer);
+ struct buffer *curbuf
+ = XBUFFER (XWINDOW (FVAR (f, selected_window))->buffer);
if ([attribute isEqualToString:NSAccessibilityRoleAttribute])
return NSAccessibilityTextFieldRole;