From fbfc76ee445a633ff94b8f155a0781ea71a9d941 Mon Sep 17 00:00:00 2001 From: leo Date: Thu, 16 Feb 2006 00:43:45 +0000 Subject: OS X config script git-svn-id: http://svn.leocad.org/trunk@477 c7d43263-9d01-0410-8a33-9dba5d9f93d6 --- common/basewnd.h | 14 +++++++++++--- common/defines.h | 31 +++++++++++++++++++++++++++---- common/opengl.h | 5 +++++ 3 files changed, 43 insertions(+), 7 deletions(-) (limited to 'common') diff --git a/common/basewnd.h b/common/basewnd.h index 1af4db6..f26f4f5 100644 --- a/common/basewnd.h +++ b/common/basewnd.h @@ -13,9 +13,9 @@ typedef struct int index; UINT command; } BaseMenuItem; +#endif -#else - +#ifdef LC_LINUX #include typedef GtkWidget* BaseWndXID; typedef struct @@ -25,6 +25,14 @@ typedef struct } BaseMenuItem; #endif +#ifdef LC_MACOSX +typedef void* BaseWndXID; +typedef struct +{ + void* Dummy; +} BaseMenuItem; +#endif + // ============================================================================= // Message Box constants @@ -74,7 +82,7 @@ class BaseWnd void SetXID (BaseWndXID id) { m_pXID = id; } -#ifndef WIN32 +#ifdef LC_LINUX // FIXME: remove operator GtkWidget* () const { return m_pXID; } diff --git a/common/defines.h b/common/defines.h index d1b50a7..ebea0ff 100644 --- a/common/defines.h +++ b/common/defines.h @@ -4,10 +4,8 @@ #ifndef _DEFINES_H_ #define _DEFINES_H_ -///////////////////////////////////////////////////////////////////////////// -// System specific - -#if !(defined(LC_WINDOWS) || defined(LC_LINUX)) +// Check for supported platforms. +#if !(defined(LC_WINDOWS) || defined(LC_LINUX) || defined(LC_MACOSX)) #error YOU NEED TO DEFINE YOUR OS #endif @@ -55,6 +53,31 @@ int stricmp(const char* str1, const char* str2); #endif +#ifdef LC_MACOSX +#define LC_MAXPATH 1024 //FILENAME_MAX + +#define KEY_SHIFT 0x01 +#define KEY_CONTROL 0x02 +#define KEY_ESCAPE 0x03 +#define KEY_TAB 0x04 +#define KEY_INSERT 0x05 +#define KEY_DELETE 0x06 +#define KEY_UP 0x07 +#define KEY_DOWN 0x08 +#define KEY_LEFT 0x09 +#define KEY_RIGHT 0x0A +#define KEY_PRIOR 0x0B +#define KEY_NEXT 0x0C +#define KEY_PLUS '+' +#define KEY_MINUS '-' + +char* strupr(char* string); +char* strlwr(char* string); +int stricmp(const char* str1, const char* str2); + +#endif + + ///////////////////////////////////////////////////////////////////////////// // LeoCAD constants diff --git a/common/opengl.h b/common/opengl.h index 2a56559..6445b5c 100755 --- a/common/opengl.h +++ b/common/opengl.h @@ -15,6 +15,11 @@ #include "linux_gl.h" #endif +#ifdef LC_MACOSX +#include +#include +#endif + //#include // TODO: remove all glu calls void gluLookAt (GLdouble eyex, GLdouble eyey, GLdouble eyez, GLdouble centerx, GLdouble centery, GLdouble centerz, -- cgit v1.2.3