toDisplayEventID method
Convert from a SDL_DisplayEventID
member.
Implementation
DisplayEventID toDisplayEventID() {
switch (this) {
case SDL_DisplayEventID.SDL_DISPLAYEVENT_NONE:
return DisplayEventID.none;
case SDL_DisplayEventID.SDL_DISPLAYEVENT_ORIENTATION:
return DisplayEventID.orientation;
case SDL_DisplayEventID.SDL_DISPLAYEVENT_CONNECTED:
return DisplayEventID.connected;
case SDL_DisplayEventID.SDL_DISPLAYEVENT_DISCONNECTED:
return DisplayEventID.disconnected;
default:
throw SdlError(
this,
'Unrecognised `SDL_DisplayEventID` member.',
);
}
}