diff options
Diffstat (limited to 'src/ug.c')
-rw-r--r-- | src/ug.c | 34 |
1 files changed, 34 insertions, 0 deletions
@@ -140,11 +140,33 @@ UG_API int ug_pause(void) return ugman_pause(); } +UG_API int ug_pause_ug(ui_gadget_h ug) +{ + if (!ug || !ugman_ug_exist(ug)) { + _ERR("ug_pause_ug() failed: Invalid ug"); + errno = EINVAL; + return -1; + } + + return ugman_pause_ug(ug); +} + UG_API int ug_resume(void) { return ugman_resume(); } +UG_API int ug_resume_ug(ui_gadget_h ug) +{ + if (!ug || !ugman_ug_exist(ug)) { + _ERR("ug_resume_ug() failed: Invalid ug"); + errno = EINVAL; + return -1; + } + + return ugman_resume_ug(ug); +} + UG_API int ug_destroy(ui_gadget_h ug) { return ugman_ug_del(ug); @@ -354,3 +376,15 @@ UG_API int ug_is_installed(const char *name) return ug_exist(name); } +#ifdef ENABLE_UG_CREATE_CB +UG_API int ug_create_cb(void (*create_cb)(char *, char *, char *, void *), void *user_data) +{ + int ret; + + ret = ugman_create_cb(create_cb, user_data); + if (ret == -1) + _ERR("trace cb register fail"); + + return ret; +} +#endif |