123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475 |
- #ifndef CORE_WINDOW_H
- #define CORE_WINDOW_H
- #include <core/Vector.h>
- typedef bool (*CoreWindowRunHandler)(void* data);
- typedef void (*CoreWindowTickHandler)(void* data);
- typedef void (*CoreWindowRenderHandler)(void* data, float lag);
- typedef struct {
- CoreIntVector2 size;
- bool fullscreen;
- const char* name;
- } CoreWindowOptions;
- bool coreWindowOpen(const CoreWindowOptions* options);
- void coreWindowClose(void);
- void coreWindowShow(void);
- void coreWindowTrapCursor(void);
- void coreWindowFreeCursor(void);
- bool coreWindowIsCursorTrapped(void);
- const CoreIntVector2* coreWindowGetSize(void);
- bool CoreWindowSizeChanged(void);
- bool coreWindowShouldClose(void);
- void coreWindowRunHandler(CoreWindowRunHandler wr, void* data);
- void coreWindowTickHandler(CoreWindowTickHandler t, void* data);
- void coreWindowRenderHandler(CoreWindowRenderHandler r, void* data);
- void coreWindowNanosPerTick(i64 nanos);
- void coreWindowRun(void);
- float coreWindowTicksPerSecond(void);
- float coreWindowFramesPerSecond(void);
- // namespace Input {
- // void setLimit(int limit);
- // void reset();
- // void enable();
- // void disable();
- // bool isEnabled();
- // void fill(const char* s);
- // int getCursor();
- // void setCursor(int index);
- // const List<uint32>& getUnicode();
- //
- // template<int N>
- // void toString(StringBuffer<N>& s) {
- // for(uint32 c : getUnicode()) {
- // s.appendUnicode(c);
- // }
- // }
- // }
- // namespace Controls {
- // typedef StringBuffer<32> ButtonName;
- // typedef int ButtonId;
- //
- // ButtonId add(const ButtonName& name);
- // void bindKey(ButtonId id, int key);
- // void bindGamepad(ButtonId id, int gamepadButton);
- // void bindMouse(ButtonId id, int mouseButton);
- //
- // Vector2 getLastMousePosition();
- // Vector2 getMousePosition();
- // Vector2 getLeftGamepadAxis();
- // Vector2 getRightGamepadAxis();
- // float getLeftGamepadTrigger();
- // float getRightGamepadTrigger();
- //
- // bool isDown(ButtonId id);
- // int getDownTime(ButtonId id);
- // bool wasReleased(ButtonId id);
- // const ButtonName& getName(ButtonId id);
- // }
- #endif
|