Last active
April 25, 2017 22:22
-
-
Save CryZe/a694a563d98e6c6a82366b09c1744310 to your computer and use it in GitHub Desktop.
Auto Generated LiveSplit Core Bindings
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| using System; | |
| using System.Runtime.InteropServices; | |
| using System.Text; | |
| using System.IO; | |
| namespace LiveSplitCore | |
| { | |
| public class Attempt | |
| { | |
| public IntPtr ptr; | |
| public int Index() | |
| { | |
| return LiveSplitCoreNative.Attempt_index(ptr); | |
| } | |
| public Time Time() | |
| { | |
| var obj = new Time(); | |
| obj.ptr = LiveSplitCoreNative.Attempt_time(ptr); | |
| return obj; | |
| } | |
| } | |
| public class HotkeySystem | |
| { | |
| public IntPtr ptr; | |
| public static HotkeySystem New(SharedTimer sharedTimer) | |
| { | |
| var obj = new HotkeySystem(); | |
| obj.ptr = LiveSplitCoreNative.HotkeySystem_new(sharedTimer.ptr); | |
| return obj; | |
| } | |
| public void Drop() | |
| { | |
| LiveSplitCoreNative.HotkeySystem_drop(ptr); | |
| } | |
| } | |
| public class PossibleTimeSaveComponent | |
| { | |
| public IntPtr ptr; | |
| public static PossibleTimeSaveComponent New() | |
| { | |
| var obj = new PossibleTimeSaveComponent(); | |
| obj.ptr = LiveSplitCoreNative.PossibleTimeSaveComponent_new(); | |
| return obj; | |
| } | |
| public void Drop() | |
| { | |
| LiveSplitCoreNative.PossibleTimeSaveComponent_drop(ptr); | |
| } | |
| public string StateAsJson(Timer timer) | |
| { | |
| return LiveSplitCoreNative.PossibleTimeSaveComponent_state_as_json(ptr, timer.ptr).AsString(); | |
| } | |
| public PossibleTimeSaveComponentState State(Timer timer) | |
| { | |
| var obj = new PossibleTimeSaveComponentState(); | |
| obj.ptr = LiveSplitCoreNative.PossibleTimeSaveComponent_state(ptr, timer.ptr); | |
| return obj; | |
| } | |
| } | |
| public class PossibleTimeSaveComponentState | |
| { | |
| public IntPtr ptr; | |
| public void Drop() | |
| { | |
| LiveSplitCoreNative.PossibleTimeSaveComponentState_drop(ptr); | |
| } | |
| public string Text() | |
| { | |
| return LiveSplitCoreNative.PossibleTimeSaveComponentState_text(ptr).AsString(); | |
| } | |
| public string Time() | |
| { | |
| return LiveSplitCoreNative.PossibleTimeSaveComponentState_time(ptr).AsString(); | |
| } | |
| } | |
| public class PreviousSegmentComponent | |
| { | |
| public IntPtr ptr; | |
| public static PreviousSegmentComponent New() | |
| { | |
| var obj = new PreviousSegmentComponent(); | |
| obj.ptr = LiveSplitCoreNative.PreviousSegmentComponent_new(); | |
| return obj; | |
| } | |
| public void Drop() | |
| { | |
| LiveSplitCoreNative.PreviousSegmentComponent_drop(ptr); | |
| } | |
| public string StateAsJson(Timer timer) | |
| { | |
| return LiveSplitCoreNative.PreviousSegmentComponent_state_as_json(ptr, timer.ptr).AsString(); | |
| } | |
| public PreviousSegmentComponentState State(Timer timer) | |
| { | |
| var obj = new PreviousSegmentComponentState(); | |
| obj.ptr = LiveSplitCoreNative.PreviousSegmentComponent_state(ptr, timer.ptr); | |
| return obj; | |
| } | |
| } | |
| public class PreviousSegmentComponentState | |
| { | |
| public IntPtr ptr; | |
| public void Drop() | |
| { | |
| LiveSplitCoreNative.PreviousSegmentComponentState_drop(ptr); | |
| } | |
| public string Text() | |
| { | |
| return LiveSplitCoreNative.PreviousSegmentComponentState_text(ptr).AsString(); | |
| } | |
| public string Time() | |
| { | |
| return LiveSplitCoreNative.PreviousSegmentComponentState_time(ptr).AsString(); | |
| } | |
| } | |
| public class Run | |
| { | |
| public IntPtr ptr; | |
| public static Run Parse(Stream stream) | |
| { | |
| var data = new byte[stream.Length]; | |
| stream.Read(data, 0, data.Length); | |
| IntPtr pnt = Marshal.AllocHGlobal(data.Length); | |
| try | |
| { | |
| Marshal.Copy(data, 0, pnt, data.Length); | |
| return Parse(pnt, data.Length); | |
| } | |
| finally | |
| { | |
| Marshal.FreeHGlobal(pnt); | |
| } | |
| } | |
| public static Run New(SegmentList segments) | |
| { | |
| var obj = new Run(); | |
| obj.ptr = LiveSplitCoreNative.Run_new(segments.ptr); | |
| return obj; | |
| } | |
| public static Run Parse(IntPtr data, long length) | |
| { | |
| var obj = new Run(); | |
| obj.ptr = LiveSplitCoreNative.Run_parse(data, (UIntPtr)length); | |
| return obj; | |
| } | |
| public void Drop() | |
| { | |
| LiveSplitCoreNative.Run_drop(ptr); | |
| } | |
| public string GameName() | |
| { | |
| return LiveSplitCoreNative.Run_game_name(ptr).AsString(); | |
| } | |
| public string GameIcon() | |
| { | |
| return LiveSplitCoreNative.Run_game_icon(ptr).AsString(); | |
| } | |
| public string CategoryName() | |
| { | |
| return LiveSplitCoreNative.Run_category_name(ptr).AsString(); | |
| } | |
| public string ExtendedFileName(bool useExtendedCategoryName) | |
| { | |
| return LiveSplitCoreNative.Run_extended_file_name(ptr, useExtendedCategoryName).AsString(); | |
| } | |
| public string ExtendedName(bool useExtendedCategoryName) | |
| { | |
| return LiveSplitCoreNative.Run_extended_name(ptr, useExtendedCategoryName).AsString(); | |
| } | |
| public string ExtendedCategoryName(bool showRegion, bool showPlatform, bool showVariables) | |
| { | |
| return LiveSplitCoreNative.Run_extended_category_name(ptr, showRegion, showPlatform, showVariables).AsString(); | |
| } | |
| public uint AttemptCount() | |
| { | |
| return LiveSplitCoreNative.Run_attempt_count(ptr); | |
| } | |
| public RunMetadata Metadata() | |
| { | |
| var obj = new RunMetadata(); | |
| obj.ptr = LiveSplitCoreNative.Run_metadata(ptr); | |
| return obj; | |
| } | |
| public TimeSpan Offset() | |
| { | |
| var obj = new TimeSpan(); | |
| obj.ptr = LiveSplitCoreNative.Run_offset(ptr); | |
| return obj; | |
| } | |
| public long Len() | |
| { | |
| return (long)LiveSplitCoreNative.Run_len(ptr); | |
| } | |
| public Segment Segment(long index) | |
| { | |
| var obj = new Segment(); | |
| obj.ptr = LiveSplitCoreNative.Run_segment(ptr, (UIntPtr)index); | |
| return obj; | |
| } | |
| public long AttemptHistoryLen() | |
| { | |
| return (long)LiveSplitCoreNative.Run_attempt_history_len(ptr); | |
| } | |
| public Attempt AttemptHistoryIndex(long index) | |
| { | |
| var obj = new Attempt(); | |
| obj.ptr = LiveSplitCoreNative.Run_attempt_history_index(ptr, (UIntPtr)index); | |
| return obj; | |
| } | |
| public string SaveAsLss() | |
| { | |
| return LiveSplitCoreNative.Run_save_as_lss(ptr).AsString(); | |
| } | |
| public void SetGameName(string game) | |
| { | |
| LiveSplitCoreNative.Run_set_game_name(ptr, game); | |
| } | |
| public void SetCategoryName(string category) | |
| { | |
| LiveSplitCoreNative.Run_set_category_name(ptr, category); | |
| } | |
| } | |
| public class RunEditor | |
| { | |
| public IntPtr ptr; | |
| public static RunEditor New(Run run) | |
| { | |
| var obj = new RunEditor(); | |
| obj.ptr = LiveSplitCoreNative.RunEditor_new(run.ptr); | |
| return obj; | |
| } | |
| public Run Close() | |
| { | |
| var obj = new Run(); | |
| obj.ptr = LiveSplitCoreNative.RunEditor_close(ptr); | |
| return obj; | |
| } | |
| public string State() | |
| { | |
| return LiveSplitCoreNative.RunEditor_state(ptr).AsString(); | |
| } | |
| public void SelectTimingMethod(byte method) | |
| { | |
| LiveSplitCoreNative.RunEditor_select_timing_method(ptr, method); | |
| } | |
| public void Unselect(long index) | |
| { | |
| LiveSplitCoreNative.RunEditor_unselect(ptr, (UIntPtr)index); | |
| } | |
| public void SelectAdditionally(long index) | |
| { | |
| LiveSplitCoreNative.RunEditor_select_additionally(ptr, (UIntPtr)index); | |
| } | |
| public void SelectOnly(long index) | |
| { | |
| LiveSplitCoreNative.RunEditor_select_only(ptr, (UIntPtr)index); | |
| } | |
| public void SetGameName(string game) | |
| { | |
| LiveSplitCoreNative.RunEditor_set_game_name(ptr, game); | |
| } | |
| public void SetCategoryName(string category) | |
| { | |
| LiveSplitCoreNative.RunEditor_set_category_name(ptr, category); | |
| } | |
| public bool ParseAndSetOffset(string offset) | |
| { | |
| return LiveSplitCoreNative.RunEditor_parse_and_set_offset(ptr, offset) != 0; | |
| } | |
| public bool ParseAndSetAttemptCount(string attempts) | |
| { | |
| return LiveSplitCoreNative.RunEditor_parse_and_set_attempt_count(ptr, attempts) != 0; | |
| } | |
| public void SetGameIcon(IntPtr data, long length) | |
| { | |
| LiveSplitCoreNative.RunEditor_set_game_icon(ptr, data, (UIntPtr)length); | |
| } | |
| public void InsertSegmentAbove() | |
| { | |
| LiveSplitCoreNative.RunEditor_insert_segment_above(ptr); | |
| } | |
| public void InsertSegmentBelow() | |
| { | |
| LiveSplitCoreNative.RunEditor_insert_segment_below(ptr); | |
| } | |
| public void RemoveSegments() | |
| { | |
| LiveSplitCoreNative.RunEditor_remove_segments(ptr); | |
| } | |
| public void MoveSegmentsUp() | |
| { | |
| LiveSplitCoreNative.RunEditor_move_segments_up(ptr); | |
| } | |
| public void MoveSegmentsDown() | |
| { | |
| LiveSplitCoreNative.RunEditor_move_segments_down(ptr); | |
| } | |
| public void SelectedSetIcon(IntPtr data, long length) | |
| { | |
| LiveSplitCoreNative.RunEditor_selected_set_icon(ptr, data, (UIntPtr)length); | |
| } | |
| public void SelectedSetName(string name) | |
| { | |
| LiveSplitCoreNative.RunEditor_selected_set_name(ptr, name); | |
| } | |
| public bool SelectedParseAndSetSplitTime(string time) | |
| { | |
| return LiveSplitCoreNative.RunEditor_selected_parse_and_set_split_time(ptr, time) != 0; | |
| } | |
| public bool SelectedParseAndSetSegmentTime(string time) | |
| { | |
| return LiveSplitCoreNative.RunEditor_selected_parse_and_set_segment_time(ptr, time) != 0; | |
| } | |
| public bool SelectedParseAndSetBestSegmentTime(string time) | |
| { | |
| return LiveSplitCoreNative.RunEditor_selected_parse_and_set_best_segment_time(ptr, time) != 0; | |
| } | |
| public bool SelectedParseAndSetComparisonTime(string comparison, string time) | |
| { | |
| return LiveSplitCoreNative.RunEditor_selected_parse_and_set_comparison_time(ptr, comparison, time) != 0; | |
| } | |
| } | |
| public class RunMetadata | |
| { | |
| public IntPtr ptr; | |
| public string RunId() | |
| { | |
| return LiveSplitCoreNative.RunMetadata_run_id(ptr).AsString(); | |
| } | |
| public string PlatformName() | |
| { | |
| return LiveSplitCoreNative.RunMetadata_platform_name(ptr).AsString(); | |
| } | |
| public bool UsesEmulator() | |
| { | |
| return LiveSplitCoreNative.RunMetadata_uses_emulator(ptr) != 0; | |
| } | |
| public string RegionName() | |
| { | |
| return LiveSplitCoreNative.RunMetadata_region_name(ptr).AsString(); | |
| } | |
| } | |
| public class Segment | |
| { | |
| public IntPtr ptr; | |
| public static Segment New(string name) | |
| { | |
| var obj = new Segment(); | |
| obj.ptr = LiveSplitCoreNative.Segment_new(name); | |
| return obj; | |
| } | |
| public void Drop() | |
| { | |
| LiveSplitCoreNative.Segment_drop(ptr); | |
| } | |
| public string Name() | |
| { | |
| return LiveSplitCoreNative.Segment_name(ptr).AsString(); | |
| } | |
| public string Icon() | |
| { | |
| return LiveSplitCoreNative.Segment_icon(ptr).AsString(); | |
| } | |
| public Time Comparison(string comparison) | |
| { | |
| var obj = new Time(); | |
| obj.ptr = LiveSplitCoreNative.Segment_comparison(ptr, comparison); | |
| return obj; | |
| } | |
| public Time PersonalBestSplitTime() | |
| { | |
| var obj = new Time(); | |
| obj.ptr = LiveSplitCoreNative.Segment_personal_best_split_time(ptr); | |
| return obj; | |
| } | |
| public Time BestSegmentTime() | |
| { | |
| var obj = new Time(); | |
| obj.ptr = LiveSplitCoreNative.Segment_best_segment_time(ptr); | |
| return obj; | |
| } | |
| public SegmentHistory SegmentHistory() | |
| { | |
| var obj = new SegmentHistory(); | |
| obj.ptr = LiveSplitCoreNative.Segment_segment_history(ptr); | |
| return obj; | |
| } | |
| } | |
| public class SegmentHistory | |
| { | |
| public IntPtr ptr; | |
| public SegmentHistoryIter Iter() | |
| { | |
| var obj = new SegmentHistoryIter(); | |
| obj.ptr = LiveSplitCoreNative.SegmentHistory_iter(ptr); | |
| return obj; | |
| } | |
| } | |
| public class SegmentHistoryElement | |
| { | |
| public IntPtr ptr; | |
| public int Index() | |
| { | |
| return LiveSplitCoreNative.SegmentHistoryElement_index(ptr); | |
| } | |
| public Time Time() | |
| { | |
| var obj = new Time(); | |
| obj.ptr = LiveSplitCoreNative.SegmentHistoryElement_time(ptr); | |
| return obj; | |
| } | |
| } | |
| public class SegmentHistoryIter | |
| { | |
| public IntPtr ptr; | |
| public void Drop() | |
| { | |
| LiveSplitCoreNative.SegmentHistoryIter_drop(ptr); | |
| } | |
| public SegmentHistoryElement Next() | |
| { | |
| var obj = new SegmentHistoryElement(); | |
| obj.ptr = LiveSplitCoreNative.SegmentHistoryIter_next(ptr); | |
| return obj; | |
| } | |
| } | |
| public class SegmentList | |
| { | |
| public IntPtr ptr; | |
| public static SegmentList New() | |
| { | |
| var obj = new SegmentList(); | |
| obj.ptr = LiveSplitCoreNative.SegmentList_new(); | |
| return obj; | |
| } | |
| public void Drop() | |
| { | |
| LiveSplitCoreNative.SegmentList_drop(ptr); | |
| } | |
| public void Push(Segment segment) | |
| { | |
| LiveSplitCoreNative.SegmentList_push(ptr, segment.ptr); | |
| } | |
| } | |
| public class SharedTimer | |
| { | |
| public IntPtr ptr; | |
| public void ReadWith(Action<Timer> action) | |
| { | |
| var timerLock = Read(); | |
| action(timerLock.Timer()); | |
| timerLock.Drop(); | |
| } | |
| public void WriteWith(Action<Timer> action) | |
| { | |
| var timerLock = Write(); | |
| action(timerLock.Timer()); | |
| timerLock.Drop(); | |
| } | |
| public void Drop() | |
| { | |
| LiveSplitCoreNative.SharedTimer_drop(ptr); | |
| } | |
| public SharedTimer Share() | |
| { | |
| var obj = new SharedTimer(); | |
| obj.ptr = LiveSplitCoreNative.SharedTimer_share(ptr); | |
| return obj; | |
| } | |
| public TimerReadLock Read() | |
| { | |
| var obj = new TimerReadLock(); | |
| obj.ptr = LiveSplitCoreNative.SharedTimer_read(ptr); | |
| return obj; | |
| } | |
| public TimerWriteLock Write() | |
| { | |
| var obj = new TimerWriteLock(); | |
| obj.ptr = LiveSplitCoreNative.SharedTimer_write(ptr); | |
| return obj; | |
| } | |
| } | |
| public class SplitsComponent | |
| { | |
| public IntPtr ptr; | |
| public static SplitsComponent New() | |
| { | |
| var obj = new SplitsComponent(); | |
| obj.ptr = LiveSplitCoreNative.SplitsComponent_new(); | |
| return obj; | |
| } | |
| public void Drop() | |
| { | |
| LiveSplitCoreNative.SplitsComponent_drop(ptr); | |
| } | |
| public string StateAsJson(Timer timer) | |
| { | |
| return LiveSplitCoreNative.SplitsComponent_state_as_json(ptr, timer.ptr).AsString(); | |
| } | |
| public SplitsComponentState State(Timer timer) | |
| { | |
| var obj = new SplitsComponentState(); | |
| obj.ptr = LiveSplitCoreNative.SplitsComponent_state(ptr, timer.ptr); | |
| return obj; | |
| } | |
| public void ScrollUp() | |
| { | |
| LiveSplitCoreNative.SplitsComponent_scroll_up(ptr); | |
| } | |
| public void ScrollDown() | |
| { | |
| LiveSplitCoreNative.SplitsComponent_scroll_down(ptr); | |
| } | |
| } | |
| public class SplitsComponentState | |
| { | |
| public IntPtr ptr; | |
| public void Drop() | |
| { | |
| LiveSplitCoreNative.SplitsComponentState_drop(ptr); | |
| } | |
| public bool FinalSeparatorShown() | |
| { | |
| return LiveSplitCoreNative.SplitsComponentState_final_separator_shown(ptr) != 0; | |
| } | |
| public long Len() | |
| { | |
| return (long)LiveSplitCoreNative.SplitsComponentState_len(ptr); | |
| } | |
| public string IconChange(long index) | |
| { | |
| return LiveSplitCoreNative.SplitsComponentState_icon_change(ptr, (UIntPtr)index).AsString(); | |
| } | |
| public string Name(long index) | |
| { | |
| return LiveSplitCoreNative.SplitsComponentState_name(ptr, (UIntPtr)index).AsString(); | |
| } | |
| public string Delta(long index) | |
| { | |
| return LiveSplitCoreNative.SplitsComponentState_delta(ptr, (UIntPtr)index).AsString(); | |
| } | |
| public string Time(long index) | |
| { | |
| return LiveSplitCoreNative.SplitsComponentState_time(ptr, (UIntPtr)index).AsString(); | |
| } | |
| public string Color(long index) | |
| { | |
| return LiveSplitCoreNative.SplitsComponentState_color(ptr, (UIntPtr)index).AsString(); | |
| } | |
| public bool IsCurrentSplit(long index) | |
| { | |
| return LiveSplitCoreNative.SplitsComponentState_is_current_split(ptr, (UIntPtr)index) != 0; | |
| } | |
| } | |
| public class SumOfBestComponent | |
| { | |
| public IntPtr ptr; | |
| public static SumOfBestComponent New() | |
| { | |
| var obj = new SumOfBestComponent(); | |
| obj.ptr = LiveSplitCoreNative.SumOfBestComponent_new(); | |
| return obj; | |
| } | |
| public void Drop() | |
| { | |
| LiveSplitCoreNative.SumOfBestComponent_drop(ptr); | |
| } | |
| public string StateAsJson(Timer timer) | |
| { | |
| return LiveSplitCoreNative.SumOfBestComponent_state_as_json(ptr, timer.ptr).AsString(); | |
| } | |
| public SumOfBestComponentState State(Timer timer) | |
| { | |
| var obj = new SumOfBestComponentState(); | |
| obj.ptr = LiveSplitCoreNative.SumOfBestComponent_state(ptr, timer.ptr); | |
| return obj; | |
| } | |
| } | |
| public class SumOfBestComponentState | |
| { | |
| public IntPtr ptr; | |
| public void Drop() | |
| { | |
| LiveSplitCoreNative.SumOfBestComponentState_drop(ptr); | |
| } | |
| public string Text() | |
| { | |
| return LiveSplitCoreNative.SumOfBestComponentState_text(ptr).AsString(); | |
| } | |
| public string Time() | |
| { | |
| return LiveSplitCoreNative.SumOfBestComponentState_time(ptr).AsString(); | |
| } | |
| } | |
| public class Time | |
| { | |
| public IntPtr ptr; | |
| public void Drop() | |
| { | |
| LiveSplitCoreNative.Time_drop(ptr); | |
| } | |
| public Time Clone() | |
| { | |
| var obj = new Time(); | |
| obj.ptr = LiveSplitCoreNative.Time_clone(ptr); | |
| return obj; | |
| } | |
| public TimeSpan RealTime() | |
| { | |
| var obj = new TimeSpan(); | |
| obj.ptr = LiveSplitCoreNative.Time_real_time(ptr); | |
| return obj; | |
| } | |
| public TimeSpan GameTime() | |
| { | |
| var obj = new TimeSpan(); | |
| obj.ptr = LiveSplitCoreNative.Time_game_time(ptr); | |
| return obj; | |
| } | |
| public TimeSpan Index(byte timingMethod) | |
| { | |
| var obj = new TimeSpan(); | |
| obj.ptr = LiveSplitCoreNative.Time_index(ptr, timingMethod); | |
| return obj; | |
| } | |
| } | |
| public class TimeSpan | |
| { | |
| public IntPtr ptr; | |
| public static TimeSpan FromSeconds(double seconds) | |
| { | |
| var obj = new TimeSpan(); | |
| obj.ptr = LiveSplitCoreNative.TimeSpan_from_seconds(seconds); | |
| return obj; | |
| } | |
| public void Drop() | |
| { | |
| LiveSplitCoreNative.TimeSpan_drop(ptr); | |
| } | |
| public TimeSpan Clone() | |
| { | |
| var obj = new TimeSpan(); | |
| obj.ptr = LiveSplitCoreNative.TimeSpan_clone(ptr); | |
| return obj; | |
| } | |
| public double TotalSeconds() | |
| { | |
| return LiveSplitCoreNative.TimeSpan_total_seconds(ptr); | |
| } | |
| } | |
| public class Timer | |
| { | |
| public IntPtr ptr; | |
| public static Timer New(Run run) | |
| { | |
| var obj = new Timer(); | |
| obj.ptr = LiveSplitCoreNative.Timer_new(run.ptr); | |
| return obj; | |
| } | |
| public SharedTimer IntoShared() | |
| { | |
| var obj = new SharedTimer(); | |
| obj.ptr = LiveSplitCoreNative.Timer_into_shared(ptr); | |
| return obj; | |
| } | |
| public void Drop() | |
| { | |
| LiveSplitCoreNative.Timer_drop(ptr); | |
| } | |
| public byte CurrentTimingMethod() | |
| { | |
| return LiveSplitCoreNative.Timer_current_timing_method(ptr); | |
| } | |
| public string CurrentComparison() | |
| { | |
| return LiveSplitCoreNative.Timer_current_comparison(ptr).AsString(); | |
| } | |
| public bool IsGameTimeInitialized() | |
| { | |
| return LiveSplitCoreNative.Timer_is_game_time_initialized(ptr) != 0; | |
| } | |
| public bool IsGameTimePaused() | |
| { | |
| return LiveSplitCoreNative.Timer_is_game_time_paused(ptr) != 0; | |
| } | |
| public TimeSpan LoadingTimes() | |
| { | |
| var obj = new TimeSpan(); | |
| obj.ptr = LiveSplitCoreNative.Timer_loading_times(ptr); | |
| return obj; | |
| } | |
| public byte CurrentPhase() | |
| { | |
| return LiveSplitCoreNative.Timer_current_phase(ptr); | |
| } | |
| public Run GetRun() | |
| { | |
| var obj = new Run(); | |
| obj.ptr = LiveSplitCoreNative.Timer_get_run(ptr); | |
| return obj; | |
| } | |
| public Run CloneRun() | |
| { | |
| var obj = new Run(); | |
| obj.ptr = LiveSplitCoreNative.Timer_clone_run(ptr); | |
| return obj; | |
| } | |
| public void PrintDebug() | |
| { | |
| LiveSplitCoreNative.Timer_print_debug(ptr); | |
| } | |
| public void Split() | |
| { | |
| LiveSplitCoreNative.Timer_split(ptr); | |
| } | |
| public void SkipSplit() | |
| { | |
| LiveSplitCoreNative.Timer_skip_split(ptr); | |
| } | |
| public void UndoSplit() | |
| { | |
| LiveSplitCoreNative.Timer_undo_split(ptr); | |
| } | |
| public void Reset(bool updateSplits) | |
| { | |
| LiveSplitCoreNative.Timer_reset(ptr, updateSplits); | |
| } | |
| public void Pause() | |
| { | |
| LiveSplitCoreNative.Timer_pause(ptr); | |
| } | |
| public void SetCurrentTimingMethod(byte method) | |
| { | |
| LiveSplitCoreNative.Timer_set_current_timing_method(ptr, method); | |
| } | |
| public void SwitchToNextComparison() | |
| { | |
| LiveSplitCoreNative.Timer_switch_to_next_comparison(ptr); | |
| } | |
| public void SwitchToPreviousComparison() | |
| { | |
| LiveSplitCoreNative.Timer_switch_to_previous_comparison(ptr); | |
| } | |
| public void InitializeGameTime() | |
| { | |
| LiveSplitCoreNative.Timer_initialize_game_time(ptr); | |
| } | |
| public void UninitializeGameTime() | |
| { | |
| LiveSplitCoreNative.Timer_uninitialize_game_time(ptr); | |
| } | |
| public void PauseGameTime() | |
| { | |
| LiveSplitCoreNative.Timer_pause_game_time(ptr); | |
| } | |
| public void UnpauseGameTime() | |
| { | |
| LiveSplitCoreNative.Timer_unpause_game_time(ptr); | |
| } | |
| public void SetGameTime(TimeSpan time) | |
| { | |
| LiveSplitCoreNative.Timer_set_game_time(ptr, time.ptr); | |
| } | |
| public void SetLoadingTimes(TimeSpan time) | |
| { | |
| LiveSplitCoreNative.Timer_set_loading_times(ptr, time.ptr); | |
| } | |
| } | |
| public class TimerComponent | |
| { | |
| public IntPtr ptr; | |
| public static TimerComponent New() | |
| { | |
| var obj = new TimerComponent(); | |
| obj.ptr = LiveSplitCoreNative.TimerComponent_new(); | |
| return obj; | |
| } | |
| public void Drop() | |
| { | |
| LiveSplitCoreNative.TimerComponent_drop(ptr); | |
| } | |
| public string StateAsJson(Timer timer) | |
| { | |
| return LiveSplitCoreNative.TimerComponent_state_as_json(ptr, timer.ptr).AsString(); | |
| } | |
| public TimerComponentState State(Timer timer) | |
| { | |
| var obj = new TimerComponentState(); | |
| obj.ptr = LiveSplitCoreNative.TimerComponent_state(ptr, timer.ptr); | |
| return obj; | |
| } | |
| } | |
| public class TimerComponentState | |
| { | |
| public IntPtr ptr; | |
| public void Drop() | |
| { | |
| LiveSplitCoreNative.TimerComponentState_drop(ptr); | |
| } | |
| public string Time() | |
| { | |
| return LiveSplitCoreNative.TimerComponentState_time(ptr).AsString(); | |
| } | |
| public string Fraction() | |
| { | |
| return LiveSplitCoreNative.TimerComponentState_fraction(ptr).AsString(); | |
| } | |
| public string Color() | |
| { | |
| return LiveSplitCoreNative.TimerComponentState_color(ptr).AsString(); | |
| } | |
| } | |
| public class TimerReadLock | |
| { | |
| public IntPtr ptr; | |
| public void Drop() | |
| { | |
| LiveSplitCoreNative.TimerReadLock_drop(ptr); | |
| } | |
| public Timer Timer() | |
| { | |
| var obj = new Timer(); | |
| obj.ptr = LiveSplitCoreNative.TimerReadLock_timer(ptr); | |
| return obj; | |
| } | |
| } | |
| public class TimerWriteLock | |
| { | |
| public IntPtr ptr; | |
| public void Drop() | |
| { | |
| LiveSplitCoreNative.TimerWriteLock_drop(ptr); | |
| } | |
| public Timer Timer() | |
| { | |
| var obj = new Timer(); | |
| obj.ptr = LiveSplitCoreNative.TimerWriteLock_timer(ptr); | |
| return obj; | |
| } | |
| } | |
| public class TitleComponent | |
| { | |
| public IntPtr ptr; | |
| public static TitleComponent New() | |
| { | |
| var obj = new TitleComponent(); | |
| obj.ptr = LiveSplitCoreNative.TitleComponent_new(); | |
| return obj; | |
| } | |
| public void Drop() | |
| { | |
| LiveSplitCoreNative.TitleComponent_drop(ptr); | |
| } | |
| public string StateAsJson(Timer timer) | |
| { | |
| return LiveSplitCoreNative.TitleComponent_state_as_json(ptr, timer.ptr).AsString(); | |
| } | |
| public TitleComponentState State(Timer timer) | |
| { | |
| var obj = new TitleComponentState(); | |
| obj.ptr = LiveSplitCoreNative.TitleComponent_state(ptr, timer.ptr); | |
| return obj; | |
| } | |
| } | |
| public class TitleComponentState | |
| { | |
| public IntPtr ptr; | |
| public void Drop() | |
| { | |
| LiveSplitCoreNative.TitleComponentState_drop(ptr); | |
| } | |
| public string IconChange() | |
| { | |
| return LiveSplitCoreNative.TitleComponentState_icon_change(ptr).AsString(); | |
| } | |
| public string Game() | |
| { | |
| return LiveSplitCoreNative.TitleComponentState_game(ptr).AsString(); | |
| } | |
| public string Category() | |
| { | |
| return LiveSplitCoreNative.TitleComponentState_category(ptr).AsString(); | |
| } | |
| public uint Attempts() | |
| { | |
| return LiveSplitCoreNative.TitleComponentState_attempts(ptr); | |
| } | |
| } | |
| public static class LiveSplitCoreNative | |
| { | |
| [DllImport("livesplit_core")] | |
| public static extern int Attempt_index(IntPtr self); | |
| [DllImport("livesplit_core")] | |
| public static extern IntPtr Attempt_time(IntPtr self); | |
| [DllImport("livesplit_core")] | |
| public static extern IntPtr HotkeySystem_new(IntPtr shared_timer); | |
| [DllImport("livesplit_core")] | |
| public static extern void HotkeySystem_drop(IntPtr self); | |
| [DllImport("livesplit_core")] | |
| public static extern IntPtr PossibleTimeSaveComponent_new(); | |
| [DllImport("livesplit_core")] | |
| public static extern void PossibleTimeSaveComponent_drop(IntPtr self); | |
| [DllImport("livesplit_core")] | |
| public static extern LSCoreString PossibleTimeSaveComponent_state_as_json(IntPtr self, IntPtr timer); | |
| [DllImport("livesplit_core")] | |
| public static extern IntPtr PossibleTimeSaveComponent_state(IntPtr self, IntPtr timer); | |
| [DllImport("livesplit_core")] | |
| public static extern void PossibleTimeSaveComponentState_drop(IntPtr self); | |
| [DllImport("livesplit_core")] | |
| public static extern LSCoreString PossibleTimeSaveComponentState_text(IntPtr self); | |
| [DllImport("livesplit_core")] | |
| public static extern LSCoreString PossibleTimeSaveComponentState_time(IntPtr self); | |
| [DllImport("livesplit_core")] | |
| public static extern IntPtr PreviousSegmentComponent_new(); | |
| [DllImport("livesplit_core")] | |
| public static extern void PreviousSegmentComponent_drop(IntPtr self); | |
| [DllImport("livesplit_core")] | |
| public static extern LSCoreString PreviousSegmentComponent_state_as_json(IntPtr self, IntPtr timer); | |
| [DllImport("livesplit_core")] | |
| public static extern IntPtr PreviousSegmentComponent_state(IntPtr self, IntPtr timer); | |
| [DllImport("livesplit_core")] | |
| public static extern void PreviousSegmentComponentState_drop(IntPtr self); | |
| [DllImport("livesplit_core")] | |
| public static extern LSCoreString PreviousSegmentComponentState_text(IntPtr self); | |
| [DllImport("livesplit_core")] | |
| public static extern LSCoreString PreviousSegmentComponentState_time(IntPtr self); | |
| [DllImport("livesplit_core")] | |
| public static extern IntPtr Run_new(IntPtr segments); | |
| [DllImport("livesplit_core")] | |
| public static extern IntPtr Run_parse(IntPtr data, UIntPtr length); | |
| [DllImport("livesplit_core")] | |
| public static extern void Run_drop(IntPtr self); | |
| [DllImport("livesplit_core")] | |
| public static extern LSCoreString Run_game_name(IntPtr self); | |
| [DllImport("livesplit_core")] | |
| public static extern LSCoreString Run_game_icon(IntPtr self); | |
| [DllImport("livesplit_core")] | |
| public static extern LSCoreString Run_category_name(IntPtr self); | |
| [DllImport("livesplit_core")] | |
| public static extern LSCoreString Run_extended_file_name(IntPtr self, bool use_extended_category_name); | |
| [DllImport("livesplit_core")] | |
| public static extern LSCoreString Run_extended_name(IntPtr self, bool use_extended_category_name); | |
| [DllImport("livesplit_core")] | |
| public static extern LSCoreString Run_extended_category_name(IntPtr self, bool show_region, bool show_platform, bool show_variables); | |
| [DllImport("livesplit_core")] | |
| public static extern uint Run_attempt_count(IntPtr self); | |
| [DllImport("livesplit_core")] | |
| public static extern IntPtr Run_metadata(IntPtr self); | |
| [DllImport("livesplit_core")] | |
| public static extern IntPtr Run_offset(IntPtr self); | |
| [DllImport("livesplit_core")] | |
| public static extern UIntPtr Run_len(IntPtr self); | |
| [DllImport("livesplit_core")] | |
| public static extern IntPtr Run_segment(IntPtr self, UIntPtr index); | |
| [DllImport("livesplit_core")] | |
| public static extern UIntPtr Run_attempt_history_len(IntPtr self); | |
| [DllImport("livesplit_core")] | |
| public static extern IntPtr Run_attempt_history_index(IntPtr self, UIntPtr index); | |
| [DllImport("livesplit_core")] | |
| public static extern LSCoreString Run_save_as_lss(IntPtr self); | |
| [DllImport("livesplit_core")] | |
| public static extern void Run_set_game_name(IntPtr self, string game); | |
| [DllImport("livesplit_core")] | |
| public static extern void Run_set_category_name(IntPtr self, string category); | |
| [DllImport("livesplit_core")] | |
| public static extern IntPtr RunEditor_new(IntPtr run); | |
| [DllImport("livesplit_core")] | |
| public static extern IntPtr RunEditor_close(IntPtr self); | |
| [DllImport("livesplit_core")] | |
| public static extern LSCoreString RunEditor_state(IntPtr self); | |
| [DllImport("livesplit_core")] | |
| public static extern void RunEditor_select_timing_method(IntPtr self, byte method); | |
| [DllImport("livesplit_core")] | |
| public static extern void RunEditor_unselect(IntPtr self, UIntPtr index); | |
| [DllImport("livesplit_core")] | |
| public static extern void RunEditor_select_additionally(IntPtr self, UIntPtr index); | |
| [DllImport("livesplit_core")] | |
| public static extern void RunEditor_select_only(IntPtr self, UIntPtr index); | |
| [DllImport("livesplit_core")] | |
| public static extern void RunEditor_set_game_name(IntPtr self, string game); | |
| [DllImport("livesplit_core")] | |
| public static extern void RunEditor_set_category_name(IntPtr self, string category); | |
| [DllImport("livesplit_core")] | |
| public static extern byte RunEditor_parse_and_set_offset(IntPtr self, string offset); | |
| [DllImport("livesplit_core")] | |
| public static extern byte RunEditor_parse_and_set_attempt_count(IntPtr self, string attempts); | |
| [DllImport("livesplit_core")] | |
| public static extern void RunEditor_set_game_icon(IntPtr self, IntPtr data, UIntPtr length); | |
| [DllImport("livesplit_core")] | |
| public static extern void RunEditor_insert_segment_above(IntPtr self); | |
| [DllImport("livesplit_core")] | |
| public static extern void RunEditor_insert_segment_below(IntPtr self); | |
| [DllImport("livesplit_core")] | |
| public static extern void RunEditor_remove_segments(IntPtr self); | |
| [DllImport("livesplit_core")] | |
| public static extern void RunEditor_move_segments_up(IntPtr self); | |
| [DllImport("livesplit_core")] | |
| public static extern void RunEditor_move_segments_down(IntPtr self); | |
| [DllImport("livesplit_core")] | |
| public static extern void RunEditor_selected_set_icon(IntPtr self, IntPtr data, UIntPtr length); | |
| [DllImport("livesplit_core")] | |
| public static extern void RunEditor_selected_set_name(IntPtr self, string name); | |
| [DllImport("livesplit_core")] | |
| public static extern byte RunEditor_selected_parse_and_set_split_time(IntPtr self, string time); | |
| [DllImport("livesplit_core")] | |
| public static extern byte RunEditor_selected_parse_and_set_segment_time(IntPtr self, string time); | |
| [DllImport("livesplit_core")] | |
| public static extern byte RunEditor_selected_parse_and_set_best_segment_time(IntPtr self, string time); | |
| [DllImport("livesplit_core")] | |
| public static extern byte RunEditor_selected_parse_and_set_comparison_time(IntPtr self, string comparison, string time); | |
| [DllImport("livesplit_core")] | |
| public static extern LSCoreString RunMetadata_run_id(IntPtr self); | |
| [DllImport("livesplit_core")] | |
| public static extern LSCoreString RunMetadata_platform_name(IntPtr self); | |
| [DllImport("livesplit_core")] | |
| public static extern byte RunMetadata_uses_emulator(IntPtr self); | |
| [DllImport("livesplit_core")] | |
| public static extern LSCoreString RunMetadata_region_name(IntPtr self); | |
| [DllImport("livesplit_core")] | |
| public static extern IntPtr Segment_new(string name); | |
| [DllImport("livesplit_core")] | |
| public static extern void Segment_drop(IntPtr self); | |
| [DllImport("livesplit_core")] | |
| public static extern LSCoreString Segment_name(IntPtr self); | |
| [DllImport("livesplit_core")] | |
| public static extern LSCoreString Segment_icon(IntPtr self); | |
| [DllImport("livesplit_core")] | |
| public static extern IntPtr Segment_comparison(IntPtr self, string comparison); | |
| [DllImport("livesplit_core")] | |
| public static extern IntPtr Segment_personal_best_split_time(IntPtr self); | |
| [DllImport("livesplit_core")] | |
| public static extern IntPtr Segment_best_segment_time(IntPtr self); | |
| [DllImport("livesplit_core")] | |
| public static extern IntPtr Segment_segment_history(IntPtr self); | |
| [DllImport("livesplit_core")] | |
| public static extern IntPtr SegmentHistory_iter(IntPtr self); | |
| [DllImport("livesplit_core")] | |
| public static extern int SegmentHistoryElement_index(IntPtr self); | |
| [DllImport("livesplit_core")] | |
| public static extern IntPtr SegmentHistoryElement_time(IntPtr self); | |
| [DllImport("livesplit_core")] | |
| public static extern void SegmentHistoryIter_drop(IntPtr self); | |
| [DllImport("livesplit_core")] | |
| public static extern IntPtr SegmentHistoryIter_next(IntPtr self); | |
| [DllImport("livesplit_core")] | |
| public static extern IntPtr SegmentList_new(); | |
| [DllImport("livesplit_core")] | |
| public static extern void SegmentList_drop(IntPtr self); | |
| [DllImport("livesplit_core")] | |
| public static extern void SegmentList_push(IntPtr self, IntPtr segment); | |
| [DllImport("livesplit_core")] | |
| public static extern void SharedTimer_drop(IntPtr self); | |
| [DllImport("livesplit_core")] | |
| public static extern IntPtr SharedTimer_share(IntPtr self); | |
| [DllImport("livesplit_core")] | |
| public static extern IntPtr SharedTimer_read(IntPtr self); | |
| [DllImport("livesplit_core")] | |
| public static extern IntPtr SharedTimer_write(IntPtr self); | |
| [DllImport("livesplit_core")] | |
| public static extern IntPtr SplitsComponent_new(); | |
| [DllImport("livesplit_core")] | |
| public static extern void SplitsComponent_drop(IntPtr self); | |
| [DllImport("livesplit_core")] | |
| public static extern LSCoreString SplitsComponent_state_as_json(IntPtr self, IntPtr timer); | |
| [DllImport("livesplit_core")] | |
| public static extern IntPtr SplitsComponent_state(IntPtr self, IntPtr timer); | |
| [DllImport("livesplit_core")] | |
| public static extern void SplitsComponent_scroll_up(IntPtr self); | |
| [DllImport("livesplit_core")] | |
| public static extern void SplitsComponent_scroll_down(IntPtr self); | |
| [DllImport("livesplit_core")] | |
| public static extern void SplitsComponentState_drop(IntPtr self); | |
| [DllImport("livesplit_core")] | |
| public static extern byte SplitsComponentState_final_separator_shown(IntPtr self); | |
| [DllImport("livesplit_core")] | |
| public static extern UIntPtr SplitsComponentState_len(IntPtr self); | |
| [DllImport("livesplit_core")] | |
| public static extern LSCoreString SplitsComponentState_icon_change(IntPtr self, UIntPtr index); | |
| [DllImport("livesplit_core")] | |
| public static extern LSCoreString SplitsComponentState_name(IntPtr self, UIntPtr index); | |
| [DllImport("livesplit_core")] | |
| public static extern LSCoreString SplitsComponentState_delta(IntPtr self, UIntPtr index); | |
| [DllImport("livesplit_core")] | |
| public static extern LSCoreString SplitsComponentState_time(IntPtr self, UIntPtr index); | |
| [DllImport("livesplit_core")] | |
| public static extern LSCoreString SplitsComponentState_color(IntPtr self, UIntPtr index); | |
| [DllImport("livesplit_core")] | |
| public static extern byte SplitsComponentState_is_current_split(IntPtr self, UIntPtr index); | |
| [DllImport("livesplit_core")] | |
| public static extern IntPtr SumOfBestComponent_new(); | |
| [DllImport("livesplit_core")] | |
| public static extern void SumOfBestComponent_drop(IntPtr self); | |
| [DllImport("livesplit_core")] | |
| public static extern LSCoreString SumOfBestComponent_state_as_json(IntPtr self, IntPtr timer); | |
| [DllImport("livesplit_core")] | |
| public static extern IntPtr SumOfBestComponent_state(IntPtr self, IntPtr timer); | |
| [DllImport("livesplit_core")] | |
| public static extern void SumOfBestComponentState_drop(IntPtr self); | |
| [DllImport("livesplit_core")] | |
| public static extern LSCoreString SumOfBestComponentState_text(IntPtr self); | |
| [DllImport("livesplit_core")] | |
| public static extern LSCoreString SumOfBestComponentState_time(IntPtr self); | |
| [DllImport("livesplit_core")] | |
| public static extern void Time_drop(IntPtr self); | |
| [DllImport("livesplit_core")] | |
| public static extern IntPtr Time_clone(IntPtr self); | |
| [DllImport("livesplit_core")] | |
| public static extern IntPtr Time_real_time(IntPtr self); | |
| [DllImport("livesplit_core")] | |
| public static extern IntPtr Time_game_time(IntPtr self); | |
| [DllImport("livesplit_core")] | |
| public static extern IntPtr Time_index(IntPtr self, byte timing_method); | |
| [DllImport("livesplit_core")] | |
| public static extern IntPtr TimeSpan_from_seconds(double seconds); | |
| [DllImport("livesplit_core")] | |
| public static extern void TimeSpan_drop(IntPtr self); | |
| [DllImport("livesplit_core")] | |
| public static extern IntPtr TimeSpan_clone(IntPtr self); | |
| [DllImport("livesplit_core")] | |
| public static extern double TimeSpan_total_seconds(IntPtr self); | |
| [DllImport("livesplit_core")] | |
| public static extern IntPtr Timer_new(IntPtr run); | |
| [DllImport("livesplit_core")] | |
| public static extern IntPtr Timer_into_shared(IntPtr self); | |
| [DllImport("livesplit_core")] | |
| public static extern void Timer_drop(IntPtr self); | |
| [DllImport("livesplit_core")] | |
| public static extern byte Timer_current_timing_method(IntPtr self); | |
| [DllImport("livesplit_core")] | |
| public static extern LSCoreString Timer_current_comparison(IntPtr self); | |
| [DllImport("livesplit_core")] | |
| public static extern byte Timer_is_game_time_initialized(IntPtr self); | |
| [DllImport("livesplit_core")] | |
| public static extern byte Timer_is_game_time_paused(IntPtr self); | |
| [DllImport("livesplit_core")] | |
| public static extern IntPtr Timer_loading_times(IntPtr self); | |
| [DllImport("livesplit_core")] | |
| public static extern byte Timer_current_phase(IntPtr self); | |
| [DllImport("livesplit_core")] | |
| public static extern IntPtr Timer_get_run(IntPtr self); | |
| [DllImport("livesplit_core")] | |
| public static extern IntPtr Timer_clone_run(IntPtr self); | |
| [DllImport("livesplit_core")] | |
| public static extern void Timer_print_debug(IntPtr self); | |
| [DllImport("livesplit_core")] | |
| public static extern void Timer_split(IntPtr self); | |
| [DllImport("livesplit_core")] | |
| public static extern void Timer_skip_split(IntPtr self); | |
| [DllImport("livesplit_core")] | |
| public static extern void Timer_undo_split(IntPtr self); | |
| [DllImport("livesplit_core")] | |
| public static extern void Timer_reset(IntPtr self, bool update_splits); | |
| [DllImport("livesplit_core")] | |
| public static extern void Timer_pause(IntPtr self); | |
| [DllImport("livesplit_core")] | |
| public static extern void Timer_set_current_timing_method(IntPtr self, byte method); | |
| [DllImport("livesplit_core")] | |
| public static extern void Timer_switch_to_next_comparison(IntPtr self); | |
| [DllImport("livesplit_core")] | |
| public static extern void Timer_switch_to_previous_comparison(IntPtr self); | |
| [DllImport("livesplit_core")] | |
| public static extern void Timer_initialize_game_time(IntPtr self); | |
| [DllImport("livesplit_core")] | |
| public static extern void Timer_uninitialize_game_time(IntPtr self); | |
| [DllImport("livesplit_core")] | |
| public static extern void Timer_pause_game_time(IntPtr self); | |
| [DllImport("livesplit_core")] | |
| public static extern void Timer_unpause_game_time(IntPtr self); | |
| [DllImport("livesplit_core")] | |
| public static extern void Timer_set_game_time(IntPtr self, IntPtr time); | |
| [DllImport("livesplit_core")] | |
| public static extern void Timer_set_loading_times(IntPtr self, IntPtr time); | |
| [DllImport("livesplit_core")] | |
| public static extern IntPtr TimerComponent_new(); | |
| [DllImport("livesplit_core")] | |
| public static extern void TimerComponent_drop(IntPtr self); | |
| [DllImport("livesplit_core")] | |
| public static extern LSCoreString TimerComponent_state_as_json(IntPtr self, IntPtr timer); | |
| [DllImport("livesplit_core")] | |
| public static extern IntPtr TimerComponent_state(IntPtr self, IntPtr timer); | |
| [DllImport("livesplit_core")] | |
| public static extern void TimerComponentState_drop(IntPtr self); | |
| [DllImport("livesplit_core")] | |
| public static extern LSCoreString TimerComponentState_time(IntPtr self); | |
| [DllImport("livesplit_core")] | |
| public static extern LSCoreString TimerComponentState_fraction(IntPtr self); | |
| [DllImport("livesplit_core")] | |
| public static extern LSCoreString TimerComponentState_color(IntPtr self); | |
| [DllImport("livesplit_core")] | |
| public static extern void TimerReadLock_drop(IntPtr self); | |
| [DllImport("livesplit_core")] | |
| public static extern IntPtr TimerReadLock_timer(IntPtr self); | |
| [DllImport("livesplit_core")] | |
| public static extern void TimerWriteLock_drop(IntPtr self); | |
| [DllImport("livesplit_core")] | |
| public static extern IntPtr TimerWriteLock_timer(IntPtr self); | |
| [DllImport("livesplit_core")] | |
| public static extern IntPtr TitleComponent_new(); | |
| [DllImport("livesplit_core")] | |
| public static extern void TitleComponent_drop(IntPtr self); | |
| [DllImport("livesplit_core")] | |
| public static extern LSCoreString TitleComponent_state_as_json(IntPtr self, IntPtr timer); | |
| [DllImport("livesplit_core")] | |
| public static extern IntPtr TitleComponent_state(IntPtr self, IntPtr timer); | |
| [DllImport("livesplit_core")] | |
| public static extern void TitleComponentState_drop(IntPtr self); | |
| [DllImport("livesplit_core")] | |
| public static extern LSCoreString TitleComponentState_icon_change(IntPtr self); | |
| [DllImport("livesplit_core")] | |
| public static extern LSCoreString TitleComponentState_game(IntPtr self); | |
| [DllImport("livesplit_core")] | |
| public static extern LSCoreString TitleComponentState_category(IntPtr self); | |
| [DllImport("livesplit_core")] | |
| public static extern uint TitleComponentState_attempts(IntPtr self); | |
| } | |
| public class LSCoreString : SafeHandle | |
| { | |
| public LSCoreString() : base(IntPtr.Zero, false) { } | |
| public override bool IsInvalid | |
| { | |
| get { return false; } | |
| } | |
| public string AsString() | |
| { | |
| int len = 0; | |
| while (Marshal.ReadByte(handle, len) != 0) { ++len; } | |
| byte[] buffer = new byte[len]; | |
| Marshal.Copy(handle, buffer, 0, buffer.Length); | |
| return Encoding.UTF8.GetString(buffer); | |
| } | |
| protected override bool ReleaseHandle() | |
| { | |
| return true; | |
| } | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment