/usr/share/doc/libghc-sdl-doc/html/SDL.txt is in libghc-sdl-doc 0.6.5-4.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 | -- Hoogle documentation, generated by Haddock
-- See Hoogle, http://www.haskell.org/hoogle/
-- | Binding to libSDL
--
-- Simple DirectMedia Layer (libSDL) is a cross-platform multimedia
-- library designed to provide low level access to audio, keyboard,
-- mouse, joystick, 3D hardware via OpenGL, and 2D video framebuffer. It
-- is used by MPEG playback software, emulators, and many popular games,
-- including the award winning Linux port of "Civilization: Call To
-- Power."
@package SDL
@version 0.6.5
-- | Various small functions which makes the binding process easier.
module Graphics.UI.SDL.Utilities
class Enum a b | a -> b
succ :: Enum a b => a -> a
pred :: Enum a b => a -> a
toEnum :: Enum a b => b -> a
fromEnum :: Enum a b => a -> b
enumFromTo :: Enum a b => a -> a -> [a]
intToBool :: Int -> IO Int -> IO Bool
toBitmask :: (Enum a b, Bits b, Num b) => [a] -> b
fromBitmask :: (Bounded a, Enum a b, Bits b, Num b) => b -> [a]
fromCInt :: Num a => CInt -> a
toCInt :: Int -> CInt
module Graphics.UI.SDL.CPUInfo
-- | This function returns <tt>True</tt> if the CPU has the RDTSC
-- instruction.
hasRDTSC :: Bool
-- | This function returns <tt>True</tt> if the CPU has MMX features.
hasMMX :: Bool
-- | This function returns <tt>True</tt> if the CPU has MMX Ext. features.
hasMMXExt :: Bool
-- | This function returns <tt>True</tt> if the CPU has 3DNow features.
has3DNow :: Bool
-- | This function returns <tt>True</tt> if the CPU has 3DNow! Ext.
-- features.
has3DNowExt :: Bool
-- | This function returns <tt>True</tt> if the CPU has SSE features.
hasSSE :: Bool
-- | This function returns <tt>True</tt> if the CPU has SSE2 features.
hasSSE2 :: Bool
-- | This function returns <tt>True</tt> if the CPU has AltiVec features.
hasAltiVec :: Bool
module Graphics.UI.SDL.Version
compiledFor :: Version
linkedWith :: IO Version
instance Foreign.Storable.Storable Graphics.UI.SDL.Version.SDLVersion
module Graphics.UI.SDL.Keysym
data Keysym
Keysym :: SDLKey -> [Modifier] -> Char -> Keysym
[symKey] :: Keysym -> SDLKey
[symModifiers] :: Keysym -> [Modifier]
[symUnicode] :: Keysym -> Char
data Modifier
KeyModNone :: Modifier
KeyModLeftShift :: Modifier
KeyModRightShift :: Modifier
KeyModLeftCtrl :: Modifier
KeyModRightCtrl :: Modifier
KeyModLeftAlt :: Modifier
KeyModRightAlt :: Modifier
KeyModLeftMeta :: Modifier
KeyModRightMeta :: Modifier
KeyModNum :: Modifier
KeyModCaps :: Modifier
KeyModMode :: Modifier
KeyModCtrl :: Modifier
KeyModShift :: Modifier
KeyModAlt :: Modifier
KeyModMeta :: Modifier
data SDLKey
SDLK_UNKNOWN :: SDLKey
SDLK_FIRST :: SDLKey
SDLK_BACKSPACE :: SDLKey
SDLK_TAB :: SDLKey
SDLK_CLEAR :: SDLKey
SDLK_RETURN :: SDLKey
SDLK_PAUSE :: SDLKey
SDLK_ESCAPE :: SDLKey
SDLK_SPACE :: SDLKey
SDLK_EXCLAIM :: SDLKey
SDLK_QUOTEDBL :: SDLKey
SDLK_HASH :: SDLKey
SDLK_DOLLAR :: SDLKey
SDLK_AMPERSAND :: SDLKey
SDLK_QUOTE :: SDLKey
SDLK_LEFTPAREN :: SDLKey
SDLK_RIGHTPAREN :: SDLKey
SDLK_ASTERISK :: SDLKey
SDLK_PLUS :: SDLKey
SDLK_COMMA :: SDLKey
SDLK_MINUS :: SDLKey
SDLK_PERIOD :: SDLKey
SDLK_SLASH :: SDLKey
SDLK_0 :: SDLKey
SDLK_1 :: SDLKey
SDLK_2 :: SDLKey
SDLK_3 :: SDLKey
SDLK_4 :: SDLKey
SDLK_5 :: SDLKey
SDLK_6 :: SDLKey
SDLK_7 :: SDLKey
SDLK_8 :: SDLKey
SDLK_9 :: SDLKey
SDLK_COLON :: SDLKey
SDLK_SEMICOLON :: SDLKey
SDLK_LESS :: SDLKey
SDLK_EQUALS :: SDLKey
SDLK_GREATER :: SDLKey
SDLK_QUESTION :: SDLKey
SDLK_AT :: SDLKey
SDLK_LEFTBRACKET :: SDLKey
SDLK_BACKSLASH :: SDLKey
SDLK_RIGHTBRACKET :: SDLKey
SDLK_CARET :: SDLKey
SDLK_UNDERSCORE :: SDLKey
SDLK_BACKQUOTE :: SDLKey
SDLK_a :: SDLKey
SDLK_b :: SDLKey
SDLK_c :: SDLKey
SDLK_d :: SDLKey
SDLK_e :: SDLKey
SDLK_f :: SDLKey
SDLK_g :: SDLKey
SDLK_h :: SDLKey
SDLK_i :: SDLKey
SDLK_j :: SDLKey
SDLK_k :: SDLKey
SDLK_l :: SDLKey
SDLK_m :: SDLKey
SDLK_n :: SDLKey
SDLK_o :: SDLKey
SDLK_p :: SDLKey
SDLK_q :: SDLKey
SDLK_r :: SDLKey
SDLK_s :: SDLKey
SDLK_t :: SDLKey
SDLK_u :: SDLKey
SDLK_v :: SDLKey
SDLK_w :: SDLKey
SDLK_x :: SDLKey
SDLK_y :: SDLKey
SDLK_z :: SDLKey
SDLK_DELETE :: SDLKey
SDLK_WORLD_0 :: SDLKey
SDLK_WORLD_1 :: SDLKey
SDLK_WORLD_2 :: SDLKey
SDLK_WORLD_3 :: SDLKey
SDLK_WORLD_4 :: SDLKey
SDLK_WORLD_5 :: SDLKey
SDLK_WORLD_6 :: SDLKey
SDLK_WORLD_7 :: SDLKey
SDLK_WORLD_8 :: SDLKey
SDLK_WORLD_9 :: SDLKey
SDLK_WORLD_10 :: SDLKey
SDLK_WORLD_11 :: SDLKey
SDLK_WORLD_12 :: SDLKey
SDLK_WORLD_13 :: SDLKey
SDLK_WORLD_14 :: SDLKey
SDLK_WORLD_15 :: SDLKey
SDLK_WORLD_16 :: SDLKey
SDLK_WORLD_17 :: SDLKey
SDLK_WORLD_18 :: SDLKey
SDLK_WORLD_19 :: SDLKey
SDLK_WORLD_20 :: SDLKey
SDLK_WORLD_21 :: SDLKey
SDLK_WORLD_22 :: SDLKey
SDLK_WORLD_23 :: SDLKey
SDLK_WORLD_24 :: SDLKey
SDLK_WORLD_25 :: SDLKey
SDLK_WORLD_26 :: SDLKey
SDLK_WORLD_27 :: SDLKey
SDLK_WORLD_28 :: SDLKey
SDLK_WORLD_29 :: SDLKey
SDLK_WORLD_30 :: SDLKey
SDLK_WORLD_31 :: SDLKey
SDLK_WORLD_32 :: SDLKey
SDLK_WORLD_33 :: SDLKey
SDLK_WORLD_34 :: SDLKey
SDLK_WORLD_35 :: SDLKey
SDLK_WORLD_36 :: SDLKey
SDLK_WORLD_37 :: SDLKey
SDLK_WORLD_38 :: SDLKey
SDLK_WORLD_39 :: SDLKey
SDLK_WORLD_40 :: SDLKey
SDLK_WORLD_41 :: SDLKey
SDLK_WORLD_42 :: SDLKey
SDLK_WORLD_43 :: SDLKey
SDLK_WORLD_44 :: SDLKey
SDLK_WORLD_45 :: SDLKey
SDLK_WORLD_46 :: SDLKey
SDLK_WORLD_47 :: SDLKey
SDLK_WORLD_48 :: SDLKey
SDLK_WORLD_49 :: SDLKey
SDLK_WORLD_50 :: SDLKey
SDLK_WORLD_51 :: SDLKey
SDLK_WORLD_52 :: SDLKey
SDLK_WORLD_53 :: SDLKey
SDLK_WORLD_54 :: SDLKey
SDLK_WORLD_55 :: SDLKey
SDLK_WORLD_56 :: SDLKey
SDLK_WORLD_57 :: SDLKey
SDLK_WORLD_58 :: SDLKey
SDLK_WORLD_59 :: SDLKey
SDLK_WORLD_60 :: SDLKey
SDLK_WORLD_61 :: SDLKey
SDLK_WORLD_62 :: SDLKey
SDLK_WORLD_63 :: SDLKey
SDLK_WORLD_64 :: SDLKey
SDLK_WORLD_65 :: SDLKey
SDLK_WORLD_66 :: SDLKey
SDLK_WORLD_67 :: SDLKey
SDLK_WORLD_68 :: SDLKey
SDLK_WORLD_69 :: SDLKey
SDLK_WORLD_70 :: SDLKey
SDLK_WORLD_71 :: SDLKey
SDLK_WORLD_72 :: SDLKey
SDLK_WORLD_73 :: SDLKey
SDLK_WORLD_74 :: SDLKey
SDLK_WORLD_75 :: SDLKey
SDLK_WORLD_76 :: SDLKey
SDLK_WORLD_77 :: SDLKey
SDLK_WORLD_78 :: SDLKey
SDLK_WORLD_79 :: SDLKey
SDLK_WORLD_80 :: SDLKey
SDLK_WORLD_81 :: SDLKey
SDLK_WORLD_82 :: SDLKey
SDLK_WORLD_83 :: SDLKey
SDLK_WORLD_84 :: SDLKey
SDLK_WORLD_85 :: SDLKey
SDLK_WORLD_86 :: SDLKey
SDLK_WORLD_87 :: SDLKey
SDLK_WORLD_88 :: SDLKey
SDLK_WORLD_89 :: SDLKey
SDLK_WORLD_90 :: SDLKey
SDLK_WORLD_91 :: SDLKey
SDLK_WORLD_92 :: SDLKey
SDLK_WORLD_93 :: SDLKey
SDLK_WORLD_94 :: SDLKey
SDLK_WORLD_95 :: SDLKey
SDLK_KP0 :: SDLKey
SDLK_KP1 :: SDLKey
SDLK_KP2 :: SDLKey
SDLK_KP3 :: SDLKey
SDLK_KP4 :: SDLKey
SDLK_KP5 :: SDLKey
SDLK_KP6 :: SDLKey
SDLK_KP7 :: SDLKey
SDLK_KP8 :: SDLKey
SDLK_KP9 :: SDLKey
SDLK_KP_PERIOD :: SDLKey
SDLK_KP_DIVIDE :: SDLKey
SDLK_KP_MULTIPLY :: SDLKey
SDLK_KP_MINUS :: SDLKey
SDLK_KP_PLUS :: SDLKey
SDLK_KP_ENTER :: SDLKey
SDLK_KP_EQUALS :: SDLKey
SDLK_UP :: SDLKey
SDLK_DOWN :: SDLKey
SDLK_RIGHT :: SDLKey
SDLK_LEFT :: SDLKey
SDLK_INSERT :: SDLKey
SDLK_HOME :: SDLKey
SDLK_END :: SDLKey
SDLK_PAGEUP :: SDLKey
SDLK_PAGEDOWN :: SDLKey
SDLK_F1 :: SDLKey
SDLK_F2 :: SDLKey
SDLK_F3 :: SDLKey
SDLK_F4 :: SDLKey
SDLK_F5 :: SDLKey
SDLK_F6 :: SDLKey
SDLK_F7 :: SDLKey
SDLK_F8 :: SDLKey
SDLK_F9 :: SDLKey
SDLK_F10 :: SDLKey
SDLK_F11 :: SDLKey
SDLK_F12 :: SDLKey
SDLK_F13 :: SDLKey
SDLK_F14 :: SDLKey
SDLK_F15 :: SDLKey
SDLK_NUMLOCK :: SDLKey
SDLK_CAPSLOCK :: SDLKey
SDLK_SCROLLOCK :: SDLKey
SDLK_RSHIFT :: SDLKey
SDLK_LSHIFT :: SDLKey
SDLK_RCTRL :: SDLKey
SDLK_LCTRL :: SDLKey
SDLK_RALT :: SDLKey
SDLK_LALT :: SDLKey
SDLK_RMETA :: SDLKey
SDLK_LMETA :: SDLKey
SDLK_LSUPER :: SDLKey
SDLK_RSUPER :: SDLKey
SDLK_MODE :: SDLKey
SDLK_COMPOSE :: SDLKey
SDLK_HELP :: SDLKey
SDLK_PRINT :: SDLKey
SDLK_SYSREQ :: SDLKey
SDLK_BREAK :: SDLKey
SDLK_MENU :: SDLKey
SDLK_POWER :: SDLKey
SDLK_EURO :: SDLKey
SDLK_UNDO :: SDLKey
SDLK_LAST :: SDLKey
instance GHC.Classes.Eq Graphics.UI.SDL.Keysym.Keysym
instance GHC.Show.Show Graphics.UI.SDL.Keysym.Keysym
instance GHC.Show.Show Graphics.UI.SDL.Keysym.SDLKey
instance GHC.Classes.Ord Graphics.UI.SDL.Keysym.SDLKey
instance GHC.Classes.Eq Graphics.UI.SDL.Keysym.SDLKey
instance GHC.Show.Show Graphics.UI.SDL.Keysym.Modifier
instance GHC.Classes.Ord Graphics.UI.SDL.Keysym.Modifier
instance GHC.Classes.Eq Graphics.UI.SDL.Keysym.Modifier
instance Foreign.Storable.Storable Graphics.UI.SDL.Keysym.Keysym
instance GHC.Enum.Bounded Graphics.UI.SDL.Keysym.Modifier
instance Graphics.UI.SDL.Utilities.Enum Graphics.UI.SDL.Keysym.Modifier GHC.Word.Word32
instance GHC.Enum.Bounded Graphics.UI.SDL.Keysym.SDLKey
instance Graphics.UI.SDL.Utilities.Enum Graphics.UI.SDL.Keysym.SDLKey GHC.Word.Word32
module Graphics.UI.SDL.Color
data Color
Color :: Word8 -> Color
[colorRed, colorGreen, colorBlue] :: Color -> Word8
newtype Pixel
Pixel :: Word32 -> Pixel
instance GHC.Classes.Ord Graphics.UI.SDL.Color.Pixel
instance GHC.Classes.Eq Graphics.UI.SDL.Color.Pixel
instance GHC.Show.Show Graphics.UI.SDL.Color.Pixel
instance Foreign.Storable.Storable Graphics.UI.SDL.Color.Color
instance Foreign.Storable.Storable Graphics.UI.SDL.Color.Pixel
module Graphics.UI.SDL.Audio
data AudioFormat
AudioU8 :: AudioFormat
AudioS8 :: AudioFormat
AudioU16LSB :: AudioFormat
AudioS16LSB :: AudioFormat
AudioU16MSB :: AudioFormat
AudioS16MSB :: AudioFormat
AudioU16Sys :: AudioFormat
AudioS16Sys :: AudioFormat
fromAudioFormat :: AudioFormat -> Word16
toAudioFormat :: Word16 -> AudioFormat
instance GHC.Enum.Enum Graphics.UI.SDL.Audio.AudioFormat
instance GHC.Classes.Ord Graphics.UI.SDL.Audio.AudioFormat
instance GHC.Classes.Eq Graphics.UI.SDL.Audio.AudioFormat
instance GHC.Show.Show Graphics.UI.SDL.Audio.AudioFormat
module Graphics.UI.SDL.Types
data SurfaceStruct
type Surface = ForeignPtr SurfaceStruct
data VideoInfoStruct
type VideoInfo = ForeignPtr VideoInfoStruct
data RWopsStruct
type RWops = ForeignPtr RWopsStruct
data PixelFormatStruct
type PixelFormat = ForeignPtr PixelFormatStruct
data JoystickStruct
type Joystick = ForeignPtr JoystickStruct
data Hat
HatCentered :: Hat
HatUp :: Hat
HatRight :: Hat
HatDown :: Hat
HatLeft :: Hat
HatRightUp :: Hat
HatRightDown :: Hat
HatLeftUp :: Hat
HatLeftDown :: Hat
data TimerIDStruct
data SurfaceFlag
SWSurface :: SurfaceFlag
HWSurface :: SurfaceFlag
OpenGL :: SurfaceFlag
ASyncBlit :: SurfaceFlag
OpenGLBlit :: SurfaceFlag
Resizable :: SurfaceFlag
NoFrame :: SurfaceFlag
HWAccel :: SurfaceFlag
SrcColorKey :: SurfaceFlag
RLEAccel :: SurfaceFlag
SrcAlpha :: SurfaceFlag
PreAlloc :: SurfaceFlag
AnyFormat :: SurfaceFlag
HWPalette :: SurfaceFlag
DoubleBuf :: SurfaceFlag
Fullscreen :: SurfaceFlag
surfaceGetPixelFormat :: Surface -> PixelFormat
surfaceGetWidth :: Surface -> Int
surfaceGetHeight :: Surface -> Int
surfaceGetFlags :: Surface -> IO [SurfaceFlag]
surfaceGetPitch :: Surface -> Word16
surfaceGetPixels :: Surface -> IO Pixels
pixelFormatGetAlpha :: PixelFormat -> IO Word8
pixelFormatGetColorKey :: PixelFormat -> IO Pixel
pixelFormatGetBitsPerPixel :: PixelFormat -> IO Word8
pixelFormatGetBytesPerPixel :: PixelFormat -> IO Word8
videoInfoWidth :: VideoInfo -> Int
videoInfoHeight :: VideoInfo -> Int
instance GHC.Read.Read Graphics.UI.SDL.Types.SurfaceFlag
instance GHC.Show.Show Graphics.UI.SDL.Types.SurfaceFlag
instance GHC.Classes.Ord Graphics.UI.SDL.Types.SurfaceFlag
instance GHC.Classes.Eq Graphics.UI.SDL.Types.SurfaceFlag
instance GHC.Classes.Ord Graphics.UI.SDL.Types.Hat
instance GHC.Classes.Eq Graphics.UI.SDL.Types.Hat
instance GHC.Show.Show Graphics.UI.SDL.Types.Hat
instance GHC.Enum.Bounded Graphics.UI.SDL.Types.Hat
instance Graphics.UI.SDL.Utilities.Enum Graphics.UI.SDL.Types.Hat GHC.Word.Word8
instance GHC.Enum.Bounded Graphics.UI.SDL.Types.SurfaceFlag
instance Graphics.UI.SDL.Utilities.Enum Graphics.UI.SDL.Types.SurfaceFlag GHC.Word.Word32
module Graphics.UI.SDL.Time
getTicks :: IO Word32
delay :: Word32 -> IO ()
module Graphics.UI.SDL.Rect
data Rect
Rect :: Int -> Int -> Rect
[rectX, rectY] :: Rect -> Int
[rectW, rectH] :: Rect -> Int
instance GHC.Classes.Ord Graphics.UI.SDL.Rect.Rect
instance GHC.Classes.Eq Graphics.UI.SDL.Rect.Rect
instance GHC.Show.Show Graphics.UI.SDL.Rect.Rect
instance Foreign.Storable.Storable Graphics.UI.SDL.Rect.Rect
module Graphics.UI.SDL.General
-- | Initializes SDL. This should be called before all other SDL functions.
init :: [InitFlag] -> IO ()
withInit :: [InitFlag] -> IO a -> IO a
-- | After SDL has been initialized with SDL_Init you may initialize
-- uninitialized subsystems with SDL_InitSubSystem.
initSubSystem :: [InitFlag] -> IO ()
quitSubSystem :: [InitFlag] -> IO ()
quit :: IO ()
-- | wasInit allows you to see which SDL subsytems have been initialized
wasInit :: [InitFlag] -> IO [InitFlag]
-- | Returns a string containing the last error. Nothing if no error.
getError :: IO (Maybe String)
failWithError :: String -> IO a
unwrapBool :: String -> IO Bool -> IO ()
unwrapMaybe :: String -> IO (Maybe a) -> IO a
unwrapInt :: (Int -> Bool) -> String -> IO Int -> IO Int
data InitFlag
InitTimer :: InitFlag
InitAudio :: InitFlag
InitVideo :: InitFlag
InitCDROM :: InitFlag
InitJoystick :: InitFlag
InitNoParachute :: InitFlag
InitEventthread :: InitFlag
InitEverything :: InitFlag
instance GHC.Read.Read Graphics.UI.SDL.General.InitFlag
instance GHC.Show.Show Graphics.UI.SDL.General.InitFlag
instance GHC.Classes.Ord Graphics.UI.SDL.General.InitFlag
instance GHC.Classes.Eq Graphics.UI.SDL.General.InitFlag
instance GHC.Enum.Bounded Graphics.UI.SDL.General.InitFlag
instance Graphics.UI.SDL.Utilities.Enum Graphics.UI.SDL.General.InitFlag GHC.Word.Word32
module Graphics.UI.SDL.WindowManagement
data GrabMode
GrabQuery :: GrabMode
GrabOff :: GrabMode
GrabOn :: GrabMode
-- | Sets the window title and icon name.
setCaption :: String -> String -> IO ()
-- | Sets the window title and icon name. Use <tt>Nothing</tt> to unset.
rawSetCaption :: Maybe String -> Maybe String -> IO ()
-- | Gets the window title and icon name.
getCaption :: IO (Maybe String, Maybe String)
-- | Iconify/Minimise the window.
iconifyWindow :: IO Bool
-- | Toggles fullscreen mode. Returns <tt>False</tt> on error.
tryToggleFullscreen :: Surface -> IO Bool
-- | Toggles fullscreen mode. Throws an exception on error.
toggleFullscreen :: Surface -> IO ()
-- | Grabbing means that the mouse is confined to the application window,
-- and nearly all keyboard input is passed directly to the application,
-- and not interpreted by a window manager, if any.
grabInput :: Bool -> IO ()
-- | Returns the current grabbing mode.
queryGrabMode :: IO GrabMode
instance GHC.Classes.Eq Graphics.UI.SDL.WindowManagement.GrabMode
instance GHC.Show.Show Graphics.UI.SDL.WindowManagement.GrabMode
module Graphics.UI.SDL.RWOps
fromFile :: FilePath -> String -> IO RWops
tryFromFile :: FilePath -> String -> IO (Maybe RWops)
free :: RWops -> IO ()
with :: FilePath -> String -> (RWops -> IO a) -> IO a
mkFinalizedRW :: Ptr RWopsStruct -> IO RWops
module Graphics.UI.SDL.Video
data Palette
data Toggle
Disable :: Toggle
Enable :: Toggle
Query :: Toggle
fromToggle :: (Num a) => Toggle -> a
toToggle :: (Eq a, Num a) => a -> Toggle
-- | Returns the video surface or <tt>Nothing</tt> on error.
tryGetVideoSurface :: IO (Maybe Surface)
-- | Returns the video surface, throwing an exception on error.
getVideoSurface :: IO Surface
-- | Returns the video driver name or <tt>Nothing</tt> on error. Notice,
-- the driver name is limited to 256 chars.
tryVideoDriverName :: IO (Maybe String)
-- | Returns the video driver name, throwing an exception on error. See
-- also <a>tryVideoDriverName</a>.
videoDriverName :: IO String
getVideoInfo :: IO VideoInfo
data ListModes
-- | List of available resolutions.
Modes :: [Rect] -> ListModes
-- | No modes available!
NonAvailable :: ListModes
-- | All resolutions available.
AnyOK :: ListModes
-- | Returns the available screen resolutions for the given format and
-- video flags.
listModes :: Maybe PixelFormat -> [SurfaceFlag] -> IO ListModes
-- | Check to see if a particular video mode is supported. Returns the
-- bits-per-pixel of the closest available mode with the given width,
-- height and requested surface flags, or <tt>Nothing</tt> on error.
videoModeOK :: Int -> Int -> Int -> [SurfaceFlag] -> IO (Maybe Int)
-- | Set up a video mode with the specified width, height and
-- bits-per-pixel. Returns <tt>Nothing</tt> on error.
trySetVideoMode :: Int -> Int -> Int -> [SurfaceFlag] -> IO (Maybe Surface)
-- | Same as <a>trySetVideoMode</a> except it throws an exception on error.
setVideoMode :: Int -> Int -> Int -> [SurfaceFlag] -> IO Surface
-- | Makes sure the given area is updated on the given screen.
updateRect :: Surface -> Rect -> IO ()
-- | Makes sure the given list of rectangles is updated on the given
-- screen. The rectangles are not automatically merged or checked for
-- overlap. In general, the programmer can use his knowledge about his
-- particular rectangles to merge them in an efficient way, to avoid
-- overdraw.
updateRects :: Surface -> [Rect] -> IO ()
-- | Swaps screen buffers.
tryFlip :: Surface -> IO Bool
-- | Same as <a>tryFlip</a> but throws an exception on error.
flip :: Surface -> IO ()
-- | Sets a portion of the colormap for the given 8-bit surface.
setColors :: Surface -> [Color] -> Int -> IO Bool
-- | Sets the colors in the palette of an 8-bit surface.
setPalette :: Surface -> [Palette] -> [Color] -> Int -> IO Bool
setGamma :: Float -> Float -> Float -> IO Bool
tryGetGammaRamp :: IO (Maybe ([Word16], [Word16], [Word16]))
getGammaRamp :: IO ([Word16], [Word16], [Word16])
trySetGammaRamp :: [Word16] -> [Word16] -> [Word16] -> IO Bool
setGammaRamp :: [Word16] -> [Word16] -> [Word16] -> IO ()
-- | Map a RGB color value to a pixel format.
mapRGB :: PixelFormat -> Word8 -> Word8 -> Word8 -> IO Pixel
-- | Map a RGBA color value to a pixel format.
mapRGBA :: PixelFormat -> Word8 -> Word8 -> Word8 -> Word8 -> IO Pixel
-- | Get RGB values from a pixel in the specified pixel format.
getRGB :: Pixel -> PixelFormat -> IO (Word8, Word8, Word8)
-- | Gets RGBA values from a pixel in the specified pixel format.
getRGBA :: Pixel -> PixelFormat -> IO (Word8, Word8, Word8, Word8)
-- | Creates an empty <tt>Surface</tt>. Returns <tt>Nothing</tt> on error.
tryCreateRGBSurface :: [SurfaceFlag] -> Int -> Int -> Int -> Word32 -> Word32 -> Word32 -> Word32 -> IO (Maybe Surface)
-- | Creates an empty <tt>Surface</tt>. Throws an exception on error.
createRGBSurface :: [SurfaceFlag] -> Int -> Int -> Int -> Word32 -> Word32 -> Word32 -> Word32 -> IO Surface
-- | Creates an empty <tt>Surface</tt> with (r/g/b/a)mask determined from
-- the local endian. Returns <tt>Nothing</tt> on error.
tryCreateRGBSurfaceEndian :: [SurfaceFlag] -> Int -> Int -> Int -> IO (Maybe Surface)
-- | Creates an empty <tt>Surface</tt> with (r/g/b/a)mask determined from
-- the local endian. Throws an exception on error.
createRGBSurfaceEndian :: [SurfaceFlag] -> Int -> Int -> Int -> IO Surface
tryCreateRGBSurfaceFrom :: Ptr a -> Int -> Int -> Int -> Int -> Word32 -> Word32 -> Word32 -> Word32 -> IO (Maybe Surface)
createRGBSurfaceFrom :: Ptr a -> Int -> Int -> Int -> Int -> Word32 -> Word32 -> Word32 -> Word32 -> IO Surface
-- | Forces the finalization of a <tt>Surface</tt>. Only supported with
-- GHC.
freeSurface :: Surface -> IO ()
-- | Locks a surface for direct access.
lockSurface :: Surface -> IO Bool
-- | Unlocks a previously locked surface.
unlockSurface :: Surface -> IO ()
loadBMP :: FilePath -> IO Surface
saveBMP :: Surface -> FilePath -> IO Bool
setColorKey :: Surface -> [SurfaceFlag] -> Pixel -> IO Bool
-- | Adjusts the alpha properties of a surface.
setAlpha :: Surface -> [SurfaceFlag] -> Word8 -> IO Bool
-- | Sets the clipping rectangle for a surface.
setClipRect :: Surface -> Maybe Rect -> IO ()
-- | Gets the clipping rectangle for a surface.
getClipRect :: Surface -> IO Rect
-- | Run an action with a given clipping rect applied. If an exception is
-- raised, then withClipRect will re-raise the exception (after resetting
-- the original clipping rect).
withClipRect :: Surface -> Maybe Rect -> IO a -> IO a
-- | Converts a surface to the same format as another surface. Returns
-- <tt>Nothing</tt> on error.
tryConvertSurface :: Surface -> PixelFormat -> [SurfaceFlag] -> IO (Maybe Surface)
-- | Converts a surface to the same format as another surface. Throws an
-- exception on error.
convertSurface :: Surface -> PixelFormat -> [SurfaceFlag] -> IO Surface
-- | This function performs a fast blit from the source surface to the
-- destination surface.
blitSurface :: Surface -> Maybe Rect -> Surface -> Maybe Rect -> IO Bool
-- | This function performs a fast fill of the given rectangle with some
-- color.
fillRect :: Surface -> Maybe Rect -> Pixel -> IO Bool
-- | Converts a surface to the display format. Returns <tt>Nothing</tt> on
-- error.
tryDisplayFormat :: Surface -> IO (Maybe Surface)
-- | Converts a surface to the display format. Throws an exception on
-- error.
displayFormat :: Surface -> IO Surface
-- | Converts a surface to the display format. Returns <tt>Nothing</tt> on
-- error.
tryDisplayFormatAlpha :: Surface -> IO (Maybe Surface)
-- | Converts a surface to the display format. Throws an exception on
-- error.
displayFormatAlpha :: Surface -> IO Surface
-- | Sets the position of the mouse cursor.
warpMouse :: Word16 -> Word16 -> IO ()
-- | Toggle whether or not the cursor is shown on the screen.
showCursor :: Bool -> IO ()
-- | Returns <tt>True</tt> when the cursor is set to visible. See also
-- <a>showCursor</a>.
queryCursorState :: IO Bool
type GLAttr = CInt
type GLValue = CInt
glRedSize :: GLAttr
glGreenSize :: GLAttr
glBlueSize :: GLAttr
glAlphaSize :: GLAttr
glBufferSize :: GLAttr
glDoubleBuffer :: GLAttr
glDepthSize :: GLAttr
glStencilSize :: GLAttr
glAccumRedSize :: GLAttr
glAccumGreenSize :: GLAttr
glAccumBlueSize :: GLAttr
glAccumAlphaSize :: GLAttr
glStereo :: GLAttr
glMultiSampleBuffers :: GLAttr
glMultiSampleSamples :: GLAttr
-- | Gets the value of a special SDL/OpenGL attribute. Returns
-- <tt>Nothing</tt> on error.
tryGLGetAttribute :: GLAttr -> IO (Maybe GLValue)
-- | Gets the value of a special SDL/OpenGL attribute. Throws an exception
-- on error.
glGetAttribute :: GLAttr -> IO GLValue
-- | Sets a special SDL/OpenGL attribute. Returns <tt>False</tt> on error.
tryGLSetAttribute :: GLAttr -> GLValue -> IO Bool
-- | Sets a special SDL/OpenGL attribute. Throws an exception on error.
glSetAttribute :: GLAttr -> GLValue -> IO ()
-- | Swaps OpenGL framebuffers/Update Display.
glSwapBuffers :: IO ()
mkFinalizedSurface :: Ptr SurfaceStruct -> IO Surface
instance GHC.Classes.Ord Graphics.UI.SDL.Video.ListModes
instance GHC.Classes.Eq Graphics.UI.SDL.Video.ListModes
instance GHC.Show.Show Graphics.UI.SDL.Video.ListModes
instance GHC.Show.Show Graphics.UI.SDL.Video.Toggle
instance GHC.Classes.Ord Graphics.UI.SDL.Video.Toggle
instance GHC.Classes.Eq Graphics.UI.SDL.Video.Toggle
instance GHC.Classes.Ord Graphics.UI.SDL.Video.Palette
instance GHC.Classes.Eq Graphics.UI.SDL.Video.Palette
instance GHC.Show.Show Graphics.UI.SDL.Video.Palette
instance GHC.Enum.Bounded Graphics.UI.SDL.Video.Palette
instance Graphics.UI.SDL.Utilities.Enum Graphics.UI.SDL.Video.Palette GHC.Types.Int
module Graphics.UI.SDL.Events
-- | High level event structure.
data Event
NoEvent :: Event
GotFocus :: [Focus] -> Event
LostFocus :: [Focus] -> Event
KeyDown :: !Keysym -> Event
KeyUp :: !Keysym -> Event
MouseMotion :: !Word16 -> !Word16 -> !Int16 -> !Int16 -> Event
MouseButtonDown :: !Word16 -> !Word16 -> !MouseButton -> Event
MouseButtonUp :: !Word16 -> !Word16 -> !MouseButton -> Event
-- | device index, axis index, axis value.
JoyAxisMotion :: !Word8 -> !Word8 -> !Int16 -> Event
-- | device index, trackball index, relative motion.
JoyBallMotion :: !Word8 -> !Word8 -> !Int16 -> !Int16 -> Event
-- | device index, hat index, hat position.
JoyHatMotion :: !Word8 -> !Word8 -> !Word8 -> Event
-- | device index, button index.
JoyButtonDown :: !Word8 -> !Word8 -> Event
-- | device index, button index.
JoyButtonUp :: !Word8 -> !Word8 -> Event
-- | When <tt>Resizable</tt> is passed as a flag to <a>setVideoMode</a> the
-- user is allowed to resize the applications window. When the window is
-- resized an <tt>VideoResize</tt> is reported, with the new window width
-- and height values. When an <tt>VideoResize</tt> is recieved the window
-- should be resized to the new dimensions using <a>setVideoMode</a>.
VideoResize :: !Int -> !Int -> Event
-- | A <tt>VideoExpose</tt> event is triggered when the screen has been
-- modified outside of the application, usually by the window manager and
-- needs to be redrawn.
VideoExpose :: Event
Quit :: Event
User :: !UserEventID -> !Int -> !(Ptr ()) -> !(Ptr ()) -> Event
Unknown :: Event
-- | Low level event structure keeping a one-to-one relation with the C
-- event structure.
data SDLEvent
SDLNoEvent :: SDLEvent
SDLActiveEvent :: SDLEvent
SDLKeyDown :: SDLEvent
SDLKeyUp :: SDLEvent
SDLMouseMotion :: SDLEvent
SDLMouseButtonDown :: SDLEvent
SDLMouseButtonUp :: SDLEvent
SDLJoyAxisMotion :: SDLEvent
SDLJoyBallMotion :: SDLEvent
SDLJoyHatMotion :: SDLEvent
SDLJoyButtonDown :: SDLEvent
SDLJoyButtonUp :: SDLEvent
SDLQuit :: SDLEvent
SDLSysWMEvent :: SDLEvent
SDLVideoResize :: SDLEvent
SDLVideoExpose :: SDLEvent
SDLUserEvent :: Word8 -> SDLEvent
SDLNumEvents :: SDLEvent
-- | Typed user events ranging from 0 to 7
data UserEventID
UID0 :: UserEventID
UID1 :: UserEventID
UID2 :: UserEventID
UID3 :: UserEventID
UID4 :: UserEventID
UID5 :: UserEventID
UID6 :: UserEventID
UID7 :: UserEventID
data MouseButton
ButtonLeft :: MouseButton
ButtonMiddle :: MouseButton
ButtonRight :: MouseButton
ButtonWheelUp :: MouseButton
ButtonWheelDown :: MouseButton
ButtonUnknown :: !Word8 -> MouseButton
data Focus
MouseFocus :: Focus
InputFocus :: Focus
ApplicationFocus :: Focus
-- | Constructs a safe pointer from an arbitrary value.
toSafePtr :: (Typeable a) => a -> IO SafePtr
-- | Get object from a safe pointer. <tt>Nothing</tt> on type mismatch.
tryFromSafePtr :: (Typeable a) => SafePtr -> IO (Maybe a)
-- | Get object from a safe pointer. Throws an exception on type mismatch.
fromSafePtr :: (Typeable a) => SafePtr -> IO a
-- | Return the type of the object the safe pointer was created from.
typeOfSafePtr :: SafePtr -> IO TypeRep
-- | Sets keyboard repeat rate. Returns <tt>False</tt> on error.
enableKeyRepeat :: Int -> Int -> IO Bool
-- | Enables or disables unicode translation.
enableUnicode :: Bool -> IO ()
-- | Returns the current state of unicode translation. See also
-- <a>enableUnicode</a>.
queryUnicodeState :: IO Bool
-- | Gets the name of an SDL virtual keysym.
getKeyName :: SDLKey -> String
-- | Retrieves the current state of the mouse. Returns (X position, Y
-- position, pressed buttons).
getMouseState :: IO (Int, Int, [MouseButton])
-- | Retrieve the current state of the mouse. Like <a>getMouseState</a>
-- except that X and Y are set to the change since last call to
-- getRelativeMouseState.
getRelativeMouseState :: IO (Int, Int, [MouseButton])
-- | Gets the state of modifier keys.
getModState :: IO [Modifier]
-- | Sets the internal state of modifier keys.
setModState :: [Modifier] -> IO ()
-- | Pushes an event onto the event queue. Returns <tt>False</tt> on error.
tryPushEvent :: Event -> IO Bool
-- | Pushes an event onto the event queue. Throws an exception on error.
pushEvent :: Event -> IO ()
-- | Polls for currently pending events.
pollEvent :: IO Event
-- | Waits indefinitely for the next available event.
waitEvent :: IO Event
-- | Waits indefinitely for the next available event. Blocks Haskell
-- threads.
waitEventBlocking :: IO Event
-- | Pumps the event loop, gathering events from the input devices.
pumpEvents :: IO ()
-- | Enable or disable events from being processed.
enableEvent :: SDLEvent -> Bool -> IO ()
-- | Checks current state of a event. See also <a>enableEvent</a>.
queryEventState :: SDLEvent -> IO Bool
-- | Gets the state of the application.
getAppState :: IO [Focus]
instance GHC.Classes.Eq Graphics.UI.SDL.Events.Event
instance GHC.Show.Show Graphics.UI.SDL.Events.Event
instance GHC.Enum.Enum Graphics.UI.SDL.Events.UserEventID
instance GHC.Classes.Eq Graphics.UI.SDL.Events.UserEventID
instance GHC.Show.Show Graphics.UI.SDL.Events.UserEventID
instance GHC.Classes.Ord Graphics.UI.SDL.Events.Focus
instance GHC.Classes.Eq Graphics.UI.SDL.Events.Focus
instance GHC.Show.Show Graphics.UI.SDL.Events.Focus
instance GHC.Classes.Ord Graphics.UI.SDL.Events.MouseButton
instance GHC.Classes.Eq Graphics.UI.SDL.Events.MouseButton
instance GHC.Show.Show Graphics.UI.SDL.Events.MouseButton
instance GHC.Show.Show Graphics.UI.SDL.Events.SDLEvent
instance GHC.Classes.Ord Graphics.UI.SDL.Events.SDLEvent
instance GHC.Classes.Eq Graphics.UI.SDL.Events.SDLEvent
instance GHC.Enum.Bounded Graphics.UI.SDL.Events.SDLEvent
instance Graphics.UI.SDL.Utilities.Enum Graphics.UI.SDL.Events.MouseButton GHC.Word.Word8
instance GHC.Enum.Bounded Graphics.UI.SDL.Events.Focus
instance Graphics.UI.SDL.Utilities.Enum Graphics.UI.SDL.Events.Focus GHC.Word.Word8
instance Foreign.Storable.Storable Graphics.UI.SDL.Events.Event
module Graphics.UI.SDL.Joystick
-- | Counts the number of joysticks attached to the system.
countAvailable :: IO Int
-- | Gets joystick name. Returns <tt>Nothing</tt> on error.
tryName :: JoystickIndex -> IO (Maybe String)
-- | Gets joystick name. Throws an exception on error.
name :: JoystickIndex -> IO String
-- | Opens a joystick for use. Returns <tt>Nothing</tt> on error.
tryOpen :: JoystickIndex -> IO (Maybe Joystick)
-- | Opens a joystick for use. Throws an exception on error.
open :: JoystickIndex -> IO Joystick
-- | Determines if a joystick has been opened.
opened :: JoystickIndex -> IO Bool
-- | Gets the index of an <tt>Joystick</tt>.
index :: Joystick -> JoystickIndex
-- | Gets the number of joystick axes.
axesAvailable :: Joystick -> Int
-- | Gets the number of joystick trackballs.
ballsAvailable :: Joystick -> Int
-- | Gets the number of joystick hats.
hatsAvailable :: Joystick -> Int
-- | Gets the number of joystick buttons.
buttonsAvailable :: Joystick -> Int
-- | Updates the state of all joysticks.
update :: IO ()
-- | Gets the current state of an axis.
getAxis :: Joystick -> Word8 -> IO Int16
-- | Gets the current state of a joystick hat.
getHat :: Joystick -> Word8 -> IO [Hat]
-- | Gets the current state of a given button on a given joystick.
getButton :: Joystick -> Word8 -> IO Bool
-- | Gets relative trackball motion.
getBall :: Joystick -> Word8 -> IO (Maybe (Int16, Int16))
-- | Force finalization of a previous opened <tt>Joystick</tt>. Only
-- supported with GHC.
close :: Joystick -> IO ()
module Graphics.UI.SDL
|