Skip to content

Commit

Permalink
Window focus: Added empty implementations for Android and iOS
Browse files Browse the repository at this point in the history
  • Loading branch information
Bromeon committed Oct 6, 2014
1 parent 4155b2e commit 93d2789
Show file tree
Hide file tree
Showing 4 changed files with 60 additions and 0 deletions.
15 changes: 15 additions & 0 deletions src/SFML/Window/Android/WindowImplAndroid.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,21 @@ void WindowImplAndroid::setKeyRepeatEnabled(bool enabled)
}


////////////////////////////////////////////////////////////
void WindowImplAndroid::requestFocus()
{
// Not applicable
}


////////////////////////////////////////////////////////////
bool WindowImplAndroid::hasFocus() const
{
// Not applicable
return false;
}


////////////////////////////////////////////////////////////
void WindowImplAndroid::forwardEvent(const Event& event)
{
Expand Down
15 changes: 15 additions & 0 deletions src/SFML/Window/Android/WindowImplAndroid.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,21 @@ class WindowImplAndroid : public WindowImpl
////////////////////////////////////////////////////////////
virtual void setKeyRepeatEnabled(bool enabled);

////////////////////////////////////////////////////////////
/// \brief Request the current window to be made the active
/// foreground window
///
////////////////////////////////////////////////////////////
virtual void requestFocus();

////////////////////////////////////////////////////////////
/// \brief Check whether the window has the input focus
///
/// \return True if window has focus, false otherwise
///
////////////////////////////////////////////////////////////
virtual bool hasFocus() const;

static void forwardEvent(const Event& event);
static WindowImplAndroid* singleInstance;

Expand Down
15 changes: 15 additions & 0 deletions src/SFML/Window/iOS/WindowImplUIKit.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,21 @@ class WindowImplUIKit : public WindowImpl
////////////////////////////////////////////////////////////
virtual void setKeyRepeatEnabled(bool enabled);

////////////////////////////////////////////////////////////
/// \brief Request the current window to be made the active
/// foreground window
///
////////////////////////////////////////////////////////////
virtual void requestFocus();

////////////////////////////////////////////////////////////
/// \brief Check whether the window has the input focus
///
/// \return True if window has focus, false otherwise
///
////////////////////////////////////////////////////////////
virtual bool hasFocus() const;

public:

using WindowImpl::pushEvent;
Expand Down
15 changes: 15 additions & 0 deletions src/SFML/Window/iOS/WindowImplUIKit.mm
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,21 @@
// Not applicable
}


////////////////////////////////////////////////////////////
void WindowImplUIKit::requestFocus()
{
// Not applicable
}


////////////////////////////////////////////////////////////
bool WindowImplUIKit::hasFocus() const
{
// Not applicable
return false;
}


////////////////////////////////////////////////////////////
SFView* WindowImplUIKit::getGlView() const
Expand Down

0 comments on commit 93d2789

Please sign in to comment.