71 lines
1.8 KiB
C
71 lines
1.8 KiB
C
/*
|
|
* Roo/E, the Kangaroo Punch Portable GUI Toolkit
|
|
* Copyright (C) 2026 Scott Duensing
|
|
*
|
|
* http://kangaroopunch.com
|
|
*
|
|
*
|
|
* This file is part of Roo/E.
|
|
*
|
|
* Roo/E is free software: you can redistribute it and/or modify it under the
|
|
* terms of the GNU Affero General Public License as published by the Free
|
|
* Software Foundation, either version 3 of the License, or (at your option)
|
|
* any later version.
|
|
*
|
|
* Roo/E is distributed in the hope that it will be useful, but WITHOUT ANY
|
|
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
|
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
|
|
* details.
|
|
*
|
|
* You should have received a copy of the GNU Affero General Public License
|
|
* along with Roo/E. If not, see <https://www.gnu.org/licenses/>.
|
|
*
|
|
*/
|
|
|
|
|
|
#ifndef KPSPLATF_H
|
|
#define KPSPLATF_H
|
|
|
|
|
|
#include "roo_e.h"
|
|
#include "kpssurf.h"
|
|
|
|
|
|
#define EVENT_FLAG_KEYPRESS 1
|
|
#define EVENT_FLAG_LEFT_DOWN 2
|
|
#define EVENT_FLAG_LEFT_UP 4
|
|
#define EVENT_FLAG_RIGHT_DOWN 8
|
|
#define EVENT_FLAG_RIGHT_UP 16
|
|
|
|
#define BUTTON_LEFT 1
|
|
#define BUTTON_RIGHT 2
|
|
|
|
#define META_ALT 1
|
|
#define META_CTRL 2
|
|
#define META_SHIFT 4
|
|
|
|
#define KEY_ESC 27
|
|
|
|
|
|
typedef struct PlatformEventS {
|
|
int32_t flags;
|
|
int32_t x;
|
|
int32_t y;
|
|
int32_t buttons;
|
|
int32_t key;
|
|
int32_t kbstat;
|
|
int32_t dtime;
|
|
} PlatformEventT;
|
|
|
|
|
|
void platformEventGet(PlatformEventT *event);
|
|
void platformShutdown(void);
|
|
uint8_t platformStartup(int16_t width, int16_t height, int16_t depth);
|
|
|
|
void videoBlit(int16_t targetX, int16_t targetY, SurfaceT *source);
|
|
uint16_t videoDisplayHeightGet(void);
|
|
uint16_t videoDisplayWidthGet(void);
|
|
void videoModesShow(void);
|
|
|
|
|
|
#endif // KPSPLATF_H
|