#ifndef __JSWMLIB_H__ #define __JSWMLIB_H__ #include /* Must match jswmcmd::JswmCmd::cmd_type() */ enum JswmConCmdType { cmdInvalid, cmdShowRole, cmdSetRolePos, cmdSetRoleRelativePos, cmdSetRoleVisibility, }; struct cmdPosData{ int32_t x; int32_t y; int32_t w; int32_t h; }; struct cmdRelativePosData{ int32_t off_x; int32_t off_y; int32_t w; int32_t h; }; typedef void * JswmLibHandler; static int is_valid(JswmLibHandler handler) { return (handler != NULL); } void jswmlib_enable_log(); JswmLibHandler jswmcmd_parse(const char * s); void jswmcmd_free(JswmLibHandler handler); int32_t jswmcmd_type(JswmLibHandler handler); const char *jswmcmd_role(JswmLibHandler handler); void jswmcmd_free_role(JswmLibHandler handler); void *jswmcmd_data(JswmLibHandler handler); void jswmcmd_free_data(JswmLibHandler handler, void *data); JswmLibHandler jswmlib_init(const char* redis_server); int32_t app_surface_id(JswmLibHandler handler, const char *app_id); #endif