view 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
line wrap: on
line source

/**
 * 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.CGRemoteOperation;

import dstep.corefoundation.CFMachPort;

import dstep.applicationservices.coregraphics.CGBase;
import dstep.applicationservices.coregraphics.CGDirectDisplay;
import dstep.applicationservices.coregraphics.CGError;
import dstep.applicationservices.coregraphics.CGGeometry;

struct _CGScreenUpdateMoveDelta;

alias int CGEventErr;
alias uint CGRectCount;
alias uint CGScreenUpdateOperation;
alias _CGScreenUpdateMoveDelta CGScreenUpdateMoveDelta;
alias uint CGButtonCount;
alias uint CGWheelCount;
alias ushort CGCharCode;
alias ushort CGKeyCode;
alias uint CGEventFilterMask;
alias uint CGEventSuppressionState;

extern (C)
{
	alias void function (CGScreenUpdateMoveDelta, uint, CGRect*, void*) CGScreenUpdateMoveCallback;
	alias void function (uint, CGRect*, void*) CGScreenRefreshCallback;
}

enum _CGScreenUpdateOperation

{
	kCGScreenUpdateOperationRefresh = 0,
	kCGScreenUpdateOperationMove = (1 << 0),
	kCGScreenUpdateOperationReducedDirtyRectangleCount = (1 << 31)
}

enum
{
	kCGEventFilterMaskPermitLocalMouseEvents = 0x00000001,
	kCGEventFilterMaskPermitLocalKeyboardEvents = 0x00000002,
	kCGEventFilterMaskPermitSystemDefinedEvents = 0x00000004
}

enum
{
	kCGEventSuppressionStateSuppressionInterval = 0,
	kCGEventSuppressionStateRemoteMouseDrag,
	kCGNumberOfEventSuppressionStates
}

extern (C)
{
	int CGRegisterScreenRefreshCallback (CGScreenRefreshCallback function_, void* userParameter);
	void CGUnregisterScreenRefreshCallback (CGScreenRefreshCallback function_, void* userParameter);
	int CGWaitForScreenRefreshRects (CGRect** pRectArray, CGRectCount* pCount);
	int CGScreenRegisterMoveCallback (CGScreenUpdateMoveCallback function_, void* userParameter);
	void CGScreenUnregisterMoveCallback (CGScreenUpdateMoveCallback function_, void* userParameter);
	int CGWaitForScreenUpdateRects (uint requestedOperations, CGScreenUpdateOperation* currentOperation, CGRect** pRectArray, size_t* pCount, CGScreenUpdateMoveDelta* pDelta);
	void CGReleaseScreenRefreshRects (CGRect* rectArray);
	int CGCursorIsVisible ();
	int CGCursorIsDrawnInFramebuffer ();
	int CGPostMouseEvent (CGPoint mouseCursorPosition, int updateMouseCursorPosition, uint buttonCount, int mouseButtonDown, ...);
	int CGPostScrollWheelEvent (uint wheelCount, int wheel1, ...);
	int CGPostKeyboardEvent (ushort keyChar, ushort virtualKey, int keyDown);
	int CGWarpMouseCursorPosition (CGPoint newCursorPosition);
	int CGInhibitLocalEvents (int doInhibit);
	int CGSetLocalEventsSuppressionInterval (double seconds);
	int CGEnableEventStateCombining (int doCombineState);
	int CGSetLocalEventsFilterDuringSuppressionState (uint filter, uint state);
	int CGAssociateMouseAndMouseCursorPosition (int connected);
	CFMachPortRef CGWindowServerCFMachPort ();
}