Restore usability with macOS SDK < 10.12
This commit is contained in:
parent
6406437830
commit
4be596a306
@ -1,7 +1,7 @@
|
|||||||
//
|
//
|
||||||
// Definition of macOS Cocoa Pen/Tablet event driver.
|
// Definition of macOS Cocoa Pen/Tablet event driver.
|
||||||
//
|
//
|
||||||
// Copyright 2025 by Bill Spitzak and others.
|
// Copyright 2025-2026 by Bill Spitzak and others.
|
||||||
//
|
//
|
||||||
// This library is free software. Distribution and use rights are outlined in
|
// This library is free software. Distribution and use rights are outlined in
|
||||||
// the file "COPYING" which should have been included with this file. If this
|
// the file "COPYING" which should have been included with this file. If this
|
||||||
@ -16,6 +16,7 @@
|
|||||||
|
|
||||||
#include "src/drivers/Base/Fl_Base_Pen_Events.H"
|
#include "src/drivers/Base/Fl_Base_Pen_Events.H"
|
||||||
|
|
||||||
|
#include <FL/platform.H>
|
||||||
#include <FL/Fl.H>
|
#include <FL/Fl.H>
|
||||||
#include <FL/Fl_Window.H>
|
#include <FL/Fl_Window.H>
|
||||||
#include "../../Fl_Screen_Driver.H"
|
#include "../../Fl_Screen_Driver.H"
|
||||||
@ -25,6 +26,31 @@
|
|||||||
|
|
||||||
extern Fl_Window *fl_xmousewin;
|
extern Fl_Window *fl_xmousewin;
|
||||||
|
|
||||||
|
#if MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_12
|
||||||
|
|
||||||
|
typedef short NSEventSubtype;
|
||||||
|
#define NSPointingDeviceTypePen NSPenPointingDevice
|
||||||
|
#define NSEventTypeMouseEntered NSMouseEntered
|
||||||
|
#define NSEventTypeMouseExited NSMouseExited
|
||||||
|
#define NSEventTypeTabletProximity NSTabletProximity
|
||||||
|
#define NSEventTypeTabletPoint NSTabletPoint
|
||||||
|
#define NSEventSubtypeTabletProximity NSTabletProximityEventSubtype
|
||||||
|
#define NSEventSubtypeTabletPoint NSTabletPointEventSubtype
|
||||||
|
#define NSEventSubtypeMouseEvent NSMouseEventSubtype
|
||||||
|
#define NSEventTypeLeftMouseDown NSLeftMouseDown
|
||||||
|
#define NSEventTypeLeftMouseUp NSLeftMouseUp
|
||||||
|
#define NSEventTypeLeftMouseDragged NSLeftMouseDragged
|
||||||
|
#define NSEventTypeMouseMoved NSMouseMoved
|
||||||
|
#define NSEventTypeRightMouseDown NSRightMouseDown
|
||||||
|
#define NSEventTypeRightMouseUp NSRightMouseUp
|
||||||
|
#define NSEventTypeRightMouseDragged NSRightMouseDragged
|
||||||
|
#define NSEventTypeOtherMouseUp NSOtherMouseUp
|
||||||
|
#define NSEventTypeOtherMouseDown NSOtherMouseDown
|
||||||
|
#define NSEventTypeOtherMouseDragged NSOtherMouseDragged
|
||||||
|
#define NSPointingDeviceTypeEraser NSEraserPointingDevice
|
||||||
|
|
||||||
|
#endif // MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_12
|
||||||
|
|
||||||
static NSPointingDeviceType device_type_ { NSPointingDeviceTypePen };
|
static NSPointingDeviceType device_type_ { NSPointingDeviceTypePen };
|
||||||
|
|
||||||
// The trait list keeps track of traits for every pen ID that appears while
|
// The trait list keeps track of traits for every pen ID that appears while
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user