naev 0.10.4
Functions
glue_macos.m File Reference

Support code for macOS. More...

#include "glue_macos.h"
#include <Foundation/Foundation.h>

Go to the source code of this file.

Functions

static int macos_writeString (NSString *str, char *res, size_t n)
 Write an NSString to a C buffer. More...
 
int macos_isBundle ()
 Determine if we're running from inside an app bundle. More...
 
int macos_resourcesPath (char *res, size_t n)
 Get the path to the bundle resources directory. More...
 
static int macos_userLibraryDir (NSString *kind, char *res, size_t n)
 Get the path to the specified user directory. More...
 
int macos_configPath (char *res, size_t n)
 Get the config directory path. More...
 
int macos_cachePath (char *res, size_t n)
 Get the cache directory path. More...
 

Detailed Description

Support code for macOS.

The functions here deal with the macOS parts that call into Objective-C land.

Definition in file glue_macos.m.

Function Documentation

◆ macos_cachePath()

int macos_cachePath ( char *  res,
size_t  n 
)

Get the cache directory path.

Definition at line 76 of file glue_macos.m.

◆ macos_configPath()

int macos_configPath ( char *  res,
size_t  n 
)

Get the config directory path.

Definition at line 67 of file glue_macos.m.

◆ macos_isBundle()

int macos_isBundle ( )

Determine if we're running from inside an app bundle.

Definition at line 33 of file glue_macos.m.

◆ macos_resourcesPath()

int macos_resourcesPath ( char *  res,
size_t  n 
)

Get the path to the bundle resources directory.

Definition at line 42 of file glue_macos.m.

◆ macos_userLibraryDir()

static int macos_userLibraryDir ( NSString *  kind,
char *  res,
size_t  n 
)
static

Get the path to the specified user directory.

Definition at line 52 of file glue_macos.m.

◆ macos_writeString()

static int macos_writeString ( NSString *  str,
char *  res,
size_t  n 
)
static

Write an NSString to a C buffer.

Definition at line 21 of file glue_macos.m.