1with agar.core; 2with interfaces.c; 3 4package agar.gui is 5 package c renames interfaces.c; 6 7 -- Flags for init_video 8 type video_flags_t is new c.unsigned; 9 HWSURFACE : constant video_flags_t := 16#001#; 10 ASYNCBLIT : constant video_flags_t := 16#002#; 11 ANYFORMAT : constant video_flags_t := 16#004#; 12 HWPALETTE : constant video_flags_t := 16#008#; 13 DOUBLEBUF : constant video_flags_t := 16#010#; 14 FULLSCREEN : constant video_flags_t := 16#020#; 15 RESIZABLE : constant video_flags_t := 16#040#; 16 NOFRAME : constant video_flags_t := 16#080#; 17 BGPOPUPMENU : constant video_flags_t := 16#100#; 18 OPENGL : constant video_flags_t := 16#200#; 19 OPENGL_OR_SDL : constant video_flags_t := 16#400#; 20 NOBGCLEAR : constant video_flags_t := 16#800#; 21 SDL : constant video_flags_t := 16#2000#; 22 23 function init (flags : agar.core.init_flags_t := 0) return boolean; 24 pragma inline (init); 25 26 function init_video 27 (width : positive; 28 height : positive; 29 bpp : natural; 30 flags : video_flags_t := 0) return boolean; 31 pragma inline (init_video); 32 33 procedure destroy; 34 pragma import (c, destroy, "AG_DestroyGUI"); 35 36 procedure event_loop; 37 pragma import (c, event_loop, "agar_event_loop"); 38 39 procedure event_loop_fixed_fps; 40 pragma import (c, event_loop_fixed_fps, "AG_EventLoop_FixedFPS"); 41 42end agar.gui; 43