-
Notifications
You must be signed in to change notification settings - Fork 475
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
binding for SDL_FlashWindow added #1204
base: master
Are you sure you want to change the base?
Conversation
@@ -1768,6 +1768,17 @@ impl Window { | |||
Ok(opacity) | |||
} | |||
} | |||
|
|||
#[doc(alias = "SDL_FlashWindow")] | |||
pub fn flash_window(&mut self, operation: sys::SDL_FlashOperation) -> Result<(), String> { |
There was a problem hiding this comment.
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(…)
There was a problem hiding this comment.
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.
There was a problem hiding this 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.
Okay thanks you, I will change that according to what you said . |
Hi, I added bindings for
SDL_FlashWindow
answering to issue #1174 .A review would be very appreciated since it is my first contribution :).