quakeforge/ruamoko/qwaq/qwaq-textcontext.h
Bill Currie affadc3d25 [qwaq] Create protocols for DrawBuffer and TextContext
Plenty of flaws at the moment (casts to id :/), but the basic idea seems
to be ok.
2020-03-18 01:40:41 +09:00

65 lines
1.2 KiB
Objective-C

#ifndef __qwaq_textcontect_h
#define __qwaq_textcontect_h
#ifdef __QFCC__
#include <Object.h>
#include "qwaq-curses.h"
#include "qwaq-draw.h"
#include "qwaq-rect.h"
@class DrawBuffer;
@interface TextContext : Object<TextContext>
{
window_t window;
union {
Rect rect;
struct {
Point offset;
Extent size;
};
struct {
int xpos;
int ypos;
int xlen;
int ylen;
};
};
}
+ (int) max_colors;
+ (int) max_color_pairs;
+ (void) init_pair: (int) pair, int fg, int bg;
+ (int) acs_char: (int) acs;
+ (void) move: (Point) pos;
+ (void) curs_set: (int) visibility;
+ (void) doupdate;
+ (TextContext *) screen;
-init;
-initWithRect: (Rect) rect;
-initWithWindow: (window_t) window;
- (window_t) window;
- (Extent) size;
- blitFromBuffer: (DrawBuffer *) srcBuffer to: (Point) pos from: (Rect) rect;
- (void) refresh;
+ (void) refresh;
- (void) bkgd: (int) ch;
- (void) scrollok: (int) flag;
- (void) border: (box_sides_t) sides, box_corners_t corners;
@end
#else
#include "QF/pr_obj.h"
typedef struct qwaq_textcontext_s {
pr_id_t isa;
pointer_t window;
} qwaq_textcontext_t;
#endif
#endif//__qwaq_textcontect_h