new layout system, new UI state/styles system

This commit is contained in:
Eduardo Bart
2011-08-26 12:06:52 -03:00
parent d31d32bf82
commit 7359370251
57 changed files with 1097 additions and 1099 deletions

View File

@@ -50,6 +50,7 @@ public:
void hideMouseCursor();
void showMouseCursor();
Point getMouseCursorPos();
/// Enable or disable vertical synchronization
void setVerticalSync(bool enable);

View File

@@ -41,7 +41,7 @@ struct X11PlatformPrivate {
int lastTicks;
std::string clipboardText;
std::map<int, uchar> keyMap;
PlatformListener* listener;
PlatformEvent inputEvent;
} x11;
Platform g_platform;
@@ -261,7 +261,7 @@ void Platform::terminate()
void Platform::poll()
{
XEvent event, peekevent;
static PlatformEvent inputEvent;
PlatformEvent& inputEvent = x11.inputEvent;
while(XPending(x11.display) > 0) {
XNextEvent(x11.display, &event);
@@ -335,7 +335,6 @@ void Platform::poll()
) {
//logDebug("char: ", buf[0], " code: ", (uint)buf[0]);
inputEvent.keychar = buf[0];
dump << int((uchar)buf[0]);
}
} else {
//event.xkey.state &= ~(ShiftMask | LockMask);
@@ -734,6 +733,11 @@ void Platform::showMouseCursor()
}
}
Point Platform::getMouseCursorPos()
{
return x11.inputEvent.mousePos;
}
void Platform::setVerticalSync(bool enable)
{
typedef GLint (*glSwapIntervalProc)(GLint);