Skip to content

SDL_FlashWindow? #1174

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

Closed
ctrlcctrlv opened this issue Dec 2, 2021 · 3 comments
Closed

SDL_FlashWindow? #1174

ctrlcctrlv opened this issue Dec 2, 2021 · 3 comments

Comments

@ctrlcctrlv
Copy link

Seems no API yet for SDL_FlashWindow. Until then I am abusing FFI:

impl Interface {
    pub fn flash_window(&mut self) {
        use std::ffi::c_void;
        extern "C" {
            fn SDL_FlashWindow(w: *mut c_void, o: isize);
        }
        unsafe {
            //                                                    2 == SDL_FLASH_UNTIL_FOCUSED
            SDL_FlashWindow(self.sdl_window.raw() as *mut c_void, 2); 
        }
    }
}
@Cobrand
Copy link
Member

Cobrand commented Dec 3, 2021

This is available since SDL2.0.16 so that explains it.

It should be fairly simple to add though.

@fayccal
Copy link

fayccal commented Feb 7, 2022

Hi, i am a CS student i would like to contribute to the project, i created #1204 pull request about this issue could you review it ?
Thanks you :)

@antonilol
Copy link
Contributor

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants