extern int livebox_release_scroller(const char *pkgname, const char *id);
/*!
+ * \brief Get the configuration status of premultiplied alpha.
+ * \details
+ * If the system uses the premultiplied alpha for content,
+ * This function will returns 1.
+ * \remarks This function only works with the inhouse provider.
+ * \return status of premultiplied alpha.
+ * \retval 1 Content rendered with premultiplied alpha.
+ * \retval 0 Content doesn't rendered with premultiplied alpha.
+ */
+extern int livebox_conf_premultiplied_alpha(void);
+
+/*!
* \}
*/
#define FILE_SCHEMA "file://"
+/* Must has to sync'd with data-provider-slave */
+struct conf {
+ int width;
+ int height;
+
+ int base_width;
+ int base_height;
+ double minimum_period;
+
+ struct {
+ char *script;
+ char *abi;
+ char *pd_group;
+ double period;
+ } default_conf;
+
+ struct {
+ char *name;
+ char *secured;
+ char *abi;
+ } launch_key;
+
+ double default_packet_time;
+
+ char *empty_content;
+ char *empty_title;
+
+ char *default_content;
+ char *default_title;
+
+ unsigned long minimum_space;
+
+ char *replace_tag;
+
+ double slave_ttl;
+ double slave_activate_time;
+ double slave_relaunch_time;
+ int slave_relaunch_count;
+
+ int max_log_line;
+ int max_log_file;
+
+ unsigned long sqlite_flush_max;
+
+ struct {
+ char *conf;
+ char *image;
+ char *script;
+ char *root;
+ char *script_port;
+ char *slave_log;
+ char *reader;
+ char *always;
+ char *db;
+ char *module;
+ char *input;
+ } path;
+
+ int max_size_type;
+
+ int slave_max_load;
+
+ double ping_time;
+
+ int use_sw_backend;
+ char *provider_method;
+ int debug_mode;
+ int overwrite_content;
+ int com_core_thread;
+ int use_xmonitor;
+ int premultiplied;
+};
+
/*!
* \brief This function is defined by the data-provider-slave
*/
int (*request_update_by_id)(const char *uri);
int (*trigger_update_monitor)(const char *id, int is_pd);
int (*update_extra_info)(const char *id, const char *content, const char *title, const char *icon, const char *name);
+ struct conf *conf;
} s_info = {
.find_pkgname = NULL,
.request_update_by_id = NULL,
.trigger_update_monitor = NULL,
.update_extra_info = NULL,
+ .conf = NULL,
};
struct block {
return ret;
}
+PUBLIC int livebox_conf_premultiplied_alpha(void)
+{
+ if (!s_info.conf) {
+ s_info.conf = dlsym(RTLD_DEFAULT, "g_conf");
+ if (!s_info.conf) {
+ ErrPrint("g_conf is not found\n");
+ return 1;
+ }
+
+ DbgPrint("Premultiplied alpha: %d\n", s_info.conf->premultiplied);
+ }
+
+ return s_info.conf->premultiplied;
+}
+
PUBLIC unsigned long livebox_pixmap_id(struct livebox_buffer *handle)
{
return provider_buffer_pixmap_id(handle);
return;
}
+ if (livebox_conf_premultiplied_alpha()) {
+ Evas_Coord w;
+ Evas_Coord h;
+
+ ecore_evas_geometry_get(info->ee, NULL, NULL, &w, &h);
+ evas_damage_rectangle_add(e, 0, 0, w, h);
+ }
+
if (info->is_hw) {
livebox_buffer_pre_render(info->handle);
}
return;
}
+ if (livebox_conf_premultiplied_alpha()) {
+ void *canvas;
+ int x, y, w, h;
+
+ // Get a pointer of a buffer of the virtual canvas
+ canvas = (void *)ecore_evas_buffer_pixels_get(info->ee);
+ if (!canvas) {
+ ErrPrint("Failed to get pixel canvas\n");
+ return;
+ }
+
+ ecore_evas_geometry_get(info->ee, &x, &y, &w, &h);
+ evas_data_argb_unpremul(canvas, w * h);
+ }
+
if (info->is_hw) {
livebox_buffer_post_render(info->handle);
} else {