GHOST_Path-api.h 2.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  1. /*
  2. * This program is free software; you can redistribute it and/or
  3. * modify it under the terms of the GNU General Public License
  4. * as published by the Free Software Foundation; either version 2
  5. * of the License, or (at your option) any later version.
  6. *
  7. * This program is distributed in the hope that it will be useful,
  8. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  9. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  10. * GNU General Public License for more details.
  11. *
  12. * You should have received a copy of the GNU General Public License
  13. * along with this program; if not, write to the Free Software Foundation,
  14. * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
  15. *
  16. * The Original Code is Copyright (C) 2010 by Blender Foundation.
  17. * All rights reserved.
  18. */
  19. /** \file
  20. * \ingroup GHOST
  21. */
  22. #ifndef __GHOST_PATH_API_H__
  23. #define __GHOST_PATH_API_H__
  24. #include "GHOST_Types.h"
  25. #ifdef __cplusplus
  26. extern "C" {
  27. #endif
  28. GHOST_DECLARE_HANDLE(GHOST_SystemPathsHandle);
  29. /**
  30. * Creates the one and only instance of the system path access.
  31. * \return An indication of success.
  32. */
  33. extern GHOST_TSuccess GHOST_CreateSystemPaths(void);
  34. /**
  35. * Disposes the one and only system.
  36. * \return An indication of success.
  37. */
  38. extern GHOST_TSuccess GHOST_DisposeSystemPaths(void);
  39. /**
  40. * Determine the base dir in which shared resources are located. It will first try to use
  41. * "unpack and run" path, then look for properly installed path, including versioning.
  42. * \return Unsigned char string pointing to system dir (eg /usr/share/blender/).
  43. */
  44. extern const GHOST_TUns8 *GHOST_getSystemDir(int version, const char *versionstr);
  45. /**
  46. * Determine the base dir in which user configuration is stored, including versioning.
  47. * \return Unsigned char string pointing to user dir (eg ~).
  48. */
  49. extern const GHOST_TUns8 *GHOST_getUserDir(int version, const char *versionstr);
  50. /**
  51. * Determine the dir in which the binary file is found.
  52. * \return Unsigned char string pointing to binary dir (eg ~/usr/local/bin/).
  53. */
  54. extern const GHOST_TUns8 *GHOST_getBinaryDir(void);
  55. /**
  56. * Add the file to the operating system most recently used files
  57. */
  58. extern void GHOST_addToSystemRecentFiles(const char *filename);
  59. #ifdef __cplusplus
  60. }
  61. #endif
  62. #endif