mirror of
https://github.com/ultimatepp/ultimatepp.git
synced 2026-05-21 06:45:39 -06:00
.developing rainbow
git-svn-id: svn://ultimatepp.org/upp/trunk@3641 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
parent
f3099e1aa4
commit
6b9742f745
5 changed files with 20 additions and 9 deletions
|
|
@ -22,6 +22,12 @@ struct App : public Ctrl {
|
|||
Black(),
|
||||
pattern);
|
||||
}
|
||||
|
||||
virtual Image CursorImage(Point p, dword keyflags) {
|
||||
Animate();
|
||||
return Image::Arrow();
|
||||
}
|
||||
|
||||
|
||||
void Animate() {
|
||||
pattern = I64(0xf0f0) >> (pos++ & 7);
|
||||
|
|
@ -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);
|
||||
}
|
||||
};
|
||||
|
|
|
|||
|
|
@ -36,6 +36,9 @@ void DrawDragRect(SystemDraw& w, const Rect& rect1, const Rect& rect2,
|
|||
w.End();
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
/*
|
||||
Size GetScreenSize()
|
||||
{
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -13,8 +13,7 @@ uses(SDLFB) SDLFb;
|
|||
uses(WINGL) WinGl;
|
||||
|
||||
file
|
||||
Draw.cpp,
|
||||
U:\h.txt;
|
||||
Draw.cpp;
|
||||
|
||||
mainconfig
|
||||
"" = "GUI WINFB",
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue