Added GetMouseEventLocation Carbon wrapper function.
This commit is contained in:
parent
4f4dd33c13
commit
dc6f0e6461
1 changed files with 20 additions and 0 deletions
|
@ -617,6 +617,25 @@ namespace OpenTK.Platform.MacOS.Carbon
|
|||
return result;
|
||||
}
|
||||
|
||||
}
|
||||
static internal OSStatus GetEventMouseLocation(IntPtr inEvent, out HIPoint pt)
|
||||
{
|
||||
HIPoint point;
|
||||
|
||||
unsafe
|
||||
{
|
||||
HIPoint* parm = &point;
|
||||
|
||||
OSStatus result = API.GetEventParameter(inEvent,
|
||||
EventParamName.MouseLocation, EventParamType.typeHIPoint, IntPtr.Zero,
|
||||
(uint)System.Runtime.InteropServices.Marshal.SizeOf(typeof(HIPoint)), IntPtr.Zero,
|
||||
(IntPtr)parm);
|
||||
|
||||
pt = point;
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
}
|
||||
static internal MacOSKeyModifiers GetEventKeyModifiers(IntPtr inEvent)
|
||||
{
|
||||
|
@ -676,6 +695,7 @@ namespace OpenTK.Platform.MacOS.Carbon
|
|||
internal static void InstallApplicationEventHandler(IntPtr uppHandlerProc,
|
||||
EventTypeSpec[] eventTypes, IntPtr userData, IntPtr handlerRef)
|
||||
{
|
||||
|
||||
OSStatus error = _InstallEventHandler(GetApplicationEventTarget(), uppHandlerProc,
|
||||
eventTypes.Length, eventTypes,
|
||||
userData, handlerRef);
|
||||
|
|
Loading…
Reference in a new issue