extern void instance_set_lb_info(struct inst_info *inst, double priority, const char *content, const char *title);
extern void instance_set_lb_size(struct inst_info *inst, int w, int h);
extern void instance_set_pd_size(struct inst_info *inst, int w, int h);
+extern void instance_set_alt_info(struct inst_info *inst, const char *icon, const char *name);
extern int instance_set_pinup(struct inst_info *inst, int pinup);
extern int instance_resize(struct inst_info *inst, int w, int h);
int scroll_locked; /*!< Scroller which is in viewer is locked. */
int active_update; /*!< Viewer will reload the buffer by itself, so the provider doesn't need to send the updated event */
+ char *icon;
+ char *name;
+
enum livebox_visible_state visible;
struct {
EINA_LIST_FREE(inst->delete_event_list, item) {
DbgFree(item);
}
+ DbgFree(inst->icon);
+ DbgFree(inst->name);
DbgFree(inst->category);
DbgFree(inst->cluster);
DbgFree(inst->content);
enum lb_type lb_type;
const char *title;
const char *content;
+ const char *icon;
+ const char *name;
if (inst->client && inst->visible != LB_SHOW) {
if (inst->visible == LB_HIDE) {
title = "";
}
- packet = packet_create_noack("lb_updated", "sssiidsss",
+ if (inst->icon) {
+ icon = inst->icon;
+ } else {
+ icon = "";
+ }
+
+ if (inst->name) {
+ name = inst->name;
+ } else {
+ name = "";
+ }
+
+ packet = packet_create_noack("lb_updated", "sssiidsssss",
package_name(inst->info), inst->id, id,
- inst->lb.width, inst->lb.height, inst->lb.priority, content, title, safe_file);
+ inst->lb.width, inst->lb.height, inst->lb.priority, content, title, safe_file, icon, name);
if (!packet) {
ErrPrint("Failed to create param (%s - %s)\n", package_name(inst->info), inst->id);
return;
}
}
+HAPI void instance_set_alt_info(struct inst_info *inst, const char *icon, const char *name)
+{
+ char *_icon = NULL;
+ char *_name = NULL;
+
+ if (icon && strlen(icon)) {
+ _icon = strdup(icon);
+ if (!_icon) {
+ ErrPrint("Heap: %s\n", strerror(errno));
+ }
+ }
+
+ if (name && strlen(name)) {
+ _name = strdup(name);
+ if (!_name) {
+ ErrPrint("Heap: %s\n", strerror(errno));
+ }
+ }
+
+ if (_icon) {
+ DbgFree(inst->icon);
+ inst->icon = _icon;
+ }
+
+ if (_name) {
+ DbgFree(inst->name);
+ inst->name = _name;
+ }
+}
+
HAPI void instance_set_lb_size(struct inst_info *inst, int w, int h)
{
if (inst->lb.width != w || inst->lb.height != h) {
const char *id;
const char *content_info;
const char *title;
+ const char *icon;
+ const char *name;
int w;
int h;
double priority;
goto out;
}
- ret = packet_get(packet, "ssiidsss", &pkgname, &id,
+ ret = packet_get(packet, "ssiidsssss", &pkgname, &id,
&w, &h, &priority,
&content_info, &title,
- &safe_filename);
- if (ret != 8) {
+ &safe_filename, &icon, &name);
+ if (ret != 10) {
ErrPrint("Parameter is not matched\n");
goto out;
}
}
instance_set_lb_info(inst, priority, content_info, title);
+ instance_set_alt_info(inst, icon, name);
switch (package_lb_type(instance_package(inst))) {
case LB_TYPE_SCRIPT: