Commit Graph

3193 Commits

Author SHA1 Message Date
Duncan Cunningham
e9ece9d6cf Add NSPasteboard constants 2024-06-16 16:37:37 +02:00
Duncan Cunningham
3721b4f874 Add stub for NSFontCollection 2024-06-16 16:37:37 +02:00
CuriousTommy
4dac644abc
Merge pull request #38 from sirnacnud/nssysteminfopanel-name-fix
Use localized CFBundleName for NSSystemInfoPanel
2024-03-16 12:58:29 -07:00
Duncan Cunningham
b74def59bd Use localized CFBundleName for NSSystemInfoPanel 2024-03-16 17:14:37 +01:00
CuriousTommy
ad281f226c
Merge pull request #36 from sirnacnud/nsscreen
Stub out NSScreen deviceDescription
2024-02-16 09:35:13 -08:00
Duncan Cunningham
41a67f02bb Stub out NSScreen deviceDescription 2024-02-09 22:00:25 +01:00
Luboš Doležel
7ea8bb5c26
Merge pull request #20 from TheBrokenRail/focus-segfault
Fix Segfault When The FocusIn/Out Events Are Received And The Window Is Closed
2024-02-03 16:15:08 +01:00
CuriousTommy
e348862349
Merge pull request #33 from sirnacnud/add-NSApplicationLaunchUserNotificationKey
Add symbol for NSApplicationLaunchUserNotificationKey
2024-01-06 19:57:46 -08:00
Duncan Cunningham
8271f7e5ec Add symbol for NSApplicationLaunchUserNotificationKey 2024-01-06 21:32:31 +01:00
Ariel Abreu
e01bcde594
Merge pull request #32 from CKegel/warning_fixes
Correct NSInteger warnings
2023-10-17 00:05:27 -04:00
ckegel
8283bdabbe Implement correct formatting for NSInteger values 2023-10-16 23:41:29 -04:00
Ariel Abreu
9a223835e7
Merge pull request #31 from CKegel/master
Patch NSMenuItem implementation
2023-10-16 14:26:26 -04:00
ckegel
410d10de2a Use correct key values in NSMenuItem encodeWithCoder: implementation 2023-10-16 11:00:32 -04:00
Ariel Abreu
80e61187d4
Many encodeWithCoder: implementations for Interface Builder
These are all the implementations needed for my sample app, but more
will have to be added later for XIBs with other objects, of course.
2023-10-13 10:33:13 -04:00
Ariel Abreu
86a42fbbf9
NSIBObjectData: Add some properties for Xcode; use NSMapTables
The refactoring to use NSMapTables isn't arbitrary, it's required for
Xcode: Xcode accesses these map tables via the `*Table` properties and
inserts and removes objects in them at its discretion.

Note this means the map tables also have to use the same key and value
options that Apple uses in order to remain compatible,
so don't change these without a good reason.
2023-10-13 10:31:12 -04:00
Ariel Abreu
491b0b0418
NSWindowTemplate: Add a lot more properties
These are required by Xcode. TODO: actually use them.
2023-10-13 10:22:23 -04:00
Ariel Abreu
bd843143fb
Misc. stubs, fixes, and implementations for Xcode 2023-10-13 10:18:19 -04:00
Ariel Abreu
1efc3b97de
Implement NSUserInterfaceItemIdentification 2023-10-13 10:08:54 -04:00
Ariel Abreu
6f9958fd46
Add performSynchronousFileAccessUsingBlock stub 2023-10-07 23:50:19 -04:00
Ariel Abreu
22e542f69d
Correct IBCocoaFramework value 2023-10-07 23:50:03 -04:00
Ariel Abreu
d7fc1ce4b7
More fixes and stubs for Xcode 2023-10-07 11:00:59 -04:00
Ariel Abreu
ac4514c596
More stubs and fixes for Xcode 2023-09-25 16:17:44 -04:00
CuriousTommy
a23a4bab20
Merge pull request #30 from darlinghq/fedora_38_fix
Fix Building For Fedora 38
2023-06-28 10:29:56 -07:00
Thomas A
6b006c021b Fix implicit-function-declaration 2023-06-19 11:30:55 -07:00
Thomas A
b30c2be791 Change include from CoreServices to CarbonCore 2023-04-16 13:47:48 -07:00
Ariel Abreu
3c656d84f5
[mtl] Only require texture memory to be host-visible if it's not framebuffer-only 2023-04-11 08:16:16 -04:00
Ariel Abreu
c449e7608e
Make Metal an optional part of the build
See the corresponding commit in the main repo
2023-04-06 10:04:50 -04:00
Ariel Abreu
96122cff43
Use Indium's DynamicVK to load Vulkan functions dynamically
This allows us to link to Vulkan dynamically at runtime (via Indium).
2023-04-06 10:04:50 -04:00
Ariel Abreu
6afea83f6c
[mtl-layer] Fix some lock issues with queued drawables 2023-04-06 10:04:49 -04:00
Ariel Abreu
ccf32c6281
Ensure objc presented handlers are invoked
Previously, they would only be invoked if the `present` method was
invoked directly on the objc drawable object.
2023-04-06 10:04:49 -04:00
Ariel Abreu
c99fc73ebd
Fix huge memory leak
This fixes the massive memory leak that was presented with the old code
that could cause the memory usage to reach over 2GiB in under 5 seconds
(while running at 60fps). There still seems to be another memory leak
present, but it's much smaller by comparison (increases by about 0.3MiB
every second when running at 60fps).
2023-04-06 10:04:49 -04:00
Ariel Abreu
55bafce1f1
Initial support for Metal layers and drawables
In its current state, I consider this code to be experimental and
unstable. The biggest problem is that there's currently a HUGE memory
leak somewhere (over 2GiB in under 5 seconds at 60fps). I'm committing
what I have now since I don't feel like debugging that right now and it
*does* technically work as-is.

