ysbaddaden / sdl.cr

SDL2 bindings for Crystal
102 stars 32 forks source link

Added SDL_GetWindowWMInfo support, and additional window flags #24

Closed ReallyComeOn closed 6 years ago

ReallyComeOn commented 6 years ago

SDL_GetWindowWMInfo can be used like so:

    window = SDL::Window.new("Window", 640, 480)
    renderer = SDL::Renderer.new(window)

    win_info = LibSDL::SDL_WMInfo.new
    win_info.version.major = 2
    win_info.version.minor = 0
    win_info.version.patch = 1

    if LibSDL.get_window_wm_info window, pointerof(win_info)
      puts "SUCCESS!"
    else
      puts "FAILED?"
    end
    puts win_info

I also added 5 additional x11 specific window flags.

ysbaddaden commented 6 years ago

Thanks!