#pragma once
#include <pal/spi/cg/CoreGraphicsSPI.h>
#if USE(APPLE_INTERNAL_SDK)
#include <ApplicationServices/ApplicationServicesPriv.h>
#else
typedef CF_ENUM(SInt32, CoreCursorType) {
kCoreCursorFirstCursor = 0,
kCoreCursorArrow = kCoreCursorFirstCursor,
kCoreCursorIBeam,
kCoreCursorMakeAlias,
kCoreCursorNotAllowed,
kCoreCursorBusyButClickable,
kCoreCursorCopy,
kCoreCursorScreenShotSelection = 7,
kCoreCursorScreenShotSelectionToClip,
kCoreCursorScreenShotWindow,
kCoreCursorScreenShotWindowToClip,
kCoreCursorClosedHand,
kCoreCursorOpenHand,
kCoreCursorPointingHand,
kCoreCursorCountingUpHand,
kCoreCursorCountingDownHand,
kCoreCursorCountingUpAndDownHand,
kCoreCursorResizeLeft,
kCoreCursorResizeRight,
kCoreCursorResizeLeftRight,
kCoreCursorCross,
kCoreCursorResizeUp,
kCoreCursorResizeDown,
kCoreCursorResizeUpDown,
kCoreCursorContextualMenu,
kCoreCursorPoof,
kCoreCursorIBeamVertical,
kCoreCursorWindowResizeEast,
kCoreCursorWindowResizeEastWest,
kCoreCursorWindowResizeNorthEast,
kCoreCursorWindowResizeNorthEastSouthWest,
kCoreCursorWindowResizeNorth,
kCoreCursorWindowResizeNorthSouth,
kCoreCursorWindowResizeNorthWest,
kCoreCursorWindowResizeNorthWestSouthEast,
kCoreCursorWindowResizeSouthEast,
kCoreCursorWindowResizeSouth,
kCoreCursorWindowResizeSouthWest,
kCoreCursorWindowResizeWest,
kCoreCursorWindowMove,
kCoreCursorHelp,
kCoreCursorCell,
kCoreCursorZoomIn,
kCoreCursorZoomOut,
kCoreCursorLastCursor = kCoreCursorZoomOut
};
enum {
kCoreDragImageSpecVersionOne = 1,
};
struct CoreDragImageSpec {
UInt32 version;
SInt32 pixelsWide;
SInt32 pixelsHigh;
SInt32 bitsPerSample;
SInt32 samplesPerPixel;
SInt32 bitsPerPixel;
SInt32 bytesPerRow;
Boolean isPlanar;
Boolean hasAlpha;
const UInt8* data[5];
};
enum {
kMSHDoNotCreateSendRightOption = 0x4,
};
#endif
typedef UInt32 MSHCreateOptions;
typedef const struct __AXTextMarker* AXTextMarkerRef;
typedef const struct __AXTextMarkerRange* AXTextMarkerRangeRef;
typedef struct CoreDragImageSpec CoreDragImageSpec;
typedef struct OpaqueCoreDrag* CoreDragRef;
WTF_EXTERN_C_BEGIN
AXTextMarkerRangeRef AXTextMarkerRangeCreate(CFAllocatorRef, AXTextMarkerRef startMarker, AXTextMarkerRef endMarker);
AXTextMarkerRef AXTextMarkerCreate(CFAllocatorRef, const UInt8* bytes, CFIndex length);
AXTextMarkerRef AXTextMarkerRangeCopyStartMarker(AXTextMarkerRangeRef);
AXTextMarkerRef AXTextMarkerRangeCopyEndMarker(AXTextMarkerRangeRef);
CFIndex AXTextMarkerGetLength(AXTextMarkerRef);
CFRunLoopSourceRef MSHCreateMIGServerSource(CFAllocatorRef, CFIndex order, mig_subsystem_t sub_system, MSHCreateOptions, mach_port_t, void* user_data);
CFTypeID AXTextMarkerGetTypeID();
CFTypeID AXTextMarkerRangeGetTypeID();
CoreDragRef CoreDragGetCurrentDrag();
OSStatus CoreDragSetImage(CoreDragRef, CGPoint imageOffset, CoreDragImageSpec*, CGSRegionObj imageShape, float overallAlpha);
const UInt8* AXTextMarkerGetBytePtr(AXTextMarkerRef);
bool _AXUIElementRequestServicedBySecondaryAXThread(void);
OSStatus SetApplicationIsDaemon(Boolean);
WTF_EXTERN_C_END