Reference Codebot.Platform.SDL.pas
Part of the Codebot Render SDL package
Codebot.Platform.SDL provides the Codebot.Platform interfaces using SDL2. Bitmaps are loaded and saved with SDL_image, so programs using this unit need the SDL2_image library. Message dialogs are SDL message boxes. SDL has no file dialogs, so file and picture dialogs are the ones made from widgets in Codebot.Render.Widgets.Dialogs, shown in a widget scene. It takes the place of Codebot.Platform.LCL in programs which use SDL windows.
SDL is used on the thread which runs the SDL window.
The platform routines are assigned when this unit is initialized. If a program also uses Codebot.Platform.LCL, the unit initialized last decides which backend is used.
The Codebot.Platform.SDL unit provides the Codebot.Platform interfaces using SDL2. Bitmaps are TBitmapDataSDL objects, which are loaded and saved using SDL_image, the clipboard is the SDL clipboard, and message dialogs are SDL message boxes. Since SDL has no file dialogs of its own, the file and picture dialogs are built from widgets instead. The platform routines are assigned when this unit is initialized.
Items 14 items
| Name | Kind | Line |
|---|---|---|
| NewBitmapDataSDL | function | 64 |
| NewWindowSDL | function | 67 |
| TBitmapDataSDL | class | 43 |
| GetHeight | function | 50 |
| GetPixels | function | 51 |
| GetWidth | function | 49 |
| LoadFromFile | procedure | 54 |
| LoadFromStream | procedure | 55 |
| SaveToFile | procedure | 56 |
| SaveToStream | procedure | 57 |
| SetSize | procedure | 53 |
| Height | property | 59 |
| Pixels | property | 60 |
| Width | property | 58 |