Hey look, I can still do C if I really try.

This commit is contained in:
Chris Marsh
2017-06-30 14:31:48 -07:00
parent 2be56aebab
commit df02787af6
3 changed files with 37 additions and 23 deletions

View File

@ -1,7 +1,15 @@
#pragma once
#include <stdint.h>
struct DiscordRichPresence {
#ifdef __cplusplus
extern "C" {
#else
#endif
typedef struct {
const char* state;
const char* details;
int64_t startTimestamp;
@ -16,19 +24,16 @@ struct DiscordRichPresence {
const char* matchSecret;
const char* joinSecret;
const char* spectateSecret;
bool instance;
};
int8_t instance;
} DiscordRichPresence;
struct DiscordEventHandlers {
// required.
typedef struct {
void (*ready)();
void (*disconnected)();
// optional for rich presence
void (*wantsPresence)();
void (*joinGame)(const char* joinSecret);
void (*spectateGame)(const char* spectateSecret);
};
} DiscordEventHandlers;
void Discord_Initialize(const char* applicationId, DiscordEventHandlers* handlers);
void Discord_Shutdown();
@ -59,3 +64,7 @@ void Discord_SelectTextChannel();
void Discord_SendMessage();
*/
#ifdef __cplusplus
} /* extern "C" */
#endif