desktop: move desktop types to memory-safe pointers
This commit is contained in:
parent
3cd6e3960f
commit
0a28e13787
9 changed files with 66 additions and 54 deletions
|
|
@ -11,28 +11,30 @@ class CSubsurface {
|
|||
public:
|
||||
// root dummy nodes
|
||||
CSubsurface(PHLWINDOW pOwner);
|
||||
CSubsurface(CPopup* pOwner);
|
||||
CSubsurface(WP<CPopup> pOwner);
|
||||
|
||||
// real nodes
|
||||
CSubsurface(SP<CWLSubsurfaceResource> pSubsurface, PHLWINDOW pOwner);
|
||||
CSubsurface(SP<CWLSubsurfaceResource> pSubsurface, CPopup* pOwner);
|
||||
CSubsurface(SP<CWLSubsurfaceResource> pSubsurface, WP<CPopup> pOwner);
|
||||
|
||||
~CSubsurface();
|
||||
|
||||
Vector2D coordsRelativeToParent();
|
||||
Vector2D coordsGlobal();
|
||||
Vector2D coordsRelativeToParent();
|
||||
Vector2D coordsGlobal();
|
||||
|
||||
Vector2D size();
|
||||
Vector2D size();
|
||||
|
||||
void onCommit();
|
||||
void onDestroy();
|
||||
void onNewSubsurface(SP<CWLSubsurfaceResource> pSubsurface);
|
||||
void onMap();
|
||||
void onUnmap();
|
||||
void onCommit();
|
||||
void onDestroy();
|
||||
void onNewSubsurface(SP<CWLSubsurfaceResource> pSubsurface);
|
||||
void onMap();
|
||||
void onUnmap();
|
||||
|
||||
bool visible();
|
||||
bool visible();
|
||||
|
||||
void recheckDamageForSubsurfaces();
|
||||
void recheckDamageForSubsurfaces();
|
||||
|
||||
WP<CSubsurface> m_pSelf;
|
||||
|
||||
private:
|
||||
struct {
|
||||
|
|
@ -48,10 +50,10 @@ class CSubsurface {
|
|||
Vector2D m_vLastSize = {};
|
||||
|
||||
// if nullptr, means it's a dummy node
|
||||
CSubsurface* m_pParent = nullptr;
|
||||
WP<CSubsurface> m_pParent;
|
||||
|
||||
PHLWINDOWREF m_pWindowParent;
|
||||
CPopup* m_pPopupParent = nullptr;
|
||||
WP<CPopup> m_pPopupParent;
|
||||
|
||||
std::vector<UP<CSubsurface>> m_vChildren;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue