Property definitions

sdl2 $ SDLInitFlags :: defaultinit
# Flags for `sys.sdl.initialize` and related methods
extern class SDLInitFlags `{ Uint32 `}
	# Get the default empty flag set
	new `{ return 0; `}

	# Add the timer subsystem
	fun timer: SDLInitFlags `{ return self | SDL_INIT_TIMER; `}

	# Add the audio subsystem
	fun audio: SDLInitFlags `{ return self | SDL_INIT_AUDIO; `}

	# Add the video subsystem
	fun video: SDLInitFlags `{ return self | SDL_INIT_VIDEO; `}

	# Add the joystick subsystem
	#
	# Implied by `gamecontroller`
	fun joystick: SDLInitFlags `{ return self | SDL_INIT_JOYSTICK; `}

	# Add the haptic subsystem
	fun haptic: SDLInitFlags `{ return self | SDL_INIT_HAPTIC; `}

	# Add the gamecontroller subsystem
	fun gamecontroller: SDLInitFlags `{ return self | SDL_INIT_GAMECONTROLLER; `}

	# Add the events subsystem
	#
	# Implied by `video` and `joystick`
	fun events: SDLInitFlags `{ return self | SDL_INIT_EVENTS; `}

	# Add all subsystems
	fun everything: SDLInitFlags `{ return self | SDL_INIT_EVERYTHING; `}

	# Is this flag set empty?
	fun is_empty: Bool `{ return self == 0; `}

	# TODO add all other is_
end
lib/sdl2/sdl2_base.nit:100,1--137,3