1 /////////////////////////////////////////////////////////////////////////////
2 // Name: wx/unix/utilsx11.h
3 // Purpose: Miscellaneous X11 functions
4 // Author: Mattia Barbon, Vaclav Slavik, Vadim Zeitlin
7 // Copyright: (c) wxWidgets team
8 // (c) 2010 Vadim Zeitlin
9 // Licence: wxWindows licence
10 /////////////////////////////////////////////////////////////////////////////
12 #ifndef _WX_UNIX_UTILSX11_H_
13 #define _WX_UNIX_UTILSX11_H_
16 #include "wx/gdicmn.h"
20 // NB: Content of this header is for wxWidgets' private use! It is not
21 // part of public API and may be modified or even disappear in the future!
23 #if defined(__WXMOTIF__) || defined(__WXGTK__) || defined(__WXX11__)
25 #if defined(__WXGTK__)
26 typedef void WXDisplay
;
27 typedef void* WXWindow
;
29 typedef unsigned long WXKeySym
;
31 int wxCharCodeXToWX(WXKeySym keySym
);
32 WXKeySym
wxCharCodeWXToX(int id
);
36 void wxSetIconsX11( WXDisplay
* display
, WXWindow window
,
37 const wxIconBundle
& ib
);
40 enum wxX11FullScreenMethod
42 wxX11_FS_AUTODETECT
= 0,
48 wxX11FullScreenMethod
wxGetFullScreenMethodX11(WXDisplay
* display
,
51 void wxSetFullScreenStateX11(WXDisplay
* display
, WXWindow rootWindow
,
52 WXWindow window
, bool show
, wxRect
*origSize
,
53 wxX11FullScreenMethod method
);
56 // Class wrapping X11 Display: it opens it in ctor and closes it in dtor.
60 wxX11Display() { m_dpy
= XOpenDisplay(NULL
); }
61 ~wxX11Display() { if ( m_dpy
) XCloseDisplay(m_dpy
); }
63 operator Display
*() const { return m_dpy
; }
65 // Using DefaultRootWindow() with an object of wxX11Display class doesn't
66 // compile because it is a macro which tries to cast wxX11Display so
67 // provide a convenient helper.
68 Window
DefaultRoot() const { return DefaultRootWindow(m_dpy
); }
73 wxDECLARE_NO_COPY_CLASS(wxX11Display
);
76 #endif // __WXMOTIF__, __WXGTK__, __WXX11__
78 #endif // _WX_UNIX_UTILSX11_H_