Commit Graph

2884 Commits

Author SHA1 Message Date
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
Sergey Bugaev
e2a5a87c2a Return a more appropriate image rect if the image is missing 2018-06-15 17:40:28 +03:00
Sergey Bugaev
047aabf974 Minor fix in -[NSEvent description] 2018-06-15 17:39:56 +03:00
Sergey Bugaev
2629fce1d9 Return an empty dict instaed of nil from -[O2ImageSource copyPropertiesAtIndex:options:]
This method is not overriden by O2ImageSource_PNG, and its result is dereferenced in NSBitmapImageRep.
2018-06-12 17:05:52 +03:00
Sergey Bugaev
494652db7c Install some of the AppKit resources 2018-06-12 17:01:43 +03:00
Sergey Bugaev
5b4eb11338 Fix window numbers: you can't just cast between id and int 2018-06-10 19:36:05 +03:00
Sergey Bugaev
50a571eb4b Port Cocotron to the new EGL-based OpenGL.framework
See darlinghq/darling#365

TODO:
* Get rid of the few remaining glX calls
* Port CALayerContext
2018-05-27 08:26:31 +03:00
Sergey Bugaev
452ec7a16f Fix assignment 2018-05-27 08:16:54 +03:00
Sergey Bugaev
7967188f46 Stop building NSOpenGLDrawable
It's unused
2018-05-27 08:14:57 +03:00
Sergey Bugaev
826bdad96a Implement the missing X11Window.styleMask 2018-05-27 08:12:26 +03:00
Sergey Bugaev
3faecd6ef2 Add {CG,X11}SubWindow
A simple interface designed to be used for overlaying native windows on top of
Cocoa windows without creating a full-features instance of NSWindow or CGWindow.
This overlays have to be rendered to using some other graphics API, such as OpenGL;
this is also how we will implement NOpenGLContext.
2018-05-27 08:08:46 +03:00
Sergey Bugaev
6b7b1206f2 Reimplement NSClassSwapper 2018-05-27 08:03:25 +03:00
Sergey Bugaev
b0d36555cf Fix [[NSMutableArray new] init...] 2018-05-27 07:45:13 +03:00
Sergey Bugaev
4a6023339f Comment out unimplemented KVO method 2018-05-27 07:44:35 +03:00
Sergey Bugaev
4e817bc43f Remove cairo from the build
As we no longer use it. We will eventually bring cairo back in some form as a part of
the GTK+ backend.
2018-05-16 00:30:00 +03:00
Sergey Bugaev
ff63a36aa7 Use a regular O2Surface over O2Surface_cairo in CGLPixelSurface 2018-05-16 00:29:16 +03:00
Sergey Bugaev
d33f35a15b Get rid of the window/backing context types discrepancy
From here on, all the contexts are "backing"; that is, they reside somewhere in the memory
(RAM, GPU memory, files, etc), and the windowing backend is responsible for displaying the
contents on the screen somehow. The way they actually do that is by sending the pixel data
over to the GPU, composing the final image using OpenGL rendering and displaying it using
OpenGL.framework.
2018-05-16 00:21:27 +03:00
Sergey Bugaev
9ad4487bb7 Unimplement support for NSBackingStoreType-s other than .buffered
See darlinghq/darling#369
2018-05-16 00:16:33 +03:00
Sergey Bugaev
be69fd6035 Fix comparison 2018-05-16 00:09:38 +03:00
Sergey Bugaev
ea3bfb0c84 Fix forgetting to save the new frame on move/resize 2018-05-15 19:28:33 +03:00
Sergey Bugaev
0a95aee94c Fix moving/resizing windows
There's no need to additionally convert the coordinates as [platformWindow frame] already
returns them the way the delegate expects (the Cocoa way).
2018-05-15 19:25:48 +03:00
Sergey Bugaev
0c38286816 Implement [NSIBUserDefinedRuntimeAttributesConnector encodeWithCoder:] 2018-05-15 19:24:55 +03:00