Commit Graph

2905 Commits

Author SHA1 Message Date
Sergey Bugaev
098332d8ee Rewrite FreeType bitmap rendering; now with horizontal clipping support
And much nicer code, too.
2018-09-02 23:24:30 +03:00
Sergey Bugaev
8b1f575427 Disable threaded animation of NSProgressIndicator
The way it's implemented it doesn't work and it's unclear how it is supposed to.
2018-09-02 23:23:12 +03:00
Sergey Bugaev
b4de5dabd8 Style up pushed buttons
See commit 5352e472c9
2018-09-02 23:21:59 +03:00
Sergey Bugaev
7215911cb6 Support CFBundleTypeExtensions=* 2018-09-02 23:21:39 +03:00
Sergey Bugaev
6caf1a0d99 Include the objc runtime header where needed 2018-09-02 23:20:29 +03:00
Sergey Bugaev
1b93004304 Only invoke updateCell: if the controlView responds to it
Otherwise, simply mark it as needing display.
Also, make sure to do all of this when setting an attributed string value.
2018-09-02 23:18:02 +03:00
Sergey Bugaev
a66dd5efba NSInteger-ization & CGFloat/O2Float-ization
See https://github.com/darlinghq/darling/issues/418
2018-09-02 23:14:39 +03:00
Sergey Bugaev
96f2f31de0 Finish rewriting radial gradients
This fixes a few prominent issues of the previous implementation, including
distortions when the circles touch each other and ignoring the second solution of
the equation (resulting in one side of the "tube" missing). This also implements
clipping the negative part of the gradient cone.
2018-09-02 14:10:38 +03:00
Lubos Dolezel
9679b03cbb Export some CGGeometry functions as symbols 2018-08-28 21:25:40 +02:00
Sergey Bugaev
6b789836a8 Fix X11Display ignoring buffered events
-[X11Display processPendingEvnets], which dequeues events from the X11 event queue,
converts them to NSEvents and finally enqueues into the NSDisplay event queue, was
only invoked as a result of the X11 socket becoming readable during an iteration of
NSRunLoop. However, events can arrive and be queued by libX11 as a result of some
other interactions with X11, such as querying the mouse position, in which case the
socket won't be readable, but libX11 will still contain queued events.

Fix this by invoking -[X11Display processPendingEvnets] an additional time before
delegating to super's implementation which spins the loop; this way the NSDisplay
implementation can observe pending events in the event queue and deliver them
immediately.
2018-08-18 13:13:07 +03:00
Lubos Dolezel
9585490b67 Raise if a CGL context cannot be created 2018-08-14 21:40:04 +02:00
Lubos Dolezel
04280a8d90 Add stubs and other things for The Unarchiver 2018-08-14 17:54:53 +02:00
Lubos Dolezel
abcd7e4f5e Use proper retain/release order in NSMenuTemplate 2018-08-14 17:06:35 +02:00
Lubos Dolezel
8f295595e0 Legacy nib decoding initial work 2018-08-14 17:00:24 +02:00
Lubos Dolezel
95d4f03ccc Add NSErrors definitions 2018-08-14 14:44:48 +02:00
Sergey Bugaev
edfc8bf0f7 Implement NSRect & NSSize dictionary representation calls 2018-08-14 11:03:40 +03:00
Andrew Hyatt
d454865baf
Move NSFileWrapper to Foundation 2018-08-13 21:08:07 -04:00
Sergey Bugaev
99d231c295 Stop calling __NSInitializeProcess explicitly
We're going to make it a constructor instead; this way it will get called
even if the app doesn't use NSApplicationMain().
2018-08-11 08:20:36 +03:00
Sergey Bugaev
3edd291389 Fix/imporove gradient rendering
It's still somewhat broken.
2018-08-11 08:20:36 +03:00
Sergey Bugaev
3172fbf582 Remove [O2ImageSource_ICNS copyPropertiesAtIndex:options:] imp
This makes it use the default implementation, which returns an empty dictionary instead of nil.
2018-08-11 08:20:36 +03:00
Sergey Bugaev
3102591f57 Implement [NSBundle(NSNibLoading) loadNibNamed:owner:topLevelObjects:] 2018-08-11 08:20:36 +03:00
Sergey Bugaev
b53e44baa6 Make NSClassSwapper work with classes that don't implement initWithCoder: 2018-08-11 08:20:36 +03:00
Sergey Bugaev
7fb9afaafb Stub [NSColorPickerColorList setColor:] 2018-08-11 08:20:36 +03:00
Sergey Bugaev
4372d3fe0d Enable NSColorPickerColorList
It's disabled for years now with a comment saying:
"// Disabled to see if it fixes a nib instantiation issue"

