mirror of
https://github.com/ultimatepp/ultimatepp.git
synced 2026-08-12 06:12:46 -06:00
WinGL: Adjustment to new MT changes
git-svn-id: svn://ultimatepp.org/upp/trunk@5561 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
parent
008bd109f8
commit
8a3883f817
4 changed files with 14 additions and 43 deletions
|
|
@ -6,13 +6,9 @@
|
|||
|
||||
NAMESPACE_UPP
|
||||
|
||||
void WakeUpGuiThread(void)
|
||||
{
|
||||
}
|
||||
|
||||
void Ctrl::GuiPlatformConstruct()
|
||||
{
|
||||
cliptobounds = true;
|
||||
cliptobounds = true;
|
||||
}
|
||||
|
||||
void Ctrl::GuiPlatformRemove()
|
||||
|
|
@ -69,6 +65,13 @@ void GuiPlatformAfterMenuPopUp()
|
|||
{
|
||||
}
|
||||
|
||||
void Ctrl::ApplyLayout()
|
||||
{
|
||||
GuiLock __;
|
||||
for(Ctrl *q = GetFirstChild(); q; q = q->GetNext())
|
||||
q->ApplyLayout();
|
||||
}
|
||||
|
||||
String Ctrl::Name() const {
|
||||
GuiLock __;
|
||||
#ifdef CPU_64
|
||||
|
|
|
|||
|
|
@ -67,6 +67,7 @@ public:
|
|||
|
||||
virtual void ApplyTransform(TransformState state) {}
|
||||
virtual void PostPaint(Draw& w) {}
|
||||
virtual void ApplyLayout();
|
||||
void DragRectDraw(const Rect& rect1, const Rect& rect2, const Rect& clip, int n,
|
||||
Color color, int type, int animation);
|
||||
|
||||
|
|
|
|||
|
|
@ -16,37 +16,6 @@ void SetSurface(SystemDraw& w, const Rect& dest, const RGBA *pixels, Size psz, P
|
|||
GuiLock __;
|
||||
}
|
||||
|
||||
struct Image::Data::SystemData {
|
||||
};
|
||||
|
||||
void Image::Data::SysInitImp()
|
||||
{
|
||||
SystemData& sd = Sys();
|
||||
}
|
||||
|
||||
void Image::Data::SysReleaseImp()
|
||||
{
|
||||
SystemData& sd = Sys();
|
||||
}
|
||||
|
||||
Image::Data::SystemData& Image::Data::Sys() const
|
||||
{
|
||||
ASSERT(sizeof(system_buffer) >= sizeof(SystemData));
|
||||
return *(SystemData *)system_buffer;
|
||||
}
|
||||
|
||||
int Image::Data::GetResCountImp() const
|
||||
{
|
||||
SystemData& sd = Sys();
|
||||
return 0;
|
||||
}
|
||||
|
||||
void Image::Data::PaintImp(SystemDraw& w, int x, int y, const Rect& src, Color c)
|
||||
{
|
||||
GuiLock __;
|
||||
SystemData& sd = Sys();
|
||||
}
|
||||
|
||||
Image ImageDraw::Get(bool pm) const
|
||||
{
|
||||
ImageBuffer result(image.GetSize());
|
||||
|
|
|
|||
|
|
@ -195,10 +195,6 @@ void Ctrl::SyncTopWindows()
|
|||
bool Ctrl::ProcessEvent(bool *quit)
|
||||
{
|
||||
ASSERT(IsMainThread());
|
||||
if(DoCall()) {
|
||||
SyncTopWindows();
|
||||
return false;
|
||||
}
|
||||
if(!GetMouseLeft() && !GetMouseRight() && !GetMouseMiddle())
|
||||
ReleaseCtrlCapture();
|
||||
if(GlProcessEvent(quit)) {
|
||||
|
|
@ -224,8 +220,10 @@ void Ctrl::DrawScreen()
|
|||
int64 t0 = GetHighTickCount();
|
||||
frameInfo.curr_tick_count = t0;
|
||||
painting = true;
|
||||
desktop->ApplyLayout();
|
||||
desktop->ApplyTransform(TS_BEFORE_SCREEN);
|
||||
for(int i = 0; i < topctrl.GetCount(); i++) {
|
||||
topctrl[i]->ApplyLayout();
|
||||
topctrl[i]->ApplyTransform(TS_BEFORE_SCREEN);
|
||||
}
|
||||
Rect clip = desktop->GetRect();
|
||||
|
|
@ -385,9 +383,9 @@ void Ctrl::GuiSleep0(int ms)
|
|||
{
|
||||
GuiLock __;
|
||||
ASSERT(IsMainThread());
|
||||
int level = LeaveGMutexAll();
|
||||
int level = LeaveGuiMutexAll();
|
||||
GlSleep(ms);
|
||||
EnterGMutex(level);
|
||||
EnterGuiMutex(level);
|
||||
}
|
||||
|
||||
Rect Ctrl::GetWndScreenRect() const
|
||||
|
|
@ -572,7 +570,7 @@ bool Ctrl::HasWndCapture() const
|
|||
return captureCtrl && captureCtrl->GetTopCtrl() == this;
|
||||
}
|
||||
|
||||
void Ctrl::WndInvalidateRect0(const Rect& r)
|
||||
void Ctrl::WndInvalidateRect(const Rect& r)
|
||||
{
|
||||
GuiLock __;
|
||||
//::InvalidateRect(glHwnd, NULL, false);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue