[BACK]Return to term.h CVS log [TXT][DIR] Up to [contributed] / brogue-ce / src / platform

File: [contributed] / brogue-ce / src / platform / term.h (download)

Revision 1.1.1.1 (vendor branch), Thu May 27 20:31:42 2021 UTC (3 years ago) by rubenllorente
Branch: tmewett, MAIN
CVS Tags: start, HEAD
Changes since 1.1: +0 -0 lines

Initial Import from release 1.9.3

#ifndef _term_h_
#define _term_h_

#define TERM_NONE 0
#define TERM_MOUSE 1

typedef struct {float r, g, b;} fcolor;
struct term_t {
    int (*start)();
    void (*end)();
    void (*put)(int x, int y, int ch, fcolor *fg, fcolor *bg);
    void (*refresh)();
    int (*getkey)();
    void (*wait)(int ms);
    int (*hasKey)();
    void (*title)(const char *);
    void (*resize)(int w, int h);
    int (*keycodeByName)(const char *);

    struct {
        int up, down, left, right, backspace, del, quit;
    } keys;

    int width, height;
    struct {
        int x, y;
        int isPressed, justPressed, justReleased, justMoved;
        int shift, control;
    } mouse;
};

extern struct term_t Term;

#endif