1
0
Fork 0
LithOS3/lithos_c/inc/Lth_context.h

58 lines
1.4 KiB
C
Raw Normal View History

//-----------------------------------------------------------------------------
//
// Copyright © 2016 Project Golan
//
// See "LICENSE" for more information.
//
//-----------------------------------------------------------------------------
//
// Context for drawing.
//
//-----------------------------------------------------------------------------
#ifndef lithos3__Lth_context_h
#define lithos3__Lth_context_h
//----------------------------------------------------------------------------|
// Type Definitions |
//
//
// Lth_Context
//
// internal data
// clip
// map
//
// read-only
// w: width of screen
// h: height of screen
//
// read-write
// hid: HUD ID range
//
typedef struct Lth_Context
{
struct { Lth_Rect rects[16]; int num; } clip;
Lth_LinkList *map;
int w, h;
Lth_HIDRange hid;
} Lth_Context;
//----------------------------------------------------------------------------|
// Extern Functions |
//
Lth_Context *Lth_ContextNew(int w, int h, Lth_HID hidBase, Lth_HID hidEnd);
void Lth_ContextMap(Lth_Context *ctx, struct Lth_Window *window);
void Lth_ContextDestroy(Lth_Context *ctx);
void Lth_ContextRun(Lth_Context *ctx);
void Lth_ContextClipPush(Lth_Context *ctx, int x, int y, int w, int h);
void Lth_ContextClipPop(Lth_Context *ctx);
#endif//lithos3__Lth_context_h