forked from shoes/shoes-deprecated
-
Notifications
You must be signed in to change notification settings - Fork 6
/
cocoa.h
112 lines (98 loc) · 1.68 KB
/
cocoa.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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
//
// shoes/native/cocoa.h
// Custom Cocoa interfaces for Shoes
//
#import <Cocoa/Cocoa.h>
@interface ShoesEvents : NSObject
{
int count;
}
@end
@interface ShoesWindow : NSWindow
{
VALUE app;
}
@end
@interface ShoesView : NSView
{
VALUE canvas;
}
@end
@interface ShoesButton : NSButton
{
VALUE object;
}
@end
@interface ShoesTextField : NSTextField
{
VALUE object;
}
@end
@interface ShoesSecureTextField : NSSecureTextField
{
VALUE object;
}
@end
@interface ShoesTextView : NSScrollView
{
VALUE object;
NSTextView *textView;
}
@end
@interface ShoesPopUpButton : NSPopUpButton
{
VALUE object;
}
@end
@interface ShoesSlider : NSSlider
{
VALUE object;
}
@end
@interface ShoesAlert : NSWindow
{
NSWindow *win;
BOOL answer;
}
@end
@interface ShoesTimer : NSObject
{
VALUE object;
NSTimer *timer;
}
@end
void add_to_menubar(NSMenu *main, NSMenu *menu);
void create_apple_menu(NSMenu *main);
void create_edit_menu(NSMenu *main);
void create_window_menu(NSMenu *main);
void create_help_menu(NSMenu *main);
void shoes_native_view_supplant(NSView *from, NSView *to);
#define VK_ESCAPE 53
#define VK_DELETE 117
#define VK_INSERT 114
#define VK_TAB 48
#define VK_BS 51
#define VK_PRIOR 116
#define VK_NEXT 121
#define VK_HOME 115
#define VK_END 119
#define VK_LEFT 123
#define VK_UP 126
#define VK_RIGHT 124
#define VK_DOWN 125
#define VK_F1 122
#define VK_F2 120
#define VK_F3 99
#define VK_F4 118
#define VK_F5 96
#define VK_F6 97
#define VK_F7 98
#define VK_F8 100
#define VK_F9 101
#define VK_F10 109
#define VK_F11 103
#define VK_F12 111
#define KEY_SYM(name, sym) \
if (key == VK_##name) \
v = ID2SYM(rb_intern("" # sym)); \
else