Open
Conversation
This reverts commit 37b7472.
Oliver-Quail
approved these changes
Jul 28, 2025
Oliver-Quail
left a comment
There was a problem hiding this comment.
Hi @sam-stajnko,
I have tested your PR locally and have no issues with this PR. I have also found no issues with your code. I approve this PR
rory-cd
approved these changes
Nov 30, 2025
rory-cd
left a comment
There was a problem hiding this comment.
This PR clearly states the problem and addresses it, adding missing function attribute tags to ensure the translator runs correctly.
Testing
- Pulled PR branch and ran SplashKit Translator
- Checked generated files api.json (Doc) and SplashKit.cs (C# bindings)
- Ensured each affected function has a C# method being generated.
Example outputs
For bool bitmap_button(bitmap bmp, const rectangle& rect);
From api.json:
"attributes": {
"class": "bitmap",
"method": "button",
"self": "bmp",
"suffix": "at_position",
"group": "interface",
"static": "interface"
},
From SplashKit.cs:
/// Creates a button with a bitmap in it at a specific position on screen. Returns whether the button was clicked.
/// </summary>
/// <param name="bmp"> The bitmap to show inside the button</param>
/// <param name="rect"> The rectangle to display the button in</param>
/// <returns>Whether the button was clicked</returns>
public static bool BitmapButton(Bitmap bmp, Rectangle rect)
{
__sklib_ptr __skparam__bmp;
__sklib_rectangle __skparam__rect;
int __skreturn;
__skparam__bmp = __skadapter__to_sklib_bitmap(bmp);
__skparam__rect = __skadapter__to_sklib_rectangle(rect);
__skreturn = __sklib__bitmap_button__bitmap__rectangle_ref(__skparam__bmp, __skparam__rect);
return __skadapter__to_bool(__skreturn);
}```
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
If you have ever looked at the header files (.h) in the core-sdk folder, you might've noticed the attribute tags above some of the function declarations. These are called 'HeaderDoc' attributes and they are used by the translator when the source code is translated from C++ into the different target languages such as Python, C# and Pascal. There are four different attributes that you should be aware of:
Many functions in the Splashkit Core Library are missing attributes in the header documentation and therefore, the translator is failing to generate methods for the C# implementation. To fix this, I have searched through the repository for functions that are missing attributes in the header file and then added the attributes.
This has been done for the following bitmap functions:
Fixes # (issue)
Type of change
Please delete options that are not relevant.
expected)
How Has This Been Tested?
Please describe the tests that you ran to verify your changes. Provide instructions so we can
reproduce. Please also list any relevant details for your test configuration
To test this pull request, you can run the translator and check the generated C# source code and api.json files. The file api.json lists the signatures of all generated functions so by looking for the functions where header documentation has been added, it should be easy to find out if they are being successfully generated as methods to their relevant class.
If you don't want to run the translator, you don't have to. I have run the translator in one of my commits but I reverted the changes afterwards. Therefore, simply go through the commit history and find the one that is named "Generate Files".
As a word of caution, I don't think the generator has been run on the main repo for a while so there is probably a lot of generated material that isn't related to this pull request.
Testing Checklist
Checklist