mirror of
https://github.com/ahwootech/BRUTAL.git
synced 2026-11-26 13:08:24 +01:00
SOURCE DUMP v1
This commit is contained in:
parent
bd62d51ec9
commit
fb20299e9d
19 changed files with 768360 additions and 0 deletions
|
|
@ -0,0 +1,37 @@
|
|||
using System.Runtime.InteropServices.Marshalling;
|
||||
using Brutal;
|
||||
using Brutal.Interop;
|
||||
using Brutal.Numerics;
|
||||
using Brutal.Pointers;
|
||||
using Brutal.Strings;
|
||||
namespace Brutal.NotCursesApi
|
||||
{
|
||||
[InteropHandle]
|
||||
public unsafe readonly partial struct NcDPlotHandle
|
||||
{
|
||||
}
|
||||
public unsafe readonly partial struct NcDPlotHandle
|
||||
{
|
||||
public void AddSample(ulong x, double y)
|
||||
{
|
||||
var __r = global::Brutal.NotCursesApi.NotCurses.PInvoke.ncdplot_add_sample(this, x, y);
|
||||
if (__r != 0) throw new NcResultException("ncdplot_add_sample", __r);
|
||||
}
|
||||
public void Destroy()
|
||||
=> global::Brutal.NotCursesApi.NotCurses.PInvoke.ncdplot_destroy(this);
|
||||
public NcPlaneHandle Plane()
|
||||
=> global::Brutal.NotCursesApi.NotCurses.PInvoke.ncdplot_plane(this);
|
||||
public double Sample(ulong x)
|
||||
{
|
||||
double y = default;
|
||||
var __r = global::Brutal.NotCursesApi.NotCurses.PInvoke.ncdplot_sample(this, x, new Ptr<double>(&y));
|
||||
if (__r != 0) throw new NcResultException("ncdplot_sample", __r);
|
||||
return y;
|
||||
}
|
||||
public void SetSample(ulong x, double y)
|
||||
{
|
||||
var __r = global::Brutal.NotCursesApi.NotCurses.PInvoke.ncdplot_set_sample(this, x, y);
|
||||
if (__r != 0) throw new NcResultException("ncdplot_set_sample", __r);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,342 @@
|
|||
using System.Runtime.InteropServices.Marshalling;
|
||||
using Brutal;
|
||||
using Brutal.Interop;
|
||||
using Brutal.Numerics;
|
||||
using Brutal.Pointers;
|
||||
using Brutal.Strings;
|
||||
namespace Brutal.NotCursesApi
|
||||
{
|
||||
[InteropHandle]
|
||||
public unsafe readonly partial struct NcDirectHandle
|
||||
{
|
||||
}
|
||||
public unsafe readonly partial struct NcDirectHandle
|
||||
{
|
||||
public void AsciiBox(ulong ul, ulong ur, ulong ll, ulong lr, uint2 len, uint ctlWord)
|
||||
{
|
||||
var __r = global::Brutal.NotCursesApi.NotCurses.PInvoke.ncdirect_ascii_box(this, ul, ur, ll, lr, len.Y, len.X, ctlWord);
|
||||
if (__r != 0) throw new NcResultException("ncdirect_ascii_box", __r);
|
||||
}
|
||||
public Bool8 CanBraille()
|
||||
=> global::Brutal.NotCursesApi.NotCurses.PInvoke.ncdirect_canbraille(this);
|
||||
public Bool8 CanChangeColor()
|
||||
=> global::Brutal.NotCursesApi.NotCurses.PInvoke.ncdirect_canchangecolor(this);
|
||||
public Bool8 CanFade()
|
||||
=> global::Brutal.NotCursesApi.NotCurses.PInvoke.ncdirect_canfade(this);
|
||||
public Bool8 CanGetCursor()
|
||||
=> global::Brutal.NotCursesApi.NotCurses.PInvoke.ncdirect_canget_cursor(this);
|
||||
public Bool8 CanHalfBlock()
|
||||
=> global::Brutal.NotCursesApi.NotCurses.PInvoke.ncdirect_canhalfblock(this);
|
||||
public Bool8 CanOctant()
|
||||
=> global::Brutal.NotCursesApi.NotCurses.PInvoke.ncdirect_canoctant(this);
|
||||
public Bool8 CanOpenImages()
|
||||
=> global::Brutal.NotCursesApi.NotCurses.PInvoke.ncdirect_canopen_images(this);
|
||||
public Bool8 CanOpenVideos()
|
||||
=> global::Brutal.NotCursesApi.NotCurses.PInvoke.ncdirect_canopen_videos(this);
|
||||
public Bool8 CanQuadrant()
|
||||
=> global::Brutal.NotCursesApi.NotCurses.PInvoke.ncdirect_canquadrant(this);
|
||||
public Bool8 CanSextant()
|
||||
=> global::Brutal.NotCursesApi.NotCurses.PInvoke.ncdirect_cansextant(this);
|
||||
public Bool8 CanTrueColor()
|
||||
=> global::Brutal.NotCursesApi.NotCurses.PInvoke.ncdirect_cantruecolor(this);
|
||||
public Bool8 CanUtf8()
|
||||
=> global::Brutal.NotCursesApi.NotCurses.PInvoke.ncdirect_canutf8(this);
|
||||
public Ptr<NcCapabilities> Capabilities()
|
||||
=> global::Brutal.NotCursesApi.NotCurses.PInvoke.ncdirect_capabilities(this);
|
||||
public int CheckPixelSupport()
|
||||
=> global::Brutal.NotCursesApi.NotCurses.PInvoke.ncdirect_check_pixel_support(this);
|
||||
public void Clear()
|
||||
{
|
||||
var __r = global::Brutal.NotCursesApi.NotCurses.PInvoke.ncdirect_clear(this);
|
||||
if (__r != 0) throw new NcResultException("ncdirect_clear", __r);
|
||||
}
|
||||
public void CursorDisable()
|
||||
{
|
||||
var __r = global::Brutal.NotCursesApi.NotCurses.PInvoke.ncdirect_cursor_disable(this);
|
||||
if (__r != 0) throw new NcResultException("ncdirect_cursor_disable", __r);
|
||||
}
|
||||
public void CursorDown(int num)
|
||||
{
|
||||
var __r = global::Brutal.NotCursesApi.NotCurses.PInvoke.ncdirect_cursor_down(this, num);
|
||||
if (__r != 0) throw new NcResultException("ncdirect_cursor_down", __r);
|
||||
}
|
||||
public void CursorEnable()
|
||||
{
|
||||
var __r = global::Brutal.NotCursesApi.NotCurses.PInvoke.ncdirect_cursor_enable(this);
|
||||
if (__r != 0) throw new NcResultException("ncdirect_cursor_enable", __r);
|
||||
}
|
||||
public void CursorLeft(int num)
|
||||
{
|
||||
var __r = global::Brutal.NotCursesApi.NotCurses.PInvoke.ncdirect_cursor_left(this, num);
|
||||
if (__r != 0) throw new NcResultException("ncdirect_cursor_left", __r);
|
||||
}
|
||||
public void CursorMove(int2 xy)
|
||||
{
|
||||
var __r = global::Brutal.NotCursesApi.NotCurses.PInvoke.ncdirect_cursor_move_yx(this, xy.Y, xy.X);
|
||||
if (__r != 0) throw new NcResultException("ncdirect_cursor_move_yx", __r);
|
||||
}
|
||||
public void CursorPop()
|
||||
{
|
||||
var __r = global::Brutal.NotCursesApi.NotCurses.PInvoke.ncdirect_cursor_pop(this);
|
||||
if (__r != 0) throw new NcResultException("ncdirect_cursor_pop", __r);
|
||||
}
|
||||
public void CursorPush()
|
||||
{
|
||||
var __r = global::Brutal.NotCursesApi.NotCurses.PInvoke.ncdirect_cursor_push(this);
|
||||
if (__r != 0) throw new NcResultException("ncdirect_cursor_push", __r);
|
||||
}
|
||||
public void CursorRight(int num)
|
||||
{
|
||||
var __r = global::Brutal.NotCursesApi.NotCurses.PInvoke.ncdirect_cursor_right(this, num);
|
||||
if (__r != 0) throw new NcResultException("ncdirect_cursor_right", __r);
|
||||
}
|
||||
public void CursorUp(int num)
|
||||
{
|
||||
var __r = global::Brutal.NotCursesApi.NotCurses.PInvoke.ncdirect_cursor_up(this, num);
|
||||
if (__r != 0) throw new NcResultException("ncdirect_cursor_up", __r);
|
||||
}
|
||||
public void CursorYx(Ptr<uint> y, Ptr<uint> x)
|
||||
{
|
||||
var __r = global::Brutal.NotCursesApi.NotCurses.PInvoke.ncdirect_cursor_yx(this, y, x);
|
||||
if (__r != 0) throw new NcResultException("ncdirect_cursor_yx", __r);
|
||||
}
|
||||
public void Cursor(out uint2 xy)
|
||||
{
|
||||
uint xyY = default;
|
||||
uint xyX = default;
|
||||
var __r = global::Brutal.NotCursesApi.NotCurses.PInvoke.ncdirect_cursor_yx(this, new Ptr<uint>(&xyY), new Ptr<uint>(&xyX));
|
||||
if (__r != 0) throw new NcResultException("ncdirect_cursor_yx", __r);
|
||||
xy = new uint2(xyX, xyY);
|
||||
}
|
||||
public string DetectedTerminal()
|
||||
=> global::Brutal.NotCursesApi.NotCurses.PInvoke.ncdirect_detected_terminal(this);
|
||||
public uint DimX()
|
||||
=> global::Brutal.NotCursesApi.NotCurses.PInvoke.ncdirect_dim_x(this);
|
||||
public uint DimY()
|
||||
=> global::Brutal.NotCursesApi.NotCurses.PInvoke.ncdirect_dim_y(this);
|
||||
public void DoubleBox(ulong ul, ulong ur, ulong ll, ulong lr, uint2 len, uint ctlWord)
|
||||
{
|
||||
var __r = global::Brutal.NotCursesApi.NotCurses.PInvoke.ncdirect_double_box(this, ul, ur, ll, lr, len.Y, len.X, ctlWord);
|
||||
if (__r != 0) throw new NcResultException("ncdirect_double_box", __r);
|
||||
}
|
||||
public void Flush()
|
||||
{
|
||||
var __r = global::Brutal.NotCursesApi.NotCurses.PInvoke.ncdirect_flush(this);
|
||||
if (__r != 0) throw new NcResultException("ncdirect_flush", __r);
|
||||
}
|
||||
public uint Get(Ptr<TimeSpec> absdl, Ptr<NcInput> ni)
|
||||
=> global::Brutal.NotCursesApi.NotCurses.PInvoke.ncdirect_get(this, absdl, ni);
|
||||
public uint Get(out TimeSpec absdl, out NcInput ni)
|
||||
{
|
||||
absdl = default;
|
||||
ni = default;
|
||||
fixed (TimeSpec* absdlPtr = &absdl)
|
||||
{
|
||||
fixed (NcInput* niPtr = &ni)
|
||||
{
|
||||
return global::Brutal.NotCursesApi.NotCurses.PInvoke.ncdirect_get(this, new Ptr<TimeSpec>(absdlPtr), new Ptr<NcInput>(niPtr));
|
||||
}
|
||||
}
|
||||
}
|
||||
public uint GetBlocking(Ptr<NcInput> ni)
|
||||
=> global::Brutal.NotCursesApi.NotCurses.PInvoke.ncdirect_get_blocking(this, ni);
|
||||
public uint GetBlocking(out NcInput ni)
|
||||
{
|
||||
ni = default;
|
||||
fixed (NcInput* niPtr = &ni)
|
||||
{
|
||||
return global::Brutal.NotCursesApi.NotCurses.PInvoke.ncdirect_get_blocking(this, new Ptr<NcInput>(niPtr));
|
||||
}
|
||||
}
|
||||
public uint GetNblock(Ptr<NcInput> ni)
|
||||
=> global::Brutal.NotCursesApi.NotCurses.PInvoke.ncdirect_get_nblock(this, ni);
|
||||
public uint GetNblock(out NcInput ni)
|
||||
{
|
||||
ni = default;
|
||||
fixed (NcInput* niPtr = &ni)
|
||||
{
|
||||
return global::Brutal.NotCursesApi.NotCurses.PInvoke.ncdirect_get_nblock(this, new Ptr<NcInput>(niPtr));
|
||||
}
|
||||
}
|
||||
public void HeavyBox(ulong ul, ulong ur, ulong ll, ulong lr, uint2 len, uint ctlWord)
|
||||
{
|
||||
var __r = global::Brutal.NotCursesApi.NotCurses.PInvoke.ncdirect_heavy_box(this, ul, ur, ll, lr, len.Y, len.X, ctlWord);
|
||||
if (__r != 0) throw new NcResultException("ncdirect_heavy_box", __r);
|
||||
}
|
||||
public void HlineInterp(Ptr<byte> egc, uint len, ulong h1, ulong h2)
|
||||
{
|
||||
var __r = global::Brutal.NotCursesApi.NotCurses.PInvoke.ncdirect_hline_interp(this, egc, len, h1, h2);
|
||||
if (__r != 0) throw new NcResultException("ncdirect_hline_interp", __r);
|
||||
}
|
||||
public void InputReadyFd()
|
||||
{
|
||||
var __r = global::Brutal.NotCursesApi.NotCurses.PInvoke.ncdirect_inputready_fd(this);
|
||||
if (__r != 0) throw new NcResultException("ncdirect_inputready_fd", __r);
|
||||
}
|
||||
public void LightBox(ulong ul, ulong ur, ulong ll, ulong lr, uint2 len, uint ctlWord)
|
||||
{
|
||||
var __r = global::Brutal.NotCursesApi.NotCurses.PInvoke.ncdirect_light_box(this, ul, ur, ll, lr, len.Y, len.X, ctlWord);
|
||||
if (__r != 0) throw new NcResultException("ncdirect_light_box", __r);
|
||||
}
|
||||
public void OffStyles(uint styleBits)
|
||||
{
|
||||
var __r = global::Brutal.NotCursesApi.NotCurses.PInvoke.ncdirect_off_styles(this, styleBits);
|
||||
if (__r != 0) throw new NcResultException("ncdirect_off_styles", __r);
|
||||
}
|
||||
public void OnStyles(uint styleBits)
|
||||
{
|
||||
var __r = global::Brutal.NotCursesApi.NotCurses.PInvoke.ncdirect_on_styles(this, styleBits);
|
||||
if (__r != 0) throw new NcResultException("ncdirect_on_styles", __r);
|
||||
}
|
||||
public uint PaletteSize()
|
||||
=> global::Brutal.NotCursesApi.NotCurses.PInvoke.ncdirect_palette_size(this);
|
||||
public void PrintfAligned(int y, NcAlign align, RefString8 fmt)
|
||||
{
|
||||
var __r = global::Brutal.NotCursesApi.NotCurses.PInvoke.ncdirect_printf_aligned(this, y, align, fmt);
|
||||
if (__r != 0) throw new NcResultException("ncdirect_printf_aligned", __r);
|
||||
}
|
||||
public int PutEgc(ulong channels, RefString8 utf8, Ptr<int> sBytes)
|
||||
{
|
||||
var __r = global::Brutal.NotCursesApi.NotCurses.PInvoke.ncdirect_putegc(this, channels, utf8, sBytes);
|
||||
if (__r < 0) throw new NcResultException("ncdirect_putegc", __r);
|
||||
return __r;
|
||||
}
|
||||
public int PutEgc(ulong channels, RefString8 utf8, out int sBytes)
|
||||
{
|
||||
sBytes = default;
|
||||
fixed (int* sBytesPtr = &sBytes)
|
||||
{
|
||||
var __r = global::Brutal.NotCursesApi.NotCurses.PInvoke.ncdirect_putegc(this, channels, utf8, new Ptr<int>(sBytesPtr));
|
||||
if (__r < 0) throw new NcResultException("ncdirect_putegc", __r);
|
||||
return __r;
|
||||
}
|
||||
}
|
||||
public int PutStr(ulong channels, RefString8 utf8)
|
||||
{
|
||||
var __r = global::Brutal.NotCursesApi.NotCurses.PInvoke.ncdirect_putstr(this, channels, utf8);
|
||||
if (__r < 0) throw new NcResultException("ncdirect_putstr", __r);
|
||||
return __r;
|
||||
}
|
||||
public void RasterFrame(NcPlaneHandle ncdv, NcAlign align)
|
||||
{
|
||||
var __r = global::Brutal.NotCursesApi.NotCurses.PInvoke.ncdirect_raster_frame(this, ncdv, align);
|
||||
if (__r != 0) throw new NcResultException("ncdirect_raster_frame", __r);
|
||||
}
|
||||
public string ReadLine(RefString8 prompt)
|
||||
=> global::Brutal.NotCursesApi.NotCurses.PInvoke.ncdirect_readline(this, prompt);
|
||||
public NcPlaneHandle RenderFrame(RefString8 filename, NcBlitter blitter, NcScale scale, int2 max)
|
||||
=> global::Brutal.NotCursesApi.NotCurses.PInvoke.ncdirect_render_frame(this, filename, blitter, scale, max.Y, max.X);
|
||||
public void RenderImage(RefString8 filename, NcAlign align, NcBlitter blitter, NcScale scale)
|
||||
{
|
||||
var __r = global::Brutal.NotCursesApi.NotCurses.PInvoke.ncdirect_render_image(this, filename, align, blitter, scale);
|
||||
if (__r != 0) throw new NcResultException("ncdirect_render_image", __r);
|
||||
}
|
||||
public void RoundedBox(ulong ul, ulong ur, ulong ll, ulong lr, uint2 len, uint ctlWord)
|
||||
{
|
||||
var __r = global::Brutal.NotCursesApi.NotCurses.PInvoke.ncdirect_rounded_box(this, ul, ur, ll, lr, len.Y, len.X, ctlWord);
|
||||
if (__r != 0) throw new NcResultException("ncdirect_rounded_box", __r);
|
||||
}
|
||||
public void SetBgDefault()
|
||||
{
|
||||
var __r = global::Brutal.NotCursesApi.NotCurses.PInvoke.ncdirect_set_bg_default(this);
|
||||
if (__r != 0) throw new NcResultException("ncdirect_set_bg_default", __r);
|
||||
}
|
||||
public void SetBgPalindex(int pIdx)
|
||||
{
|
||||
var __r = global::Brutal.NotCursesApi.NotCurses.PInvoke.ncdirect_set_bg_palindex(this, pIdx);
|
||||
if (__r != 0) throw new NcResultException("ncdirect_set_bg_palindex", __r);
|
||||
}
|
||||
public void SetBgRgb(uint rgb)
|
||||
{
|
||||
var __r = global::Brutal.NotCursesApi.NotCurses.PInvoke.ncdirect_set_bg_rgb(this, rgb);
|
||||
if (__r != 0) throw new NcResultException("ncdirect_set_bg_rgb", __r);
|
||||
}
|
||||
public void SetBgRgb8(uint r, uint g, uint b)
|
||||
{
|
||||
var __r = global::Brutal.NotCursesApi.NotCurses.PInvoke.ncdirect_set_bg_rgb8(this, r, g, b);
|
||||
if (__r != 0) throw new NcResultException("ncdirect_set_bg_rgb8", __r);
|
||||
}
|
||||
public void SetFgDefault()
|
||||
{
|
||||
var __r = global::Brutal.NotCursesApi.NotCurses.PInvoke.ncdirect_set_fg_default(this);
|
||||
if (__r != 0) throw new NcResultException("ncdirect_set_fg_default", __r);
|
||||
}
|
||||
public void SetFgPalindex(int pIdx)
|
||||
{
|
||||
var __r = global::Brutal.NotCursesApi.NotCurses.PInvoke.ncdirect_set_fg_palindex(this, pIdx);
|
||||
if (__r != 0) throw new NcResultException("ncdirect_set_fg_palindex", __r);
|
||||
}
|
||||
public void SetFgRgb(uint rgb)
|
||||
{
|
||||
var __r = global::Brutal.NotCursesApi.NotCurses.PInvoke.ncdirect_set_fg_rgb(this, rgb);
|
||||
if (__r != 0) throw new NcResultException("ncdirect_set_fg_rgb", __r);
|
||||
}
|
||||
public void SetFgRgb8(uint r, uint g, uint b)
|
||||
{
|
||||
var __r = global::Brutal.NotCursesApi.NotCurses.PInvoke.ncdirect_set_fg_rgb8(this, r, g, b);
|
||||
if (__r != 0) throw new NcResultException("ncdirect_set_fg_rgb8", __r);
|
||||
}
|
||||
public void SetStyles(uint styleBits)
|
||||
{
|
||||
var __r = global::Brutal.NotCursesApi.NotCurses.PInvoke.ncdirect_set_styles(this, styleBits);
|
||||
if (__r != 0) throw new NcResultException("ncdirect_set_styles", __r);
|
||||
}
|
||||
public void Stop()
|
||||
{
|
||||
var __r = global::Brutal.NotCursesApi.NotCurses.PInvoke.ncdirect_stop(this);
|
||||
if (__r != 0) throw new NcResultException("ncdirect_stop", __r);
|
||||
}
|
||||
public void Stream(RefString8 filename, delegate* unmanaged[Cdecl]<NcVisualHandle, Ptr<NcVisualOptions>, Ptr<TimeSpec>, Ptr, int> streamer, Ptr<NcVisualOptions> vopts, Ptr currY)
|
||||
{
|
||||
var __r = global::Brutal.NotCursesApi.NotCurses.PInvoke.ncdirect_stream(this, filename, streamer, vopts, currY);
|
||||
if (__r != 0) throw new NcResultException("ncdirect_stream", __r);
|
||||
}
|
||||
public ushort Styles()
|
||||
=> global::Brutal.NotCursesApi.NotCurses.PInvoke.ncdirect_styles(this);
|
||||
public ushort SupportedStyles()
|
||||
=> global::Brutal.NotCursesApi.NotCurses.PInvoke.ncdirect_supported_styles(this);
|
||||
public void VlineInterp(Ptr<byte> egc, uint len, ulong h1, ulong h2)
|
||||
{
|
||||
var __r = global::Brutal.NotCursesApi.NotCurses.PInvoke.ncdirect_vline_interp(this, egc, len, h1, h2);
|
||||
if (__r != 0) throw new NcResultException("ncdirect_vline_interp", __r);
|
||||
}
|
||||
}
|
||||
public static unsafe partial class StringExtensions
|
||||
{
|
||||
public static void PrintfAligned(this NcDirectHandle self, int y, NcAlign align, string fmt)
|
||||
{
|
||||
using var fmtBuf = new ScratchBuffer(fmt, stackalloc byte[256]);
|
||||
self.PrintfAligned(y, align, fmtBuf.Bytes);
|
||||
}
|
||||
public static int PutEgc(this NcDirectHandle self, ulong channels, string utf8, Ptr<int> sBytes)
|
||||
{
|
||||
using var utf8Buf = new ScratchBuffer(utf8, stackalloc byte[256]);
|
||||
return self.PutEgc(channels, utf8Buf.Bytes, sBytes);
|
||||
}
|
||||
public static int PutStr(this NcDirectHandle self, ulong channels, string utf8)
|
||||
{
|
||||
using var utf8Buf = new ScratchBuffer(utf8, stackalloc byte[256]);
|
||||
return self.PutStr(channels, utf8Buf.Bytes);
|
||||
}
|
||||
public static string ReadLine(this NcDirectHandle self, string prompt)
|
||||
{
|
||||
using var promptBuf = new ScratchBuffer(prompt, stackalloc byte[256]);
|
||||
return self.ReadLine(promptBuf.Bytes);
|
||||
}
|
||||
public static NcPlaneHandle RenderFrame(this NcDirectHandle self, string filename, NcBlitter blitter, NcScale scale, int2 max)
|
||||
{
|
||||
using var filenameBuf = new ScratchBuffer(filename, stackalloc byte[256]);
|
||||
return self.RenderFrame(filenameBuf.Bytes, blitter, scale, max);
|
||||
}
|
||||
public static void RenderImage(this NcDirectHandle self, string filename, NcAlign align, NcBlitter blitter, NcScale scale)
|
||||
{
|
||||
using var filenameBuf = new ScratchBuffer(filename, stackalloc byte[256]);
|
||||
self.RenderImage(filenameBuf.Bytes, align, blitter, scale);
|
||||
}
|
||||
public static void Stream(this NcDirectHandle self, string filename, delegate* unmanaged[Cdecl]<NcVisualHandle, Ptr<NcVisualOptions>, Ptr<TimeSpec>, Ptr, int> streamer, Ptr<NcVisualOptions> vopts, Ptr currY)
|
||||
{
|
||||
using var filenameBuf = new ScratchBuffer(filename, stackalloc byte[256]);
|
||||
self.Stream(filenameBuf.Bytes, streamer, vopts, currY);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,23 @@
|
|||
using System.Runtime.InteropServices.Marshalling;
|
||||
using Brutal;
|
||||
using Brutal.Interop;
|
||||
using Brutal.Numerics;
|
||||
using Brutal.Pointers;
|
||||
using Brutal.Strings;
|
||||
namespace Brutal.NotCursesApi
|
||||
{
|
||||
[InteropHandle]
|
||||
public unsafe readonly partial struct NcFadectxHandle
|
||||
{
|
||||
}
|
||||
public unsafe readonly partial struct NcFadectxHandle
|
||||
{
|
||||
public void Free()
|
||||
=> global::Brutal.NotCursesApi.NotCurses.PInvoke.ncfadectx_free(this);
|
||||
public void Iterations()
|
||||
{
|
||||
var __r = global::Brutal.NotCursesApi.NotCurses.PInvoke.ncfadectx_iterations(this);
|
||||
if (__r != 0) throw new NcResultException("ncfadectx_iterations", __r);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,23 @@
|
|||
using System.Runtime.InteropServices.Marshalling;
|
||||
using Brutal;
|
||||
using Brutal.Interop;
|
||||
using Brutal.Numerics;
|
||||
using Brutal.Pointers;
|
||||
using Brutal.Strings;
|
||||
namespace Brutal.NotCursesApi
|
||||
{
|
||||
[InteropHandle]
|
||||
public unsafe readonly partial struct NcFdPlaneHandle
|
||||
{
|
||||
}
|
||||
public unsafe readonly partial struct NcFdPlaneHandle
|
||||
{
|
||||
public void Destroy()
|
||||
{
|
||||
var __r = global::Brutal.NotCursesApi.NotCurses.PInvoke.ncfdplane_destroy(this);
|
||||
if (__r != 0) throw new NcResultException("ncfdplane_destroy", __r);
|
||||
}
|
||||
public NcPlaneHandle Plane()
|
||||
=> global::Brutal.NotCursesApi.NotCurses.PInvoke.ncfdplane_plane(this);
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,98 @@
|
|||
using System.Runtime.InteropServices.Marshalling;
|
||||
using Brutal;
|
||||
using Brutal.Interop;
|
||||
using Brutal.Numerics;
|
||||
using Brutal.Pointers;
|
||||
using Brutal.Strings;
|
||||
namespace Brutal.NotCursesApi
|
||||
{
|
||||
[InteropHandle]
|
||||
public unsafe readonly partial struct NcMenuHandle
|
||||
{
|
||||
}
|
||||
public unsafe readonly partial struct NcMenuHandle
|
||||
{
|
||||
public void Destroy()
|
||||
=> global::Brutal.NotCursesApi.NotCurses.PInvoke.ncmenu_destroy(this);
|
||||
public void ItemSetStatus(RefString8 section, RefString8 item, Bool8 enabled)
|
||||
{
|
||||
var __r = global::Brutal.NotCursesApi.NotCurses.PInvoke.ncmenu_item_set_status(this, section, item, enabled);
|
||||
if (__r != 0) throw new NcResultException("ncmenu_item_set_status", __r);
|
||||
}
|
||||
public string MouseSelected(Ptr<NcInput> click, Ptr<NcInput> ni)
|
||||
=> global::Brutal.NotCursesApi.NotCurses.PInvoke.ncmenu_mouse_selected(this, click, ni);
|
||||
public string MouseSelected(out NcInput click, out NcInput ni)
|
||||
{
|
||||
click = default;
|
||||
ni = default;
|
||||
fixed (NcInput* clickPtr = &click)
|
||||
{
|
||||
fixed (NcInput* niPtr = &ni)
|
||||
{
|
||||
return global::Brutal.NotCursesApi.NotCurses.PInvoke.ncmenu_mouse_selected(this, new Ptr<NcInput>(clickPtr), new Ptr<NcInput>(niPtr));
|
||||
}
|
||||
}
|
||||
}
|
||||
public void NextItem()
|
||||
{
|
||||
var __r = global::Brutal.NotCursesApi.NotCurses.PInvoke.ncmenu_nextitem(this);
|
||||
if (__r != 0) throw new NcResultException("ncmenu_nextitem", __r);
|
||||
}
|
||||
public void NextSection()
|
||||
{
|
||||
var __r = global::Brutal.NotCursesApi.NotCurses.PInvoke.ncmenu_nextsection(this);
|
||||
if (__r != 0) throw new NcResultException("ncmenu_nextsection", __r);
|
||||
}
|
||||
public Bool8 OfferInput(Ptr<NcInput> nc)
|
||||
=> global::Brutal.NotCursesApi.NotCurses.PInvoke.ncmenu_offer_input(this, nc);
|
||||
public Bool8 OfferInput(out NcInput nc)
|
||||
{
|
||||
nc = default;
|
||||
fixed (NcInput* ncPtr = &nc)
|
||||
{
|
||||
return global::Brutal.NotCursesApi.NotCurses.PInvoke.ncmenu_offer_input(this, new Ptr<NcInput>(ncPtr));
|
||||
}
|
||||
}
|
||||
public NcPlaneHandle Plane()
|
||||
=> global::Brutal.NotCursesApi.NotCurses.PInvoke.ncmenu_plane(this);
|
||||
public void PrevItem()
|
||||
{
|
||||
var __r = global::Brutal.NotCursesApi.NotCurses.PInvoke.ncmenu_previtem(this);
|
||||
if (__r != 0) throw new NcResultException("ncmenu_previtem", __r);
|
||||
}
|
||||
public void PrevSection()
|
||||
{
|
||||
var __r = global::Brutal.NotCursesApi.NotCurses.PInvoke.ncmenu_prevsection(this);
|
||||
if (__r != 0) throw new NcResultException("ncmenu_prevsection", __r);
|
||||
}
|
||||
public void RollUp()
|
||||
{
|
||||
var __r = global::Brutal.NotCursesApi.NotCurses.PInvoke.ncmenu_rollup(this);
|
||||
if (__r != 0) throw new NcResultException("ncmenu_rollup", __r);
|
||||
}
|
||||
public string Selected(Ptr<NcInput> ni)
|
||||
=> global::Brutal.NotCursesApi.NotCurses.PInvoke.ncmenu_selected(this, ni);
|
||||
public string Selected(out NcInput ni)
|
||||
{
|
||||
ni = default;
|
||||
fixed (NcInput* niPtr = &ni)
|
||||
{
|
||||
return global::Brutal.NotCursesApi.NotCurses.PInvoke.ncmenu_selected(this, new Ptr<NcInput>(niPtr));
|
||||
}
|
||||
}
|
||||
public void Unroll(int sectionIdx)
|
||||
{
|
||||
var __r = global::Brutal.NotCursesApi.NotCurses.PInvoke.ncmenu_unroll(this, sectionIdx);
|
||||
if (__r != 0) throw new NcResultException("ncmenu_unroll", __r);
|
||||
}
|
||||
}
|
||||
public static unsafe partial class StringExtensions
|
||||
{
|
||||
public static void ItemSetStatus(this NcMenuHandle self, string section, string item, Bool8 enabled)
|
||||
{
|
||||
using var sectionBuf = new ScratchBuffer(section, stackalloc byte[256]);
|
||||
using var itemBuf = new ScratchBuffer(item, stackalloc byte[256]);
|
||||
self.ItemSetStatus(sectionBuf.Bytes, itemBuf.Bytes, enabled);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,35 @@
|
|||
using System.Runtime.InteropServices.Marshalling;
|
||||
using Brutal;
|
||||
using Brutal.Interop;
|
||||
using Brutal.Numerics;
|
||||
using Brutal.Pointers;
|
||||
using Brutal.Strings;
|
||||
namespace Brutal.NotCursesApi
|
||||
{
|
||||
[InteropHandle]
|
||||
public unsafe readonly partial struct NcMultiSelectorHandle
|
||||
{
|
||||
}
|
||||
public unsafe readonly partial struct NcMultiSelectorHandle
|
||||
{
|
||||
public void Destroy()
|
||||
=> global::Brutal.NotCursesApi.NotCurses.PInvoke.ncmultiselector_destroy(this);
|
||||
public Bool8 OfferInput(Ptr<NcInput> nc)
|
||||
=> global::Brutal.NotCursesApi.NotCurses.PInvoke.ncmultiselector_offer_input(this, nc);
|
||||
public Bool8 OfferInput(out NcInput nc)
|
||||
{
|
||||
nc = default;
|
||||
fixed (NcInput* ncPtr = &nc)
|
||||
{
|
||||
return global::Brutal.NotCursesApi.NotCurses.PInvoke.ncmultiselector_offer_input(this, new Ptr<NcInput>(ncPtr));
|
||||
}
|
||||
}
|
||||
public NcPlaneHandle Plane()
|
||||
=> global::Brutal.NotCursesApi.NotCurses.PInvoke.ncmultiselector_plane(this);
|
||||
public void Selected(Ptr<Bool8> selected, uint count)
|
||||
{
|
||||
var __r = global::Brutal.NotCursesApi.NotCurses.PInvoke.ncmultiselector_selected(this, selected, count);
|
||||
if (__r != 0) throw new NcResultException("ncmultiselector_selected", __r);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,953 @@
|
|||
using System.Runtime.InteropServices.Marshalling;
|
||||
using Brutal;
|
||||
using Brutal.Interop;
|
||||
using Brutal.Numerics;
|
||||
using Brutal.Pointers;
|
||||
using Brutal.Strings;
|
||||
namespace Brutal.NotCursesApi
|
||||
{
|
||||
[InteropHandle]
|
||||
public unsafe readonly partial struct NcPlaneHandle
|
||||
{
|
||||
}
|
||||
public unsafe readonly partial struct NcPlaneHandle
|
||||
{
|
||||
public NcPlaneHandle Above()
|
||||
=> global::Brutal.NotCursesApi.NotCurses.PInvoke.ncplane_above(this);
|
||||
public void AbsX()
|
||||
{
|
||||
var __r = global::Brutal.NotCursesApi.NotCurses.PInvoke.ncplane_abs_x(this);
|
||||
if (__r != 0) throw new NcResultException("ncplane_abs_x", __r);
|
||||
}
|
||||
public void AbsY()
|
||||
{
|
||||
var __r = global::Brutal.NotCursesApi.NotCurses.PInvoke.ncplane_abs_y(this);
|
||||
if (__r != 0) throw new NcResultException("ncplane_abs_y", __r);
|
||||
}
|
||||
public void AbsYx(Ptr<int> y, Ptr<int> x)
|
||||
=> global::Brutal.NotCursesApi.NotCurses.PInvoke.ncplane_abs_yx(this, y, x);
|
||||
public void Abs(out int2 xy)
|
||||
{
|
||||
int xyY = default;
|
||||
int xyX = default;
|
||||
global::Brutal.NotCursesApi.NotCurses.PInvoke.ncplane_abs_yx(this, new Ptr<int>(&xyY), new Ptr<int>(&xyX));
|
||||
xy = new int2(xyX, xyY);
|
||||
}
|
||||
public Ptr<uint> AsRgba(NcBlitter blit, int2 beg, uint2 len, Ptr<uint> pxDimY, Ptr<uint> pxDimX)
|
||||
=> global::Brutal.NotCursesApi.NotCurses.PInvoke.ncplane_as_rgba(this, blit, beg.Y, beg.X, len.Y, len.X, pxDimY, pxDimX);
|
||||
public Ptr<uint> AsRgba(NcBlitter blit, int begY, int begX, uint lenY, uint lenX, out uint2 pxDim)
|
||||
{
|
||||
uint pxDimY = default;
|
||||
uint pxDimX = default;
|
||||
var __r = global::Brutal.NotCursesApi.NotCurses.PInvoke.ncplane_as_rgba(this, blit, begY, begX, lenY, lenX, new Ptr<uint>(&pxDimY), new Ptr<uint>(&pxDimX));
|
||||
pxDim = new uint2(pxDimX, pxDimY);
|
||||
return __r;
|
||||
}
|
||||
public void AsciiBox(ushort styles, ulong channels, uint2 len, uint ctlWord)
|
||||
{
|
||||
var __r = global::Brutal.NotCursesApi.NotCurses.PInvoke.ncplane_ascii_box(this, styles, channels, len.Y, len.X, ctlWord);
|
||||
if (__r != 0) throw new NcResultException("ncplane_ascii_box", __r);
|
||||
}
|
||||
public string AtCursor(Ptr<ushort> stylemask, Ptr<ulong> channels)
|
||||
=> global::Brutal.NotCursesApi.NotCurses.PInvoke.ncplane_at_cursor(this, stylemask, channels);
|
||||
public string AtCursor(out ushort stylemask, out ulong channels)
|
||||
{
|
||||
stylemask = default;
|
||||
channels = default;
|
||||
fixed (ushort* stylemaskPtr = &stylemask)
|
||||
{
|
||||
fixed (ulong* channelsPtr = &channels)
|
||||
{
|
||||
return global::Brutal.NotCursesApi.NotCurses.PInvoke.ncplane_at_cursor(this, new Ptr<ushort>(stylemaskPtr), new Ptr<ulong>(channelsPtr));
|
||||
}
|
||||
}
|
||||
}
|
||||
public NcCell AtCursorCell()
|
||||
{
|
||||
NcCell c = default;
|
||||
var __r = global::Brutal.NotCursesApi.NotCurses.PInvoke.ncplane_at_cursor_cell(this, new Ptr<NcCell>(&c));
|
||||
if (__r != 0) throw new NcResultException("ncplane_at_cursor_cell", __r);
|
||||
return c;
|
||||
}
|
||||
public string At(int2 xy, Ptr<ushort> stylemask, Ptr<ulong> channels)
|
||||
=> global::Brutal.NotCursesApi.NotCurses.PInvoke.ncplane_at_yx(this, xy.Y, xy.X, stylemask, channels);
|
||||
public string AtYx(int y, int x, out ushort stylemask, out ulong channels)
|
||||
{
|
||||
stylemask = default;
|
||||
channels = default;
|
||||
fixed (ushort* stylemaskPtr = &stylemask)
|
||||
{
|
||||
fixed (ulong* channelsPtr = &channels)
|
||||
{
|
||||
return global::Brutal.NotCursesApi.NotCurses.PInvoke.ncplane_at_yx(this, y, x, new Ptr<ushort>(stylemaskPtr), new Ptr<ulong>(channelsPtr));
|
||||
}
|
||||
}
|
||||
}
|
||||
public NcCell AtYxCell(int2 xy)
|
||||
{
|
||||
NcCell c = default;
|
||||
var __r = global::Brutal.NotCursesApi.NotCurses.PInvoke.ncplane_at_yx_cell(this, xy.Y, xy.X, new Ptr<NcCell>(&c));
|
||||
if (__r != 0) throw new NcResultException("ncplane_at_yx_cell", __r);
|
||||
return c;
|
||||
}
|
||||
public Bool8 AutogrowP()
|
||||
=> global::Brutal.NotCursesApi.NotCurses.PInvoke.ncplane_autogrow_p(this);
|
||||
public NcCell Base()
|
||||
{
|
||||
NcCell c = default;
|
||||
var __r = global::Brutal.NotCursesApi.NotCurses.PInvoke.ncplane_base(this, new Ptr<NcCell>(&c));
|
||||
if (__r != 0) throw new NcResultException("ncplane_base", __r);
|
||||
return c;
|
||||
}
|
||||
public uint BChannel()
|
||||
=> global::Brutal.NotCursesApi.NotCurses.PInvoke.ncplane_bchannel(this);
|
||||
public NcPlaneHandle Below()
|
||||
=> global::Brutal.NotCursesApi.NotCurses.PInvoke.ncplane_below(this);
|
||||
public uint BgAlpha()
|
||||
=> global::Brutal.NotCursesApi.NotCurses.PInvoke.ncplane_bg_alpha(this);
|
||||
public Bool8 BgDefaultP()
|
||||
=> global::Brutal.NotCursesApi.NotCurses.PInvoke.ncplane_bg_default_p(this);
|
||||
public uint BgRgb()
|
||||
=> global::Brutal.NotCursesApi.NotCurses.PInvoke.ncplane_bg_rgb(this);
|
||||
public uint BgRgb8(Ptr<uint> r, Ptr<uint> g, Ptr<uint> b)
|
||||
=> global::Brutal.NotCursesApi.NotCurses.PInvoke.ncplane_bg_rgb8(this, r, g, b);
|
||||
public uint BgRgb8(out uint r, out uint g, out uint b)
|
||||
{
|
||||
r = default;
|
||||
g = default;
|
||||
b = default;
|
||||
fixed (uint* rPtr = &r)
|
||||
{
|
||||
fixed (uint* gPtr = &g)
|
||||
{
|
||||
fixed (uint* bPtr = &b)
|
||||
{
|
||||
return global::Brutal.NotCursesApi.NotCurses.PInvoke.ncplane_bg_rgb8(this, new Ptr<uint>(rPtr), new Ptr<uint>(gPtr), new Ptr<uint>(bPtr));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
public void Box(Ptr<NcCell> ul, Ptr<NcCell> ur, Ptr<NcCell> ll, Ptr<NcCell> lr, Ptr<NcCell> hline, Ptr<NcCell> vline, uint2 stop, uint ctlWord)
|
||||
{
|
||||
var __r = global::Brutal.NotCursesApi.NotCurses.PInvoke.ncplane_box(this, ul, ur, ll, lr, hline, vline, stop.Y, stop.X, ctlWord);
|
||||
if (__r != 0) throw new NcResultException("ncplane_box", __r);
|
||||
}
|
||||
public void BoxSized(Ptr<NcCell> ul, Ptr<NcCell> ur, Ptr<NcCell> ll, Ptr<NcCell> lr, Ptr<NcCell> hline, Ptr<NcCell> vline, uint2 stop, uint ctlWord)
|
||||
{
|
||||
var __r = global::Brutal.NotCursesApi.NotCurses.PInvoke.ncplane_box_sized(this, ul, ur, ll, lr, hline, vline, stop.Y, stop.X, ctlWord);
|
||||
if (__r != 0) throw new NcResultException("ncplane_box_sized", __r);
|
||||
}
|
||||
public void CenterAbs(Ptr<int> y, Ptr<int> x)
|
||||
=> global::Brutal.NotCursesApi.NotCurses.PInvoke.ncplane_center_abs(this, y, x);
|
||||
public void CenterAbs(out int2 xy)
|
||||
{
|
||||
int xyY = default;
|
||||
int xyX = default;
|
||||
global::Brutal.NotCursesApi.NotCurses.PInvoke.ncplane_center_abs(this, new Ptr<int>(&xyY), new Ptr<int>(&xyX));
|
||||
xy = new int2(xyX, xyY);
|
||||
}
|
||||
public ulong Channels()
|
||||
=> global::Brutal.NotCursesApi.NotCurses.PInvoke.ncplane_channels(this);
|
||||
public string Contents(int2 beg, uint2 len)
|
||||
=> global::Brutal.NotCursesApi.NotCurses.PInvoke.ncplane_contents(this, beg.Y, beg.X, len.Y, len.X);
|
||||
public NcPlaneHandle Create(Ptr<NcPlaneOptions> nopts)
|
||||
=> global::Brutal.NotCursesApi.NotCurses.PInvoke.ncplane_create(this, nopts);
|
||||
public NcPlaneHandle Create(out NcPlaneOptions nopts)
|
||||
{
|
||||
nopts = default;
|
||||
fixed (NcPlaneOptions* noptsPtr = &nopts)
|
||||
{
|
||||
return global::Brutal.NotCursesApi.NotCurses.PInvoke.ncplane_create(this, new Ptr<NcPlaneOptions>(noptsPtr));
|
||||
}
|
||||
}
|
||||
public void CursorMoveRel(int2 xy)
|
||||
{
|
||||
var __r = global::Brutal.NotCursesApi.NotCurses.PInvoke.ncplane_cursor_move_rel(this, xy.Y, xy.X);
|
||||
if (__r != 0) throw new NcResultException("ncplane_cursor_move_rel", __r);
|
||||
}
|
||||
public void CursorMove(int2 xy)
|
||||
{
|
||||
var __r = global::Brutal.NotCursesApi.NotCurses.PInvoke.ncplane_cursor_move_yx(this, xy.Y, xy.X);
|
||||
if (__r != 0) throw new NcResultException("ncplane_cursor_move_yx", __r);
|
||||
}
|
||||
public uint CursorX()
|
||||
=> global::Brutal.NotCursesApi.NotCurses.PInvoke.ncplane_cursor_x(this);
|
||||
public uint CursorY()
|
||||
=> global::Brutal.NotCursesApi.NotCurses.PInvoke.ncplane_cursor_y(this);
|
||||
public void CursorYx(Ptr<uint> y, Ptr<uint> x)
|
||||
=> global::Brutal.NotCursesApi.NotCurses.PInvoke.ncplane_cursor_yx(this, y, x);
|
||||
public void Cursor(out uint2 xy)
|
||||
{
|
||||
uint xyY = default;
|
||||
uint xyX = default;
|
||||
global::Brutal.NotCursesApi.NotCurses.PInvoke.ncplane_cursor_yx(this, new Ptr<uint>(&xyY), new Ptr<uint>(&xyX));
|
||||
xy = new uint2(xyX, xyY);
|
||||
}
|
||||
public void DescendantP(NcPlaneHandle ancestor)
|
||||
{
|
||||
var __r = global::Brutal.NotCursesApi.NotCurses.PInvoke.ncplane_descendant_p(this, ancestor);
|
||||
if (__r != 0) throw new NcResultException("ncplane_descendant_p", __r);
|
||||
}
|
||||
public void Destroy()
|
||||
{
|
||||
var __r = global::Brutal.NotCursesApi.NotCurses.PInvoke.ncplane_destroy(this);
|
||||
if (__r != 0) throw new NcResultException("ncplane_destroy", __r);
|
||||
}
|
||||
public uint DimX()
|
||||
=> global::Brutal.NotCursesApi.NotCurses.PInvoke.ncplane_dim_x(this);
|
||||
public uint DimY()
|
||||
=> global::Brutal.NotCursesApi.NotCurses.PInvoke.ncplane_dim_y(this);
|
||||
public void DimYx(Ptr<uint> y, Ptr<uint> x)
|
||||
=> global::Brutal.NotCursesApi.NotCurses.PInvoke.ncplane_dim_yx(this, y, x);
|
||||
public void Dim(out uint2 xy)
|
||||
{
|
||||
uint xyY = default;
|
||||
uint xyX = default;
|
||||
global::Brutal.NotCursesApi.NotCurses.PInvoke.ncplane_dim_yx(this, new Ptr<uint>(&xyY), new Ptr<uint>(&xyX));
|
||||
xy = new uint2(xyX, xyY);
|
||||
}
|
||||
public void DoubleBox(ushort styles, ulong channels, uint2 len, uint ctlWord)
|
||||
{
|
||||
var __r = global::Brutal.NotCursesApi.NotCurses.PInvoke.ncplane_double_box(this, styles, channels, len.Y, len.X, ctlWord);
|
||||
if (__r != 0) throw new NcResultException("ncplane_double_box", __r);
|
||||
}
|
||||
public void DoubleBoxSized(ushort styles, ulong channels, uint2 len, uint ctlWord)
|
||||
{
|
||||
var __r = global::Brutal.NotCursesApi.NotCurses.PInvoke.ncplane_double_box_sized(this, styles, channels, len.Y, len.X, ctlWord);
|
||||
if (__r != 0) throw new NcResultException("ncplane_double_box_sized", __r);
|
||||
}
|
||||
public NcPlaneHandle Dup(Ptr opaque)
|
||||
=> global::Brutal.NotCursesApi.NotCurses.PInvoke.ncplane_dup(this, opaque);
|
||||
public void Erase()
|
||||
=> global::Brutal.NotCursesApi.NotCurses.PInvoke.ncplane_erase(this);
|
||||
public void EraseRegion(int2 start, int2 len)
|
||||
{
|
||||
var __r = global::Brutal.NotCursesApi.NotCurses.PInvoke.ncplane_erase_region(this, start.Y, start.X, len.Y, len.X);
|
||||
if (__r != 0) throw new NcResultException("ncplane_erase_region", __r);
|
||||
}
|
||||
public void FadeIn(Ptr<TimeSpec> ts, delegate* unmanaged[Cdecl]<NotCursesHandle, NcPlaneHandle, Ptr<TimeSpec>, Ptr, int> fader, Ptr currY)
|
||||
{
|
||||
var __r = global::Brutal.NotCursesApi.NotCurses.PInvoke.ncplane_fadein(this, ts, fader, currY);
|
||||
if (__r != 0) throw new NcResultException("ncplane_fadein", __r);
|
||||
}
|
||||
public void FadeInIteration(NcFadectxHandle nctX, int iter, delegate* unmanaged[Cdecl]<NotCursesHandle, NcPlaneHandle, Ptr<TimeSpec>, Ptr, int> fader, Ptr currY)
|
||||
{
|
||||
var __r = global::Brutal.NotCursesApi.NotCurses.PInvoke.ncplane_fadein_iteration(this, nctX, iter, fader, currY);
|
||||
if (__r != 0) throw new NcResultException("ncplane_fadein_iteration", __r);
|
||||
}
|
||||
public void FadeOut(Ptr<TimeSpec> ts, delegate* unmanaged[Cdecl]<NotCursesHandle, NcPlaneHandle, Ptr<TimeSpec>, Ptr, int> fader, Ptr currY)
|
||||
{
|
||||
var __r = global::Brutal.NotCursesApi.NotCurses.PInvoke.ncplane_fadeout(this, ts, fader, currY);
|
||||
if (__r != 0) throw new NcResultException("ncplane_fadeout", __r);
|
||||
}
|
||||
public void FadeOutIteration(NcFadectxHandle nctX, int iter, delegate* unmanaged[Cdecl]<NotCursesHandle, NcPlaneHandle, Ptr<TimeSpec>, Ptr, int> fader, Ptr currY)
|
||||
{
|
||||
var __r = global::Brutal.NotCursesApi.NotCurses.PInvoke.ncplane_fadeout_iteration(this, nctX, iter, fader, currY);
|
||||
if (__r != 0) throw new NcResultException("ncplane_fadeout_iteration", __r);
|
||||
}
|
||||
public void FamilyDestroy()
|
||||
{
|
||||
var __r = global::Brutal.NotCursesApi.NotCurses.PInvoke.ncplane_family_destroy(this);
|
||||
if (__r != 0) throw new NcResultException("ncplane_family_destroy", __r);
|
||||
}
|
||||
public uint FChannel()
|
||||
=> global::Brutal.NotCursesApi.NotCurses.PInvoke.ncplane_fchannel(this);
|
||||
public uint FgAlpha()
|
||||
=> global::Brutal.NotCursesApi.NotCurses.PInvoke.ncplane_fg_alpha(this);
|
||||
public Bool8 FgDefaultP()
|
||||
=> global::Brutal.NotCursesApi.NotCurses.PInvoke.ncplane_fg_default_p(this);
|
||||
public uint FgRgb()
|
||||
=> global::Brutal.NotCursesApi.NotCurses.PInvoke.ncplane_fg_rgb(this);
|
||||
public uint FgRgb8(Ptr<uint> r, Ptr<uint> g, Ptr<uint> b)
|
||||
=> global::Brutal.NotCursesApi.NotCurses.PInvoke.ncplane_fg_rgb8(this, r, g, b);
|
||||
public uint FgRgb8(out uint r, out uint g, out uint b)
|
||||
{
|
||||
r = default;
|
||||
g = default;
|
||||
b = default;
|
||||
fixed (uint* rPtr = &r)
|
||||
{
|
||||
fixed (uint* gPtr = &g)
|
||||
{
|
||||
fixed (uint* bPtr = &b)
|
||||
{
|
||||
return global::Brutal.NotCursesApi.NotCurses.PInvoke.ncplane_fg_rgb8(this, new Ptr<uint>(rPtr), new Ptr<uint>(gPtr), new Ptr<uint>(bPtr));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
public void Format(int2 xy, uint2 len, ushort stylemask)
|
||||
{
|
||||
var __r = global::Brutal.NotCursesApi.NotCurses.PInvoke.ncplane_format(this, xy.Y, xy.X, len.Y, len.X, stylemask);
|
||||
if (__r != 0) throw new NcResultException("ncplane_format", __r);
|
||||
}
|
||||
public void Gradient(int2 xy, uint2 len, RefString8 egc, ushort styles, ulong ul, ulong ur, ulong ll, ulong lr)
|
||||
{
|
||||
var __r = global::Brutal.NotCursesApi.NotCurses.PInvoke.ncplane_gradient(this, xy.Y, xy.X, len.Y, len.X, egc, styles, ul, ur, ll, lr);
|
||||
if (__r != 0) throw new NcResultException("ncplane_gradient", __r);
|
||||
}
|
||||
public void Gradient2x1(int2 xy, uint2 len, uint ul, uint ur, uint ll, uint lr)
|
||||
{
|
||||
var __r = global::Brutal.NotCursesApi.NotCurses.PInvoke.ncplane_gradient2x1(this, xy.Y, xy.X, len.Y, len.X, ul, ur, ll, lr);
|
||||
if (__r != 0) throw new NcResultException("ncplane_gradient2x1", __r);
|
||||
}
|
||||
public void Greyscale()
|
||||
=> global::Brutal.NotCursesApi.NotCurses.PInvoke.ncplane_greyscale(this);
|
||||
public void HAlign(NcAlign align, int c)
|
||||
{
|
||||
var __r = global::Brutal.NotCursesApi.NotCurses.PInvoke.ncplane_halign(this, align, c);
|
||||
if (__r != 0) throw new NcResultException("ncplane_halign", __r);
|
||||
}
|
||||
public void Hline(Ptr<NcCell> c, uint len)
|
||||
{
|
||||
var __r = global::Brutal.NotCursesApi.NotCurses.PInvoke.ncplane_hline(this, c, len);
|
||||
if (__r != 0) throw new NcResultException("ncplane_hline", __r);
|
||||
}
|
||||
public void HlineInterp(Ptr<NcCell> c, uint len, ulong c1, ulong c2)
|
||||
{
|
||||
var __r = global::Brutal.NotCursesApi.NotCurses.PInvoke.ncplane_hline_interp(this, c, len, c1, c2);
|
||||
if (__r != 0) throw new NcResultException("ncplane_hline_interp", __r);
|
||||
}
|
||||
public void Home()
|
||||
=> global::Brutal.NotCursesApi.NotCurses.PInvoke.ncplane_home(this);
|
||||
public void MergeDown(NcPlaneHandle dst, int2 begSrc, uint2 len, int2 dstXy)
|
||||
{
|
||||
var __r = global::Brutal.NotCursesApi.NotCurses.PInvoke.ncplane_mergedown(this, dst, begSrc.Y, begSrc.X, len.Y, len.X, dstXy.Y, dstXy.X);
|
||||
if (__r != 0) throw new NcResultException("ncplane_mergedown", __r);
|
||||
}
|
||||
public void MergeDownSimple(NcPlaneHandle dst)
|
||||
{
|
||||
var __r = global::Brutal.NotCursesApi.NotCurses.PInvoke.ncplane_mergedown_simple(this, dst);
|
||||
if (__r != 0) throw new NcResultException("ncplane_mergedown_simple", __r);
|
||||
}
|
||||
public void MoveAbove(NcPlaneHandle above)
|
||||
{
|
||||
var __r = global::Brutal.NotCursesApi.NotCurses.PInvoke.ncplane_move_above(this, above);
|
||||
if (__r != 0) throw new NcResultException("ncplane_move_above", __r);
|
||||
}
|
||||
public void MoveBelow(NcPlaneHandle below)
|
||||
{
|
||||
var __r = global::Brutal.NotCursesApi.NotCurses.PInvoke.ncplane_move_below(this, below);
|
||||
if (__r != 0) throw new NcResultException("ncplane_move_below", __r);
|
||||
}
|
||||
public void MoveBottom()
|
||||
=> global::Brutal.NotCursesApi.NotCurses.PInvoke.ncplane_move_bottom(this);
|
||||
public void MoveFamilyAbove(NcPlaneHandle targ)
|
||||
{
|
||||
var __r = global::Brutal.NotCursesApi.NotCurses.PInvoke.ncplane_move_family_above(this, targ);
|
||||
if (__r != 0) throw new NcResultException("ncplane_move_family_above", __r);
|
||||
}
|
||||
public void MoveFamilyBelow(NcPlaneHandle targ)
|
||||
{
|
||||
var __r = global::Brutal.NotCursesApi.NotCurses.PInvoke.ncplane_move_family_below(this, targ);
|
||||
if (__r != 0) throw new NcResultException("ncplane_move_family_below", __r);
|
||||
}
|
||||
public void MoveFamilyBottom()
|
||||
=> global::Brutal.NotCursesApi.NotCurses.PInvoke.ncplane_move_family_bottom(this);
|
||||
public void MoveFamilyTop()
|
||||
=> global::Brutal.NotCursesApi.NotCurses.PInvoke.ncplane_move_family_top(this);
|
||||
public void MoveRel(int2 xy)
|
||||
{
|
||||
var __r = global::Brutal.NotCursesApi.NotCurses.PInvoke.ncplane_move_rel(this, xy.Y, xy.X);
|
||||
if (__r != 0) throw new NcResultException("ncplane_move_rel", __r);
|
||||
}
|
||||
public void MoveTop()
|
||||
=> global::Brutal.NotCursesApi.NotCurses.PInvoke.ncplane_move_top(this);
|
||||
public void Move(int2 xy)
|
||||
{
|
||||
var __r = global::Brutal.NotCursesApi.NotCurses.PInvoke.ncplane_move_yx(this, xy.Y, xy.X);
|
||||
if (__r != 0) throw new NcResultException("ncplane_move_yx", __r);
|
||||
}
|
||||
public string Name()
|
||||
=> global::Brutal.NotCursesApi.NotCurses.PInvoke.ncplane_name(this);
|
||||
public NotCursesHandle NotCurses()
|
||||
=> global::Brutal.NotCursesApi.NotCurses.PInvoke.ncplane_notcurses(this);
|
||||
public NotCursesHandle NotCursesConst()
|
||||
=> global::Brutal.NotCursesApi.NotCurses.PInvoke.ncplane_notcurses_const(this);
|
||||
public void OffStyles(uint styleBits)
|
||||
=> global::Brutal.NotCursesApi.NotCurses.PInvoke.ncplane_off_styles(this, styleBits);
|
||||
public void OnStyles(uint styleBits)
|
||||
=> global::Brutal.NotCursesApi.NotCurses.PInvoke.ncplane_on_styles(this, styleBits);
|
||||
public NcPlaneHandle Parent()
|
||||
=> global::Brutal.NotCursesApi.NotCurses.PInvoke.ncplane_parent(this);
|
||||
public NcPlaneHandle ParentConst()
|
||||
=> global::Brutal.NotCursesApi.NotCurses.PInvoke.ncplane_parent_const(this);
|
||||
public void Perimeter(Ptr<NcCell> ul, Ptr<NcCell> ur, Ptr<NcCell> ll, Ptr<NcCell> lr, Ptr<NcCell> hline, Ptr<NcCell> vline, uint ctlWord)
|
||||
{
|
||||
var __r = global::Brutal.NotCursesApi.NotCurses.PInvoke.ncplane_perimeter(this, ul, ur, ll, lr, hline, vline, ctlWord);
|
||||
if (__r != 0) throw new NcResultException("ncplane_perimeter", __r);
|
||||
}
|
||||
public void PerimeterDouble(ushort stylemask, ulong channels, uint ctlWord)
|
||||
{
|
||||
var __r = global::Brutal.NotCursesApi.NotCurses.PInvoke.ncplane_perimeter_double(this, stylemask, channels, ctlWord);
|
||||
if (__r != 0) throw new NcResultException("ncplane_perimeter_double", __r);
|
||||
}
|
||||
public void PerimeterRounded(ushort stylemask, ulong channels, uint ctlWord)
|
||||
{
|
||||
var __r = global::Brutal.NotCursesApi.NotCurses.PInvoke.ncplane_perimeter_rounded(this, stylemask, channels, ctlWord);
|
||||
if (__r != 0) throw new NcResultException("ncplane_perimeter_rounded", __r);
|
||||
}
|
||||
public void PixelGeom(Ptr<uint> pxY, Ptr<uint> pxX, Ptr<uint> cellDimY, Ptr<uint> cellDimX, Ptr<uint> maxBmapY, Ptr<uint> maxBmapX)
|
||||
=> global::Brutal.NotCursesApi.NotCurses.PInvoke.ncplane_pixel_geom(this, pxY, pxX, cellDimY, cellDimX, maxBmapY, maxBmapX);
|
||||
public void PixelGeom(out uint2 px, out uint2 cellDim, out uint2 maxBmap)
|
||||
{
|
||||
uint pxY = default;
|
||||
uint pxX = default;
|
||||
uint cellDimY = default;
|
||||
uint cellDimX = default;
|
||||
uint maxBmapY = default;
|
||||
uint maxBmapX = default;
|
||||
global::Brutal.NotCursesApi.NotCurses.PInvoke.ncplane_pixel_geom(this, new Ptr<uint>(&pxY), new Ptr<uint>(&pxX), new Ptr<uint>(&cellDimY), new Ptr<uint>(&cellDimX), new Ptr<uint>(&maxBmapY), new Ptr<uint>(&maxBmapX));
|
||||
px = new uint2(pxX, pxY);
|
||||
cellDim = new uint2(cellDimX, cellDimY);
|
||||
maxBmap = new uint2(maxBmapX, maxBmapY);
|
||||
}
|
||||
public NcCell Polyfill(int2 xy)
|
||||
{
|
||||
NcCell c = default;
|
||||
var __r = global::Brutal.NotCursesApi.NotCurses.PInvoke.ncplane_polyfill_yx(this, xy.Y, xy.X, new Ptr<NcCell>(&c));
|
||||
if (__r != 0) throw new NcResultException("ncplane_polyfill_yx", __r);
|
||||
return c;
|
||||
}
|
||||
public void Printf(RefString8 format)
|
||||
{
|
||||
var __r = global::Brutal.NotCursesApi.NotCurses.PInvoke.ncplane_printf(this, format);
|
||||
if (__r != 0) throw new NcResultException("ncplane_printf", __r);
|
||||
}
|
||||
public void PrintfAligned(int y, NcAlign align, RefString8 format)
|
||||
{
|
||||
var __r = global::Brutal.NotCursesApi.NotCurses.PInvoke.ncplane_printf_aligned(this, y, align, format);
|
||||
if (__r != 0) throw new NcResultException("ncplane_printf_aligned", __r);
|
||||
}
|
||||
public void PrintfStained(RefString8 format)
|
||||
{
|
||||
var __r = global::Brutal.NotCursesApi.NotCurses.PInvoke.ncplane_printf_stained(this, format);
|
||||
if (__r != 0) throw new NcResultException("ncplane_printf_stained", __r);
|
||||
}
|
||||
public void Printf(int2 xy, RefString8 format)
|
||||
{
|
||||
var __r = global::Brutal.NotCursesApi.NotCurses.PInvoke.ncplane_printf_yx(this, xy.Y, xy.X, format);
|
||||
if (__r != 0) throw new NcResultException("ncplane_printf_yx", __r);
|
||||
}
|
||||
public void Pulse(Ptr<TimeSpec> ts, delegate* unmanaged[Cdecl]<NotCursesHandle, NcPlaneHandle, Ptr<TimeSpec>, Ptr, int> fader, Ptr currY)
|
||||
{
|
||||
var __r = global::Brutal.NotCursesApi.NotCurses.PInvoke.ncplane_pulse(this, ts, fader, currY);
|
||||
if (__r != 0) throw new NcResultException("ncplane_pulse", __r);
|
||||
}
|
||||
public int Putc(Ptr<NcCell> c)
|
||||
{
|
||||
var __r = global::Brutal.NotCursesApi.NotCurses.PInvoke.ncplane_putc(this, c);
|
||||
if (__r < 0) throw new NcResultException("ncplane_putc", __r);
|
||||
return __r;
|
||||
}
|
||||
public int Putc(out NcCell c)
|
||||
{
|
||||
c = default;
|
||||
fixed (NcCell* cPtr = &c)
|
||||
{
|
||||
var __r = global::Brutal.NotCursesApi.NotCurses.PInvoke.ncplane_putc(this, new Ptr<NcCell>(cPtr));
|
||||
if (__r < 0) throw new NcResultException("ncplane_putc", __r);
|
||||
return __r;
|
||||
}
|
||||
}
|
||||
public int Putc(int2 xy, Ptr<NcCell> c)
|
||||
{
|
||||
var __r = global::Brutal.NotCursesApi.NotCurses.PInvoke.ncplane_putc_yx(this, xy.Y, xy.X, c);
|
||||
if (__r < 0) throw new NcResultException("ncplane_putc_yx", __r);
|
||||
return __r;
|
||||
}
|
||||
public int PutcYx(int y, int x, out NcCell c)
|
||||
{
|
||||
c = default;
|
||||
fixed (NcCell* cPtr = &c)
|
||||
{
|
||||
var __r = global::Brutal.NotCursesApi.NotCurses.PInvoke.ncplane_putc_yx(this, y, x, new Ptr<NcCell>(cPtr));
|
||||
if (__r < 0) throw new NcResultException("ncplane_putc_yx", __r);
|
||||
return __r;
|
||||
}
|
||||
}
|
||||
public int PutChar(byte c)
|
||||
{
|
||||
var __r = global::Brutal.NotCursesApi.NotCurses.PInvoke.ncplane_putchar(this, c);
|
||||
if (__r < 0) throw new NcResultException("ncplane_putchar", __r);
|
||||
return __r;
|
||||
}
|
||||
public int PutCharStained(byte c)
|
||||
{
|
||||
var __r = global::Brutal.NotCursesApi.NotCurses.PInvoke.ncplane_putchar_stained(this, c);
|
||||
if (__r < 0) throw new NcResultException("ncplane_putchar_stained", __r);
|
||||
return __r;
|
||||
}
|
||||
public int PutChar(int2 xy, byte c)
|
||||
{
|
||||
var __r = global::Brutal.NotCursesApi.NotCurses.PInvoke.ncplane_putchar_yx(this, xy.Y, xy.X, c);
|
||||
if (__r < 0) throw new NcResultException("ncplane_putchar_yx", __r);
|
||||
return __r;
|
||||
}
|
||||
public int PutEgc(RefString8 gclust, Ptr<ByteSize64> sBytes)
|
||||
{
|
||||
var __r = global::Brutal.NotCursesApi.NotCurses.PInvoke.ncplane_putegc(this, gclust, sBytes);
|
||||
if (__r < 0) throw new NcResultException("ncplane_putegc", __r);
|
||||
return __r;
|
||||
}
|
||||
public int PutEgc(RefString8 gclust, out ByteSize64 sBytes)
|
||||
{
|
||||
sBytes = default;
|
||||
fixed (ByteSize64* sBytesPtr = &sBytes)
|
||||
{
|
||||
var __r = global::Brutal.NotCursesApi.NotCurses.PInvoke.ncplane_putegc(this, gclust, new Ptr<ByteSize64>(sBytesPtr));
|
||||
if (__r < 0) throw new NcResultException("ncplane_putegc", __r);
|
||||
return __r;
|
||||
}
|
||||
}
|
||||
public int PutEgcStained(RefString8 gclust, Ptr<ByteSize64> sBytes)
|
||||
{
|
||||
var __r = global::Brutal.NotCursesApi.NotCurses.PInvoke.ncplane_putegc_stained(this, gclust, sBytes);
|
||||
if (__r < 0) throw new NcResultException("ncplane_putegc_stained", __r);
|
||||
return __r;
|
||||
}
|
||||
public int PutEgcStained(RefString8 gclust, out ByteSize64 sBytes)
|
||||
{
|
||||
sBytes = default;
|
||||
fixed (ByteSize64* sBytesPtr = &sBytes)
|
||||
{
|
||||
var __r = global::Brutal.NotCursesApi.NotCurses.PInvoke.ncplane_putegc_stained(this, gclust, new Ptr<ByteSize64>(sBytesPtr));
|
||||
if (__r < 0) throw new NcResultException("ncplane_putegc_stained", __r);
|
||||
return __r;
|
||||
}
|
||||
}
|
||||
public int PutEgc(int2 xy, RefString8 gclust, Ptr<ByteSize64> sBytes)
|
||||
{
|
||||
var __r = global::Brutal.NotCursesApi.NotCurses.PInvoke.ncplane_putegc_yx(this, xy.Y, xy.X, gclust, sBytes);
|
||||
if (__r < 0) throw new NcResultException("ncplane_putegc_yx", __r);
|
||||
return __r;
|
||||
}
|
||||
public int PutEgcYx(int y, int x, RefString8 gclust, out ByteSize64 sBytes)
|
||||
{
|
||||
sBytes = default;
|
||||
fixed (ByteSize64* sBytesPtr = &sBytes)
|
||||
{
|
||||
var __r = global::Brutal.NotCursesApi.NotCurses.PInvoke.ncplane_putegc_yx(this, y, x, gclust, new Ptr<ByteSize64>(sBytesPtr));
|
||||
if (__r < 0) throw new NcResultException("ncplane_putegc_yx", __r);
|
||||
return __r;
|
||||
}
|
||||
}
|
||||
public int PutNStr(ByteSize64 s, RefString8 gclustarr)
|
||||
{
|
||||
var __r = global::Brutal.NotCursesApi.NotCurses.PInvoke.ncplane_putnstr(this, s, gclustarr);
|
||||
if (__r < 0) throw new NcResultException("ncplane_putnstr", __r);
|
||||
return __r;
|
||||
}
|
||||
public int PutNStrAligned(int y, NcAlign align, ByteSize64 s, RefString8 str)
|
||||
{
|
||||
var __r = global::Brutal.NotCursesApi.NotCurses.PInvoke.ncplane_putnstr_aligned(this, y, align, s, str);
|
||||
if (__r < 0) throw new NcResultException("ncplane_putnstr_aligned", __r);
|
||||
return __r;
|
||||
}
|
||||
public int PutNStr(int2 xy, ByteSize64 s, RefString8 gclusters)
|
||||
{
|
||||
var __r = global::Brutal.NotCursesApi.NotCurses.PInvoke.ncplane_putnstr_yx(this, xy.Y, xy.X, s, gclusters);
|
||||
if (__r < 0) throw new NcResultException("ncplane_putnstr_yx", __r);
|
||||
return __r;
|
||||
}
|
||||
public int PutStr(RefString8 gclustarr)
|
||||
{
|
||||
var __r = global::Brutal.NotCursesApi.NotCurses.PInvoke.ncplane_putstr(this, gclustarr);
|
||||
if (__r < 0) throw new NcResultException("ncplane_putstr", __r);
|
||||
return __r;
|
||||
}
|
||||
public int PutStrAligned(int y, NcAlign align, RefString8 s)
|
||||
{
|
||||
var __r = global::Brutal.NotCursesApi.NotCurses.PInvoke.ncplane_putstr_aligned(this, y, align, s);
|
||||
if (__r < 0) throw new NcResultException("ncplane_putstr_aligned", __r);
|
||||
return __r;
|
||||
}
|
||||
public int PutStrStained(RefString8 gclusters)
|
||||
{
|
||||
var __r = global::Brutal.NotCursesApi.NotCurses.PInvoke.ncplane_putstr_stained(this, gclusters);
|
||||
if (__r < 0) throw new NcResultException("ncplane_putstr_stained", __r);
|
||||
return __r;
|
||||
}
|
||||
public int PutStr(int2 xy, RefString8 gclusters)
|
||||
{
|
||||
var __r = global::Brutal.NotCursesApi.NotCurses.PInvoke.ncplane_putstr_yx(this, xy.Y, xy.X, gclusters);
|
||||
if (__r < 0) throw new NcResultException("ncplane_putstr_yx", __r);
|
||||
return __r;
|
||||
}
|
||||
public int PutText(int y, NcAlign align, RefString8 text, Ptr<ByteSize64> bytes)
|
||||
{
|
||||
var __r = global::Brutal.NotCursesApi.NotCurses.PInvoke.ncplane_puttext(this, y, align, text, bytes);
|
||||
if (__r < 0) throw new NcResultException("ncplane_puttext", __r);
|
||||
return __r;
|
||||
}
|
||||
public int PutText(int y, NcAlign align, RefString8 text, out ByteSize64 bytes)
|
||||
{
|
||||
bytes = default;
|
||||
fixed (ByteSize64* bytesPtr = &bytes)
|
||||
{
|
||||
var __r = global::Brutal.NotCursesApi.NotCurses.PInvoke.ncplane_puttext(this, y, align, text, new Ptr<ByteSize64>(bytesPtr));
|
||||
if (__r < 0) throw new NcResultException("ncplane_puttext", __r);
|
||||
return __r;
|
||||
}
|
||||
}
|
||||
public int PutUtf32(int2 xy, uint u)
|
||||
{
|
||||
var __r = global::Brutal.NotCursesApi.NotCurses.PInvoke.ncplane_pututf32_yx(this, xy.Y, xy.X, u);
|
||||
if (__r < 0) throw new NcResultException("ncplane_pututf32_yx", __r);
|
||||
return __r;
|
||||
}
|
||||
public void QrCode(Ptr<uint> yMaX, Ptr<uint> xMaX, Ptr data, ByteSize64 len)
|
||||
{
|
||||
var __r = global::Brutal.NotCursesApi.NotCurses.PInvoke.ncplane_qrcode(this, yMaX, xMaX, data, len);
|
||||
if (__r != 0) throw new NcResultException("ncplane_qrcode", __r);
|
||||
}
|
||||
public NcPlaneHandle Reparent(NcPlaneHandle newparent)
|
||||
=> global::Brutal.NotCursesApi.NotCurses.PInvoke.ncplane_reparent(this, newparent);
|
||||
public NcPlaneHandle ReparentFamily(NcPlaneHandle newparent)
|
||||
=> global::Brutal.NotCursesApi.NotCurses.PInvoke.ncplane_reparent_family(this, newparent);
|
||||
public void Resize(int2 keep, uint2 keepLen, int2 off, uint2 len)
|
||||
{
|
||||
var __r = global::Brutal.NotCursesApi.NotCurses.PInvoke.ncplane_resize(this, keep.Y, keep.X, keepLen.Y, keepLen.X, off.Y, off.X, len.Y, len.X);
|
||||
if (__r != 0) throw new NcResultException("ncplane_resize", __r);
|
||||
}
|
||||
public void ResizeMarginalized()
|
||||
{
|
||||
var __r = global::Brutal.NotCursesApi.NotCurses.PInvoke.ncplane_resize_marginalized(this);
|
||||
if (__r != 0) throw new NcResultException("ncplane_resize_marginalized", __r);
|
||||
}
|
||||
public void ResizeMaximize()
|
||||
{
|
||||
var __r = global::Brutal.NotCursesApi.NotCurses.PInvoke.ncplane_resize_maximize(this);
|
||||
if (__r != 0) throw new NcResultException("ncplane_resize_maximize", __r);
|
||||
}
|
||||
public void ResizePlacewithin()
|
||||
{
|
||||
var __r = global::Brutal.NotCursesApi.NotCurses.PInvoke.ncplane_resize_placewithin(this);
|
||||
if (__r != 0) throw new NcResultException("ncplane_resize_placewithin", __r);
|
||||
}
|
||||
public void ResizeRealign()
|
||||
{
|
||||
var __r = global::Brutal.NotCursesApi.NotCurses.PInvoke.ncplane_resize_realign(this);
|
||||
if (__r != 0) throw new NcResultException("ncplane_resize_realign", __r);
|
||||
}
|
||||
public void ResizeSimple(uint2 len)
|
||||
{
|
||||
var __r = global::Brutal.NotCursesApi.NotCurses.PInvoke.ncplane_resize_simple(this, len.Y, len.X);
|
||||
if (__r != 0) throw new NcResultException("ncplane_resize_simple", __r);
|
||||
}
|
||||
public delegate* unmanaged[Cdecl]<NcPlaneHandle, NcPlaneHandle, int> ResizeCb(NcPlaneHandle n)
|
||||
=> global::Brutal.NotCursesApi.NotCurses.PInvoke.ncplane_resizecb(this, n);
|
||||
public void RotateCcw()
|
||||
{
|
||||
var __r = global::Brutal.NotCursesApi.NotCurses.PInvoke.ncplane_rotate_ccw(this);
|
||||
if (__r != 0) throw new NcResultException("ncplane_rotate_ccw", __r);
|
||||
}
|
||||
public void RotateCw()
|
||||
{
|
||||
var __r = global::Brutal.NotCursesApi.NotCurses.PInvoke.ncplane_rotate_cw(this);
|
||||
if (__r != 0) throw new NcResultException("ncplane_rotate_cw", __r);
|
||||
}
|
||||
public void RoundedBox(ushort styles, ulong channels, uint2 stop, uint ctlWord)
|
||||
{
|
||||
var __r = global::Brutal.NotCursesApi.NotCurses.PInvoke.ncplane_rounded_box(this, styles, channels, stop.Y, stop.X, ctlWord);
|
||||
if (__r != 0) throw new NcResultException("ncplane_rounded_box", __r);
|
||||
}
|
||||
public void RoundedBoxSized(ushort styles, ulong channels, uint2 len, uint ctlWord)
|
||||
{
|
||||
var __r = global::Brutal.NotCursesApi.NotCurses.PInvoke.ncplane_rounded_box_sized(this, styles, channels, len.Y, len.X, ctlWord);
|
||||
if (__r != 0) throw new NcResultException("ncplane_rounded_box_sized", __r);
|
||||
}
|
||||
public Bool8 ScrollingP()
|
||||
=> global::Brutal.NotCursesApi.NotCurses.PInvoke.ncplane_scrolling_p(this);
|
||||
public void ScrollUp(int r)
|
||||
{
|
||||
var __r = global::Brutal.NotCursesApi.NotCurses.PInvoke.ncplane_scrollup(this, r);
|
||||
if (__r != 0) throw new NcResultException("ncplane_scrollup", __r);
|
||||
}
|
||||
public void ScrollUpChild(NcPlaneHandle child)
|
||||
{
|
||||
var __r = global::Brutal.NotCursesApi.NotCurses.PInvoke.ncplane_scrollup_child(this, child);
|
||||
if (__r != 0) throw new NcResultException("ncplane_scrollup_child", __r);
|
||||
}
|
||||
public Bool8 SetAutogrow(uint growP)
|
||||
=> global::Brutal.NotCursesApi.NotCurses.PInvoke.ncplane_set_autogrow(this, growP);
|
||||
public void SetBase(RefString8 egc, ushort stylemask, ulong channels)
|
||||
{
|
||||
var __r = global::Brutal.NotCursesApi.NotCurses.PInvoke.ncplane_set_base(this, egc, stylemask, channels);
|
||||
if (__r != 0) throw new NcResultException("ncplane_set_base", __r);
|
||||
}
|
||||
public NcCell SetBaseCell()
|
||||
{
|
||||
NcCell c = default;
|
||||
var __r = global::Brutal.NotCursesApi.NotCurses.PInvoke.ncplane_set_base_cell(this, new Ptr<NcCell>(&c));
|
||||
if (__r != 0) throw new NcResultException("ncplane_set_base_cell", __r);
|
||||
return c;
|
||||
}
|
||||
public ulong SetBChannel(uint channel)
|
||||
=> global::Brutal.NotCursesApi.NotCurses.PInvoke.ncplane_set_bchannel(this, channel);
|
||||
public void SetBgAlpha(int alpha)
|
||||
{
|
||||
var __r = global::Brutal.NotCursesApi.NotCurses.PInvoke.ncplane_set_bg_alpha(this, alpha);
|
||||
if (__r != 0) throw new NcResultException("ncplane_set_bg_alpha", __r);
|
||||
}
|
||||
public void SetBgDefault()
|
||||
=> global::Brutal.NotCursesApi.NotCurses.PInvoke.ncplane_set_bg_default(this);
|
||||
public void SetBgPalindex(uint idx)
|
||||
{
|
||||
var __r = global::Brutal.NotCursesApi.NotCurses.PInvoke.ncplane_set_bg_palindex(this, idx);
|
||||
if (__r != 0) throw new NcResultException("ncplane_set_bg_palindex", __r);
|
||||
}
|
||||
public void SetBgRgb(uint channel)
|
||||
{
|
||||
var __r = global::Brutal.NotCursesApi.NotCurses.PInvoke.ncplane_set_bg_rgb(this, channel);
|
||||
if (__r != 0) throw new NcResultException("ncplane_set_bg_rgb", __r);
|
||||
}
|
||||
public void SetBgRgb8(uint r, uint g, uint b)
|
||||
{
|
||||
var __r = global::Brutal.NotCursesApi.NotCurses.PInvoke.ncplane_set_bg_rgb8(this, r, g, b);
|
||||
if (__r != 0) throw new NcResultException("ncplane_set_bg_rgb8", __r);
|
||||
}
|
||||
public void SetBgRgb8Clipped(int r, int g, int b)
|
||||
=> global::Brutal.NotCursesApi.NotCurses.PInvoke.ncplane_set_bg_rgb8_clipped(this, r, g, b);
|
||||
public void SetChannels(ulong channels)
|
||||
=> global::Brutal.NotCursesApi.NotCurses.PInvoke.ncplane_set_channels(this, channels);
|
||||
public ulong SetFChannel(uint channel)
|
||||
=> global::Brutal.NotCursesApi.NotCurses.PInvoke.ncplane_set_fchannel(this, channel);
|
||||
public void SetFgAlpha(int alpha)
|
||||
{
|
||||
var __r = global::Brutal.NotCursesApi.NotCurses.PInvoke.ncplane_set_fg_alpha(this, alpha);
|
||||
if (__r != 0) throw new NcResultException("ncplane_set_fg_alpha", __r);
|
||||
}
|
||||
public void SetFgDefault()
|
||||
=> global::Brutal.NotCursesApi.NotCurses.PInvoke.ncplane_set_fg_default(this);
|
||||
public void SetFgPalindex(uint idx)
|
||||
{
|
||||
var __r = global::Brutal.NotCursesApi.NotCurses.PInvoke.ncplane_set_fg_palindex(this, idx);
|
||||
if (__r != 0) throw new NcResultException("ncplane_set_fg_palindex", __r);
|
||||
}
|
||||
public void SetFgRgb(uint channel)
|
||||
{
|
||||
var __r = global::Brutal.NotCursesApi.NotCurses.PInvoke.ncplane_set_fg_rgb(this, channel);
|
||||
if (__r != 0) throw new NcResultException("ncplane_set_fg_rgb", __r);
|
||||
}
|
||||
public void SetFgRgb8(uint r, uint g, uint b)
|
||||
{
|
||||
var __r = global::Brutal.NotCursesApi.NotCurses.PInvoke.ncplane_set_fg_rgb8(this, r, g, b);
|
||||
if (__r != 0) throw new NcResultException("ncplane_set_fg_rgb8", __r);
|
||||
}
|
||||
public void SetFgRgb8Clipped(int r, int g, int b)
|
||||
=> global::Brutal.NotCursesApi.NotCurses.PInvoke.ncplane_set_fg_rgb8_clipped(this, r, g, b);
|
||||
public void SetName(RefString8 name)
|
||||
{
|
||||
var __r = global::Brutal.NotCursesApi.NotCurses.PInvoke.ncplane_set_name(this, name);
|
||||
if (__r != 0) throw new NcResultException("ncplane_set_name", __r);
|
||||
}
|
||||
public void SetResizeCb(delegate* unmanaged[Cdecl]<NcPlaneHandle, int> resizeCb)
|
||||
=> global::Brutal.NotCursesApi.NotCurses.PInvoke.ncplane_set_resizecb(this, resizeCb);
|
||||
public Bool8 SetScrolling(uint scrollP)
|
||||
=> global::Brutal.NotCursesApi.NotCurses.PInvoke.ncplane_set_scrolling(this, scrollP);
|
||||
public void SetStyles(uint styleBits)
|
||||
=> global::Brutal.NotCursesApi.NotCurses.PInvoke.ncplane_set_styles(this, styleBits);
|
||||
public Ptr SetUserPtr(Ptr opaque)
|
||||
=> global::Brutal.NotCursesApi.NotCurses.PInvoke.ncplane_set_userptr(this, opaque);
|
||||
public void Stain(int2 xy, uint2 len, ulong ul, ulong ur, ulong ll, ulong lr)
|
||||
{
|
||||
var __r = global::Brutal.NotCursesApi.NotCurses.PInvoke.ncplane_stain(this, xy.Y, xy.X, len.Y, len.X, ul, ur, ll, lr);
|
||||
if (__r != 0) throw new NcResultException("ncplane_stain", __r);
|
||||
}
|
||||
public ushort Styles()
|
||||
=> global::Brutal.NotCursesApi.NotCurses.PInvoke.ncplane_styles(this);
|
||||
public void Translate(NcPlaneHandle dst, Ptr<int> y, Ptr<int> x)
|
||||
=> global::Brutal.NotCursesApi.NotCurses.PInvoke.ncplane_translate(this, dst, y, x);
|
||||
public void Translate(NcPlaneHandle dst, out int2 xy)
|
||||
{
|
||||
int xyY = default;
|
||||
int xyX = default;
|
||||
global::Brutal.NotCursesApi.NotCurses.PInvoke.ncplane_translate(this, dst, new Ptr<int>(&xyY), new Ptr<int>(&xyX));
|
||||
xy = new int2(xyX, xyY);
|
||||
}
|
||||
public Bool8 TranslateAbs(Ptr<int> y, Ptr<int> x)
|
||||
=> global::Brutal.NotCursesApi.NotCurses.PInvoke.ncplane_translate_abs(this, y, x);
|
||||
public Bool8 TranslateAbs(out int2 xy)
|
||||
{
|
||||
int xyY = default;
|
||||
int xyX = default;
|
||||
var __r = global::Brutal.NotCursesApi.NotCurses.PInvoke.ncplane_translate_abs(this, new Ptr<int>(&xyY), new Ptr<int>(&xyX));
|
||||
xy = new int2(xyX, xyY);
|
||||
return __r;
|
||||
}
|
||||
public Ptr UserPtr()
|
||||
=> global::Brutal.NotCursesApi.NotCurses.PInvoke.ncplane_userptr(this);
|
||||
public void VAlign(NcAlign align, int r)
|
||||
{
|
||||
var __r = global::Brutal.NotCursesApi.NotCurses.PInvoke.ncplane_valign(this, align, r);
|
||||
if (__r != 0) throw new NcResultException("ncplane_valign", __r);
|
||||
}
|
||||
public void Vline(Ptr<NcCell> c, uint len)
|
||||
{
|
||||
var __r = global::Brutal.NotCursesApi.NotCurses.PInvoke.ncplane_vline(this, c, len);
|
||||
if (__r != 0) throw new NcResultException("ncplane_vline", __r);
|
||||
}
|
||||
public void VlineInterp(Ptr<NcCell> c, uint len, ulong c1, ulong c2)
|
||||
{
|
||||
var __r = global::Brutal.NotCursesApi.NotCurses.PInvoke.ncplane_vline_interp(this, c, len, c1, c2);
|
||||
if (__r != 0) throw new NcResultException("ncplane_vline_interp", __r);
|
||||
}
|
||||
public void VPrintf(RefString8 format, RefString8 ap)
|
||||
{
|
||||
var __r = global::Brutal.NotCursesApi.NotCurses.PInvoke.ncplane_vprintf(this, format, ap);
|
||||
if (__r != 0) throw new NcResultException("ncplane_vprintf", __r);
|
||||
}
|
||||
public void VPrintfAligned(int y, NcAlign align, RefString8 format, RefString8 ap)
|
||||
{
|
||||
var __r = global::Brutal.NotCursesApi.NotCurses.PInvoke.ncplane_vprintf_aligned(this, y, align, format, ap);
|
||||
if (__r != 0) throw new NcResultException("ncplane_vprintf_aligned", __r);
|
||||
}
|
||||
public void VPrintfStained(RefString8 format, RefString8 ap)
|
||||
{
|
||||
var __r = global::Brutal.NotCursesApi.NotCurses.PInvoke.ncplane_vprintf_stained(this, format, ap);
|
||||
if (__r != 0) throw new NcResultException("ncplane_vprintf_stained", __r);
|
||||
}
|
||||
public void VPrintf(int2 xy, RefString8 format, RefString8 ap)
|
||||
{
|
||||
var __r = global::Brutal.NotCursesApi.NotCurses.PInvoke.ncplane_vprintf_yx(this, xy.Y, xy.X, format, ap);
|
||||
if (__r != 0) throw new NcResultException("ncplane_vprintf_yx", __r);
|
||||
}
|
||||
public void X()
|
||||
{
|
||||
var __r = global::Brutal.NotCursesApi.NotCurses.PInvoke.ncplane_x(this);
|
||||
if (__r != 0) throw new NcResultException("ncplane_x", __r);
|
||||
}
|
||||
public void Y()
|
||||
{
|
||||
var __r = global::Brutal.NotCursesApi.NotCurses.PInvoke.ncplane_y(this);
|
||||
if (__r != 0) throw new NcResultException("ncplane_y", __r);
|
||||
}
|
||||
public void Yx(Ptr<int> y, Ptr<int> x)
|
||||
=> global::Brutal.NotCursesApi.NotCurses.PInvoke.ncplane_yx(this, y, x);
|
||||
public void Yx(out int2 xy)
|
||||
{
|
||||
int xyY = default;
|
||||
int xyX = default;
|
||||
global::Brutal.NotCursesApi.NotCurses.PInvoke.ncplane_yx(this, new Ptr<int>(&xyY), new Ptr<int>(&xyX));
|
||||
xy = new int2(xyX, xyY);
|
||||
}
|
||||
}
|
||||
public static unsafe partial class StringExtensions
|
||||
{
|
||||
public static void Gradient(this NcPlaneHandle self, int2 xy, uint2 len, string egc, ushort styles, ulong ul, ulong ur, ulong ll, ulong lr)
|
||||
{
|
||||
using var egcBuf = new ScratchBuffer(egc, stackalloc byte[256]);
|
||||
self.Gradient(xy, len, egcBuf.Bytes, styles, ul, ur, ll, lr);
|
||||
}
|
||||
public static void Printf(this NcPlaneHandle self, string format)
|
||||
{
|
||||
using var formatBuf = new ScratchBuffer(format, stackalloc byte[256]);
|
||||
self.Printf(formatBuf.Bytes);
|
||||
}
|
||||
public static void PrintfAligned(this NcPlaneHandle self, int y, NcAlign align, string format)
|
||||
{
|
||||
using var formatBuf = new ScratchBuffer(format, stackalloc byte[256]);
|
||||
self.PrintfAligned(y, align, formatBuf.Bytes);
|
||||
}
|
||||
public static void PrintfStained(this NcPlaneHandle self, string format)
|
||||
{
|
||||
using var formatBuf = new ScratchBuffer(format, stackalloc byte[256]);
|
||||
self.PrintfStained(formatBuf.Bytes);
|
||||
}
|
||||
public static void Printf(this NcPlaneHandle self, int2 xy, string format)
|
||||
{
|
||||
using var formatBuf = new ScratchBuffer(format, stackalloc byte[256]);
|
||||
self.Printf(xy, formatBuf.Bytes);
|
||||
}
|
||||
public static int PutEgc(this NcPlaneHandle self, string gclust, Ptr<ByteSize64> sBytes)
|
||||
{
|
||||
using var gclustBuf = new ScratchBuffer(gclust, stackalloc byte[256]);
|
||||
return self.PutEgc(gclustBuf.Bytes, sBytes);
|
||||
}
|
||||
public static int PutEgcStained(this NcPlaneHandle self, string gclust, Ptr<ByteSize64> sBytes)
|
||||
{
|
||||
using var gclustBuf = new ScratchBuffer(gclust, stackalloc byte[256]);
|
||||
return self.PutEgcStained(gclustBuf.Bytes, sBytes);
|
||||
}
|
||||
public static int PutEgc(this NcPlaneHandle self, int2 xy, string gclust, Ptr<ByteSize64> sBytes)
|
||||
{
|
||||
using var gclustBuf = new ScratchBuffer(gclust, stackalloc byte[256]);
|
||||
return self.PutEgc(xy, gclustBuf.Bytes, sBytes);
|
||||
}
|
||||
public static int PutNStr(this NcPlaneHandle self, ByteSize64 s, string gclustarr)
|
||||
{
|
||||
using var gclustarrBuf = new ScratchBuffer(gclustarr, stackalloc byte[256]);
|
||||
return self.PutNStr(s, gclustarrBuf.Bytes);
|
||||
}
|
||||
public static int PutNStrAligned(this NcPlaneHandle self, int y, NcAlign align, ByteSize64 s, string str)
|
||||
{
|
||||
using var strBuf = new ScratchBuffer(str, stackalloc byte[256]);
|
||||
return self.PutNStrAligned(y, align, s, strBuf.Bytes);
|
||||
}
|
||||
public static int PutNStr(this NcPlaneHandle self, int2 xy, ByteSize64 s, string gclusters)
|
||||
{
|
||||
using var gclustersBuf = new ScratchBuffer(gclusters, stackalloc byte[256]);
|
||||
return self.PutNStr(xy, s, gclustersBuf.Bytes);
|
||||
}
|
||||
public static int PutStr(this NcPlaneHandle self, string gclustarr)
|
||||
{
|
||||
using var gclustarrBuf = new ScratchBuffer(gclustarr, stackalloc byte[256]);
|
||||
return self.PutStr(gclustarrBuf.Bytes);
|
||||
}
|
||||
public static int PutStrAligned(this NcPlaneHandle self, int y, NcAlign align, string s)
|
||||
{
|
||||
using var sBuf = new ScratchBuffer(s, stackalloc byte[256]);
|
||||
return self.PutStrAligned(y, align, sBuf.Bytes);
|
||||
}
|
||||
public static int PutStrStained(this NcPlaneHandle self, string gclusters)
|
||||
{
|
||||
using var gclustersBuf = new ScratchBuffer(gclusters, stackalloc byte[256]);
|
||||
return self.PutStrStained(gclustersBuf.Bytes);
|
||||
}
|
||||
public static int PutStr(this NcPlaneHandle self, int2 xy, string gclusters)
|
||||
{
|
||||
using var gclustersBuf = new ScratchBuffer(gclusters, stackalloc byte[256]);
|
||||
return self.PutStr(xy, gclustersBuf.Bytes);
|
||||
}
|
||||
public static int PutText(this NcPlaneHandle self, int y, NcAlign align, string text, Ptr<ByteSize64> bytes)
|
||||
{
|
||||
using var textBuf = new ScratchBuffer(text, stackalloc byte[256]);
|
||||
return self.PutText(y, align, textBuf.Bytes, bytes);
|
||||
}
|
||||
public static void SetBase(this NcPlaneHandle self, string egc, ushort stylemask, ulong channels)
|
||||
{
|
||||
using var egcBuf = new ScratchBuffer(egc, stackalloc byte[256]);
|
||||
self.SetBase(egcBuf.Bytes, stylemask, channels);
|
||||
}
|
||||
public static void SetName(this NcPlaneHandle self, string name)
|
||||
{
|
||||
using var nameBuf = new ScratchBuffer(name, stackalloc byte[256]);
|
||||
self.SetName(nameBuf.Bytes);
|
||||
}
|
||||
public static void VPrintf(this NcPlaneHandle self, string format, string ap)
|
||||
{
|
||||
using var formatBuf = new ScratchBuffer(format, stackalloc byte[256]);
|
||||
using var apBuf = new ScratchBuffer(ap, stackalloc byte[256]);
|
||||
self.VPrintf(formatBuf.Bytes, apBuf.Bytes);
|
||||
}
|
||||
public static void VPrintfAligned(this NcPlaneHandle self, int y, NcAlign align, string format, string ap)
|
||||
{
|
||||
using var formatBuf = new ScratchBuffer(format, stackalloc byte[256]);
|
||||
using var apBuf = new ScratchBuffer(ap, stackalloc byte[256]);
|
||||
self.VPrintfAligned(y, align, formatBuf.Bytes, apBuf.Bytes);
|
||||
}
|
||||
public static void VPrintfStained(this NcPlaneHandle self, string format, string ap)
|
||||
{
|
||||
using var formatBuf = new ScratchBuffer(format, stackalloc byte[256]);
|
||||
using var apBuf = new ScratchBuffer(ap, stackalloc byte[256]);
|
||||
self.VPrintfStained(formatBuf.Bytes, apBuf.Bytes);
|
||||
}
|
||||
public static void VPrintf(this NcPlaneHandle self, int2 xy, string format, string ap)
|
||||
{
|
||||
using var formatBuf = new ScratchBuffer(format, stackalloc byte[256]);
|
||||
using var apBuf = new ScratchBuffer(ap, stackalloc byte[256]);
|
||||
self.VPrintf(xy, formatBuf.Bytes, apBuf.Bytes);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,27 @@
|
|||
using System.Runtime.InteropServices.Marshalling;
|
||||
using Brutal;
|
||||
using Brutal.Interop;
|
||||
using Brutal.Numerics;
|
||||
using Brutal.Pointers;
|
||||
using Brutal.Strings;
|
||||
namespace Brutal.NotCursesApi
|
||||
{
|
||||
[InteropHandle]
|
||||
public unsafe readonly partial struct NcProgBarHandle
|
||||
{
|
||||
}
|
||||
public unsafe readonly partial struct NcProgBarHandle
|
||||
{
|
||||
public void Destroy()
|
||||
=> global::Brutal.NotCursesApi.NotCurses.PInvoke.ncprogbar_destroy(this);
|
||||
public NcPlaneHandle Plane()
|
||||
=> global::Brutal.NotCursesApi.NotCurses.PInvoke.ncprogbar_plane(this);
|
||||
public double Progress()
|
||||
=> global::Brutal.NotCursesApi.NotCurses.PInvoke.ncprogbar_progress(this);
|
||||
public void SetProgress(double p)
|
||||
{
|
||||
var __r = global::Brutal.NotCursesApi.NotCurses.PInvoke.ncprogbar_set_progress(this, p);
|
||||
if (__r != 0) throw new NcResultException("ncprogbar_set_progress", __r);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,70 @@
|
|||
using System.Runtime.InteropServices.Marshalling;
|
||||
using Brutal;
|
||||
using Brutal.Interop;
|
||||
using Brutal.Numerics;
|
||||
using Brutal.Pointers;
|
||||
using Brutal.Strings;
|
||||
namespace Brutal.NotCursesApi
|
||||
{
|
||||
[InteropHandle]
|
||||
public unsafe readonly partial struct NcReaderHandle
|
||||
{
|
||||
}
|
||||
public unsafe readonly partial struct NcReaderHandle
|
||||
{
|
||||
public void Clear()
|
||||
{
|
||||
var __r = global::Brutal.NotCursesApi.NotCurses.PInvoke.ncreader_clear(this);
|
||||
if (__r != 0) throw new NcResultException("ncreader_clear", __r);
|
||||
}
|
||||
public string Contents()
|
||||
=> global::Brutal.NotCursesApi.NotCurses.PInvoke.ncreader_contents(this);
|
||||
public void Destroy(Ptr<Ptr<byte>> contents)
|
||||
=> global::Brutal.NotCursesApi.NotCurses.PInvoke.ncreader_destroy(this, contents);
|
||||
public void MoveDown()
|
||||
{
|
||||
var __r = global::Brutal.NotCursesApi.NotCurses.PInvoke.ncreader_move_down(this);
|
||||
if (__r != 0) throw new NcResultException("ncreader_move_down", __r);
|
||||
}
|
||||
public void MoveLeft()
|
||||
{
|
||||
var __r = global::Brutal.NotCursesApi.NotCurses.PInvoke.ncreader_move_left(this);
|
||||
if (__r != 0) throw new NcResultException("ncreader_move_left", __r);
|
||||
}
|
||||
public void MoveRight()
|
||||
{
|
||||
var __r = global::Brutal.NotCursesApi.NotCurses.PInvoke.ncreader_move_right(this);
|
||||
if (__r != 0) throw new NcResultException("ncreader_move_right", __r);
|
||||
}
|
||||
public void MoveUp()
|
||||
{
|
||||
var __r = global::Brutal.NotCursesApi.NotCurses.PInvoke.ncreader_move_up(this);
|
||||
if (__r != 0) throw new NcResultException("ncreader_move_up", __r);
|
||||
}
|
||||
public Bool8 OfferInput(Ptr<NcInput> ni)
|
||||
=> global::Brutal.NotCursesApi.NotCurses.PInvoke.ncreader_offer_input(this, ni);
|
||||
public Bool8 OfferInput(out NcInput ni)
|
||||
{
|
||||
ni = default;
|
||||
fixed (NcInput* niPtr = &ni)
|
||||
{
|
||||
return global::Brutal.NotCursesApi.NotCurses.PInvoke.ncreader_offer_input(this, new Ptr<NcInput>(niPtr));
|
||||
}
|
||||
}
|
||||
public NcPlaneHandle Plane()
|
||||
=> global::Brutal.NotCursesApi.NotCurses.PInvoke.ncreader_plane(this);
|
||||
public void WriteEgc(RefString8 egc)
|
||||
{
|
||||
var __r = global::Brutal.NotCursesApi.NotCurses.PInvoke.ncreader_write_egc(this, egc);
|
||||
if (__r != 0) throw new NcResultException("ncreader_write_egc", __r);
|
||||
}
|
||||
}
|
||||
public static unsafe partial class StringExtensions
|
||||
{
|
||||
public static void WriteEgc(this NcReaderHandle self, string egc)
|
||||
{
|
||||
using var egcBuf = new ScratchBuffer(egc, stackalloc byte[256]);
|
||||
self.WriteEgc(egcBuf.Bytes);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,53 @@
|
|||
using System.Runtime.InteropServices.Marshalling;
|
||||
using Brutal;
|
||||
using Brutal.Interop;
|
||||
using Brutal.Numerics;
|
||||
using Brutal.Pointers;
|
||||
using Brutal.Strings;
|
||||
namespace Brutal.NotCursesApi
|
||||
{
|
||||
[InteropHandle]
|
||||
public unsafe readonly partial struct NcReelHandle
|
||||
{
|
||||
}
|
||||
public unsafe readonly partial struct NcReelHandle
|
||||
{
|
||||
public NcTabletHandle Add(NcTabletHandle after, NcTabletHandle before, delegate* unmanaged[Cdecl]<NcTabletHandle, Bool8, int> cb, Ptr opaque)
|
||||
=> global::Brutal.NotCursesApi.NotCurses.PInvoke.ncreel_add(this, after, before, cb, opaque);
|
||||
public void Del(NcTabletHandle t)
|
||||
{
|
||||
var __r = global::Brutal.NotCursesApi.NotCurses.PInvoke.ncreel_del(this, t);
|
||||
if (__r != 0) throw new NcResultException("ncreel_del", __r);
|
||||
}
|
||||
public void Destroy()
|
||||
=> global::Brutal.NotCursesApi.NotCurses.PInvoke.ncreel_destroy(this);
|
||||
public NcTabletHandle Focused()
|
||||
=> global::Brutal.NotCursesApi.NotCurses.PInvoke.ncreel_focused(this);
|
||||
public NcTabletHandle Next()
|
||||
=> global::Brutal.NotCursesApi.NotCurses.PInvoke.ncreel_next(this);
|
||||
public Bool8 OfferInput(Ptr<NcInput> ni)
|
||||
=> global::Brutal.NotCursesApi.NotCurses.PInvoke.ncreel_offer_input(this, ni);
|
||||
public Bool8 OfferInput(out NcInput ni)
|
||||
{
|
||||
ni = default;
|
||||
fixed (NcInput* niPtr = &ni)
|
||||
{
|
||||
return global::Brutal.NotCursesApi.NotCurses.PInvoke.ncreel_offer_input(this, new Ptr<NcInput>(niPtr));
|
||||
}
|
||||
}
|
||||
public NcPlaneHandle Plane()
|
||||
=> global::Brutal.NotCursesApi.NotCurses.PInvoke.ncreel_plane(this);
|
||||
public NcTabletHandle Prev()
|
||||
=> global::Brutal.NotCursesApi.NotCurses.PInvoke.ncreel_prev(this);
|
||||
public void Redraw()
|
||||
{
|
||||
var __r = global::Brutal.NotCursesApi.NotCurses.PInvoke.ncreel_redraw(this);
|
||||
if (__r != 0) throw new NcResultException("ncreel_redraw", __r);
|
||||
}
|
||||
public void TabletCount()
|
||||
{
|
||||
var __r = global::Brutal.NotCursesApi.NotCurses.PInvoke.ncreel_tabletcount(this);
|
||||
if (__r != 0) throw new NcResultException("ncreel_tabletcount", __r);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,56 @@
|
|||
using System.Runtime.InteropServices.Marshalling;
|
||||
using Brutal;
|
||||
using Brutal.Interop;
|
||||
using Brutal.Numerics;
|
||||
using Brutal.Pointers;
|
||||
using Brutal.Strings;
|
||||
namespace Brutal.NotCursesApi
|
||||
{
|
||||
[InteropHandle]
|
||||
public unsafe readonly partial struct NcSelectorHandle
|
||||
{
|
||||
}
|
||||
public unsafe readonly partial struct NcSelectorHandle
|
||||
{
|
||||
public NcSelectorItem AddItem()
|
||||
{
|
||||
NcSelectorItem item = default;
|
||||
var __r = global::Brutal.NotCursesApi.NotCurses.PInvoke.ncselector_additem(this, new Ptr<NcSelectorItem>(&item));
|
||||
if (__r != 0) throw new NcResultException("ncselector_additem", __r);
|
||||
return item;
|
||||
}
|
||||
public void DelItem(RefString8 item)
|
||||
{
|
||||
var __r = global::Brutal.NotCursesApi.NotCurses.PInvoke.ncselector_delitem(this, item);
|
||||
if (__r != 0) throw new NcResultException("ncselector_delitem", __r);
|
||||
}
|
||||
public void Destroy(Ptr<Ptr<byte>> item)
|
||||
=> global::Brutal.NotCursesApi.NotCurses.PInvoke.ncselector_destroy(this, item);
|
||||
public string NextItem()
|
||||
=> global::Brutal.NotCursesApi.NotCurses.PInvoke.ncselector_nextitem(this);
|
||||
public Bool8 OfferInput(Ptr<NcInput> nc)
|
||||
=> global::Brutal.NotCursesApi.NotCurses.PInvoke.ncselector_offer_input(this, nc);
|
||||
public Bool8 OfferInput(out NcInput nc)
|
||||
{
|
||||
nc = default;
|
||||
fixed (NcInput* ncPtr = &nc)
|
||||
{
|
||||
return global::Brutal.NotCursesApi.NotCurses.PInvoke.ncselector_offer_input(this, new Ptr<NcInput>(ncPtr));
|
||||
}
|
||||
}
|
||||
public NcPlaneHandle Plane()
|
||||
=> global::Brutal.NotCursesApi.NotCurses.PInvoke.ncselector_plane(this);
|
||||
public string PrevItem()
|
||||
=> global::Brutal.NotCursesApi.NotCurses.PInvoke.ncselector_previtem(this);
|
||||
public string Selected()
|
||||
=> global::Brutal.NotCursesApi.NotCurses.PInvoke.ncselector_selected(this);
|
||||
}
|
||||
public static unsafe partial class StringExtensions
|
||||
{
|
||||
public static void DelItem(this NcSelectorHandle self, string item)
|
||||
{
|
||||
using var itemBuf = new ScratchBuffer(item, stackalloc byte[256]);
|
||||
self.DelItem(itemBuf.Bytes);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,23 @@
|
|||
using System.Runtime.InteropServices.Marshalling;
|
||||
using Brutal;
|
||||
using Brutal.Interop;
|
||||
using Brutal.Numerics;
|
||||
using Brutal.Pointers;
|
||||
using Brutal.Strings;
|
||||
namespace Brutal.NotCursesApi
|
||||
{
|
||||
[InteropHandle]
|
||||
public unsafe readonly partial struct NcSubProcHandle
|
||||
{
|
||||
}
|
||||
public unsafe readonly partial struct NcSubProcHandle
|
||||
{
|
||||
public void Destroy()
|
||||
{
|
||||
var __r = global::Brutal.NotCursesApi.NotCurses.PInvoke.ncsubproc_destroy(this);
|
||||
if (__r != 0) throw new NcResultException("ncsubproc_destroy", __r);
|
||||
}
|
||||
public NcPlaneHandle Plane()
|
||||
=> global::Brutal.NotCursesApi.NotCurses.PInvoke.ncsubproc_plane(this);
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,48 @@
|
|||
using System.Runtime.InteropServices.Marshalling;
|
||||
using Brutal;
|
||||
using Brutal.Interop;
|
||||
using Brutal.Numerics;
|
||||
using Brutal.Pointers;
|
||||
using Brutal.Strings;
|
||||
namespace Brutal.NotCursesApi
|
||||
{
|
||||
[InteropHandle]
|
||||
public unsafe readonly partial struct NcTabHandle
|
||||
{
|
||||
}
|
||||
public unsafe readonly partial struct NcTabHandle
|
||||
{
|
||||
public delegate* unmanaged[Cdecl]<NcTabHandle, NcPlaneHandle, Ptr, void> Cb()
|
||||
=> global::Brutal.NotCursesApi.NotCurses.PInvoke.nctab_cb(this);
|
||||
public string Name()
|
||||
=> global::Brutal.NotCursesApi.NotCurses.PInvoke.nctab_name(this);
|
||||
public void NameWidth()
|
||||
{
|
||||
var __r = global::Brutal.NotCursesApi.NotCurses.PInvoke.nctab_name_width(this);
|
||||
if (__r != 0) throw new NcResultException("nctab_name_width", __r);
|
||||
}
|
||||
public NcTabHandle Next()
|
||||
=> global::Brutal.NotCursesApi.NotCurses.PInvoke.nctab_next(this);
|
||||
public NcTabHandle Prev()
|
||||
=> global::Brutal.NotCursesApi.NotCurses.PInvoke.nctab_prev(this);
|
||||
public delegate* unmanaged[Cdecl]<NcTabHandle, NcPlaneHandle, Ptr, void> SetCb(delegate* unmanaged[Cdecl]<NcTabHandle, NcPlaneHandle, Ptr, void> newcb)
|
||||
=> global::Brutal.NotCursesApi.NotCurses.PInvoke.nctab_set_cb(this, newcb);
|
||||
public void SetName(RefString8 newname)
|
||||
{
|
||||
var __r = global::Brutal.NotCursesApi.NotCurses.PInvoke.nctab_set_name(this, newname);
|
||||
if (__r != 0) throw new NcResultException("nctab_set_name", __r);
|
||||
}
|
||||
public Ptr SetUserPtr(Ptr newopaque)
|
||||
=> global::Brutal.NotCursesApi.NotCurses.PInvoke.nctab_set_userptr(this, newopaque);
|
||||
public Ptr UserPtr()
|
||||
=> global::Brutal.NotCursesApi.NotCurses.PInvoke.nctab_userptr(this);
|
||||
}
|
||||
public static unsafe partial class StringExtensions
|
||||
{
|
||||
public static void SetName(this NcTabHandle self, string newname)
|
||||
{
|
||||
using var newnameBuf = new ScratchBuffer(newname, stackalloc byte[256]);
|
||||
self.SetName(newnameBuf.Bytes);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,105 @@
|
|||
using System.Runtime.InteropServices.Marshalling;
|
||||
using Brutal;
|
||||
using Brutal.Interop;
|
||||
using Brutal.Numerics;
|
||||
using Brutal.Pointers;
|
||||
using Brutal.Strings;
|
||||
namespace Brutal.NotCursesApi
|
||||
{
|
||||
[InteropHandle]
|
||||
public unsafe readonly partial struct NcTabbedHandle
|
||||
{
|
||||
}
|
||||
public unsafe readonly partial struct NcTabbedHandle
|
||||
{
|
||||
public NcTabHandle Add(NcTabHandle after, NcTabHandle before, delegate* unmanaged[Cdecl]<NcTabHandle, NcPlaneHandle, Ptr, void> tcb, RefString8 name, Ptr opaque)
|
||||
=> global::Brutal.NotCursesApi.NotCurses.PInvoke.nctabbed_add(this, after, before, tcb, name, opaque);
|
||||
public void Channels(Ptr<ulong> hdrChan, Ptr<ulong> selChan, Ptr<ulong> sepChan)
|
||||
=> global::Brutal.NotCursesApi.NotCurses.PInvoke.nctabbed_channels(this, hdrChan, selChan, sepChan);
|
||||
public void Channels(out ulong hdrChan, out ulong selChan, out ulong sepChan)
|
||||
{
|
||||
hdrChan = default;
|
||||
selChan = default;
|
||||
sepChan = default;
|
||||
fixed (ulong* hdrChanPtr = &hdrChan)
|
||||
{
|
||||
fixed (ulong* selChanPtr = &selChan)
|
||||
{
|
||||
fixed (ulong* sepChanPtr = &sepChan)
|
||||
{
|
||||
global::Brutal.NotCursesApi.NotCurses.PInvoke.nctabbed_channels(this, new Ptr<ulong>(hdrChanPtr), new Ptr<ulong>(selChanPtr), new Ptr<ulong>(sepChanPtr));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
public NcPlaneHandle ContentPlane()
|
||||
=> global::Brutal.NotCursesApi.NotCurses.PInvoke.nctabbed_content_plane(this);
|
||||
public void Del(NcTabHandle t)
|
||||
{
|
||||
var __r = global::Brutal.NotCursesApi.NotCurses.PInvoke.nctabbed_del(this, t);
|
||||
if (__r != 0) throw new NcResultException("nctabbed_del", __r);
|
||||
}
|
||||
public void Destroy()
|
||||
=> global::Brutal.NotCursesApi.NotCurses.PInvoke.nctabbed_destroy(this);
|
||||
public void EnsureSelectedHeaderVisible()
|
||||
=> global::Brutal.NotCursesApi.NotCurses.PInvoke.nctabbed_ensure_selected_header_visible(this);
|
||||
public ulong HdrChan()
|
||||
=> global::Brutal.NotCursesApi.NotCurses.PInvoke.nctabbed_hdrchan(this);
|
||||
public NcTabHandle Leftmost()
|
||||
=> global::Brutal.NotCursesApi.NotCurses.PInvoke.nctabbed_leftmost(this);
|
||||
public NcTabHandle Next()
|
||||
=> global::Brutal.NotCursesApi.NotCurses.PInvoke.nctabbed_next(this);
|
||||
public NcPlaneHandle Plane()
|
||||
=> global::Brutal.NotCursesApi.NotCurses.PInvoke.nctabbed_plane(this);
|
||||
public NcTabHandle Prev()
|
||||
=> global::Brutal.NotCursesApi.NotCurses.PInvoke.nctabbed_prev(this);
|
||||
public void Redraw()
|
||||
=> global::Brutal.NotCursesApi.NotCurses.PInvoke.nctabbed_redraw(this);
|
||||
public void Rotate(int amt)
|
||||
=> global::Brutal.NotCursesApi.NotCurses.PInvoke.nctabbed_rotate(this, amt);
|
||||
public ulong SelChan()
|
||||
=> global::Brutal.NotCursesApi.NotCurses.PInvoke.nctabbed_selchan(this);
|
||||
public NcTabHandle Select(NcTabHandle t)
|
||||
=> global::Brutal.NotCursesApi.NotCurses.PInvoke.nctabbed_select(this, t);
|
||||
public NcTabHandle Selected()
|
||||
=> global::Brutal.NotCursesApi.NotCurses.PInvoke.nctabbed_selected(this);
|
||||
public string Separator()
|
||||
=> global::Brutal.NotCursesApi.NotCurses.PInvoke.nctabbed_separator(this);
|
||||
public void SeparatorWidth()
|
||||
{
|
||||
var __r = global::Brutal.NotCursesApi.NotCurses.PInvoke.nctabbed_separator_width(this);
|
||||
if (__r != 0) throw new NcResultException("nctabbed_separator_width", __r);
|
||||
}
|
||||
public ulong SepChan()
|
||||
=> global::Brutal.NotCursesApi.NotCurses.PInvoke.nctabbed_sepchan(this);
|
||||
public void SetHdrChan(ulong chan)
|
||||
=> global::Brutal.NotCursesApi.NotCurses.PInvoke.nctabbed_set_hdrchan(this, chan);
|
||||
public void SetSelChan(ulong chan)
|
||||
=> global::Brutal.NotCursesApi.NotCurses.PInvoke.nctabbed_set_selchan(this, chan);
|
||||
public void SetSeparator(RefString8 separator)
|
||||
{
|
||||
var __r = global::Brutal.NotCursesApi.NotCurses.PInvoke.nctabbed_set_separator(this, separator);
|
||||
if (__r != 0) throw new NcResultException("nctabbed_set_separator", __r);
|
||||
}
|
||||
public void SetSepChan(ulong chan)
|
||||
=> global::Brutal.NotCursesApi.NotCurses.PInvoke.nctabbed_set_sepchan(this, chan);
|
||||
public void TabCount()
|
||||
{
|
||||
var __r = global::Brutal.NotCursesApi.NotCurses.PInvoke.nctabbed_tabcount(this);
|
||||
if (__r != 0) throw new NcResultException("nctabbed_tabcount", __r);
|
||||
}
|
||||
}
|
||||
public static unsafe partial class StringExtensions
|
||||
{
|
||||
public static NcTabHandle Add(this NcTabbedHandle self, NcTabHandle after, NcTabHandle before, delegate* unmanaged[Cdecl]<NcTabHandle, NcPlaneHandle, Ptr, void> tcb, string name, Ptr opaque)
|
||||
{
|
||||
using var nameBuf = new ScratchBuffer(name, stackalloc byte[256]);
|
||||
return self.Add(after, before, tcb, nameBuf.Bytes, opaque);
|
||||
}
|
||||
public static void SetSeparator(this NcTabbedHandle self, string separator)
|
||||
{
|
||||
using var separatorBuf = new ScratchBuffer(separator, stackalloc byte[256]);
|
||||
self.SetSeparator(separatorBuf.Bytes);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,20 @@
|
|||
using System.Runtime.InteropServices.Marshalling;
|
||||
using Brutal;
|
||||
using Brutal.Interop;
|
||||
using Brutal.Numerics;
|
||||
using Brutal.Pointers;
|
||||
using Brutal.Strings;
|
||||
namespace Brutal.NotCursesApi
|
||||
{
|
||||
[InteropHandle]
|
||||
public unsafe readonly partial struct NcTabletHandle
|
||||
{
|
||||
}
|
||||
public unsafe readonly partial struct NcTabletHandle
|
||||
{
|
||||
public NcPlaneHandle Plane()
|
||||
=> global::Brutal.NotCursesApi.NotCurses.PInvoke.nctablet_plane(this);
|
||||
public Ptr UserPtr()
|
||||
=> global::Brutal.NotCursesApi.NotCurses.PInvoke.nctablet_userptr(this);
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,80 @@
|
|||
using System.Runtime.InteropServices.Marshalling;
|
||||
using Brutal;
|
||||
using Brutal.Interop;
|
||||
using Brutal.Numerics;
|
||||
using Brutal.Pointers;
|
||||
using Brutal.Strings;
|
||||
namespace Brutal.NotCursesApi
|
||||
{
|
||||
[InteropHandle]
|
||||
public unsafe readonly partial struct NcTreeHandle
|
||||
{
|
||||
}
|
||||
public unsafe readonly partial struct NcTreeHandle
|
||||
{
|
||||
public void Add(Ptr<uint> spec, Ptr<NcTreeItem> add)
|
||||
{
|
||||
var __r = global::Brutal.NotCursesApi.NotCurses.PInvoke.nctree_add(this, spec, add);
|
||||
if (__r != 0) throw new NcResultException("nctree_add", __r);
|
||||
}
|
||||
public void Add(out uint spec, out NcTreeItem add)
|
||||
{
|
||||
spec = default;
|
||||
add = default;
|
||||
fixed (uint* specPtr = &spec)
|
||||
{
|
||||
fixed (NcTreeItem* addPtr = &add)
|
||||
{
|
||||
var __r = global::Brutal.NotCursesApi.NotCurses.PInvoke.nctree_add(this, new Ptr<uint>(specPtr), new Ptr<NcTreeItem>(addPtr));
|
||||
if (__r != 0) throw new NcResultException("nctree_add", __r);
|
||||
}
|
||||
}
|
||||
}
|
||||
public uint Del()
|
||||
{
|
||||
uint spec = default;
|
||||
var __r = global::Brutal.NotCursesApi.NotCurses.PInvoke.nctree_del(this, new Ptr<uint>(&spec));
|
||||
if (__r != 0) throw new NcResultException("nctree_del", __r);
|
||||
return spec;
|
||||
}
|
||||
public void Destroy()
|
||||
=> global::Brutal.NotCursesApi.NotCurses.PInvoke.nctree_destroy(this);
|
||||
public Ptr Focused()
|
||||
=> global::Brutal.NotCursesApi.NotCurses.PInvoke.nctree_focused(this);
|
||||
public Ptr Goto(Ptr<uint> spec, Ptr<int> failSpec)
|
||||
=> global::Brutal.NotCursesApi.NotCurses.PInvoke.nctree_goto(this, spec, failSpec);
|
||||
public Ptr Goto(out uint spec, out int failSpec)
|
||||
{
|
||||
spec = default;
|
||||
failSpec = default;
|
||||
fixed (uint* specPtr = &spec)
|
||||
{
|
||||
fixed (int* failSpecPtr = &failSpec)
|
||||
{
|
||||
return global::Brutal.NotCursesApi.NotCurses.PInvoke.nctree_goto(this, new Ptr<uint>(specPtr), new Ptr<int>(failSpecPtr));
|
||||
}
|
||||
}
|
||||
}
|
||||
public Ptr Next()
|
||||
=> global::Brutal.NotCursesApi.NotCurses.PInvoke.nctree_next(this);
|
||||
public Bool8 OfferInput(Ptr<NcInput> ni)
|
||||
=> global::Brutal.NotCursesApi.NotCurses.PInvoke.nctree_offer_input(this, ni);
|
||||
public Bool8 OfferInput(out NcInput ni)
|
||||
{
|
||||
ni = default;
|
||||
fixed (NcInput* niPtr = &ni)
|
||||
{
|
||||
return global::Brutal.NotCursesApi.NotCurses.PInvoke.nctree_offer_input(this, new Ptr<NcInput>(niPtr));
|
||||
}
|
||||
}
|
||||
public NcPlaneHandle Plane()
|
||||
=> global::Brutal.NotCursesApi.NotCurses.PInvoke.nctree_plane(this);
|
||||
public Ptr Prev()
|
||||
=> global::Brutal.NotCursesApi.NotCurses.PInvoke.nctree_prev(this);
|
||||
public void Redraw()
|
||||
{
|
||||
var __r = global::Brutal.NotCursesApi.NotCurses.PInvoke.nctree_redraw(this);
|
||||
if (__r != 0) throw new NcResultException("nctree_redraw", __r);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,37 @@
|
|||
using System.Runtime.InteropServices.Marshalling;
|
||||
using Brutal;
|
||||
using Brutal.Interop;
|
||||
using Brutal.Numerics;
|
||||
using Brutal.Pointers;
|
||||
using Brutal.Strings;
|
||||
namespace Brutal.NotCursesApi
|
||||
{
|
||||
[InteropHandle]
|
||||
public unsafe readonly partial struct NcUPlotHandle
|
||||
{
|
||||
}
|
||||
public unsafe readonly partial struct NcUPlotHandle
|
||||
{
|
||||
public void AddSample(ulong x, ulong y)
|
||||
{
|
||||
var __r = global::Brutal.NotCursesApi.NotCurses.PInvoke.ncuplot_add_sample(this, x, y);
|
||||
if (__r != 0) throw new NcResultException("ncuplot_add_sample", __r);
|
||||
}
|
||||
public void Destroy()
|
||||
=> global::Brutal.NotCursesApi.NotCurses.PInvoke.ncuplot_destroy(this);
|
||||
public NcPlaneHandle Plane()
|
||||
=> global::Brutal.NotCursesApi.NotCurses.PInvoke.ncuplot_plane(this);
|
||||
public ulong Sample(ulong x)
|
||||
{
|
||||
ulong y = default;
|
||||
var __r = global::Brutal.NotCursesApi.NotCurses.PInvoke.ncuplot_sample(this, x, new Ptr<ulong>(&y));
|
||||
if (__r != 0) throw new NcResultException("ncuplot_sample", __r);
|
||||
return y;
|
||||
}
|
||||
public void SetSample(ulong x, ulong y)
|
||||
{
|
||||
var __r = global::Brutal.NotCursesApi.NotCurses.PInvoke.ncuplot_set_sample(this, x, y);
|
||||
if (__r != 0) throw new NcResultException("ncuplot_set_sample", __r);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,67 @@
|
|||
using System.Runtime.InteropServices.Marshalling;
|
||||
using Brutal;
|
||||
using Brutal.Interop;
|
||||
using Brutal.Numerics;
|
||||
using Brutal.Pointers;
|
||||
using Brutal.Strings;
|
||||
namespace Brutal.NotCursesApi
|
||||
{
|
||||
[InteropHandle]
|
||||
public unsafe readonly partial struct NcVisualHandle
|
||||
{
|
||||
}
|
||||
public unsafe readonly partial struct NcVisualHandle
|
||||
{
|
||||
public void Free()
|
||||
=> global::Brutal.NotCursesApi.NotCurses.PInvoke.ncdirectf_free(this);
|
||||
public uint At(uint2 xy)
|
||||
{
|
||||
uint pixel = default;
|
||||
var __r = global::Brutal.NotCursesApi.NotCurses.PInvoke.ncvisual_at_yx(this, xy.Y, xy.X, new Ptr<uint>(&pixel));
|
||||
if (__r != 0) throw new NcResultException("ncvisual_at_yx", __r);
|
||||
return pixel;
|
||||
}
|
||||
public void Decode()
|
||||
{
|
||||
var __r = global::Brutal.NotCursesApi.NotCurses.PInvoke.ncvisual_decode(this);
|
||||
if (__r != 0) throw new NcResultException("ncvisual_decode", __r);
|
||||
}
|
||||
public void DecodeLoop()
|
||||
{
|
||||
var __r = global::Brutal.NotCursesApi.NotCurses.PInvoke.ncvisual_decode_loop(this);
|
||||
if (__r != 0) throw new NcResultException("ncvisual_decode_loop", __r);
|
||||
}
|
||||
public void Destroy()
|
||||
=> global::Brutal.NotCursesApi.NotCurses.PInvoke.ncvisual_destroy(this);
|
||||
public void Polyfill(uint2 xy, uint rgba)
|
||||
{
|
||||
var __r = global::Brutal.NotCursesApi.NotCurses.PInvoke.ncvisual_polyfill_yx(this, xy.Y, xy.X, rgba);
|
||||
if (__r != 0) throw new NcResultException("ncvisual_polyfill_yx", __r);
|
||||
}
|
||||
public void Resize(int rows, int cols)
|
||||
{
|
||||
var __r = global::Brutal.NotCursesApi.NotCurses.PInvoke.ncvisual_resize(this, rows, cols);
|
||||
if (__r != 0) throw new NcResultException("ncvisual_resize", __r);
|
||||
}
|
||||
public void ResizeNoninterpolative(int rows, int cols)
|
||||
{
|
||||
var __r = global::Brutal.NotCursesApi.NotCurses.PInvoke.ncvisual_resize_noninterpolative(this, rows, cols);
|
||||
if (__r != 0) throw new NcResultException("ncvisual_resize_noninterpolative", __r);
|
||||
}
|
||||
public void Rotate(double rads)
|
||||
{
|
||||
var __r = global::Brutal.NotCursesApi.NotCurses.PInvoke.ncvisual_rotate(this, rads);
|
||||
if (__r != 0) throw new NcResultException("ncvisual_rotate", __r);
|
||||
}
|
||||
public void Set(uint2 xy, uint pixel)
|
||||
{
|
||||
var __r = global::Brutal.NotCursesApi.NotCurses.PInvoke.ncvisual_set_yx(this, xy.Y, xy.X, pixel);
|
||||
if (__r != 0) throw new NcResultException("ncvisual_set_yx", __r);
|
||||
}
|
||||
public void SimpleStreamer(Ptr<NcVisualOptions> vopts, Ptr<TimeSpec> tspec, Ptr currY)
|
||||
{
|
||||
var __r = global::Brutal.NotCursesApi.NotCurses.PInvoke.ncvisual_simple_streamer(this, vopts, tspec, currY);
|
||||
if (__r != 0) throw new NcResultException("ncvisual_simple_streamer", __r);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,266 @@
|
|||
using System.Runtime.InteropServices.Marshalling;
|
||||
using Brutal;
|
||||
using Brutal.Interop;
|
||||
using Brutal.Numerics;
|
||||
using Brutal.Pointers;
|
||||
using Brutal.Strings;
|
||||
namespace Brutal.NotCursesApi
|
||||
{
|
||||
[InteropHandle]
|
||||
public unsafe readonly partial struct NotCursesHandle
|
||||
{
|
||||
}
|
||||
public unsafe readonly partial struct NotCursesHandle
|
||||
{
|
||||
public string At(uint2 off, Ptr<ushort> stylemask, Ptr<ulong> channels)
|
||||
=> global::Brutal.NotCursesApi.NotCurses.PInvoke.notcurses_at_yx(this, off.Y, off.X, stylemask, channels);
|
||||
public string AtYx(uint yOff, uint xOff, out ushort stylemask, out ulong channels)
|
||||
{
|
||||
stylemask = default;
|
||||
channels = default;
|
||||
fixed (ushort* stylemaskPtr = &stylemask)
|
||||
{
|
||||
fixed (ulong* channelsPtr = &channels)
|
||||
{
|
||||
return global::Brutal.NotCursesApi.NotCurses.PInvoke.notcurses_at_yx(this, yOff, xOff, new Ptr<ushort>(stylemaskPtr), new Ptr<ulong>(channelsPtr));
|
||||
}
|
||||
}
|
||||
}
|
||||
public NcPlaneHandle Bottom()
|
||||
=> global::Brutal.NotCursesApi.NotCurses.PInvoke.notcurses_bottom(this);
|
||||
public Bool8 CanBraille()
|
||||
=> global::Brutal.NotCursesApi.NotCurses.PInvoke.notcurses_canbraille(this);
|
||||
public Bool8 CanChangeColor()
|
||||
=> global::Brutal.NotCursesApi.NotCurses.PInvoke.notcurses_canchangecolor(this);
|
||||
public Bool8 CanFade()
|
||||
=> global::Brutal.NotCursesApi.NotCurses.PInvoke.notcurses_canfade(this);
|
||||
public Bool8 CanHalfBlock()
|
||||
=> global::Brutal.NotCursesApi.NotCurses.PInvoke.notcurses_canhalfblock(this);
|
||||
public Bool8 CanOctant()
|
||||
=> global::Brutal.NotCursesApi.NotCurses.PInvoke.notcurses_canoctant(this);
|
||||
public Bool8 CanOpenImages()
|
||||
=> global::Brutal.NotCursesApi.NotCurses.PInvoke.notcurses_canopen_images(this);
|
||||
public Bool8 CanOpenVideos()
|
||||
=> global::Brutal.NotCursesApi.NotCurses.PInvoke.notcurses_canopen_videos(this);
|
||||
public Bool8 CanPixel()
|
||||
=> global::Brutal.NotCursesApi.NotCurses.PInvoke.notcurses_canpixel(this);
|
||||
public Bool8 CanQuadrant()
|
||||
=> global::Brutal.NotCursesApi.NotCurses.PInvoke.notcurses_canquadrant(this);
|
||||
public Bool8 CanSextant()
|
||||
=> global::Brutal.NotCursesApi.NotCurses.PInvoke.notcurses_cansextant(this);
|
||||
public Bool8 CanTrueColor()
|
||||
=> global::Brutal.NotCursesApi.NotCurses.PInvoke.notcurses_cantruecolor(this);
|
||||
public Bool8 CanUtf8()
|
||||
=> global::Brutal.NotCursesApi.NotCurses.PInvoke.notcurses_canutf8(this);
|
||||
public Ptr<NcCapabilities> Capabilities()
|
||||
=> global::Brutal.NotCursesApi.NotCurses.PInvoke.notcurses_capabilities(this);
|
||||
public NcPixelImpl CheckPixelSupport()
|
||||
=> global::Brutal.NotCursesApi.NotCurses.PInvoke.notcurses_check_pixel_support(this);
|
||||
public void CursorDisable()
|
||||
{
|
||||
var __r = global::Brutal.NotCursesApi.NotCurses.PInvoke.notcurses_cursor_disable(this);
|
||||
if (__r != 0) throw new NcResultException("notcurses_cursor_disable", __r);
|
||||
}
|
||||
public void CursorEnable(int2 xy)
|
||||
{
|
||||
var __r = global::Brutal.NotCursesApi.NotCurses.PInvoke.notcurses_cursor_enable(this, xy.Y, xy.X);
|
||||
if (__r != 0) throw new NcResultException("notcurses_cursor_enable", __r);
|
||||
}
|
||||
public void CursorYx(Ptr<int> y, Ptr<int> x)
|
||||
{
|
||||
var __r = global::Brutal.NotCursesApi.NotCurses.PInvoke.notcurses_cursor_yx(this, y, x);
|
||||
if (__r != 0) throw new NcResultException("notcurses_cursor_yx", __r);
|
||||
}
|
||||
public void Cursor(out int2 xy)
|
||||
{
|
||||
int xyY = default;
|
||||
int xyX = default;
|
||||
var __r = global::Brutal.NotCursesApi.NotCurses.PInvoke.notcurses_cursor_yx(this, new Ptr<int>(&xyY), new Ptr<int>(&xyX));
|
||||
if (__r != 0) throw new NcResultException("notcurses_cursor_yx", __r);
|
||||
xy = new int2(xyX, xyY);
|
||||
}
|
||||
public void Debug(Ptr debugfp)
|
||||
=> global::Brutal.NotCursesApi.NotCurses.PInvoke.notcurses_debug(this, debugfp);
|
||||
public uint DefaultBackground()
|
||||
{
|
||||
uint bg = default;
|
||||
var __r = global::Brutal.NotCursesApi.NotCurses.PInvoke.notcurses_default_background(this, new Ptr<uint>(&bg));
|
||||
if (__r != 0) throw new NcResultException("notcurses_default_background", __r);
|
||||
return bg;
|
||||
}
|
||||
public uint DefaultForeground()
|
||||
{
|
||||
uint fg = default;
|
||||
var __r = global::Brutal.NotCursesApi.NotCurses.PInvoke.notcurses_default_foreground(this, new Ptr<uint>(&fg));
|
||||
if (__r != 0) throw new NcResultException("notcurses_default_foreground", __r);
|
||||
return fg;
|
||||
}
|
||||
public string DetectedTerminal()
|
||||
=> global::Brutal.NotCursesApi.NotCurses.PInvoke.notcurses_detected_terminal(this);
|
||||
public void DropPlanes()
|
||||
=> global::Brutal.NotCursesApi.NotCurses.PInvoke.notcurses_drop_planes(this);
|
||||
public void EnterAlternateScreen()
|
||||
{
|
||||
var __r = global::Brutal.NotCursesApi.NotCurses.PInvoke.notcurses_enter_alternate_screen(this);
|
||||
if (__r != 0) throw new NcResultException("notcurses_enter_alternate_screen", __r);
|
||||
}
|
||||
public uint Get(Ptr<TimeSpec> ts, Ptr<NcInput> ni)
|
||||
=> global::Brutal.NotCursesApi.NotCurses.PInvoke.notcurses_get(this, ts, ni);
|
||||
public uint Get(out TimeSpec ts, out NcInput ni)
|
||||
{
|
||||
ts = default;
|
||||
ni = default;
|
||||
fixed (TimeSpec* tsPtr = &ts)
|
||||
{
|
||||
fixed (NcInput* niPtr = &ni)
|
||||
{
|
||||
return global::Brutal.NotCursesApi.NotCurses.PInvoke.notcurses_get(this, new Ptr<TimeSpec>(tsPtr), new Ptr<NcInput>(niPtr));
|
||||
}
|
||||
}
|
||||
}
|
||||
public uint GetBlocking(Ptr<NcInput> ni)
|
||||
=> global::Brutal.NotCursesApi.NotCurses.PInvoke.notcurses_get_blocking(this, ni);
|
||||
public uint GetBlocking(out NcInput ni)
|
||||
{
|
||||
ni = default;
|
||||
fixed (NcInput* niPtr = &ni)
|
||||
{
|
||||
return global::Brutal.NotCursesApi.NotCurses.PInvoke.notcurses_get_blocking(this, new Ptr<NcInput>(niPtr));
|
||||
}
|
||||
}
|
||||
public uint GetNblock(Ptr<NcInput> ni)
|
||||
=> global::Brutal.NotCursesApi.NotCurses.PInvoke.notcurses_get_nblock(this, ni);
|
||||
public uint GetNblock(out NcInput ni)
|
||||
{
|
||||
ni = default;
|
||||
fixed (NcInput* niPtr = &ni)
|
||||
{
|
||||
return global::Brutal.NotCursesApi.NotCurses.PInvoke.notcurses_get_nblock(this, new Ptr<NcInput>(niPtr));
|
||||
}
|
||||
}
|
||||
public void GetVec(Ptr<TimeSpec> ts, Ptr<NcInput> ni, int vCount)
|
||||
{
|
||||
var __r = global::Brutal.NotCursesApi.NotCurses.PInvoke.notcurses_getvec(this, ts, ni, vCount);
|
||||
if (__r != 0) throw new NcResultException("notcurses_getvec", __r);
|
||||
}
|
||||
public void InputReadyFd()
|
||||
{
|
||||
var __r = global::Brutal.NotCursesApi.NotCurses.PInvoke.notcurses_inputready_fd(this);
|
||||
if (__r != 0) throw new NcResultException("notcurses_inputready_fd", __r);
|
||||
}
|
||||
public void LeaveAlternateScreen()
|
||||
{
|
||||
var __r = global::Brutal.NotCursesApi.NotCurses.PInvoke.notcurses_leave_alternate_screen(this);
|
||||
if (__r != 0) throw new NcResultException("notcurses_leave_alternate_screen", __r);
|
||||
}
|
||||
public void LineSigsDisable()
|
||||
{
|
||||
var __r = global::Brutal.NotCursesApi.NotCurses.PInvoke.notcurses_linesigs_disable(this);
|
||||
if (__r != 0) throw new NcResultException("notcurses_linesigs_disable", __r);
|
||||
}
|
||||
public void LineSigsEnable()
|
||||
{
|
||||
var __r = global::Brutal.NotCursesApi.NotCurses.PInvoke.notcurses_linesigs_enable(this);
|
||||
if (__r != 0) throw new NcResultException("notcurses_linesigs_enable", __r);
|
||||
}
|
||||
public void MiceDisable()
|
||||
{
|
||||
var __r = global::Brutal.NotCursesApi.NotCurses.PInvoke.notcurses_mice_disable(this);
|
||||
if (__r != 0) throw new NcResultException("notcurses_mice_disable", __r);
|
||||
}
|
||||
public void MiceEnable(uint eventMask)
|
||||
{
|
||||
var __r = global::Brutal.NotCursesApi.NotCurses.PInvoke.notcurses_mice_enable(this, eventMask);
|
||||
if (__r != 0) throw new NcResultException("notcurses_mice_enable", __r);
|
||||
}
|
||||
public uint PaletteSize()
|
||||
=> global::Brutal.NotCursesApi.NotCurses.PInvoke.notcurses_palette_size(this);
|
||||
public void Refresh(Ptr<uint> y, Ptr<uint> x)
|
||||
{
|
||||
var __r = global::Brutal.NotCursesApi.NotCurses.PInvoke.notcurses_refresh(this, y, x);
|
||||
if (__r != 0) throw new NcResultException("notcurses_refresh", __r);
|
||||
}
|
||||
public void Refresh(out uint2 xy)
|
||||
{
|
||||
uint xyY = default;
|
||||
uint xyX = default;
|
||||
var __r = global::Brutal.NotCursesApi.NotCurses.PInvoke.notcurses_refresh(this, new Ptr<uint>(&xyY), new Ptr<uint>(&xyX));
|
||||
if (__r != 0) throw new NcResultException("notcurses_refresh", __r);
|
||||
xy = new uint2(xyX, xyY);
|
||||
}
|
||||
public void Render()
|
||||
{
|
||||
var __r = global::Brutal.NotCursesApi.NotCurses.PInvoke.notcurses_render(this);
|
||||
if (__r != 0) throw new NcResultException("notcurses_render", __r);
|
||||
}
|
||||
public void Stats(Ptr<NcStats> stats)
|
||||
=> global::Brutal.NotCursesApi.NotCurses.PInvoke.notcurses_stats(this, stats);
|
||||
public void Stats(out NcStats stats)
|
||||
{
|
||||
stats = default;
|
||||
fixed (NcStats* statsPtr = &stats)
|
||||
{
|
||||
global::Brutal.NotCursesApi.NotCurses.PInvoke.notcurses_stats(this, new Ptr<NcStats>(statsPtr));
|
||||
}
|
||||
}
|
||||
public Ptr<NcStats> StatsAlloc()
|
||||
=> global::Brutal.NotCursesApi.NotCurses.PInvoke.notcurses_stats_alloc(this);
|
||||
public void StatsReset(Ptr<NcStats> stats)
|
||||
=> global::Brutal.NotCursesApi.NotCurses.PInvoke.notcurses_stats_reset(this, stats);
|
||||
public void StatsReset(out NcStats stats)
|
||||
{
|
||||
stats = default;
|
||||
fixed (NcStats* statsPtr = &stats)
|
||||
{
|
||||
global::Brutal.NotCursesApi.NotCurses.PInvoke.notcurses_stats_reset(this, new Ptr<NcStats>(statsPtr));
|
||||
}
|
||||
}
|
||||
public NcPlaneHandle StdDimYx(Ptr<uint> y, Ptr<uint> x)
|
||||
=> global::Brutal.NotCursesApi.NotCurses.PInvoke.notcurses_stddim_yx(this, y, x);
|
||||
public NcPlaneHandle StdDim(out uint2 xy)
|
||||
{
|
||||
uint xyY = default;
|
||||
uint xyX = default;
|
||||
var __r = global::Brutal.NotCursesApi.NotCurses.PInvoke.notcurses_stddim_yx(this, new Ptr<uint>(&xyY), new Ptr<uint>(&xyX));
|
||||
xy = new uint2(xyX, xyY);
|
||||
return __r;
|
||||
}
|
||||
public NcPlaneHandle StdDimYxConst(Ptr<uint> y, Ptr<uint> x)
|
||||
=> global::Brutal.NotCursesApi.NotCurses.PInvoke.notcurses_stddim_yx_const(this, y, x);
|
||||
public NcPlaneHandle StdDimYxConst(out uint2 xy)
|
||||
{
|
||||
uint xyY = default;
|
||||
uint xyX = default;
|
||||
var __r = global::Brutal.NotCursesApi.NotCurses.PInvoke.notcurses_stddim_yx_const(this, new Ptr<uint>(&xyY), new Ptr<uint>(&xyX));
|
||||
xy = new uint2(xyX, xyY);
|
||||
return __r;
|
||||
}
|
||||
public NcPlaneHandle StdPlane()
|
||||
=> global::Brutal.NotCursesApi.NotCurses.PInvoke.notcurses_stdplane(this);
|
||||
public NcPlaneHandle StdPlaneConst()
|
||||
=> global::Brutal.NotCursesApi.NotCurses.PInvoke.notcurses_stdplane_const(this);
|
||||
public void Stop()
|
||||
{
|
||||
var __r = global::Brutal.NotCursesApi.NotCurses.PInvoke.notcurses_stop(this);
|
||||
if (__r != 0) throw new NcResultException("notcurses_stop", __r);
|
||||
}
|
||||
public ushort SupportedStyles()
|
||||
=> global::Brutal.NotCursesApi.NotCurses.PInvoke.notcurses_supported_styles(this);
|
||||
public void TermDimYx(Ptr<uint> rows, Ptr<uint> cols)
|
||||
=> global::Brutal.NotCursesApi.NotCurses.PInvoke.notcurses_term_dim_yx(this, rows, cols);
|
||||
public void TermDimYx(out uint rows, out uint cols)
|
||||
{
|
||||
rows = default;
|
||||
cols = default;
|
||||
fixed (uint* rowsPtr = &rows)
|
||||
{
|
||||
fixed (uint* colsPtr = &cols)
|
||||
{
|
||||
global::Brutal.NotCursesApi.NotCurses.PInvoke.notcurses_term_dim_yx(this, new Ptr<uint>(rowsPtr), new Ptr<uint>(colsPtr));
|
||||
}
|
||||
}
|
||||
}
|
||||
public NcPlaneHandle Top()
|
||||
=> global::Brutal.NotCursesApi.NotCurses.PInvoke.notcurses_top(this);
|
||||
}
|
||||
}
|
||||
Loading…
Reference in a new issue