Selaa lähdekoodia

Removed 'screen' from monitor nomenclature.

Camilla Berglund 13 vuotta sitten
vanhempi
commit
2108360671
6 muutettua tiedostoa jossa 22 lisäystä ja 22 poistoa
  1. 2 2
      include/GL/glfw3.h
  2. 3 3
      src/internal.h
  3. 7 7
      src/monitor.c
  4. 6 6
      src/win32_window.c
  5. 2 2
      src/x11_window.c
  6. 2 2
      tests/modes.c

+ 2 - 2
include/GL/glfw3.h

@@ -460,8 +460,8 @@ extern "C" {
 /* Monitor constants */
 #define GLFW_MONITOR_PHYSICAL_WIDTH  0x00060001
 #define GLFW_MONITOR_PHYSICAL_HEIGHT 0x00060002
-#define GLFW_MONITOR_SCREEN_POS_X    0x00060003
-#define GLFW_MONITOR_SCREEN_POS_Y    0x00060004
+#define GLFW_MONITOR_POS_X           0x00060003
+#define GLFW_MONITOR_POS_Y           0x00060004
 #define GLFW_MONITOR_CONNECTED       0x00061000
 #define GLFW_MONITOR_DISCONNECTED    0x00061001
 

+ 3 - 3
src/internal.h

@@ -220,8 +220,8 @@ struct _GLFWmonitor
     int       physicalWidth;
     int       physicalHeight;
     // logical orientation of the screen on the desktop
-    int       screenX;
-    int       screenY;
+    int       positionX;
+    int       positionY;
 
     GLFWvidmode*  modes;
 
@@ -401,7 +401,7 @@ GLboolean _glfwIsValidContext(_GLFWwndconfig* wndconfig);
 _GLFWmonitor* _glfwCreateMonitor(const char* name,
                                  GLboolean primary,
                                  int physicalWidth, int physicalHeight,
-                                 int screenX, int screenY);
+                                 int x, int y);
 void _glfwDestroyMonitor(_GLFWmonitor* monitor);
 void _glfwDestroyMonitors(void);
 

+ 7 - 7
src/monitor.c

@@ -80,7 +80,7 @@ static int compareVideoModes(const void* firstPtr, const void* secondPtr)
 _GLFWmonitor* _glfwCreateMonitor(const char* name,
                                  GLboolean primary,
                                  int physicalWidth, int physicalHeight,
-                                 int screenX, int screenY)
+                                 int x, int y)
 {
     _GLFWmonitor* monitor = (_GLFWmonitor*) calloc(1, sizeof(_GLFWmonitor));
     if (!monitor)
@@ -93,8 +93,8 @@ _GLFWmonitor* _glfwCreateMonitor(const char* name,
     monitor->primary = primary;
     monitor->physicalWidth = physicalWidth;
     monitor->physicalHeight = physicalHeight;
-    monitor->screenX = screenX;
-    monitor->screenY = screenY;
+    monitor->positionX = x;
+    monitor->positionY = y;
 
     return monitor;
 }
@@ -318,10 +318,10 @@ GLFWAPI int glfwGetMonitorParam(GLFWmonitor handle, int param)
             return monitor->physicalWidth;
         case GLFW_MONITOR_PHYSICAL_HEIGHT:
             return monitor->physicalHeight;
-        case GLFW_MONITOR_SCREEN_POS_X:
-            return monitor->screenX;
-        case GLFW_MONITOR_SCREEN_POS_Y:
-            return monitor->screenY;
+        case GLFW_MONITOR_POS_X:
+            return monitor->positionX;
+        case GLFW_MONITOR_POS_Y:
+            return monitor->positionY;
     }
 
     _glfwSetError(GLFW_INVALID_ENUM,

+ 6 - 6
src/win32_window.c

@@ -728,7 +728,7 @@ static int createWindow(_GLFWwindow* window,
                         const _GLFWfbconfig* fbconfig)
 {
     DWORD dwStyle, dwExStyle;
-    int screenX, screenY, fullWidth, fullHeight;
+    int positionX, positionY, fullWidth, fullHeight;
     POINT pos;
     WCHAR* wideTitle;
 
@@ -775,8 +775,8 @@ static int createWindow(_GLFWwindow* window,
     {
         // Fullscreen windows are always opened in the upper left corner
         // regardless of the desktop working area
-        screenX = wndconfig->monitor->screenX;
-        screenY = wndconfig->monitor->screenY;
+        positionX = wndconfig->monitor->positionX;
+        positionY = wndconfig->monitor->positionY;
     }
     else
     {
@@ -784,8 +784,8 @@ static int createWindow(_GLFWwindow* window,
         SystemParametersInfo(SPI_GETWORKAREA, 0, &wa, 0);
 
         // Adjust window position to working area
-        screenX = wa.left;
-        screenY = wa.top;
+        positionX = wa.left;
+        positionY = wa.top;
     }
 
     wideTitle = _glfwCreateWideStringFromUTF8(wndconfig->title);
@@ -800,7 +800,7 @@ static int createWindow(_GLFWwindow* window,
                                           _GLFW_WNDCLASSNAME,
                                           wideTitle,
                                           window->Win32.dwStyle,
-                                          screenX, screenY,
+                                          positionX, positionY,
                                           fullWidth,             // Decorated window width
                                           fullHeight,            // Decorated window height
                                           NULL,                  // No parent window

+ 2 - 2
src/x11_window.c

@@ -218,8 +218,8 @@ static GLboolean createWindow(_GLFWwindow* window,
         if (wndconfig->monitor)
         {
             hints->flags |= PPosition;
-            hints->x = wndconfig->monitor->screenX;
-            hints->y = wndconfig->monitor->screenY;
+            hints->x = wndconfig->monitor->positionX;
+            hints->y = wndconfig->monitor->positionY;
         }
 
         if (!wndconfig->resizable)

+ 2 - 2
tests/modes.c

@@ -101,8 +101,8 @@ static void list_modes(GLFWmonitor monitor)
     printf("Name: %s\n", glfwGetMonitorName(monitor));
     printf("Current mode: %s\n", format_mode(&mode));
     printf("Virtual position: %i %i\n",
-           glfwGetMonitorParam(monitor, GLFW_MONITOR_SCREEN_POS_X),
-           glfwGetMonitorParam(monitor, GLFW_MONITOR_SCREEN_POS_Y));
+           glfwGetMonitorParam(monitor, GLFW_MONITOR_POS_X),
+           glfwGetMonitorParam(monitor, GLFW_MONITOR_POS_Y));
 
     widthMM = glfwGetMonitorParam(monitor, GLFW_MONITOR_PHYSICAL_WIDTH);
     heightMM = glfwGetMonitorParam(monitor, GLFW_MONITOR_PHYSICAL_HEIGHT);