-
Notifications
You must be signed in to change notification settings - Fork 1
/
mlx_new_window.h
57 lines (50 loc) · 1.57 KB
/
mlx_new_window.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
//
// mlx_int.h for minilibx
//
//
// include opengl needed before mlx_int.h
//
#import <Cocoa/Cocoa.h>
#import "mlx_int.h"
@interface NSWindowEvent : NSWindow
{
func_t event_funct[MAX_EVENT];
void *(event_param[MAX_EVENT]);
int keyrepeat;
int keyflag;
int size_x;
int size_y;
}
- (NSWindowEvent *) initWithContentRect:(NSRect)rect styleMask:(NSUInteger)winstyle backing:(NSBackingStoreType)bck defer:(BOOL) dfr;
- (void) setEvent:(int)event andFunc:(func_t)func andParam:(void *)param;
- (void) setKeyRepeat:(int)mode;
- (void) exposeNotification:(NSNotification *)note;
- (void) closeNotification:(NSNotification *)note;
@end
@interface MlxWin : NSOpenGLView
{
NSWindowEvent *win;
NSOpenGLContext *ctx;
glsl_info_t glsl;
int openglwin;
int size_x;
int size_y;
int pixel_nb;
GLuint pixel_vbuffer;
GLuint pixel_texture;
unsigned int *pixtexbuff;
}
- (id) initWithRect: (NSRect)rect andTitle: (NSString *)title pfaAttrs: (NSOpenGLPixelFormatAttribute *)attrs;
- (void) selectGLContext;
- (void) flushGLContext;
- (void) pixelPutColor: (int)color X:(int)x Y:(int)y;
- (void) mlx_gl_draw;
- (void) mlx_gl_draw_img:(mlx_img_list_t *)img andCtx:(mlx_img_ctx_t *)imgctx andX:(int)x andY:(int)y;
- (void) mlx_gl_draw_font:(mlx_img_list_t *)img andCtx:(mlx_img_ctx_t *)imgctx andX:(int)x andY:(int)y andColor:(int)color glyphX:(int)gx glyphY:(int)gy;
- (NSOpenGLContext *) ctx;
- (NSWindowEvent *) win;
- (void) setEvent:(int)event andFunc:(func_t)func andParam:(void *)param;
- (void) setKeyRepeat:(int)mode;
- (void) ctxNeedsUpdate;
@end