Commit Graph

1820 Commits

Author SHA1 Message Date
CuriousTommy
be9227b9ae
Merge pull request #29 from CKegel/TextEdit_patches
AppKit Improvements (Getting TextEdit to compile and Run)
2024-08-17 09:41:09 -07:00
Duncan Cunningham
9cf905288c Add stubs for NSScrubberTextItemView 2024-06-19 09:22:17 +02:00
Duncan Cunningham
ab3f1f7803 Add NSScrubberSelectionStyle 2024-06-19 09:22:17 +02:00
Duncan Cunningham
4bb6117f35 Add stub for NSCandidateListTouchBarItem 2024-06-19 09:22:17 +02:00
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
Duncan Cunningham
b74def59bd Use localized CFBundleName for NSSystemInfoPanel 2024-03-16 17:14:37 +01:00
ckegel
317e0778fc Align implementation of documentClassForType: with Apple's developer reference. 2024-02-09 16:24:40 -05:00
ckegel
bce2767698 Correct leak in internal NSTextView method. 2024-02-09 16:14:34 -05: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
ckegel
d6c5c1c8b3 Convert hexadecimal color values to CGFloat literals. 2024-02-02 16:19:25 -05:00
ckegel
a72e58188c Remove redundant declaration of translatesAutoResizingMaskIntoConstraints 2024-02-02 16:19:25 -05:00
ckegel
b3c2e2dea3 Implement NSParagraph TabStops properly
Implement NSTextTab handling based on the GNUStep implementation,
with formatting and other adjustments.
2024-02-02 16:19:25 -05:00
ckegel
a4bc3feb11 Add framework for size and magnification methods
Add stubs for content size, frame size, and magnification size,
and add basic implementations where feasible.
2024-02-02 16:19:25 -05:00
ckegel
7fcfc33365 Implement readFromURL: in NSMutableAttributedString 2024-02-02 16:19:25 -05:00
ckegel
2f6272f476 Align documentClassForType: implementation with Apple's developer documentation 2024-02-02 16:19:25 -05:00
ckegel
e086fe9f33 Add document format inference in NSAttributedString
Adds code in `initWithData` to infer document format for RTF, HTML, and plaintext documents.
Additionally refactors NSAttributedString to use the correct attribute types as described in Apple's documentation.
2024-02-02 16:19:25 -05:00
ckegel
5300f80f18 Fix handling of NSTextContainer and NSTextStorage in NSTextView.subproj
Fix issue where a layout manager's NSTextStorage could be `nil` at initialization
but later set by introducing the `_setTextStorage:` method to NSTextView.

Add stubs a for missing properties in NSTextView.

Refactor `firstTextView` to properly find and return the first text view,
or `nil` if there are no text views.

Use 64-bit ready types where applicable.

Relocate unrelated code from _setTextStorage
2024-02-02 16:19:25 -05:00
ckegel
fd68ee23c7 Implement NSUserInterfaceItemIdentifcation protocol 2024-02-02 16:19:25 -05:00
ckegel
81d2422c67 add NSDocumentController type discovery 2024-02-02 16:19:25 -05:00
ckegel
bb0c134428 Add missing methods and stubs for TextEdit 2024-02-02 16:19:25 -05:00
Duncan Cunningham
8271f7e5ec Add symbol for NSApplicationLaunchUserNotificationKey 2024-01-06 21:32:31 +01:00
ckegel
8283bdabbe Implement correct formatting for NSInteger values 2023-10-16 23:41:29 -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
Thomas A
b30c2be791 Change include from CoreServices to CarbonCore 2023-04-16 13:47:48 -07: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
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
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
Thomas A
e78da59d44 Fix NSCell "usesSingleLineMode" typo 2022-11-20 10:36:08 -08:00
Thomas A
e00b4468c4 Fix int-conversion error 2022-11-20 10:30:36 -08:00
Juan Patricio
afbfeabeb4
Added missing method implementations for NSMenuView optimization 2022-11-18 13:23:08 -03:00
Thomas A
19b47b890d Generate Headers for AppKit, Cocoa, CoreData, CoreGraphics, CoreText, Onyx2D, and QuartzCore 2022-09-04 10:58:40 -07:00