430 |
434 |
431 {$IFDEF SDL13} |
435 {$IFDEF SDL13} |
432 TSDL_KeySym = record |
436 TSDL_KeySym = record |
433 scancode: LongInt; |
437 scancode: LongInt; |
434 sym: LongInt; |
438 sym: LongInt; |
435 modifier: Smallint; |
439 modifier: Word; |
436 unicode: LongInt; |
440 unicode: LongWord; |
437 end; |
441 end; |
438 |
442 |
439 TSDL_WindowEvent = record |
443 TSDL_WindowEvent = record |
440 type_: LongInt; |
444 type_: LongWord; |
441 windowID: LongInt; |
445 windowID: LongWord; |
442 event: byte; |
446 event: Byte; |
443 padding1, padding2, padding3: byte; |
447 padding1, padding2, padding3: Byte; |
444 data1, data2: LongInt; |
448 data1, data2: LongInt; |
445 end; |
449 end; |
446 |
450 |
447 // available in sdl12 but not exposed |
451 // available in sdl12 but not exposed |
448 TSDL_TextEditingEvent = record |
452 TSDL_TextEditingEvent = record |
449 type_: LongInt; |
453 type_: LongWord; |
450 windowID: LongInt; |
454 windowID: LongWord; |
451 text: array[0..31] of Byte; |
455 text: array[0..31] of Byte; |
452 start, lenght: LongInt; |
456 start, lenght: LongInt; |
453 end; |
457 end; |
454 |
458 |
455 // available in sdl12 but not exposed |
459 // available in sdl12 but not exposed |
456 TSDL_TextInputEvent = record |
460 TSDL_TextInputEvent = record |
457 type_: LongInt; |
461 type_: LongWord; |
458 windowID: LongInt; |
462 windowID: LongWord; |
459 text: array[0..31] of Byte; |
463 text: array[0..31] of Byte; |
460 end; |
464 end; |
461 |
465 |
462 TSDL_TouchFingerEvent = record |
466 TSDL_TouchFingerEvent = record |
463 type_: Longword; |
467 type_: LongWord; |
464 windowId: Longword; |
468 windowId: LongWord; |
465 touchId: Int64; |
469 touchId: Int64; |
466 fingerId: Int64; |
470 fingerId: Int64; |
467 state, padding1, padding2, padding3: Byte; |
471 state, padding1, padding2, padding3: Byte; |
468 x,y: Word; |
472 x, y: Word; |
469 dx,dy: Smallint; |
473 dx, dy: SmallInt; |
470 pressure: Word; |
474 pressure: Word; |
471 end; |
475 end; |
472 |
476 |
473 TSDL_TouchButtonEvent = record |
477 TSDL_TouchButtonEvent = record |
474 type_: Longword; |
478 type_: LongWord; |
475 windowId: Longword; |
479 windowId: LongWord; |
476 touchId: Int64; |
480 touchId: Int64; |
477 state, button, padding1, padding2: Byte; |
481 state, button, padding1, padding2: Byte; |
478 end; |
482 end; |
479 |
483 |
480 TSDL_MultiGestureEvent = record |
484 TSDL_MultiGestureEvent = record |
481 type_: Longword; |
485 type_: LongWord; |
482 windowId: Longword; |
486 windowId: LongWord; |
483 touchId: Int64; |
487 touchId: Int64; |
484 dTheta,dDist,x,y: Single; |
488 dTheta, dDist, x, y: Single; |
485 numFingers, padding: Word; |
489 numFingers, padding: Word; |
486 end; |
490 end; |
487 |
491 |
488 TSDL_DollarGestureEvent = record |
492 TSDL_DollarGestureEvent = record |
489 type_: Longword; |
493 type_: LongWord; |
490 windowId: Longword; |
494 windowId: LongWord; |
491 touchId: Int64; |
495 touchId: Int64; |
492 gesturedId: Int64; |
496 gesturedId: Int64; |
493 numFingers: Longword; |
497 numFingers: LongWord; |
494 error: Single; |
498 error: Single; |
495 end; |
499 end; |
496 |
500 |
497 TSDL_SysWMEvent = record |
501 TSDL_SysWMEvent = record |
498 type_: LongInt; |
502 type_: LongWord; |
499 msg: pointer; |
503 msg: Pointer; |
500 end; |
504 end; |
501 {$ELSE} |
505 {$ELSE} |
502 TSDL_KeySym = record |
506 TSDL_KeySym = record |
503 scancode: Byte; |
507 scancode: Byte; |
504 sym: Longword; |
508 sym: LongWord; |
505 modifier: Longword; |
509 modifier: LongWord; |
506 unicode: Word; |
510 unicode: Word; |
507 end; |
511 end; |
508 |
512 |
509 // these two are present in sdl1.3 but only for backward compatibility |
|
510 // and in 1.3 type_ is LongInt, not byte |
|
511 TSDL_ActiveEvent = record |
513 TSDL_ActiveEvent = record |
512 type_: byte; |
514 type_: Byte; |
513 gain: byte; |
515 gain: Byte; |
514 state: byte; |
516 state: Byte; |
515 end; |
517 end; |
516 |
518 |
517 TSDL_ResizeEvent = record |
519 TSDL_ResizeEvent = record |
518 type_: Byte; |
520 type_: Byte; |
519 w, h: LongInt; |
521 w, h: LongInt; |
520 end; |
522 end; |
521 {$ENDIF} |
523 {$ENDIF} |
522 |
524 |
523 TSDL_KeyboardEvent = record |
525 TSDL_KeyboardEvent = record |
524 {$IFDEF SDL13} |
526 {$IFDEF SDL13} |
525 type_: LongInt; |
527 type_: LongWord; |
526 windowID: LongInt; |
528 windowID: LongWord; |
527 state, repeat_, padding2, padding3: byte; |
529 state, repeat_, padding2, padding3: Byte; |
528 {$ELSE} |
530 {$ELSE} |
529 type_: byte; |
531 type_, which, state: Byte; |
530 which: byte; |
|
531 state: byte; |
|
532 {$ENDIF} |
532 {$ENDIF} |
533 keysym: TSDL_KeySym; |
533 keysym: TSDL_KeySym; |
534 end; |
534 end; |
535 |
535 |
536 TSDL_MouseMotionEvent = record |
536 TSDL_MouseMotionEvent = record |
537 {$IFDEF SDL13} |
537 {$IFDEF SDL13} |
538 type_: LongInt; |
538 type_: LongWord; |
539 windowID: LongInt; |
539 windowID: LongWord; |
540 state, padding1, padding2, padding3: byte; |
540 state, padding1, padding2, padding3: Byte; |
541 x, y, z, xrel, yrel : LongInt; |
541 x, y, z, xrel, yrel : LongInt; |
542 {$ELSE} |
542 {$ELSE} |
543 type_: byte; |
543 type_, which, state: Byte; |
544 which: byte; |
544 x, y, xrel, yrel : Word; |
545 state: byte; |
|
546 x, y, xrel, yrel : word; |
|
547 {$ENDIF} |
545 {$ENDIF} |
548 end; |
546 end; |
549 |
547 |
550 TSDL_MouseButtonEvent = record |
548 TSDL_MouseButtonEvent = record |
551 {$IFDEF SDL13} |
549 {$IFDEF SDL13} |
552 type_: LongInt; |
550 type_: LongWord; |
553 windowID: LongInt; |
551 windowID: LongWord; |
|
552 buttonm, state, padding1, padding2: Byte; |
554 x, y: LongInt; |
553 x, y: LongInt; |
555 padding1: byte; |
554 {$ELSE} |
556 {$ELSE} |
555 type_, which, button, state: Byte; |
557 type_, |
556 x, y: Word; |
558 which, |
|
559 button, |
|
560 state: byte; |
|
561 x, y: word; |
|
562 {$ENDIF} |
557 {$ENDIF} |
563 end; |
558 end; |
564 |
559 |
565 TSDL_MouseWheelEvent = record |
560 TSDL_MouseWheelEvent = record |
566 type_: LongInt; |
561 type_: LongWord; |
567 {$IFDEF SDL13} |
562 {$IFDEF SDL13} |
568 windowID: LongInt; |
563 windowID: LongWord; |
569 {$ELSE} |
564 {$ELSE} |
570 which: Byte; |
565 which: Byte; |
571 {$ENDIF} |
566 {$ENDIF} |
572 x, y: LongInt; |
567 x, y: LongInt; |
573 end; |
568 end; |
574 |
569 |
575 TSDL_JoyAxisEvent = record |
570 TSDL_JoyAxisEvent = record |
576 type_: {$IFDEF SDL13}LongInt{$ELSE}Byte{$ENDIF}; |
571 type_: {$IFDEF SDL13}LongWord{$ELSE}Byte{$ENDIF}; |
577 which: Byte; |
572 which: Byte; |
578 axis: Byte; |
573 axis: Byte; |
579 {$IFDEF SDL13} |
574 {$IFDEF SDL13} |
580 padding1, padding2: Byte; |
575 padding1, padding2: Byte; |
581 value: LongInt; |
576 value: LongInt; |
582 {$ELSE} |
577 {$ELSE} |
583 value: Smallint; |
578 value: SmallInt; |
584 {$ENDIF} |
579 {$ENDIF} |
585 end; |
580 end; |
586 |
581 |
587 TSDL_JoyBallEvent = record |
582 TSDL_JoyBallEvent = record |
588 type_: {$IFDEF SDL13}LongInt{$ELSE}Byte{$ENDIF}; |
583 type_: {$IFDEF SDL13}LongWord{$ELSE}Byte{$ENDIF}; |
589 which: Byte; |
584 which: Byte; |
590 ball: Byte; |
585 ball: Byte; |
591 {$IFDEF SDL13} |
586 {$IFDEF SDL13} |
592 padding1, padding2: Byte; |
587 padding1, padding2: Byte; |
593 xrel, yrel: LongInt; |
588 xrel, yrel: LongInt; |
594 {$ELSE} |
589 {$ELSE} |
595 xrel, yrel: Smallint; |
590 xrel, yrel: SmallInt; |
596 {$ENDIF} |
591 {$ENDIF} |
597 end; |
592 end; |
598 |
593 |
599 TSDL_JoyHatEvent = record |
594 TSDL_JoyHatEvent = record |
600 type_: {$IFDEF SDL13}LongInt{$ELSE}Byte{$ENDIF}; |
595 type_: {$IFDEF SDL13}LongWord{$ELSE}Byte{$ENDIF}; |
601 which: Byte; |
596 which: Byte; |
602 hat: Byte; |
597 hat: Byte; |
603 value: Byte; |
598 value: Byte; |
604 {$IFDEF SDL13} |
599 {$IFDEF SDL13} |
605 padding1: Byte; |
600 padding1: Byte; |
606 {$ENDIF} |
601 {$ENDIF} |
607 end; |
602 end; |
608 |
603 |
609 TSDL_JoyButtonEvent = record |
604 TSDL_JoyButtonEvent = record |
610 type_: {$IFDEF SDL13}LongInt{$ELSE}Byte{$ENDIF}; |
605 type_: {$IFDEF SDL13}LongWord{$ELSE}Byte{$ENDIF}; |
611 which: Byte; |
606 which: Byte; |
612 button: Byte; |
607 button: Byte; |
613 state: Byte; |
608 state: Byte; |
614 {$IFDEF SDL13} |
609 {$IFDEF SDL13} |
615 padding1: Byte; |
610 padding1: Byte; |
616 {$ENDIF} |
611 {$ENDIF} |
617 end; |
612 end; |
618 |
613 |
619 TSDL_QuitEvent = record |
614 TSDL_QuitEvent = record |
620 type_: {$IFDEF SDL13}LongInt{$ELSE}Byte{$ENDIF}; |
615 type_: {$IFDEF SDL13}LongWord{$ELSE}Byte{$ENDIF}; |
621 end; |
616 end; |
622 |
617 |
623 TSDL_UserEvent = record |
618 TSDL_UserEvent = record |
624 {$IFDEF SDL13} |
619 {$IFDEF SDL13} |
625 type_: LongInt; |
620 type_: LongWord; |
626 windowID: LongInt; |
621 windowID: LongWord; |
627 {$ELSE} |
622 {$ELSE} |
628 type_: Byte; |
623 type_: Byte; |
629 {$ENDIF} |
624 {$ENDIF} |
630 code: LongInt; |
625 code: LongInt; |
631 data1, data2: Pointer; |
626 data1, data2: Pointer; |
792 ///////////////////// FUNCTION DEFINITIONS ///////////////////// |
787 ///////////////////// FUNCTION DEFINITIONS ///////////////////// |
793 ///////////////////////////////////////////////////////////////// |
788 ///////////////////////////////////////////////////////////////// |
794 |
789 |
795 |
790 |
796 {* SDL *} |
791 {* SDL *} |
797 function SDL_Init(flags: Longword): LongInt; cdecl; external SDLLibName; |
792 function SDL_Init(flags: LongWord): LongInt; cdecl; external SDLLibName; |
798 function SDL_InitSubSystem(flags: LongWord): LongInt; cdecl; external SDLLibName; |
793 function SDL_InitSubSystem(flags: LongWord): LongInt; cdecl; external SDLLibName; |
799 procedure SDL_Quit; cdecl; external SDLLibName; |
794 procedure SDL_Quit; cdecl; external SDLLibName; |
800 |
795 |
801 procedure SDL_Delay(msec: Longword); cdecl; external SDLLibName; |
796 procedure SDL_Delay(msec: LongWord); cdecl; external SDLLibName; |
802 function SDL_GetTicks: Longword; cdecl; external SDLLibName; |
797 function SDL_GetTicks: LongWord; cdecl; external SDLLibName; |
803 |
798 |
804 function SDL_MustLock(Surface: PSDL_Surface): Boolean; |
799 function SDL_MustLock(Surface: PSDL_Surface): Boolean; |
805 function SDL_LockSurface(Surface: PSDL_Surface): LongInt; cdecl; external SDLLibName; |
800 function SDL_LockSurface(Surface: PSDL_Surface): LongInt; cdecl; external SDLLibName; |
806 procedure SDL_UnlockSurface(Surface: PSDL_Surface); cdecl; external SDLLibName; |
801 procedure SDL_UnlockSurface(Surface: PSDL_Surface); cdecl; external SDLLibName; |
807 |
802 |
808 function SDL_GetError: PChar; cdecl; external SDLLibName; |
803 function SDL_GetError: PChar; cdecl; external SDLLibName; |
809 |
804 |
810 function SDL_SetVideoMode(width, height, bpp: LongInt; flags: Longword): PSDL_Surface; cdecl; external SDLLibName; |
805 function SDL_SetVideoMode(width, height, bpp: LongInt; flags: LongWord): PSDL_Surface; cdecl; external SDLLibName; |
811 function SDL_CreateRGBSurface(flags: Longword; Width, Height, Depth: LongInt; RMask, GMask, BMask, AMask: Longword): PSDL_Surface; cdecl; external SDLLibName; |
806 function SDL_CreateRGBSurface(flags: LongWord; Width, Height, Depth: LongInt; RMask, GMask, BMask, AMask: LongWord): PSDL_Surface; cdecl; external SDLLibName; |
812 function SDL_CreateRGBSurfaceFrom(pixels: Pointer; width, height, depth, pitch: LongInt; RMask, GMask, BMask, AMask: Longword): PSDL_Surface; cdecl; external SDLLibName; |
807 function SDL_CreateRGBSurfaceFrom(pixels: Pointer; width, height, depth, pitch: LongInt; RMask, GMask, BMask, AMask: LongWord): PSDL_Surface; cdecl; external SDLLibName; |
813 procedure SDL_FreeSurface(Surface: PSDL_Surface); cdecl; external SDLLibName; |
808 procedure SDL_FreeSurface(Surface: PSDL_Surface); cdecl; external SDLLibName; |
814 function SDL_SetColorKey(surface: PSDL_Surface; flag, key: Longword): LongInt; cdecl; external SDLLibName; |
809 function SDL_SetColorKey(surface: PSDL_Surface; flag, key: LongWord): LongInt; cdecl; external SDLLibName; |
815 function SDL_SetAlpha(surface: PSDL_Surface; flag, key: Longword): LongInt; cdecl; external SDLLibName; |
810 function SDL_SetAlpha(surface: PSDL_Surface; flag, key: LongWord): LongInt; cdecl; external SDLLibName; |
816 function SDL_ConvertSurface(src: PSDL_Surface; fmt: PSDL_PixelFormat; flags: LongInt): PSDL_Surface; cdecl; external SDLLibName; |
811 function SDL_ConvertSurface(src: PSDL_Surface; fmt: PSDL_PixelFormat; flags: LongInt): PSDL_Surface; cdecl; external SDLLibName; |
817 |
812 |
818 function SDL_UpperBlit(src: PSDL_Surface; srcrect: PSDL_Rect; dst: PSDL_Surface; dstrect: PSDL_Rect): LongInt; cdecl; external SDLLibName; |
813 function SDL_UpperBlit(src: PSDL_Surface; srcrect: PSDL_Rect; dst: PSDL_Surface; dstrect: PSDL_Rect): LongInt; cdecl; external SDLLibName; |
819 function SDL_FillRect(dst: PSDL_Surface; dstrect: PSDL_Rect; color: Longword): LongInt; cdecl; external SDLLibName; |
814 function SDL_FillRect(dst: PSDL_Surface; dstrect: PSDL_Rect; color: LongWord): LongInt; cdecl; external SDLLibName; |
820 procedure SDL_UpdateRect(Screen: PSDL_Surface; x, y: LongInt; w, h: Longword); cdecl; external SDLLibName; |
815 procedure SDL_UpdateRect(Screen: PSDL_Surface; x, y: LongInt; w, h: LongWord); cdecl; external SDLLibName; |
821 function SDL_Flip(Screen: PSDL_Surface): LongInt; cdecl; external SDLLibName; |
816 function SDL_Flip(Screen: PSDL_Surface): LongInt; cdecl; external SDLLibName; |
822 |
817 |
823 procedure SDL_GetRGB(pixel: Longword; fmt: PSDL_PixelFormat; r, g, b: PByte); cdecl; external SDLLibName; |
818 procedure SDL_GetRGB(pixel: LongWord; fmt: PSDL_PixelFormat; r, g, b: PByte); cdecl; external SDLLibName; |
824 procedure SDL_GetRGBA(pixel: Longword; fmt: PSDL_PixelFormat; r, g, b, a: PByte); cdecl; external SDLLibName; |
819 procedure SDL_GetRGBA(pixel: LongWord; fmt: PSDL_PixelFormat; r, g, b, a: PByte); cdecl; external SDLLibName; |
825 function SDL_MapRGB(format: PSDL_PixelFormat; r, g, b: Byte): Longword; cdecl; external SDLLibName; |
820 function SDL_MapRGB(format: PSDL_PixelFormat; r, g, b: Byte): LongWord; cdecl; external SDLLibName; |
826 function SDL_MapRGBA(format: PSDL_PixelFormat; r, g, b, a: Byte): Longword; cdecl; external SDLLibName; |
821 function SDL_MapRGBA(format: PSDL_PixelFormat; r, g, b, a: Byte): LongWord; cdecl; external SDLLibName; |
827 |
822 |
828 function SDL_DisplayFormat(Surface: PSDL_Surface): PSDL_Surface; cdecl; external SDLLibName; |
823 function SDL_DisplayFormat(Surface: PSDL_Surface): PSDL_Surface; cdecl; external SDLLibName; |
829 function SDL_DisplayFormatAlpha(Surface: PSDL_Surface): PSDL_Surface; cdecl; external SDLLibName; |
824 function SDL_DisplayFormatAlpha(Surface: PSDL_Surface): PSDL_Surface; cdecl; external SDLLibName; |
830 |
825 |
831 function SDL_RWFromFile(filename, mode: PChar): PSDL_RWops; cdecl; external SDLLibName; |
826 function SDL_RWFromFile(filename, mode: PChar): PSDL_RWops; cdecl; external SDLLibName; |
832 function SDL_SaveBMP_RW(surface: PSDL_Surface; dst: PSDL_RWops; freedst: LongInt): LongInt; cdecl; external SDLLibName; |
827 function SDL_SaveBMP_RW(surface: PSDL_Surface; dst: PSDL_RWops; freedst: LongInt): LongInt; cdecl; external SDLLibName; |
833 |
828 |
834 {$IFDEF SDL13} |
829 {$IFDEF SDL13} |
835 function SDL_CreateWindow(title: PChar; x,y,w,h, flags: LongInt): PSDL_Window; cdecl; external SDLLibName; |
830 function SDL_CreateWindow(title: PChar; x,y,w,h: LongInt; flags: LongWord): PSDL_Window; cdecl; external SDLLibName; |
836 function SDL_CreateRenderer(window: PSDL_Window; index, flags: LongInt): PSDL_Renderer; cdecl; external SDLLibName; |
831 function SDL_CreateRenderer(window: PSDL_Window; index: LongInt; flags: LongWord): PSDL_Renderer; cdecl; external SDLLibName; |
837 function SDL_DestroyWindow(window: PSDL_Window): LongInt; cdecl; external SDLLibName; |
832 function SDL_DestroyWindow(window: PSDL_Window): LongInt; cdecl; external SDLLibName; |
838 function SDL_DestroyRenderer(renderer: PSDL_Renderer): LongInt; cdecl; external SDLLibName; |
833 function SDL_DestroyRenderer(renderer: PSDL_Renderer): LongInt; cdecl; external SDLLibName; |
839 procedure SDL_SetWindowSize(window: PSDL_Window; w, h: LongInt); cdecl; external SDLLibName; |
834 procedure SDL_SetWindowSize(window: PSDL_Window; w, h: LongInt); cdecl; external SDLLibName; |
840 function SDL_GetCurrentVideoDriver:Pchar; cdecl; external SDLLibName; |
835 function SDL_GetCurrentVideoDriver:Pchar; cdecl; external SDLLibName; |
841 |
836 |
846 |
841 |
847 procedure SDL_VideoQuit; cdecl; external SDLLibName; |
842 procedure SDL_VideoQuit; cdecl; external SDLLibName; |
848 function SDL_GetNumVideoDisplays: LongInt; cdecl; external SDLLibName; |
843 function SDL_GetNumVideoDisplays: LongInt; cdecl; external SDLLibName; |
849 procedure SDL_ShowWindow(window: PSDL_Window); cdecl; external SDLLibName; |
844 procedure SDL_ShowWindow(window: PSDL_Window); cdecl; external SDLLibName; |
850 |
845 |
851 function SDL_SetRenderDrawColor(renderer: PSDL_Renderer; r,g,b,a: byte): LongInt; cdecl; external SDLLibName; |
846 function SDL_SetRenderDrawColor(renderer: PSDL_Renderer; r,g,b,a: Byte): LongInt; cdecl; external SDLLibName; |
852 function SDL_GetRenderer(window: PSDL_Window): PSDL_Renderer; cdecl; external SDLLibName; |
847 function SDL_GetRenderer(window: PSDL_Window): PSDL_Renderer; cdecl; external SDLLibName; |
853 function SDL_RenderFillRect(renderer: PSDL_Renderer; rect: PSDL_Rect): LongInt; cdecl; external SDLLibName; |
848 function SDL_RenderFillRect(renderer: PSDL_Renderer; rect: PSDL_Rect): LongInt; cdecl; external SDLLibName; |
854 function SDL_RenderClear(renderer: PSDL_Renderer): LongInt; cdecl; external SDLLibName; |
849 function SDL_RenderClear(renderer: PSDL_Renderer): LongInt; cdecl; external SDLLibName; |
855 procedure SDL_RenderPresent(renderer: PSDL_Renderer); cdecl; external SDLLibName; |
850 procedure SDL_RenderPresent(renderer: PSDL_Renderer); cdecl; external SDLLibName; |
856 function SDL_RenderReadPixels(renderer: PSDL_Renderer; rect: PSDL_Rect; format: LongInt; pixels: pointer; pitch: LongInt): LongInt; cdecl; external SDLLibName; |
851 function SDL_RenderReadPixels(renderer: PSDL_Renderer; rect: PSDL_Rect; format: LongInt; pixels: Pointer; pitch: LongInt): LongInt; cdecl; external SDLLibName; |
857 function SDL_RenderSetViewport(window: PSDL_Window; rect: PSDL_Rect): LongInt; cdecl; external SDLLibName; |
852 function SDL_RenderSetViewport(window: PSDL_Window; rect: PSDL_Rect): LongInt; cdecl; external SDLLibName; |
858 |
853 |
859 function SDL_SelectMouse(index: LongInt): LongInt; cdecl; external SDLLibName; |
|
860 function SDL_GetRelativeMouseState(x, y: PLongInt): Byte; cdecl; external SDLLibName; |
854 function SDL_GetRelativeMouseState(x, y: PLongInt): Byte; cdecl; external SDLLibName; |
861 function SDL_GetNumMice: LongInt; cdecl; external SDLLibName; |
855 function SDL_PixelFormatEnumToMasks(format: TSDL_ArrayByteOrder; bpp: PLongInt; Rmask, Gmask, Bmask, Amask: PLongInt): Boolean; cdecl; external SDLLibName; |
862 function SDL_PixelFormatEnumToMasks(format: TSDL_ArrayByteOrder; bpp: PLongInt; Rmask, Gmask, Bmask, Amask: PLongInt): boolean; cdecl; external SDLLibName; |
|
863 |
856 |
864 procedure SDL_WarpMouseInWindow(window: PSDL_Window; x, y: LongInt); cdecl; external SDLLibName; |
857 procedure SDL_WarpMouseInWindow(window: PSDL_Window; x, y: LongInt); cdecl; external SDLLibName; |
865 function SDL_SetHint(name, value: PChar): boolean; cdecl; external SDLLibName; |
858 function SDL_SetHint(name, value: PChar): Boolean; cdecl; external SDLLibName; |
866 procedure SDL_StartTextInput; cdecl; external SDLLibName; |
859 procedure SDL_StartTextInput; cdecl; external SDLLibName; |
867 |
860 |
868 function SDL_PeepEvents(event: PSDL_Event; numevents: LongInt; action: SDL_eventaction; minType, maxType: LongInt): LongInt; cdecl; external SDLLibName; |
861 function SDL_PeepEvents(event: PSDL_Event; numevents: LongInt; action: SDL_eventaction; minType, maxType: LongWord): LongInt; cdecl; external SDLLibName; |
869 {$ELSE} |
862 {$ELSE} |
870 function SDL_PeepEvents(event: PSDL_Event; numevents: LongInt; action: SDL_eventaction; mask: Longword): LongInt; cdecl; external SDLLibName; |
863 function SDL_PeepEvents(event: PSDL_Event; numevents: LongInt; action: SDL_eventaction; mask: LongWord): LongInt; cdecl; external SDLLibName; |
871 {$ENDIF} |
864 {$ENDIF} |
872 |
865 |
873 function SDL_GetMouseState(x, y: PLongInt): Byte; cdecl; external SDLLibName; |
866 function SDL_GetMouseState(x, y: PLongInt): Byte; cdecl; external SDLLibName; |
874 function SDL_GetKeyName(key: Longword): PChar; cdecl; external SDLLibName; |
867 function SDL_GetKeyName(key: LongWord): PChar; cdecl; external SDLLibName; |
875 |
868 |
876 procedure SDL_PumpEvents; cdecl; external SDLLibName; |
869 procedure SDL_PumpEvents; cdecl; external SDLLibName; |
877 function SDL_PollEvent(event: PSDL_Event): LongInt; cdecl; external SDLLibName; |
870 function SDL_PollEvent(event: PSDL_Event): LongInt; cdecl; external SDLLibName; |
878 function SDL_WaitEvent(event: PSDL_Event): LongInt; cdecl; external SDLLibName; |
871 function SDL_WaitEvent(event: PSDL_Event): LongInt; cdecl; external SDLLibName; |
879 procedure SDL_SetEventFilter( filter : TSDL_EventFilter ); cdecl; external SDLLibName; |
872 procedure SDL_SetEventFilter(filter: TSDL_EventFilter); cdecl; external SDLLibName; |
880 |
873 |
881 function SDL_ShowCursor(toggle: LongInt): LongInt; cdecl; external SDLLibName; |
874 function SDL_ShowCursor(toggle: LongInt): LongInt; cdecl; external SDLLibName; |
882 |
875 |
883 procedure SDL_WM_SetIcon(icon: PSDL_Surface; mask : byte); cdecl; external SDLLibName; |
876 procedure SDL_WM_SetIcon(icon: PSDL_Surface; mask : Byte); cdecl; external SDLLibName; |
884 procedure SDL_WM_SetCaption(title: PChar; icon: PChar); cdecl; external SDLLibName; |
877 procedure SDL_WM_SetCaption(title: PChar; icon: PChar); cdecl; external SDLLibName; |
885 function SDL_WM_ToggleFullScreen(surface: PSDL_Surface): LongInt; cdecl; external SDLLibName; |
878 function SDL_WM_ToggleFullScreen(surface: PSDL_Surface): LongInt; cdecl; external SDLLibName; |
886 |
879 |
887 function SDL_CreateMutex: PSDL_mutex; cdecl; external SDLLibName; |
880 function SDL_CreateMutex: PSDL_mutex; cdecl; external SDLLibName; |
888 procedure SDL_DestroyMutex(mutex: PSDL_mutex); cdecl; external SDLLibName; |
881 procedure SDL_DestroyMutex(mutex: PSDL_mutex); cdecl; external SDLLibName; |
1080 procedure IMG_Quit; |
1073 procedure IMG_Quit; |
1081 begin |
1074 begin |
1082 end; |
1075 end; |
1083 {$ENDIF} |
1076 {$ENDIF} |
1084 |
1077 |
1085 procedure SDLNet_Write16(value: Word; buf: pointer); |
1078 procedure SDLNet_Write16(value: Word; buf: Pointer); |
1086 begin |
1079 begin |
1087 PByteArray(buf)^[1]:= value; |
1080 PByteArray(buf)^[1]:= value; |
1088 PByteArray(buf)^[0]:= value shr 8 |
1081 PByteArray(buf)^[0]:= value shr 8 |
1089 end; |
1082 end; |
1090 |
1083 |
1091 procedure SDLNet_Write32(value: LongWord; buf: pointer); |
1084 procedure SDLNet_Write32(value: LongWord; buf: Pointer); |
1092 begin |
1085 begin |
1093 PByteArray(buf)^[3]:= value; |
1086 PByteArray(buf)^[3]:= value; |
1094 PByteArray(buf)^[2]:= value shr 8; |
1087 PByteArray(buf)^[2]:= value shr 8; |
1095 PByteArray(buf)^[1]:= value shr 16; |
1088 PByteArray(buf)^[1]:= value shr 16; |
1096 PByteArray(buf)^[0]:= value shr 24 |
1089 PByteArray(buf)^[0]:= value shr 24 |
1097 end; |
1090 end; |
1098 |
1091 |
1099 function SDLNet_Read16(buf: pointer): Word; |
1092 function SDLNet_Read16(buf: Pointer): Word; |
1100 begin |
1093 begin |
1101 SDLNet_Read16:= PByteArray(buf)^[1] or |
1094 SDLNet_Read16:= PByteArray(buf)^[1] or |
1102 (PByteArray(buf)^[0] shl 8) |
1095 (PByteArray(buf)^[0] shl 8) |
1103 end; |
1096 end; |
1104 |
1097 |
1105 function SDLNet_Read32(buf: pointer): LongWord; |
1098 function SDLNet_Read32(buf: Pointer): LongWord; |
1106 begin |
1099 begin |
1107 SDLNet_Read32:= PByteArray(buf)^[3] or |
1100 SDLNet_Read32:= PByteArray(buf)^[3] or |
1108 (PByteArray(buf)^[2] shl 8) or |
1101 (PByteArray(buf)^[2] shl 8) or |
1109 (PByteArray(buf)^[1] shl 16) or |
1102 (PByteArray(buf)^[1] shl 16) or |
1110 (PByteArray(buf)^[0] shl 24) |
1103 (PByteArray(buf)^[0] shl 24) |