Lay out what needs to be implemented for Mac

This commit is contained in:
Menotdan
2023-05-18 22:10:35 -04:00
parent cdee91f258
commit 8c20ba83de

View File

@@ -2,6 +2,39 @@
#include <Cocoa/Cocoa.h>
#include <AppKit/AppKit.h>
Color32 ScreenUtilities::GetPixelAt(int32 x, int32 y)
{
// Called from C# for live updates to the color.
return { 0, 0, 0, 255 };
}
Int2 ScreenUtilities::GetScreenCursorPosition()
{
// Called from C# for live updates to the color.
return { 0, 0 };
}
class ScreenUtilitiesMac
{
public:
static void BlockAndReadMouse();
};
void ScreenUtilitiesMac::BlockAndReadMouse()
{
// Maybe you don't need this if you go with NSColorSampler
}
Delegate<Color32> ScreenUtilities::PickColorDone;
void ScreenUtilities::PickColor()
{
// This is what C# calls to start the color picking sequence
// This should stop mouse clicks from working for one click, and that click is on the selected color
// There is a class called NSColorSample that might implement that for you, but maybe not.
// It also might just work to copy the Linux Impl since Mac uses X as well, right?
}
#endif