dart_sdl library
Dart bindings for sdl.
Start by creating an Sdl instance:
final sdl = Sdl(DynamicLibrary.open('sdl2.dll'));
Next, you need to initialise the library:
sdl.init();
For more information, see the SDL API docs.
Classes
- AppDidEnterBackgroundEvent
- The application entered background.
- AppDidEnterForegroundEvent
- The application entered foreground.
- AppLowMemoryEvent
- The OS is low on memory.
- AppTerminatingEvent
- The OS is terminating the application.
- AppWillEnterBackgroundEvent
- The application is entering background.
- AppWillEnterForegroundEvent
- The application is entering foreground.
- AudioDevice
- An audio device on the system.
- AudioDeviceAddedEvent
- A device was added.
- AudioDeviceEvent
- An audio device event.
- AudioDeviceRemovedEvent
- A device was removed.
- AudioDriver
- An audio driver on the system.
- AudioSpec
- Audio specification.
- BordersSize
- A class to represent the size of a window's borders.
- ClipboardChangedEvent
- The clipboard changed.
- ConditionEffect
- A 3-part number for use with HapticCondition members.
- ControllerAxisEvent
- A controller axis moved.
- ControllerButtonEvent
- A controller button was pressed or released.
- ControllerDeviceEvent
- A device was added, removed, or remapped.
- ControllerSensorEvent
- A controller sensor event.
- ControllerTouchpadEvent
- A controller touch device event.
- Display
- The display class.
- DisplayChangedEvent
- SDL_WINDOWEVENT_DISPLAY_CHANGED.
- DisplayEvent
- A generic display event.
- DisplayMode
- A display mode.
- DollarGestureEvent
- A gesture event.
- DropEvent
- A drag and drop event.
- Event
- The base event class.
- GameController
- A game controller.
- GameControllerEvent
- The base for all game controller events.
- Haptic
- A haptic device.
- HapticCondition
- A conditional haptic effect.
- HapticConstant
- A constant haptic effect.
- HapticDirection
- A structure that contains a haptic direction.
- HapticEffect
- A haptic effect.
- HapticLeftRight
- A left/right effect.
- HapticPeriodic
- A periodic haptic effect.
- HapticRamp
- A ramp effect.
- IccprofChangedEvent
- SDL_WINDOWEVENT_ICCPROF_CHANGED.
- JoyAxisEvent
- An axis on a joystick was moved.
- JoyBallEvent
- A trackball was moved.
- JoyButtonEvent
- A button was pressed or released.
- JoyDeviceEvent
- A joystick device was connected or disconnected.
- JoyHatEvent
- A hat on a joystick has moved.
- Joystick
- A joystick device.
- JoystickEvent
- The base class for all joystick events.
- KeyboardEvent
- A keyboard event.
- KeyboardKey
- A keyboard key.
- KeymapChangedEvent
- The keymap changed due to a system event such as an input language or keyboard layout change (>= SDL 2.0.4).
- LocaleChangedEvent
- Locale changed.
- MessageBoxButton
- A button for use in an SDL message box.
- MouseButtonEvent
- A mouse button has been pressed or released.
- MouseEvent
- The base class for all mouse events.
- MouseMotionEvent
- A mouse has moved in the window.
- MouseWheelEvent
- A mouse wheel event.
- MultiGestureEvent
- A multifinger gesture was made.
- OpenAudioDevice
- An open device.
- PollSentinelEvent
- SDL_POLLSENTINEL.
- QuitEvent
- User requested quit.
- RenderDeviceReset
- The device has been reset and all textures need to be recreated.
- RenderTargetsResetEvent
- The render targets have been reset and their contents need to be updated.
- Sdl
- The main SDL class.
- SensorEvent
- A sensor update event.
- SysWmEvent
- A system specific event.
- TextEditingEvent
- Keyboard text editing (composition).
- TextInputEvent
- Keyboard text input.
- TouchFingerEvent
- A touch event.
- UserEvent
- A user event.
- WaveFile
- A class representing a wave file.
- Window
- An SDL Window.
- WindowClosedEvent
- The window manager requests that the window be closed.
- WindowEnterEvent
- A window has gained focus.
- WindowEvent
- A window state change.
- WindowExposedEvent
- A window has been exposed and should be redrawn.
- WindowFocusGainedEvent
- A window has gained keyboard focus.
- WindowFocusLostEvent
- A window has lost keyboard focus.
- WindowHiddenEvent
- A window has been hidden.
- WindowHitTestEvent
- A window had an abnormal hit test.
- WindowLeaveEvent
- A window has lost mouse focus.
- WindowMaximizedEvent
- A window has been maximised.
- WindowMinimizedEvent
- A window has been minimised.
- WindowMovedEvent
- A window has been moved.
- WindowResizedEvent
- A window has been resized.
- WindowRestoredEvent
- A window has been restored.
- WindowShownEvent
- A window has been shown.
- WindowSize
- The size of a window.
- WindowSizeChangedEvent
- The size of a window has changed.
- WindowTakeFocusEvent
- A window is being offered focus.
Enums
- ArrayOrder
- SDL_ArrayOrder.
- AssertState
- SDL_AssertState.
- AudioStatus
- SDL_AudioStatus.
- BitmapOrder
- SDL_BitmapOrder.
- BlendFactor
- SDL_BlendFactor.
- BlendMode
- SDL_BlendMode.
- BlendOperation
- SDL_BlendOperation.
- ControllerTouchpadEventType
- Types for a ControllerTouchpadEvent.
- DeviceState
- Whether a device was added or removed.
- DisplayEventID
- SDL_DisplayEventID.
- DisplayOrientation
- SDL_DisplayOrientation.
- DollarGestureEventType
- Dollar event types.
- DropEventType
- The types for DropEvent instances.
- ErrorCode
- SDL_errorcode.
- EventAction
- SDL_eventaction.
- EventType
- SDL_EventType.
- FlashOperation
- SDL_FlashOperation.
- FullScreenMode
- Full screen modes.
- GameControllerAxis
- SDL_GameControllerAxis.
- GameControllerBindType
- SDL_GameControllerBindType.
- GameControllerButton
- SDL_GameControllerButton.
- GameControllerType
- SDL_GameControllerType.
- GLattr
- SDL_GLattr.
- GLcontextFlag
- SDL_GLcontextFlag.
- GLcontextReleaseFlag
- SDL_GLcontextReleaseFlag.
- GLContextResetNotification
- SDL_GLContextResetNotification.
- GLprofile
- SDL_GLprofile.
- HapticConditionType
- The type of a conditional haptic effect.
- HapticDirectionType
- Haptic directions.
- HapticFeature
- An enumeration of SDL haptic types.
- HapticPeriodicType
- The type of a haptic effect.
- HintPriority
- SDL_HintPriority.
- HitTestResult
- SDL_HitTestResult.
- JoyHatValue
- Possible joystick hat values.
- JoystickPowerLevel
- SDL_JoystickPowerLevel.
- JoystickType
- SDL_JoystickType.
- KeyCode
- Keycodes.
- KeyMod
-
Binds
SDL_Keymod
. - LogCategory
- SDL_LogCategory.
- LogPriority
- SDL_LogPriority.
- MessageBoxButtonFlags
- SDL_MessageBoxButtonFlags.
- MessageBoxColorType
- SDL_MessageBoxColorType.
- MessageBoxFlags
- SDL_MessageBoxFlags.
- MouseButton
- Which mouse button was used.
- MouseWheelDirection
- SDL_MouseWheelDirection.
- PackedLayout
- SDL_PackedLayout.
- PackedOrder
- SDL_PackedOrder.
- PixelFormat
- SDL_PixelFormatEnum.
- PixelType
- SDL_PixelType.
- PowerState
- SDL_PowerState.
- PressedState
- Pressed state.
- RendererFlags
- SDL_RendererFlags.
- RendererFlip
- SDL_RendererFlip.
- ScaleMode
- SDL_ScaleMode.
- ScanCode
- Scancodes.
- SdlBool
- SDL_bool.
- SensorType
- SDL_SensorType.
- SystemCursor
- SDL_SystemCursor.
- TextureAccess
- SDL_TextureAccess.
- TextureModulate
- SDL_TextureModulate.
- ThreadPriority
- SDL_ThreadPriority.
- TouchDeviceType
- SDL_TouchDeviceType.
- TouchFingerEventType
- Touch finger event types.
- WindowEventID
- SDL_WindowEventID.
- WindowFlags
- SDL_WindowFlags.
- YuvConversionMode
- SDL_YUV_CONVERSION_MODE.
Mixins
-
CoordinatesMixin<
T extends num> - Add coordinates to any event type.
- WindowMixin
- For events which have window IDs.
Extensions
- ArrayOrderToInt on ArrayOrder
- An extension for converting Dart to C values.
- AssertStateToInt on AssertState
- An extension for converting Dart to C values.
- AudioStatusToInt on AudioStatus
- An extension for converting Dart to C values.
- BitmapOrderToInt on BitmapOrder
- An extension for converting Dart to C values.
- BlendFactorToInt on BlendFactor
- An extension for converting Dart to C values.
- BlendModeToInt on BlendMode
- An extension for converting Dart to C values.
- BlendOperationToInt on BlendOperation
- An extension for converting Dart to C values.
- DartSdlIntExtension on int
- Various extension methods for integers.
- DartSdlKeyCodeMethods on int
- An extension to return a KeyCode from an integer.
- DartSdlScanCodeMethods on int
- An extension to return a ScanCode from an integer.
- DisplayEventIDToInt on DisplayEventID
- An extension for converting Dart to C values.
- DisplayOrientationToInt on DisplayOrientation
- An extension for converting Dart to C values.
- ErrorCodeToInt on ErrorCode
- An extension for converting Dart to C values.
- EventActionToInt on EventAction
- An extension for converting Dart to C values.
- EventTypeToInt on EventType
- An extension for converting Dart to C values.
- FlashOperationToInt on FlashOperation
- An extension for converting Dart to C values.
- GameControllerAxisToInt on GameControllerAxis
- An extension for converting Dart to C values.
- GameControllerBindTypeToInt on GameControllerBindType
- An extension for converting Dart to C values.
- GameControllerButtonToInt on GameControllerButton
- An extension for converting Dart to C values.
- GameControllerTypeToInt on GameControllerType
- An extension for converting Dart to C values.
- GLattrToInt on GLattr
- An extension for converting Dart to C values.
- GLcontextFlagToInt on GLcontextFlag
- An extension for converting Dart to C values.
- GLcontextReleaseFlagToInt on GLcontextReleaseFlag
- An extension for converting Dart to C values.
- GLContextResetNotificationToInt on GLContextResetNotification
- An extension for converting Dart to C values.
- GLprofileToInt on GLprofile
- An extension for converting Dart to C values.
- HintPriorityToInt on HintPriority
- An extension for converting Dart to C values.
- HitTestResultToInt on HitTestResult
- An extension for converting Dart to C values.
- IntToC on int
- An extension for converting integers to Dart values.
- JoystickPowerLevelToInt on JoystickPowerLevel
- An extension for converting Dart to C values.
- JoystickTypeToInt on JoystickType
- An extension for converting Dart to C values.
- LogCategoryToInt on LogCategory
- An extension for converting Dart to C values.
- LogPriorityToInt on LogPriority
- An extension for converting Dart to C values.
- MessageBoxButtonFlagsToInt on MessageBoxButtonFlags
- An extension for converting Dart to C values.
- MessageBoxColorTypeToInt on MessageBoxColorType
- An extension for converting Dart to C values.
- MessageBoxFlagsToInt on MessageBoxFlags
- An extension for converting Dart to C values.
- MouseButtonPressedStateExtension on int
- Add conversions to mouse structures.
- MouseWheelDirectionToInt on MouseWheelDirection
- An extension for converting Dart to C values.
- PackedLayoutToInt on PackedLayout
- An extension for converting Dart to C values.
- PackedOrderToInt on PackedOrder
- An extension for converting Dart to C values.
- PixelFormatToInt on PixelFormat
- An extension for converting Dart to C values.
- PixelTypeToInt on PixelType
- An extension for converting Dart to C values.
- PowerStateToInt on PowerState
- An extension for converting Dart to C values.
- RendererFlagsToInt on RendererFlags
- An extension for converting Dart to C values.
- RendererFlipToInt on RendererFlip
- An extension for converting Dart to C values.
- ScaleModeToInt on ScaleMode
- An extension for converting Dart to C values.
- SdlBoolToInt on SdlBool
- An extension for converting Dart to C values.
- SdlFullScreenModeValues on FullScreenMode
- An extension for converting to an SDL flag.
- SdlHapticConstantEffectTypeValues on HapticConditionType
- An extension for converting to an SDL flag.
- SdlHapticDirectionTypeValues on HapticDirectionType
- An extension for converting to an SDL flag.
- SdlHapticEffectTypeValues on HapticPeriodicType
- An extension for converting to an SDL flag.
- SdlKeyCodeValueExtension on KeyCode
- An extension to return an integer from a KeyCode value.
- SdlKeyModValues on KeyMod
- An extension for converting to an SDL flag.
-
SdlListMethods
on List<
int> - Various list methods used by this package.
- SdlScancodeValueExtension on ScanCode
- An extension to return an integer from a ScanCode value.
- SdlStringValues on String
-
An extension for converting strings to
dart_sdl
values. - SensorTypeToInt on SensorType
- An extension for converting Dart to C values.
- SystemCursorToInt on SystemCursor
- An extension for converting Dart to C values.
- TextureAccessToInt on TextureAccess
- An extension for converting Dart to C values.
- TextureModulateToInt on TextureModulate
- An extension for converting Dart to C values.
- ThreadPriorityToInt on ThreadPriority
- An extension for converting Dart to C values.
- TouchDeviceTypeToInt on TouchDeviceType
- An extension for converting Dart to C values.
- WindowEventIDToInt on WindowEventID
- An extension for converting Dart to C values.
- WindowFlagsToInt on WindowFlags
- An extension for converting Dart to C values.
- YuvConversionModeToInt on YuvConversionMode
- An extension for converting Dart to C values.