quakeforge/ruamoko/qwaq/qwaq-draw.h
Bill Currie 9bc91cd7d1 [qwaq] Implement resizing
Terminal resize is detected and the views adjust appropriately (well,
those for which I've set grow flags: the window title bar doesn't adjust
yet).
2020-03-23 20:14:32 +09:00

45 lines
1 KiB
Objective-C

#ifndef __qwaq_draw_h
#define __qwaq_draw_h
#include <Object.h>
#include "qwaq-rect.h"
@class DrawBuffer;
@protocol DrawBuffer
- blitFromBuffer: (DrawBuffer *) srcBuffer to: (Point) pos from: (Rect) rect;
- (Rect) rect;
- (Extent) size;
- (int *) buffer;
@end
@protocol TextContext
- blitFromBuffer: (DrawBuffer *) srcBuffer to: (Point) pos from: (Rect) rect;
- (Extent) size;
- (void) resizeTo: (Extent) newSize; // absolute size
- (void) bkgd: (int) ch;
- (void) clear;
- (void) printf: (string) fmt, ...;
- (void) vprintf: (string) fmt, @va_list args;
- (void) addch: (int) ch;
- (void) addstr: (string) str;
- (void) mvprintf: (Point) pos, string fmt, ...;
- (void) mvvprintf: (Point) pos, string fmt, @va_list args;
- (void) mvaddch: (Point) pos, int ch;
- (void) mvaddstr: (Point) pos, string str;
@end
@interface DrawBuffer : Object <DrawBuffer, TextContext>
{
int *buffer;
Extent size;
Point cursor;
int background;
}
+ (DrawBuffer *) buffer: (Extent) size;
- initWithSize: (Extent) size;
@end
#endif