.developing rainbow

git-svn-id: svn://ultimatepp.org/upp/trunk@3641 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
cxl 2011-07-11 03:52:53 +00:00
parent f3099e1aa4
commit 6b9742f745
5 changed files with 20 additions and 9 deletions

View file

@ -23,6 +23,12 @@ struct App : public Ctrl {
pattern);
}
virtual Image CursorImage(Point p, dword keyflags) {
Animate();
return Image::Arrow();
}
void Animate() {
pattern = I64(0xf0f0) >> (pos++ & 7);
if(Random() % 100 == 0)
@ -56,7 +62,7 @@ struct App : public Ctrl {
pos = 0;
a = 200;
dir = 1;
PostCallback(THISBACK(Animate));
// PostCallback(THISBACK(Animate));
SetCaret(0, 0, 20, 20);
}
};

View file

@ -36,6 +36,9 @@ void DrawDragRect(SystemDraw& w, const Rect& rect1, const Rect& rect2,
w.End();
}
/*
Size GetScreenSize()
{

View file

@ -229,7 +229,8 @@ ViewDraw::ViewDraw(Ctrl *ctrl)
ViewDraw::~ViewDraw()
{
Ctrl::invalid.Clear();
Ctrl::DoUpdate();
// Ctrl::invalid.Clear();
}
void Ctrl::DoUpdate()
@ -300,15 +301,17 @@ void Ctrl::WndUpdate0r(const Rect& r)
bool Ctrl::ProcessEvents(bool *quit)
{
DLOG("ProcessEvents " << LOG_BEGIN);
LOGBLOCK("@ ProcessEvents");
MemoryCheckDebug();
if(!ProcessEvent(quit))
return false;
while(ProcessEvent(quit) && (!LoopCtrl || LoopCtrl->InLoop()) && !FBEndSession());
TimeStop tm;
TimerProc(GetTickCount());
DLOG("TimerProc elapsed: " << tm);
SweepMkImageCache();
DoPaint();
FBFlush();
DLOG(LOG_END);
return true;
}

View file

@ -13,8 +13,7 @@ uses(SDLFB) SDLFb;
uses(WINGL) WinGl;
file
Draw.cpp,
U:\h.txt;
Draw.cpp;
mainconfig
"" = "GUI WINFB",

View file

@ -35,7 +35,7 @@ void FBSleep(int ms)
{
TimeStop tm;
MsgWaitForMultipleObjects(0, NULL, FALSE, ms, QS_ALLINPUT);
DLOG("@ FBSleep " << tm.Elapsed());
LLOG("@ FBSleep " << tm.Elapsed());
}
void FBInit(HINSTANCE hInstance)
@ -68,7 +68,7 @@ void fbUpdate(HDC hdc, const Rect& r_)
Size sz = framebuffer.GetSize();
Rect r = sz;
// Rect r = r_;
DLOG("fbUpdate " << r);
LLOG("fbUpdate " << r);
Buffer<byte> data;
data.Alloc(sizeof(BITMAPINFOHEADER) + sizeof(RGBQUAD)*256);
BITMAPINFOHEADER *hi = (BITMAPINFOHEADER *) ~data;;
@ -89,7 +89,7 @@ void fbUpdate(HDC hdc, const Rect& r_)
void FBUpdate(const Rect& r)
{
DLOG("FBUpdate " << r);
LLOG("FBUpdate " << r);
if(fbHWND) {
HDC hdc = GetDC(fbHWND);
fbUpdate(hdc, r);