core: libmachcore fixes

This commit is contained in:
Andrew Gutekanst 2023-02-07 20:08:35 -05:00 committed by Stephen Gutekanst
parent 35ae2d7ac7
commit 60eb518e4f
5 changed files with 89 additions and 10 deletions

View file

@ -0,0 +1,37 @@
#ifndef MACHCORE_H_
#define MACHCORE_H_
#if defined(MACHCORE_SHARED_LIBRARY)
# if defined(_WIN32)
# if defined(MACHCORE_IMPLEMENTATION)
# define MACHCORE_EXPORT __declspec(dllexport)
# else
# define MACHCORE_EXPORT __declspec(dllimport)
# endif
# else // defined(_WIN32)
# if defined(MACHCORE_IMPLEMENTATION)
# define MACHCORE_EXPORT __attribute__((visibility("default")))
# else
# define MACHCORE_EXPORT
# endif
# endif // defined(_WIN32)
#else // defined(MACHCORE_SHARED_LIBRARY)
# define MACHCORE_EXPORT
#endif // defined(MACHCORE_SHARED_LIBRARY)
#include <stdint.h>
#include <stddef.h>
#include <stdbool.h>
typedef struct MachCoreInstanceImpl MachCoreInstance;
typedef struct MachCoreEventIteratorImpl {
unsigned char _data[8];
} MachCoreEventIterator;
MachCoreInstance* mach_core_init();
void mach_core_deinit(MachCoreInstance* core);
MachCoreEventIterator mach_core_poll_events(MachCoreInstance* core);
#endif // MACHCORE_H_