ReactOS.org
Sign In
Sign Up
Sign In
Sign Up
Manage this list
×
Keyboard Shortcuts
Thread View
j
: Next unread message
k
: Previous unread message
j a
: Jump to all threads
j l
: Jump to MailingList overview
2024
December
November
October
September
August
July
June
May
April
March
February
January
2023
December
November
October
September
August
July
June
May
April
March
February
January
2022
December
November
October
September
August
July
June
May
April
March
February
January
2021
December
November
October
September
August
July
June
May
April
March
February
January
2020
December
November
October
September
August
July
June
May
April
March
February
January
2019
December
November
October
September
August
July
June
May
April
March
February
January
2018
December
November
October
September
August
July
June
May
April
March
February
January
2017
December
November
October
September
August
July
June
May
April
March
February
January
2016
December
November
October
September
August
July
June
May
April
March
February
January
2015
December
November
October
September
August
July
June
May
April
March
February
January
2014
December
November
October
September
August
July
June
May
April
March
February
January
2013
December
November
October
September
August
July
June
May
April
March
February
January
2012
December
November
October
September
August
July
June
May
April
March
February
January
2011
December
November
October
September
August
July
June
May
April
March
February
January
2010
December
November
October
September
August
July
June
May
April
March
February
January
2009
December
November
October
September
August
July
June
May
April
March
February
January
2008
December
November
October
September
August
July
June
May
April
March
February
January
2007
December
November
October
September
August
July
June
May
April
March
February
January
2006
December
November
October
September
August
July
June
May
April
March
February
January
2005
December
November
October
September
August
July
June
May
April
March
February
January
2004
December
November
October
September
August
July
June
May
April
March
February
List overview
Download
Ros-diffs
February 2024
----- 2024 -----
December 2024
November 2024
October 2024
September 2024
August 2024
July 2024
June 2024
May 2024
April 2024
March 2024
February 2024
January 2024
----- 2023 -----
December 2023
November 2023
October 2023
September 2023
August 2023
July 2023
June 2023
May 2023
April 2023
March 2023
February 2023
January 2023
----- 2022 -----
December 2022
November 2022
October 2022
September 2022
August 2022
July 2022
June 2022
May 2022
April 2022
March 2022
February 2022
January 2022
----- 2021 -----
December 2021
November 2021
October 2021
September 2021
August 2021
July 2021
June 2021
May 2021
April 2021
March 2021
February 2021
January 2021
----- 2020 -----
December 2020
November 2020
October 2020
September 2020
August 2020
July 2020
June 2020
May 2020
April 2020
March 2020
February 2020
January 2020
----- 2019 -----
December 2019
November 2019
October 2019
September 2019
August 2019
July 2019
June 2019
May 2019
April 2019
March 2019
February 2019
January 2019
----- 2018 -----
December 2018
November 2018
October 2018
September 2018
August 2018
July 2018
June 2018
May 2018
April 2018
March 2018
February 2018
January 2018
----- 2017 -----
December 2017
November 2017
October 2017
September 2017
August 2017
July 2017
June 2017
May 2017
April 2017
March 2017
February 2017
January 2017
----- 2016 -----
December 2016
November 2016
October 2016
September 2016
August 2016
July 2016
June 2016
May 2016
April 2016
March 2016
February 2016
January 2016
----- 2015 -----
December 2015
November 2015
October 2015
September 2015
August 2015
July 2015
June 2015
May 2015
April 2015
March 2015
February 2015
January 2015
----- 2014 -----
December 2014
November 2014
October 2014
September 2014
August 2014
July 2014
June 2014
May 2014
April 2014
March 2014
February 2014
January 2014
----- 2013 -----
December 2013
November 2013
October 2013
September 2013
August 2013
July 2013
June 2013
May 2013
April 2013
March 2013
February 2013
January 2013
----- 2012 -----
December 2012
November 2012
October 2012
September 2012
August 2012
July 2012
June 2012
May 2012
April 2012
March 2012
February 2012
January 2012
----- 2011 -----
December 2011
November 2011
October 2011
September 2011
August 2011
July 2011
June 2011
May 2011
April 2011
March 2011
February 2011
January 2011
----- 2010 -----
December 2010
November 2010
October 2010
September 2010
August 2010
July 2010
June 2010
May 2010
April 2010
March 2010
February 2010
January 2010
----- 2009 -----
December 2009
November 2009
October 2009
September 2009
August 2009
July 2009
June 2009
May 2009
April 2009
March 2009
February 2009
January 2009
----- 2008 -----
December 2008
November 2008
October 2008
September 2008
August 2008
July 2008
June 2008
May 2008
April 2008
March 2008
February 2008
January 2008
----- 2007 -----
December 2007
November 2007
October 2007
September 2007
August 2007
July 2007
June 2007
May 2007
April 2007
March 2007
February 2007
January 2007
----- 2006 -----
December 2006
November 2006
October 2006
September 2006
August 2006
July 2006
June 2006
May 2006
April 2006
March 2006
February 2006
January 2006
----- 2005 -----
December 2005
November 2005
October 2005
September 2005
August 2005
July 2005
June 2005
May 2005
April 2005
March 2005
February 2005
January 2005
----- 2004 -----
December 2004
November 2004
October 2004
September 2004
August 2004
July 2004
June 2004
May 2004
April 2004
March 2004
February 2004
ros-diffs@reactos.org
17 participants
128 discussions
Start a n
N
ew thread
[reactos] 01/01: [MSCTF][MSUTB][SDK] Add CTipbarItem and CTipbarThread (#6477)
by Katayama Hirofumi MZ
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=23db429e42a6c0505882f…
commit 23db429e42a6c0505882fe3a9017f0b341d9eff0 Author: Katayama Hirofumi MZ <katayama.hirofumi.mz(a)gmail.com> AuthorDate: Sun Feb 11 13:24:41 2024 +0900 Commit: GitHub <noreply(a)github.com> CommitDate: Sun Feb 11 13:24:41 2024 +0900 [MSCTF][MSUTB][SDK] Add CTipbarItem and CTipbarThread (#6477) Supporting the Language bar... JIRA issue: CORE-19363 - Modify msctf.spec. - Add CTipbarThread and CTipbarItem classes. --- dll/win32/msctf/msctf.spec | 6 +- dll/win32/msutb/msutb.cpp | 668 +++++++++++++++++++++++++++++++++++- sdk/include/psdk/msctf.idl | 3 + sdk/include/reactos/cicero/cicuif.h | 13 + 4 files changed, 686 insertions(+), 4 deletions(-) diff --git a/dll/win32/msctf/msctf.spec b/dll/win32/msctf/msctf.spec index 975acdb2118..a2cb7984b72 100644 --- a/dll/win32/msctf/msctf.spec +++ b/dll/win32/msctf/msctf.spec @@ -6,7 +6,7 @@ @ stub SetInputScopeXML @ stdcall SetInputScopes(long ptr long ptr long wstr wstr) @ stub TF_CUASAppFix -@ stub TF_CheckThreadInputIdle +@ stdcall -stub TF_CheckThreadInputIdle(long long) @ stub TF_ClearLangBarAddIns @ stdcall -stub TF_CreateCategoryMgr(ptr) @ stdcall -stub TF_CreateCicLoadMutex(ptr) @@ -21,7 +21,7 @@ @ stdcall -stub TF_GetLangIcon(long ptr long) @ stdcall -stub TF_GetMlngHKL(long ptr ptr long) @ stdcall -stub TF_GetMlngIconIndex(long) -@ stub TF_GetThreadFlags +@ stdcall -stub TF_GetThreadFlags(long ptr ptr ptr) @ stdcall TF_GetThreadMgr(ptr) @ stdcall -stub TF_InatExtractIcon(long) @ stdcall TF_InitMlngInfo() @@ -30,7 +30,7 @@ @ stdcall -stub TF_InvalidAssemblyListCache() @ stdcall TF_InvalidAssemblyListCacheIfExist() @ stdcall TF_IsCtfmonRunning() -@ stub TF_IsInMarshaling +@ stdcall -stub TF_IsInMarshaling(long) @ stdcall -stub TF_MlngInfoCount() @ stdcall TF_RunInputCPL() @ stdcall -stub TF_PostAllThreadMsg(long long) diff --git a/dll/win32/msutb/msutb.cpp b/dll/win32/msutb/msutb.cpp index 9d5e6d8f557..31b05578656 100644 --- a/dll/win32/msutb/msutb.cpp +++ b/dll/win32/msutb/msutb.cpp @@ -1259,7 +1259,127 @@ public: /***********************************************************************/ class CTipbarItem; -class CTipbarThread; + +class CTipbarThread +{ +protected: + CTipbarWnd *m_pTipbarWnd; + ITfLangBarItemMgr *m_pLangBarItemMgr; + CicArray<CTipbarItem*> m_UIObjects; + CicArray<CUIFObject*> m_Separators; + DWORD m_dwUnknown32; + DWORD m_dwThreadId; + DWORD m_dwFlags1; + DWORD m_dwFlags2; + INT m_cxGrip; + INT m_cyGrip; + DWORD m_dwFlags3; + DWORD m_dwUnknown34; + LONG m_cRefs; + friend class CTipbarWnd; + friend class CTipbarItem; + +public: + CTipbarThread(CTipbarWnd *pTipbarWnd); + virtual ~CTipbarThread(); + + HRESULT Init(DWORD dwThreadId); + + HRESULT InitItemList(); + HRESULT _UninitItemList(BOOL bUnAdvise); + + DWORD IsDirtyItem(); + BOOL IsFocusThread(); + BOOL IsVertical(); + + void AddAllSeparators(); + void RemoveAllSeparators(); + + void AddUIObjs(); + void RemoveUIObjs(); + + void GetTextSize(BSTR bstr, LPSIZE pSize); + void LocateItems(); + void MyMoveWnd(LONG xDelta, LONG yDelta); + + HRESULT _UnadviseItemsSink(); + LONG _AddRef() { return ++m_cRefs; } + LONG _Release(); + + //FIXME +}; + +/***********************************************************************/ + +class CTipbarItem : public CTipbarAccItem +{ +protected: + DWORD m_dwCookie; + TF_LANGBARITEMINFO m_ItemInfo; + DWORD m_dwUnknown16; + DWORD m_dwUnknown17; + CTipbarThread *m_pTipbarThread; + ITfLangBarItem *m_pLangBarItem; + DWORD m_dwUnknown18[2]; + DWORD m_dwItemFlags; + DWORD m_dwDirty; + DWORD m_dwUnknown19[4]; + friend class CTipbarThread; + friend class CTipbarWnd; + +public: + CTipbarItem( + CTipbarThread *pThread, + ITfLangBarItem *pLangBarItem, + TF_LANGBARITEMINFO *pItemInfo, + DWORD dwUnknown16); + ~CTipbarItem() override; + + void _AddedToUI(); + void _RemovedToUI(); + void AddRemoveMeToUI(BOOL bFlag); + + BOOL IsConnected(); + void ClearConnections(); + + void StartDemotingTimer(BOOL bStarted); + + void MyClientToScreen(LPPOINT ppt, LPRECT prc); + void MyClientToScreen(LPRECT prc) { return MyClientToScreen(NULL, prc); } + + STDMETHOD_(BSTR, GetAccName)() override; + STDMETHOD_(void, GetAccLocation)(LPRECT prc) override; + STDMETHOD_(BOOL, DoAccDefaultAction)() override; + STDMETHOD(OnUnknown40)() { return S_OK; } + STDMETHOD(OnUnknown41)() { return S_OK; } + STDMETHOD(OnUnknown42)() { return S_OK; } + STDMETHOD(OnUnknown43)() { return S_OK; } + STDMETHOD(OnUpdate)(DWORD dwDirty); + STDMETHOD(OnUnknown44)() { return S_OK; } + STDMETHOD_(void, OnUnknown45)(DWORD dwDirty, DWORD dwStatus) { } + STDMETHOD_(void, OnUpdateHandler)(ULONG, ULONG); + STDMETHOD(OnUnknown46)(CUIFWindow *pWindow) { return S_OK; } + STDMETHOD(OnUnknown47)(CUIFWindow *pWindow) { return S_OK; } + STDMETHOD(OnUnknown48)() { return S_OK; } + STDMETHOD(OnUnknown49)() { return S_OK; } + STDMETHOD(OnUnknown50)() { return S_OK; } + STDMETHOD(OnUnknown51)() { return S_OK; } + STDMETHOD(OnUnknown52)() { return S_OK; } + STDMETHOD(OnUnknown53)(BSTR bstr) { return S_OK; } + STDMETHOD_(LPCWSTR, OnUnknown55)() { return NULL; } + STDMETHOD(OnUnknown56)() { return S_OK; } + STDMETHOD_(LPCWSTR, GetToolTip)(); + STDMETHOD(OnUnknown57)(LPRECT prc) { return S_OK; } + STDMETHOD(OnUnknown58)() { return S_OK; } + STDMETHOD_(void, OnUnknown59)() { } + STDMETHOD_(void, OnUnknown60)() { } + STDMETHOD_(void, OnUnknown61)(HWND) { } + STDMETHOD_(void, OnUnknown62)(HWND) { } + STDMETHOD(OnUnknown63)() { return S_OK; } +}; + +/***********************************************************************/ + class CTipbarCtrlButtonHolder; class CDeskBand; @@ -1312,8 +1432,11 @@ class CTipbarWnd LONG m_cRefs; friend class CUTBContextMenu; friend class CTipbarGripper; + friend class CTipbarThread; + friend class CTipbarItem; friend VOID WINAPI ClosePopupTipbar(VOID); friend BOOL GetTipbarInternal(HWND hWnd, DWORD dwFlags, CDeskBand *pDeskBand); + friend LONG MyWaitForInputIdle(DWORD dwThreadId, DWORD dwMilliseconds); public: CTipbarWnd(DWORD style); @@ -4814,6 +4937,549 @@ STDMETHODIMP_(void) CTipbarWnd::HandleMouseMsg(UINT uMsg, LONG x, LONG y) { } +/*********************************************************************** + * CTipbarThread + */ + +CTipbarThread::CTipbarThread(CTipbarWnd *pTipbarWnd) +{ + m_pTipbarWnd = pTipbarWnd; + m_dwThreadId = 0; + m_pLangBarItemMgr = NULL; + m_cRefs = 1; +} + +CTipbarThread::~CTipbarThread() +{ + if (m_pTipbarWnd) + { + RemoveUIObjs(); + m_pTipbarWnd->CleanUpThreadPointer(this, 1); + } + + _UninitItemList(1); + + if (m_pLangBarItemMgr) + { + m_pLangBarItemMgr->Release(); + m_pLangBarItemMgr = NULL; + } +} + +HRESULT CTipbarThread::Init(DWORD dwThreadId) +{ + m_dwThreadId = dwThreadId; + if (!TF_GetThreadFlags(dwThreadId, &m_dwFlags1, &m_dwFlags2, &m_dwFlags3)) + return E_FAIL; + if (m_dwFlags1 & 0x8) + return S_OK; + return m_pTipbarWnd->m_pLangBarMgr->GetThreadLangBarItemMgr(m_dwThreadId, + &m_pLangBarItemMgr, + &dwThreadId); +} + +/// @unimplemented +HRESULT CTipbarThread::InitItemList() +{ + return E_NOTIMPL; +} + +LONG MyWaitForInputIdle(DWORD dwThreadId, DWORD dwMilliseconds) +{ + if (g_pTipbarWnd && (g_pTipbarWnd->m_dwShowType & TF_SFT_DESKBAND)) + return 0; + + if (TF_IsInMarshaling(dwThreadId)) + return STATUS_TIMEOUT; + + DWORD dwFlags1 = 0, dwFlags2 = 0; + if (!TF_GetThreadFlags(dwThreadId, &dwFlags1, &dwFlags2, NULL) && dwFlags2) + return -1; + + return TF_CheckThreadInputIdle(dwThreadId, dwMilliseconds); +} + +HRESULT CTipbarThread::_UninitItemList(BOOL bUnAdvise) +{ + for (size_t iItem = 0; iItem < m_UIObjects.size(); ++iItem) + { + CTipbarItem* pItem = m_UIObjects[iItem]; + if (pItem) + pItem->m_dwItemFlags |= 0x10; + } + + HRESULT hr = S_OK; + if (bUnAdvise) + { + if (m_dwThreadId == ::GetCurrentThreadId() || !MyWaitForInputIdle(m_dwThreadId, 2000)) + hr = _UnadviseItemsSink(); + } + + for (size_t iItem = 0; iItem < m_UIObjects.size(); ++iItem) + { + CTipbarItem* pItem = m_UIObjects[iItem]; + if (pItem) + { + if (m_pTipbarWnd) + pItem->OnUnknown47(m_pTipbarWnd->GetWindow()); + + pItem->ClearConnections(); + + if (m_pTipbarWnd) + pItem->OnUnknown50(); + else + pItem->OnUnknown51(); + + pItem->OnUnknown59(); + pItem->OnUnknown42(); + } + } + + m_UIObjects.clear(); + + RemoveAllSeparators(); + + return hr; +} + +void CTipbarThread::AddAllSeparators() +{ + for (size_t iItem = 0; iItem < m_Separators.size(); ++iItem) + { + CUIFObject *pItem = m_Separators[iItem]; + if (pItem) + m_pTipbarWnd->AddUIObj(pItem); + } +} + +void CTipbarThread::RemoveAllSeparators() +{ + for (size_t iItem = 0; iItem < m_Separators.size(); ++iItem) + { + CUIFObject *pItem = m_Separators[iItem]; + if (pItem) + { + if (m_pTipbarWnd) + m_pTipbarWnd->RemoveUIObj(pItem); + delete pItem; + } + } + m_Separators.clear(); +} + +void CTipbarThread::AddUIObjs() +{ + _AddRef(); + + for (size_t iItem = 0; iItem < m_UIObjects.size(); ++iItem) + { + CTipbarItem* pItem = m_UIObjects[iItem]; + if (pItem && (pItem->m_dwItemFlags & 0x8)) + { + pItem->OnUnknown46(m_pTipbarWnd ? m_pTipbarWnd->GetWindow() : NULL); + } + } + + AddAllSeparators(); + MyMoveWnd(0, 0); + + _Release(); +} + +void CTipbarThread::RemoveUIObjs() +{ + for (size_t iItem = 0; iItem < m_UIObjects.size(); ++iItem) + { + CTipbarItem* pItem = m_UIObjects[iItem]; + if (pItem) + { + pItem->OnUnknown47(m_pTipbarWnd ? m_pTipbarWnd->GetWindow() : NULL); + } + } + RemoveAllSeparators(); +} + +void CTipbarThread::GetTextSize(BSTR bstr, LPSIZE pSize) +{ + HWND hWnd = *m_pTipbarWnd->GetWindow(); + + HGDIOBJ hFontOld = NULL; + + HDC hDC = ::GetDC(hWnd); + if (FAILED(m_pTipbarWnd->EnsureThemeData(*m_pTipbarWnd->GetWindow()))) + { + HFONT hFont = m_pTipbarWnd->m_hFont; + if (hFont) + hFontOld = ::SelectObject(hDC, hFont); + INT cch = ::SysStringLen(bstr); + ::GetTextExtentPoint32W(hDC, bstr, cch, pSize); + if (hFontOld) + ::SelectObject(hDC, hFontOld); + } + else + { + CUIFTheme theme; + theme.m_iPartId = 1; + theme.m_iStateId = 0; + theme.m_pszClassList = L"TOOLBAR"; + + HFONT hFont = NULL; + + if (SUCCEEDED(theme.InternalOpenThemeData(hWnd))) + { + LOGFONTW lf; + if (SUCCEEDED(::GetThemeFont(theme.m_hTheme, NULL, theme.m_iPartId, 0, 210, &lf))) + { + hFont = ::CreateFontIndirectW(&lf); + if (hFont) + hFontOld = ::SelectObject(hDC, hFont); + } + + RECT rc; + INT cch = ::SysStringLen(bstr); + ::GetThemeTextExtent(theme.m_hTheme, hDC, theme.m_iPartId, 0, bstr, cch, 0, NULL, &rc); + + pSize->cx = rc.right; + pSize->cy = rc.bottom; + } + + if (hFontOld) + ::SelectObject(hDC, hFontOld); + if (hFont) + ::DeleteObject(hFont); + } + + ::ReleaseDC(hWnd, hDC); +} + +DWORD CTipbarThread::IsDirtyItem() +{ + DWORD dwDirty = 0; + for (size_t iItem = 0; iItem < m_UIObjects.size(); ++iItem) + { + CTipbarItem* pItem = m_UIObjects[iItem]; + if (pItem) + dwDirty |= pItem->m_dwDirty; + } + return dwDirty; +} + +BOOL CTipbarThread::IsFocusThread() +{ + if (!m_pTipbarWnd) + return FALSE; + return this == m_pTipbarWnd->m_pFocusThread; +} + +BOOL CTipbarThread::IsVertical() +{ + if (!m_pTipbarWnd) + return FALSE; + return !!(m_pTipbarWnd->m_dwTipbarWndFlags & 0x20000000); +} + +/// @unimplemented +void CTipbarThread::LocateItems() +{ +} + +LONG CTipbarThread::_Release() +{ + if (--m_cRefs == 0) + { + delete this; + return 0; + } + return m_cRefs; +} + +HRESULT CTipbarThread::_UnadviseItemsSink() +{ + if (!m_pLangBarItemMgr) + return E_FAIL; + + DWORD *pdwCoolkies = new(cicNoThrow) DWORD[m_UIObjects.size()]; + if (!pdwCoolkies) + return E_OUTOFMEMORY; + + const size_t cItems = m_UIObjects.size(); + for (size_t iItem = 0; iItem < cItems; ++iItem) + { + CTipbarItem* pItem = m_UIObjects[iItem]; + if (pItem) + pdwCoolkies[iItem] = pItem->m_dwCookie; + } + + HRESULT hr = m_pLangBarItemMgr->UnadviseItemsSink((LONG)cItems, pdwCoolkies); + + delete[] pdwCoolkies; + + return hr; +} + +void CTipbarThread::MyMoveWnd(LONG xDelta, LONG yDelta) +{ + if (!m_pTipbarWnd || (m_pTipbarWnd->m_pFocusThread != this)) + return; + + RECT Rect, rcWorkArea; + m_pTipbarWnd->GetRect(&Rect); + POINT pt = { Rect.left, Rect.top }; + cicGetWorkAreaRect(pt, &rcWorkArea); + + ::GetWindowRect(*m_pTipbarWnd->GetWindow(), &Rect); + + LONG X0 = Rect.left + xDelta, Y0 = Rect.top + yDelta; + if (m_pTipbarWnd->m_dwTipbarWndFlags & 0x1000) + { + if (m_pTipbarWnd->CheckExcludeCaptionButtonMode(&Rect, &rcWorkArea)) + { + X0 = rcWorkArea.right - (3 * m_pTipbarWnd->m_ButtonWidth + + m_pTipbarWnd->m_cxDlgFrameX2 + m_cxGrip); + Y0 = 0; + } + else + { + m_pTipbarWnd->m_dwTipbarWndFlags &= ~0x1000; + } + } + + if (IsVertical()) + { + LONG width = m_pTipbarWnd->m_cxDlgFrameX2 + m_pTipbarWnd->GetTipbarHeight(); + LONG height = m_cyGrip + m_pTipbarWnd->m_cyDlgFrameX2; + m_pTipbarWnd->SetMoveRect(X0, Y0, width, height); + } + else + { + LONG width = m_cxGrip + m_pTipbarWnd->m_cxDlgFrameX2; + LONG height = m_pTipbarWnd->m_cyDlgFrameX2 + m_pTipbarWnd->GetTipbarHeight(); + m_pTipbarWnd->SetMoveRect(X0, Y0, width, height); + } + + SIZE frameSize = { 0, 0 }; + if (m_pTipbarWnd->m_pWndFrame) + m_pTipbarWnd->m_pWndFrame->GetFrameSize(&frameSize); + + m_pTipbarWnd->LocateCtrlButtons(); + m_pTipbarWnd->AutoAdjustDeskBandSize(); +} + +/*********************************************************************** + * CTipbarItem + */ + +CTipbarItem::CTipbarItem( + CTipbarThread *pThread, + ITfLangBarItem *pLangBarItem, + TF_LANGBARITEMINFO *pItemInfo, + DWORD dwUnknown16) +{ + m_dwUnknown19[1] = 0; + m_dwUnknown19[2] = 0; + m_dwUnknown19[3] = 0; + m_pTipbarThread = pThread; + m_ItemInfo = *pItemInfo; + m_pLangBarItem = pLangBarItem; + m_pLangBarItem->AddRef(); + m_dwItemFlags = 0; + m_dwUnknown16 = dwUnknown16; + m_dwDirty = 0x1001F; +} + +CTipbarItem::~CTipbarItem() +{ + if (g_pTipbarWnd) + { + if (g_pTipbarWnd->m_pTipbarAccessible) + g_pTipbarWnd->m_pTipbarAccessible->RemoveAccItem(this); + } + + if (m_pLangBarItem) + m_pLangBarItem->Release(); +} + +void CTipbarItem::_AddedToUI() +{ + if (!IsConnected()) + return; + + OnUnknown41(); + + m_dwItemFlags |= 0x2; + + DWORD dwStatus; + if (m_dwDirty) + { + if (m_dwDirty & 0x10000) + m_pLangBarItem->GetStatus(&dwStatus); + else + dwStatus = 0; + OnUnknown45(m_dwDirty, dwStatus); + m_dwDirty = 0; + } + + if (m_pTipbarThread) + { + CTipbarWnd *pTipbarWnd = m_pTipbarThread->m_pTipbarWnd; + if (pTipbarWnd) + { + CTipbarAccessible *pTipbarAccessible = pTipbarWnd->m_pTipbarAccessible; + if (pTipbarAccessible) + pTipbarAccessible->AddAccItem(this); + } + } + + OnUnknown42(); +} + +void CTipbarItem::_RemovedToUI() +{ + m_dwItemFlags &= ~0x2; + + if (g_pTipbarWnd) + { + CTipbarAccessible *pAccessible = g_pTipbarWnd->m_pTipbarAccessible; + if (pAccessible) + pAccessible->RemoveAccItem(this); + } +} + +void CTipbarItem::AddRemoveMeToUI(BOOL bFlag) +{ + if (!IsConnected()) + return; + + m_pTipbarThread->LocateItems(); + + if (!IsConnected()) + return; + + m_pTipbarThread->AddAllSeparators(); + + CTipbarWnd *pTipbarWnd = m_pTipbarThread->m_pTipbarWnd; + if (bFlag) + OnUnknown46(pTipbarWnd ? pTipbarWnd->GetWindow() : NULL); + else + OnUnknown47(pTipbarWnd ? pTipbarWnd->GetWindow() : NULL); +} + +BOOL CTipbarItem::IsConnected() +{ + return (!(m_dwItemFlags & 0x10) && m_pTipbarThread && m_pTipbarThread->m_pTipbarWnd && + m_pLangBarItem); +} + +void CTipbarItem::ClearConnections() +{ + m_pTipbarThread = NULL; + if (m_pLangBarItem) + { + m_pLangBarItem->Release(); + m_pLangBarItem = NULL; + } +} + +/// @unimplemented +void CTipbarItem::StartDemotingTimer(BOOL bStarted) +{ + if (!g_bIntelliSense) + return; + + if (!m_pTipbarThread) + return; + + CTipbarWnd *pTipbarWnd = m_pTipbarThread->m_pTipbarWnd; + if (!pTipbarWnd) + return; + + //FIXME +} + +STDMETHODIMP_(BOOL) CTipbarItem::DoAccDefaultAction() +{ + if (!m_pTipbarThread) + return FALSE; + CTipbarWnd *pTipbarWnd = m_pTipbarThread->m_pTipbarWnd; + if (!pTipbarWnd) + return FALSE; + pTipbarWnd->StartDoAccDefaultActionTimer(this); + return TRUE; +} + +/// @unimplemented +STDMETHODIMP_(void) CTipbarItem::OnUpdateHandler(ULONG, ULONG) +{ +} + +STDMETHODIMP_(void) CTipbarItem::GetAccLocation(LPRECT prc) +{ + OnUnknown57(prc); +} + +STDMETHODIMP_(BSTR) CTipbarItem::GetAccName() +{ + return ::SysAllocString(m_ItemInfo.szDescription); +} + +STDMETHODIMP_(LPCWSTR) CTipbarItem::GetToolTip() +{ + OnUnknown41(); + + if (!(m_dwItemFlags & 0x1)) + { + m_dwItemFlags |= 0x1; + + BSTR bstrString; + if (FAILED(m_pLangBarItem->GetTooltipString(&bstrString))) + return NULL; + + if (bstrString) + { + OnUnknown53(bstrString); + ::SysFreeString(bstrString); + } + } + + LPCWSTR pszToolTip = OnUnknown55(); + + OnUnknown42(); + + return pszToolTip; +} + +HRESULT CTipbarItem::OnUpdate(DWORD dwDirty) +{ + if (!IsConnected()) + return S_OK; + + m_dwDirty |= dwDirty; + m_dwItemFlags |= 0x20; + + if ((dwDirty & 0x10000) || (m_dwItemFlags & 0x6)) + { + if (m_pTipbarThread) + { + CTipbarWnd *pTipBarWnd = m_pTipbarThread->m_pTipbarWnd; + if (pTipBarWnd && *pTipBarWnd) + { + pTipBarWnd->KillTimer(6); + pTipBarWnd->SetTimer(6, g_uTimerElapseONUPDATECALLED); + } + } + } + + return S_OK; +} + +void CTipbarItem::MyClientToScreen(LPPOINT ppt, LPRECT prc) +{ + if (!m_pTipbarThread) + return; + if (m_pTipbarThread->m_pTipbarWnd) + m_pTipbarThread->m_pTipbarWnd->MyClientToScreen(ppt, prc); +} + /*********************************************************************** * GetTipbarInternal */ diff --git a/sdk/include/psdk/msctf.idl b/sdk/include/psdk/msctf.idl index 5ff4b4b090c..f7f3b12327d 100644 --- a/sdk/include/psdk/msctf.idl +++ b/sdk/include/psdk/msctf.idl @@ -68,6 +68,9 @@ cpp_quote("EXTERN_C BOOL WINAPI TF_GetMlngHKL(_In_ INT iKL, _Out_ HKL *phKL, _Ou cpp_quote("EXTERN_C INT WINAPI TF_GetMlngIconIndex(_In_ INT iKL);") cpp_quote("EXTERN_C HICON WINAPI TF_InatExtractIcon(_In_ INT iKL);") cpp_quote("EXTERN_C HRESULT WINAPI TF_RunInputCPL(VOID);") +cpp_quote("EXTERN_C BOOL WINAPI TF_GetThreadFlags(_In_ DWORD dwThreadId, _Out_ LPDWORD pdwFlags1, _Out_ LPDWORD pdwFlags2, _Out_ LPDWORD pdwFlags3);") +cpp_quote("EXTERN_C LONG WINAPI TF_CheckThreadInputIdle(_In_ DWORD dwThreadId, _In_ DWORD dwMilliseconds);") +cpp_quote("EXTERN_C BOOL WINAPI TF_IsInMarshaling(_In_ DWORD dwThreadId);") cpp_quote("EXTERN_C const GUID GUID_PROP_TEXTOWNER;") cpp_quote("EXTERN_C const GUID GUID_PROP_ATTRIBUTE;") diff --git a/sdk/include/reactos/cicero/cicuif.h b/sdk/include/reactos/cicero/cicuif.h index 777c26cea2e..c240027aad5 100644 --- a/sdk/include/reactos/cicero/cicuif.h +++ b/sdk/include/reactos/cicero/cicuif.h @@ -65,6 +65,19 @@ void cicInitUIFSys(void); void cicDoneUIFSys(void); void cicUpdateUIFSys(void); +inline void cicGetWorkAreaRect(POINT pt, LPRECT prc) +{ + ::SystemParametersInfo(SPI_GETWORKAREA, 0, prc, 0); + + HMONITOR hMon = ::MonitorFromPoint(pt, MONITOR_DEFAULTTONEAREST); + if (hMon) + { + MONITORINFO mi = { sizeof(mi) }; + if (::GetMonitorInfo(hMon, &mi)) + *prc = mi.rcWork; + } +} + ///////////////////////////////////////////////////////////////////////////// #include <uxtheme.h>
10 months, 2 weeks
1
0
0
0
[reactos] 01/01: [GITHUB] build.yml: Re-enable 'build-msbuild-i386' (#6470)
by Serge Gautherie
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=eb55d984c0c03dcdaa5cd…
commit eb55d984c0c03dcdaa5cd27b34e8b7a3544eae6a Author: Serge Gautherie <32623169+SergeGautherie(a)users.noreply.github.com> AuthorDate: Sat Feb 10 11:36:38 2024 +0100 Commit: GitHub <noreply(a)github.com> CommitDate: Sat Feb 10 13:36:38 2024 +0300 [GITHUB] build.yml: Re-enable 'build-msbuild-i386' (#6470) Something fixed it in the meantime. Revert 0.4.15-dev-6069-g 56a45014. CORE-18911 --- .github/workflows/build.yml | 51 ++++++++++++++++++++++----------------------- 1 file changed, 25 insertions(+), 26 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 31c8af9fd33..e9953ef7f4e 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -291,29 +291,28 @@ jobs: name: reactos-syms-clang-cl-${{matrix.arch}}-${{matrix.config}}-${{github.sha}} path: build/msvc_pdb -# Disable MSBuild for the moment being until a proper fix is provided -- see CORE-18911 -# build-msbuild-i386: -# name: MSBuild (i386) -# runs-on: windows-2019 -# steps: -# - name: Install Flex and Bison -# run: | -# curl -O
https://svn.reactos.org/storage/vperevertkin/flexbison.7z
-# 7z x flexbison.7z -O${{github.workspace}}\bin -# echo "${{github.workspace}}\bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append -# echo "BISON_PKGDATADIR=${{github.workspace}}\bin\share\bison" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append -# echo "M4=${{github.workspace}}\bin\m4.exe" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append -# - name: Add CL to PATH -# uses: ilammy/msvc-dev-cmd@v1 -# with: -# arch: amd64_x86 -# - uses: actions/checkout@v4 -# with: -# path: src -# - name: Configure -# run: | -# mkdir build -# cd build -# cmake -G "Visual Studio 16 2019" -A Win32 -DCMAKE_TOOLCHAIN_FILE:FILEPATH=toolchain-msvc.cmake -DARCH:STRING=i386 -DENABLE_ROSTESTS=1 -DENABLE_ROSAPPS=1 ${{github.workspace}}\src -# - name: Build -# run: cmake --build ${{github.workspace}}\build --target bootcd --target livecd + build-msbuild-i386: + name: MSBuild (i386) + runs-on: windows-2019 + steps: + - name: Install Flex and Bison + run: | + curl -O
https://svn.reactos.org/storage/vperevertkin/flexbison.7z
+ 7z x flexbison.7z -O${{github.workspace}}\bin + echo "${{github.workspace}}\bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append + echo "BISON_PKGDATADIR=${{github.workspace}}\bin\share\bison" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append + echo "M4=${{github.workspace}}\bin\m4.exe" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append + - name: Add CL to PATH + uses: ilammy/msvc-dev-cmd@v1 + with: + arch: amd64_x86 + - uses: actions/checkout@v4 + with: + path: src + - name: Configure + run: | + mkdir build + cd build + cmake -G "Visual Studio 16 2019" -A Win32 -DCMAKE_TOOLCHAIN_FILE:FILEPATH=toolchain-msvc.cmake -DARCH:STRING=i386 -DENABLE_ROSTESTS=1 -DENABLE_ROSAPPS=1 ${{github.workspace}}\src + - name: Build + run: cmake --build ${{github.workspace}}\build --target bootcd --target livecd
10 months, 2 weeks
1
0
0
0
[reactos] 01/01: [GITHUB] build.yml: Use all matrix values to restore Linux build cache (#5595)
by Serge Gautherie
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=24dea07c3cc72c5480c2f…
commit 24dea07c3cc72c5480c2f12619cf96c49ef1e029 Author: Serge Gautherie <32623169+SergeGautherie(a)users.noreply.github.com> AuthorDate: Sat Feb 10 11:32:27 2024 +0100 Commit: GitHub <noreply(a)github.com> CommitDate: Sat Feb 10 13:32:27 2024 +0300 [GITHUB] build.yml: Use all matrix values to restore Linux build cache (#5595) Do not mix different build configurations. Extend cache key. Addendum to 0.4.15-dev-2996-g f777e6bd and 0.4.15-dev-6472-g 732f223c. --- .github/workflows/build.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 6a58c3a7e4b..31c8af9fd33 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -53,9 +53,9 @@ jobs: uses: actions/cache@v4 with: path: ccache - key: ccache-${{matrix.compiler}}-${{matrix.arch}}-${{matrix.config}}-${{github.sha}} + key: ccache-${{matrix.compiler}}-${{matrix.arch}}-${{matrix.config}}-${{matrix.dllver}}-${{github.sha}} restore-keys: | - ccache-${{matrix.compiler}}-${{matrix.arch}}- + ccache-${{matrix.compiler}}-${{matrix.arch}}-${{matrix.config}}-${{matrix.dllver}}- - name: Set ccache settings run: | echo "CCACHE_BASEDIR=${{github.workspace}}" >> $GITHUB_ENV @@ -133,7 +133,7 @@ jobs: with: path: src - name: Configure - run: cmake -S src -B build -G Ninja -DCMAKE_TOOLCHAIN_FILE:FILEPATH=toolchain-msvc.cmake -DARCH:STRING=${{matrix.arch}} -DCMAKE_BUILD_TYPE=${{matrix.config}} -DENABLE_ROSTESTS=1 -DENABLE_ROSAPPS=1 -DDLL_EXPORT_VERSION=${{matrix.dllver}} + run: cmake -S src -B build -G Ninja -DCMAKE_TOOLCHAIN_FILE:FILEPATH=toolchain-msvc.cmake -DARCH:STRING=${{matrix.arch}} -DCMAKE_BUILD_TYPE=${{matrix.config}} -DDLL_EXPORT_VERSION=${{matrix.dllver}} -DENABLE_ROSTESTS=1 -DENABLE_ROSAPPS=1 - name: Build run: cmake --build build -- -k0 - name: Generate ISOs
10 months, 2 weeks
1
0
0
0
[reactos] 01/01: [MSUTB] Disable Desk Band (#6472)
by Katayama Hirofumi MZ
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=b548b05e893eb9c565434…
commit b548b05e893eb9c5654349f20a67d57c897ad00d Author: Katayama Hirofumi MZ <katayama.hirofumi.mz(a)gmail.com> AuthorDate: Sat Feb 10 18:12:45 2024 +0900 Commit: GitHub <noreply(a)github.com> CommitDate: Sat Feb 10 18:12:45 2024 +0900 [MSUTB] Disable Desk Band (#6472) Supporting Language Bar... JIRA issue: CORE-19363 - Add IDD_CLOSELANGBARNOBAND and IDD_MINIMIZELANGBARNOBAND resource dialogs. - Add IDB_BITMAP154 and IDB_BITMAP155 resource bitmaps. - Disable Desk Band by using g_bEnableDeskBand global variable. --- dll/win32/msutb/lang/en-US.rc | 31 +++++++++-- dll/win32/msutb/msutb.cpp | 104 +++++++++++++++++++++++++++---------- dll/win32/msutb/msutb.rc | 2 + dll/win32/msutb/res/Bitmap-154.bmp | Bin 0 -> 1702 bytes dll/win32/msutb/res/Bitmap-155.bmp | Bin 0 -> 2498 bytes dll/win32/msutb/resource.h | 5 ++ 6 files changed, 110 insertions(+), 32 deletions(-) diff --git a/dll/win32/msutb/lang/en-US.rc b/dll/win32/msutb/lang/en-US.rc index 5dc13e43ce7..6c1925f28fa 100644 --- a/dll/win32/msutb/lang/en-US.rc +++ b/dll/win32/msutb/lang/en-US.rc @@ -34,6 +34,17 @@ BEGIN IDS_LEFTCLICK "Left Click" END +IDD_CLOSELANGBARNOBAND DIALOGEX 0, 0, 200, 105 +CAPTION "Language Bar" +STYLE WS_POPUPWINDOW | WS_CAPTION | DS_MODALFRAME +FONT 8, "MS Shell Dlg" +{ + LTEXT "You have closed Language Bar.\r\n\r\nTo use Language Bar later, check ""Show Language Bar on the desktop"" in Language Bar Settings dialog, which you can find within Text Services control panel.", -1, 5, 5, 190, 60 + AUTOCHECKBOX "&Don't show me this message again", IDC_CLOSELANGBAR_CHECK, 5, 70, 145, 10 + DEFPUSHBUTTON "OK", IDOK, 80, 85, 55, 15 + PUSHBUTTON "Cancel", IDCANCEL, 140, 85, 55, 15 +} + IDD_CLOSELANGBAR DIALOGEX 0, 0, 200, 105 CAPTION "Language Bar" STYLE WS_POPUPWINDOW | WS_CAPTION | DS_MODALFRAME @@ -45,12 +56,24 @@ FONT 8, "MS Shell Dlg" PUSHBUTTON "Cancel", IDCANCEL, 140, 85, 55, 15 } -IDD_MINIMIZELANGBAR DIALOGEX 0, 0, 205, 84 +IDD_MINIMIZELANGBARNOBAND DIALOGEX 0, 0, 205, 124 +CAPTION "Language Bar" +STYLE WS_POPUPWINDOW | WS_CAPTION | DS_MODALFRAME +FONT 8, "MS Shell Dlg" +{ + LTEXT "You have minimized Language Bar. To restore it, just click Language Bar icon (near the clock) and select ""Restore Language Bar"" from the pop-up menu.", -1, 5, 5, 190, 50 + CONTROL IDB_BITMAP154, -1, "STATIC", SS_BITMAP, 72, 63, 60, 60, WS_EX_STATICEDGE + AUTOCHECKBOX "Don't show me this message again", IDC_MINIMIZELANGBAR_CHECK, 5, 105, 125, 10 + DEFPUSHBUTTON "OK", IDOK, 140, 105, 60, 15 +} + +IDD_MINIMIZELANGBAR DIALOGEX 0, 0, 205, 124 CAPTION "Language Bar" STYLE WS_POPUPWINDOW | WS_CAPTION | DS_MODALFRAME FONT 8, "MS Shell Dlg" { - LTEXT "You have minimized Language Bar. To restore it, just click Language Bar icon (near the clock) and choose ""Restore Language Bar"" from the pop-up menu.", -1, 5, 5, 190, 50 - AUTOCHECKBOX "Don't show me this message again", IDC_MINIMIZELANGBAR_CHECK, 5, 65, 125, 10 - DEFPUSHBUTTON "OK", IDOK, 140, 65, 60, 15 + LTEXT "You have minimized Language Bar. To restore it, just click Language Bar icon (near the clock) and select ""Restore Language Bar"" from the pop-up menu.", -1, 5, 5, 190, 50 + CONTROL IDB_BITMAP155, -1, "STATIC", SS_BITMAP, 53, 67, 60, 60, WS_EX_STATICEDGE + AUTOCHECKBOX "Don't show me this message again", IDC_MINIMIZELANGBAR_CHECK, 5, 105, 125, 10 + DEFPUSHBUTTON "OK", IDOK, 140, 105, 60, 15 } diff --git a/dll/win32/msutb/msutb.cpp b/dll/win32/msutb/msutb.cpp index be242369160..9d5e6d8f557 100644 --- a/dll/win32/msutb/msutb.cpp +++ b/dll/win32/msutb/msutb.cpp @@ -9,6 +9,8 @@ WINE_DEFAULT_DEBUG_CHANNEL(msutb); +//#define ENABLE_DESKBAND + HINSTANCE g_hInst = NULL; UINT g_wmTaskbarCreated = 0; UINT g_uACP = CP_ACP; @@ -18,6 +20,11 @@ LONG g_DllRefCount = 0; BOOL g_bWinLogon = FALSE; BOOL g_fInClosePopupTipbar = FALSE; HWND g_hwndParent = NULL; +#ifdef ENABLE_DESKBAND +BOOL g_bEnableDeskBand = TRUE; +#else +BOOL g_bEnableDeskBand = FALSE; +#endif BOOL g_bShowTipbar = TRUE; BOOL g_bShowDebugMenu = FALSE; @@ -67,10 +74,6 @@ class CMsUtbModule : public CComModule { }; -BEGIN_OBJECT_MAP(ObjectMap) - //OBJECT_ENTRY(CLSID_MSUTBDeskBand, CDeskBand) // FIXME: Implement this -END_OBJECT_MAP() - CMsUtbModule gModule; class CCicLibMenuItem; @@ -138,7 +141,11 @@ void InitSkipRedrawHKLArray(void) if (!g_prghklSkipRedrawing) return; - g_prghklSkipRedrawing->Add((HKL)UlongToHandle(0xE0010411)); // Japanese IME will be skipped + if (g_bEnableDeskBand && (g_dwOSInfo & CIC_OSINFO_XPPLUS)) + { + // Japanese IME will be skipped + g_prghklSkipRedrawing->Add((HKL)UlongToHandle(0xE0010411)); + } CicRegKey regKey; LSTATUS error = regKey.Open(HKEY_LOCAL_MACHINE, @@ -387,7 +394,7 @@ BOOL CheckEAFonts(void) BOOL IsDeskBandFromReg() { - if (!(g_dwOSInfo & CIC_OSINFO_XPPLUS)) // Desk band is for XP+ + if (!g_bEnableDeskBand || !(g_dwOSInfo & CIC_OSINFO_XPPLUS)) // Desk band is for XP+ return FALSE; CicRegKey regKey; @@ -536,12 +543,15 @@ BOOL InitFromReg(void) error = regKey2.QueryDword(TEXT("TimerElapseENSUREFOCUS"), &dwValue); if (error == ERROR_SUCCESS) g_uTimerElapseENSUREFOCUS = dwValue; - error = regKey2.QueryDword(TEXT("ShowDeskBand"), &dwValue); - if (error == ERROR_SUCCESS) - g_bShowDeskBand = !!dwValue; - error = regKey2.QueryDword(TEXT("TimerElapseSHOWWDESKBAND"), &dwValue); - if (error == ERROR_SUCCESS) - g_uTimerElapseSHOWDESKBAND = dwValue; + if (g_bEnableDeskBand && (g_dwOSInfo & CIC_OSINFO_XPPLUS)) + { + error = regKey2.QueryDword(TEXT("ShowDeskBand"), &dwValue); + if (error == ERROR_SUCCESS) + g_bShowDeskBand = !!dwValue; + error = regKey2.QueryDword(TEXT("TimerElapseSHOWWDESKBAND"), &dwValue); + if (error == ERROR_SUCCESS) + g_uTimerElapseSHOWDESKBAND = dwValue; + } } CicRegKey regKey3; @@ -1432,6 +1442,16 @@ public: STDMETHOD_(void, HandleMouseMsg)(UINT uMsg, LONG x, LONG y) override; }; +/***********************************************************************/ + +#ifdef ENABLE_DESKBAND +class CDeskBand +{ +public: + // FIXME: Implement this +}; +#endif + /*********************************************************************** * CUTBLangBarDlg */ @@ -1518,7 +1538,11 @@ CUTBLangBarDlg::DlgProc(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam) CUTBCloseLangBarDlg::CUTBCloseLangBarDlg() { m_cRefs = 1; - m_pszDialogName = MAKEINTRESOURCE(IDD_CLOSELANGBAR); + + if (!(g_dwOSInfo & CIC_OSINFO_XPPLUS)) + m_pszDialogName = MAKEINTRESOURCE(IDD_CLOSELANGBARNOBAND); + else + m_pszDialogName = MAKEINTRESOURCE(IDD_CLOSELANGBAR); } STDMETHODIMP_(BOOL) CUTBCloseLangBarDlg::DoModal(HWND hDlg) @@ -1581,7 +1605,10 @@ STDMETHODIMP_(void) CUTBCloseLangBarDlg::SetDlgShown(BOOL bShown) CUTBMinimizeLangBarDlg::CUTBMinimizeLangBarDlg() { m_cRefs = 1; - m_pszDialogName = MAKEINTRESOURCE(IDD_MINIMIZELANGBAR); + if (!(g_dwOSInfo & CIC_OSINFO_XPPLUS)) + m_pszDialogName = MAKEINTRESOURCE(IDD_MINIMIZELANGBARNOBAND); + else + m_pszDialogName = MAKEINTRESOURCE(IDD_MINIMIZELANGBAR); } STDMETHODIMP_(BOOL) CUTBMinimizeLangBarDlg::DoModal(HWND hDlg) @@ -2752,13 +2779,20 @@ BOOL CUTBContextMenu::SelectMenuItem(UINT nCommandId) case ID_DESKBAND: { - DWORD dwStatus; - m_pTipbarWnd->m_pLangBarMgr->GetShowFloatingStatus(&dwStatus); + if (!g_bEnableDeskBand || !(g_dwOSInfo & CIC_OSINFO_XPPLUS)) + { + m_pTipbarWnd->m_pLangBarMgr->ShowFloating(TF_SFT_MINIMIZED); + } + else + { + DWORD dwStatus; + m_pTipbarWnd->m_pLangBarMgr->GetShowFloatingStatus(&dwStatus); - if (dwStatus & TF_SFT_DESKBAND) - break; + if (dwStatus & TF_SFT_DESKBAND) + break; - m_pTipbarWnd->m_pLangBarMgr->ShowFloating(TF_SFT_DESKBAND); + m_pTipbarWnd->m_pLangBarMgr->ShowFloating(TF_SFT_DESKBAND); + } CUTBMinimizeLangBarDlg *pDialog = new(cicNoThrow) CUTBMinimizeLangBarDlg(); if (pDialog) @@ -3667,15 +3701,19 @@ STDMETHODIMP_(void) CTipbarGripper::OnLButtonUp(LONG x, LONG y) { m_pTipbarWnd->RestoreFromStub(); - APPBARDATA AppBar = { sizeof(AppBar) }; - AppBar.hWnd = ::FindWindowW(L"Shell_TrayWnd", NULL); - if (::SHAppBarMessage(ABM_GETTASKBARPOS, &AppBar)) + if (g_bEnableDeskBand && (g_dwOSInfo & CIC_OSINFO_XPPLUS)) { - RECT rc = AppBar.rc; - POINT pt; - ::GetCursorPos(&pt); - if (g_pTipbarWnd && ::PtInRect(&rc, pt)) - g_pTipbarWnd->m_pLangBarMgr->ShowFloating(TF_SFT_DESKBAND | TF_SFT_EXTRAICONSONMINIMIZED); + APPBARDATA AppBar = { sizeof(AppBar) }; + AppBar.hWnd = ::FindWindowW(L"Shell_TrayWnd", NULL); + if (::SHAppBarMessage(ABM_GETTASKBARPOS, &AppBar)) + { + RECT rc = AppBar.rc; + POINT pt; + ::GetCursorPos(&pt); + if (g_pTipbarWnd && ::PtInRect(&rc, pt)) + g_pTipbarWnd->m_pLangBarMgr->ShowFloating(TF_SFT_DESKBAND | + TF_SFT_EXTRAICONSONMINIMIZED); + } } CUIFGripper::OnLButtonUp(x, y); @@ -4159,6 +4197,10 @@ BOOL CTipbarWnd::KillTimer(UINT_PTR uIDEvent) /// @unimplemented void CTipbarWnd::MoveToTray() { + if (!g_bEnableDeskBand || !(g_dwOSInfo & CIC_OSINFO_XPPLUS)) + { + //FIXME + } } void CTipbarWnd::MyClientToScreen(LPPOINT lpPoint, LPRECT prc) @@ -4858,7 +4900,7 @@ SetRegisterLangBand(BOOL bRegister) { TRACE("(%d)\n", bRegister); - if (!(g_dwOSInfo & CIC_OSINFO_XPPLUS)) // Desk band is for XP+ + if (!g_bEnableDeskBand || !(g_dwOSInfo & CIC_OSINFO_XPPLUS)) // Desk band is for XP+ return E_FAIL; BOOL bDeskBand = IsDeskBandFromReg(); @@ -4968,6 +5010,12 @@ MsUtbCoCreateInstance( return cicRealCoCreateInstance(rclsid, pUnkOuter, dwClsContext, iid, ppv); } +BEGIN_OBJECT_MAP(ObjectMap) +#ifdef ENABLE_DESKBAND + OBJECT_ENTRY(CLSID_MSUTBDeskBand, CDeskBand) // FIXME: Implement this +#endif +END_OBJECT_MAP() + /// @implemented BOOL ProcessAttach(HINSTANCE hinstDLL) { diff --git a/dll/win32/msutb/msutb.rc b/dll/win32/msutb/msutb.rc index 82ae823ce07..bc2ad8380ed 100644 --- a/dll/win32/msutb/msutb.rc +++ b/dll/win32/msutb/msutb.rc @@ -21,6 +21,8 @@ LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL #include <reactos/manifest_hosted.rc> IDI_MAINICON ICON "res/earth.ico" +IDB_BITMAP154 BITMAP "res/Bitmap-154.bmp" +IDB_BITMAP155 BITMAP "res/Bitmap-155.bmp" /* UTF-8 */ #pragma code_page(65001) diff --git a/dll/win32/msutb/res/Bitmap-154.bmp b/dll/win32/msutb/res/Bitmap-154.bmp new file mode 100644 index 00000000000..eb2498a58cd Binary files /dev/null and b/dll/win32/msutb/res/Bitmap-154.bmp differ diff --git a/dll/win32/msutb/res/Bitmap-155.bmp b/dll/win32/msutb/res/Bitmap-155.bmp new file mode 100644 index 00000000000..503b4894926 Binary files /dev/null and b/dll/win32/msutb/res/Bitmap-155.bmp differ diff --git a/dll/win32/msutb/resource.h b/dll/win32/msutb/resource.h index 40f76d3441b..e00fa496048 100644 --- a/dll/win32/msutb/resource.h +++ b/dll/win32/msutb/resource.h @@ -1,5 +1,8 @@ #pragma once +#define IDB_BITMAP154 154 +#define IDB_BITMAP155 155 + #define IDS_OK 100 #define IDS_CANCEL 101 #define IDS_ABORT 102 @@ -39,7 +42,9 @@ #define ID_ADJUSTDESKBAND 219 #define ID_SETTINGS 2000 +#define IDD_CLOSELANGBARNOBAND 1000 #define IDD_CLOSELANGBAR 1001 +#define IDD_MINIMIZELANGBARNOBAND 1003 #define IDD_MINIMIZELANGBAR 1004 #define IDC_CLOSELANGBAR_CHECK 1002
10 months, 2 weeks
1
0
0
0
[reactos] 01/01: [MSUTB][SDK] Implement SetRegisterLangBand (#6471)
by Katayama Hirofumi MZ
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=152af475b19eafce551f6…
commit 152af475b19eafce551f625d1ca38c78285432f5 Author: Katayama Hirofumi MZ <katayama.hirofumi.mz(a)gmail.com> AuthorDate: Sat Feb 10 16:04:33 2024 +0900 Commit: GitHub <noreply(a)github.com> CommitDate: Sat Feb 10 16:04:33 2024 +0900 [MSUTB][SDK] Implement SetRegisterLangBand (#6471) Supporting Language Bar... JIRA issue: CORE-19363 - Add some helper functions. - Implement SetRegisterLangBand function. --- dll/win32/msutb/msutb.cpp | 69 +++++++++++++++++++++++++++++++++++-- sdk/include/reactos/cicero/cicutb.h | 2 ++ 2 files changed, 68 insertions(+), 3 deletions(-) diff --git a/dll/win32/msutb/msutb.cpp b/dll/win32/msutb/msutb.cpp index bc9c2ff510d..be242369160 100644 --- a/dll/win32/msutb/msutb.cpp +++ b/dll/win32/msutb/msutb.cpp @@ -375,6 +375,7 @@ FindEAEnumFontProc(ENUMLOGFONT *pLF, NEWTEXTMETRIC *pTM, INT nFontType, LPARAM l return FALSE; } +/// Are there East-Asian vertical fonts? BOOL CheckEAFonts(void) { BOOL bHasVertical = FALSE; @@ -384,6 +385,55 @@ BOOL CheckEAFonts(void) return bHasVertical; } +BOOL IsDeskBandFromReg() +{ + if (!(g_dwOSInfo & CIC_OSINFO_XPPLUS)) // Desk band is for XP+ + return FALSE; + + CicRegKey regKey; + if (regKey.Open(HKEY_CURRENT_USER, TEXT("SOFTWARE\\Microsoft\\CTF\\MSUTB\\"))) + { + DWORD dwValue = 0; + regKey.QueryDword(TEXT("ShowDeskBand"), &dwValue); + return !!dwValue; + } + + return FALSE; +} + +void SetDeskBandToReg(BOOL bShow) +{ + CicRegKey regKey; + if (regKey.Open(HKEY_CURRENT_USER, TEXT("SOFTWARE\\Microsoft\\CTF\\MSUTB\\"), KEY_ALL_ACCESS)) + regKey.SetDword(TEXT("ShowDeskBand"), bShow); +} + +BOOL RegisterComCat(REFCLSID rclsid, REFCATID rcatid, BOOL bRegister) +{ + if (FAILED(::CoInitialize(NULL))) + return FALSE; + + ICatRegister *pCat; + HRESULT hr = ::CoCreateInstance(CLSID_StdComponentCategoriesMgr, NULL, CLSCTX_INPROC_SERVER, + IID_ICatRegister, (void**)&pCat); + if (SUCCEEDED(hr)) + { + if (bRegister) + hr = pCat->RegisterClassImplCategories(rclsid, 1, const_cast<CATID*>(&rcatid)); + else + hr = pCat->UnRegisterClassImplCategories(rclsid, 1, const_cast<CATID*>(&rcatid)); + + pCat->Release(); + } + + ::CoUninitialize(); + + //if (IsIE5()) + // ::RegDeleteKey(HKEY_CLASSES_ROOT, TEXT("Component Categories\\{00021492-0000-0000-C000-000000000046}\\Enum")); + + return SUCCEEDED(hr); +} + BOOL InitFromReg(void) { DWORD dwValue; @@ -4801,13 +4851,26 @@ GetPopupTipbar(HWND hWnd, BOOL fWinLogon) /*********************************************************************** * SetRegisterLangBand (MSUTB.@) * - * @unimplemented + * @implemented */ EXTERN_C HRESULT WINAPI SetRegisterLangBand(BOOL bRegister) { - FIXME("stub:(%d)\n", bRegister); - return E_NOTIMPL; + TRACE("(%d)\n", bRegister); + + if (!(g_dwOSInfo & CIC_OSINFO_XPPLUS)) // Desk band is for XP+ + return E_FAIL; + + BOOL bDeskBand = IsDeskBandFromReg(); + if (bDeskBand == bRegister) + return S_OK; + + SetDeskBandToReg(bRegister); + + if (!RegisterComCat(CLSID_MSUTBDeskBand, CATID_DeskBand, bRegister)) + return TF_E_NOLOCK; + + return S_OK; } /*********************************************************************** diff --git a/sdk/include/reactos/cicero/cicutb.h b/sdk/include/reactos/cicero/cicutb.h index e1f517d1915..774be036cb4 100644 --- a/sdk/include/reactos/cicero/cicutb.h +++ b/sdk/include/reactos/cicero/cicutb.h @@ -15,6 +15,8 @@ DEFINE_GUID(GUID_TFCAT_TIP_KEYBOARD, 0x34745C63, 0xB2F0, 0x4784, 0x8B, DEFINE_GUID(CLSID_SYSTEMLANGBARITEM, 0xBEBACC94, 0x5CD3, 0x4662, 0xA1, 0xE0, 0xF3, 0x31, 0x99, 0x49, 0x36, 0x69); DEFINE_GUID(IID_ITfLangBarMgr_P, 0xD72C0FA9, 0xADD5, 0x4AF0, 0x87, 0x06, 0x4F, 0xA9, 0xAE, 0x3E, 0x2E, 0xFF); DEFINE_GUID(IID_ITfLangBarEventSink_P, 0x7A460360, 0xDA21, 0x4B09, 0xA8, 0xA0, 0x8A, 0x69, 0xE7, 0x28, 0xD8, 0x93); +DEFINE_GUID(CLSID_MSUTBDeskBand, 0x540D8A8B, 0x1C3F, 0x4E32, 0x81, 0x32, 0x53, 0x0F, 0x6A, 0x50, 0x20, 0x90); +DEFINE_GUID(CATID_DeskBand, 0x00021492, 0x0000, 0x0000, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46); EXTERN_C LPVOID WINAPI GetLibTls(VOID); EXTERN_C BOOL WINAPI GetPopupTipbar(HWND hWnd, BOOL fWinLogon);
10 months, 2 weeks
1
0
0
0
[reactos] 01/01: [MSUTB] Implement GetPopupTipbar (#6469)
by Katayama Hirofumi MZ
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=463fec050376e8e935b51…
commit 463fec050376e8e935b51ef71feb915240a7d6d6 Author: Katayama Hirofumi MZ <katayama.hirofumi.mz(a)gmail.com> AuthorDate: Sat Feb 10 15:14:21 2024 +0900 Commit: GitHub <noreply(a)github.com> CommitDate: Sat Feb 10 15:14:21 2024 +0900 [MSUTB] Implement GetPopupTipbar (#6469) Supporting Language Bar... JIRA issue: CORE-19363 - Add GetTipbarInternal helper function. - Implement GetPopupTipbar function. --- dll/win32/msutb/msutb.cpp | 64 +++++++++++++++++++++++++++++++++++++++++++---- 1 file changed, 59 insertions(+), 5 deletions(-) diff --git a/dll/win32/msutb/msutb.cpp b/dll/win32/msutb/msutb.cpp index 5f3bc581fa3..bc9c2ff510d 100644 --- a/dll/win32/msutb/msutb.cpp +++ b/dll/win32/msutb/msutb.cpp @@ -17,6 +17,7 @@ CRITICAL_SECTION g_cs; LONG g_DllRefCount = 0; BOOL g_bWinLogon = FALSE; BOOL g_fInClosePopupTipbar = FALSE; +HWND g_hwndParent = NULL; BOOL g_bShowTipbar = TRUE; BOOL g_bShowDebugMenu = FALSE; @@ -1252,6 +1253,7 @@ class CTipbarWnd friend class CUTBContextMenu; friend class CTipbarGripper; friend VOID WINAPI ClosePopupTipbar(VOID); + friend BOOL GetTipbarInternal(HWND hWnd, DWORD dwFlags, CDeskBand *pDeskBand); public: CTipbarWnd(DWORD style); @@ -1267,7 +1269,7 @@ public: return static_cast<CTipbarAccItem*>(this); } - void Init(BOOL bFlag, CDeskBand *pDeskBand); + void Init(BOOL bChild, CDeskBand *pDeskBand); void InitHighContrast(); void InitMetrics(); void InitThemeMargins(); @@ -3713,7 +3715,7 @@ CTipbarWnd::~CTipbarWnd() } /// @unimplemented -void CTipbarWnd::Init(BOOL bFlag, CDeskBand *pDeskBand) +void CTipbarWnd::Init(BOOL bChild, CDeskBand *pDeskBand) { } @@ -4720,6 +4722,54 @@ STDMETHODIMP_(void) CTipbarWnd::HandleMouseMsg(UINT uMsg, LONG x, LONG y) { } +/*********************************************************************** + * GetTipbarInternal + */ +BOOL GetTipbarInternal(HWND hWnd, DWORD dwFlags, CDeskBand *pDeskBand) +{ + BOOL bParent = !!(dwFlags & 0x80000000); + g_bWinLogon = !!(dwFlags & 0x1); + + InitFromReg(); + + if (!g_bShowTipbar) + return FALSE; + + if (bParent) + { + g_pTrayIconWnd = new(cicNoThrow) CTrayIconWnd(); + if (!g_pTrayIconWnd) + return FALSE; + g_pTrayIconWnd->CreateWnd(); + } + + g_pTipbarWnd = new(cicNoThrow) CTipbarWnd(bParent ? g_dwWndStyle : g_dwChildWndStyle); + if (!g_pTipbarWnd || !g_pTipbarWnd->Initialize()) + return FALSE; + + g_pTipbarWnd->Init(!bParent, pDeskBand); + g_pTipbarWnd->CreateWnd(hWnd); + + ::SetWindowText(*g_pTipbarWnd, TEXT("TF_FloatingLangBar_WndTitle")); + + DWORD dwOldStatus = 0; + if (!bParent) + { + g_pTipbarWnd->m_pLangBarMgr->GetPrevShowFloatingStatus(&dwOldStatus); + g_pTipbarWnd->m_pLangBarMgr->ShowFloating(TF_SFT_DESKBAND); + } + + DWORD dwStatus; + g_pTipbarWnd->m_pLangBarMgr->GetShowFloatingStatus(&dwStatus); + g_pTipbarWnd->ShowFloating(dwStatus); + + if (!bParent && (dwOldStatus & TF_SFT_DESKBAND)) + g_pTipbarWnd->m_dwTipbarWndFlags |= 0x4000; + + g_hwndParent = hWnd; + return TRUE; +} + /*********************************************************************** * GetLibTls (MSUTB.@) * @@ -4735,13 +4785,17 @@ GetLibTls(VOID) /*********************************************************************** * GetPopupTipbar (MSUTB.@) * - * @unimplemented + * @implemented */ EXTERN_C BOOL WINAPI GetPopupTipbar(HWND hWnd, BOOL fWinLogon) { - FIXME("stub:(%p, %d)\n", hWnd, fWinLogon); - return FALSE; + TRACE("(%p, %d)\n", hWnd, fWinLogon); + + if (!fWinLogon) + TurnOffSpeechIfItsOn(); + + return GetTipbarInternal(hWnd, fWinLogon | 0x80000000, NULL); } /***********************************************************************
10 months, 2 weeks
1
0
0
0
[reactos] 01/01: [MSUTB] Implement ClosePopupTipbar (#6468)
by Katayama Hirofumi MZ
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=a6ab8ca780d58d7c62de4…
commit a6ab8ca780d58d7c62de4c4dadfbc5d5234fca57 Author: Katayama Hirofumi MZ <katayama.hirofumi.mz(a)gmail.com> AuthorDate: Sat Feb 10 14:25:12 2024 +0900 Commit: GitHub <noreply(a)github.com> CommitDate: Sat Feb 10 14:25:12 2024 +0900 [MSUTB] Implement ClosePopupTipbar (#6468) Supporting Language Bar... JIRA issue: CORE-19363 - Implement ClosePopupTipbar function. --- dll/win32/msutb/msutb.cpp | 30 ++++++++++++++++++++++++++++-- 1 file changed, 28 insertions(+), 2 deletions(-) diff --git a/dll/win32/msutb/msutb.cpp b/dll/win32/msutb/msutb.cpp index f1c350035a3..5f3bc581fa3 100644 --- a/dll/win32/msutb/msutb.cpp +++ b/dll/win32/msutb/msutb.cpp @@ -16,6 +16,7 @@ DWORD g_dwOSInfo = 0; CRITICAL_SECTION g_cs; LONG g_DllRefCount = 0; BOOL g_bWinLogon = FALSE; +BOOL g_fInClosePopupTipbar = FALSE; BOOL g_bShowTipbar = TRUE; BOOL g_bShowDebugMenu = FALSE; @@ -1250,6 +1251,7 @@ class CTipbarWnd LONG m_cRefs; friend class CUTBContextMenu; friend class CTipbarGripper; + friend VOID WINAPI ClosePopupTipbar(VOID); public: CTipbarWnd(DWORD style); @@ -4757,12 +4759,36 @@ SetRegisterLangBand(BOOL bRegister) /*********************************************************************** * ClosePopupTipbar (MSUTB.@) * - * @unimplemented + * @implemented */ EXTERN_C VOID WINAPI ClosePopupTipbar(VOID) { - FIXME("stub:()\n"); + TRACE("()\n"); + + if (g_fInClosePopupTipbar) + return; + + g_fInClosePopupTipbar = TRUE; + + if (g_pTipbarWnd) + { + g_pTipbarWnd->m_pDeskBand = NULL; + g_pTipbarWnd->DestroyWnd(); + g_pTipbarWnd->Release(); + g_pTipbarWnd = NULL; + } + + if (g_pTrayIconWnd) + { + g_pTrayIconWnd->DestroyWnd(); + delete g_pTrayIconWnd; + g_pTrayIconWnd = NULL; + } + + UninitSkipRedrawHKLArray(); + + g_fInClosePopupTipbar = FALSE; } /***********************************************************************
10 months, 2 weeks
1
0
0
0
[reactos] 01/01: [MSUTB] Add CTipbarWnd Part 3 (#6467)
by Katayama Hirofumi MZ
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=c6ceae3440679c664b093…
commit c6ceae3440679c664b0936fbb81a20f1c15fbc7c Author: Katayama Hirofumi MZ <katayama.hirofumi.mz(a)gmail.com> AuthorDate: Sat Feb 10 13:04:37 2024 +0900 Commit: GitHub <noreply(a)github.com> CommitDate: Sat Feb 10 13:04:37 2024 +0900 [MSUTB] Add CTipbarWnd Part 3 (#6467) Supporting Language Bar... JIRA issue: CORE-19363 - Add implementation to CTipbarWnd class. - Add delay link to imm32.dll. --- dll/win32/msutb/CMakeLists.txt | 2 +- dll/win32/msutb/msutb.cpp | 371 +++++++++++++++++++++++++++++++++++++---- dll/win32/msutb/precomp.h | 1 + 3 files changed, 344 insertions(+), 30 deletions(-) diff --git a/dll/win32/msutb/CMakeLists.txt b/dll/win32/msutb/CMakeLists.txt index b425c8d0328..ee8204be2ff 100644 --- a/dll/win32/msutb/CMakeLists.txt +++ b/dll/win32/msutb/CMakeLists.txt @@ -15,5 +15,5 @@ set_module_type(msutb win32dll) add_dependencies(msutb msctf psdk) target_link_libraries(msutb wine uuid atl_classes) add_importlibs(msutb user32 gdi32 advapi32 msvcrt kernel32 ntdll) -add_delay_importlibs(msutb uxtheme comctl32 msctf ole32 oleacc oleaut32 shell32) +add_delay_importlibs(msutb uxtheme imm32 comctl32 msctf ole32 oleacc oleaut32 shell32) add_cd_file(TARGET msutb DESTINATION reactos/system32 FOR all) diff --git a/dll/win32/msutb/msutb.cpp b/dll/win32/msutb/msutb.cpp index cfdfb54d8a7..f1c350035a3 100644 --- a/dll/win32/msutb/msutb.cpp +++ b/dll/win32/msutb/msutb.cpp @@ -364,6 +364,24 @@ BOOL IsTransparecyAvailable(void) return FALSE; } +static INT CALLBACK +FindEAEnumFontProc(ENUMLOGFONT *pLF, NEWTEXTMETRIC *pTM, INT nFontType, LPARAM lParam) +{ + if ((nFontType != TRUETYPE_FONTTYPE) || (pLF->elfLogFont.lfFaceName[0] != '@')) + return TRUE; + *(BOOL*)lParam = TRUE; + return FALSE; +} + +BOOL CheckEAFonts(void) +{ + BOOL bHasVertical = FALSE; + HDC hDC = ::GetDC(NULL); + ::EnumFonts(hDC, NULL, (FONTENUMPROC)FindEAEnumFontProc, (LPARAM)&bHasVertical); + ::ReleaseDC(NULL, hDC); + return bHasVertical; +} + BOOL InitFromReg(void) { DWORD dwValue; @@ -680,6 +698,7 @@ protected: CicArray<CTipbarAccItem*> m_AccItems; LONG m_cSelection; friend class CUTBMenuWnd; + friend class CTipbarWnd; public: CTipbarAccessible(CTipbarAccItem *pItem); @@ -968,6 +987,7 @@ class CTipbarGripper : public CUIFGripper protected: CTipbarWnd *m_pTipbarWnd; BOOL m_bInDebugMenu; + friend class CTipbarWnd; public: CTipbarGripper(CTipbarWnd *pTipbarWnd, LPCRECT prc, DWORD style); @@ -1187,7 +1207,8 @@ class CTipbarWnd , public CTipbarAccItem , public CUIFWindow { - DWORD m_dwUnknown19[2]; + CTipbarCoInitialize m_coInit; + DWORD m_dwSinkCookie; CModalMenu *m_pModalMenu; CTipbarThread *m_pThread; CicArray<GUID*> m_TipbarGUIDArray; @@ -1239,6 +1260,11 @@ public: return static_cast<CUIFWindow*>(this); } + CTipbarAccItem *GetAccItem() + { + return static_cast<CTipbarAccItem*>(this); + } + void Init(BOOL bFlag, CDeskBand *pDeskBand); void InitHighContrast(); void InitMetrics(); @@ -1286,7 +1312,7 @@ public: void MyClientToScreen(LPPOINT lpPoint, LPRECT prc); void SavePosition(); void SetAlpha(BYTE bAlpha, BOOL bFlag); - BOOL SetLangBand(BOOL bFlag1, BOOL bFlag2); + BOOL SetLangBand(BOOL bDeskBand, BOOL bFlag2); void SetMoveRect(INT X, INT Y, INT nWidth, INT nHeight); void SetShowText(BOOL bShow); void SetShowTrayIcon(BOOL bShow); @@ -3627,8 +3653,6 @@ STDMETHODIMP_(BOOL) CTipbarGripper::OnSetCursor(UINT uMsg, LONG x, LONG y) CTipbarWnd::CTipbarWnd(DWORD style) : CUIFWindow(g_hInst, style) { - m_dwUnknown19[0] = 0; - m_dwUnknown23_1[4] = 0; m_dwUnknown23_1[5] = 0; m_dwUnknown23_1[6] = 0; @@ -3813,9 +3837,11 @@ void CTipbarWnd::MoveToStub(BOOL bFlag) { } -/// @unimplemented void CTipbarWnd::RestoreFromStub() { + m_dwTipbarWndFlags &= 0x3F; + KillTimer(1); + KillTimer(2); } /// @unimplemented @@ -3824,16 +3850,38 @@ INT CTipbarWnd::GetCtrlButtonWidth() return 0; } -/// @unimplemented INT CTipbarWnd::GetGripperWidth() { - return 0; + if (m_dwTipbarWndFlags & 2) + return 0; + + if (!m_pTipbarGripper || FAILED(m_pTipbarGripper->EnsureThemeData(m_hWnd))) + return 5; + + INT width = -1; + SIZE partSize; + HDC hDC = ::GetDC(m_hWnd); + if (SUCCEEDED(m_pTipbarGripper->GetThemePartSize(hDC, 1, 0, TS_TRUE, &partSize))) + { + INT cx = partSize.cx; + if (m_dwTipbarWndFlags & 4) + cx = partSize.cy; + width = cx + 4; + } + ::ReleaseDC(m_hWnd, hDC); + + return ((width < 0) ? 5 : width); } -/// @unimplemented INT CTipbarWnd::GetTipbarHeight() { - return 0; + SIZE size = { 0, 0 }; + if (m_pWndFrame) + m_pWndFrame->GetFrameSize(&size); + INT cy = m_Margins.cyBottomHeight + m_Margins.cyTopHeight + 2; + if (cy < 6) + cy = 6; + return m_cySmallIcon + cy + (2 * size.cy); } /// @unimplemented @@ -3853,19 +3901,93 @@ void CTipbarWnd::LocateCtrlButtons() { } -/// @unimplemented void CTipbarWnd::AdjustPosOnDisplayChange() { + RECT rcWorkArea; + RECT rc = { m_nLeft, m_nTop, m_nLeft + m_nWidth, m_nTop + m_nHeight }; + if (!GetWorkArea(&rc, &rcWorkArea)) + return; + + INT x = m_nLeft, y = m_nTop; + if (m_dwTipbarWndFlags & 0x200000) + x = rcWorkArea.left; + if (m_dwTipbarWndFlags & 0x40000) + y = rcWorkArea.top; + if (m_dwTipbarWndFlags & 0x100000) + x = rcWorkArea.right - m_nWidth; + if (m_dwTipbarWndFlags & 0x80000) + y = rcWorkArea.bottom - m_nHeight; + if (x != m_nLeft || y != m_nTop) + Move(x, y, m_nWidth, m_nHeight); } -/// @unimplemented void CTipbarWnd::SetVertical(BOOL bVertical) { + if (bVertical) + m_dwTipbarWndFlags |= 0x4; + else + m_dwTipbarWndFlags &= ~0x4; + + if (m_pTipbarGripper) + { + DWORD style = m_pTipbarGripper->m_style; + if (bVertical) + style |= 0x1; + else + style &= 0x1; + m_pTipbarGripper->SetStyle(style); + } + + if (g_fTaskbarTheme) + SetActiveTheme(L"TASKBAR", !!(m_dwTipbarWndFlags & 0x4), 1); + + if (!(m_dwTipbarWndFlags & 2)) + { + if (m_dwTipbarWndFlags & 4) + { + Move(m_nLeft, m_nTop, GetTipbarHeight(), 0); + } + else + { + Move(m_nLeft, m_nTop, 0, GetTipbarHeight()); + } + } + + if (m_hWnd) + { + KillTimer(7); + SetTimer(7, g_uTimerElapseSYSCOLORCHANGED); + } } -/// @unimplemented void CTipbarWnd::UpdatePosFlags() { + if (m_dwTipbarWndFlags & 0x2) + return; + + RECT rc = { m_nLeft, m_nTop, m_nLeft + m_nWidth, m_nTop + m_nHeight }, rcWorkArea; + if (!GetWorkArea(&rc, &rcWorkArea)) + return; + + if (m_nLeft > rcWorkArea.left + 2) + m_dwTipbarWndFlags &= ~0x200000; + else + m_dwTipbarWndFlags |= 0x200000; + + if ( m_nTop> rcWorkArea.top + 2 ) + m_dwTipbarWndFlags &= ~0x40000; + else + m_dwTipbarWndFlags |= 0x40000; + + if (m_nLeft + m_nWidth < rcWorkArea.right - 2) + m_dwTipbarWndFlags &= ~0x100000; + else + m_dwTipbarWndFlags |= 0x100000; + + if (m_nTop + m_nHeight < rcWorkArea.bottom - 2) + m_dwTipbarWndFlags &= ~0x80000; + else + m_dwTipbarWndFlags |= 0x80000; } /// @unimplemented @@ -3873,10 +3995,9 @@ void CTipbarWnd::CancelMenu() { } -/// @unimplemented BOOL CTipbarWnd::CheckExcludeCaptionButtonMode(LPRECT prc1, LPCRECT prc2) { - return FALSE; + return (prc1->top < prc2->top + 5) && (prc2->right <= prc1->right + (5 * m_ButtonWidth)); } /// @unimplemented @@ -3884,10 +4005,35 @@ void CTipbarWnd::ClearLBItemList() { } -/// @unimplemented HFONT CTipbarWnd::CreateVerticalFont() { - return NULL; + if (!m_hWnd) + return NULL; + + CUIFTheme theme; + theme.m_iPartId = 1; + theme.m_iStateId = 0; + theme.m_pszClassList = L"TOOLBAR"; + + LOGFONTW lf; + if (FAILED(theme.InternalOpenThemeData(m_hWnd)) || + FAILED(::GetThemeFont(theme.m_hTheme, NULL, theme.m_iPartId, 0, 210, &lf))) + { + ::GetObject(::GetStockObject(DEFAULT_GUI_FONT), sizeof(lf), &lf); + } + + lf.lfEscapement = lf.lfOrientation = 2700; + lf.lfOutPrecision = OUT_TT_ONLY_PRECIS; + + if (CheckEAFonts()) + { + WCHAR szText[LF_FACESIZE]; + szText[0] = L'@'; + StringCchCopyW(&szText[1], _countof(szText) - 1, lf.lfFaceName); + StringCchCopyW(lf.lfFaceName, _countof(lf.lfFaceName), szText); + } + + return ::CreateFontIndirectW(&lf); } void CTipbarWnd::UpdateVerticalFont() @@ -3991,15 +4137,85 @@ void CTipbarWnd::SetAlpha(BYTE bAlpha, BOOL bFlag) { } -/// @unimplemented -BOOL CTipbarWnd::SetLangBand(BOOL bFlag1, BOOL bFlag2) +BOOL CTipbarWnd::SetLangBand(BOOL bDeskBand, BOOL bFlag2) { - return FALSE; + if (bDeskBand == !!(m_dwShowType & TF_SFT_DESKBAND)) + return TRUE; + + BOOL ret = TRUE; + HWND hwndTray = m_ShellWndThread.GetWndTray(); + if (bFlag2 && hwndTray) + { + DWORD_PTR dwResult; + HWND hImeWnd = ::ImmGetDefaultIMEWnd(hwndTray); + if (hImeWnd) + ::SendMessageTimeout(hImeWnd, WM_IME_SYSTEM, 0x24 - bDeskBand, (LPARAM)hwndTray, + (SMTO_BLOCK | SMTO_ABORTIFHUNG), 5000, &dwResult); + else + ::SendMessageTimeout(hwndTray, 0x505, 0, bDeskBand, + (SMTO_BLOCK | SMTO_ABORTIFHUNG), 5000, &dwResult); + } + else + { + ret = FALSE; + } + + if (!(m_dwTipbarWndFlags & 2)) + { + if (bDeskBand) + { + KillTimer(7); + SetTimer(7, g_uTimerElapseSYSCOLORCHANGED); + } + } + + return ret; } -/// @unimplemented void CTipbarWnd::SetMoveRect(INT X, INT Y, INT nWidth, INT nHeight) { + if (m_dwTipbarWndFlags & 0x2) + { + m_nWidth = nWidth; + m_nHeight = nHeight; + return; + } + + ++m_bInCallOn; + + m_dwTipbarWndFlags |= 0x400; + + m_X = X; + m_Y = Y; + m_CX = nWidth; + m_CY = nHeight; + + RECT rc; + SIZE size = { 0, 0 }; + if (m_pWndFrame) + { + ::SetRect(&rc, 0, 0, nWidth - m_cxDlgFrameX2, nHeight - m_cyDlgFrameX2); + m_pWndFrame->SetRect(&rc); + m_pWndFrame->GetFrameSize(&size); + } + + if (m_pTipbarGripper) + { + if (m_dwTipbarWndFlags & 4) + { + INT GripperWidth = GetGripperWidth(); + ::SetRect(&rc, size.cx, size.cy, nWidth - m_cxDlgFrameX2 - size.cx, size.cy + GripperWidth); + } + else + { + INT GripperWidth = GetGripperWidth(); + INT y1 = nHeight - m_cyDlgFrameX2 - size.cy; + ::SetRect(&rc, size.cx, size.cy, size.cx + GripperWidth, y1); + } + m_pTipbarGripper->SetRect(&rc); + } + + --m_bInCallOn; } /// @unimplemented @@ -4209,10 +4425,54 @@ STDMETHODIMP CTipbarWnd::OnThreadItemChange(DWORD dwThreadId) return E_NOTIMPL; } -/// @unimplemented STDMETHODIMP CTipbarWnd::OnModalInput(DWORD dwThreadId, UINT uMsg, WPARAM wParam, LPARAM lParam) { - return E_NOTIMPL; + switch (uMsg) + { + case WM_NCLBUTTONDOWN: + case WM_NCRBUTTONDOWN: + case WM_NCMBUTTONDOWN: + case WM_LBUTTONUP: + case WM_RBUTTONUP: + case WM_MBUTTONUP: + break; + + case WM_NCLBUTTONUP: + case WM_NCRBUTTONUP: + case WM_NCMBUTTONUP: + if (m_pThread) + { + CUTBMenuWnd *pMenuUI = m_pModalMenu->m_pMenuUI; + if (pMenuUI) + { + HWND hWnd = *pMenuUI; + if (hWnd) + { + POINT pt = { (SHORT)LOWORD(lParam), (SHORT)HIWORD(lParam) }; + ::ScreenToClient(hWnd, &pt); + uMsg += WM_LBUTTONUP - WM_NCLBUTTONUP; + ::PostMessage(m_hWnd, uMsg, wParam, MAKELPARAM(pt.x, pt.y)); + } + } + } + break; + + default: + { + if (uMsg == WM_KEYDOWN || uMsg == WM_KEYUP) + { + if (m_pThread) + m_pModalMenu->PostKey(uMsg == WM_KEYUP, wParam, lParam); + } + else + { + CancelMenu(); + } + break; + } + } + + return 0; } /// @unimplemented @@ -4236,7 +4496,7 @@ STDMETHODIMP CTipbarWnd::OnLangBarUpdate(TfLBIClick click, BOOL bFlag) STDMETHODIMP_(BSTR) CTipbarWnd::GetAccName() { WCHAR szText[256]; - ::LoadStringW(g_hInst, IDS_LANGUAGEBAR, szText, _countof(szText)); + ::LoadStringW(g_hInst, IDS_LANGUAGEBAR, szText, _countof(szText)); return ::SysAllocString(szText); } @@ -4272,9 +4532,25 @@ STDMETHODIMP_(void) CTipbarWnd::OnCreate(HWND hWnd) { } -/// @unimplemented STDMETHODIMP_(void) CTipbarWnd::OnDestroy(HWND hWnd) { + CancelMenu(); + + if (m_pTipbarAccessible) + m_pTipbarAccessible->NotifyWinEvent(EVENT_OBJECT_DESTROY, GetAccItem()); + + OnTerminateToolbar(); + if (m_pTipbarAccessible) + { + m_pTipbarAccessible->ClearAccItems(); + m_pTipbarAccessible->Release(); + m_pTipbarAccessible = NULL; + } + + m_coInit.CoUninit(); + + if (m_pLangBarMgr) + m_pLangBarMgr->UnAdviseEventSink(m_dwSinkCookie); } /// @unimplemented @@ -4288,9 +4564,13 @@ STDMETHODIMP_(void) CTipbarWnd::OnSysColorChange() SetTimer(7, g_uTimerElapseSYSCOLORCHANGED); } -/// @unimplemented void CTipbarWnd::OnTerminateToolbar() { + m_dwTipbarWndFlags |= 0x10000; + DestroyOverScreenSizeBalloon(); + TerminateAllThreads(TRUE); + if (!(m_dwTipbarWndFlags & 0x2)) + SavePosition(); } STDMETHODIMP_(void) CTipbarWnd::OnEndSession(HWND hWnd, WPARAM wParam, LPARAM lParam) @@ -4349,11 +4629,22 @@ CTipbarWnd::OnWindowPosChanging(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lPar return ::DefWindowProc(hWnd, uMsg, wParam, lParam); } -/// @unimplemented STDMETHODIMP_(LRESULT) CTipbarWnd::OnShowWindow(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam) { - return 0; + if (m_pTipbarAccessible) + { + if (wParam) // Show? + { + m_pTipbarAccessible->NotifyWinEvent(EVENT_OBJECT_SHOW, GetAccItem()); + m_pTipbarAccessible->NotifyWinEvent(EVENT_OBJECT_FOCUS, GetAccItem()); + } + else + { + m_pTipbarAccessible->NotifyWinEvent(EVENT_OBJECT_HIDE, GetAccItem()); + } + } + return ::DefWindowProc(hWnd, uMsg, wParam, lParam); } STDMETHODIMP_(LRESULT) @@ -4378,11 +4669,33 @@ CTipbarWnd::OnDisplayChange(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam) return ::DefWindowProc(hWnd, uMsg, wParam, lParam); } -/// @unimplemented STDMETHODIMP_(HRESULT) CTipbarWnd::OnGetObject(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam) { - return E_NOTIMPL; + if (lParam != -4) + return S_OK; + if (!m_pTipbarAccessible) + return E_OUTOFMEMORY; + + if (m_pTipbarAccessible->m_bInitialized) + return m_pTipbarAccessible->CreateRefToAccObj(wParam); + + HRESULT hr = S_OK; + if (SUCCEEDED(m_coInit.EnsureCoInit())) + { + hr = m_pTipbarAccessible->Initialize(); + if (FAILED(hr)) + { + m_pTipbarAccessible->Release(); + m_pTipbarAccessible = NULL; + return hr; + } + + m_pTipbarAccessible->NotifyWinEvent(EVENT_OBJECT_CREATE, GetAccItem()); + return m_pTipbarAccessible->CreateRefToAccObj(wParam); + } + + return hr; } STDMETHODIMP_(BOOL) CTipbarWnd::OnEraseBkGnd(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam) diff --git a/dll/win32/msutb/precomp.h b/dll/win32/msutb/precomp.h index 05b2a826e27..08b64cdd9fb 100644 --- a/dll/win32/msutb/precomp.h +++ b/dll/win32/msutb/precomp.h @@ -17,6 +17,7 @@ #include <oleacc.h> #include <imm.h> #include <ddk/immdev.h> +#include <undocuser.h> #include <cguid.h> #include <msctf.h> #include <ctffunc.h>
10 months, 2 weeks
1
0
0
0
[reactos] 01/01: [GITHUB] Update Actions for Node.js 16 deprecation preparation (#5819)
by Maj Soklič
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=5974982d9cf75b29442ba…
commit 5974982d9cf75b29442badc2ad9873ddd371fea8 Author: Maj Soklič <majs.1236(a)gmail.com> AuthorDate: Sat Feb 10 00:50:59 2024 +0100 Commit: GitHub <noreply(a)github.com> CommitDate: Sat Feb 10 02:50:59 2024 +0300 [GITHUB] Update Actions for Node.js 16 deprecation preparation (#5819) GitHub started to show deprecation warnings for all Node.js 16 based Actions:
https://github.blog/changelog/2023-09-22-github-actions-transitioning-from-…
In order to resolve this: - build.yml: Update cache to v4 - labeler.yml: - Remove the now optional 'repo-token' argument - Add 'sync-labels' to remove non-actual labels on PR updates - stale.yml: Remove useless issue permission since we don't have issues enabled --- .github/workflows/build.yml | 4 ++-- .github/workflows/labeler.yml | 2 +- .github/workflows/stale.yml | 1 - 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 207e2641073..6a58c3a7e4b 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -26,7 +26,7 @@ jobs: wget
https://gist.githubusercontent.com/zefklop/b2d6a0b470c70183e93d5285a03f5899…
- name: Get RosBE id: get_rosbe - uses: actions/cache@v3 + uses: actions/cache@v4 with: path: RosBE-CI key: RosBE-CI-${{runner.os}}-${{steps.get_rosbe_spec.outputs.march-sha}}-${{steps.get_rosbe_spec.outputs.git-sha}}-${{hashfiles('./build_rosbe_ci.sh')}} @@ -50,7 +50,7 @@ jobs: with: path: src - name: Set up cache for ccache - uses: actions/cache@v3 + uses: actions/cache@v4 with: path: ccache key: ccache-${{matrix.compiler}}-${{matrix.arch}}-${{matrix.config}}-${{github.sha}} diff --git a/.github/workflows/labeler.yml b/.github/workflows/labeler.yml index 80bba040d0c..f31492a1bcf 100644 --- a/.github/workflows/labeler.yml +++ b/.github/workflows/labeler.yml @@ -8,4 +8,4 @@ jobs: steps: - uses: actions/labeler@v5 with: - repo-token: "${{ secrets.GITHUB_TOKEN }}" + sync-labels: true diff --git a/.github/workflows/stale.yml b/.github/workflows/stale.yml index 3cdccf733e0..289dfc1d0c7 100644 --- a/.github/workflows/stale.yml +++ b/.github/workflows/stale.yml @@ -14,7 +14,6 @@ jobs: runs-on: ubuntu-latest permissions: - issues: write pull-requests: write steps:
10 months, 2 weeks
1
0
0
0
[reactos] 01/01: [GITHUB] Fix Labeler rule for 'drivers'
by Stanislav Motylkov
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=6f874a4656128d386795c…
commit 6f874a4656128d386795c7466141947e48d795ca Author: Stanislav Motylkov <x86corez(a)gmail.com> AuthorDate: Sat Feb 10 02:08:04 2024 +0300 Commit: Stanislav Motylkov <x86corez(a)gmail.com> CommitDate: Sat Feb 10 02:08:04 2024 +0300 [GITHUB] Fix Labeler rule for 'drivers' Addendum to d18b6fc4. --- .github/labeler.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/labeler.yml b/.github/labeler.yml index 0cd5d283907..3588be7ed91 100644 --- a/.github/labeler.yml +++ b/.github/labeler.yml @@ -10,8 +10,9 @@ drivers: - any-glob-to-any-file: - drivers/** - sdk/lib/drivers/** + - all-globs-to-any-file: - win32ss/drivers/** - - all-globs-to-all-files: '!win32ss/drivers/font/**' + - '!win32ss/drivers/font/**' freeldr: - changed-files:
10 months, 2 weeks
1
0
0
0
← Newer
1
...
6
7
8
9
10
11
12
13
Older →
Jump to page:
1
2
3
4
5
6
7
8
9
10
11
12
13
Results per page:
10
25
50
100
200