diff --git a/rainbow/LinuxGl/LinuxGl.h b/rainbow/LinuxGl/LinuxGl.h index a8fcbe8c1..335fc5a11 100644 --- a/rainbow/LinuxGl/LinuxGl.h +++ b/rainbow/LinuxGl/LinuxGl.h @@ -1,3 +1,5 @@ +#define GUI_LINUXGL + #ifndef _LinuxGl_LinuxGl_h_ #define _LinuxGl_LinuxGl_h_ @@ -33,8 +35,6 @@ #include -#define GUI_LINUXGL - #include NAMESPACE_UPP diff --git a/rainbow/LinuxGl/Resources.cpp b/rainbow/LinuxGl/Resources.cpp index 5778b3f21..36d3c1975 100644 --- a/rainbow/LinuxGl/Resources.cpp +++ b/rainbow/LinuxGl/Resources.cpp @@ -447,5 +447,5 @@ float GetFps() return fps; } +END_UPP_NAMESPACE #endif -END_UPP_NAMESPACE \ No newline at end of file diff --git a/rainbow/LinuxGl/Scrollbar.cpp b/rainbow/LinuxGl/Scrollbar.cpp index 9deeaf5e1..5a2948059 100644 --- a/rainbow/LinuxGl/Scrollbar.cpp +++ b/rainbow/LinuxGl/Scrollbar.cpp @@ -172,7 +172,6 @@ void SlimScrollBar::Paint(Draw &w) Size rsz(int(size), IsVert() ? sz.cx : sz.cy); Fix(p); Fix(rsz); - w.DrawRect(p.x, p.y, rsz.cx, rsz.cy, White().Alpha(150)); } } diff --git a/rainbow/LinuxGl/Top.cpp b/rainbow/LinuxGl/Top.cpp index 30bdae4ec..99a80719e 100644 --- a/rainbow/LinuxGl/Top.cpp +++ b/rainbow/LinuxGl/Top.cpp @@ -24,15 +24,15 @@ void TopWindow::GripResize() void TopWindow::SyncSizeHints() { - SyncCaption0(); + SyncCaption(); } -void TopWindow::SyncTitle0() +void TopWindow::SyncTitle() { - SyncCaption0(); + SyncCaption(); } -void TopWindow::SyncCaption0() +void TopWindow::SyncCaption() { GuiLock __; frame->title = title.ToString(); @@ -49,7 +49,7 @@ void TopWindow::SyncCaption0() void TopWindow::State(int reason) { - SyncCaption0(); + SyncCaption(); } void TopWindow::SyncRect() @@ -80,7 +80,7 @@ void TopWindow::Open(Ctrl *owner) PopUp(frame, false, true); popup = false; SetRect(frame->GetClient()); - SyncCaption0(); + SyncCaption(); if(state == MAXIMIZED) frame->Maximize(); } diff --git a/rainbow/LinuxGl/TopFrame.cpp b/rainbow/LinuxGl/TopFrame.cpp index 98a02cb7f..6139338f4 100644 --- a/rainbow/LinuxGl/TopFrame.cpp +++ b/rainbow/LinuxGl/TopFrame.cpp @@ -74,8 +74,9 @@ void TopWindowFrame::Paint(Draw& w) int tcx = sz.cx - m.left - m.right - 4 - c * (close.IsShown() + maximize.IsShown()); if(!IsNull(icon)) { Image h = icon; - if(h.GetWidth() > c || h.GetHeight() > c) - h = Rescale(h, GetFitSize(h.GetSize(), Size(c))); + //TODO: Eliminate crash in Gate2 + //if(h.GetWidth() > c || h.GetHeight() > c) + // h = Rescale(h, GetFitSize(h.GetSize(), Size(c))); w.DrawImage(tx, m.top + 2, h); tx += c; tcx -= c; diff --git a/rainbow/LinuxGl/Wnd.cpp b/rainbow/LinuxGl/Wnd.cpp index 032bb9fb1..95a726ee0 100644 --- a/rainbow/LinuxGl/Wnd.cpp +++ b/rainbow/LinuxGl/Wnd.cpp @@ -333,7 +333,7 @@ void Ctrl::DrawScreen() } } -void Ctrl::WndUpdate0r(const Rect& r) +void Ctrl::WndUpdate(const Rect& r) { GuiLock __; } @@ -352,7 +352,7 @@ bool Ctrl::ProcessEvents(bool *quit) return true; } -void Ctrl::EventLoop0(Ctrl *ctrl) +void Ctrl::EventLoop(Ctrl *ctrl) { GuiLock __; ASSERT(IsMainThread()); @@ -381,7 +381,7 @@ void Ctrl::EventLoop0(Ctrl *ctrl) LoopLevel--; } -void Ctrl::GuiSleep0(int ms) +void Ctrl::GuiSleep(int ms) { GuiLock __; ASSERT(IsMainThread()); @@ -396,12 +396,12 @@ Rect Ctrl::GetWndScreenRect() const return GetRect(); } -void Ctrl::WndShow0(bool b) +void Ctrl::WndShow(bool b) { GuiLock __; } -void Ctrl::WndUpdate0() +void Ctrl::WndUpdate() { GuiLock __; } @@ -470,7 +470,7 @@ void Ctrl::DestroyWnd() { for(int i = 0; i < topctrl.GetCount(); i++) if(topctrl[i]->top && topctrl[i]->top->owner_window == this) - topctrl[i]->WndDestroy0(); + topctrl[i]->WndDestroy(); int q = FindTopCtrl(); if(q >= 0) { topctrl.Remove(q); @@ -485,7 +485,7 @@ void Ctrl::DestroyWnd() win->DestroyFrame(); } -void Ctrl::WndDestroy0() +void Ctrl::WndDestroy() { DestroyWnd(); if(topctrl.GetCount()) @@ -508,7 +508,7 @@ void Ctrl::PutForeground() fw[i]->PutForeground(); } -void Ctrl::SetWndForeground0() +void Ctrl::SetWndForeground() { GuiLock __; ASSERT(IsOpen()); @@ -534,16 +534,15 @@ bool Ctrl::IsWndForeground() const return b; } -void Ctrl::WndEnable0(bool *b) +void Ctrl::WndEnable(bool b) { GuiLock __; - *b = true; } -void Ctrl::SetWndFocus0(bool *b) +bool Ctrl::SetWndFocus() { GuiLock __; - *b = true; + return true; } bool Ctrl::HasWndFocus() const @@ -578,7 +577,7 @@ void Ctrl::WndInvalidateRect(const Rect& r) //::InvalidateRect(glHwnd, NULL, false); } -void Ctrl::WndSetPos0(const Rect& rect) +void Ctrl::WndSetPos(const Rect& rect) { GuiLock __; TopWindow *w = dynamic_cast(this); @@ -587,7 +586,7 @@ void Ctrl::WndSetPos0(const Rect& rect) SetWndRect(rect); } -void Ctrl::WndScrollView0(const Rect& r, int dx, int dy) +void Ctrl::WndScrollView(const Rect& r, int dx, int dy) { GuiLock __; } diff --git a/rainbow/guiplatform.h b/rainbow/guiplatform.h index d650b8a0d..d895d60b6 100644 --- a/rainbow/guiplatform.h +++ b/rainbow/guiplatform.h @@ -33,3 +33,8 @@ #define GUIPLATFORM_KEYCODES_INCLUDE #define GUIPLATFORM_INCLUDE #endif + +#ifdef flagLINUXGL +#define GUIPLATFORM_KEYCODES_INCLUDE +#define GUIPLATFORM_INCLUDE +#endif