From 38ae319beaa34a3a4bf317c30534ddd42cbe94ff Mon Sep 17 00:00:00 2001 From: Camilla Berglund Date: Wed, 27 May 2015 15:06:52 +0200 Subject: [PATCH] Header inclusion cleanup. --- src/cocoa_platform.h | 6 ++---- src/mir_platform.h | 9 +++++---- src/mir_window.c | 1 - src/win32_platform.h | 9 +-------- src/wl_init.c | 1 - src/wl_platform.h | 10 +++++----- src/x11_platform.h | 7 +++---- 7 files changed, 16 insertions(+), 27 deletions(-) diff --git a/src/cocoa_platform.h b/src/cocoa_platform.h index 0e2af374..dac1cb38 100644 --- a/src/cocoa_platform.h +++ b/src/cocoa_platform.h @@ -27,7 +27,6 @@ #ifndef _cocoa_platform_h_ #define _cocoa_platform_h_ - #include #if defined(__OBJC__) @@ -38,15 +37,14 @@ typedef void* id; #endif #include "posix_tls.h" +#include "iokit_joystick.h" #if defined(_GLFW_NSGL) #include "nsgl_context.h" #else - #error "No supported context creation API selected" + #error "The Cocoa backend depends on NSGL platform support" #endif -#include "iokit_joystick.h" - #define _GLFW_PLATFORM_WINDOW_STATE _GLFWwindowNS ns #define _GLFW_PLATFORM_LIBRARY_WINDOW_STATE _GLFWlibraryNS ns #define _GLFW_PLATFORM_LIBRARY_TIME_STATE _GLFWtimeNS ns_time diff --git a/src/mir_platform.h b/src/mir_platform.h index 76399c2a..2d8c7778 100644 --- a/src/mir_platform.h +++ b/src/mir_platform.h @@ -27,15 +27,15 @@ #ifndef _mir_platform_h_ #define _mir_platform_h_ +#include +#include + #include #include "posix_tls.h" #include "posix_time.h" #include "linux_joystick.h" - -#include - -#include +#include "xkb_unicode.h" #if defined(_GLFW_EGL) #include "egl_context.h" @@ -51,6 +51,7 @@ #define _GLFW_PLATFORM_LIBRARY_WINDOW_STATE _GLFWlibraryMir mir #define _GLFW_PLATFORM_CURSOR_STATE _GLFWcursorMir mir + // Mir-specific Event Queue // typedef struct EventQueue diff --git a/src/mir_window.c b/src/mir_window.c index 566a5a11..cbc8e059 100644 --- a/src/mir_window.c +++ b/src/mir_window.c @@ -25,7 +25,6 @@ //======================================================================== #include "internal.h" -#include "xkb_unicode.h" #include #include diff --git a/src/win32_platform.h b/src/win32_platform.h index 37145f45..fa86bf1d 100644 --- a/src/win32_platform.h +++ b/src/win32_platform.h @@ -28,7 +28,6 @@ #ifndef _win32_platform_h_ #define _win32_platform_h_ - // We don't need all the fancy stuff #ifndef NOMINMAX #define NOMINMAX @@ -71,9 +70,7 @@ #define strdup _strdup #endif - // HACK: Define macros that some older windows.h variants don't - #ifndef WM_MOUSEHWHEEL #define WM_MOUSEHWHEEL 0x020E #endif @@ -102,7 +99,6 @@ typedef struct tagCHANGEFILTERSTRUCT #endif #endif /*Windows 7*/ - // winmm.dll function pointer typedefs typedef MMRESULT (WINAPI * JOYGETDEVCAPS_T)(UINT,LPJOYCAPS,UINT); typedef MMRESULT (WINAPI * JOYGETPOS_T)(UINT,LPJOYINFO); @@ -125,13 +121,12 @@ typedef HRESULT (WINAPI * DWMFLUSH_T)(VOID); #define _glfw_DwmIsCompositionEnabled _glfw.win32.dwmapi.DwmIsCompositionEnabled #define _glfw_DwmFlush _glfw.win32.dwmapi.DwmFlush - #define _GLFW_RECREATION_NOT_NEEDED 0 #define _GLFW_RECREATION_REQUIRED 1 #define _GLFW_RECREATION_IMPOSSIBLE 2 - #include "win32_tls.h" +#include "winmm_joystick.h" #if defined(_GLFW_WGL) #include "wgl_context.h" @@ -143,8 +138,6 @@ typedef HRESULT (WINAPI * DWMFLUSH_T)(VOID); #error "No supported context creation API selected" #endif -#include "winmm_joystick.h" - #define _GLFW_PLATFORM_WINDOW_STATE _GLFWwindowWin32 win32 #define _GLFW_PLATFORM_LIBRARY_WINDOW_STATE _GLFWlibraryWin32 win32 #define _GLFW_PLATFORM_LIBRARY_TIME_STATE _GLFWtimeWin32 win32_time diff --git a/src/wl_init.c b/src/wl_init.c index 8cf40ff9..72ce18eb 100644 --- a/src/wl_init.c +++ b/src/wl_init.c @@ -35,7 +35,6 @@ #include #include -#include "xkb_unicode.h" static void pointerHandleEnter(void* data, struct wl_pointer* pointer, diff --git a/src/wl_platform.h b/src/wl_platform.h index 4c813d4d..a500c924 100644 --- a/src/wl_platform.h +++ b/src/wl_platform.h @@ -27,20 +27,20 @@ #ifndef _wayland_platform_h_ #define _wayland_platform_h_ - #include #include +#include "posix_tls.h" +#include "posix_time.h" +#include "linux_joystick.h" +#include "xkb_unicode.h" + #if defined(_GLFW_EGL) #include "egl_context.h" #else #error "The Wayland backend depends on EGL platform support" #endif -#include "posix_tls.h" -#include "posix_time.h" -#include "linux_joystick.h" - #define _GLFW_EGL_NATIVE_WINDOW window->wl.native #define _GLFW_EGL_NATIVE_DISPLAY _glfw.wl.display diff --git a/src/x11_platform.h b/src/x11_platform.h index 4301f4ee..38be31e9 100644 --- a/src/x11_platform.h +++ b/src/x11_platform.h @@ -57,6 +57,9 @@ #endif #include "posix_tls.h" +#include "posix_time.h" +#include "linux_joystick.h" +#include "xkb_unicode.h" #if defined(_GLFW_GLX) #define _GLFW_X11_CONTEXT_VISUAL window->glx.visual @@ -70,10 +73,6 @@ #error "No supported context creation API selected" #endif -#include "posix_time.h" -#include "linux_joystick.h" -#include "xkb_unicode.h" - #define _GLFW_PLATFORM_WINDOW_STATE _GLFWwindowX11 x11 #define _GLFW_PLATFORM_LIBRARY_WINDOW_STATE _GLFWlibraryX11 x11 #define _GLFW_PLATFORM_MONITOR_STATE _GLFWmonitorX11 x11