mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2024-11-27 06:34:11 +00:00
ac25d9f1c1
Now the device windows close properly when an input device is removed.
49 lines
1.2 KiB
Objective-C
49 lines
1.2 KiB
Objective-C
#ifndef __qwaq_ui_draw_h
|
|
#define __qwaq_ui_draw_h
|
|
|
|
#include <Object.h>
|
|
|
|
#include "ruamoko/qwaq/ui/rect.h"
|
|
|
|
@class DrawBuffer;
|
|
|
|
@protocol DrawBuffer
|
|
- blitFromBuffer: (DrawBuffer *) srcBuffer to: (Point) pos from: (Rect) rect;
|
|
- (Rect) rect;
|
|
- (Extent) size;
|
|
- (int *) buffer;
|
|
@end
|
|
|
|
@protocol TextContext
|
|
- (void) release;
|
|
- blitFromBuffer: (DrawBuffer *) srcBuffer to: (Point) pos from: (Rect) rect;
|
|
- clearReact: (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;
|
|
- (void) mvhline:(Point)pos, int ch, int len;
|
|
- (void) mvvline:(Point)pos, int ch, int len;
|
|
@end
|
|
|
|
@interface DrawBuffer : Object <DrawBuffer, TextContext>
|
|
{
|
|
int *buffer;
|
|
Extent size;
|
|
Point cursor;
|
|
int background;
|
|
}
|
|
+(DrawBuffer *)buffer:(Extent)size;
|
|
-initWithSize:(Extent)size;
|
|
@end
|
|
|
|
#endif//__qwaq_ui_draw_h
|