/* The lwlib interface to Motif widgets.
-Copyright (C) 1994-1997, 1999-2011 Free Software Foundation, Inc.
+Copyright (C) 1994-1997, 1999-2015 Free Software Foundation, Inc.
Copyright (C) 1992 Lucid, Inc.
This file is part of the Lucid Widget Library.
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
-along with GNU Emacs; see the file COPYING. If not, write to
-the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
-Boston, MA 02110-1301, USA. */
+along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
-#ifdef HAVE_CONFIG_H
#include <config.h>
-#endif
#include <unistd.h>
#include <stdio.h>
Boolean);
static void free_destroyed_instance (destroyed_instance*);
Widget first_child (Widget);
-Boolean lw_motif_widget_p (Widget);
static XmString resource_motif_string (Widget, char *);
static void destroy_all_children (Widget, int);
static void xm_update_label (widget_instance *, Widget, widget_value *);
static void xm_update_text (widget_instance *, Widget, widget_value *);
static void xm_update_text_field (widget_instance *, Widget,
widget_value *);
-void xm_update_one_value (widget_instance *, Widget, widget_value *);
static void activate_button (Widget, XtPointer, XtPointer);
static Widget make_dialog (char *, Widget, Boolean, char *, char *,
Boolean, Boolean, Boolean, int, int);
static void mark_dead_instance_destroyed (Widget, XtPointer, XtPointer);
static void recenter_widget (Widget);
static Widget recycle_instance (destroyed_instance*);
-Widget xm_create_dialog (widget_instance*);
static Widget make_menubar (widget_instance*);
static void remove_grabs (Widget, XtPointer, XtPointer);
static Widget make_popup_menu (widget_instance*);
static Widget make_main (widget_instance*);
-void xm_destroy_instance (widget_instance*);
-void xm_popup_menu (Widget, XEvent *);
static void set_min_dialog_size (Widget);
static void do_call (Widget, XtPointer, enum do_call_type);
static void xm_generic_callback (Widget, XtPointer, XtPointer);
static void xm_nosel_callback (Widget, XtPointer, XtPointer);
static void xm_pull_down_callback (Widget, XtPointer, XtPointer);
static void xm_pop_down_callback (Widget, XtPointer, XtPointer);
-void xm_set_keyboard_focus (Widget, Widget);
-void xm_set_main_areas (Widget, Widget, Widget);
static void xm_internal_update_other_instances (Widget, XtPointer,
XtPointer);
static void xm_arm_callback (Widget, XtPointer, XtPointer);
{
destroyed_instance* instance =
(destroyed_instance*) xmalloc (sizeof (destroyed_instance));
- instance->name = safe_strdup (name);
- instance->type = safe_strdup (type);
+ instance->name = xstrdup (name);
+ instance->type = xstrdup (type);
instance->widget = widget;
instance->parent = parent;
instance->pop_up_p = pop_up_p;
int child_index;
widget_value* cur;
Widget button = 0;
- Widget title = 0;
Widget menu;
Arg al [256];
int ac;
{
ac = 0;
XtSetArg (al[ac], XmNalignment, XmALIGNMENT_CENTER); ac++;
- title = button = XmCreateLabel (widget, cur->name, al, ac);
+ button = XmCreateLabel (widget, cur->name, al, ac);
}
else if (lw_separator_p (cur->name, &separator, 1))
{
XtVaGetValues (toggle, XmNset, &set, NULL);
if (set)
- {
- xfree (val->value);
- val->value = safe_strdup (XtName (toggle));
- }
+ dupstring (&val->value, XtName (toggle));
}
val->edited = True;
}
if (pos_list [j] == i)
{
cur->selected = True;
- val->value = safe_strdup (cur->name);
+ val->value = xstrdup (cur->name);
}
}
val->edited = 1;