diff options
author | George Hazan <ghazan@miranda.im> | 2022-05-17 18:45:09 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2022-05-17 18:45:09 +0300 |
commit | c066a9b843e7bfc8f2ab9a991e8fe4d8a2cb54e0 (patch) | |
tree | 7ffe59a76add594d63ba38be896b8d3579c3fdbd /src/mir_core | |
parent | a2f74318c56a936fa004210bfb9af60cc3aadd10 (diff) |
MWindow - further window unification code for Linux
Diffstat (limited to 'src/mir_core')
-rw-r--r-- | src/mir_core/src/Linux/CCtrlBase.cpp | 2 | ||||
-rw-r--r-- | src/mir_core/src/Linux/CCtrlButton.cpp | 2 | ||||
-rw-r--r-- | src/mir_core/src/Linux/CCtrlCheck.cpp | 2 | ||||
-rw-r--r-- | src/mir_core/src/Linux/CCtrlCombo.cpp | 2 | ||||
-rw-r--r-- | src/mir_core/src/Linux/CCtrlEdit.cpp | 2 | ||||
-rw-r--r-- | src/mir_core/src/Linux/CDlgBase.cpp | 8 |
6 files changed, 10 insertions, 8 deletions
diff --git a/src/mir_core/src/Linux/CCtrlBase.cpp b/src/mir_core/src/Linux/CCtrlBase.cpp index 61d03c99af..cba8567e52 100644 --- a/src/mir_core/src/Linux/CCtrlBase.cpp +++ b/src/mir_core/src/Linux/CCtrlBase.cpp @@ -28,6 +28,7 @@ static int CompareControls(const CCtrlBase *p1, const CCtrlBase *p2) { return (INT_PTR)p1->GetHwnd() - (INT_PTR)p2->GetHwnd(); } + static LIST<CCtrlBase> arControls(10, CompareControls); ///////////////////////////////////////////////////////////////////////////////////////// @@ -60,6 +61,7 @@ void CCtrlBase::OnDestroy() arControls.remove(pCtrl); } + evas_object_del(m_hwnd); m_hwnd = nullptr; } diff --git a/src/mir_core/src/Linux/CCtrlButton.cpp b/src/mir_core/src/Linux/CCtrlButton.cpp index 1fb547bef8..e8c107b888 100644 --- a/src/mir_core/src/Linux/CCtrlButton.cpp +++ b/src/mir_core/src/Linux/CCtrlButton.cpp @@ -29,7 +29,7 @@ CCtrlButton::CCtrlButton(CDlgBase* wnd, int idCtrl) : CCtrlBase(wnd, idCtrl) {} -BOOL CCtrlButton::OnCommand(HWND, uint16_t, uint16_t idCode) +BOOL CCtrlButton::OnCommand(MWindow, uint16_t, uint16_t idCode) { // if (idCode == BN_CLICKED) // OnClick(this); diff --git a/src/mir_core/src/Linux/CCtrlCheck.cpp b/src/mir_core/src/Linux/CCtrlCheck.cpp index 15c9ab0f1b..7c821f0329 100644 --- a/src/mir_core/src/Linux/CCtrlCheck.cpp +++ b/src/mir_core/src/Linux/CCtrlCheck.cpp @@ -31,7 +31,7 @@ CCtrlCheck::CCtrlCheck(CDlgBase *dlg, int ctrlId) m_bNotifiable = true; } -BOOL CCtrlCheck::OnCommand(HWND, uint16_t, uint16_t) +BOOL CCtrlCheck::OnCommand(MWindow, uint16_t, uint16_t) { NotifyChange(); return TRUE; diff --git a/src/mir_core/src/Linux/CCtrlCombo.cpp b/src/mir_core/src/Linux/CCtrlCombo.cpp index 905ebc7a24..063588e39e 100644 --- a/src/mir_core/src/Linux/CCtrlCombo.cpp +++ b/src/mir_core/src/Linux/CCtrlCombo.cpp @@ -29,7 +29,7 @@ CCtrlCombo::CCtrlCombo(CDlgBase *dlg, int ctrlId) : CCtrlData(dlg, ctrlId) {} -BOOL CCtrlCombo::OnCommand(HWND, uint16_t, uint16_t idCode) +BOOL CCtrlCombo::OnCommand(MWindow, uint16_t, uint16_t idCode) { switch (idCode) { // case CBN_CLOSEUP: OnCloseup(this); break; diff --git a/src/mir_core/src/Linux/CCtrlEdit.cpp b/src/mir_core/src/Linux/CCtrlEdit.cpp index b2b5e14d46..7f1ac14cc2 100644 --- a/src/mir_core/src/Linux/CCtrlEdit.cpp +++ b/src/mir_core/src/Linux/CCtrlEdit.cpp @@ -29,7 +29,7 @@ CCtrlEdit::CCtrlEdit(CDlgBase *dlg, int ctrlId) : CCtrlData(dlg, ctrlId) {} -BOOL CCtrlEdit::OnCommand(HWND, uint16_t, uint16_t idCode) +BOOL CCtrlEdit::OnCommand(MWindow, uint16_t, uint16_t idCode) { // if (idCode == EN_CHANGE) // NotifyChange(); diff --git a/src/mir_core/src/Linux/CDlgBase.cpp b/src/mir_core/src/Linux/CDlgBase.cpp index 425e71ee31..3504a7e74c 100644 --- a/src/mir_core/src/Linux/CDlgBase.cpp +++ b/src/mir_core/src/Linux/CDlgBase.cpp @@ -175,7 +175,7 @@ int CDlgBase::Resizer(UTILRESIZECONTROL*) return RD_ANCHORX_LEFT | RD_ANCHORY_TOP; } -BOOL CALLBACK CDlgBase::GlobalFieldEnum(HWND hwnd, LPARAM lParam) +BOOL CALLBACK CDlgBase::GlobalFieldEnum(MWindow hwnd, LPARAM lParam) { return TRUE; } @@ -185,7 +185,7 @@ INT_PTR CDlgBase::DlgProc(UINT msg, WPARAM wParam, LPARAM lParam) return FALSE; } -int CDlgBase::GlobalDlgResizer(HWND hwnd, LPARAM, UTILRESIZECONTROL *urc) +int CDlgBase::GlobalDlgResizer(MWindow hwnd, LPARAM, UTILRESIZECONTROL *urc) { CDlgBase *wnd = CDlgBase::Find(hwnd); return (wnd == nullptr) ? 0 : wnd->Resizer(urc); @@ -226,7 +226,7 @@ CCtrlBase* CDlgBase::FindControl(int idCtrl) return m_controls.find(&search); } -CCtrlBase* CDlgBase::FindControl(HWND hwnd) +CCtrlBase* CDlgBase::FindControl(MWindow hwnd) { for (auto &it : m_controls) if (it->GetHwnd() == hwnd) @@ -252,7 +252,7 @@ CTimer* CDlgBase::FindTimer(int idEvent) return m_timers.find(&search); } -CDlgBase* CDlgBase::Find(HWND hwnd) +CDlgBase* CDlgBase::Find(MWindow hwnd) { void *bullshit[2]; // vfptr + hwnd bullshit[1] = hwnd; |