17
17
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18
18
* GNU General Public License for more details.
20
* You should have received a copy of the GNU General Public License
21
* along with this program; if not, write to the Free Software
22
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
20
* You should have received a copy of the GNU General Public License along
21
* with this program; if not, write to the Free Software Foundation, Inc.,
22
* 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
23
23
*****************************************************************************/
25
25
#ifndef X11_WINDOW_HPP
26
26
#define X11_WINDOW_HPP
28
28
#include <X11/Xlib.h>
29
#include <X11/Xatom.h>
31
#include "../src/generic_window.hpp"
30
32
#include "../src/os_window.hpp"
36
38
/// X11 implementation of OSWindow
37
39
class X11Window: public OSWindow
40
X11Window( intf_thread_t *pIntf, GenericWindow &rWindow,
41
X11Display &rDisplay, bool dragDrop, bool playOnDrop,
42
X11Window *pParentWindow );
47
virtual void show( int left, int top ) const;
50
virtual void hide() const;
53
virtual void moveResize( int left, int top,
54
int width, int height ) const;
56
/// Bring the window on top
57
virtual void raise() const;
59
/// Set the opacity of the window (0 = transparent, 255 = opaque)
60
virtual void setOpacity( uint8_t value ) const;
62
/// Toggle the window on top
63
virtual void toggleOnTop( bool onTop ) const;
66
Window getDrawable() const { return m_wnd; }
68
/// Getter for the handler
69
void* getOSHandle() const { return (void*) m_wnd; }
71
/// Getter for the handler
72
void* getParentOSHandle() const { return (void*) m_wnd_parent; }
74
/// reparent the window
75
void reparent( void* OSHandle, int x, int y, int w, int h );
79
X11Display &m_rDisplay;
86
/// Indicates whether the window handles drag&drop events
89
X11DragDrop *m_pDropTarget;
42
X11Window( intf_thread_t *pIntf, GenericWindow &rWindow,
43
X11Display &rDisplay, bool dragDrop, bool playOnDrop,
44
X11Window *pParentWindow, GenericWindow::WindowType_t );
49
virtual void show() const;
52
virtual void hide() const;
55
virtual void moveResize( int left, int top,
56
int width, int height ) const;
58
/// Bring the window on top
59
virtual void raise() const;
61
/// Set the opacity of the window (0 = transparent, 255 = opaque)
62
virtual void setOpacity( uint8_t value ) const;
64
/// Toggle the window on top
65
virtual void toggleOnTop( bool onTop ) const;
68
Window getDrawable() const { return m_wnd; }
70
/// Getter for the handler
71
void* getOSHandle() const { return (void*) m_wnd; }
73
/// Getter for the handler
74
void* getParentOSHandle() const { return (void*) m_wnd_parent; }
76
/// reparent the window
77
void reparent( void* OSHandle, int x, int y, int w, int h );
79
void setFullscreen() const;
83
X11Display &m_rDisplay;
90
/// Indicates whether the window handles drag&drop events
93
X11DragDrop *m_pDropTarget;
95
GenericWindow::WindowType_t m_type;