#pragma message disable nosimpint
#endif
-#ifdef __WXMOTIF__
-#include <Xm/Xm.h>
-#endif
-
-#ifdef __VMS__
-#pragma message enable nosimpint
-#endif
-
#include "wx/unix/execute.h"
#ifdef __WXMOTIF__
+#include <Xm/Xm.h>
#include "wx/motif/private.h"
#endif
#include "wx/x11/private.h"
#endif
+#if wxUSE_RESOURCES
#include "X11/Xresource.h"
+#endif
+
#include "X11/Xutil.h"
+#ifdef __VMS__
+#pragma message enable nosimpint
+#endif
+
// ----------------------------------------------------------------------------
// private functions
// ----------------------------------------------------------------------------
XtRemoveInput(*id);
}
+#endif
int wxAddProcessCallback(wxEndProcessData *proc_data, int fd)
{
+#ifdef __WXMOTIF__
XtInputId id = XtAppAddInput((XtAppContext) wxTheApp->GetAppContext(),
fd,
(XtPointer *) XtInputReadMask,
(XtPointer) proc_data);
return (int)id;
-}
#endif
+#ifdef __WXX11__
+ // TODO
+ return 0;
+#endif
+}
// ----------------------------------------------------------------------------
// misc
}
}
+#ifdef __WXDEBUG__
+wxString wxGetXEventName(XEvent& event)
+{
+ 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
+
#ifdef __WXMOTIF__
// ----------------------------------------------------------------------------
// accelerators
*/
- wxBuffer[0] = '\0';
+ static char buf[256];
+ buf[0] = '\0';
char *tmp = copystring (s);
s = tmp;
char *p = tmp;
if (*p)
{
*p = '\0';
- if (wxBuffer[0])
- strcat (wxBuffer, " ");
+ if (buf[0])
+ strcat (buf, " ");
if (strcmp (s, "Alt"))
- strcat (wxBuffer, s);
+ strcat (buf, s);
else
- strcat (wxBuffer, "Meta");
+ strcat (buf, "Meta");
s = p++;
}
else
{
- strcat (wxBuffer, "<Key>");
- strcat (wxBuffer, s);
+ strcat (buf, "<Key>");
+ strcat (buf, s);
break;
}
}
delete[]tmp;
- return wxBuffer;
+ return buf;
#endif
}
#endif
// __WXMOTIF__
+
+bool wxWindowIsVisible(Window win)
+{
+ XWindowAttributes wa;
+ XGetWindowAttributes(wxGlobalDisplay(), win, &wa);
+
+ return (wa.map_state == IsViewable);
+}