mirror of
https://github.com/odin-lang/Odin.git
synced 2026-05-04 12:04:41 +00:00
A couple of foundation binding. Vet tabs.
This commit is contained in:
@@ -95,6 +95,11 @@ Application_setTitle :: proc "c" (self: ^Application, title: ^String) {
|
||||
msgSend(nil, self, "setTitle", title)
|
||||
}
|
||||
|
||||
@(objc_type=Application, objc_name="mainMenu")
|
||||
Window_mainMenu :: proc "c" (self: ^Application) -> ^Menu {
|
||||
return msgSend(^Menu, self, "mainMenu")
|
||||
}
|
||||
|
||||
@(objc_type=Application, objc_name="setMainMenu")
|
||||
Application_setMainMenu :: proc "c" (self: ^Application, menu: ^Menu) {
|
||||
msgSend(nil, self, "setMainMenu:", menu)
|
||||
|
||||
@@ -24,7 +24,7 @@ MenuItemCallback :: proc "c" (unused: rawptr, name: SEL, sender: ^Object)
|
||||
|
||||
|
||||
@(objc_class="NSMenuItem")
|
||||
MenuItem :: struct {using _: Object}
|
||||
MenuItem :: struct {using _: Object}
|
||||
|
||||
@(objc_type=MenuItem, objc_name="alloc", objc_is_class_method=true)
|
||||
MenuItem_alloc :: proc "c" () -> ^MenuItem {
|
||||
@@ -70,11 +70,15 @@ MenuItem_setSubmenu :: proc "c" (self: ^MenuItem, submenu: ^Menu) {
|
||||
msgSend(nil, self, "setSubmenu:", submenu)
|
||||
}
|
||||
|
||||
@(objc_type=MenuItem, objc_name="title")
|
||||
MenuItem_title :: proc "c" (self: ^MenuItem) -> ^String {
|
||||
return msgSend(^String, self, "title")
|
||||
}
|
||||
|
||||
|
||||
|
||||
@(objc_class="NSMenu")
|
||||
Menu :: struct {using _: Object}
|
||||
Menu :: struct {using _: Object}
|
||||
|
||||
@(objc_type=Menu, objc_name="alloc", objc_is_class_method=true)
|
||||
Menu_alloc :: proc "c" () -> ^Menu {
|
||||
@@ -100,4 +104,9 @@ Menu_addItem :: proc "c" (self: ^Menu, item: ^MenuItem) {
|
||||
@(objc_type=Menu, objc_name="addItemWithTitle")
|
||||
Menu_addItemWithTitle :: proc "c" (self: ^Menu, title: ^String, selector: SEL, keyEquivalent: ^String) -> ^MenuItem {
|
||||
return msgSend(^MenuItem, self, "addItemWithTitle:action:keyEquivalent:", title, selector, keyEquivalent)
|
||||
}
|
||||
|
||||
@(objc_type=Menu, objc_name="itemArray")
|
||||
Menu_itemArray :: proc "c" (self: ^Menu) -> ^Array {
|
||||
return msgSend(^Array, self, "itemArray")
|
||||
}
|
||||
@@ -548,22 +548,22 @@ when ODIN_OS == .Darwin {
|
||||
FF0 :: 0x00000000
|
||||
FF1 :: 0x00008000
|
||||
|
||||
B0 :: 0x00000000
|
||||
B50 :: 0x00000001
|
||||
B75 :: 0x00000002
|
||||
B110 :: 0x00000003
|
||||
B134 :: 0x00000004
|
||||
B150 :: 0x00000005
|
||||
B200 :: 0x00000006
|
||||
B300 :: 0x00000007
|
||||
B600 :: 0x00000008
|
||||
B1200 :: 0x00000009
|
||||
B1800 :: 0x0000000a
|
||||
B2400 :: 0x0000000b
|
||||
B4800 :: 0x0000000c
|
||||
B9600 :: 0x0000000d
|
||||
B19200 :: 0x0000000e
|
||||
B38400 :: 0x0000000f
|
||||
B0 :: 0x00000000
|
||||
B50 :: 0x00000001
|
||||
B75 :: 0x00000002
|
||||
B110 :: 0x00000003
|
||||
B134 :: 0x00000004
|
||||
B150 :: 0x00000005
|
||||
B200 :: 0x00000006
|
||||
B300 :: 0x00000007
|
||||
B600 :: 0x00000008
|
||||
B1200 :: 0x00000009
|
||||
B1800 :: 0x0000000a
|
||||
B2400 :: 0x0000000b
|
||||
B4800 :: 0x0000000c
|
||||
B9600 :: 0x0000000d
|
||||
B19200 :: 0x0000000e
|
||||
B38400 :: 0x0000000f
|
||||
|
||||
_CSIZE :: 0x00000030
|
||||
CS5 :: 0x00000000
|
||||
|
||||
Reference in New Issue
Block a user