comparison dstep/applicationservices/coregraphics/CGRemoteOperation.d @ 12:9f0b49a2f64e

Added the ApplicationServices frameworks: ATS, ColorSync and CoreGraphics
author Jacob Carlborg <doob@me.com>
date Mon, 03 Aug 2009 14:00:21 +0200
parents
children
comparison
equal deleted inserted replaced
11:07194b026fa4 12:9f0b49a2f64e
1 /**
2 * Copyright: Copyright (c) 2009 Jacob Carlborg.
3 * Authors: Jacob Carlborg
4 * Version: Initial created: Aug 1, 2009
5 * License: $(LINK2 http://www.boost.org/LICENSE_1_0.txt, Boost Software License 1.0)
6 */
7 module dstep.applicationservices.coregraphics.CGRemoteOperation;
8
9 import dstep.corefoundation.CFMachPort;
10
11 import dstep.applicationservices.coregraphics.CGBase;
12 import dstep.applicationservices.coregraphics.CGDirectDisplay;
13 import dstep.applicationservices.coregraphics.CGError;
14 import dstep.applicationservices.coregraphics.CGGeometry;
15
16 struct _CGScreenUpdateMoveDelta;
17
18 alias int CGEventErr;
19 alias uint CGRectCount;
20 alias uint CGScreenUpdateOperation;
21 alias _CGScreenUpdateMoveDelta CGScreenUpdateMoveDelta;
22 alias uint CGButtonCount;
23 alias uint CGWheelCount;
24 alias ushort CGCharCode;
25 alias ushort CGKeyCode;
26 alias uint CGEventFilterMask;
27 alias uint CGEventSuppressionState;
28
29 extern (C)
30 {
31 alias void function (CGScreenUpdateMoveDelta, uint, CGRect*, void*) CGScreenUpdateMoveCallback;
32 alias void function (uint, CGRect*, void*) CGScreenRefreshCallback;
33 }
34
35 enum _CGScreenUpdateOperation
36
37 {
38 kCGScreenUpdateOperationRefresh = 0,
39 kCGScreenUpdateOperationMove = (1 << 0),
40 kCGScreenUpdateOperationReducedDirtyRectangleCount = (1 << 31)
41 }
42
43 enum
44 {
45 kCGEventFilterMaskPermitLocalMouseEvents = 0x00000001,
46 kCGEventFilterMaskPermitLocalKeyboardEvents = 0x00000002,
47 kCGEventFilterMaskPermitSystemDefinedEvents = 0x00000004
48 }
49
50 enum
51 {
52 kCGEventSuppressionStateSuppressionInterval = 0,
53 kCGEventSuppressionStateRemoteMouseDrag,
54 kCGNumberOfEventSuppressionStates
55 }
56
57 extern (C)
58 {
59 int CGRegisterScreenRefreshCallback (CGScreenRefreshCallback function_, void* userParameter);
60 void CGUnregisterScreenRefreshCallback (CGScreenRefreshCallback function_, void* userParameter);
61 int CGWaitForScreenRefreshRects (CGRect** pRectArray, CGRectCount* pCount);
62 int CGScreenRegisterMoveCallback (CGScreenUpdateMoveCallback function_, void* userParameter);
63 void CGScreenUnregisterMoveCallback (CGScreenUpdateMoveCallback function_, void* userParameter);
64 int CGWaitForScreenUpdateRects (uint requestedOperations, CGScreenUpdateOperation* currentOperation, CGRect** pRectArray, size_t* pCount, CGScreenUpdateMoveDelta* pDelta);
65 void CGReleaseScreenRefreshRects (CGRect* rectArray);
66 int CGCursorIsVisible ();
67 int CGCursorIsDrawnInFramebuffer ();
68 int CGPostMouseEvent (CGPoint mouseCursorPosition, int updateMouseCursorPosition, uint buttonCount, int mouseButtonDown, ...);
69 int CGPostScrollWheelEvent (uint wheelCount, int wheel1, ...);
70 int CGPostKeyboardEvent (ushort keyChar, ushort virtualKey, int keyDown);
71 int CGWarpMouseCursorPosition (CGPoint newCursorPosition);
72 int CGInhibitLocalEvents (int doInhibit);
73 int CGSetLocalEventsSuppressionInterval (double seconds);
74 int CGEnableEventStateCombining (int doCombineState);
75 int CGSetLocalEventsFilterDuringSuppressionState (uint filter, uint state);
76 int CGAssociateMouseAndMouseCursorPosition (int connected);
77 CFMachPortRef CGWindowServerCFMachPort ();
78 }