Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
SDL.Hint
Synopsis
- data Hint v where
- HintAccelerometerAsJoystick :: Hint AccelerometerJoystickOptions
- HintFramebufferAcceleration :: Hint FramebufferAccelerationOptions
- HintMacCTRLClick :: Hint MacCTRLClickOptions
- HintMouseRelativeModeWarp :: Hint MouseModeWarpOptions
- HintRenderDriver :: Hint RenderDrivers
- HintRenderOpenGLShaders :: Hint RenderOpenGLShaderOptions
- HintRenderScaleQuality :: Hint RenderScaleQuality
- HintRenderVSync :: Hint RenderVSyncOptions
- HintVideoWinD3DCompiler :: Hint VideoWinD3DCompilerOptions
- setHintWithPriority :: MonadIO m => HintPriority -> Hint v -> v -> m Bool
- data HintPriority
- clearHints :: MonadIO m => m ()
- data AccelerometerJoystickOptions
- data FramebufferAccelerationOptions
- data MacCTRLClickOptions
- data MouseModeWarpOptions
- data RenderDrivers
- data RenderOpenGLShaderOptions
- data RenderScaleQuality
- data RenderVSyncOptions
- data VideoWinD3DCompilerOptions
Getting and setting hints
The Hint
type exports a well-typed interface to SDL's concept of
hints. This type has instances for
both HasGetter
and HasSetter
, allowing you to get and set hints. Note that
the HasSetter
interface is fairly relaxed - if a hint cannot be set, the
failure will be silently discarded. For more feedback and control when setting
hints, see setHintWithPriority
.
Constructors
setHintWithPriority :: MonadIO m => HintPriority -> Hint v -> v -> m Bool Source #
Set the value of a hint, applying priority rules for when there is a conflict. Ordinarily, a hint will not be set if there is an existing override hint or environment variable that takes precedence.
data HintPriority Source #
How to deal with setting hints when an existing override or environment variable is present.
Constructors
DefaultPriority | Low priority, used for default values |
NormalPriority | Medium priority |
OverridePriority | High priority |
Instances
clearHints :: MonadIO m => m () Source #
Hint Information
HintAccelerometerAsJoystick
data AccelerometerJoystickOptions Source #
A hint that specifies whether the Android/iOS built-in accelerometer should be listed as a joystick device, rather than listing actual joysticks only. By default SDL will list real joysticks along with the accelerometer as if it were a 3 axis joystick.
Constructors
AccelerometerNotJoystick | List only real joysticks and accept input from them |
AccelerometerIsJoystick | List real joysticks along with the accelerometer as if it were a 3 axis joystick (the default) |
Instances
HintFramebufferAcceleration
data FramebufferAccelerationOptions Source #
A hint that specifies how 3D acceleration is used to accelerate the SDL screen surface. By default SDL tries to make a best guess whether to use acceleration or not on each platform.
Constructors
Disable3D | Disable 3D acceleration |
Enable3DDefault | Enable 3D acceleration, using the default renderer |
Enable3DDirect3D | Enable 3D acceleration using Direct3D |
Enable3DOpenGL | Enable 3D acceleration using OpenGL |
Enable3DOpenGLES | Enable 3D acceleration using OpenGLES |
Enable3DOpenGLES2 | Enable 3D acceleration using OpenGLES2 |
Enable3DSoftware | Enable 3D acceleration using software rendering |
Instances
HintMacCTRLClick
data MacCTRLClickOptions Source #
A hint that specifies whether ctrl+click should generate a right-click event on Mac. By default holding ctrl while left clicking will not generate a right click event when on Mac.
Constructors
NoRightClick | Disable emulating right click |
EmulateRightClick | Enable emulating right click |
Instances
HintMouseRelativeModeWarp
data MouseModeWarpOptions Source #
A hint that specifies whether relative mouse mode is implemented using mouse warping. By default SDL will use raw input for relative mouse mode
Constructors
MouseRawInput | Relative mouse mode uses the raw input |
MouseWarping | Relative mouse mode uses mouse warping |
Instances
HintRenderDriver
data RenderDrivers Source #
A hint that specifies which render driver to use. By default the first one in the list that is available on the current platform is chosen.
Instances
HintRenderOpenGLShaders
data RenderOpenGLShaderOptions Source #
A hint that specifies whether the OpenGL render driver uses shaders. By default shaders are used if OpenGL supports them.
Constructors
DisableShaders | Disable shaders |
EnableShaders | Enable shaders, if they are available |
Instances
HintRenderScaleQuality
data RenderScaleQuality Source #
A hint that specifies scaling quality. By default nearest pixel sampling is used.
Constructors
ScaleNearest | Nearest pixel sampling |
ScaleLinear | linear filtering (supported by OpenGL and Direct3D) |
ScaleBest | Anisotropic filtering (supported by Direct3D) |
Instances
HintRenderVSync
data RenderVSyncOptions Source #
A hint that specifies whether sync to vertical refresh is enabled or disabled to avoid tearing. By default SDL uses the flag passed into calls to create renderers.
Constructors
DisableVSync | |
EnableVSync |
Instances
HintVideoWinD3DCompiler
data VideoWinD3DCompilerOptions Source #
A hint that specifies which shader compiler to preload when using the Chrome
ANGLE binaries. By default d3dcompiler_46.dll
will be used.
Constructors
D3DVistaOrLater | Use |
D3DXPSupport | Use |
D3DNone | Do not load any library, useful if you compiled ANGLE from source and included the compiler in your binaries |