TinyMaterialDesign
Loading...
Searching...
No Matches
TinyMaterialDesignConfig.h
Go to the documentation of this file.
1#pragma once
2// Every examples/controls and examples/layouts sketch logs taps/clicks via
3// a plain printf() in its widget callbacks, without including <cstdio>
4// itself - guaranteed here rather than relying on it happening to already
5// be pulled in transitively by some TinyGPU internal.
6#include <cstdio>
7#include "TinyGPU/Boards/LCDBoards.h"
8
9namespace tinymd {
10
12
13#ifdef ESP32
14/// The board every examples/controls and examples/layouts sketch uses by
15/// default - an actual object (not just a type), already fully
16/// constructed, so a sketch never needs its own `#ifdef ESP32` to build
17/// one: `App<RGB565> app(DefaultBoard);` is all it takes, on every
18/// platform. Swap in a different `LCDBoard` from
19/// `TinyGPU/Boards/LCDBoardsESP32.h` for other real hardware by
20/// constructing and using your own instead (see kitchen-sink.ino/
21/// esp32-radio.ino, which do this because they need more than one board
22/// type or extra wiring `App` doesn't cover).
24#elif __has_include(<SDL.h>)
25/// See the `#ifdef ESP32` branch above - on desktop this is an
26/// `LCDBoardDesktopSDL` sized 240x320. Deliberately not named `kWidth`/
27/// `kHeight` here (even as an internal-looking constant) - a sketch with
28/// its own same-named globals, like kitchen-sink.ino, would collide with
29/// them through `using namespace tinymd`; a sketch reads the board's real
30/// size back via `App::width()`/`height()` instead.
32#endif
33
34} // namespace tinymd
Definition: AnchorLayout.h:4