Last active
January 9, 2023 21:37
-
-
Save PedroHLC/5331234 to your computer and use it in GitHub Desktop.
SDL 2.0 Binding for Vala
This file contains 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
using GLib; | |
using SDL; | |
public class Example { | |
protected static SDL.Window window; | |
public static void main () { | |
SDL.init (); | |
window = new Window ("Testing SDL 2.0 in Vala", Window.POS_CENTERED, Window.POS_CENTERED, 640, 480, WindowFlags.RESIZABLE); | |
window.show (); | |
Event e; | |
for (e = {0}; e.type != EventType.QUIT; Event.poll (out e)){ | |
window.update_surface (); | |
SDL.Timer.delay(10); | |
} | |
window.destroy (); //Actually useless since it is called when window is disposed | |
SDL.quit (); | |
} | |
} |
This file contains 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
To make it easily for me to maintain, this file has been moved to: | |
https://gitorious.org/sdl-2-0-vala-vapi/pedrohlc-sdl2-vala-vapi/source/sdl2-image.vapi |
This file contains 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
To make it easily for me to maintain, this file has been moved to: | |
https://gitorious.org/sdl-2-0-vala-vapi/pedrohlc-sdl2-vala-vapi/source/sdl2.vapi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment