Commit Graph

196 Commits

Author SHA1 Message Date
Stanislav Ch. Nikolov ed389c188c Fixed and added obj-c methods for NSWindow 2025-08-28 12:39:15 +03:00
Steve Waddicor 9dfce3da86 Convert leading spaces to tabs 2025-08-01 23:06:04 +01:00
cardboardguru76 44f039a92f Merge branch 'odin-lang:master' into darwin-foundation-support-for-handmade-hero-port 2025-07-30 00:28:31 +01:00
Steve Waddicor 9c5e577792 Additional obj-c methods for darwin Foundation
Added support for NSBitmapImageRep class.
Added ability to set contents to a CALayer.
I needed these to support a port of Handmade Hero, but they are of general use.
2025-07-29 21:01:22 +01:00
Colin Davidson 0a102bd757 shuffle to Kern_Return 2025-07-29 11:52:58 -07:00
Colin Davidson fe2b48dec4 enum pass 2025-07-29 11:48:58 -07:00
Colin Davidson b88f9194d0 Merge remote-tracking branch 'live/master' into macharena 2025-07-28 14:24:46 -07:00
Harold Brenes bab4ce11fc Rename iOS subtarget to iPhone for consistency.
Add `ODIN_PLATFORM_SUBTARGET_IOS` builtin constant which evaluated to
`true` when the platform is `Darwin` and the subtarget it either `iPhone` or `iPhoneSimulator`
2025-07-14 21:55:28 -04:00
Harold Brenes 219b0fe535 Replace system:System.framework imports with system:System
This makes the linker work for both macOS and iOS targets
2025-07-13 15:45:21 -04:00
Colin Davidson 2dae1d8a41 fix tabbing 2025-07-07 14:36:31 -07:00
Colin Davidson 389439ccb9 Merge branch 'master' into macharena 2025-07-07 14:34:05 -07:00
Raph a7e89e1324 Merge branch 'master' into tiocgwinsz_time 2025-06-20 16:50:00 -01:00
RaphGL 0b5be6ad6a added TIOCGWINSZ to darwin, linux and freebsd 2025-06-20 16:45:05 -01:00
Jeroen van Rijn 9c810e8340 Fix #5366 2025-06-19 22:46:51 +02:00
Colin Davidson 04481e0fd2 Merge branch 'master' into macharena 2025-06-08 16:17:32 -07:00
Colin Davidson b1ed22d84f fix frequency grab 2025-06-08 16:16:34 -07:00
Jeroen van Rijn 4b36306674 Deprecate old @(deprecated) things. 2025-06-06 10:42:34 +02:00
Zach Clark 78d83288a0 Add missing SEL _cmd argument to objc class_addMethod IMPs
When trying to grab the window pointer off the notification in a
windowDidBecomeKey implementation, I kept getting segfaults calling
notification->object(). The second argument of these needs to be a SEL.

https://developer.apple.com/documentation/objectivec/class_addmethod(_:_:_:_:)?language=objc#Discussion

I imagine existing code is getting by by setting the window information
in the delegate's context userdata, which works fine when you only have
one window as you can avoid needing to call notification->object(),
until you want one delegate assigned to two windows, hard to work around.
2025-05-27 17:04:19 -07:00
Jeroen van Rijn d6210ae76f Fix -vet complaints in core:sys/darwin/Foundation 2025-05-17 16:36:10 +02:00
gingerBill 5454e120fe Add NSMenuItem.odin 2025-05-17 13:27:54 +01:00
gingerBill d77124feae Add Objective-C helper for creating subclasses 2025-05-17 11:36:24 +01:00
Laytan Laats cacb9f9f54 os2: better copy_directory, and add native copy_file and copy_directory variants on MacOS 2025-05-08 19:32:30 +02:00
Colin Davidson f1fdd1a8b9 Merge branch 'master' into macharena 2025-04-26 18:22:21 -07:00
Harold Brenes 040d8b1d48 Fix 2 selectors in NSDictionary 2025-04-17 15:22:10 -04:00
Keenan Woodall a709876788 SavePanel_URL returns ^URL instead of ^Array 2025-02-23 19:00:27 -06:00
gingerBill dc7cd21986 Merge pull request #4782 from Daxode/nsstring-appendingstring
Add stringByAppendingString to NSString
2025-02-02 07:01:16 +00:00
daniel.andersen c8a537aad9 Add stringByAppendingString to NSString 2025-02-02 03:26:07 +01:00
duffn af63db5075 Fix tab indents in NSSavePanel 2025-01-29 16:06:19 -07:00
gingerBill 0e27acd755 Update NSSavelPanel 2025-01-28 11:38:06 +00:00
Samuel Elgozi 0f12618642 fix incorrect use of Bool 2025-01-18 21:08:54 +02:00
Samuel Elgozi 3fb766f98d updated to meet formatting style 2025-01-17 13:43:34 +02:00
Samuel Elgozi 19d6c01f0f Added Foundation bindings 2025-01-17 10:42:32 +02:00
Laytan Laats ad80aa6d28 sys/info & odin report: rework macos version retrieval 2024-11-26 22:28:21 +01:00
Colin Davidson d60fb5a44e update to master 2024-11-20 15:51:08 -08:00
Sebastian Pahnke 395fa7fdb8 Add NSApplication bindings for mainWindow and keyWindow 2024-11-13 14:42:31 +01:00
Beau McCartney e240c034de aliases to enum members are other enum members, not constants 2024-10-12 20:11:46 -06:00
Beau McCartney 77cf4373a8 sync policy enum 2024-10-10 11:24:55 -06:00
Beau McCartney 4fffd1b271 kern return: doc comments above enum members 2024-10-10 11:12:42 -06:00
Beau McCartney 66c902406d align by space instead of colon 2024-10-10 11:09:06 -06:00
Beau McCartney 3aae1740c7 proc ( -> proc( 2024-10-10 11:03:55 -06:00
Beau McCartney b0ff41e673 indent with tabs not spaces 2024-10-08 19:08:13 -06:00
Beau McCartney 41c717de3f vm_flags as a bitset 2024-10-08 19:08:13 -06:00
Beau McCartney fee99c0800 move doc comment to right spot 2024-10-08 13:41:13 -06:00
Beau McCartney 58745bc7ae use b32 for boolean_t 2024-10-08 13:39:53 -06:00
Beau McCartney 27753ff7a8 VM_INHERIT_* as an enum 2024-10-08 12:51:18 -06:00
Beau McCartney 9004441e43 VM_PROT_* flags as a bitset 2024-10-08 12:51:12 -06:00
Beau McCartney 2695b269a4 kern return as an enum 2024-10-08 12:44:49 -06:00
Beau McCartney 67252ff415 make some types and procs match the c apis
procs:
| type          | old  | new (matching c api)|
| ---           | ---- | ------------------- |
| kern_return_t | u64  | c.int               |
| thread_t      | u64  | mach_port_t         |
| task_t        | u64  | mach_port_t         |
| semaphore_t   | u64  | mach_port_t         |

for mach_task_self(), return mach_port_t instead of task_t

for semaphore_signal_thread(), accept a thread_t instead of a thread_act_t
2024-10-08 12:12:21 -06:00
Beau McCartney db8950922c add mach_port_deallocate - frees the port from mach_make_memory_entry() 2024-10-07 15:48:24 -06:00
Beau McCartney 7b1086b489 make aliases of vm types not distinct
I think they're meant to be used interchangeably, just typedefed to have more
clear names for certain contexts
2024-10-07 14:24:38 -06:00