Property definitions

egl $ EGLError :: defaultinit
extern class EGLError `{ EGLint `}
	fun is_success: Bool `{ return self == EGL_SUCCESS; `}

	fun is_not_initialized: Bool `{ return self == EGL_NOT_INITIALIZED; `}
	fun is_bad_access: Bool `{ return self == EGL_BAD_ACCESS; `}
	fun is_bad_alloc: Bool `{ return self == EGL_BAD_ALLOC; `}
	fun is_bad_attribute: Bool `{ return self == EGL_BAD_ATTRIBUTE; `}
	fun is_bad_config: Bool `{ return self == EGL_BAD_CONFIG; `}
	fun is_bad_context: Bool `{ return self == EGL_BAD_CONTEXT; `}
	fun is_bad_current_surface: Bool `{ return self == EGL_BAD_CURRENT_SURFACE; `}
	fun is_bad_display: Bool `{ return self == EGL_BAD_DISPLAY; `}
	fun is_bad_match: Bool `{ return self == EGL_BAD_MATCH; `}
	fun is_bad_native_pixmap: Bool `{ return self == EGL_BAD_NATIVE_PIXMAP; `}
	fun is_bad_native_window: Bool `{ return self == EGL_BAD_NATIVE_WINDOW; `}
	fun is_bad_parameter: Bool `{ return self == EGL_BAD_PARAMETER; `}
	fun is_bad_surface: Bool `{ return self == EGL_BAD_SURFACE; `}
	fun is_context_lost: Bool `{ return self == EGL_CONTEXT_LOST; `}

	redef fun to_s
	do
		if is_not_initialized then return "Not initialized"
		if is_bad_access then return "Bad access"
		if is_bad_alloc then return "Bad allocation"
		if is_bad_attribute then return "Bad attribute"
		if is_bad_config then return "Bad configuration"
		if is_bad_context then return "Bad context"
		if is_bad_current_surface then return "Bad current surface"
		if is_bad_display then return "Bad display"
		if is_bad_match then return "Bad match"
		if is_bad_native_pixmap then return "Bad native pixmap"
		if is_bad_native_window then return "Bad native window"
		if is_bad_parameter then return "Bad parameter"
		if is_bad_surface then return "Bad surface"
		if is_context_lost then return "Context lost"
		return "Unknown error" # this is not good
	end
end
lib/egl/egl.nit:313,1--349,3