capi-system-system-settings
com-core
shortcut
+ efl-assist
)
SET(PACKAGE "${PROJECT_NAME}")
ADD_DEFINITIONS(${pkg_CFLAGS})
+FOREACH(flag ${pkg_CFLAGS})
+ SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} ${flag}")
+ SET(EXTRA_CXXFLAGS "${EXTRA_CXXFLAGS} ${flag}")
+ENDFOREACH(flag)
+
+SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${EXTRA_CFLAGS} -Wall")
+SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${EXTRA_CXXFLAGS} -Wall")
+
# -fpie
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Winline -Werror -g -fno-builtin-malloc")
#SET(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -pie")
+SET(EXTRA_LDFLAGS "-ldl")
+FOREACH(flag ${pkg_LDFLAGS})
+ IF (flag STREQUAL -L)
+ MESSAGE("Ignore -L")
+ ELSE()
+ SET(EXTRA_LDFLAGS "${EXTRA_LDFLAGS} ${flag}")
+ ENDIF()
+ENDFOREACH(flag)
+SET(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${EXTRA_LDFLAGS}")
+
ADD_EXECUTABLE("${PROJECT_NAME}.loader"
src/main.c
src/so_handler.c
src/client.c
src/critical_log.c
)
-TARGET_LINK_LIBRARIES("${PROJECT_NAME}.loader" ${pkg_LDFLAGS} "-ldl")
+TARGET_LINK_LIBRARIES("${PROJECT_NAME}.loader" ${EXTRA_LDFLAGS})
ADD_EXECUTABLE(${ICON_PROVIDER}
icon_src/main.c
icon_src/script_handler.c
src/util.c
)
-TARGET_LINK_LIBRARIES(${ICON_PROVIDER} ${pkg_LDFLAGS} "-ldl")
+TARGET_LINK_LIBRARIES(${ICON_PROVIDER} ${EXTRA_LDFLAGS})
ADD_EXECUTABLE(${EXE_LOADER}
stub/main.c
)
-TARGET_LINK_LIBRARIES(${EXE_LOADER} ${pkg_LDFLAGS} "-ldl")
+TARGET_LINK_LIBRARIES(${EXE_LOADER} ${EXTRA_LDFLAGS})
#INSTALL(FILES ${CMAKE_SOURCE_DIR}/com.samsung.data-provider-slave.desktop DESTINATION /usr/share/applications)
INSTALL(FILES ${CMAKE_SOURCE_DIR}/com.samsung.data-provider-slave.xml DESTINATION /usr/share/packages)
*/
images {
- image: "icon_shadow.png" COMP;
image: "shortcut_bg_1x1.png" COMP;
}
part {
name: "bg";
- type: IMAGE;
+ type: RECT;
description {
state: "default" 0.0;
rel1 { relative: 23/175 11/175; }
- rel2 { relative: 152/175 140/175; }
- image { normal: "icon_shadow.png"; }
+ rel2 { relative: 160/175 150/175; }
+ color: 0 0 0 0;
align: 0.5 0.5;
aspect: 1.0 1.0;
aspect_preference: BOTH;
name: "icon";
type: SWALLOW;
description {
- rel1 { relative: 6/129 3/129; to, "bg"; }
- rel2 { relative: 123/129 120/129; to, "bg"; }
+ rel1 { relative: 6/137 0/139; to, "bg"; }
+ rel2 { relative: 131/137 130/139; to, "bg"; } // 117x117 125x127
}
}
parts {
part {
name: "bg";
- type: IMAGE;
+ type: RECT;
description {
state: "default" 0.0;
rel1 { relative: 112.5/354 11/175; }
- rel2 { relative: 241.5/354 140/175; }
- image { normal: "icon_shadow.png"; }
+ rel2 { relative: 249.5/354 150/175; }
align: 0.5 0.5;
aspect: 1.0 1.0;
+ color: 0 0 0 0;
aspect_preference: BOTH;
}
}
name: "icon";
type: SWALLOW;
description {
- rel1 { relative: 6/129 3/129; to, "bg"; }
- rel2 { relative: 123/129 120/129; to, "bg"; }
+ rel1 { relative: 6/137 0/139; to, "bg"; }
+ rel2 { relative: 131/137 130/139; to, "bg"; } // 117x117 125x127
}
}
parts {
part {
name: "bg";
- type: IMAGE;
+ type: RECT;
description {
state: "default" 0.0;
rel1 { relative: 112.5/354 100.5/354; }
- rel2 { relative: 241.5/354 229.5/354; }
- image { normal: "icon_shadow.png"; }
+ rel2 { relative: 249.5/354 239.5/354; }
+ color: 0 0 0 0;
align: 0.5 0.5;
aspect: 1.0 1.0;
aspect_preference: BOTH;
name: "icon";
type: SWALLOW;
description {
- rel1 { relative: 6/129 3/129; to, "bg"; }
- rel2 { relative: 123/129 120/129; to, "bg"; }
+ rel1 { relative: 6/137 0/139; to, "bg"; }
+ rel2 { relative: 131/137 130/139; to, "bg"; } // 117x117 125x127
}
}
parts {
part {
name: "bg";
- type: IMAGE;
+ type: RECT;
description {
state: "default" 0.0;
rel1 { relative: 291.5/712 11/175; }
- rel2 { relative: 420.5/712 140/175; }
- image { normal: "icon_shadow.png"; }
+ rel2 { relative: 428.5/712 150/175; }
+ color: 0 0 0 0;
align: 0.5 0.5;
aspect: 1.0 1.0;
aspect_preference: BOTH;
name: "icon";
type: SWALLOW;
description {
- rel1 { relative: 6/129 3/129; to, "bg"; }
- rel2 { relative: 123/129 120/129; to, "bg"; }
+ rel1 { relative: 6/137 0/139; to, "bg"; }
+ rel2 { relative: 131/137 130/139; to, "bg"; } // 117x117 125x127
}
}
parts {
part {
name: "bg";
- type: IMAGE;
+ type: RECT;
description {
state: "default" 0.0;
rel1 { relative: 291.5/712 100.5/354; }
- rel2 { relative: 420.5/712 229.5/354; }
- image { normal: "icon_shadow.png"; }
+ rel2 { relative: 428.5/712 239.5/354; }
+ color: 0 0 0 0;
align: 0.5 0.5;
aspect: 1.0 1.0;
aspect_preference: BOTH;
name: "icon";
type: SWALLOW;
description {
- rel1 { relative: 6/129 3/129; to, "bg"; }
- rel2 { relative: 123/129 120/129; to, "bg"; }
+ rel1 { relative: 6/137 0/139; to, "bg"; }
+ rel2 { relative: 131/137 130/139; to, "bg"; } // 117x117 125x127
}
}
parts {
part {
name: "bg";
- type: IMAGE;
+ type: RECT;
description {
state: "default" 0.0;
rel1 { relative: 291.5/712 190/533; }
- rel2 { relative: 420.5/712 319/533; }
- image { normal: "icon_shadow.png"; }
+ rel2 { relative: 428.5/712 329/533; }
+ color: 0 0 0 0;
align: 0.5 0.5;
aspect: 1.0 1.0;
aspect_preference: BOTH;
name: "icon";
type: SWALLOW;
description {
- rel1 { relative: 6/129 3/129; to, "bg"; }
- rel2 { relative: 123/129 120/129; to, "bg"; }
+ rel1 { relative: 6/137 0/139; to, "bg"; }
+ rel2 { relative: 131/137 130/139; to, "bg"; } // 117x117 125x127
}
}
parts {
part {
name: "bg";
- type: IMAGE;
+ type: RECT;
description {
state: "default" 0.0;
rel1 { relative: 291.5/712 279.5/712; }
- rel2 { relative: 420.5/712 408.5/712; }
- image { normal: "icon_shadow.png"; }
+ rel2 { relative: 428.5/712 418.5/712; }
+ color: 0 0 0 0;
align: 0.5 0.5;
aspect: 1.0 1.0;
aspect_preference: BOTH;
name: "icon";
type: SWALLOW;
description {
- rel1 { relative: 6/129 3/129; to, "bg"; }
- rel2 { relative: 123/129 120/129; to, "bg"; }
+ rel1 { relative: 6/137 0/139; to, "bg"; }
+ rel2 { relative: 131/137 130/139; to, "bg"; } // 117x117 125x127
}
}
parts {
part {
name: "bg";
- type: IMAGE;
+ type: RECT;
description {
state: "default" 0.0;
rel1 { relative: 291.5/712 369/891; }
- rel2 { relative: 420.5/712 498/891; }
- image { normal: "icon_shadow.png"; }
+ rel2 { relative: 428.5/712 508/891; }
+ color: 0 0 0 0;
align: 0.5 0.5;
aspect: 1.0 1.0;
aspect_preference: BOTH;
name: "icon";
type: SWALLOW;
description {
- rel1 { relative: 6/129 3/129; to, "bg"; }
- rel2 { relative: 123/129 120/129; to, "bg"; }
+ rel1 { relative: 6/137 0/139; to, "bg"; }
+ rel2 { relative: 131/137 130/139; to, "bg"; } // 117x117 125x127
}
}
parts {
part {
name: "bg";
- type: IMAGE;
+ type: RECT;
description {
state: "default" 0.0;
rel1 { relative: 291.5/712 458.5/1070; }
- rel2 { relative: 420.5/712 587.5/1070; }
- image { normal: "icon_shadow.png"; }
+ rel2 { relative: 428.5/712 597.5/1070; }
+ color: 0 0 0 0;
align: 0.5 0.5;
aspect: 1.0 1.0;
aspect_preference: BOTH;
name: "icon";
type: SWALLOW;
description {
- rel1 { relative: 6/129 3/129; to, "bg"; }
- rel2 { relative: 123/129 120/129; to, "bg"; }
+ rel1 { relative: 6/137 0/139; to, "bg"; }
+ rel2 { relative: 131/137 130/139; to, "bg"; } // 117x117 125x127
}
}
#include <Eina.h>
#include <Edje.h>
#include <Ecore.h>
+#include <efl_assist.h>
#include <dlog.h>
#include <livebox-errno.h>
#define INFO_CATEGORY "category"
#define ADDEND 256
+#if defined(TIZEN_ENGINEER_MODE)
+#define ENGINEER_MODE_ENABLED 1
+#else
+#define ENGINEER_MODE_ENABLED 0
+#endif
+
struct block {
char *type;
int type_len;
FILL_OVER_SIZE,
} fill;
+ struct shadow {
+ int enabled;
+ int angle;
+ int offset;
+ int softness;
+ int color;
+ } shadow;
+
int width;
int height;
};
free(buf);
}
+static void parse_shadow(struct image_option *img_opt, const char *value, int len)
+{
+ int angle;
+ int offset;
+ int softness;
+ int color;
+
+ if (sscanf(value, "%d,%d,%d,%d", &angle, &offset, &softness, &color) != 4) {
+ ErrPrint("Invalid shadow [%s]\n", value);
+ } else {
+ img_opt->shadow.enabled = 1;
+ img_opt->shadow.angle = angle;
+ img_opt->shadow.offset = offset;
+ img_opt->shadow.softness = softness;
+ img_opt->shadow.color = color;
+ }
+}
+
static void parse_fill(struct image_option *img_opt, const char *value, int len)
{
while (len > 0 && *value == ' ') {
.cmd = "size",
.handler = parse_size,
},
+ {
+ .cmd = "shadow",
+ .handler = parse_shadow,
+ },
};
enum {
STATE_START,
.fill = FILL_DISABLE,
.width = -1,
.height = -1,
+ .shadow = {
+ .enabled = 0,
+ },
};
if (block->id) {
evas_object_size_hint_weight_set(img, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
}
+ if (img_opt.shadow.enabled) {
+ ea_effect_h *ea_effect;
+
+ ea_effect = ea_image_effect_create();
+ if (ea_effect) {
+ // -90, 2, 4, 0x99000000
+ ea_image_effect_add_outer_shadow(ea_effect, img_opt.shadow.angle, img_opt.shadow.offset, img_opt.shadow.softness, img_opt.shadow.color);
+ ea_object_image_effect_set(img, ea_effect);
+
+ if (ENGINEER_MODE_ENABLED) {
+ int x, y, w, h;
+ ea_image_effect_offset_get(ea_effect, &x, &y);
+ evas_object_image_size_get(img, &w, &h);
+ DbgPrint("Effect applied (%dx%d) - (%dx%d), (%d,%d,%d,%d)\n", x, y, w, h, img_opt.shadow.angle, img_opt.shadow.offset, img_opt.shadow.softness, img_opt.shadow.color);
+ }
+
+ ea_image_effect_destroy(ea_effect);
+ }
+ }
+
/*!
* \note
* object will be shown by below statement automatically