The current approach is not great for performance: first, we render to a Metal/Vulkan
texture in the desired format then blit that to an RGBA Metal/Vulkan
texture shared with
OpenGL. Then, we copy *that* to another OpenGL texture in CAMetalLayer
to use as the content for the layer (we can't keep the drawable's OpenGL
texture, since that has to be recycled). Finally, this is rendered to a
subwindow by CARenderer/CALayerContext. We cannot get rid of the last copy
since we must render to the subwindow somehow and it's the easiest
way to play nice with sublayers. I also don't think we can get rid of the
first copy since OpenGL doesn't support some of Metal/Vulkan's texture
formats; plus, we can't share optimally tiled images between Vulkan and
OpenGL with some vendors' drivers (e.g. AMD).
We *could* get rid of the second copy if we were able to accurately
determine when the content is finally presented; then we could simply
keep the drawable in-use, render it to the subwindow when asked to, and
release it once we know the render is complete.
2023-04-06 10:04:49 -04:00
Thomas A
3159ee117c Fix "parameter name omitted" For CGWindowLevelForKey. Add Note About CGWindowLevel. 2023-03-29 09:15:52 -07:00
Thomas A
624da5b8e1 Replace nil with kCGErrorSuccess
Fixes Building
2023-03-27 11:23:05 -07:00
CuriousTommy
4ea39ed10d
Merge pull request #26 from genkiinstruments/coretext-missing-symbols
Add some stubs for missing symbols in CoreText
2023-03-27 10:14:32 -07:00
Daniel Gretarsson
b001b467d5 Use NS_ENUM for added enums in CoreText 2023-03-27 10:25:05 +00:00
Daniel Gretarsson
ccd8c204e1 Add some stubs for missing symbols in CoreText 2023-03-27 10:25:05 +00:00
CuriousTommy
a72fb066cd
Merge pull request #25 from genkiinstruments/coregraphics-missing-symbols
Add some stubs and missing symbols for CoreGraphics
2023-03-26 10:27:35 -07:00
Daniel Gretarsson
90c9369964 Use CF_ENUM on new enums in CoreGraphics 2023-03-26 14:23:02 +00:00
CuriousTommy
520c4c91a9
Merge pull request #27 from genkiinstruments/appkit-missing-symbols
Add missing symbols and stubs for AppKit
2023-03-26 06:17:20 -07:00
Daniel Gretarsson
6ee777f377 Add printf to stubs in NSAccessibility.m and NSPasteboard.m 2023-03-26 13:11:29 +00:00
Daniel Gretarsson
c1b75488c7 Add missing symbols and stubs for AppKit 2023-03-20 12:05:35 +00:00
Daniel Gretarsson
2691295544 Add some stubs and missing symbols for CoreGraphics 2023-03-20 10:59:27 +00:00
Thomas A
aaa486783e Add CGDisplayModeGetPixelWidth Stub 2023-03-17 19:51:54 -07:00
Juan Patricio
4f29ff5b7d
Fix button leak 2023-02-23 17:59:16 -03:00
Juan Patricio
aba55454af
Moved addButtonWithTitle/_addButtonWithTitle definition before its usage, fixed formatting and typo 2023-02-23 15:51:17 -03:00
Juan Patricio
4a75b8cbc7
NSInteger-ization of NSAlert.m
See darlinghq/darling#418
2023-02-23 13:47:21 -03:00
Juan Patricio
2b0caf2f51
Fixed return code for alets created with alertWithMessageText
Those types of alerts have a different set of NSModalResponse.

This fix alerts not working in The Blockheads Server and any other app also using that method.
2023-02-23 13:45:08 -03:00
CuriousTommy
1af135a557
Merge pull request #23 from juanmuscaria/master
Added missing method implementations for NSMenuView optimization
2022-11-20 21:31:59 -08:00
Thomas A
f2a7267dca Remove duplicate "usesSingleLineMode" stub 2022-11-20 10:50:03 -08:00