1
0
Fork 0
mirror of https://github.com/gwm17/glfw.git synced 2024-11-23 10:48:51 -05:00

I should add the actual mir_* source files :).

This commit is contained in:
BrandonSchaefer 2014-11-06 00:21:12 -08:00 committed by Camilla Berglund
parent 10d1d278f3
commit 46c9663ed7
4 changed files with 211 additions and 0 deletions

20
src/mir_init.c Normal file
View File

@ -0,0 +1,20 @@
#include "internal.h"
//////////////////////////////////////////////////////////////////////////
////// GLFW internal API //////
//////////////////////////////////////////////////////////////////////////
int _glfwPlatformInit(void)
{
return 0;
}
void _glfwPlatformTerminate(void)
{
}
const char* _glfwPlatformGetVersionString(void)
{
return "MIR // FIXME (<0_0>)";
}

42
src/mir_monitor.c Normal file
View File

@ -0,0 +1,42 @@
#include "internal.h"
#include <stdio.h>
//////////////////////////////////////////////////////////////////////////
////// GLFW platform API //////
//////////////////////////////////////////////////////////////////////////
_GLFWmonitor** _glfwPlatformGetMonitors(int* count)
{
return NULL;
}
GLboolean _glfwPlatformIsSameMonitor(_GLFWmonitor* first, _GLFWmonitor* second)
{
return 0;
}
void _glfwPlatformGetMonitorPos(_GLFWmonitor* monitor, int* xpos, int* ypos)
{
}
GLFWvidmode* _glfwPlatformGetVideoModes(_GLFWmonitor* monitor, int* found)
{
return NULL;
}
void _glfwPlatformGetVideoMode(_GLFWmonitor* monitor, GLFWvidmode* mode)
{
}
void _glfwPlatformGetGammaRamp(_GLFWmonitor* monitor, GLFWgammaramp* ramp)
{
// TODO
fprintf(stderr, "_glfwPlatformGetGammaRamp not implemented yet\n");
}
void _glfwPlatformSetGammaRamp(_GLFWmonitor* monitor, const GLFWgammaramp* ramp)
{
// TODO
fprintf(stderr, "_glfwPlatformSetGammaRamp not implemented yet\n");
}

42
src/mir_platform.h Normal file
View File

@ -0,0 +1,42 @@
#ifndef _mir_platform_h_
#define _mir_platform_h_
#include <mir_toolkit/mir_client_library.h>
#include "posix_tls.h"
#include "posix_time.h"
#include "linux_joystick.h"
#if defined(_GLFW_EGL)
#include "egl_context.h"
#else
#error "The Mir backend depends on EGL platform support"
#endif
#define _GLFW_EGL_NATIVE_WINDOW NULL
#define _GLFW_EGL_NATIVE_DISPLAY NULL
#define _GLFW_PLATFORM_WINDOW_STATE _GLFWwindowMir mir;
#define _GLFW_PLATFORM_MONITOR_STATE _GLFWmonitorMir mir;
#define _GLFW_PLATFORM_LIBRARY_WINDOW_STATE _GLFWlibraryMir mir;
#define _GLFW_PLATFORM_CURSOR_STATE _GLFWcursorMir mir;
typedef struct _GLFWwindowMir
{
} _GLFWwindowMir;
typedef struct _GLFWmonitorMir
{
} _GLFWmonitorMir;
typedef struct _GLFWlibraryMir
{
MirConnection* connection;
} _GLFWlibraryMir;
typedef struct _GLFWcursorMir
{
} _GLFWcursorMir;
#endif // _mir_platform_h_

107
src/mir_window.c Normal file
View File

@ -0,0 +1,107 @@
#include "internal.h"
//////////////////////////////////////////////////////////////////////////
////// GLFW platform API //////
//////////////////////////////////////////////////////////////////////////
int _glfwPlatformCreateWindow(_GLFWwindow* window,
const _GLFWwndconfig* wndconfig,
const _GLFWctxconfig* ctxconfig,
const _GLFWfbconfig* fbconfig)
{
return 0;
}
void _glfwPlatformDestroyWindow(_GLFWwindow* window)
{
}
void _glfwPlatformSetWindowTitle(_GLFWwindow* window, const char* title)
{
}
void _glfwPlatformSetWindowPos(_GLFWwindow* window, int xpos, int ypos)
{
}
void _glfwPlatformSetWindowSize(_GLFWwindow* window, int width, int height)
{
}
void _glfwPlatformGetWindowSize(_GLFWwindow* window, int* width, int* height)
{
}
void _glfwPlatformIconifyWindow(_GLFWwindow* window)
{
}
void _glfwPlatformRestoreWindow(_GLFWwindow* window)
{
}
void _glfwPlatformHideWindow(_GLFWwindow* window)
{
}
void _glfwPlatformPollEvents(void)
{
}
void _glfwPlatformWaitEvents(void)
{
}
void _glfwPlatformPostEmptyEvent(void)
{
}
void _glfwPlatformGetFramebufferSize(_GLFWwindow* window, int* width, int* height)
{
}
void _glfwPlatformGetWindowFrameSize(_GLFWwindow* window, int* left, int* top, int* right, int* bottom)
{
}
void _glfwPlatformShowWindow(_GLFWwindow* window)
{
}
void _glfwPlatformUnhideWindow(_GLFWwindow* window)
{
}
void _glfwPlatformGetWindowPos(_GLFWwindow* window, int* xpos, int* ypos)
{
}
int _glfwPlatformCreateCursor(_GLFWcursor* cursor, const GLFWimage* image, int xhot, int yhot)
{
return 0;
}
void _glfwPlatformDestroyCursor(_GLFWcursor* cursor)
{
}
void _glfwPlatformSetCursor(_GLFWwindow* window, _GLFWcursor* cursor)
{
}
void _glfwPlatformSetCursorPos(_GLFWwindow* window, double xpos, double ypos)
{
}
void _glfwPlatformApplyCursorMode(_GLFWwindow* window)
{
}
void _glfwPlatformSetClipboardString(_GLFWwindow* window, const char* string)
{
}
const char* _glfwPlatformGetClipboardString(_GLFWwindow* window)
{
return NULL;
}