Blender  V2.59
GHOST_SystemPathsX11.cpp
Go to the documentation of this file.
00001 /*
00002  * $Id: GHOST_SystemPathsX11.cpp 39160 2011-08-07 17:38:36Z campbellbarton $
00003  *
00004  * ***** BEGIN GPL LICENSE BLOCK *****
00005  *
00006  * This program is free software; you can redistribute it and/or
00007  * modify it under the terms of the GNU General Public License
00008  * as published by the Free Software Foundation; either version 2
00009  * of the License, or (at your option) any later version. 
00010  *
00011  * This program is distributed in the hope that it will be useful,
00012  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00013  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00014  * GNU General Public License for more details.
00015  *
00016  * You should have received a copy of the GNU General Public License
00017  * along with this program; if not, write to the Free Software Foundation,
00018  * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
00019  *
00020  * The Original Code is Copyright (C) 2010 Blender Foundation.
00021  * All rights reserved.
00022  *
00023  * 
00024  * Contributor(s): Blender Foundation
00025  *
00026  * ***** END GPL LICENSE BLOCK *****
00027  */
00028 
00034 #include "GHOST_SystemPathsX11.h"
00035 
00036 #include "GHOST_Debug.h"
00037 
00038 // For timing
00039 
00040 #include <sys/time.h>
00041 #include <unistd.h>
00042 
00043 #include <stdio.h> // for fprintf only
00044 #include <cstdlib> // for exit
00045 
00046 #ifdef PREFIX
00047 static const char *static_path= PREFIX "/share" ;
00048 #else
00049 static const char *static_path= NULL;
00050 #endif
00051 
00052 GHOST_SystemPathsX11::GHOST_SystemPathsX11()
00053 {
00054 }
00055 
00056 GHOST_SystemPathsX11::~GHOST_SystemPathsX11()
00057 {
00058 }
00059 
00060 const GHOST_TUns8* GHOST_SystemPathsX11::getSystemDir() const
00061 {
00062         /* no prefix assumes a portable build which only uses bundled scripts */
00063         return (const GHOST_TUns8 *)static_path;
00064 }
00065 
00066 const GHOST_TUns8* GHOST_SystemPathsX11::getUserDir() const
00067 {
00068         return (const GHOST_TUns8 *)getenv("HOME");
00069 }
00070 
00071 const GHOST_TUns8* GHOST_SystemPathsX11::getBinaryDir() const
00072 {
00073         return NULL;
00074 }
00075 
00076 void GHOST_SystemPathsX11::addToSystemRecentFiles(const char* filename) const
00077 {
00078         /* XXXXX TODO: Implementation for X11 if possible */
00079 
00080 }