GHOST: rename suffix X11 to Unix for non X11 files
We may use these for Wayland or SDL back-ends.
This commit is contained in:
@@ -225,9 +225,9 @@ elseif(WITH_X11)
|
|||||||
|
|
||||||
if(WITH_INPUT_NDOF)
|
if(WITH_INPUT_NDOF)
|
||||||
list(APPEND SRC
|
list(APPEND SRC
|
||||||
intern/GHOST_NDOFManagerX11.cpp
|
intern/GHOST_NDOFManagerUnix.cpp
|
||||||
|
|
||||||
intern/GHOST_NDOFManagerX11.h
|
intern/GHOST_NDOFManagerUnix.h
|
||||||
)
|
)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
@@ -310,8 +310,8 @@ if(APPLE)
|
|||||||
|
|
||||||
elseif(UNIX)
|
elseif(UNIX)
|
||||||
list(APPEND SRC
|
list(APPEND SRC
|
||||||
intern/GHOST_SystemPathsX11.cpp
|
intern/GHOST_SystemPathsUnix.cpp
|
||||||
intern/GHOST_SystemPathsX11.h
|
intern/GHOST_SystemPathsUnix.h
|
||||||
)
|
)
|
||||||
|
|
||||||
if(NOT WITH_INSTALL_PORTABLE)
|
if(NOT WITH_INSTALL_PORTABLE)
|
||||||
|
@@ -116,6 +116,11 @@ elif window_system in ('win32-vc', 'win32-mingw', 'cygwin', 'linuxcross', 'win64
|
|||||||
except ValueError:
|
except ValueError:
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
try:
|
||||||
|
sources.remove('intern' + os.sep + f + 'Unix.cpp')
|
||||||
|
except ValueError:
|
||||||
|
pass
|
||||||
|
|
||||||
try:
|
try:
|
||||||
sources.remove('intern' + os.sep + f + 'SDL.cpp')
|
sources.remove('intern' + os.sep + f + 'SDL.cpp')
|
||||||
except ValueError:
|
except ValueError:
|
||||||
@@ -137,6 +142,10 @@ elif window_system == 'darwin':
|
|||||||
sources.remove('intern' + os.sep + f + 'X11.cpp')
|
sources.remove('intern' + os.sep + f + 'X11.cpp')
|
||||||
except ValueError:
|
except ValueError:
|
||||||
pass
|
pass
|
||||||
|
try:
|
||||||
|
sources.remove('intern' + os.sep + f + 'Unix.cpp')
|
||||||
|
except ValueError:
|
||||||
|
pass
|
||||||
try:
|
try:
|
||||||
sources.remove('intern' + os.sep + f + 'SDL.cpp')
|
sources.remove('intern' + os.sep + f + 'SDL.cpp')
|
||||||
except ValueError:
|
except ValueError:
|
||||||
@@ -175,7 +184,7 @@ else:
|
|||||||
elif window_system=='darwin':
|
elif window_system=='darwin':
|
||||||
sources.remove('intern' + os.sep + 'GHOST_NDOFManagerCocoa.mm')
|
sources.remove('intern' + os.sep + 'GHOST_NDOFManagerCocoa.mm')
|
||||||
else:
|
else:
|
||||||
sources.remove('intern' + os.sep + 'GHOST_NDOFManagerX11.cpp')
|
sources.remove('intern' + os.sep + 'GHOST_NDOFManagerUnix.cpp')
|
||||||
except ValueError:
|
except ValueError:
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
@@ -44,7 +44,7 @@
|
|||||||
# ifdef __APPLE__
|
# ifdef __APPLE__
|
||||||
# include "GHOST_SystemPathsCocoa.h"
|
# include "GHOST_SystemPathsCocoa.h"
|
||||||
# else
|
# else
|
||||||
# include "GHOST_SystemPathsX11.h"
|
# include "GHOST_SystemPathsUnix.h"
|
||||||
# endif
|
# endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@@ -62,7 +62,7 @@ GHOST_TSuccess GHOST_ISystemPaths::create()
|
|||||||
# ifdef __APPLE__
|
# ifdef __APPLE__
|
||||||
m_systemPaths = new GHOST_SystemPathsCocoa();
|
m_systemPaths = new GHOST_SystemPathsCocoa();
|
||||||
# else
|
# else
|
||||||
m_systemPaths = new GHOST_SystemPathsX11();
|
m_systemPaths = new GHOST_SystemPathsUnix();
|
||||||
# endif
|
# endif
|
||||||
#endif
|
#endif
|
||||||
success = m_systemPaths != 0 ? GHOST_kSuccess : GHOST_kFailure;
|
success = m_systemPaths != 0 ? GHOST_kSuccess : GHOST_kFailure;
|
||||||
|
@@ -23,13 +23,14 @@
|
|||||||
|
|
||||||
#ifdef WITH_INPUT_NDOF
|
#ifdef WITH_INPUT_NDOF
|
||||||
|
|
||||||
#include "GHOST_NDOFManagerX11.h"
|
#include "GHOST_NDOFManagerUnix.h"
|
||||||
#include "GHOST_SystemX11.h"
|
#include "GHOST_System.h"
|
||||||
|
|
||||||
#include <spnav.h>
|
#include <spnav.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
|
||||||
|
|
||||||
GHOST_NDOFManagerX11::GHOST_NDOFManagerX11(GHOST_System& sys)
|
GHOST_NDOFManagerUnix::GHOST_NDOFManagerUnix(GHOST_System& sys)
|
||||||
: GHOST_NDOFManager(sys),
|
: GHOST_NDOFManager(sys),
|
||||||
m_available(false)
|
m_available(false)
|
||||||
{
|
{
|
||||||
@@ -63,13 +64,13 @@ GHOST_NDOFManagerX11::GHOST_NDOFManagerX11(GHOST_System& sys)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
GHOST_NDOFManagerX11::~GHOST_NDOFManagerX11()
|
GHOST_NDOFManagerUnix::~GHOST_NDOFManagerUnix()
|
||||||
{
|
{
|
||||||
if (m_available)
|
if (m_available)
|
||||||
spnav_close();
|
spnav_close();
|
||||||
}
|
}
|
||||||
|
|
||||||
bool GHOST_NDOFManagerX11::available()
|
bool GHOST_NDOFManagerUnix::available()
|
||||||
{
|
{
|
||||||
return m_available;
|
return m_available;
|
||||||
}
|
}
|
||||||
@@ -89,7 +90,7 @@ bool GHOST_NDOFManagerX11::available()
|
|||||||
static bool motion_test_prev = false;
|
static bool motion_test_prev = false;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
bool GHOST_NDOFManagerX11::processEvents()
|
bool GHOST_NDOFManagerUnix::processEvents()
|
||||||
{
|
{
|
||||||
bool anyProcessed = false;
|
bool anyProcessed = false;
|
||||||
|
|
@@ -21,8 +21,8 @@
|
|||||||
* ***** END GPL LICENSE BLOCK *****
|
* ***** END GPL LICENSE BLOCK *****
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef __GHOST_NDOFMANAGERX11_H__
|
#ifndef __GHOST_NDOFMANAGERUNIX_H__
|
||||||
#define __GHOST_NDOFMANAGERX11_H__
|
#define __GHOST_NDOFMANAGERUNIX_H__
|
||||||
|
|
||||||
#ifdef WITH_INPUT_NDOF
|
#ifdef WITH_INPUT_NDOF
|
||||||
|
|
||||||
@@ -31,11 +31,11 @@
|
|||||||
/* Event capture is handled within the NDOF manager on Linux,
|
/* Event capture is handled within the NDOF manager on Linux,
|
||||||
* so there's no need for SystemX11 to look for them. */
|
* so there's no need for SystemX11 to look for them. */
|
||||||
|
|
||||||
class GHOST_NDOFManagerX11 : public GHOST_NDOFManager
|
class GHOST_NDOFManagerUnix : public GHOST_NDOFManager
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
GHOST_NDOFManagerX11(GHOST_System&);
|
GHOST_NDOFManagerUnix(GHOST_System&);
|
||||||
~GHOST_NDOFManagerX11();
|
~GHOST_NDOFManagerUnix();
|
||||||
bool available();
|
bool available();
|
||||||
bool processEvents();
|
bool processEvents();
|
||||||
|
|
||||||
@@ -43,6 +43,5 @@ private:
|
|||||||
bool m_available;
|
bool m_available;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif /* WITH_INPUT_NDOF */
|
#endif /* WITH_INPUT_NDOF */
|
||||||
#endif /* #include guard */
|
#endif /* __GHOST_NDOFMANAGERUNIX_H__ */
|
||||||
|
|
@@ -24,12 +24,11 @@
|
|||||||
* ***** END GPL LICENSE BLOCK *****
|
* ***** END GPL LICENSE BLOCK *****
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/** \file ghost/intern/GHOST_SystemPathsX11.cpp
|
/** \file ghost/intern/GHOST_SystemPathsUnix.cpp
|
||||||
* \ingroup GHOST
|
* \ingroup GHOST
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#include "GHOST_SystemPathsUnix.h"
|
||||||
#include "GHOST_SystemPathsX11.h"
|
|
||||||
|
|
||||||
#include "GHOST_Debug.h"
|
#include "GHOST_Debug.h"
|
||||||
|
|
||||||
@@ -52,15 +51,15 @@ static const char *static_path = PREFIX "/share";
|
|||||||
static const char *static_path = NULL;
|
static const char *static_path = NULL;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
GHOST_SystemPathsX11::GHOST_SystemPathsX11()
|
GHOST_SystemPathsUnix::GHOST_SystemPathsUnix()
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
GHOST_SystemPathsX11::~GHOST_SystemPathsX11()
|
GHOST_SystemPathsUnix::~GHOST_SystemPathsUnix()
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
const GHOST_TUns8 *GHOST_SystemPathsX11::getSystemDir(int, const char *versionstr) const
|
const GHOST_TUns8 *GHOST_SystemPathsUnix::getSystemDir(int, const char *versionstr) const
|
||||||
{
|
{
|
||||||
/* no prefix assumes a portable build which only uses bundled scripts */
|
/* no prefix assumes a portable build which only uses bundled scripts */
|
||||||
if (static_path) {
|
if (static_path) {
|
||||||
@@ -71,7 +70,7 @@ const GHOST_TUns8 *GHOST_SystemPathsX11::getSystemDir(int, const char *versionst
|
|||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
const GHOST_TUns8 *GHOST_SystemPathsX11::getUserDir(int version, const char *versionstr) const
|
const GHOST_TUns8 *GHOST_SystemPathsUnix::getUserDir(int version, const char *versionstr) const
|
||||||
{
|
{
|
||||||
static string user_path = "";
|
static string user_path = "";
|
||||||
static int last_version = 0;
|
static int last_version = 0;
|
||||||
@@ -116,12 +115,12 @@ const GHOST_TUns8 *GHOST_SystemPathsX11::getUserDir(int version, const char *ver
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const GHOST_TUns8 *GHOST_SystemPathsX11::getBinaryDir() const
|
const GHOST_TUns8 *GHOST_SystemPathsUnix::getBinaryDir() const
|
||||||
{
|
{
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
void GHOST_SystemPathsX11::addToSystemRecentFiles(const char * /*filename*/) const
|
void GHOST_SystemPathsUnix::addToSystemRecentFiles(const char * /*filename*/) const
|
||||||
{
|
{
|
||||||
/* XXXXX TODO: Implementation for X11 if possible */
|
/* XXXXX TODO: Implementation for X11 if possible */
|
||||||
|
|
@@ -24,31 +24,31 @@
|
|||||||
* ***** END GPL LICENSE BLOCK *****
|
* ***** END GPL LICENSE BLOCK *****
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/** \file ghost/intern/GHOST_SystemPathsX11.h
|
/** \file ghost/intern/GHOST_SystemPathsUnix.h
|
||||||
* \ingroup GHOST
|
* \ingroup GHOST
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
#ifndef __GHOST_SYSTEMPATHSX11_H__
|
#ifndef __GHOST_SYSTEMPATHSUNIX_H__
|
||||||
#define __GHOST_SYSTEMPATHSX11_H__
|
#define __GHOST_SYSTEMPATHSUNIX_H__
|
||||||
|
|
||||||
#include "GHOST_SystemPaths.h"
|
#include "GHOST_SystemPaths.h"
|
||||||
#include "../GHOST_Types.h"
|
#include "../GHOST_Types.h"
|
||||||
|
|
||||||
|
|
||||||
class GHOST_SystemPathsX11 : public GHOST_SystemPaths {
|
class GHOST_SystemPathsUnix : public GHOST_SystemPaths {
|
||||||
public:
|
public:
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Constructor
|
* Constructor
|
||||||
* this class should only be instanciated by GHOST_ISystem.
|
* this class should only be instanciated by GHOST_ISystem.
|
||||||
*/
|
*/
|
||||||
GHOST_SystemPathsX11();
|
GHOST_SystemPathsUnix();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Destructor.
|
* Destructor.
|
||||||
*/
|
*/
|
||||||
~GHOST_SystemPathsX11();
|
~GHOST_SystemPathsUnix();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Determine the base dir in which shared resources are located. It will first try to use
|
* Determine the base dir in which shared resources are located. It will first try to use
|
||||||
@@ -76,5 +76,4 @@ public:
|
|||||||
void addToSystemRecentFiles(const char *filename) const;
|
void addToSystemRecentFiles(const char *filename) const;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif /* __GHOST_SYSTEMPATHSUNIX_H__ */
|
||||||
|
|
@@ -48,7 +48,7 @@
|
|||||||
#include "GHOST_DisplayManagerX11.h"
|
#include "GHOST_DisplayManagerX11.h"
|
||||||
#include "GHOST_EventDragnDrop.h"
|
#include "GHOST_EventDragnDrop.h"
|
||||||
#ifdef WITH_INPUT_NDOF
|
#ifdef WITH_INPUT_NDOF
|
||||||
# include "GHOST_NDOFManagerX11.h"
|
# include "GHOST_NDOFManagerUnix.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef WITH_XDND
|
#ifdef WITH_XDND
|
||||||
@@ -202,7 +202,7 @@ init()
|
|||||||
|
|
||||||
if (success) {
|
if (success) {
|
||||||
#ifdef WITH_INPUT_NDOF
|
#ifdef WITH_INPUT_NDOF
|
||||||
m_ndofManager = new GHOST_NDOFManagerX11(*this);
|
m_ndofManager = new GHOST_NDOFManagerUnix(*this);
|
||||||
#endif
|
#endif
|
||||||
m_displayManager = new GHOST_DisplayManagerX11(this);
|
m_displayManager = new GHOST_DisplayManagerX11(this);
|
||||||
|
|
||||||
@@ -589,7 +589,7 @@ processEvents(
|
|||||||
}
|
}
|
||||||
|
|
||||||
#ifdef WITH_INPUT_NDOF
|
#ifdef WITH_INPUT_NDOF
|
||||||
if (static_cast<GHOST_NDOFManagerX11 *>(m_ndofManager)->processEvents()) {
|
if (static_cast<GHOST_NDOFManagerUnix *>(m_ndofManager)->processEvents()) {
|
||||||
anyProcessed = true;
|
anyProcessed = true;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
Reference in New Issue
Block a user