Explicitly include headers on OSX

This commit is contained in:
UnknownShadow200 2019-05-05 09:45:34 +10:00
parent 66f029e984
commit c6de5af775
5 changed files with 11 additions and 9 deletions

View File

@ -59,7 +59,7 @@ typedef uint8_t bool;
#ifndef NULL
#ifdef __cplusplus
#define NULL nullptr
#define NULL 0
#else
#define NULL ((void*)0)
#endif

View File

@ -373,7 +373,7 @@ static void D3D9_RecreateDevice(void) {
void Gfx_Init(void) {
Gfx.MinZNear = 0.05f;
void* winHandle = Window_GetWindowHandle();
void* winHandle = Window_GetHandle();
d3d = Direct3DCreate9(D3D_SDK_VERSION);
D3D9_FindCompatibleFormat();

View File

@ -89,6 +89,7 @@ const ReturnCode ReturnCode_SocketWouldBlock = EWOULDBLOCK;
#elif defined CC_BUILD_OSX
#include <mach/mach_time.h>
#include <mach-o/dyld.h>
#include <ApplicationServices/ApplicationServices.h>
#elif defined CC_BUILD_WEB
#include <emscripten.h>
#undef CC_BUILD_FREETYPE

View File

@ -532,7 +532,7 @@ void Window_SetSize(int width, int height) {
Rect_Width(rect), Rect_Height(rect), SWP_NOMOVE);
}
void* Window_GetWindowHandle(void) { return win_handle; }
void* Window_GetHandle(void) { return win_handle; }
bool Window_GetVisible(void) { return IsWindowVisible(win_handle); }
void Window_SetVisible(bool visible) {
@ -970,7 +970,7 @@ void Window_SetVisible(bool visible) {
}
}
void* Window_GetWindowHandle(void) { return win_handle; }
void* Window_GetHandle(void) { return win_handle; }
int Window_GetWindowState(void) {
Atom prop_type;
@ -1566,6 +1566,7 @@ void Window_DisableRawMouse(void) { Window_DefaultDisableRawMouse(); }
*#########################################################################################################################*/
#ifdef CC_BUILD_CARBON
#include <ApplicationServices/ApplicationServices.h>
#include <Carbon/Carbon.h>
static WindowRef win_handle;
static int win_state;
@ -1995,7 +1996,7 @@ void Window_SetVisible(bool visible) {
}
}
void* Window_GetWindowHandle(void) { return win_handle; }
void* Window_GetHandle(void) { return win_handle; }
int Window_GetWindowState(void) {
if (win_state == WINDOW_STATE_FULLSCREEN)
@ -2275,7 +2276,7 @@ void Window_SetVisible(bool visible) {
}
}
void* Window_GetWindowHandle(void) { return win_handle; }
void* Window_GetHandle(void) { return win_handle; }
int Window_GetWindowState(void) {
Uint32 flags = SDL_GetWindowFlags(win_handle);
@ -2799,7 +2800,7 @@ void Window_SetClipboardText(const String* value) {
bool Window_GetVisible(void) { return true; }
void Window_SetVisible(bool visible) { }
void* Window_GetWindowHandle(void) { return NULL; }
void* Window_GetHandle(void) { return NULL; }
int Window_GetWindowState(void) {
EmscriptenFullscreenChangeEvent status;

View File

@ -72,7 +72,7 @@ bool Window_GetVisible(void);
/* Sets whether the window is visible on screen at all. */
void Window_SetVisible(bool visible);
/* Returns the platform-specific handle to the window. */
void* Window_GetWindowHandle(void);
void* Window_GetHandle(void);
/* Gets the current state of the window, see WindowState enum. */
int Window_GetWindowState(void);
/* Sets the current state of the window, see WindowState enum. */
@ -118,7 +118,7 @@ void Window_InitRaw(Bitmap* bmp);
void Window_DrawRaw(Rect2D r);
/* Begins listening for raw input and starts raising MouseEvents.RawMoved. */
/* NOTE: Some backends only raise it when Window_UpdateRawMouse is called. */
/* NOTE: Some backends only raise it when Window_UpdateRawMouse is called. */
/* Cursor will also be hidden and moved to window centre. */
void Window_EnableRawMouse(void);
/* Updates mouse state. (such as centreing cursor) */