Property definitions

sdl2 $ SDLTexture :: defaultinit
# A loaded bitmap texture
extern class SDLTexture `{ SDL_Texture * `}
	# Get a `SDLTexture` from a `surface`, for a given `renderer`
	new from_surface(renderer: SDLRenderer, surface: SDLSurface) `{
		return SDL_CreateTextureFromSurface(renderer, surface);
	`}

	# Destroy this texture
	fun destroy `{ SDL_DestroyTexture(self); `}

	# Width of this texture
	fun width: Int `{
		int val;
		SDL_QueryTexture(self, NULL, NULL, &val, NULL);
		return val;
	`}

	# Height of this texture
	fun height: Int `{
		int val;
		SDL_QueryTexture(self, NULL, NULL, NULL, &val);
		return val;
	`}

	# TODO other queries: format and access
end
lib/sdl2/sdl2_base.nit:445,1--470,3