diff --git a/examples/common/entry/entry.h b/examples/common/entry/entry.h index 36dbd84e..5b40b7f4 100644 --- a/examples/common/entry/entry.h +++ b/examples/common/entry/entry.h @@ -146,6 +146,11 @@ namespace entry bool processEvents(uint32_t& _width, uint32_t& _height, uint32_t& _debug, uint32_t& _reset, MouseState* _mouse = NULL); + void setWindowSize(uint32_t _width, uint32_t _height); + bool setWindowTitle(const char* _title); + void toggleWindowFrame(); + void setMouseLock(bool _lock); + bx::FileReaderI* getFileReader(); bx::FileWriterI* getFileWriter(); diff --git a/examples/common/entry/entry_android.cpp b/examples/common/entry/entry_android.cpp index 6586be50..16847e4a 100644 --- a/examples/common/entry/entry_android.cpp +++ b/examples/common/entry/entry_android.cpp @@ -207,6 +207,11 @@ namespace entry BX_UNUSED(_width, _height); } + bool setWindowTitle(const char* _title) + { + BX_UNUSED(_title); + } + void toggleWindowFrame() { } diff --git a/examples/common/entry/entry_asmjs.cpp b/examples/common/entry/entry_asmjs.cpp index c6b84cae..1e0c32df 100644 --- a/examples/common/entry/entry_asmjs.cpp +++ b/examples/common/entry/entry_asmjs.cpp @@ -24,6 +24,11 @@ namespace entry { } + bool setWindowTitle(const char* _title) + { + BX_UNUSED(_title); + } + void toggleWindowFrame() { } diff --git a/examples/common/entry/entry_ios.mm b/examples/common/entry/entry_ios.mm index e35c7ef2..ebca9267 100644 --- a/examples/common/entry/entry_ios.mm +++ b/examples/common/entry/entry_ios.mm @@ -86,6 +86,11 @@ namespace entry BX_UNUSED(_width, _height); } + bool setWindowTitle(const char* _title) + { + BX_UNUSED(_title); + } + void toggleWindowFrame() { } diff --git a/examples/common/entry/entry_linux.cpp b/examples/common/entry/entry_linux.cpp index a4361eae..27e80453 100644 --- a/examples/common/entry/entry_linux.cpp +++ b/examples/common/entry/entry_linux.cpp @@ -326,6 +326,11 @@ namespace entry XSendEvent(s_ctx.m_display, s_ctx.m_window, false, ResizeRedirectMask, (XEvent*)&ev); } + bool setWindowTitle(const char* _title) + { + BX_UNUSED(_title); + } + void toggleWindowFrame() { } diff --git a/examples/common/entry/entry_nacl.cpp b/examples/common/entry/entry_nacl.cpp index 72536ac6..d06b3f5e 100644 --- a/examples/common/entry/entry_nacl.cpp +++ b/examples/common/entry/entry_nacl.cpp @@ -61,6 +61,11 @@ namespace entry BX_UNUSED(_width, _height); } + bool setWindowTitle(const char* _title) + { + BX_UNUSED(_title); + } + void toggleWindowFrame() { } diff --git a/examples/common/entry/entry_osx.mm b/examples/common/entry/entry_osx.mm index 5ef7ba46..53cf0a31 100644 --- a/examples/common/entry/entry_osx.mm +++ b/examples/common/entry/entry_osx.mm @@ -281,6 +281,11 @@ namespace entry BX_UNUSED(_width, _height); } + bool setWindowTitle(const char* _title) + { + BX_UNUSED(_title); + } + void toggleWindowFrame() { } diff --git a/examples/common/entry/entry_p.h b/examples/common/entry/entry_p.h index 140e7d15..4125b09a 100644 --- a/examples/common/entry/entry_p.h +++ b/examples/common/entry/entry_p.h @@ -70,10 +70,6 @@ namespace entry const Event* poll(); void release(const Event* _event); - void setWindowSize(uint32_t _width, uint32_t _height); - void toggleWindowFrame(); - void setMouseLock(bool _lock); - class EventQueue { public: diff --git a/examples/common/entry/entry_qnx.cpp b/examples/common/entry/entry_qnx.cpp index df015d0a..1cdd0e22 100644 --- a/examples/common/entry/entry_qnx.cpp +++ b/examples/common/entry/entry_qnx.cpp @@ -25,6 +25,11 @@ namespace entry { } + bool setWindowTitle(const char* _title) + { + BX_UNUSED(_title); + } + void toggleWindowFrame() { } diff --git a/examples/common/entry/entry_sdl.cpp b/examples/common/entry/entry_sdl.cpp index f053a1cf..d7bcc0df 100644 --- a/examples/common/entry/entry_sdl.cpp +++ b/examples/common/entry/entry_sdl.cpp @@ -304,6 +304,11 @@ namespace entry } } + bool setWindowTitle(const char* _title) + { + SDL_WM_SetCaption(_title, NULL); + } + MainThreadEntry m_mte; bx::Thread m_thread; @@ -342,6 +347,11 @@ namespace entry SDL_PushEvent(&event); } + bool setWindowTitle(const char* _title) + { + s_ctx.setWindowTitle(_title); + } + void toggleWindowFrame() { } diff --git a/examples/common/entry/entry_windows.cpp b/examples/common/entry/entry_windows.cpp index 765e5883..22a239a1 100644 --- a/examples/common/entry/entry_windows.cpp +++ b/examples/common/entry/entry_windows.cpp @@ -324,7 +324,7 @@ namespace entry rect.bottom = rect.top + height + m_frameHeight; break; } - + m_eventQueue.postSizeEvent(m_width, m_height); } return 0; @@ -574,6 +574,11 @@ namespace entry } } + bool setWindowTitle(const char* _title) + { + return (1 == SetWindowText(m_hwnd, _title)); + } + static LRESULT CALLBACK wndProc(HWND _hwnd, UINT _id, WPARAM _wparam, LPARAM _lparam); EventQueue m_eventQueue; @@ -621,6 +626,11 @@ namespace entry PostMessage(s_ctx.m_hwnd, WM_USER_SET_WINDOW_SIZE, 0, (_height<<16) | (_width&0xffff) ); } + bool setWindowTitle(const char* _title) + { + return s_ctx.setWindowTitle(_title); + } + void toggleWindowFrame() { PostMessage(s_ctx.m_hwnd, WM_USER_TOGGLE_WINDOW_FRAME, 0, 0);