]> code.delx.au - gnu-emacs/commitdiff
(x_print_complete_resource_name) [0]: New function.
authorGerd Moellmann <gerd@gnu.org>
Fri, 23 Mar 2001 11:12:25 +0000 (11:12 +0000)
committerGerd Moellmann <gerd@gnu.org>
Fri, 23 Mar 2001 11:12:25 +0000 (11:12 +0000)
lwlib/lwlib-Xlw.c

index 4f29ab2b3e8aa6ad4801030cd738a7cfc9f1a066..7a56559577469f6d2f32ae754039e480033d8e6c 100644 (file)
@@ -30,6 +30,34 @@ Boston, MA 02111-1307, USA.  */
 #include <X11/Shell.h>
 #include "xlwmenu.h"
 
+#if 0
+
+#include <stdio.h>
+
+/* Print the complete X resource name of widget WIDGET to stderr.
+   This is sometimes handy to have available.  */
+
+void
+x_print_complete_resource_name (widget)
+     Widget widget;
+{
+  int i;
+  String names[100];
+
+  for (i = 0; i < 100 && widget != NULL; ++i)
+    {
+      names[i] = XtName (widget);
+      widget = XtParent (widget);
+    }
+
+  for (--i; i >= 1; --i)
+    fprintf (stderr, "%s.", names[i]);
+  fprintf (stderr, "%s\n", names[0]);
+}
+
+#endif /* 0 */
+
+
 \f/* Menu callbacks */
 
 /* Callback XtNhighlightCallback for Lucid menus.  W is the menu