#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
// ----------------------------------------------------------------------------
void wxGetMousePosition( int* x, int* y )
{
+#if wxUSE_NANOX
+ // TODO
+ *x = 0;
+ *y = 0;
+#else
XMotionEvent xev;
Window root, child;
XQueryPointer((Display*) wxGetDisplay(),
&(xev.state));
*x = xev.x_root;
*y = xev.y_root;
+#endif
};
// Return TRUE if we have a colour display
return FALSE;
#endif
#ifdef __WXX11__
- Display* display = XOpenDisplay((const char*) display_name);
+ Display* display = XOpenDisplay((char*) display_name.c_str());
if (display)
{
void wxAllocNearestColor(Display *d,Colormap cmp,XColor *xc)
{
+#if !wxUSE_NANOX
int llp;
int screen = DefaultScreen(d);
*/
delete[] color_defs;
+#endif
}
void wxAllocColor(Display *d,Colormap cmp,XColor *xc)
#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
type = wxMin(35, type); type = wxMax(1, type);
wxString str(event_name[type]);
return str;
- }
+#endif
+}
#endif
#ifdef __WXMOTIF__
#endif
// __WXMOTIF__
+
+bool wxWindowIsVisible(Window win)
+{
+ XWindowAttributes wa;
+ XGetWindowAttributes(wxGlobalDisplay(), win, &wa);
+
+ return (wa.map_state == IsViewable);
+}