Skip to content

Add methods to Window class (C#)#108

Merged
omckeon merged 12 commits intothoth-tech:t1-2025from
sam-stajnko:window_methods
Jun 18, 2025
Merged

Add methods to Window class (C#)#108
omckeon merged 12 commits intothoth-tech:t1-2025from
sam-stajnko:window_methods

Conversation

@sam-stajnko
Copy link
Copy Markdown

@sam-stajnko sam-stajnko commented May 6, 2025

Description

The Window class in the generated C# file is missing some methods. Therefore, the header files containing the relevant function declarations need to be updated so that the translator can generate the missing methods.

Fixes

Missing attributes were added to the header docs for the following functions that are currently missing from the Window class:

  • RandomWindowPoint
  • CurrentClip, PopClip, PushClip, ResetClip, SetClip
  • OptionDrawTo
  • TakeScreenshot
  • GetPixelFromWindow
  • FillQuadOnWindow
  • EndReadingText, ReadingText, StartReadingText, TextEntryCancelled, TextInput

The translator was then ran to generate the api.json and SplashKit.cs files.

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Documentation (update or new)

How Has This Been Tested?

  • Checked api.json to see if the correct signatures were generated
  • Checked SplashKit.cs to see if the methods were added to the Window class

(Both of the above files are located in the generated folder)

Testing Checklist

  • Does api.json contain the signatures for the missing method(s)?
  • Does the Window class in SplashKit.cs contain the missing methods?

Checklist

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings

Copy link
Copy Markdown

@dijidiji dijidiji left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No suggestions, approved.

How has this been tested?

  • Copy api.json to local splaskit.io-starlight
  • npm run build
  • npm run preview

Confirmed that api.json has methods for the following and that they show up on the site in local testing:

  • RandomWindowPoint
  • CurrentClip
  • PopClip
  • PushClip
  • ResetClip
  • SetClip
  • OptionDrawTo
  • TakeScreenshot
  • GetPixelFromWindow
  • FillQuadOnWindow
  • EndReadingText
  • ReadingText
  • StartReadingText
  • TextEntryCancelled
  • TextInput

e.g.:
image
image

Confirmed that the methods were generated for the following in SplashKit.cs:

  • RandomWindowPoint
  • CurrentClip
  • PopClip
  • PushClip
  • ResetClip
  • SetClip
  • OptionDrawTo
  • TakeScreenshot
  • GetPixelFromWindow
  • FillQuadOnWindow
  • EndReadingText
  • ReadingText
  • StartReadingText
  • TextEntryCancelled
  • TextInput

Copy link
Copy Markdown

@Oliver-Quail Oliver-Quail left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @sam-stajnko,

I have read over your code and the previous review. I have no suggestions for improvements. I approve this PR

@omckeon omckeon self-assigned this May 31, 2025
@omckeon omckeon changed the base branch from develop to t1-2025 June 16, 2025 14:33
@omckeon omckeon merged commit b12c934 into thoth-tech:t1-2025 Jun 18, 2025
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants