#include "window.h"
#include "blockinput.h"
#include "buffer.h"
+#include "charset.h"
+#include "coding.h"
#ifdef MSDOS
#include "msdos.h"
static Lisp_Object xdialog_show ();
void popup_get_selection ();
-#endif
-
-#ifdef USE_X_TOOLKIT
/* Define HAVE_BOXES if menus can handle radio and toggle buttons. */
Lisp_Object title;
char *error_name;
Lisp_Object selection;
- struct frame *f = NULL;
+ FRAME_PTR f = NULL;
Lisp_Object x, y, window;
int keymaps = 0;
int for_click = 0;
CHECK_LIVE_WINDOW (window, 0);
f = XFRAME (WINDOW_FRAME (XWINDOW (window)));
- xpos = (FONT_WIDTH (f->output_data.x->font)
+ xpos = (FONT_WIDTH (FRAME_FONT (f))
* XFASTINT (XWINDOW (window)->left));
- ypos = (f->output_data.x->line_height
+ ypos = (FRAME_LINE_HEIGHT (f)
* XFASTINT (XWINDOW (window)->top));
}
else
(position, contents)
Lisp_Object position, contents;
{
- struct frame * f = NULL;
+ FRAME_PTR f = NULL;
Lisp_Object window;
check_x ();
/* Use the mouse's current position. */
FRAME_PTR new_f = SELECTED_FRAME ();
Lisp_Object bar_window;
- int part;
+ enum scroll_bar_part part;
unsigned long time;
Lisp_Object x, y;
#ifndef HAVE_MULTILINGUAL_MENU
if (STRINGP (pane_name) && STRING_MULTIBYTE (pane_name))
{
- pane_name = string_make_unibyte (pane_name);
+ pane_name = ENCODE_SYSTEM (pane_name);
AREF (menu_items, i + MENU_ITEMS_PANE_NAME) = pane_name;
}
#endif
#ifndef HAVE_MULTILINGUAL_MENU
if (STRING_MULTIBYTE (item_name))
{
- item_name = string_make_unibyte (item_name);
+ item_name = ENCODE_SYSTEM (item_name);
AREF (menu_items, i + MENU_ITEMS_ITEM_NAME) = item_name;
}
if (STRINGP (descrip) && STRING_MULTIBYTE (descrip))
{
- descrip = string_make_unibyte (descrip);
+ descrip = ENCODE_SYSTEM (descrip);
AREF (menu_items, i + MENU_ITEMS_ITEM_EQUIV_KEY) = descrip;
}
#endif /* not HAVE_MULTILINGUAL_MENU */
wv->selected = !NILP (selected);
if (STRINGP (help))
- wv->help = XSTRING (help)->data;
-
+ wv->help = (char *) XSTRING (help)->data;
+ else
+ wv->help = NULL;
+
prev_wv = wv;
i += MENU_ITEMS_ITEM_LENGTH;
Lisp_Object items;
widget_value *wv, *first_wv, *prev_wv = 0;
int i;
+
LWLIB_ID id;
XSETFRAME (Vmenu_updating_frame, f);
#ifndef HAVE_MULTILINGUAL_MENU
if (STRINGP (pane_name) && STRING_MULTIBYTE (pane_name))
{
- pane_name = string_make_unibyte (pane_name);
+ pane_name = ENCODE_SYSTEM (pane_name);
AREF (menu_items, i + MENU_ITEMS_PANE_NAME) = pane_name;
}
#endif
#ifndef HAVE_MULTILINGUAL_MENU
if (STRINGP (item_name) && STRING_MULTIBYTE (item_name))
{
- item_name = string_make_unibyte (item_name);
+ item_name = ENCODE_SYSTEM (item_name);
AREF (menu_items, i + MENU_ITEMS_ITEM_NAME) = item_name;
}
if (STRINGP (descrip) && STRING_MULTIBYTE (descrip))
{
- descrip = string_make_unibyte (descrip);
+ descrip = ENCODE_SYSTEM (descrip);
AREF (menu_items, i + MENU_ITEMS_ITEM_EQUIV_KEY) = descrip;
}
#endif /* not HAVE_MULTILINGUAL_MENU */
abort ();
wv->selected = !NILP (selected);
- if (STRINGP (help))
- wv->help = XSTRING (help)->data;
-
+
+ if (STRINGP (help))
+ wv->help = (char *) XSTRING (help)->data;
+ else
+ wv->help = NULL;
+
prev_wv = wv;
i += MENU_ITEMS_ITEM_LENGTH;
#ifndef HAVE_MULTILINGUAL_MENU
if (STRING_MULTIBYTE (title))
- title = string_make_unibyte (title);
+ title = ENCODE_SYSTEM (title);
#endif
wv_title->name = (char *) XSTRING (title)->data;
- wv_title->enabled = True;
+ wv_title->enabled = TRUE;
wv_title->button_type = BUTTON_TYPE_NONE;
wv_title->next = wv_sep1;
first_wv->contents = wv_title;
pane_name = first_item[MENU_ITEMS_PANE_NAME];
else if (EQ (first_item[0], Qquote))
/* This shouldn't happen, see xmenu_show. */
- pane_name = build_string ("");
+ pane_name = empty_string;
else
pane_name = first_item[MENU_ITEMS_ITEM_NAME];