Source

pyGAP / game / inc / platform / x11 / window_x11.h

Full commit
#ifndef _PLATFORM_X11_WINDOW_X11_
#define _PLATFORM_X11_WINDOW_X11_

#include "platform/window.h"

#include <X11/Xlib.h>
#include <X11/Xutil.h>
#include <X11/extensions/Xrandr.h>


namespace platform {
namespace x11 {
class Display;


class WindowX11: public Window
{
public:
    WindowX11(::Display* display, ::Window root_window);
    virtual ~WindowX11();

    int manage_events();
    ::Window get_window() { return window_; }

private:
    WindowX11(const WindowX11&);
    WindowX11& operator=(const WindowX11&);


protected:
    ::Cursor make_blank_cursor();
    void remove_cursor();
    void restore_cursor();

    // X Window related members
    ::Display*      display_;
    ::Window        root_window_;
    ::Window        window_;
    ::Colormap      color_map_;
    ::XVisualInfo   *visual_info_;

    // Window manager related members
    ::Atom          wm_delete_;
    ::Atom          wm_protocol_;

    // X window inputs related members
    unsigned char   key_map_[32];
};


} //namespace x11
} //namespace platform


#endif // _PLATFORM_X11_WINDOW_X11_