Skip to content

Commit 5375e53

Browse files
committed
Some fixes from putting it in an IDE
1 parent 75684cb commit 5375e53

File tree

1 file changed

+90
-74
lines changed

1 file changed

+90
-74
lines changed

documentation/proposals/Proposal - Windowing 3.0.md

Lines changed: 90 additions & 74 deletions
Original file line numberDiff line numberDiff line change
@@ -298,12 +298,12 @@ public abstract partial class Surface
298298
/// <summary>
299299
/// Gets or sets additional configuration/constraints for the <see cref="Render" /> event.
300300
/// </summary>
301-
public SurfaceTimingOptions RenderOptions { get; set; }
301+
public virtual SurfaceTimingOptions RenderOptions { get; set; }
302302

303303
/// <summary>
304304
/// Gets or sets additional configuration/constraints for the <see cref="Update" /> event.
305305
/// </summary>
306-
public SurfaceTimingOptions UpdateOptions { get; set; }
306+
public virtual SurfaceTimingOptions UpdateOptions { get; set; }
307307

308308
/// <summary>
309309
/// Gets or sets a value representing <see cref="RenderOptions" />.<see cref="SurfaceTimingOptions.TargetDelta" />
@@ -349,12 +349,12 @@ public abstract partial class Surface
349349
/// <summary>
350350
/// Gets the size <b>in pixels</b> of the area drawable within the surface.
351351
/// </summary>
352-
public Vector2 DrawableSize { get; }
352+
public abstract Vector2 DrawableSize { get; }
353353

354354
/// <summary>
355355
/// Raised when <see cref="DrawableSize" /> changes.
356356
/// </summary>
357-
public event Action<SurfaceResizeEvent> DrawableSizeChanged { add; remove; }
357+
public abstract event Action<SurfaceResizeEvent> DrawableSizeChanged { add; remove; }
358358

359359
/// <summary>
360360
/// Centers this window to the given monitor or, if null, the current monitor the window's on.
@@ -503,6 +503,74 @@ public interface IGLContextSource
503503
IGLContext? GLContext { get; }
504504
}
505505

506+
/// <summary>
507+
/// A 32-bit version structure.
508+
/// </summary>
509+
public readonly struct Version32
510+
{
511+
/// <summary>
512+
/// The underlying Vulkan-compatible 32-bit version integer.
513+
/// </summary>
514+
public uint Value { get; }
515+
516+
/// <summary>
517+
/// Creates a Vulkan version structure from the given major, minor, and patch values.
518+
/// </summary>
519+
/// <param name="major">The major value.</param>
520+
/// <param name="minor">The minor value.</param>
521+
/// <param name="patch">The patch value.</param>
522+
public Version32(uint major, uint minor, uint patch);
523+
524+
/// <summary>
525+
/// Creates a Vulkan version structure from the given Vulkan-compatible value.
526+
/// </summary>
527+
/// <param name="value">The value.</param>
528+
private Version32(uint value);
529+
530+
/// <summary>
531+
/// Gets the major component of this version structure.
532+
/// </summary>
533+
public uint Major { get; }
534+
535+
/// <summary>
536+
/// Gets the minor component of this version structure.
537+
/// </summary>
538+
public uint Minor { get; }
539+
540+
/// <summary>
541+
/// Gets the patch component of this version structure.
542+
/// </summary>
543+
public uint Patch { get; }
544+
545+
/// <summary>
546+
/// Creates a 32-bit version structure from the given 32-bit unsigned integer.
547+
/// </summary>
548+
/// <param name="val">The uint value.</param>
549+
/// <returns>The 32-bit version structure.</returns>
550+
public static explicit operator Version32(uint val);
551+
552+
/// <summary>
553+
/// Creates a 32-bit version structure from the given managed version class.
554+
/// </summary>
555+
/// <param name="version">The version instance.</param>
556+
/// <returns>The 32-bit version structure.</returns>
557+
public static implicit operator Version32(Version version);
558+
559+
/// <summary>
560+
/// Gets the 32-bit unsigned integer representation for this 32-bit version structure.
561+
/// </summary>
562+
/// <param name="version">The 32-bit version structure.</param>
563+
/// <returns>The 32-bit unsigned integer.</returns>
564+
public static implicit operator uint(Version32 version);
565+
566+
/// <summary>
567+
/// Converts this 32-bit version structure to a managed version class.
568+
/// </summary>
569+
/// <param name="version">The 32-bit version structure.</param>
570+
/// <returns>The managed representation.</returns>
571+
public static implicit operator Version(Version32 version);
572+
}
573+
506574
namespace Silk.NET.OpenGL;
507575

508576
/// <summary>
@@ -584,74 +652,6 @@ public enum OpenGLContextProfile
584652
ES2
585653
}
586654

