#ifndef BW_APPLICATION_H
#define BW_APPLICATION_H
#ifdef __cplusplus
extern "C" {
#endif
struct bw_Application;
typedef void (*bw_ApplicationDispatchFn)( struct bw_Application* app, void* data );
typedef bw_ApplicationDispatchFn bw_ApplicationReadyFn;
#if defined(BW_WIN32)
#include "application/win32.h"
#elif defined(BW_GTK)
#include "application/gtk.h"
#else
#error Unsupported platform
#endif
#if defined(BW_CEF)
#include "application/cef.h"
#elif defined(BW_EDGE)
#include "application/edge.h"
#else
#error Unsupported engine
#endif
struct bw_Application {
bw_ApplicationImpl impl;
bw_ApplicationEngineImpl engine_impl; unsigned int windows_alive;
};
typedef struct bw_Application bw_Application;
typedef struct bw_ApplicationEngineData bw_ApplicationEngineData;
typedef struct bw_ApplicationDispatchData bw_ApplicationDispatchData;
void bw_Application_assertCorrectThread( const bw_Application* );
void bw_Application_exit( bw_Application* app, int exit_code );
void bw_Application_exitAsync( bw_Application* app, int exit_code );
bool bw_Application_dispatch( bw_Application* app, bw_ApplicationDispatchFn func, void* data );
void bw_Application_free( bw_Application* app );
bw_Application* bw_Application_initialize( int argc, char** argv );
bool bw_Application_isRunning( const bw_Application* app );
int bw_Application_run( bw_Application* app, bw_ApplicationReadyFn on_ready, void* user_data );
#ifdef __cplusplus
} #endif
#endif