File tree Expand file tree Collapse file tree 3 files changed +37
-0
lines changed Expand file tree Collapse file tree 3 files changed +37
-0
lines changed Original file line number Diff line number Diff line change 1+ using System ;
2+ using System . Numerics ;
3+
4+ namespace ImGuiNET
5+ {
6+ public delegate void Platform_CreateWindow ( ImGuiViewportPtr vp ) ; // Create a new platform window for the given viewport
7+ public delegate void Platform_DestroyWindow ( ImGuiViewportPtr vp ) ;
8+ public delegate void Platform_ShowWindow ( ImGuiViewportPtr vp ) ; // Newly created windows are initially hidden so SetWindowPos/Size/Title can be called on them first
9+ public delegate void Platform_SetWindowPos ( ImGuiViewportPtr vp , Vector2 pos ) ;
10+ public unsafe delegate void Platform_GetWindowPos ( ImGuiViewportPtr vp , Vector2 * outPos ) ;
11+ public delegate void Platform_SetWindowSize ( ImGuiViewportPtr vp , Vector2 size ) ;
12+ public unsafe delegate void Platform_GetWindowSize ( ImGuiViewportPtr vp , Vector2 * outSize ) ;
13+ public delegate void Platform_SetWindowFocus ( ImGuiViewportPtr vp ) ; // Move window to front and set input focus
14+ public delegate byte Platform_GetWindowFocus ( ImGuiViewportPtr vp ) ;
15+ public delegate byte Platform_GetWindowMinimized ( ImGuiViewportPtr vp ) ;
16+ public delegate void Platform_SetWindowTitle ( ImGuiViewportPtr vp , IntPtr title ) ;
17+ }
Original file line number Diff line number Diff line change 1+ using System ;
2+ using System . Runtime . InteropServices ;
3+
4+ namespace ImGuiNET
5+ {
6+ public static unsafe partial class ImGuiNative
7+ {
8+ [ DllImport ( "cimgui" , CallingConvention = CallingConvention . Cdecl ) ]
9+ public static extern void ImGuiPlatformIO_Set_Platform_GetWindowPos ( ImGuiPlatformIO * platform_io , IntPtr funcPtr ) ;
10+ [ DllImport ( "cimgui" , CallingConvention = CallingConvention . Cdecl ) ]
11+ public static extern void ImGuiPlatformIO_Set_Platform_GetWindowSize ( ImGuiPlatformIO * platform_io , IntPtr funcPtr ) ;
12+ }
13+ }
Original file line number Diff line number Diff line change @@ -9,6 +9,13 @@ public unsafe struct ImVector
99 public readonly int Capacity ;
1010 public readonly IntPtr Data ;
1111
12+ public ImVector ( int size , int capacity , IntPtr data )
13+ {
14+ Size = size ;
15+ Capacity = capacity ;
16+ Data = data ;
17+ }
18+
1219 public ref T Ref < T > ( int index )
1320 {
1421 return ref Unsafe . AsRef < T > ( ( byte * ) Data + index * Unsafe . SizeOf < T > ( ) ) ;
You can’t perform that action at this time.
0 commit comments