X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/c2c0dabfa61fc435265f3dc71122592d359f0119..5d57348ef570e5bce5b5148ba63f910c65a9b8dd:/include/wx/x11/privx.h diff --git a/include/wx/x11/privx.h b/include/wx/x11/privx.h index c8c63f63b8..ef445f3ba3 100644 --- a/include/wx/x11/privx.h +++ b/include/wx/x11/privx.h @@ -14,26 +14,32 @@ #include "wx/defs.h" #include "wx/utils.h" +#include "wx/colour.h" + +#if defined( __cplusplus ) && defined( __VMS ) +#pragma message disable nosimpint +#endif #include "X11/Xlib.h" #include "X11/Xatom.h" #include "X11/Xutil.h" +#if defined( __cplusplus ) && defined( __VMS ) +#pragma message enable nosimpint +#endif -class wxMouseEvent; -class wxKeyEvent; -class wxWindow; +class WXDLLIMPEXP_FWD_CORE wxMouseEvent; +class WXDLLIMPEXP_FWD_CORE wxKeyEvent; +class WXDLLIMPEXP_FWD_CORE wxWindow; +class WXDLLIMPEXP_FWD_CORE wxRegion; // ---------------------------------------------------------------------------- // key events related functions // ---------------------------------------------------------------------------- -extern int wxCharCodeXToWX(KeySym keySym); -extern KeySym wxCharCodeWXToX(int id); - -int wxGetBestMatchingPixel(Display *display, XColor *desiredColor, Colormap cmap); +WXPixel wxGetBestMatchingPixel(Display *display, XColor *desiredColor, Colormap cmap); Pixmap XCreateInsensitivePixmap( Display *display, Pixmap pixmap ); extern XColor g_itemColors[]; -extern int wxComputeColours (Display *display, wxColour * back, wxColour * fore); +extern int wxComputeColours (Display *display, const wxColour * back, const wxColour * fore); // For convenience inline Display* wxGlobalDisplay() { return (Display*) wxGetDisplay(); } @@ -58,9 +64,7 @@ void wxAllocNearestColor(Display *display,Colormap colormap,XColor *xcolor); void wxAllocColor(Display *display,Colormap colormap,XColor *xcolor); // For debugging -#ifdef __WXDEBUG__ wxString wxGetXEventName(XEvent& event); -#endif // Is the window visible? bool wxWindowIsVisible(Window win); @@ -133,5 +137,37 @@ bool wxWindowIsVisible(Window win); #define XFontStructGetAscent(f) f->ascent #endif -#endif -// _WX_PRIVX_H_ +// ---------------------------------------------------------------------------- +// Misc functions +// ---------------------------------------------------------------------------- + +bool wxDoSetShape( Display* xdisplay, Window xwindow, const wxRegion& region ); + +class WXDLLIMPEXP_CORE wxXVisualInfo +{ +public: + wxXVisualInfo(); + ~wxXVisualInfo(); + void Init( Display* dpy, XVisualInfo* visualInfo ); + + int m_visualType; // TrueColor, DirectColor etc. + int m_visualDepth; + int m_visualColormapSize; + void *m_visualColormap; + int m_visualScreen; + unsigned long m_visualRedMask; + unsigned long m_visualGreenMask; + unsigned long m_visualBlueMask; + int m_visualRedShift; + int m_visualGreenShift; + int m_visualBlueShift; + int m_visualRedPrec; + int m_visualGreenPrec; + int m_visualBluePrec; + + unsigned char *m_colorCube; +}; + +bool wxFillXVisualInfo( wxXVisualInfo* vi, Display* dpy ); + +#endif // _WX_PRIVX_H_