/* X Communication module for terminals which understand the X protocol.
Copyright (C) 1986, 1988, 1993, 1994, 1996, 1999, 2000, 2001, 2002, 2003,
- 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
+ 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software Foundation, Inc.
This file is part of GNU Emacs.
#include <X11/Xaw/Paned.h>
#endif /* HAVE_XAW3D */
#endif /* USE_LUCID */
+#ifdef USE_MOTIF
+#include "../lwlib/lwlib.h"
+#endif
#else /* not USE_X_TOOLKIT */
#ifndef USE_GTK
#include "../oldXMenu/XMenu.h"
#if defined (USE_X_TOOLKIT) || defined (USE_GTK)
static Lisp_Object xdialog_show (FRAME_PTR, int, Lisp_Object, Lisp_Object,
- char **);
+ const char **);
#endif
static int update_frame_menubar (struct frame *);
#else
{
Lisp_Object title;
- char *error_name;
+ const char *error_name;
Lisp_Object selection;
int specpdl_count = SPECPDL_INDEX ();
apply_systemfont_to_dialog (Widget w)
{
const char *fn = xsettings_get_system_normal_font ();
- if (fn)
+ if (fn)
{
XrmDatabase db = XtDatabase (XtDisplay (w));
if (db)
string = XVECTOR (items)->contents[i + 1];
if (NILP (string))
break;
- wv->name = (char *) SDATA (string);
+ wv->name = SSDATA (string);
update_submenu_strings (wv->contents);
wv = wv->next;
}
break;
wv = xmalloc_widget_value ();
- wv->name = (char *) SDATA (string);
+ wv->name = SSDATA (string);
wv->value = 0;
wv->enabled = 1;
wv->button_type = BUTTON_TYPE_NONE;
Lisp_Object
xmenu_show (FRAME_PTR f, int x, int y, int for_click, int keymaps,
- Lisp_Object title, char **error, EMACS_UINT timestamp)
+ Lisp_Object title, const char **error, EMACS_UINT timestamp)
{
int i;
widget_value *wv, *save_wv = 0, *first_wv = 0, *prev_wv = 0;
{
/* 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);
}
#endif
pane_string = (NILP (pane_name)
- ? "" : (char *) SDATA (pane_name));
+ ? "" : SSDATA (pane_name));
/* If there is just one top-level pane, put all its items directly
under the top-level menu. */
if (menu_items_n_panes == 1)
prev_wv->next = wv;
else
save_wv->contents = wv;
- wv->name = (char *) SDATA (item_name);
+ wv->name = SSDATA (item_name);
if (!NILP (descrip))
- wv->key = (char *) SDATA (descrip);
+ wv->key = SSDATA (descrip);
wv->value = 0;
/* If this item has a null value,
make the call_data null so that it won't display a box
title = ENCODE_MENU_STRING (title);
#endif
- wv_title->name = (char *) SDATA (title);
+ wv_title->name = SSDATA (title);
wv_title->enabled = TRUE;
wv_title->button_type = BUTTON_TYPE_NONE;
wv_title->help = Qnil;
#endif /* not USE_GTK */
-static char * button_names [] = {
+static const char * button_names [] = {
"button1", "button2", "button3", "button4", "button5",
"button6", "button7", "button8", "button9", "button10" };
static Lisp_Object
-xdialog_show (FRAME_PTR f, int keymaps, Lisp_Object title, Lisp_Object header, char **error_name)
+xdialog_show (FRAME_PTR f,
+ int keymaps,
+ Lisp_Object title,
+ Lisp_Object header,
+ const char **error_name)
{
int i, nb_buttons=0;
char dialog_name[6];
representing the text label and buttons. */
{
Lisp_Object pane_name, prefix;
- char *pane_string;
+ const char *pane_string;
pane_name = XVECTOR (menu_items)->contents[MENU_ITEMS_PANE_NAME];
prefix = XVECTOR (menu_items)->contents[MENU_ITEMS_PANE_PREFIX];
pane_string = (NILP (pane_name)
- ? "" : (char *) SDATA (pane_name));
+ ? "" : SSDATA (pane_name));
prev_wv = xmalloc_widget_value ();
prev_wv->value = pane_string;
if (keymaps && !NILP (prefix))
prev_wv->next = wv;
wv->name = (char *) button_names[nb_buttons];
if (!NILP (descrip))
- wv->key = (char *) SDATA (descrip);
- wv->value = (char *) SDATA (item_name);
+ wv->key = SSDATA (descrip);
+ wv->value = SSDATA (item_name);
wv->call_data = (void *) &XVECTOR (menu_items)->contents[i];
wv->enabled = !NILP (enable);
wv->help = Qnil;
Lisp_Object
xmenu_show (FRAME_PTR f, int x, int y, int for_click, int keymaps,
- Lisp_Object title, char **error, EMACS_UINT timestamp)
+ Lisp_Object title, const char **error, EMACS_UINT timestamp)
{
Window root;
XMenu *menu;
pane_name = XVECTOR (menu_items)->contents[i + MENU_ITEMS_PANE_NAME];
prefix = XVECTOR (menu_items)->contents[i + MENU_ITEMS_PANE_PREFIX];
pane_string = (NILP (pane_name)
- ? "" : (char *) SDATA (pane_name));
+ ? "" : SSDATA (pane_name));
if (keymaps && !NILP (prefix))
pane_string++;
#endif /* HAVE_MENUS */
-/* Detect if a dialog or menu has been posted. */
+#ifndef MSDOS
+/* Detect if a dialog or menu has been posted. MSDOS has its own
+ implementation on msdos.c. */
int
popup_activated (void)
{
return popup_activated_flag;
}
+#endif /* not MSDOS */
/* The following is used by delayed window autoselection. */
defsubr (&Sx_popup_dialog);
#endif
}
-
-/* arch-tag: 92ea573c-398e-496e-ac73-2436f7d63242
- (do not change this comment) */