emscripten Humble Cloud interface
Edward Rudd
2015-08-11 2e32e892540d1afbb59ea056cfe80226174a8f6f
client/library/humble_api.h
@@ -22,6 +22,30 @@
     */
    void humble_fetch_asset_data(const char* url, void *arg, em_async_wget_onload_func onload, em_arg_callback_func onerror);
    typedef enum {
        /**
         * This callback is passed a float volume (between 0.0 and 1.0) as well as the data parameter when registered.
         *
         * callback prototype: void (*)(float volume, void* data);
         */
        HUMBLE_API_CALLBACK_SET_PLAYER_VOLUME = 1,
        /**
         * This callback is passed an int value which is either 1 for fullscreen or 0 for windowed as well as the data parameter when registered.
         * when going windowed, the application should use and respect the humble_get_player_size values
         *
         * callback prototype: void (*)(int fullscreen, void* data);
         */
        HUMBLE_API_CALLBACK_SET_PLAYER_FULLSCREEN      = 2,
    } HUMBLE_API_CALLBACK;
    /**
     * Register a callback for the specified callback type
     * If a callback is already registered, it will be replaced with the new callback
     * passing a NUL for callback will unregister the callback for that type
     * data will be passed along to the callback function as the last parameter
     */
    int humble_set_callback(HUMBLE_API_CALLBACK type, void *callback, void* data);
    /**
     * Gets the allowable player size of the humble player.  Use this to restrict the size of the game in windowed mode.
     * returns 1 if the restriction should be enforced.. 0 otherwise