Added setWindowTitle().

This commit is contained in:
Dario Manesku 2014-08-05 20:57:52 +01:00
parent 8a0d102e1b
commit f1a7e1696d
11 changed files with 61 additions and 5 deletions

View file

@ -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();

View file

@ -207,6 +207,11 @@ namespace entry
BX_UNUSED(_width, _height);
}
bool setWindowTitle(const char* _title)
{
BX_UNUSED(_title);
}
void toggleWindowFrame()
{
}

View file

@ -24,6 +24,11 @@ namespace entry
{
}
bool setWindowTitle(const char* _title)
{
BX_UNUSED(_title);
}
void toggleWindowFrame()
{
}

View file

@ -86,6 +86,11 @@ namespace entry
BX_UNUSED(_width, _height);
}
bool setWindowTitle(const char* _title)
{
BX_UNUSED(_title);
}
void toggleWindowFrame()
{
}

View file

@ -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()
{
}

View file

@ -61,6 +61,11 @@ namespace entry
BX_UNUSED(_width, _height);
}
bool setWindowTitle(const char* _title)
{
BX_UNUSED(_title);
}
void toggleWindowFrame()
{
}

View file

@ -281,6 +281,11 @@ namespace entry
BX_UNUSED(_width, _height);
}
bool setWindowTitle(const char* _title)
{
BX_UNUSED(_title);
}
void toggleWindowFrame()
{
}

View file

@ -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:

View file

@ -25,6 +25,11 @@ namespace entry
{
}
bool setWindowTitle(const char* _title)
{
BX_UNUSED(_title);
}
void toggleWindowFrame()
{
}

View file

@ -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()
{
}

View file

@ -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);