Property definitions

sdl2 $ SDLWindowFlags :: defaultinit
# Flags for `SDLWindow::new` and returned by `SDLWindow::flags`
extern class SDLWindowFlags `{ Uint32 `}
	# Get the default empty flag set
	new `{ return 0; `}

	# Add the flag requesting a fullscreen window
	fun fullscreen: SDLWindowFlags `{ return self | SDL_WINDOW_FULLSCREEN; `}

	# Add the flag requesting a fullscreen window for the current desktop
	fun fullscreen_desktop: SDLWindowFlags `{ return self | SDL_WINDOW_FULLSCREEN_DESKTOP; `}

	# Add the flag requesting a window usable with an OpenGL context
	fun opengl: SDLWindowFlags `{ return self | SDL_WINDOW_OPENGL; `}

	# Add the flag requesting a hidden window
	fun hidden: SDLWindowFlags `{ return self | SDL_WINDOW_HIDDEN; `}

	# Add the flag requesting a borderless window
	fun borderless: SDLWindowFlags `{ return self | SDL_WINDOW_BORDERLESS; `}

	# Add the flag requesting a resizable window
	fun resizable: SDLWindowFlags `{ return self | SDL_WINDOW_RESIZABLE; `}

	# Add the flag requesting a minimized window
	fun minimized: SDLWindowFlags `{ return self | SDL_WINDOW_MINIMIZED; `}

	# Add the flag requesting a maximimez window
	fun maximized: SDLWindowFlags `{ return self | SDL_WINDOW_MAXIMIZED; `}

	# Add the flag to grab the input focus
	fun input_grabbed: SDLWindowFlags `{ return self | SDL_WINDOW_INPUT_GRABBED; `}

	# Add the flag to request a window using the system High-DPI mode
	fun allow_highdpi: SDLWindowFlags `{
		#if SDL_VERSION_ATLEAST(2, 0, 2)
			return self | SDL_WINDOW_ALLOW_HIGHDPI;
		#else
			return self;
		#endif
	`}

	# Is the window shown?
	#
	# Can only be queried because it is ignored by `SDLWindow::new`
	fun is_shown: Bool `{ return self & SDL_WINDOW_SHOWN; `}

	# Does the window has the input focus?
	#
	# Can only be queried because it is ignored by `SDLWindow::new`
	fun has_input_focus: Bool `{ return self & SDL_WINDOW_INPUT_FOCUS; `}

	# Does the window has the mouse focus?
	#
	# Can only be queried because it is ignored by `SDLWindow::new`
	fun has_mouse_focus: Bool `{ return self & SDL_WINDOW_MOUSE_FOCUS; `}

	# TODO add all other `is_` methods, as needed
end
lib/sdl2/sdl2_base.nit:168,1--225,3