Blender  V3.3
GHOST_Path-api.cpp
Go to the documentation of this file.
1 /* SPDX-License-Identifier: GPL-2.0-or-later
2  * Copyright 2010 Blender Foundation. All rights reserved. */
3 
8 #include <cstdio>
9 
10 #include "GHOST_ISystemPaths.h"
11 #include "GHOST_Path-api.h"
12 #include "GHOST_Types.h"
13 #include "intern/GHOST_Debug.h"
14 
16 {
18 }
19 
21 {
23 }
24 
25 const char *GHOST_getSystemDir(int version, const char *versionstr)
26 {
28  return systemPaths ? systemPaths->getSystemDir(version, versionstr) : nullptr;
29 }
30 
31 const char *GHOST_getUserDir(int version, const char *versionstr)
32 {
34  /* Shouldn't be `nullptr`. */
35  return systemPaths ? systemPaths->getUserDir(version, versionstr) : nullptr;
36 }
37 
39 {
41  /* Shouldn't be `nullptr`. */
42  return systemPaths ? systemPaths->getUserSpecialDir(type) : nullptr;
43 }
44 
45 const char *GHOST_getBinaryDir()
46 {
48  /* Shouldn't be `nullptr`. */
49  return systemPaths ? systemPaths->getBinaryDir() : nullptr;
50 }
51 
52 void GHOST_addToSystemRecentFiles(const char *filename)
53 {
55  if (systemPaths) {
56  systemPaths->addToSystemRecentFiles(filename);
57  }
58 }
void GHOST_addToSystemRecentFiles(const char *filename)
const char * GHOST_getBinaryDir()
GHOST_TSuccess GHOST_DisposeSystemPaths(void)
const char * GHOST_getUserSpecialDir(GHOST_TUserSpecialDirTypes type)
GHOST_TSuccess GHOST_CreateSystemPaths(void)
const char * GHOST_getUserDir(int version, const char *versionstr)
const char * GHOST_getSystemDir(int version, const char *versionstr)
GHOST_TSuccess
Definition: GHOST_Types.h:74
GHOST_TUserSpecialDirTypes
Definition: GHOST_Types.h:562
_GL_VOID GLfloat value _GL_VOID_RET _GL_VOID const GLuint GLboolean *residences _GL_BOOL_RET _GL_VOID GLsizei GLfloat GLfloat GLfloat GLfloat const GLubyte *bitmap _GL_VOID_RET _GL_VOID GLenum type
virtual const char * getBinaryDir() const =0
virtual const char * getSystemDir(int version, const char *versionstr) const =0
static GHOST_TSuccess create()
static GHOST_TSuccess dispose()
static GHOST_ISystemPaths * get()
virtual const char * getUserSpecialDir(GHOST_TUserSpecialDirTypes type) const =0
virtual void addToSystemRecentFiles(const char *filename) const =0
virtual const char * getUserDir(int version, const char *versionstr) const =0