openDecal/Native/Inject/Attic/Copy of RootLayer.h
erik d1442e3747 Initial commit: Complete open-source Decal rebuild
All 5 phases of the open-source Decal rebuild:

Phase 1: 14 decompiled .NET projects (Interop.*, Adapter, FileService, DecalUtil)
Phase 2: 10 native DLLs rewritten as C# COM servers with matching GUIDs
  - DecalDat, DHS, SpellFilter, DecalInput, DecalNet, DecalFilters
  - Decal.Core, DecalControls, DecalRender, D3DService
Phase 3: C++ shims for Inject.DLL (D3D9 hooking) and LauncherHook.DLL
Phase 4: DenAgent WinForms tray application
Phase 5: WiX installer and build script

25 C# projects building with 0 errors.
Native C++ projects require VS 2022 + Windows SDK (x86).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-08 18:27:56 +01:00

61 lines
1.5 KiB
C++

// RootLayer.h : Declaration of the cRootLayer
#ifndef __ROOTLAYER_H_
#define __ROOTLAYER_H_
#include "resource.h" // main symbols
// This special layer implements no sinks, it is merely a container
// layer for the bar manager and the window manager - it server no other purpose
// than to forward event on and avoid redundant looping in the manager object.
#include "SinkImpl.h"
class cView;
/////////////////////////////////////////////////////////////////////////////
// cRootLayer
class ATL_NO_VTABLE cRootLayer :
public CComObjectRootEx<CComMultiThreadModel>,
public ILayerImpl< cRootLayer >,
public IPanelSink,
public cNoEventsImpl,
public IRootLayer
{
public:
cRootLayer()
: m_nNextViewID( 1000 )
{
}
CComPtr< IBarManager > m_pBars;
CComPtr< IPanel > m_pPanel;
typedef std::list< cView * > cViewList;
cViewList m_views;
long m_nNextViewID;
void addView( cView *pView, ILayer *pRootLayer );
void removeView( cView *pView );
void onCreate();
void onDestroy();
BEGIN_COM_MAP(cRootLayer)
COM_INTERFACE_ENTRY(IPanelSink)
COM_INTERFACE_ENTRY(IRootLayer)
COM_INTERFACE_ENTRY(ILayer)
END_COM_MAP()
public:
// IRootLayer Methods
STDMETHOD(CreateView)(ViewParams *pParams, ILayer *pLayer, /*[out, retval]*/ IView **ppView);
STDMETHOD(SelectBar)(long nID);
STDMETHOD(LoadView)(BSTR strXML, /*[out, retval]*/ IView **ppView);
STDMETHOD(LoadViewObject)(IUnknown *pSchema, /*[out, retval]*/ IView **ppView);
// IPanelSink Methods
STDMETHOD(PanelDeactivate)( long nViewID );
};
#endif //__ROOTLAYER_H_