We haven't seen any nib crashes related to this in Darling, so enable it.
2018-08-11 08:20:36 +03:00
Sergey Bugaev
f2d15eda94 Implement support for app-specific fonts
Fixes darlinghq/darling#408
2018-08-11 08:20:36 +03:00
Sergey Bugaev
7891d109c3 Implement vertical clipping of text 2018-08-11 08:20:36 +03:00
Sergey Bugaev
acfd82532a Fix calculating event location in pop up menus 2018-08-11 08:20:36 +03:00
Sergey Bugaev
953444b5f7 Implement [X11Display mouseLocation] 2018-08-11 08:20:36 +03:00
Sergey Bugaev
21ec7d7897 Warn when failing to connect to an X11 display
This serves to remind me to export a working DISPLAY.
2018-08-11 08:20:36 +03:00
Sergey Bugaev
384f244502 Stub out [NSWorkspace runningApplications] 2018-08-11 08:20:36 +03:00
Sergey Bugaev
d0744752c1 Implement [NSColor colorWithWhite:alpha:] 2018-08-11 08:20:36 +03:00
Sergey Bugaev
52ce417ce5 Add several missing API stubs 2018-08-11 08:20:36 +03:00
Sergey Bugaev
39e172a560 Implement support for cell-less controls 2018-08-11 08:20:36 +03:00
Sergey Bugaev
856fab5912 Further CGFloat/O2Float-ization 2018-08-11 08:20:36 +03:00
Sergey Bugaev
c1c08a83bb Further NSInteger-ization 2018-08-11 08:20:36 +03:00
Sergey Bugaev
c804f5df2f Install more resources 2018-08-11 08:20:36 +03:00
Lubos Dolezel
5f2626ce53 Yet another build fix, sorry 2018-07-27 09:51:19 +02:00
Lubos Dolezel
663531bdc4 Build fix 2018-07-27 08:49:09 +02:00
Andrew Hyatt
15f1b95575
Document source of type definition 2018-07-26 22:32:36 -04:00
Lubos Dolezel
cc581ba7b7 Implement CGPointMakeWithDictionaryRepresentation and CGPointCreateDictionaryRepresentation 2018-07-27 01:37:39 +02:00
Andrew Hyatt
76b2fdef29
Include CF 2018-07-26 00:57:06 -04:00
Andrew Hyatt
28bbebe9bf
Define CGFloat in the proper file 2018-07-26 00:51:25 -04:00
Andrew Hyatt
2532e4ec58
Header issue 2018-07-25 22:16:34 -04:00
Andrew Hyatt
fa9fcb9242
Revert "Remove duplicate CoreGraphics types"
This reverts commit 5c92f8249a.
2018-07-25 20:23:35 -04:00
Andrew Hyatt
5c92f8249a
Remove duplicate CoreGraphics types
darlinghq/darling#406
2018-07-25 00:20:05 -04:00
Andrew Hyatt
6d18233657
Define CoreGraphics types 2018-07-22 15:24:24 -04:00
Sergey Bugaev
228ec38015 Fix -[NSColorWell mouseDown:] logic
Basically, this changes/fixes the case of clicking on the border of the cell,
while also making the logic more clear (no inverting wasActive twice).
2018-06-15 17:49:39 +03:00
Sergey Bugaev
a4dcd62451 Consistently use CGFloat/O2Float or O2Float32 instead of plain float
Becuase CGFloat/O2Float are actually 64 bits wide on x64, whereas float is just 4.
This fixes various bugs with color conversion.
2018-06-15 17:47:11 +03:00
Sergey Bugaev
f2701b543a Actually make O2Float a 64 bit double on x64
Just like CGFloat it's named after and used in place of.
2018-06-15 17:43:54 +03:00
Sergey Bugaev
fff7ac5fdc Remove a stray debug NSLog 2018-06-15 17:41:46 +03:00