mirror of
https://github.com/ultimatepp/ultimatepp.git
synced 2026-07-11 22:03:01 -06:00
CtrlCore: Refactored MT for Win32
git-svn-id: svn://ultimatepp.org/upp/trunk@5560 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
parent
73da8b8bc0
commit
008bd109f8
6 changed files with 11 additions and 16 deletions
|
|
@ -146,6 +146,9 @@ GlyphInfo XftGetGlyphInfoSys(Font font, int chr)
|
|||
}
|
||||
|
||||
INITBLOCK {
|
||||
// it is probably not quite required as Xft is based on FC, but to be sure to have
|
||||
// consistent metrics hook Xft metrics into Draw/FontFc.cpp
|
||||
|
||||
extern CommonFontInfo (*GetFontInfoSysXft)(Font font);
|
||||
extern GlyphInfo (*GetGlyphInfoSysXft)(Font font, int chr);
|
||||
|
||||
|
|
|
|||
|
|
@ -84,7 +84,7 @@ void TopWindow::SyncTitle0()
|
|||
::SetWindowText(hwnd, ToSystemCharset(title.ToString()));
|
||||
}
|
||||
|
||||
void TopWindow::DeleteIco0()
|
||||
void TopWindow::DeleteIco()
|
||||
{
|
||||
GuiLock __;
|
||||
LLOG("TopWindow::DeleteIco " << UPP::Name(this));
|
||||
|
|
@ -95,11 +95,6 @@ void TopWindow::DeleteIco0()
|
|||
ico = lico = NULL;
|
||||
}
|
||||
|
||||
void TopWindow::DeleteIco()
|
||||
{
|
||||
ICall(THISBACK(DeleteIco0));
|
||||
}
|
||||
|
||||
void TopWindow::SyncCaption0()
|
||||
{
|
||||
GuiLock __;
|
||||
|
|
|
|||
|
|
@ -150,7 +150,7 @@ String Ctrl::Name() const {
|
|||
|
||||
void Ctrl::WndCreateCaret(const Rect& cr)
|
||||
{
|
||||
ICall(THISBACK1(WndCreateCaret0, cr));
|
||||
Call(THISBACK1(WndCreateCaret0, cr));
|
||||
}
|
||||
|
||||
END_UPP_NAMESPACE
|
||||
|
|
|
|||
|
|
@ -501,11 +501,11 @@ int Ctrl::DoDragAndDrop(const char *fmts, const Image& sample, dword actions,
|
|||
if(actions & DND_MOVE)
|
||||
dsrc->move = actions & DND_EXACTIMAGE ? sample : MakeDragImage(CtrlCoreImg::DndMove(), CtrlCoreImg::DndMove98(), sample);
|
||||
sDnDSource = this;
|
||||
int level = LeaveGMutexAll();
|
||||
int level = LeaveGuiMutexAll();
|
||||
HRESULT r = DoDragDrop(obj, dsrc,
|
||||
(actions & DND_COPY ? DROPEFFECT_COPY : 0) |
|
||||
(actions & DND_MOVE ? DROPEFFECT_MOVE : 0), &result);
|
||||
EnterGMutex(level);
|
||||
EnterGuiMutex(level);
|
||||
DWORD re = obj->effect;
|
||||
obj->Release();
|
||||
dsrc->Release();
|
||||
|
|
|
|||
|
|
@ -7,7 +7,6 @@ private:
|
|||
dword exstyle;
|
||||
HICON ico, lico;
|
||||
|
||||
void DeleteIco0();
|
||||
void DeleteIco();
|
||||
void CenterRect(HWND owner, int center);
|
||||
|
||||
|
|
|
|||
|
|
@ -492,7 +492,7 @@ void Ctrl::Create(HWND parent, DWORD style, DWORD exstyle, bool savebits, int sh
|
|||
cr.savebits = savebits;
|
||||
cr.show = show;
|
||||
cr.dropshadow = dropshadow;
|
||||
ICall(callback1(this, &Ctrl::Create0, &cr));
|
||||
Call(callback1(this, &Ctrl::Create0, &cr));
|
||||
}
|
||||
|
||||
#if 0
|
||||
|
|
@ -842,8 +842,6 @@ bool Ctrl::IsWaitingEvent()
|
|||
bool Ctrl::ProcessEvent(bool *quit)
|
||||
{
|
||||
ASSERT(IsMainThread());
|
||||
if(DoCall())
|
||||
return false;
|
||||
if(!GetMouseLeft() && !GetMouseRight() && !GetMouseMiddle())
|
||||
ReleaseCtrlCapture();
|
||||
MSG msg;
|
||||
|
|
@ -909,7 +907,7 @@ void Ctrl::GuiSleep0(int ms)
|
|||
GuiLock __;
|
||||
ASSERT(IsMainThread());
|
||||
ELOG("GuiSleep");
|
||||
int level = LeaveGMutexAll();
|
||||
int level = LeaveGuiMutexAll();
|
||||
#if !defined(flagDLL) && !defined(PLATFORM_WINCE)
|
||||
if(!OverwatchThread) {
|
||||
DWORD dummy;
|
||||
|
|
@ -924,7 +922,7 @@ void Ctrl::GuiSleep0(int ms)
|
|||
#else
|
||||
MsgWaitForMultipleObjects(0, NULL, FALSE, ms, QS_ALLINPUT);
|
||||
#endif
|
||||
EnterGMutex(level);
|
||||
EnterGuiMutex(level);
|
||||
}
|
||||
|
||||
void Ctrl::WndDestroyCaret()
|
||||
|
|
@ -1197,7 +1195,7 @@ bool Ctrl::HasWndCapture() const
|
|||
return hwnd && hwnd == ::GetCapture();
|
||||
}
|
||||
|
||||
void Ctrl::WndInvalidateRect0(const Rect& r)
|
||||
void Ctrl::WndInvalidateRect(const Rect& r)
|
||||
{
|
||||
GuiLock __;
|
||||
LLOG("WndInvalidateRect " << UPP::Name(this));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue