@@ -54,27 +54,21 @@ typedef void* id;
5454#define _GLFW_PLATFORM_CURSOR_STATE _GLFWcursorNS ns
5555
5656
57- // ========================================================================
58- // GLFW platform specific types
59- // ========================================================================
60-
61-
62- // ------------------------------------------------------------------------
63- // Platform-specific window structure
64- // ------------------------------------------------------------------------
57+ // Cocoa-specific per-window data
58+ //
6559typedef struct _GLFWwindowNS
6660{
6761 id object;
6862 id delegate;
6963 id view;
7064 unsigned int modifierFlags;
7165 int cursorInside;
66+
7267} _GLFWwindowNS;
7368
7469
75- // ------------------------------------------------------------------------
76- // Platform-specific library global data for Cocoa
77- // ------------------------------------------------------------------------
70+ // Cocoa-specific global data
71+ //
7872typedef struct _GLFWlibraryNS
7973{
8074 CGEventSourceRef eventSource;
@@ -87,9 +81,8 @@ typedef struct _GLFWlibraryNS
8781} _GLFWlibraryNS;
8882
8983
90- // ------------------------------------------------------------------------
91- // Platform-specific monitor structure
92- // ------------------------------------------------------------------------
84+ // Cocoa-specific per-monitor data
85+ //
9386typedef struct _GLFWmonitorNS
9487{
9588 CGDirectDisplayID displayID;
@@ -99,33 +92,27 @@ typedef struct _GLFWmonitorNS
9992} _GLFWmonitorNS;
10093
10194
102- // ------------------------------------------------------------------------
103- // Platform-specific cursor structure
104- // ------------------------------------------------------------------------
95+ // Cocoa-specific per-cursor data
96+ //
10597typedef struct _GLFWcursorNS
10698{
107- id object;
99+ id object;
100+
108101} _GLFWcursorNS;
109102
110103
111- // ------------------------------------------------------------------------
112- // Platform-specific time structure
113- // ------------------------------------------------------------------------
104+ // Cocoa-specific global timer data
105+ //
114106typedef struct _GLFWtimeNS
115107{
116- double base;
117- double resolution;
118- } _GLFWtimeNS;
108+ double base;
109+ double resolution;
119110
111+ } _GLFWtimeNS;
120112
121- // ========================================================================
122- // Prototypes for platform specific internal functions
123- // ========================================================================
124113
125- // Time
126114void _glfwInitTimer (void );
127115
128- // Fullscreen
129116GLboolean _glfwSetVideoMode (_GLFWmonitor* monitor, const GLFWvidmode* desired);
130117void _glfwRestoreVideoMode (_GLFWmonitor* monitor);
131118
0 commit comments