Skip to content

Conversation

fayccal
Copy link

@fayccal fayccal commented Feb 7, 2022

Hi, I added bindings for SDL_FlashWindow answering to issue #1174 .
A review would be very appreciated since it is my first contribution :).

@fayccal fayccal mentioned this pull request Feb 7, 2022
}

#[doc(alias = "SDL_FlashWindow")]
pub fn flash_window(&mut self, operation: sys::SDL_FlashOperation) -> Result<(), String> {

Choose a reason for hiding this comment

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

probably should just be called pub fn flash(…)

Copy link
Author

Choose a reason for hiding this comment

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

okay i will change that.

Copy link
Member

@Cobrand Cobrand left a comment

Choose a reason for hiding this comment

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

How did you generate sdl-bindings.rs? Using bindgen? This file is automatically generated, you cannot edit it manually.

You should create another enum FlashOperation in SDL2 which translates to sdl2_sys::SDL_FlashOperation . There are many examples of this in this repo, for instance MouseButton.

Use cargo fmt --check to make sure your code is fmt compliant. From one look I can tell that the else being on a separate line than its } will error the fmt check.

@fayccal
Copy link
Author

fayccal commented Feb 7, 2022

Okay thanks you, I will change that according to what you said .

@antonilol
Copy link
Contributor

This has been added in #1213 a few years ago, closing

@antonilol antonilol closed this Mar 20, 2025
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