+#ifdef __WXDEBUG__
+wxString wxGetXEventName(XEvent& event)
+{
+#if wxUSE_NANOX
+ wxString str(wxT("(some event)"));
+ return str;
+#else
+ int type = event.xany.type;
+ static char* event_name[] = {
+ "", "unknown(-)", // 0-1
+ "KeyPress", "KeyRelease", "ButtonPress", "ButtonRelease", // 2-5
+ "MotionNotify", "EnterNotify", "LeaveNotify", "FocusIn", // 6-9
+ "FocusOut", "KeymapNotify", "Expose", "GraphicsExpose", // 10-13
+ "NoExpose", "VisibilityNotify", "CreateNotify", // 14-16
+ "DestroyNotify", "UnmapNotify", "MapNotify", "MapRequest",// 17-20
+ "ReparentNotify", "ConfigureNotify", "ConfigureRequest", // 21-23
+ "GravityNotify", "ResizeRequest", "CirculateNotify", // 24-26
+ "CirculateRequest", "PropertyNotify", "SelectionClear", // 27-29
+ "SelectionRequest", "SelectionNotify", "ColormapNotify", // 30-32
+ "ClientMessage", "MappingNotify", // 33-34
+ "unknown(+)"}; // 35
+ type = wxMin(35, type); type = wxMax(1, type);
+ wxString str(event_name[type]);
+ return str;
+#endif
+}
+#endif
+
+#ifdef __WXMOTIF__
+// ----------------------------------------------------------------------------
+// accelerators
+// ----------------------------------------------------------------------------
+
+// Find the letter corresponding to the mnemonic, for Motif
+char wxFindMnemonic (const char *s)
+{
+ char mnem = 0;
+ int len = strlen (s);
+ int i;
+ for (i = 0; i < len; i++)
+ {
+ if (s[i] == '&')
+ {
+ // Carefully handle &&
+ if ((i + 1) <= len && s[i + 1] == '&')
+ i++;
+ else
+ {
+ mnem = s[i + 1];
+ break;
+ }
+ }
+ }
+ return mnem;
+}
+
+char * wxFindAccelerator (const char *s)
+{
+ // VZ: this function returns incorrect keysym which completely breaks kbd
+ // handling
+ return NULL;
+
+#if 0
+ // The accelerator text is after the \t char.
+ while (*s && *s != '\t')
+ s++;
+ if (*s == '\0')
+ return (NULL);
+ s++;
+ /*
+ Now we need to format it as X standard:
+
+ input output
+
+ F7 --> <Key>F7
+ Ctrl+N --> Ctrl<Key>N
+ Alt+k --> Meta<Key>k
+ Ctrl+Shift+A --> Ctrl Shift<Key>A
+
+ */
+
+ static char buf[256];
+ buf[0] = '\0';
+ char *tmp = copystring (s);
+ s = tmp;
+ char *p = tmp;
+
+ while (1)
+ {
+ while (*p && *p != '+')
+ p++;
+ if (*p)
+ {
+ *p = '\0';
+ if (buf[0])
+ strcat (buf, " ");
+ if (strcmp (s, "Alt"))
+ strcat (buf, s);
+ else
+ strcat (buf, "Meta");
+ s = p++;
+ }
+ else
+ {
+ strcat (buf, "<Key>");
+ strcat (buf, s);
+ break;
+ }
+ }
+ delete[]tmp;
+ return buf;
+#endif
+}
+
+XmString wxFindAcceleratorText (const char *s)
+{
+ // VZ: this function returns incorrect keysym which completely breaks kbd
+ // handling
+ return NULL;
+
+#if 0
+ // The accelerator text is after the \t char.
+ while (*s && *s != '\t')
+ s++;
+ if (*s == '\0')
+ return (NULL);
+ s++;
+ XmString text = XmStringCreateSimple ((char *)s);
+ return text;
+#endif
+}
+