diff dstep/applicationservices/coregraphics/CGEvent.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
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/dstep/applicationservices/coregraphics/CGEvent.d	Mon Aug 03 14:00:21 2009 +0200
@@ -0,0 +1,54 @@
+/**
+ * Copyright: Copyright (c) 2009 Jacob Carlborg.
+ * Authors: Jacob Carlborg
+ * Version: Initial created: Aug 1, 2009 
+ * License: $(LINK2 http://www.boost.org/LICENSE_1_0.txt, Boost Software License 1.0)
+ */
+module dstep.applicationservices.coregraphics.CGEvent;
+
+import dstep.corefoundation.CoreFoundation;
+import dstep.applicationservices.coregraphics.CGBase;
+import dstep.applicationservices.coregraphics.CGDirectDisplay;
+import dstep.applicationservices.coregraphics.CGError;
+import dstep.applicationservices.coregraphics.CGEventSource;
+import dstep.applicationservices.coregraphics.CGEventTypes;
+import dstep.applicationservices.coregraphics.CGGeometry;
+import dstep.applicationservices.coregraphics.CGRemoteOperation;
+import dstep.coreservices.CoreServices;
+
+extern (C)
+{
+	uint CGEventGetTypeID ();
+	CGEventRef CGEventCreate (CGEventSourceRef source);
+	CGEventRef CGEventCreateFromData (CFAllocatorRef allocator, CFDataRef eventData);
+	CFDataRef CGEventCreateData (CFAllocatorRef allocator, CGEventRef event);
+	CGEventRef CGEventCreateMouseEvent (CGEventSourceRef source, uint mouseType, CGPoint mouseCursorPosition, uint mouseButton);
+	CGEventRef CGEventCreateKeyboardEvent (CGEventSourceRef source, ushort virtualKey, bool keyDown);
+	CGEventRef CGEventCreateScrollWheelEvent (CGEventSourceRef source, uint units, uint wheelCount, int wheel1, ...);
+	CGEventRef CGEventCreateCopy (CGEventRef event);
+	CGEventSourceRef CGEventCreateSourceFromEvent (CGEventRef event);
+	void CGEventSetSource (CGEventRef event, CGEventSourceRef source);
+	uint CGEventGetType (CGEventRef event);
+	void CGEventSetType (CGEventRef event, uint type);
+	ulong CGEventGetTimestamp (CGEventRef event);
+	void CGEventSetTimestamp (CGEventRef event, ulong timestamp);
+	CGPoint CGEventGetLocation (CGEventRef event);
+	CGPoint CGEventGetUnflippedLocation (CGEventRef event);
+	void CGEventSetLocation (CGEventRef event, CGPoint location);
+	ulong CGEventGetFlags (CGEventRef event);
+	void CGEventSetFlags (CGEventRef event, ulong flags);
+	void CGEventKeyboardGetUnicodeString (CGEventRef event, uint maxStringLength, UniCharCount* actualStringLength, wchar* unicodeString);
+	void CGEventKeyboardSetUnicodeString (CGEventRef event, uint stringLength, wchar* unicodeString);
+	long CGEventGetIntegerValueField (CGEventRef event, uint field);
+	double CGEventGetDoubleValueField (CGEventRef event, uint field);
+	void CGEventSetIntegerValueField (CGEventRef event, uint field, long value);
+	void CGEventSetDoubleValueField (CGEventRef event, uint field, double value);
+	CFMachPortRef CGEventTapCreate (uint tap, uint place, uint options, ulong eventsOfInterest, CGEventTapCallBack callback, void* refcon);
+	CFMachPortRef CGEventTapCreateForPSN (void* processSerialNumber, uint place, uint options, ulong eventsOfInterest, CGEventTapCallBack callback, void* refcon);
+	void CGEventTapEnable (CFMachPortRef myTap, bool enable);
+	bool CGEventTapIsEnabled (CFMachPortRef myTap);
+	void CGEventTapPostEvent (CGEventTapProxy proxy, CGEventRef event);
+	void CGEventPost (uint tap, CGEventRef event);
+	void CGEventPostToPSN (void* processSerialNumber, CGEventRef event);
+	int CGGetEventTapList (uint maxNumberOfTaps, CGEventTapInformation* tapList, CGTableCount* eventTapCount);
+}
\ No newline at end of file