/* Defines some widget utility functions.
+
Copyright (C) 1992 Lucid, Inc.
-Copyright (C) 1994, 2001-2011 Free Software Foundation, Inc.
+Copyright (C) 1994, 2001-2016 Free Software Foundation, 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
-
-/* Definitions of these in config.h can cause
- declaration conflicts later on between declarations for index
- and declarations for strchr. This file doesn't use
- index and rindex, so cancel them. */
-#undef index
-#undef rindex
#include <setjmp.h>
-#include "../src/lisp.h"
+#include <lisp.h>
#include <X11/Xatom.h>
#include <X11/IntrinsicP.h>
XtApplyToWidgets (kids [i], proc, arg);
proc (kids [i], arg);
}
- free (kids);
+ xfree (kids);
}
}
return NULL;
}
n = cw->composite.num_children;
- result = (Widget*)XtMalloc (n * sizeof (Widget));
+ result = (Widget*)(void*)XtMalloc (n * sizeof (Widget));
*number = n;
for (i = 0; i < n; i++)
result [i] = cw->composite.children [i];
{
return widget->core.being_destroyed;
}
-
-void
-XtSafelyDestroyWidget (Widget widget)
-{
-#if 0
-
- /* this requires IntrinsicI.h (actually, InitialI.h) */
-
- XtAppContext app = XtWidgetToApplicationContext(widget);
-
- if (app->dispatch_level == 0)
- {
- app->dispatch_level = 1;
- XtDestroyWidget (widget);
- /* generates an event so that the event loop will be called */
- XChangeProperty (XtDisplay (widget), XtWindow (widget),
- XA_STRING, XA_STRING, 32, PropModeAppend, NULL, 0);
- app->dispatch_level = 0;
- }
- else
- XtDestroyWidget (widget);
-
-#else
- abort ();
-#endif
-}
-