587-
/// <summary>
588-
/// A 32-bit version structure.
589-
/// </summary>
590-
public readonly struct Version32
591-
{
592-
/// <summary>
593-
/// The underlying Vulkan-compatible 32-bit version integer.
594-
/// </summary>
595-
public uint Value { get; }
596-
597-
/// <summary>
598-
/// Creates a Vulkan version structure from the given major, minor, and patch values.
599-
/// </summary>
600-
/// <param name="major">The major value.</param>
601-
/// <param name="minor">The minor value.</param>
602-
/// <param name="patch">The patch value.</param>
603-
public Version32(uint major, uint minor, uint patch);
604-
605-
/// <summary>
606-
/// Creates a Vulkan version structure from the given Vulkan-compatible value.
607-
/// </summary>
608-
/// <param name="value">The value.</param>
609-
private Version32(uint value);
610-
611-
/// <summary>
612-
/// Gets the major component of this version structure.
613-
/// </summary>
614-
public uint Major { get; }
615-
616-
/// <summary>
617-
/// Gets the minor component of this version structure.
618-
/// </summary>
619-
public uint Minor { get; }
620-
621-
/// <summary>
622-
/// Gets the patch component of this version structure.
623-
/// </summary>
624-
public uint Patch { get; }
625-
626-
/// <summary>
627-
/// Creates a 32-bit version structure from the given 32-bit unsigned integer.
628-
/// </summary>
629-
/// <param name="val">The uint value.</param>
630-
/// <returns>The 32-bit version structure.</returns>
631-
public static explicit operator Version32(uint val);
632-
633-
/// <summary>
634-
/// Creates a 32-bit version structure from the given managed version class.
635-
/// </summary>
636-
/// <param name="version">The version instance.</param>
637-
/// <returns>The 32-bit version structure.</returns>
638-
public static implicit operator Version32(Version version);
639-
640-
/// <summary>
641-
/// Gets the 32-bit unsigned integer representation for this 32-bit version structure.
642-
/// </summary>
643-
/// <param name="version">The 32-bit version structure.</param>
644-
/// <returns>The 32-bit unsigned integer.</returns>
645-
public static implicit operator uint(Version32 version);
646-
647-
/// <summary>
648-
/// Converts this 32-bit version structure to a managed version class.
649-
/// </summary>
650-
/// <param name="version">The 32-bit version structure.</param>
651-
/// <returns>The managed representation.</returns>
652-
public static implicit operator Version(Version32 version);
653-
}
654-
655655
/// <summary>
656656
/// The OpenGL component of a <see cref="Surface" />. The <see cref="IGLContext" /> methods can only be executed once
657657
/// <see cref="ISurfaceApplication.Initialize{TSurface}" /> has executed.
@@ -950,7 +950,7 @@ public ref struct WindowIcon
950950
}
951951

952952
/// <summary>
953-
/// One or more <see cref="WindowIcon">s representing multiple variants (e.g. for size/DPI differences) of the same
953+
/// One or more <see cref="WindowIcon" />s representing multiple variants (e.g. for size/DPI differences) of the same
954954
/// window icon.
955955
/// </summary>
956956
public ref struct WindowIconVariants
@@ -1102,7 +1102,7 @@ public interface ISurfaceWindow
11021102
event Action<WindowCoordinatesEvent> CoordinatesChanged { add; remove; }
11031103

11041104
/// <summary>
1105-
/// Gets or sets a value indicating whether, unless set to <c>false</c> before the next <see cref="Surface.Tick">,
1105+
/// Gets or sets a value indicating whether, unless set to <c>false</c> before the next <see cref="Surface.Tick" />,
11061106
/// the window will close resulting in the irrevocable termination of the surface.
11071107
/// </summary>
11081108
bool IsCloseRequested { get; set; }
@@ -1169,6 +1169,14 @@ public interface ISurfaceWindow
11691169
/// <returns>A value indicating whether the operation was successful.</returns>
11701170
bool TrySetIcon(WindowIconVariants icon);
11711171
}
1172+
1173+
public abstract partial class Surface
1174+
{
1175+
/// <summary>
1176+
/// Gets the window in which the surface is rendering.
1177+
/// </summary>
1178+
public virtual ISurfaceWindow? Window { get; }
1179+
}
11721180
```
11731181

11741182
Expected to be used as follows:
@@ -1498,6 +1506,14 @@ public interface ISurfaceScale
14981506
/// <seealso cref="DrawScale" />
14991507
float PixelDensity { get; }
15001508
}
1509+
1510+
public abstract partial class Surface
1511+
{
1512+
/// <summary>
1513+
/// Gets the content scale configuration within the surface.
1514+
/// </summary>
1515+
public virtual ISurfaceScale? Scale { get; }
1516+
}
15011517
```
15021518

15031519
# The Children Component

0 commit comments

Comments
 (0)