* keyboard.h (_widget_value): name, value and key are const char*.
* nsfont.m (ns_descriptor_to_entity): Use const char*.
* nsmenu.m (parseKeyEquiv, addSubmenuWithTitle)
(addDisplayItemWithImage, update_frame_tool_bar): Use const char*.
* nsterm.h (parseKeyEquiv, addSubmenuWithTitle)
(addDisplayItemWithImage): Use const char*.
2010-08-11 Jan Djärv <jan.h.d@swipnet.se>
+ * nsterm.h (parseKeyEquiv, addSubmenuWithTitle)
+ (addDisplayItemWithImage): Use const char*.
+
+ * nsmenu.m (parseKeyEquiv, addSubmenuWithTitle)
+ (addDisplayItemWithImage, update_frame_tool_bar): Use const char*.
+
+ * nsfont.m (ns_descriptor_to_entity): Use const char*.
+
+ * keyboard.h (_widget_value): name, value and key are const char*.
+
* unexmacosx.c (unexec_error): Use const char *.
2010-08-09 Dan Nicolaescu <dann@ics.uci.edu>
{
/* name of widget */
Lisp_Object lname;
- char* name;
+ const char* name;
/* value (meaning depend on widget type) */
- char* value;
+ const char* value;
/* keyboard equivalent. no implications for XtTranslations */
Lisp_Object lkey;
- char* key;
+ const char* key;
/* Help string or nil if none.
GC finds this string through the frame's menu_bar_vector
or through menu_items. */
/* Converts NSFont descriptor to FONT_WEIGHT, FONT_SLANT, FONT_WIDTH, etc.. */
static Lisp_Object
-ns_descriptor_to_entity (NSFontDescriptor *desc, Lisp_Object extra, char *style)
+ns_descriptor_to_entity (NSFontDescriptor *desc,
+ Lisp_Object extra,
+ const char *style)
{
Lisp_Object font_entity = font_make_entity ();
/* NSString *psName = [desc postscriptName]; */
NSMenuItem get ignored. For now we try to display a super-single letter
combo, and return the others as strings to be appended to the item title.
(This is signaled by setting keyEquivModMask to 0 for now.) */
--(NSString *)parseKeyEquiv: (char *)key
+-(NSString *)parseKeyEquiv: (const char *)key
{
- char *tpos = key;
+ const char *tpos = key;
keyEquivModMask = NSCommandKeyMask;
if (!key || !strlen (key))
/* adds an empty submenu and returns it */
-- (EmacsMenu *)addSubmenuWithTitle: (char *)title forFrame: (struct frame *)f
+- (EmacsMenu *)addSubmenuWithTitle: (const char *)title forFrame: (struct frame *)f
{
NSString *titleStr = [NSString stringWithUTF8String: title];
NSMenuItem *item = [self addItemWithTitle: titleStr
{
/* Create a new pane. */
Lisp_Object pane_name, prefix;
- char *pane_string;
+ const char *pane_string;
pane_name = AREF (menu_items, i + MENU_ITEMS_PANE_NAME);
prefix = AREF (menu_items, i + MENU_ITEMS_PANE_PREFIX);
struct image *img;
Lisp_Object image;
Lisp_Object helpObj;
- char *helpText;
+ const char *helpText;
/* If image is a vector, choose the image according to the
button state. */
}
- (void) addDisplayItemWithImage: (EmacsImage *)img idx: (int)idx
- helpText: (char *)help enabled: (BOOL)enabled
+ helpText: (const char *)help enabled: (BOOL)enabled
{
/* 1) come up w/identifier */
NSString *identifier
- initWithTitle: (NSString *)title frame: (struct frame *)f;
- (void)setFrame: (struct frame *)f;
- (void)menuNeedsUpdate: (NSMenu *)menu; /* (delegate method) */
-- (NSString *)parseKeyEquiv: (char *)key;
+- (NSString *)parseKeyEquiv: (const char *)key;
- (NSMenuItem *)addItemWithWidgetValue: (void *)wvptr;
- (void)fillWithWidgetValue: (void *)wvptr;
-- (EmacsMenu *)addSubmenuWithTitle: (char *)title forFrame: (struct frame *)f;
+- (EmacsMenu *)addSubmenuWithTitle: (const char *)title forFrame: (struct frame *)f;
- (void) clear;
- (Lisp_Object)runMenuAt: (NSPoint)p forFrame: (struct frame *)f
keymaps: (int)keymaps;
- (void) clearActive;
- (BOOL) changed;
- (void) addDisplayItemWithImage: (EmacsImage *)img idx: (int)idx
- helpText: (char *)help
+ helpText: (const char *)help
enabled: (BOOL)enabled;
/* delegate methods */
- (NSToolbarItem *)toolbar: (NSToolbar *)toolbar