macos: config API

This commit is contained in:
Mitchell Hashimoto
2023-02-14 15:53:28 -08:00
parent 6fc4b144a2
commit 9bd527fe00
7 changed files with 229 additions and 115 deletions

View File

@@ -1,3 +1,10 @@
// Ghostty embedding API. The documentation for the embedding API is
// only within the Zig source files that define the implementations. This
// isn't meant to be a general purpose embedding API (yet) so there hasn't
// been documentation or example work beyond that.
//
// The only consumer of this API is the macOS app, but the API is built to
// be more general purpose.
#ifndef GHOSTTY_H
#define GHOSTTY_H
@@ -7,9 +14,14 @@ extern "C" {
#include <stdint.h>
#define GHOSTTY_SUCCESS 0
typedef void *ghostty_t;
typedef void *ghostty_config_t;
int ghostty_init(void);
ghostty_t ghostty_init(void);
ghostty_config_t ghostty_config_new(ghostty_t);
void ghostty_config_free(ghostty_t, ghostty_config_t);
void ghostty_config_load_string(ghostty_t, ghostty_config_t, const char *, uintptr_t);
void ghostty_config_finalize(ghostty_config_t);
#ifdef __cplusplus
}