summaryrefslogtreecommitdiff
path: root/src/SFML/Window/Linux/WindowImplX11.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/SFML/Window/Linux/WindowImplX11.hpp')
-rwxr-xr-xsrc/SFML/Window/Linux/WindowImplX11.hpp52
1 files changed, 33 insertions, 19 deletions
diff --git a/src/SFML/Window/Linux/WindowImplX11.hpp b/src/SFML/Window/Linux/WindowImplX11.hpp
index 151f84b..8c31621 100755
--- a/src/SFML/Window/Linux/WindowImplX11.hpp
+++ b/src/SFML/Window/Linux/WindowImplX11.hpp
@@ -59,22 +59,22 @@ public :
////////////////////////////////////////////////////////////
/// Construct the window implementation from an existing control
///
- /// \param Handle : Platform-specific handle of the control
- /// \param AntialiasingLevel : Level of antialiasing (0 by default - disabled)
+ /// \param Handle : Platform-specific handle of the control
+ /// \param Params : Creation settings
///
////////////////////////////////////////////////////////////
- WindowImplX11(WindowHandle Handle, int AntialiasingLevel = 0);
+ WindowImplX11(WindowHandle Handle, WindowSettings& Params);
////////////////////////////////////////////////////////////
/// Create the window implementation
///
- /// \param Mode : Video mode to use
- /// \param Title : Title of the window
- /// \param WindowStyle : Window style (resizable, fixed, or fullscren)
- /// \param AntialiasingLevel : Level of antialiasing (0 by default - disabled)
+ /// \param Mode : Video mode to use
+ /// \param Title : Title of the window
+ /// \param WindowStyle : Window style (resizable, fixed, or fullscren)
+ /// \param Params : Creation settings
///
////////////////////////////////////////////////////////////
- WindowImplX11(VideoMode Mode, const std::string& Title, unsigned long WindowStyle, int AntialiasingLevel = 0);
+ WindowImplX11(VideoMode Mode, const std::string& Title, unsigned long WindowStyle, WindowSettings& Params);
////////////////////////////////////////////////////////////
/// Destructor
@@ -99,10 +99,10 @@ private :
virtual void ProcessEvents();
////////////////////////////////////////////////////////////
- /// /see WindowImpl::MakeCurrent
+ /// /see WindowImpl::MakeActive
///
////////////////////////////////////////////////////////////
- virtual void MakeCurrent() const;
+ virtual void MakeActive(bool Active = true) const;
////////////////////////////////////////////////////////////
/// /see WindowImpl::UseVerticalSync
@@ -135,19 +135,32 @@ private :
virtual void Show(bool State);
////////////////////////////////////////////////////////////
+ /// /see sfWindowImpl::EnableKeyRepeat
+ ///
+ ////////////////////////////////////////////////////////////
+ virtual void EnableKeyRepeat(bool Enabled);
+
+ ////////////////////////////////////////////////////////////
+ /// Switch to fullscreen mode
+ ///
+ /// \param Mode : video mode to switch to
+ ///
+ ////////////////////////////////////////////////////////////
+ void SwitchToFullscreen(const VideoMode& Mode);
+
+ ////////////////////////////////////////////////////////////
/// Create the OpenGL rendering context
///
- /// \param Mode : Video mode to use
- /// \param Fullscreen : True to set fullscreen, false to stay in windowed mode
- /// \param ChosenVisual : Visual that has been chosen for creating the contexte
- /// \param AntialiasingLevel : Level of antialiasing (0 to disable it)
- /// \param Template : Visual infos to match
- /// \param Mask : Visual attributes to check in Template
+ /// \param Mode : Video mode to use
+ /// \param ChosenVisual : Visual that has been chosen for creating the contexte
+ /// \param Params : Creation parameters
+ /// \param Template : Visual infos to match
+ /// \param Mask : Visual attributes to check in Template
///
/// \return True on success, false on error
///
////////////////////////////////////////////////////////////
- bool CreateContext(VideoMode Mode, bool Fullscreen, XVisualInfo& ChosenVisual, int AntialiasingLevel, XVisualInfo Template = XVisualInfo(), unsigned long Mask = 0);
+ bool CreateContext(const VideoMode& Mode, XVisualInfo& ChosenVisual, WindowSettings& Params, XVisualInfo Template = XVisualInfo(), unsigned long Mask = 0);
////////////////////////////////////////////////////////////
/// Do some common initializations after the window has been created
@@ -218,20 +231,21 @@ private :
////////////////////////////////////////////////////////////
static ::Display* ourDisplay; ///< Current opened display
static int ourScreen; ///< Default screen on the opened display
- static WindowImplX11* ourDummyWindow; ///< Pointer to the dummy window
static WindowImplX11* ourFullscreenWindow; ///< Keep track of the active fullscreen window
static unsigned int ourWindowsCount; ///< Number of windows created
static unsigned long ourEventMask; ///< Mask defining the events that will be caught by our windows
+ static XIM ourInputMethod; ///< Input object used to get unicode characters from keypress messages
////////////////////////////////////////////////////////////
// Member data
////////////////////////////////////////////////////////////
- Window myWindow; ///< X11 structure defining our window
+ ::Window myWindow; ///< X11 structure defining our window
bool myIsExternal; ///< Tell whether the window has been created externally or by SFML
GLXContext myGLContext; ///< OpenGL context attached to the window
Atom myAtomClose; ///< Atom used to identify the close event
int myOldVideoMode; ///< Video mode in use before we switch to fullscreen
Cursor myHiddenCursor; ///< As X11 doesn't provide cursor hidding, we must create a transparent one
+ XIC myInputContext; ///< Input context used to get unicode input in our window
};
} // namespace priv