openDecal/Managed/Decal.Interop.Controls/Decal.Interop.Controls/NotebookClass.cs
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

100 lines
2.9 KiB
C#

using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Security;
using Decal.Interop.Inject;
namespace Decal.Interop.Controls;
[ComImport]
[ComSourceInterfaces("Decal.Interop.Controls.INotebookEvents\0\0")]
[TypeLibType(2)]
[ClassInterface(ClassInterfaceType.None)]
[Guid("ED14E7C5-11BE-4DFD-9829-873AB6BE3CFC")]
[SuppressUnmanagedCodeSecurity]
public class NotebookClass : INotebook, Notebook, INotebookEvents_Event, IControl
{
[DispId(2)]
public virtual extern int ID
{
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
[DispId(2)]
get;
}
[DispId(3)]
public virtual extern int ChildCount
{
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
[DispId(3)]
get;
}
[DispId(4)]
public virtual extern IControl Child
{
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
[DispId(4)]
[return: MarshalAs(UnmanagedType.Interface)]
get;
}
[DispId(102)]
public virtual extern int ActiveTab
{
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
[DispId(102)]
get;
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
[DispId(102)]
[param: In]
set;
}
[DispId(103)]
public virtual extern string PageText
{
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
[DispId(103)]
[return: MarshalAs(UnmanagedType.BStr)]
get;
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
[DispId(103)]
[param: In]
[param: MarshalAs(UnmanagedType.BStr)]
set;
}
public virtual extern int IControl_ID
{
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
get;
}
public virtual extern int IControl_ChildCount
{
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
get;
}
public virtual extern IControl IControl_Child
{
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
[return: MarshalAs(UnmanagedType.Interface)]
get;
}
public virtual extern event INotebookEvents_DestroyEventHandler Destroy;
public virtual extern event INotebookEvents_ChangeEventHandler Change;
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
[DispId(1)]
public virtual extern void DestroyChild(int nIndex, ePositionType posType = ePositionType.ePositionByIndex);
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
[DispId(101)]
public virtual extern void AddPage([MarshalAs(UnmanagedType.BStr)] string strText, [MarshalAs(UnmanagedType.Interface)] IControl pClient);
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
public virtual extern void IControl_DestroyChild(int nIndex, ePositionType posType = ePositionType.ePositionByIndex);
}