|
| 1 | +#include <CoreGraphics/CoreGraphics.h> |
| 2 | + |
| 3 | +extern CGError DisplayServicesRegisterForBrightnessChangeNotifications(uint32_t did, uint32_t passthrough, void* callback); |
| 4 | +extern CGError DisplayServicesRegisterForAmbientLightCompensationNotifications(uint32_t did, uint32_t passthrough, void* callback); |
| 5 | + |
| 6 | +extern CGError DisplayServicesUnregisterForBrightnessChangeNotifications(uint32_t did, uint32_t passthrough); |
| 7 | +extern CGError DisplayServicesUnregisterForAmbientLightCompensationNotifications(uint32_t did, uint32_t passthrough); |
| 8 | + |
| 9 | +extern CGError DisplayServicesGetBrightness(uint32_t did, float* brightness); |
| 10 | +extern CGError DisplayServicesCanChangeBrightness(uint32_t did); |
| 11 | +extern CGError DisplayServicesAmbientLightCompensationEnabled(uint32_t did, bool* out); |
| 12 | + |
| 13 | +extern CFArrayRef SLSCopyManagedDisplaySpaces(int cid); |
| 14 | +extern uint32_t SLSGetActiveSpace(int cid); |
| 15 | +extern CFStringRef SLSCopyManagedDisplayForSpace(int cid, uint64_t sid); |
| 16 | +extern CFArrayRef SLSHWCaptureSpace(int64_t cid, int64_t sid, int64_t flags); |
| 17 | + |
| 18 | +extern CGError SLSGetWindowOwner(int cid, uint32_t wid, int* out_cid); |
| 19 | +extern CGError SLSConnectionGetPID(int cid, pid_t *pid); |
| 20 | +extern CFArrayRef SLSCopyWindowsWithOptionsAndTags(int cid, uint32_t owner, CFArrayRef spaces, uint32_t options, uint64_t *set_tags, uint64_t *clear_tags); |
| 21 | +extern CFTypeRef SLSWindowQueryWindows(int cid, CFArrayRef windows, uint32_t options); |
| 22 | +extern CFTypeRef SLSWindowQueryResultCopyWindows(CFTypeRef window_query); |
| 23 | +extern int SLSWindowIteratorGetCount(CFTypeRef iterator); |
| 24 | +extern bool SLSWindowIteratorAdvance(CFTypeRef iterator); |
| 25 | +extern uint32_t SLSWindowIteratorGetParentID(CFTypeRef iterator); |
| 26 | +extern uint32_t SLSWindowIteratorGetWindowID(CFTypeRef iterator); |
| 27 | +extern uint64_t SLSWindowIteratorGetTags(CFTypeRef iterator); |
| 28 | +extern uint64_t SLSWindowIteratorGetAttributes(CFTypeRef iterator); |
| 29 | +extern CGError SLSRegisterNotifyProc(void* callback, uint32_t event, void* context); |
| 30 | +extern CGError SLSRequestNotificationsForWindows(int cid, uint32_t* wid_list, uint32_t list_count); |
| 31 | + |
| 32 | +extern CFUUIDRef CGDisplayCreateUUIDFromDisplayID(uint32_t did); |
| 33 | +extern CFArrayRef SLSCopyManagedDisplays(int cid); |
| 34 | +extern uint64_t SLSManagedDisplayGetCurrentSpace(int cid, CFStringRef uuid); |
| 35 | + |
| 36 | +extern CFStringRef SLSCopyBestManagedDisplayForRect(int cid, CGRect rect); |
| 37 | +extern CGError SLSGetCurrentCursorLocation(int cid, CGPoint *point); |
| 38 | +extern CFStringRef SLSCopyActiveMenuBarDisplayIdentifier(int cid); |
| 39 | +extern CGError SLSGetMenuBarAutohideEnabled(int cid, int *enabled); |
| 40 | +extern CGError SLSGetRevealedMenuBarBounds(CGRect *rect, int cid, uint64_t sid); |
| 41 | +extern CFStringRef SLSCopyBestManagedDisplayForPoint(int cid, CGPoint point); |
| 42 | +extern CGError SLSSetMenuBarVisibilityOverrideOnDisplay(int cid, int did, bool override); |
| 43 | +extern CGError SLSSetMenuBarAutohideEnabled(int cid, bool enabled); |
| 44 | +extern CGError SLSFlushWindowContentRegion(int cid, uint32_t wid, void* dirty); |
| 45 | +extern CFTypeRef SLSTransactionCreate(int cid); |
| 46 | +extern CGError SLSTransactionOrderWindow(CFTypeRef transaction, uint32_t wid, int mode, uint32_t relativeToWID); |
| 47 | +extern CGError SLSTransactionSetWindowLevel(CFTypeRef transaction, uint32_t wid, int level); |
| 48 | +extern CGError SLSTransactionSetWindowShape(CFTypeRef transaction, uint32_t wid, float x_offset, float y_offset, CFTypeRef shape); |
| 49 | +extern CGError SLSTransactionMoveWindowWithGroup(CFTypeRef transaction, uint32_t wid, CGPoint point); |
| 50 | +extern CGError SLSTransactionCommitUsingMethod(CFTypeRef transaction, uint32_t method); |
| 51 | +extern CGError SLSTransactionCommit(CFTypeRef transaction, uint32_t async); |
| 52 | + |
| 53 | +extern CFTypeRef CGRegionCreateEmptyRegion(void); |
| 54 | +extern CGError SLSDisableUpdate(int cid); |
| 55 | +extern CGError SLSReenableUpdate(int cid); |
| 56 | +extern CGError SLSNewWindowWithOpaqueShapeAndContext(int cid, int type, CFTypeRef region, CFTypeRef opaque_shape, int options, uint64_t *tags, float x, float y, int tag_size, uint32_t *wid, void *context); |
| 57 | +extern CGError SLSNewWindow(int cid, int type, float x, float y, CFTypeRef region, uint64_t *wid); |
| 58 | +extern CGError SLSReleaseWindow(int cid, uint32_t wid); |
| 59 | +extern CGError SLSSetWindowTags(int cid, uint32_t wid, uint64_t* tags, int tag_size); |
| 60 | +extern CGError SLSClearWindowTags(int cid, uint32_t wid, uint64_t* tags, int tag_size); |
| 61 | +extern CGError SLSSetWindowShape(int cid, uint32_t wid, float x_offset, float y_offset, CFTypeRef shape); |
| 62 | +extern CGError SLSSetWindowOpaqueShape(int cid, uint32_t wid, float x_offset, float y_offset, CFTypeRef region); |
| 63 | +extern CGError SLSSetWindowResolution(int cid, uint32_t wid, double res); |
| 64 | +extern CGError SLSSetWindowOpacity(int cid, uint32_t wid, bool isOpaque); |
| 65 | +extern CGError SLSSetWindowAlpha(int cid, uint32_t wid, float alpha); |
| 66 | +extern CGError SLSSetWindowBackgroundBlurRadius(int cid, uint32_t wid, uint32_t radius); |
| 67 | +extern CGError SLSOrderWindow(int cid, uint32_t wid, int mode, uint32_t relativeToWID); |
| 68 | +extern CGError SLSSetWindowLevel(int cid, uint32_t wid, int level); |
| 69 | +extern CGContextRef SLWindowContextCreate(int cid, uint32_t wid, CFDictionaryRef options); |
| 70 | +extern CGError CGSNewRegionWithRect(CGRect *rect, CFTypeRef *outRegion); |
| 71 | +extern CGError SLSAddActivationRegion(uint32_t cid, uint32_t wid, CFTypeRef region); |
| 72 | +extern CGError SLSAddTrackingRect(uint32_t cid, uint32_t wid, CGRect rect); |
| 73 | +extern CGError SLSClearActivationRegion(uint32_t cid, uint32_t wid); |
| 74 | +extern CGError SLSRemoveAllTrackingAreas(uint32_t cid, uint32_t wid); |
| 75 | +extern CGError SLSMoveWindow(int cid, uint32_t wid, CGPoint* point); |
| 76 | +extern CGError SLSWindowSetShadowProperties(uint32_t wid, CFDictionaryRef properties); |
| 77 | +extern CGError SLSAddWindowToWindowOrderingGroup(int cid, uint32_t parent_wid, uint32_t child_wid, int order); |
| 78 | +extern CGError SLSRemoveFromOrderingGroup(int cid, uint32_t wid); |
| 79 | +extern CGError SLSReassociateWindowsSpacesByGeometry(int cid, CFArrayRef wids); |
| 80 | +extern CGError SLSMoveWindowsToManagedSpace(int cid, CFArrayRef window_list, uint64_t sid); |
| 81 | +extern CGError SLSMoveWindowWithGroup(int cid, uint32_t wid, CGPoint* point); |
| 82 | + |
| 83 | +extern void SLSCaptureWindowsContentsToRectWithOptions(uint32_t cid, uint64_t* wid, bool meh, CGRect bounds, uint32_t flags, CGImageRef* image); |
| 84 | +extern int SLSGetScreenRectForWindow(uint32_t cid, uint32_t wid, CGRect* out); |
| 85 | + |
| 86 | +extern int SLSSpaceGetType(int cid, uint64_t sid); |
| 87 | + |
| 88 | +extern CGError SLSAddSurface(int cid, uint32_t wid, uint32_t* outSID); |
| 89 | +extern CGError SLSRemoveSurface(int cid, uint32_t wid, uint32_t sid); |
| 90 | +extern CGError SLSBindSurface(int cid, uint32_t wid, uint32_t sid, int param1, int param2, unsigned int context_id); |
| 91 | +extern CGError SLSSetSurfaceBounds(int cid, uint32_t wid, uint32_t sid, CGRect bounds); |
| 92 | +extern CGError SLSSetSurfaceOpacity(int cid, uint32_t wid, uint32_t sid, bool opaque); |
| 93 | +extern CGError SLSOrderSurface(int cid, uint32_t wid, uint32_t surface, int mode, uint32_t other_surface); |
| 94 | +extern CGError SLSSetSurfaceResolution(int cid, uint32_t wid, uint32_t sid, CGFloat scale); |
| 95 | +extern CGError SLSFlushSurface(int cid, uint32_t wid, uint32_t surface, int param); |
| 96 | +extern CGError SLSSetSurfaceColorSpace(int cid, uint32_t wid, uint32_t surface, CGColorSpaceRef color_space); |
| 97 | + |
| 98 | +extern int SLSSpaceCreate(int cid, int one, int zero); |
| 99 | +extern CGError SLSSpaceSetAbsoluteLevel(int cid, int sid, int level); |
| 100 | +extern CGError SLSShowSpaces(int cid, CFArrayRef space_list); |
| 101 | +extern CGError SLSHideSpaces(int cid, CFArrayRef space_list); |
| 102 | +extern CGError SLSSpaceAddWindowsAndRemoveFromSpaces(int cid, int sid, CFArrayRef array, int seven); |
| 103 | + |
| 104 | + |
0 commit comments