Blender  V2.59
GHOST_Path-api.cpp
Go to the documentation of this file.
00001 /*
00002  * $Id: GHOST_Path-api.cpp 35152 2011-02-25 11:28:33Z jesterking $
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 by Blender Foundation.
00021  * All rights reserved.
00022  *
00023  * The Original Code is: all of this file.
00024  *
00025  * Contributor(s): none yet.
00026  *
00027  * ***** END GPL LICENSE BLOCK *****
00028  */
00029 
00035 #include "intern/GHOST_Debug.h"
00036 #include "GHOST_Types.h"
00037 #include "GHOST_Path-api.h"
00038 #include "GHOST_ISystemPaths.h"
00039 
00040 GHOST_TSuccess GHOST_CreateSystemPaths(void)
00041 {
00042         return GHOST_ISystemPaths::create();;
00043 }
00044 
00045 GHOST_TSuccess GHOST_DisposeSystemPaths(void)
00046 {
00047         return GHOST_ISystemPaths::dispose();
00048 }
00049 
00050 const GHOST_TUns8* GHOST_getSystemDir()
00051 {
00052         GHOST_ISystemPaths* systemPaths = GHOST_ISystemPaths::get();
00053         return systemPaths ? systemPaths->getSystemDir() : 0;
00054 }
00055 
00056 const GHOST_TUns8* GHOST_getUserDir()
00057 {
00058         GHOST_ISystemPaths* systemPaths = GHOST_ISystemPaths::get();
00059         return systemPaths ? systemPaths->getUserDir() : 0; /* shouldn't be NULL */
00060 }
00061 
00062 const GHOST_TUns8* GHOST_getBinaryDir()
00063 {
00064         GHOST_ISystemPaths* systemPaths = GHOST_ISystemPaths::get();
00065         return systemPaths ? systemPaths->getBinaryDir() : 0;  /* shouldn't be NULL */
00066 }
00067 
00068 void GHOST_addToSystemRecentFiles(const char* filename)
00069 {
00070         GHOST_ISystemPaths* systemPaths = GHOST_ISystemPaths::get();
00071         if (systemPaths) {
00072                 systemPaths->addToSystemRecentFiles(filename);
00073         }
00074 }