diff --git a/core/sys/darwin/Foundation/NSApplication.odin b/core/sys/darwin/Foundation/NSApplication.odin index c2c93a3fe..482221cdf 100644 --- a/core/sys/darwin/Foundation/NSApplication.odin +++ b/core/sys/darwin/Foundation/NSApplication.odin @@ -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) diff --git a/core/sys/darwin/Foundation/NSMenu.odin b/core/sys/darwin/Foundation/NSMenu.odin index 79da36601..e49162a7f 100644 --- a/core/sys/darwin/Foundation/NSMenu.odin +++ b/core/sys/darwin/Foundation/NSMenu.odin @@ -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") } \ No newline at end of file diff --git a/core/sys/posix/termios.odin b/core/sys/posix/termios.odin index 1c820df2a..c73936d58 100644 --- a/core/sys/posix/termios.odin +++ b/core/sys/posix/termios.odin @@ -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