forked from enlightenment/efl
parent
66a02d654c
commit
e2be9d2b24
|
@ -20,4 +20,3 @@ installed_headers_DATA = elementary_config.h
|
||||||
doc:
|
doc:
|
||||||
@echo "entering doc/"
|
@echo "entering doc/"
|
||||||
$(MAKE) -C doc doc
|
$(MAKE) -C doc doc
|
||||||
|
|
||||||
|
|
|
@ -83,15 +83,15 @@ dnl managed by evil
|
||||||
ELM_UNIX_DEF="#define"
|
ELM_UNIX_DEF="#define"
|
||||||
AC_CHECK_FUNCS(dlopen, res=yes, res=no)
|
AC_CHECK_FUNCS(dlopen, res=yes, res=no)
|
||||||
if test "x$res" = "xyes"; then
|
if test "x$res" = "xyes"; then
|
||||||
AC_CHECK_FUNCS(dladdr, AC_DEFINE(HAVE_DLADDR))
|
AC_CHECK_FUNCS(dladdr, AC_DEFINE(HAVE_DLADDR))
|
||||||
else
|
else
|
||||||
AC_CHECK_LIB(dl, dlopen, res=yes, res=no)
|
AC_CHECK_LIB(dl, dlopen, res=yes, res=no)
|
||||||
if test "x$res" = "xyes"; then
|
if test "x$res" = "xyes"; then
|
||||||
AC_CHECK_LIB(dl, dladdr, AC_DEFINE(HAVE_DLADDR))
|
AC_CHECK_LIB(dl, dladdr, AC_DEFINE(HAVE_DLADDR))
|
||||||
dlopen_libs=-ldl
|
dlopen_libs=-ldl
|
||||||
else
|
else
|
||||||
AC_MSG_ERROR(Cannot find dlopen)
|
AC_MSG_ERROR(Cannot find dlopen)
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
have_socket="yes"
|
have_socket="yes"
|
||||||
;;
|
;;
|
||||||
|
|
|
@ -66,8 +66,8 @@ crash_handler(int x, siginfo_t *info, void *data)
|
||||||
t = ecore_time_get();
|
t = ecore_time_get();
|
||||||
if ((t - restart_time) <= 2.0)
|
if ((t - restart_time) <= 2.0)
|
||||||
{
|
{
|
||||||
EINA_ERROR_PERR("elementary_quicklaunch: crash too fast - less than 2 seconds. abort restart\n");
|
EINA_ERROR_PERR("elementary_quicklaunch: crash too fast - less than 2 seconds. abort restart\n");
|
||||||
exit(-1);
|
exit(-1);
|
||||||
}
|
}
|
||||||
ecore_app_restart();
|
ecore_app_restart();
|
||||||
}
|
}
|
||||||
|
@ -84,8 +84,8 @@ handle_run(int fd, unsigned long bytes)
|
||||||
buf = alloca(bytes);
|
buf = alloca(bytes);
|
||||||
if ((num = read(fd, buf, bytes)) < 0)
|
if ((num = read(fd, buf, bytes)) < 0)
|
||||||
{
|
{
|
||||||
close(fd);
|
close(fd);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
close(fd);
|
close(fd);
|
||||||
argc = ((unsigned long *)(buf))[0];
|
argc = ((unsigned long *)(buf))[0];
|
||||||
|
@ -109,8 +109,8 @@ main(int argc, char **argv)
|
||||||
|
|
||||||
if (!getenv("DISPLAY"))
|
if (!getenv("DISPLAY"))
|
||||||
{
|
{
|
||||||
EINA_ERROR_PERR("elementary_quicklaunch: DISPLAY env var not set\n");
|
EINA_ERROR_PERR("elementary_quicklaunch: DISPLAY env var not set\n");
|
||||||
exit(-1);
|
exit(-1);
|
||||||
}
|
}
|
||||||
snprintf(buf, sizeof(buf), "/tmp/elm-ql-%i", getuid());
|
snprintf(buf, sizeof(buf), "/tmp/elm-ql-%i", getuid());
|
||||||
if (stat(buf, &st) < 0) mkdir(buf, S_IRUSR | S_IWUSR | S_IXUSR);
|
if (stat(buf, &st) < 0) mkdir(buf, S_IRUSR | S_IWUSR | S_IXUSR);
|
||||||
|
@ -119,37 +119,37 @@ main(int argc, char **argv)
|
||||||
sock = socket(AF_UNIX, SOCK_STREAM, 0);
|
sock = socket(AF_UNIX, SOCK_STREAM, 0);
|
||||||
if (sock < 0)
|
if (sock < 0)
|
||||||
{
|
{
|
||||||
perror("elementary_quicklaunch: socket(AF_UNIX, SOCK_STREAM, 0)");
|
perror("elementary_quicklaunch: socket(AF_UNIX, SOCK_STREAM, 0)");
|
||||||
EINA_ERROR_PERR("elementary_quicklaunch: cannot create socket for socket for '%s'\n", buf);
|
EINA_ERROR_PERR("elementary_quicklaunch: cannot create socket for socket for '%s'\n", buf);
|
||||||
exit(-1);
|
exit(-1);
|
||||||
}
|
}
|
||||||
if (fcntl(sock, F_SETFD, FD_CLOEXEC) < 0)
|
if (fcntl(sock, F_SETFD, FD_CLOEXEC) < 0)
|
||||||
{
|
{
|
||||||
perror("elementary_quicklaunch: fcntl(sock, F_SETFD, FD_CLOEXEC)");
|
perror("elementary_quicklaunch: fcntl(sock, F_SETFD, FD_CLOEXEC)");
|
||||||
EINA_ERROR_PERR("elementary_quicklaunch: cannot set close on exec socket for '%s'\n", buf);
|
EINA_ERROR_PERR("elementary_quicklaunch: cannot set close on exec socket for '%s'\n", buf);
|
||||||
exit(-1);
|
exit(-1);
|
||||||
}
|
}
|
||||||
lin.l_onoff = 1;
|
lin.l_onoff = 1;
|
||||||
lin.l_linger = 0;
|
lin.l_linger = 0;
|
||||||
if (setsockopt(sock, SOL_SOCKET, SO_LINGER, &lin, sizeof(struct linger)) < 0)
|
if (setsockopt(sock, SOL_SOCKET, SO_LINGER, &lin, sizeof(struct linger)) < 0)
|
||||||
{
|
{
|
||||||
perror("elementary_quicklaunch: setsockopt(sock, SOL_SOCKET, SO_LINGER, &lin, sizeof(struct linger)) ");
|
perror("elementary_quicklaunch: setsockopt(sock, SOL_SOCKET, SO_LINGER, &lin, sizeof(struct linger)) ");
|
||||||
EINA_ERROR_PERR("elementary_quicklaunch: cannot set linger for socket for '%s'\n", buf);
|
EINA_ERROR_PERR("elementary_quicklaunch: cannot set linger for socket for '%s'\n", buf);
|
||||||
exit(-1);
|
exit(-1);
|
||||||
}
|
}
|
||||||
socket_unix.sun_family = AF_UNIX;
|
socket_unix.sun_family = AF_UNIX;
|
||||||
strncpy(socket_unix.sun_path, buf, sizeof(socket_unix.sun_path));
|
strncpy(socket_unix.sun_path, buf, sizeof(socket_unix.sun_path));
|
||||||
socket_unix_len = LENGTH_OF_SOCKADDR_UN(&socket_unix);
|
socket_unix_len = LENGTH_OF_SOCKADDR_UN(&socket_unix);
|
||||||
if (bind(sock, (struct sockaddr *)&socket_unix, socket_unix_len) < 0)
|
if (bind(sock, (struct sockaddr *)&socket_unix, socket_unix_len) < 0)
|
||||||
{
|
{
|
||||||
perror("elementary_quicklaunch: bind(sock, (struct sockaddr *)&socket_unix, socket_unix_len)");
|
perror("elementary_quicklaunch: bind(sock, (struct sockaddr *)&socket_unix, socket_unix_len)");
|
||||||
EINA_ERROR_PERR("elementary_quicklaunch: cannot bind socket for '%s'\n", buf);
|
EINA_ERROR_PERR("elementary_quicklaunch: cannot bind socket for '%s'\n", buf);
|
||||||
exit(-1);
|
exit(-1);
|
||||||
}
|
}
|
||||||
if (listen(sock, 4096) < 0)
|
if (listen(sock, 4096) < 0)
|
||||||
{
|
{
|
||||||
perror("elementary_quicklaunch: listen(sock, 4096)");
|
perror("elementary_quicklaunch: listen(sock, 4096)");
|
||||||
exit(-1);
|
exit(-1);
|
||||||
}
|
}
|
||||||
elm_quicklaunch_init(argc, argv);
|
elm_quicklaunch_init(argc, argv);
|
||||||
restart_time = ecore_time_get();
|
restart_time = ecore_time_get();
|
||||||
|
@ -235,28 +235,28 @@ main(int argc, char **argv)
|
||||||
|
|
||||||
for (;;)
|
for (;;)
|
||||||
{
|
{
|
||||||
int fd;
|
int fd;
|
||||||
struct sockaddr_un client;
|
struct sockaddr_un client;
|
||||||
socklen_t len;
|
socklen_t len;
|
||||||
|
|
||||||
elm_quicklaunch_sub_init(argc, argv);
|
elm_quicklaunch_sub_init(argc, argv);
|
||||||
elm_quicklaunch_seed();
|
elm_quicklaunch_seed();
|
||||||
len = sizeof(struct sockaddr_un);
|
len = sizeof(struct sockaddr_un);
|
||||||
fd = accept(sock, (struct sockaddr *)&client, &len);
|
fd = accept(sock, (struct sockaddr *)&client, &len);
|
||||||
if (fd >= 0)
|
if (fd >= 0)
|
||||||
{
|
{
|
||||||
int bytes;
|
int bytes;
|
||||||
char line[4096];
|
char line[4096];
|
||||||
int num;
|
int num;
|
||||||
|
|
||||||
num = read(fd, &bytes, sizeof(unsigned long));
|
num = read(fd, &bytes, sizeof(unsigned long));
|
||||||
if (num == sizeof(unsigned long))
|
if (num == sizeof(unsigned long))
|
||||||
{
|
{
|
||||||
ecore_app_args_set(argc, (const char **)argv);
|
ecore_app_args_set(argc, (const char **)argv);
|
||||||
handle_run(fd, bytes);
|
handle_run(fd, bytes);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
elm_quicklaunch_sub_shutdown();
|
elm_quicklaunch_sub_shutdown();
|
||||||
}
|
}
|
||||||
elm_quicklaunch_shutdown();
|
elm_quicklaunch_shutdown();
|
||||||
return 0;
|
return 0;
|
||||||
|
|
|
@ -34,112 +34,112 @@ main(int argc, char **argv)
|
||||||
|
|
||||||
if (!getcwd(buf, sizeof(buf) - 1))
|
if (!getcwd(buf, sizeof(buf) - 1))
|
||||||
{
|
{
|
||||||
fprintf(stderr, "elementary_quicklaunch: currect working dir too big.\n");
|
fprintf(stderr, "elementary_quicklaunch: currect working dir too big.\n");
|
||||||
exit(-1);
|
exit(-1);
|
||||||
}
|
}
|
||||||
cwd = strdup(buf);
|
cwd = strdup(buf);
|
||||||
if (!(disp = getenv("DISPLAY")))
|
if (!(disp = getenv("DISPLAY")))
|
||||||
{
|
{
|
||||||
fprintf(stderr, "elementary_quicklaunch: DISPLAY env var not set\n");
|
fprintf(stderr, "elementary_quicklaunch: DISPLAY env var not set\n");
|
||||||
exit(-1);
|
exit(-1);
|
||||||
}
|
}
|
||||||
snprintf(buf, sizeof(buf), "/tmp/elm-ql-%i/%s", getuid(), disp);
|
snprintf(buf, sizeof(buf), "/tmp/elm-ql-%i/%s", getuid(), disp);
|
||||||
if ((sock = socket(AF_UNIX, SOCK_STREAM, 0)) < 0)
|
if ((sock = socket(AF_UNIX, SOCK_STREAM, 0)) < 0)
|
||||||
{
|
{
|
||||||
perror("elementary_quicklaunch: socket(AF_UNIX, SOCK_STREAM, 0)");
|
perror("elementary_quicklaunch: socket(AF_UNIX, SOCK_STREAM, 0)");
|
||||||
exit(-1);
|
exit(-1);
|
||||||
}
|
}
|
||||||
socket_unix.sun_family = AF_UNIX;
|
socket_unix.sun_family = AF_UNIX;
|
||||||
strncpy(socket_unix.sun_path, buf, sizeof(socket_unix.sun_path));
|
strncpy(socket_unix.sun_path, buf, sizeof(socket_unix.sun_path));
|
||||||
socket_unix_len = LENGTH_OF_SOCKADDR_UN(&socket_unix);
|
socket_unix_len = LENGTH_OF_SOCKADDR_UN(&socket_unix);
|
||||||
if (connect(sock, (struct sockaddr *)&socket_unix, socket_unix_len) < 0)
|
if (connect(sock, (struct sockaddr *)&socket_unix, socket_unix_len) < 0)
|
||||||
{
|
{
|
||||||
perror("elementary_quicklaunch: connect(sock, (struct sockaddr *)&socket_unix, socket_unix_len)");
|
perror("elementary_quicklaunch: connect(sock, (struct sockaddr *)&socket_unix, socket_unix_len)");
|
||||||
printf("elementary_quicklaunch: cannot connect to socket '%s'\n", buf);
|
printf("elementary_quicklaunch: cannot connect to socket '%s'\n", buf);
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
exe = argv[0];
|
exe = argv[0];
|
||||||
if (!(((exe[0] == '/')) ||
|
if (!(((exe[0] == '/')) ||
|
||||||
((exe[0] == '.') && (exe[1] == '/')) ||
|
((exe[0] == '.') && (exe[1] == '/')) ||
|
||||||
((exe[0] == '.') && (exe[1] == '.') && (exe[2] == '/'))))
|
((exe[0] == '.') && (exe[1] == '.') && (exe[2] == '/'))))
|
||||||
{
|
{
|
||||||
char *path = getenv("PATH");
|
char *path = getenv("PATH");
|
||||||
int exelen = strlen(argv[0]);
|
int exelen = strlen(argv[0]);
|
||||||
if (path)
|
if (path)
|
||||||
{
|
{
|
||||||
const char *p, *pp, *s;
|
const char *p, *pp, *s;
|
||||||
int exelen;
|
int exelen;
|
||||||
|
|
||||||
p = path;
|
p = path;
|
||||||
pp = p;
|
pp = p;
|
||||||
exe = NULL;
|
exe = NULL;
|
||||||
for (;;)
|
for (;;)
|
||||||
{
|
{
|
||||||
if ((*p == ':') || (*p == 0))
|
if ((*p == ':') || (*p == 0))
|
||||||
{
|
{
|
||||||
int len;
|
int len;
|
||||||
|
|
||||||
len = p - pp;
|
len = p - pp;
|
||||||
if (len < (sizeof(buf) - exelen - 3))
|
if (len < (sizeof(buf) - exelen - 3))
|
||||||
{
|
{
|
||||||
strncpy(buf, pp, len);
|
strncpy(buf, pp, len);
|
||||||
strcpy(buf + len, "/");
|
strcpy(buf + len, "/");
|
||||||
strcpy(buf + len + 1, argv[0]);
|
strcpy(buf + len + 1, argv[0]);
|
||||||
if (access(buf, R_OK | X_OK) == 0)
|
if (access(buf, R_OK | X_OK) == 0)
|
||||||
{
|
{
|
||||||
exe = buf;
|
exe = buf;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
if (*p == 0) break;
|
if (*p == 0) break;
|
||||||
p++;
|
p++;
|
||||||
pp = p;
|
pp = p;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (*p == 0) break;
|
if (*p == 0) break;
|
||||||
p++;
|
p++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (exe)
|
if (exe)
|
||||||
{
|
{
|
||||||
if (lstat(exe, &st) == 0)
|
if (lstat(exe, &st) == 0)
|
||||||
{
|
{
|
||||||
if (S_ISLNK(st.st_mode))
|
if (S_ISLNK(st.st_mode))
|
||||||
{
|
{
|
||||||
char buf2[PATH_MAX];
|
char buf2[PATH_MAX];
|
||||||
|
|
||||||
ssize_t len = readlink(exe, buf2, sizeof(buf2) - 1);
|
ssize_t len = readlink(exe, buf2, sizeof(buf2) - 1);
|
||||||
if (len >= 0)
|
if (len >= 0)
|
||||||
{
|
{
|
||||||
char *p;
|
char *p;
|
||||||
buf2[len] = 0;
|
buf2[len] = 0;
|
||||||
p = strrchr(buf2, '/');
|
p = strrchr(buf2, '/');
|
||||||
if (p) p++;
|
if (p) p++;
|
||||||
else p = buf2;
|
else p = buf2;
|
||||||
if (!strncasecmp(p, "elementary_run", 14))
|
if (!strncasecmp(p, "elementary_run", 14))
|
||||||
we_are_elementary_run = 1;
|
we_are_elementary_run = 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (we_are_elementary_run)
|
if (we_are_elementary_run)
|
||||||
{
|
{
|
||||||
sargc = argc;
|
sargc = argc;
|
||||||
sargv = argv;
|
sargv = argv;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
sargc = argc - 1;
|
sargc = argc - 1;
|
||||||
sargv = &(argv[1]);
|
sargv = &(argv[1]);
|
||||||
}
|
}
|
||||||
slen = sizeof(unsigned long) + sizeof(unsigned long);
|
slen = sizeof(unsigned long) + sizeof(unsigned long);
|
||||||
for (i = 0; i < sargc; i++)
|
for (i = 0; i < sargc; i++)
|
||||||
{
|
{
|
||||||
slen += sizeof(unsigned long);
|
slen += sizeof(unsigned long);
|
||||||
slen += strlen(sargv[i]) + 1;
|
slen += strlen(sargv[i]) + 1;
|
||||||
}
|
}
|
||||||
slen += strlen(cwd) + 1;
|
slen += strlen(cwd) + 1;
|
||||||
sbuf = alloca(slen);
|
sbuf = alloca(slen);
|
||||||
|
@ -148,10 +148,10 @@ main(int argc, char **argv)
|
||||||
pos = (unsigned char *)(&((((unsigned long *)(sbuf))[2 + sargc])));
|
pos = (unsigned char *)(&((((unsigned long *)(sbuf))[2 + sargc])));
|
||||||
for (i = 0; i < sargc; i++)
|
for (i = 0; i < sargc; i++)
|
||||||
{
|
{
|
||||||
((unsigned long *)(sbuf))[2 + i] =
|
((unsigned long *)(sbuf))[2 + i] =
|
||||||
(unsigned long)pos - ((unsigned long)sbuf + sizeof(unsigned long));
|
(unsigned long)pos - ((unsigned long)sbuf + sizeof(unsigned long));
|
||||||
strcpy(pos, sargv[i]);
|
strcpy(pos, sargv[i]);
|
||||||
pos += strlen(sargv[i]) + 1;
|
pos += strlen(sargv[i]) + 1;
|
||||||
}
|
}
|
||||||
strcpy(pos, cwd);
|
strcpy(pos, cwd);
|
||||||
write(sock, sbuf, slen);
|
write(sock, sbuf, slen);
|
||||||
|
|
|
@ -1871,11 +1871,11 @@ my_bt_24(void *data, Evas_Object *obj, void *event_info)
|
||||||
|
|
||||||
lb = elm_label_add(win);
|
lb = elm_label_add(win);
|
||||||
elm_label_label_set(lb,
|
elm_label_label_set(lb,
|
||||||
"This is an \"inwin\" - a window in a<br>"
|
"This is an \"inwin\" - a window in a<br>"
|
||||||
"window. This is handy for quick popups<br>"
|
"window. This is handy for quick popups<br>"
|
||||||
"you want centered, taking over the window<br>"
|
"you want centered, taking over the window<br>"
|
||||||
"until dismissed somehow. Unlike hovers they<br>"
|
"until dismissed somehow. Unlike hovers they<br>"
|
||||||
"don't hover over their target.");
|
"don't hover over their target.");
|
||||||
elm_win_inwin_content_set(inwin, lb);
|
elm_win_inwin_content_set(inwin, lb);
|
||||||
evas_object_show(lb);
|
evas_object_show(lb);
|
||||||
|
|
||||||
|
@ -1904,14 +1904,14 @@ my_bt_25(void *data, Evas_Object *obj, void *event_info)
|
||||||
|
|
||||||
lb = elm_label_add(win);
|
lb = elm_label_add(win);
|
||||||
elm_label_label_set(lb,
|
elm_label_label_set(lb,
|
||||||
"This is an \"inwin\" - a window in a<br>"
|
"This is an \"inwin\" - a window in a<br>"
|
||||||
"window. This is handy for quick popups<br>"
|
"window. This is handy for quick popups<br>"
|
||||||
"you want centered, taking over the window<br>"
|
"you want centered, taking over the window<br>"
|
||||||
"until dismissed somehow. Unlike hovers they<br>"
|
"until dismissed somehow. Unlike hovers they<br>"
|
||||||
"don't hover over their target.<br>"
|
"don't hover over their target.<br>"
|
||||||
"<br>"
|
"<br>"
|
||||||
"This inwin style compacts itself vertically<br>"
|
"This inwin style compacts itself vertically<br>"
|
||||||
"to the size of its contents minimum size.");
|
"to the size of its contents minimum size.");
|
||||||
elm_win_inwin_content_set(inwin, lb);
|
elm_win_inwin_content_set(inwin, lb);
|
||||||
evas_object_show(lb);
|
evas_object_show(lb);
|
||||||
|
|
||||||
|
@ -2004,9 +2004,9 @@ my_bt_27(void *data, Evas_Object *obj, void *event_info)
|
||||||
elm_frame_label_set(fr, "Scale: 0.5");
|
elm_frame_label_set(fr, "Scale: 0.5");
|
||||||
lb = elm_label_add(win);
|
lb = elm_label_add(win);
|
||||||
elm_label_label_set(lb,
|
elm_label_label_set(lb,
|
||||||
"Parent frame scale<br>"
|
"Parent frame scale<br>"
|
||||||
"is 0.5. Child should<br>"
|
"is 0.5. Child should<br>"
|
||||||
"inherit it.");
|
"inherit it.");
|
||||||
elm_frame_content_set(fr, lb);
|
elm_frame_content_set(fr, lb);
|
||||||
evas_object_show(lb);
|
evas_object_show(lb);
|
||||||
elm_box_pack_end(bx, fr);
|
elm_box_pack_end(bx, fr);
|
||||||
|
@ -2016,9 +2016,9 @@ my_bt_27(void *data, Evas_Object *obj, void *event_info)
|
||||||
elm_frame_label_set(fr, "Scale: 1.0");
|
elm_frame_label_set(fr, "Scale: 1.0");
|
||||||
lb = elm_label_add(win);
|
lb = elm_label_add(win);
|
||||||
elm_label_label_set(lb,
|
elm_label_label_set(lb,
|
||||||
"Parent frame scale<br>"
|
"Parent frame scale<br>"
|
||||||
"is 1.0. Child should<br>"
|
"is 1.0. Child should<br>"
|
||||||
"inherit it.");
|
"inherit it.");
|
||||||
elm_frame_content_set(fr, lb);
|
elm_frame_content_set(fr, lb);
|
||||||
evas_object_show(lb);
|
evas_object_show(lb);
|
||||||
elm_object_scale_set(fr, 1.0);
|
elm_object_scale_set(fr, 1.0);
|
||||||
|
@ -2029,9 +2029,9 @@ my_bt_27(void *data, Evas_Object *obj, void *event_info)
|
||||||
elm_frame_label_set(fr, "Scale: 2.0");
|
elm_frame_label_set(fr, "Scale: 2.0");
|
||||||
lb = elm_label_add(win);
|
lb = elm_label_add(win);
|
||||||
elm_label_label_set(lb,
|
elm_label_label_set(lb,
|
||||||
"Parent frame scale<br>"
|
"Parent frame scale<br>"
|
||||||
"is 2.0. Child should<br>"
|
"is 2.0. Child should<br>"
|
||||||
"inherit it.");
|
"inherit it.");
|
||||||
elm_frame_content_set(fr, lb);
|
elm_frame_content_set(fr, lb);
|
||||||
evas_object_show(lb);
|
evas_object_show(lb);
|
||||||
elm_object_scale_set(fr, 2.0);
|
elm_object_scale_set(fr, 2.0);
|
||||||
|
@ -2189,12 +2189,12 @@ my_bt_29(void *data, Evas_Object *obj, void *event_info)
|
||||||
|
|
||||||
for (i = 0; i < 2000; i++)
|
for (i = 0; i < 2000; i++)
|
||||||
{
|
{
|
||||||
gli = elm_genlist_item_append(gl, &itc1,
|
gli = elm_genlist_item_append(gl, &itc1,
|
||||||
(void *)i/* item data */,
|
(void *)i/* item data */,
|
||||||
NULL/* parent */,
|
NULL/* parent */,
|
||||||
ELM_GENLIST_ITEM_NONE,
|
ELM_GENLIST_ITEM_NONE,
|
||||||
gl_sel/* func */,
|
gl_sel/* func */,
|
||||||
(void *)(i * 10)/* func data */);
|
(void *)(i * 10)/* func data */);
|
||||||
}
|
}
|
||||||
evas_object_resize(win, 480, 800);
|
evas_object_resize(win, 480, 800);
|
||||||
evas_object_show(win);
|
evas_object_show(win);
|
||||||
|
@ -2221,11 +2221,11 @@ my_gl_add(void *data, Evas_Object *obj, void *event_info)
|
||||||
itc1.func.del = gl_del;
|
itc1.func.del = gl_del;
|
||||||
|
|
||||||
gli = elm_genlist_item_append(gl, &itc1,
|
gli = elm_genlist_item_append(gl, &itc1,
|
||||||
(void *)i/* item data */,
|
(void *)i/* item data */,
|
||||||
NULL/* parent */,
|
NULL/* parent */,
|
||||||
ELM_GENLIST_ITEM_NONE,
|
ELM_GENLIST_ITEM_NONE,
|
||||||
gl_sel/* func */,
|
gl_sel/* func */,
|
||||||
(void *)(i * 10)/* func data */);
|
(void *)(i * 10)/* func data */);
|
||||||
i++;
|
i++;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2236,8 +2236,8 @@ my_gl_del(void *data, Evas_Object *obj, void *event_info)
|
||||||
Elm_Genlist_Item *gli = elm_genlist_selected_item_get(gl);
|
Elm_Genlist_Item *gli = elm_genlist_selected_item_get(gl);
|
||||||
if (!gli)
|
if (!gli)
|
||||||
{
|
{
|
||||||
printf("no item selected\n");
|
printf("no item selected\n");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
elm_genlist_item_del(gli);
|
elm_genlist_item_del(gli);
|
||||||
}
|
}
|
||||||
|
@ -2249,8 +2249,8 @@ my_gl_disable(void *data, Evas_Object *obj, void *event_info)
|
||||||
Elm_Genlist_Item *gli = elm_genlist_selected_item_get(gl);
|
Elm_Genlist_Item *gli = elm_genlist_selected_item_get(gl);
|
||||||
if (!gli)
|
if (!gli)
|
||||||
{
|
{
|
||||||
printf("no item selected\n");
|
printf("no item selected\n");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
elm_genlist_item_disabled_set(gli, 1);
|
elm_genlist_item_disabled_set(gli, 1);
|
||||||
elm_genlist_item_selected_set(gli, 0);
|
elm_genlist_item_selected_set(gli, 0);
|
||||||
|
@ -2265,10 +2265,10 @@ my_gl_update_all(void *data, Evas_Object *obj, void *event_info)
|
||||||
Elm_Genlist_Item *it = elm_genlist_first_item_get(gl);
|
Elm_Genlist_Item *it = elm_genlist_first_item_get(gl);
|
||||||
while (it)
|
while (it)
|
||||||
{
|
{
|
||||||
elm_genlist_item_update(it);
|
elm_genlist_item_update(it);
|
||||||
printf("%i\n", i);
|
printf("%i\n", i);
|
||||||
i++;
|
i++;
|
||||||
it = elm_genlist_item_next_get(it);
|
it = elm_genlist_item_next_get(it);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2328,26 +2328,26 @@ my_bt_30(void *data, Evas_Object *obj, void *event_info)
|
||||||
itc1.func.del = gl_del;
|
itc1.func.del = gl_del;
|
||||||
|
|
||||||
gli[0] = elm_genlist_item_append(gl, &itc1,
|
gli[0] = elm_genlist_item_append(gl, &itc1,
|
||||||
(void *)1001/* item data */, NULL/* parent */, ELM_GENLIST_ITEM_NONE, gl_sel/* func */,
|
(void *)1001/* item data */, NULL/* parent */, ELM_GENLIST_ITEM_NONE, gl_sel/* func */,
|
||||||
(void *)1001/* func data */);
|
(void *)1001/* func data */);
|
||||||
gli[1] = elm_genlist_item_append(gl, &itc1,
|
gli[1] = elm_genlist_item_append(gl, &itc1,
|
||||||
(void *)1002/* item data */, NULL/* parent */, ELM_GENLIST_ITEM_NONE, gl_sel/* func */,
|
(void *)1002/* item data */, NULL/* parent */, ELM_GENLIST_ITEM_NONE, gl_sel/* func */,
|
||||||
(void *)1002/* func data */);
|
(void *)1002/* func data */);
|
||||||
gli[2] = elm_genlist_item_append(gl, &itc1,
|
gli[2] = elm_genlist_item_append(gl, &itc1,
|
||||||
(void *)1003/* item data */, NULL/* parent */, ELM_GENLIST_ITEM_NONE, gl_sel/* func */,
|
(void *)1003/* item data */, NULL/* parent */, ELM_GENLIST_ITEM_NONE, gl_sel/* func */,
|
||||||
(void *)1003/* func data */);
|
(void *)1003/* func data */);
|
||||||
gli[3] = elm_genlist_item_prepend(gl, &itc1,
|
gli[3] = elm_genlist_item_prepend(gl, &itc1,
|
||||||
(void *)1004/* item data */, NULL/* parent */, ELM_GENLIST_ITEM_NONE, gl_sel/* func */,
|
(void *)1004/* item data */, NULL/* parent */, ELM_GENLIST_ITEM_NONE, gl_sel/* func */,
|
||||||
(void *)1004/* func data */);
|
(void *)1004/* func data */);
|
||||||
gli[4] = elm_genlist_item_prepend(gl, &itc1,
|
gli[4] = elm_genlist_item_prepend(gl, &itc1,
|
||||||
(void *)1005/* item data */, NULL/* parent */, ELM_GENLIST_ITEM_NONE, gl_sel/* func */,
|
(void *)1005/* item data */, NULL/* parent */, ELM_GENLIST_ITEM_NONE, gl_sel/* func */,
|
||||||
(void *)1005/* func data */);
|
(void *)1005/* func data */);
|
||||||
gli[5] = elm_genlist_item_insert_before(gl, &itc1,
|
gli[5] = elm_genlist_item_insert_before(gl, &itc1,
|
||||||
(void *)1006/* item data */, gli[2]/* rel */, ELM_GENLIST_ITEM_NONE, gl_sel/* func */,
|
(void *)1006/* item data */, gli[2]/* rel */, ELM_GENLIST_ITEM_NONE, gl_sel/* func */,
|
||||||
(void *)1006/* func data */);
|
(void *)1006/* func data */);
|
||||||
gli[6] = elm_genlist_item_insert_after(gl, &itc1,
|
gli[6] = elm_genlist_item_insert_after(gl, &itc1,
|
||||||
(void *)1007/* item data */, gli[2]/* rel */, ELM_GENLIST_ITEM_NONE, gl_sel/* func */,
|
(void *)1007/* item data */, gli[2]/* rel */, ELM_GENLIST_ITEM_NONE, gl_sel/* func */,
|
||||||
(void *)1007/* func data */);
|
(void *)1007/* func data */);
|
||||||
|
|
||||||
elm_box_pack_end(bx, gl);
|
elm_box_pack_end(bx, gl);
|
||||||
|
|
||||||
|
@ -2450,27 +2450,27 @@ Evas_Object *gl2_icon_get(const void *data, Evas_Object *obj, const char *part)
|
||||||
Evas_Object *ic = elm_icon_add(obj);
|
Evas_Object *ic = elm_icon_add(obj);
|
||||||
if (!strcmp(part, "elm.swallow.icon"))
|
if (!strcmp(part, "elm.swallow.icon"))
|
||||||
{
|
{
|
||||||
if ((tit->mode & 0x3) == 0)
|
if ((tit->mode & 0x3) == 0)
|
||||||
snprintf(buf, sizeof(buf), "%s/images/logo_small.png", PACKAGE_DATA_DIR);
|
snprintf(buf, sizeof(buf), "%s/images/logo_small.png", PACKAGE_DATA_DIR);
|
||||||
else if ((tit->mode & 0x3) == 1)
|
else if ((tit->mode & 0x3) == 1)
|
||||||
snprintf(buf, sizeof(buf), "%s/images/logo.png", PACKAGE_DATA_DIR);
|
snprintf(buf, sizeof(buf), "%s/images/logo.png", PACKAGE_DATA_DIR);
|
||||||
else if ((tit->mode & 0x3) == 2)
|
else if ((tit->mode & 0x3) == 2)
|
||||||
snprintf(buf, sizeof(buf), "%s/images/panel_01.jpg", PACKAGE_DATA_DIR);
|
snprintf(buf, sizeof(buf), "%s/images/panel_01.jpg", PACKAGE_DATA_DIR);
|
||||||
else if ((tit->mode & 0x3) == 3)
|
else if ((tit->mode & 0x3) == 3)
|
||||||
snprintf(buf, sizeof(buf), "%s/images/rock_01.jpg", PACKAGE_DATA_DIR);
|
snprintf(buf, sizeof(buf), "%s/images/rock_01.jpg", PACKAGE_DATA_DIR);
|
||||||
elm_icon_file_set(ic, buf, NULL);
|
elm_icon_file_set(ic, buf, NULL);
|
||||||
}
|
}
|
||||||
else if (!strcmp(part, "elm.swallow.end"))
|
else if (!strcmp(part, "elm.swallow.end"))
|
||||||
{
|
{
|
||||||
if ((tit->mode & 0x3) == 0)
|
if ((tit->mode & 0x3) == 0)
|
||||||
snprintf(buf, sizeof(buf), "%s/images/sky_01.jpg", PACKAGE_DATA_DIR);
|
snprintf(buf, sizeof(buf), "%s/images/sky_01.jpg", PACKAGE_DATA_DIR);
|
||||||
else if ((tit->mode & 0x3) == 1)
|
else if ((tit->mode & 0x3) == 1)
|
||||||
snprintf(buf, sizeof(buf), "%s/images/sky_02.jpg", PACKAGE_DATA_DIR);
|
snprintf(buf, sizeof(buf), "%s/images/sky_02.jpg", PACKAGE_DATA_DIR);
|
||||||
else if ((tit->mode & 0x3) == 2)
|
else if ((tit->mode & 0x3) == 2)
|
||||||
snprintf(buf, sizeof(buf), "%s/images/sky_03.jpg", PACKAGE_DATA_DIR);
|
snprintf(buf, sizeof(buf), "%s/images/sky_03.jpg", PACKAGE_DATA_DIR);
|
||||||
else if ((tit->mode & 0x3) == 3)
|
else if ((tit->mode & 0x3) == 3)
|
||||||
snprintf(buf, sizeof(buf), "%s/images/sky_04.jpg", PACKAGE_DATA_DIR);
|
snprintf(buf, sizeof(buf), "%s/images/sky_04.jpg", PACKAGE_DATA_DIR);
|
||||||
elm_icon_file_set(ic, buf, NULL);
|
elm_icon_file_set(ic, buf, NULL);
|
||||||
}
|
}
|
||||||
evas_object_size_hint_aspect_set(ic, EVAS_ASPECT_CONTROL_VERTICAL, 1, 1);
|
evas_object_size_hint_aspect_set(ic, EVAS_ASPECT_CONTROL_VERTICAL, 1, 1);
|
||||||
return ic;
|
return ic;
|
||||||
|
@ -2525,16 +2525,16 @@ my_bt_31(void *data, Evas_Object *obj, void *event_info)
|
||||||
|
|
||||||
tit[0].mode = 0;
|
tit[0].mode = 0;
|
||||||
tit[0].item = elm_genlist_item_append(gl, &itc2,
|
tit[0].item = elm_genlist_item_append(gl, &itc2,
|
||||||
&(tit[0])/* item data */, NULL/* parent */, ELM_GENLIST_ITEM_NONE, gl_sel/* func */,
|
&(tit[0])/* item data */, NULL/* parent */, ELM_GENLIST_ITEM_NONE, gl_sel/* func */,
|
||||||
NULL/* func data */);
|
NULL/* func data */);
|
||||||
tit[1].mode = 1;
|
tit[1].mode = 1;
|
||||||
tit[1].item = elm_genlist_item_append(gl, &itc2,
|
tit[1].item = elm_genlist_item_append(gl, &itc2,
|
||||||
&(tit[1])/* item data */, NULL/* parent */, ELM_GENLIST_ITEM_NONE, gl_sel/* func */,
|
&(tit[1])/* item data */, NULL/* parent */, ELM_GENLIST_ITEM_NONE, gl_sel/* func */,
|
||||||
NULL/* func data */);
|
NULL/* func data */);
|
||||||
tit[2].mode = 2;
|
tit[2].mode = 2;
|
||||||
tit[2].item = elm_genlist_item_append(gl, &itc2,
|
tit[2].item = elm_genlist_item_append(gl, &itc2,
|
||||||
&(tit[2])/* item data */, NULL/* parent */, ELM_GENLIST_ITEM_NONE, gl_sel/* func */,
|
&(tit[2])/* item data */, NULL/* parent */, ELM_GENLIST_ITEM_NONE, gl_sel/* func */,
|
||||||
NULL/* func data */);
|
NULL/* func data */);
|
||||||
|
|
||||||
elm_box_pack_end(bx, gl);
|
elm_box_pack_end(bx, gl);
|
||||||
evas_object_show(bx2);
|
evas_object_show(bx2);
|
||||||
|
@ -2598,32 +2598,32 @@ Evas_Object *gl3_icon_get(const void *data, Evas_Object *obj, const char *part)
|
||||||
char buf[PATH_MAX];
|
char buf[PATH_MAX];
|
||||||
if (!strcmp(part, "elm.swallow.icon"))
|
if (!strcmp(part, "elm.swallow.icon"))
|
||||||
{
|
{
|
||||||
Evas_Object *bx = elm_box_add(obj);
|
Evas_Object *bx = elm_box_add(obj);
|
||||||
Evas_Object *ic;
|
Evas_Object *ic;
|
||||||
elm_box_horizontal_set(bx, 1);
|
elm_box_horizontal_set(bx, 1);
|
||||||
ic = elm_icon_add(obj);
|
ic = elm_icon_add(obj);
|
||||||
snprintf(buf, sizeof(buf), "%s/images/logo_small.png", PACKAGE_DATA_DIR);
|
snprintf(buf, sizeof(buf), "%s/images/logo_small.png", PACKAGE_DATA_DIR);
|
||||||
elm_icon_file_set(ic, buf, NULL);
|
elm_icon_file_set(ic, buf, NULL);
|
||||||
elm_icon_scale_set(ic, 0, 0);
|
elm_icon_scale_set(ic, 0, 0);
|
||||||
evas_object_show(ic);
|
evas_object_show(ic);
|
||||||
elm_box_pack_end(bx, ic);
|
elm_box_pack_end(bx, ic);
|
||||||
ic = elm_icon_add(obj);
|
ic = elm_icon_add(obj);
|
||||||
elm_icon_file_set(ic, buf, NULL);
|
elm_icon_file_set(ic, buf, NULL);
|
||||||
elm_icon_scale_set(ic, 0, 0);
|
elm_icon_scale_set(ic, 0, 0);
|
||||||
evas_object_show(ic);
|
evas_object_show(ic);
|
||||||
elm_box_pack_end(bx, ic);
|
elm_box_pack_end(bx, ic);
|
||||||
evas_object_show(bx);
|
evas_object_show(bx);
|
||||||
return bx;
|
return bx;
|
||||||
}
|
}
|
||||||
else if (!strcmp(part, "elm.swallow.end"))
|
else if (!strcmp(part, "elm.swallow.end"))
|
||||||
{
|
{
|
||||||
Evas_Object *ck;
|
Evas_Object *ck;
|
||||||
ck = elm_check_add(obj);
|
ck = elm_check_add(obj);
|
||||||
evas_object_propagate_events_set(ck, 0);
|
evas_object_propagate_events_set(ck, 0);
|
||||||
elm_check_state_set(ck, tit->onoff);
|
elm_check_state_set(ck, tit->onoff);
|
||||||
evas_object_smart_callback_add(ck, "changed", my_gl_item_check_changed, data);
|
evas_object_smart_callback_add(ck, "changed", my_gl_item_check_changed, data);
|
||||||
evas_object_show(ck);
|
evas_object_show(ck);
|
||||||
return ck;
|
return ck;
|
||||||
}
|
}
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
@ -2670,16 +2670,16 @@ my_bt_32(void *data, Evas_Object *obj, void *event_info)
|
||||||
|
|
||||||
tit[0].mode = 0;
|
tit[0].mode = 0;
|
||||||
tit[0].item = elm_genlist_item_append(gl, &itc3,
|
tit[0].item = elm_genlist_item_append(gl, &itc3,
|
||||||
&(tit[0])/* item data */, NULL/* parent */, ELM_GENLIST_ITEM_NONE, gl_sel/* func */,
|
&(tit[0])/* item data */, NULL/* parent */, ELM_GENLIST_ITEM_NONE, gl_sel/* func */,
|
||||||
NULL/* func data */);
|
NULL/* func data */);
|
||||||
tit[1].mode = 1;
|
tit[1].mode = 1;
|
||||||
tit[1].item = elm_genlist_item_append(gl, &itc3,
|
tit[1].item = elm_genlist_item_append(gl, &itc3,
|
||||||
&(tit[1])/* item data */, NULL/* parent */, ELM_GENLIST_ITEM_NONE, gl_sel/* func */,
|
&(tit[1])/* item data */, NULL/* parent */, ELM_GENLIST_ITEM_NONE, gl_sel/* func */,
|
||||||
NULL/* func data */);
|
NULL/* func data */);
|
||||||
tit[2].mode = 2;
|
tit[2].mode = 2;
|
||||||
tit[2].item = elm_genlist_item_append(gl, &itc3,
|
tit[2].item = elm_genlist_item_append(gl, &itc3,
|
||||||
&(tit[2])/* item data */, NULL/* parent */, ELM_GENLIST_ITEM_NONE, gl_sel/* func */,
|
&(tit[2])/* item data */, NULL/* parent */, ELM_GENLIST_ITEM_NONE, gl_sel/* func */,
|
||||||
NULL/* func data */);
|
NULL/* func data */);
|
||||||
|
|
||||||
elm_box_pack_end(bx, gl);
|
elm_box_pack_end(bx, gl);
|
||||||
evas_object_show(bx2);
|
evas_object_show(bx2);
|
||||||
|
@ -2919,19 +2919,19 @@ my_bt_35(void *data, Evas_Object *obj, void *event_info)
|
||||||
|
|
||||||
lb = elm_label_add(win);
|
lb = elm_label_add(win);
|
||||||
elm_label_label_set(lb,
|
elm_label_label_set(lb,
|
||||||
"This is page 1 in a pager stack.<br>"
|
"This is page 1 in a pager stack.<br>"
|
||||||
"<br>"
|
"<br>"
|
||||||
"So what is a pager stack? It is a stack<br>"
|
"So what is a pager stack? It is a stack<br>"
|
||||||
"of pages that hold widgets in it. The<br>"
|
"of pages that hold widgets in it. The<br>"
|
||||||
"pages can be pushed and popped on and<br>"
|
"pages can be pushed and popped on and<br>"
|
||||||
"off the stack, activated and otherwise<br>"
|
"off the stack, activated and otherwise<br>"
|
||||||
"activated if already in the stack<br>"
|
"activated if already in the stack<br>"
|
||||||
"(activated means promoted to the top of<br>"
|
"(activated means promoted to the top of<br>"
|
||||||
"the stack).<br>"
|
"the stack).<br>"
|
||||||
"<br>"
|
"<br>"
|
||||||
"The theme may define the animation how<br>"
|
"The theme may define the animation how<br>"
|
||||||
"show and hide of pages."
|
"show and hide of pages."
|
||||||
);
|
);
|
||||||
elm_box_pack_end(bx, lb);
|
elm_box_pack_end(bx, lb);
|
||||||
evas_object_show(lb);
|
evas_object_show(lb);
|
||||||
bt = elm_button_add(win);
|
bt = elm_button_add(win);
|
||||||
|
@ -2952,11 +2952,11 @@ my_bt_35(void *data, Evas_Object *obj, void *event_info)
|
||||||
evas_object_show(bx);
|
evas_object_show(bx);
|
||||||
lb = elm_label_add(win);
|
lb = elm_label_add(win);
|
||||||
elm_label_label_set(lb,
|
elm_label_label_set(lb,
|
||||||
"This is page 2 in a pager stack.<br>"
|
"This is page 2 in a pager stack.<br>"
|
||||||
"<br>"
|
"<br>"
|
||||||
"This is just like the previous page in<br>"
|
"This is just like the previous page in<br>"
|
||||||
"the pager stack."
|
"the pager stack."
|
||||||
);
|
);
|
||||||
elm_box_pack_end(bx, lb);
|
elm_box_pack_end(bx, lb);
|
||||||
evas_object_show(lb);
|
evas_object_show(lb);
|
||||||
bt = elm_button_add(win);
|
bt = elm_button_add(win);
|
||||||
|
@ -2977,11 +2977,11 @@ my_bt_35(void *data, Evas_Object *obj, void *event_info)
|
||||||
evas_object_show(bx);
|
evas_object_show(bx);
|
||||||
lb = elm_label_add(win);
|
lb = elm_label_add(win);
|
||||||
elm_label_label_set(lb,
|
elm_label_label_set(lb,
|
||||||
"This is page 3 in a pager stack.<br>"
|
"This is page 3 in a pager stack.<br>"
|
||||||
"<br>"
|
"<br>"
|
||||||
"This is just like the previous page in<br>"
|
"This is just like the previous page in<br>"
|
||||||
"the pager stack."
|
"the pager stack."
|
||||||
);
|
);
|
||||||
elm_box_pack_end(bx, lb);
|
elm_box_pack_end(bx, lb);
|
||||||
evas_object_show(lb);
|
evas_object_show(lb);
|
||||||
bt = elm_button_add(win);
|
bt = elm_button_add(win);
|
||||||
|
@ -3014,14 +3014,14 @@ gl4_exp(void *data, Evas_Object *obj, void *event_info)
|
||||||
int val = (int)elm_genlist_item_data_get(it);
|
int val = (int)elm_genlist_item_data_get(it);
|
||||||
val *= 10;
|
val *= 10;
|
||||||
elm_genlist_item_append(gl, &itc4,
|
elm_genlist_item_append(gl, &itc4,
|
||||||
(void *)(val + 1)/* item data */, it/* parent */, ELM_GENLIST_ITEM_NONE, gl4_sel/* func */,
|
(void *)(val + 1)/* item data */, it/* parent */, ELM_GENLIST_ITEM_NONE, gl4_sel/* func */,
|
||||||
NULL/* func data */);
|
NULL/* func data */);
|
||||||
elm_genlist_item_append(gl, &itc4,
|
elm_genlist_item_append(gl, &itc4,
|
||||||
(void *)(val + 2)/* item data */, it/* parent */, ELM_GENLIST_ITEM_NONE, gl4_sel/* func */,
|
(void *)(val + 2)/* item data */, it/* parent */, ELM_GENLIST_ITEM_NONE, gl4_sel/* func */,
|
||||||
NULL/* func data */);
|
NULL/* func data */);
|
||||||
elm_genlist_item_append(gl, &itc4,
|
elm_genlist_item_append(gl, &itc4,
|
||||||
(void *)(val + 3)/* item data */, it/* parent */, ELM_GENLIST_ITEM_SUBITEMS, gl4_sel/* func */,
|
(void *)(val + 3)/* item data */, it/* parent */, ELM_GENLIST_ITEM_SUBITEMS, gl4_sel/* func */,
|
||||||
NULL/* func data */);
|
NULL/* func data */);
|
||||||
}
|
}
|
||||||
static void
|
static void
|
||||||
gl4_con(void *data, Evas_Object *obj, void *event_info)
|
gl4_con(void *data, Evas_Object *obj, void *event_info)
|
||||||
|
@ -3054,19 +3054,19 @@ Evas_Object *gl4_icon_get(const void *data, Evas_Object *obj, const char *part)
|
||||||
char buf[PATH_MAX];
|
char buf[PATH_MAX];
|
||||||
if (!strcmp(part, "elm.swallow.icon"))
|
if (!strcmp(part, "elm.swallow.icon"))
|
||||||
{
|
{
|
||||||
Evas_Object *ic = elm_icon_add(obj);
|
Evas_Object *ic = elm_icon_add(obj);
|
||||||
snprintf(buf, sizeof(buf), "%s/images/logo_small.png", PACKAGE_DATA_DIR);
|
snprintf(buf, sizeof(buf), "%s/images/logo_small.png", PACKAGE_DATA_DIR);
|
||||||
elm_icon_file_set(ic, buf, NULL);
|
elm_icon_file_set(ic, buf, NULL);
|
||||||
evas_object_size_hint_aspect_set(ic, EVAS_ASPECT_CONTROL_VERTICAL, 1, 1);
|
evas_object_size_hint_aspect_set(ic, EVAS_ASPECT_CONTROL_VERTICAL, 1, 1);
|
||||||
evas_object_show(ic);
|
evas_object_show(ic);
|
||||||
return ic;
|
return ic;
|
||||||
}
|
}
|
||||||
else if (!strcmp(part, "elm.swallow.end"))
|
else if (!strcmp(part, "elm.swallow.end"))
|
||||||
{
|
{
|
||||||
Evas_Object *ck;
|
Evas_Object *ck;
|
||||||
ck = elm_check_add(obj);
|
ck = elm_check_add(obj);
|
||||||
evas_object_show(ck);
|
evas_object_show(ck);
|
||||||
return ck;
|
return ck;
|
||||||
}
|
}
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
@ -3109,14 +3109,14 @@ my_bt_36(void *data, Evas_Object *obj, void *event_info)
|
||||||
itc4.func.del = gl4_del;
|
itc4.func.del = gl4_del;
|
||||||
|
|
||||||
elm_genlist_item_append(gl, &itc4,
|
elm_genlist_item_append(gl, &itc4,
|
||||||
(void *)1/* item data */, NULL/* parent */, ELM_GENLIST_ITEM_SUBITEMS, gl4_sel/* func */,
|
(void *)1/* item data */, NULL/* parent */, ELM_GENLIST_ITEM_SUBITEMS, gl4_sel/* func */,
|
||||||
NULL/* func data */);
|
NULL/* func data */);
|
||||||
elm_genlist_item_append(gl, &itc4,
|
elm_genlist_item_append(gl, &itc4,
|
||||||
(void *)2/* item data */, NULL/* parent */, ELM_GENLIST_ITEM_SUBITEMS, gl4_sel/* func */,
|
(void *)2/* item data */, NULL/* parent */, ELM_GENLIST_ITEM_SUBITEMS, gl4_sel/* func */,
|
||||||
NULL/* func data */);
|
NULL/* func data */);
|
||||||
elm_genlist_item_append(gl, &itc4,
|
elm_genlist_item_append(gl, &itc4,
|
||||||
(void *)3/* item data */, NULL/* parent */, ELM_GENLIST_ITEM_NONE, gl4_sel/* func */,
|
(void *)3/* item data */, NULL/* parent */, ELM_GENLIST_ITEM_NONE, gl4_sel/* func */,
|
||||||
NULL/* func data */);
|
NULL/* func data */);
|
||||||
|
|
||||||
evas_object_smart_callback_add(gl, "expand,request", gl4_exp_req, gl);
|
evas_object_smart_callback_add(gl, "expand,request", gl4_exp_req, gl);
|
||||||
evas_object_smart_callback_add(gl, "contract,request", gl4_con_req, gl);
|
evas_object_smart_callback_add(gl, "contract,request", gl4_con_req, gl);
|
||||||
|
@ -3178,11 +3178,11 @@ char *gl5_label_get(const void *data, Evas_Object *obj, const char *part)
|
||||||
char buf[256];
|
char buf[256];
|
||||||
if (!strcmp(part, "elm.text"))
|
if (!strcmp(part, "elm.text"))
|
||||||
{
|
{
|
||||||
snprintf(buf, sizeof(buf), "Item mode %i", tit->mode);
|
snprintf(buf, sizeof(buf), "Item mode %i", tit->mode);
|
||||||
}
|
}
|
||||||
else if (!strcmp(part, "elm.text.sub"))
|
else if (!strcmp(part, "elm.text.sub"))
|
||||||
{
|
{
|
||||||
snprintf(buf, sizeof(buf), "%i bottles on the wall", tit->mode);
|
snprintf(buf, sizeof(buf), "%i bottles on the wall", tit->mode);
|
||||||
}
|
}
|
||||||
return strdup(buf);
|
return strdup(buf);
|
||||||
}
|
}
|
||||||
|
@ -3192,32 +3192,32 @@ Evas_Object *gl5_icon_get(const void *data, Evas_Object *obj, const char *part)
|
||||||
char buf[PATH_MAX];
|
char buf[PATH_MAX];
|
||||||
if (!strcmp(part, "elm.swallow.icon"))
|
if (!strcmp(part, "elm.swallow.icon"))
|
||||||
{
|
{
|
||||||
Evas_Object *bx = elm_box_add(obj);
|
Evas_Object *bx = elm_box_add(obj);
|
||||||
Evas_Object *ic;
|
Evas_Object *ic;
|
||||||
elm_box_horizontal_set(bx, 1);
|
elm_box_horizontal_set(bx, 1);
|
||||||
ic = elm_icon_add(obj);
|
ic = elm_icon_add(obj);
|
||||||
snprintf(buf, sizeof(buf), "%s/images/logo_small.png", PACKAGE_DATA_DIR);
|
snprintf(buf, sizeof(buf), "%s/images/logo_small.png", PACKAGE_DATA_DIR);
|
||||||
elm_icon_file_set(ic, buf, NULL);
|
elm_icon_file_set(ic, buf, NULL);
|
||||||
elm_icon_scale_set(ic, 0, 0);
|
elm_icon_scale_set(ic, 0, 0);
|
||||||
evas_object_show(ic);
|
evas_object_show(ic);
|
||||||
elm_box_pack_end(bx, ic);
|
elm_box_pack_end(bx, ic);
|
||||||
ic = elm_icon_add(obj);
|
ic = elm_icon_add(obj);
|
||||||
elm_icon_file_set(ic, buf, NULL);
|
elm_icon_file_set(ic, buf, NULL);
|
||||||
elm_icon_scale_set(ic, 0, 0);
|
elm_icon_scale_set(ic, 0, 0);
|
||||||
evas_object_show(ic);
|
evas_object_show(ic);
|
||||||
elm_box_pack_end(bx, ic);
|
elm_box_pack_end(bx, ic);
|
||||||
evas_object_show(bx);
|
evas_object_show(bx);
|
||||||
return bx;
|
return bx;
|
||||||
}
|
}
|
||||||
else if (!strcmp(part, "elm.swallow.end"))
|
else if (!strcmp(part, "elm.swallow.end"))
|
||||||
{
|
{
|
||||||
Evas_Object *ck;
|
Evas_Object *ck;
|
||||||
ck = elm_check_add(obj);
|
ck = elm_check_add(obj);
|
||||||
evas_object_propagate_events_set(ck, 0);
|
evas_object_propagate_events_set(ck, 0);
|
||||||
elm_check_state_set(ck, tit->onoff);
|
elm_check_state_set(ck, tit->onoff);
|
||||||
evas_object_smart_callback_add(ck, "changed", my_gl_item_check_changed2, data);
|
evas_object_smart_callback_add(ck, "changed", my_gl_item_check_changed2, data);
|
||||||
evas_object_show(ck);
|
evas_object_show(ck);
|
||||||
return ck;
|
return ck;
|
||||||
}
|
}
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
@ -3263,16 +3263,16 @@ my_bt_37(void *data, Evas_Object *obj, void *event_info)
|
||||||
|
|
||||||
tit[0].mode = 0;
|
tit[0].mode = 0;
|
||||||
tit[0].item = elm_genlist_item_append(gl, &itc5,
|
tit[0].item = elm_genlist_item_append(gl, &itc5,
|
||||||
&(tit[0])/* item data */, NULL/* parent */, ELM_GENLIST_ITEM_NONE, gl_sel/* func */,
|
&(tit[0])/* item data */, NULL/* parent */, ELM_GENLIST_ITEM_NONE, gl_sel/* func */,
|
||||||
NULL/* func data */);
|
NULL/* func data */);
|
||||||
tit[1].mode = 1;
|
tit[1].mode = 1;
|
||||||
tit[1].item = elm_genlist_item_append(gl, &itc5,
|
tit[1].item = elm_genlist_item_append(gl, &itc5,
|
||||||
&(tit[1])/* item data */, NULL/* parent */, ELM_GENLIST_ITEM_NONE, gl_sel/* func */,
|
&(tit[1])/* item data */, NULL/* parent */, ELM_GENLIST_ITEM_NONE, gl_sel/* func */,
|
||||||
NULL/* func data */);
|
NULL/* func data */);
|
||||||
tit[2].mode = 2;
|
tit[2].mode = 2;
|
||||||
tit[2].item = elm_genlist_item_append(gl, &itc5,
|
tit[2].item = elm_genlist_item_append(gl, &itc5,
|
||||||
&(tit[2])/* item data */, NULL/* parent */, ELM_GENLIST_ITEM_NONE, gl_sel/* func */,
|
&(tit[2])/* item data */, NULL/* parent */, ELM_GENLIST_ITEM_NONE, gl_sel/* func */,
|
||||||
NULL/* func data */);
|
NULL/* func data */);
|
||||||
|
|
||||||
elm_box_pack_end(bx, gl);
|
elm_box_pack_end(bx, gl);
|
||||||
evas_object_show(bx2);
|
evas_object_show(bx2);
|
||||||
|
@ -3540,9 +3540,9 @@ my_win_main(void)
|
||||||
|
|
||||||
lb = elm_label_add(win);
|
lb = elm_label_add(win);
|
||||||
elm_label_label_set(lb,
|
elm_label_label_set(lb,
|
||||||
"Please select a test from the list below<br>"
|
"Please select a test from the list below<br>"
|
||||||
"by clicking the test button to show the<br>"
|
"by clicking the test button to show the<br>"
|
||||||
"test window.");
|
"test window.");
|
||||||
elm_frame_content_set(fr, lb);
|
elm_frame_content_set(fr, lb);
|
||||||
evas_object_show(lb);
|
evas_object_show(lb);
|
||||||
|
|
||||||
|
|
|
@ -127,15 +127,15 @@ extern "C" {
|
||||||
typedef enum _Elm_Win_Keyboard_Mode
|
typedef enum _Elm_Win_Keyboard_Mode
|
||||||
{
|
{
|
||||||
ELM_WIN_KEYBOARD_UNKNOWN,
|
ELM_WIN_KEYBOARD_UNKNOWN,
|
||||||
ELM_WIN_KEYBOARD_OFF,
|
ELM_WIN_KEYBOARD_OFF,
|
||||||
ELM_WIN_KEYBOARD_ON,
|
ELM_WIN_KEYBOARD_ON,
|
||||||
ELM_WIN_KEYBOARD_ALPHA,
|
ELM_WIN_KEYBOARD_ALPHA,
|
||||||
ELM_WIN_KEYBOARD_NUMERIC,
|
ELM_WIN_KEYBOARD_NUMERIC,
|
||||||
ELM_WIN_KEYBOARD_PIN,
|
ELM_WIN_KEYBOARD_PIN,
|
||||||
ELM_WIN_KEYBOARD_PHONE_NUMBER,
|
ELM_WIN_KEYBOARD_PHONE_NUMBER,
|
||||||
ELM_WIN_KEYBOARD_HEX,
|
ELM_WIN_KEYBOARD_HEX,
|
||||||
ELM_WIN_KEYBOARD_TERMINAL,
|
ELM_WIN_KEYBOARD_TERMINAL,
|
||||||
ELM_WIN_KEYBOARD_PASSWORD
|
ELM_WIN_KEYBOARD_PASSWORD
|
||||||
} Elm_Win_Keyboard_Mode;
|
} Elm_Win_Keyboard_Mode;
|
||||||
|
|
||||||
#ifndef ELM_LIB_QUICKLAUNCH
|
#ifndef ELM_LIB_QUICKLAUNCH
|
||||||
|
@ -298,9 +298,9 @@ extern "C" {
|
||||||
|
|
||||||
typedef enum _Elm_Scroller_Policy
|
typedef enum _Elm_Scroller_Policy
|
||||||
{
|
{
|
||||||
ELM_SCROLLER_POLICY_AUTO,
|
ELM_SCROLLER_POLICY_AUTO,
|
||||||
ELM_SCROLLER_POLICY_ON,
|
ELM_SCROLLER_POLICY_ON,
|
||||||
ELM_SCROLLER_POLICY_OFF
|
ELM_SCROLLER_POLICY_OFF
|
||||||
}
|
}
|
||||||
Elm_Scroller_Policy;
|
Elm_Scroller_Policy;
|
||||||
|
|
||||||
|
@ -378,9 +378,9 @@ extern "C" {
|
||||||
typedef enum _Elm_Hover_Axis
|
typedef enum _Elm_Hover_Axis
|
||||||
{
|
{
|
||||||
ELM_HOVER_AXIS_NONE,
|
ELM_HOVER_AXIS_NONE,
|
||||||
ELM_HOVER_AXIS_HORIZONTAL,
|
ELM_HOVER_AXIS_HORIZONTAL,
|
||||||
ELM_HOVER_AXIS_VERTICAL,
|
ELM_HOVER_AXIS_VERTICAL,
|
||||||
ELM_HOVER_AXIS_BOTH
|
ELM_HOVER_AXIS_BOTH
|
||||||
} Elm_Hover_Axis;
|
} Elm_Hover_Axis;
|
||||||
EAPI Evas_Object *elm_hover_add(Evas_Object *parent);
|
EAPI Evas_Object *elm_hover_add(Evas_Object *parent);
|
||||||
EAPI void elm_hover_target_set(Evas_Object *obj, Evas_Object *target);
|
EAPI void elm_hover_target_set(Evas_Object *obj, Evas_Object *target);
|
||||||
|
@ -508,9 +508,9 @@ extern "C" {
|
||||||
|
|
||||||
typedef enum _Elm_Icon_Type
|
typedef enum _Elm_Icon_Type
|
||||||
{
|
{
|
||||||
ELM_ICON_NONE,
|
ELM_ICON_NONE,
|
||||||
ELM_ICON_FILE,
|
ELM_ICON_FILE,
|
||||||
ELM_ICON_STANDARD
|
ELM_ICON_STANDARD
|
||||||
} Elm_Icon_Type;
|
} Elm_Icon_Type;
|
||||||
typedef struct _Elm_Hoversel_Item Elm_Hoversel_Item;
|
typedef struct _Elm_Hoversel_Item Elm_Hoversel_Item;
|
||||||
EAPI Evas_Object *elm_hoversel_add(Evas_Object *parent);
|
EAPI Evas_Object *elm_hoversel_add(Evas_Object *parent);
|
||||||
|
@ -540,9 +540,9 @@ extern "C" {
|
||||||
|
|
||||||
typedef enum _Elm_List_Mode
|
typedef enum _Elm_List_Mode
|
||||||
{
|
{
|
||||||
ELM_LIST_COMPRESS,
|
ELM_LIST_COMPRESS,
|
||||||
ELM_LIST_SCROLL,
|
ELM_LIST_SCROLL,
|
||||||
ELM_LIST_LIMIT
|
ELM_LIST_LIMIT
|
||||||
} Elm_List_Mode;
|
} Elm_List_Mode;
|
||||||
typedef struct _Elm_List_Item Elm_List_Item;
|
typedef struct _Elm_List_Item Elm_List_Item;
|
||||||
EAPI Evas_Object *elm_list_add(Evas_Object *parent);
|
EAPI Evas_Object *elm_list_add(Evas_Object *parent);
|
||||||
|
@ -604,8 +604,8 @@ extern "C" {
|
||||||
|
|
||||||
typedef enum _Elm_Genlist_Item_Flags
|
typedef enum _Elm_Genlist_Item_Flags
|
||||||
{
|
{
|
||||||
ELM_GENLIST_ITEM_NONE = 0,
|
ELM_GENLIST_ITEM_NONE = 0,
|
||||||
ELM_GENLIST_ITEM_SUBITEMS = (1 << 0)
|
ELM_GENLIST_ITEM_SUBITEMS = (1 << 0)
|
||||||
} Elm_Genlist_Item_Flags;
|
} Elm_Genlist_Item_Flags;
|
||||||
typedef struct _Elm_Genlist_Item_Class Elm_Genlist_Item_Class;
|
typedef struct _Elm_Genlist_Item_Class Elm_Genlist_Item_Class;
|
||||||
typedef struct _Elm_Genlist_Item Elm_Genlist_Item;
|
typedef struct _Elm_Genlist_Item Elm_Genlist_Item;
|
||||||
|
@ -617,13 +617,13 @@ extern "C" {
|
||||||
|
|
||||||
struct _Elm_Genlist_Item_Class
|
struct _Elm_Genlist_Item_Class
|
||||||
{
|
{
|
||||||
const char *item_style;
|
const char *item_style;
|
||||||
struct _Elm_Genlist_Item_Class_Func {
|
struct _Elm_Genlist_Item_Class_Func {
|
||||||
GenlistItemLabelGetFunc label_get;
|
GenlistItemLabelGetFunc label_get;
|
||||||
GenlistItemIconGetFunc icon_get;
|
GenlistItemIconGetFunc icon_get;
|
||||||
GenlistItemStateGetFunc state_get;
|
GenlistItemStateGetFunc state_get;
|
||||||
GenlistItemDelFunc del;
|
GenlistItemDelFunc del;
|
||||||
} func;
|
} func;
|
||||||
};
|
};
|
||||||
|
|
||||||
EAPI Evas_Object *elm_genlist_add(Evas_Object *parent);
|
EAPI Evas_Object *elm_genlist_add(Evas_Object *parent);
|
||||||
|
|
|
@ -60,9 +60,9 @@ _del_hook(Evas_Object *obj)
|
||||||
elm_hoversel_hover_end(obj);
|
elm_hoversel_hover_end(obj);
|
||||||
EINA_LIST_FREE(wd->items, it)
|
EINA_LIST_FREE(wd->items, it)
|
||||||
{
|
{
|
||||||
eina_stringshare_del(it->label);
|
eina_stringshare_del(it->label);
|
||||||
eina_stringshare_del(it->icon_file);
|
eina_stringshare_del(it->icon_file);
|
||||||
free(it);
|
free(it);
|
||||||
}
|
}
|
||||||
free(wd);
|
free(wd);
|
||||||
}
|
}
|
||||||
|
@ -122,25 +122,25 @@ _activate(Evas_Object *obj)
|
||||||
|
|
||||||
EINA_LIST_FOREACH(wd->items, l, it)
|
EINA_LIST_FOREACH(wd->items, l, it)
|
||||||
{
|
{
|
||||||
bt = elm_button_add(wd->hover);
|
bt = elm_button_add(wd->hover);
|
||||||
elm_button_style_set(bt, "hoversel_vertical_entry");
|
elm_button_style_set(bt, "hoversel_vertical_entry");
|
||||||
elm_button_label_set(bt, it->label);
|
elm_button_label_set(bt, it->label);
|
||||||
if (it->icon_file)
|
if (it->icon_file)
|
||||||
{
|
{
|
||||||
ic = elm_icon_add(obj);
|
ic = elm_icon_add(obj);
|
||||||
elm_icon_scale_set(ic, 0, 1);
|
elm_icon_scale_set(ic, 0, 1);
|
||||||
if (it->icon_type == ELM_ICON_FILE)
|
if (it->icon_type == ELM_ICON_FILE)
|
||||||
elm_icon_file_set(ic, it->icon_file, NULL);
|
elm_icon_file_set(ic, it->icon_file, NULL);
|
||||||
else if (it->icon_type == ELM_ICON_STANDARD)
|
else if (it->icon_type == ELM_ICON_STANDARD)
|
||||||
elm_icon_standard_set(ic, it->icon_file);
|
elm_icon_standard_set(ic, it->icon_file);
|
||||||
elm_button_icon_set(bt, ic);
|
elm_button_icon_set(bt, ic);
|
||||||
evas_object_show(ic);
|
evas_object_show(ic);
|
||||||
}
|
}
|
||||||
evas_object_size_hint_weight_set(bt, 1.0, 0.0);
|
evas_object_size_hint_weight_set(bt, 1.0, 0.0);
|
||||||
evas_object_size_hint_align_set(bt, -1.0, -1.0);
|
evas_object_size_hint_align_set(bt, -1.0, -1.0);
|
||||||
elm_box_pack_end(bx, bt);
|
elm_box_pack_end(bx, bt);
|
||||||
evas_object_smart_callback_add(bt, "clicked", _item_clicked, it);
|
evas_object_smart_callback_add(bt, "clicked", _item_clicked, it);
|
||||||
evas_object_show(bt);
|
evas_object_show(bt);
|
||||||
}
|
}
|
||||||
|
|
||||||
elm_hover_content_set
|
elm_hover_content_set
|
||||||
|
@ -295,9 +295,9 @@ elm_hoversel_hover_end(Evas_Object *obj)
|
||||||
if (!wd) return;
|
if (!wd) return;
|
||||||
if (wd->hover)
|
if (wd->hover)
|
||||||
{
|
{
|
||||||
evas_object_del(wd->hover);
|
evas_object_del(wd->hover);
|
||||||
wd->hover = NULL;
|
wd->hover = NULL;
|
||||||
evas_object_smart_callback_call(obj, "dismissed", NULL);
|
evas_object_smart_callback_call(obj, "dismissed", NULL);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -94,7 +94,7 @@ _load_file(const char *file)
|
||||||
while ((size = fread(buf, 1, sizeof(buf), f)))
|
while ((size = fread(buf, 1, sizeof(buf), f)))
|
||||||
{
|
{
|
||||||
buf[size] = 0;
|
buf[size] = 0;
|
||||||
text = _buf_append(text, buf, &len, &alloc);
|
text = _buf_append(text, buf, &len, &alloc);
|
||||||
}
|
}
|
||||||
fclose(f);
|
fclose(f);
|
||||||
return text;
|
return text;
|
||||||
|
@ -108,9 +108,9 @@ _load_plain(const char *file)
|
||||||
text = _load_file(file);
|
text = _load_file(file);
|
||||||
if (text)
|
if (text)
|
||||||
{
|
{
|
||||||
text2 = elm_entry_utf8_to_markup(text);
|
text2 = elm_entry_utf8_to_markup(text);
|
||||||
free(text);
|
free(text);
|
||||||
return text2;
|
return text2;
|
||||||
}
|
}
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
@ -175,8 +175,8 @@ _save_plain_utf8(const char *file, const char *text)
|
||||||
text2 = elm_entry_markup_to_utf8(text);
|
text2 = elm_entry_markup_to_utf8(text);
|
||||||
if (text2)
|
if (text2)
|
||||||
{
|
{
|
||||||
_save_markup_utf8(file, text2);
|
_save_markup_utf8(file, text2);
|
||||||
free(text2);
|
free(text2);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -188,7 +188,7 @@ _save(Evas_Object *obj)
|
||||||
switch (wd->format)
|
switch (wd->format)
|
||||||
{
|
{
|
||||||
case ELM_TEXT_FORMAT_PLAIN_UTF8:
|
case ELM_TEXT_FORMAT_PLAIN_UTF8:
|
||||||
_save_plain_utf8(wd->file, elm_entry_entry_get(wd->entry));
|
_save_plain_utf8(wd->file, elm_entry_entry_get(wd->entry));
|
||||||
break;
|
break;
|
||||||
case ELM_TEXT_FORMAT_MARKUP_UTF8:
|
case ELM_TEXT_FORMAT_MARKUP_UTF8:
|
||||||
_save_markup_utf8(wd->file, elm_entry_entry_get(wd->entry));
|
_save_markup_utf8(wd->file, elm_entry_entry_get(wd->entry));
|
||||||
|
|
|
@ -84,7 +84,7 @@ _sub_del(void *data, Evas_Object *obj, void *event_info)
|
||||||
evas_object_event_callback_del
|
evas_object_event_callback_del
|
||||||
(sub, EVAS_CALLBACK_CHANGED_SIZE_HINTS, _changed_size_hints);
|
(sub, EVAS_CALLBACK_CHANGED_SIZE_HINTS, _changed_size_hints);
|
||||||
wd->icon = NULL;
|
wd->icon = NULL;
|
||||||
edje_object_message_signal_process(wd->btn);
|
edje_object_message_signal_process(wd->btn);
|
||||||
_sizing_eval(obj);
|
_sizing_eval(obj);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -134,13 +134,13 @@ elm_button_label_set(Evas_Object *obj, const char *label)
|
||||||
if (wd->label) eina_stringshare_del(wd->label);
|
if (wd->label) eina_stringshare_del(wd->label);
|
||||||
if (label)
|
if (label)
|
||||||
{
|
{
|
||||||
wd->label = eina_stringshare_add(label);
|
wd->label = eina_stringshare_add(label);
|
||||||
edje_object_signal_emit(wd->btn, "elm,state,text,visible", "elm");
|
edje_object_signal_emit(wd->btn, "elm,state,text,visible", "elm");
|
||||||
edje_object_message_signal_process(wd->btn);
|
edje_object_message_signal_process(wd->btn);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
wd->label = NULL;
|
wd->label = NULL;
|
||||||
edje_object_signal_emit(wd->btn, "elm,state,text,hidden", "elm");
|
edje_object_signal_emit(wd->btn, "elm,state,text,hidden", "elm");
|
||||||
edje_object_message_signal_process(wd->btn);
|
edje_object_message_signal_process(wd->btn);
|
||||||
}
|
}
|
||||||
|
@ -157,13 +157,13 @@ elm_button_icon_set(Evas_Object *obj, Evas_Object *icon)
|
||||||
elm_widget_sub_object_del(obj, wd->icon);
|
elm_widget_sub_object_del(obj, wd->icon);
|
||||||
if ((icon) && (wd->icon != icon))
|
if ((icon) && (wd->icon != icon))
|
||||||
{
|
{
|
||||||
wd->icon = icon;
|
wd->icon = icon;
|
||||||
elm_widget_sub_object_add(obj, icon);
|
elm_widget_sub_object_add(obj, icon);
|
||||||
edje_object_part_swallow(wd->btn, "elm.swallow.content", icon);
|
edje_object_part_swallow(wd->btn, "elm.swallow.content", icon);
|
||||||
edje_object_signal_emit(wd->btn, "elm,state,icon,visible", "elm");
|
edje_object_signal_emit(wd->btn, "elm,state,icon,visible", "elm");
|
||||||
evas_object_event_callback_add(icon, EVAS_CALLBACK_CHANGED_SIZE_HINTS,
|
evas_object_event_callback_add(icon, EVAS_CALLBACK_CHANGED_SIZE_HINTS,
|
||||||
_changed_size_hints, obj);
|
_changed_size_hints, obj);
|
||||||
edje_object_message_signal_process(wd->btn);
|
edje_object_message_signal_process(wd->btn);
|
||||||
_sizing_eval(obj);
|
_sizing_eval(obj);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|
|
@ -48,12 +48,12 @@ _item_select(Elm_Carousel_Item *it)
|
||||||
if (it->selected) return;
|
if (it->selected) return;
|
||||||
EINA_LIST_FOREACH(wd->items, l, it2)
|
EINA_LIST_FOREACH(wd->items, l, it2)
|
||||||
{
|
{
|
||||||
if (it2->selected)
|
if (it2->selected)
|
||||||
{
|
{
|
||||||
it2->selected = EINA_FALSE;
|
it2->selected = EINA_FALSE;
|
||||||
edje_object_signal_emit(it2->base, "elm,state,unselected", "elm");
|
edje_object_signal_emit(it2->base, "elm,state,unselected", "elm");
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
it->selected = EINA_TRUE;
|
it->selected = EINA_TRUE;
|
||||||
edje_object_signal_emit(it->base, "elm,state,selected", "elm");
|
edje_object_signal_emit(it->base, "elm,state,selected", "elm");
|
||||||
|
@ -79,21 +79,21 @@ _theme_hook(Evas_Object *obj)
|
||||||
Evas_Coord mw, mh;
|
Evas_Coord mw, mh;
|
||||||
EINA_LIST_FOREACH(wd->items, l, it)
|
EINA_LIST_FOREACH(wd->items, l, it)
|
||||||
{
|
{
|
||||||
if (it->selected)
|
if (it->selected)
|
||||||
edje_object_signal_emit(it->base, "elm,state,selected", "elm");
|
edje_object_signal_emit(it->base, "elm,state,selected", "elm");
|
||||||
_elm_theme_set(it->base, "carousel", "item", elm_widget_style_get(obj));
|
_elm_theme_set(it->base, "carousel", "item", elm_widget_style_get(obj));
|
||||||
edje_object_scale_set(it->base, elm_widget_scale_get(obj) * _elm_config->scale);
|
edje_object_scale_set(it->base, elm_widget_scale_get(obj) * _elm_config->scale);
|
||||||
if (it->icon)
|
if (it->icon)
|
||||||
{
|
{
|
||||||
edje_extern_object_min_size_set(it->icon,
|
edje_extern_object_min_size_set(it->icon,
|
||||||
(double)wd->icon_size * _elm_config->scale,
|
(double)wd->icon_size * _elm_config->scale,
|
||||||
(double)wd->icon_size * _elm_config->scale);
|
(double)wd->icon_size * _elm_config->scale);
|
||||||
edje_object_part_swallow(it->base, "elm.swallow.icon", it->icon);
|
edje_object_part_swallow(it->base, "elm.swallow.icon", it->icon);
|
||||||
}
|
}
|
||||||
edje_object_part_text_set(it->base, "elm.text", it->label);
|
edje_object_part_text_set(it->base, "elm.text", it->label);
|
||||||
edje_object_size_min_calc(it->base, &mw, &mh);
|
edje_object_size_min_calc(it->base, &mw, &mh);
|
||||||
evas_object_size_hint_min_set(it->base, mw, mh);
|
evas_object_size_hint_min_set(it->base, mw, mh);
|
||||||
evas_object_size_hint_max_set(it->base, 9999, mh);
|
evas_object_size_hint_max_set(it->base, 9999, mh);
|
||||||
}
|
}
|
||||||
_sizing_eval(obj);
|
_sizing_eval(obj);
|
||||||
}
|
}
|
||||||
|
@ -129,15 +129,15 @@ _resize(void *data, Evas *e, Evas_Object *obj, void *event_info)
|
||||||
evas_object_geometry_get(wd->bx, NULL, NULL, &w, &h);
|
evas_object_geometry_get(wd->bx, NULL, NULL, &w, &h);
|
||||||
if (vw >= mw)
|
if (vw >= mw)
|
||||||
{
|
{
|
||||||
if (w != vw) evas_object_resize(wd->bx, vw, h);
|
if (w != vw) evas_object_resize(wd->bx, vw, h);
|
||||||
}
|
}
|
||||||
EINA_LIST_FOREACH(wd->items, l, it)
|
EINA_LIST_FOREACH(wd->items, l, it)
|
||||||
{
|
{
|
||||||
if (it->selected)
|
if (it->selected)
|
||||||
{
|
{
|
||||||
_item_show(it);
|
_item_show(it);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -169,8 +169,8 @@ elm_carousel_add(Evas_Object *parent)
|
||||||
elm_smart_scroller_theme_set(wd->scr, "carousel", "base", "default");
|
elm_smart_scroller_theme_set(wd->scr, "carousel", "base", "default");
|
||||||
elm_widget_resize_object_set(obj, wd->scr);
|
elm_widget_resize_object_set(obj, wd->scr);
|
||||||
elm_smart_scroller_policy_set(wd->scr,
|
elm_smart_scroller_policy_set(wd->scr,
|
||||||
ELM_SMART_SCROLLER_POLICY_AUTO,
|
ELM_SMART_SCROLLER_POLICY_AUTO,
|
||||||
ELM_SMART_SCROLLER_POLICY_OFF);
|
ELM_SMART_SCROLLER_POLICY_OFF);
|
||||||
|
|
||||||
wd->icon_size = 32;
|
wd->icon_size = 32;
|
||||||
|
|
||||||
|
@ -182,7 +182,7 @@ elm_carousel_add(Evas_Object *parent)
|
||||||
evas_object_show(wd->bx);
|
evas_object_show(wd->bx);
|
||||||
|
|
||||||
evas_object_event_callback_add(wd->scr, EVAS_CALLBACK_RESIZE,
|
evas_object_event_callback_add(wd->scr, EVAS_CALLBACK_RESIZE,
|
||||||
_resize, obj);
|
_resize, obj);
|
||||||
|
|
||||||
_sizing_eval(obj);
|
_sizing_eval(obj);
|
||||||
return obj;
|
return obj;
|
||||||
|
@ -204,16 +204,16 @@ elm_carousel_item_add(Evas_Object *obj, Evas_Object *icon, const char *label, vo
|
||||||
it->base = edje_object_add(evas_object_evas_get(obj));
|
it->base = edje_object_add(evas_object_evas_get(obj));
|
||||||
_elm_theme_set(it->base, "carousel", "item", elm_widget_style_get(obj));
|
_elm_theme_set(it->base, "carousel", "item", elm_widget_style_get(obj));
|
||||||
edje_object_signal_callback_add(it->base, "elm,action,click", "elm",
|
edje_object_signal_callback_add(it->base, "elm,action,click", "elm",
|
||||||
_select, it);
|
_select, it);
|
||||||
elm_widget_sub_object_add(obj, it->base);
|
elm_widget_sub_object_add(obj, it->base);
|
||||||
if (it->icon)
|
if (it->icon)
|
||||||
{
|
{
|
||||||
edje_extern_object_min_size_set(it->icon,
|
edje_extern_object_min_size_set(it->icon,
|
||||||
(double)wd->icon_size * _elm_config->scale,
|
(double)wd->icon_size * _elm_config->scale,
|
||||||
(double)wd->icon_size * _elm_config->scale);
|
(double)wd->icon_size * _elm_config->scale);
|
||||||
edje_object_part_swallow(it->base, "elm.swallow.icon", it->icon);
|
edje_object_part_swallow(it->base, "elm.swallow.icon", it->icon);
|
||||||
evas_object_show(it->icon);
|
evas_object_show(it->icon);
|
||||||
elm_widget_sub_object_add(obj, it->icon);
|
elm_widget_sub_object_add(obj, it->icon);
|
||||||
}
|
}
|
||||||
edje_object_part_text_set(it->base, "elm.text", it->label);
|
edje_object_part_text_set(it->base, "elm.text", it->label);
|
||||||
edje_object_size_min_calc(it->base, &mw, &mh);
|
edje_object_size_min_calc(it->base, &mw, &mh);
|
||||||
|
|
|
@ -196,13 +196,13 @@ elm_check_label_set(Evas_Object *obj, const char *label)
|
||||||
if (wd->label) eina_stringshare_del(wd->label);
|
if (wd->label) eina_stringshare_del(wd->label);
|
||||||
if (label)
|
if (label)
|
||||||
{
|
{
|
||||||
wd->label = eina_stringshare_add(label);
|
wd->label = eina_stringshare_add(label);
|
||||||
edje_object_signal_emit(wd->chk, "elm,state,text,visible", "elm");
|
edje_object_signal_emit(wd->chk, "elm,state,text,visible", "elm");
|
||||||
edje_object_message_signal_process(wd->chk);
|
edje_object_message_signal_process(wd->chk);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
wd->label = NULL;
|
wd->label = NULL;
|
||||||
edje_object_signal_emit(wd->chk, "elm,state,text,hidden", "elm");
|
edje_object_signal_emit(wd->chk, "elm,state,text,hidden", "elm");
|
||||||
edje_object_message_signal_process(wd->chk);
|
edje_object_message_signal_process(wd->chk);
|
||||||
}
|
}
|
||||||
|
@ -316,6 +316,6 @@ elm_check_state_pointer_set(Evas_Object *obj, Eina_Bool *statep)
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
wd->statep = NULL;
|
wd->statep = NULL;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -206,7 +206,7 @@ _time_update(Evas_Object *obj)
|
||||||
_elm_theme_set(wd->clk, "clock", "base-am_pm", style);
|
_elm_theme_set(wd->clk, "clock", "base-am_pm", style);
|
||||||
else
|
else
|
||||||
_elm_theme_set(wd->clk, "clock", "base", style);
|
_elm_theme_set(wd->clk, "clock", "base", style);
|
||||||
edje_object_scale_set(wd->clk, elm_widget_scale_get(obj) * _elm_config->scale);
|
edje_object_scale_set(wd->clk, elm_widget_scale_get(obj) * _elm_config->scale);
|
||||||
|
|
||||||
for (i = 0; i < 6; i++)
|
for (i = 0; i < 6; i++)
|
||||||
{
|
{
|
||||||
|
@ -215,17 +215,17 @@ _time_update(Evas_Object *obj)
|
||||||
if ((!wd->seconds) && (i >= 4)) break;
|
if ((!wd->seconds) && (i >= 4)) break;
|
||||||
wd->digit[i] = edje_object_add(evas_object_evas_get(wd->clk));
|
wd->digit[i] = edje_object_add(evas_object_evas_get(wd->clk));
|
||||||
_elm_theme_set(wd->digit[i], "clock", "flipdigit", style);
|
_elm_theme_set(wd->digit[i], "clock", "flipdigit", style);
|
||||||
edje_object_scale_set(wd->digit[i], elm_widget_scale_get(obj) * _elm_config->scale);
|
edje_object_scale_set(wd->digit[i], elm_widget_scale_get(obj) * _elm_config->scale);
|
||||||
if (wd->edit)
|
if (wd->edit)
|
||||||
edje_object_signal_emit(wd->digit[i], "elm,state,edit,on", "elm");
|
edje_object_signal_emit(wd->digit[i], "elm,state,edit,on", "elm");
|
||||||
edje_object_signal_callback_add(wd->digit[i], "elm,action,up", "",
|
edje_object_signal_callback_add(wd->digit[i], "elm,action,up", "",
|
||||||
_signal_clock_val_up, obj);
|
_signal_clock_val_up, obj);
|
||||||
edje_object_signal_callback_add(wd->digit[i], "elm,action,down", "",
|
edje_object_signal_callback_add(wd->digit[i], "elm,action,down", "",
|
||||||
_signal_clock_val_down, obj);
|
_signal_clock_val_down, obj);
|
||||||
mw = mh = -1;
|
mw = mh = -1;
|
||||||
elm_coords_finger_size_adjust(1, &mw, 2, &mh);
|
elm_coords_finger_size_adjust(1, &mw, 2, &mh);
|
||||||
edje_object_size_min_restricted_calc(wd->digit[i], &mw, &mh, mw, mh);
|
edje_object_size_min_restricted_calc(wd->digit[i], &mw, &mh, mw, mh);
|
||||||
elm_coords_finger_size_adjust(1, &mw, 2, &mh);
|
elm_coords_finger_size_adjust(1, &mw, 2, &mh);
|
||||||
edje_extern_object_min_size_set(wd->digit[i], mw, mh);
|
edje_extern_object_min_size_set(wd->digit[i], mw, mh);
|
||||||
snprintf(buf, sizeof(buf), "d%i", i);
|
snprintf(buf, sizeof(buf), "d%i", i);
|
||||||
edje_object_part_swallow(wd->clk , buf, wd->digit[i]);
|
edje_object_part_swallow(wd->clk , buf, wd->digit[i]);
|
||||||
|
@ -235,17 +235,17 @@ _time_update(Evas_Object *obj)
|
||||||
{
|
{
|
||||||
wd->ampm = edje_object_add(evas_object_evas_get(wd->clk));
|
wd->ampm = edje_object_add(evas_object_evas_get(wd->clk));
|
||||||
_elm_theme_set(wd->ampm, "clock", "flipampm", style);
|
_elm_theme_set(wd->ampm, "clock", "flipampm", style);
|
||||||
edje_object_scale_set(wd->ampm, elm_widget_scale_get(obj) * _elm_config->scale);
|
edje_object_scale_set(wd->ampm, elm_widget_scale_get(obj) * _elm_config->scale);
|
||||||
if (wd->edit)
|
if (wd->edit)
|
||||||
edje_object_signal_emit(wd->ampm, "elm,state,edit,on", "elm");
|
edje_object_signal_emit(wd->ampm, "elm,state,edit,on", "elm");
|
||||||
edje_object_signal_callback_add(wd->ampm, "elm,action,up", "",
|
edje_object_signal_callback_add(wd->ampm, "elm,action,up", "",
|
||||||
_signal_clock_val_up, obj);
|
_signal_clock_val_up, obj);
|
||||||
edje_object_signal_callback_add(wd->ampm, "elm,action,down", "",
|
edje_object_signal_callback_add(wd->ampm, "elm,action,down", "",
|
||||||
_signal_clock_val_down, obj);
|
_signal_clock_val_down, obj);
|
||||||
mw = mh = -1;
|
mw = mh = -1;
|
||||||
elm_coords_finger_size_adjust(1, &mw, 2, &mh);
|
elm_coords_finger_size_adjust(1, &mw, 2, &mh);
|
||||||
edje_object_size_min_restricted_calc(wd->ampm, &mw, &mh, mw, mh);
|
edje_object_size_min_restricted_calc(wd->ampm, &mw, &mh, mw, mh);
|
||||||
elm_coords_finger_size_adjust(1, &mw, 2, &mh);
|
elm_coords_finger_size_adjust(1, &mw, 2, &mh);
|
||||||
edje_extern_object_min_size_set(wd->ampm, mw, mh);
|
edje_extern_object_min_size_set(wd->ampm, mw, mh);
|
||||||
edje_object_part_swallow(wd->clk , "ampm", wd->ampm);
|
edje_object_part_swallow(wd->clk , "ampm", wd->ampm);
|
||||||
evas_object_show(wd->ampm);
|
evas_object_show(wd->ampm);
|
||||||
|
|
|
@ -124,15 +124,15 @@ _on_focus_hook(void *data, Evas_Object *obj)
|
||||||
if (!wd->editable) return;
|
if (!wd->editable) return;
|
||||||
if (elm_widget_focus_get(obj))
|
if (elm_widget_focus_get(obj))
|
||||||
{
|
{
|
||||||
evas_object_focus_set(wd->ent, 1);
|
evas_object_focus_set(wd->ent, 1);
|
||||||
edje_object_signal_emit(wd->ent, "elm,action,focus", "elm");
|
edje_object_signal_emit(wd->ent, "elm,action,focus", "elm");
|
||||||
if (top) elm_win_keyboard_mode_set(top, ELM_WIN_KEYBOARD_ON);
|
if (top) elm_win_keyboard_mode_set(top, ELM_WIN_KEYBOARD_ON);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
edje_object_signal_emit(wd->ent, "elm,action,unfocus", "elm");
|
edje_object_signal_emit(wd->ent, "elm,action,unfocus", "elm");
|
||||||
evas_object_focus_set(wd->ent, 0);
|
evas_object_focus_set(wd->ent, 0);
|
||||||
if (top) elm_win_keyboard_mode_set(top, ELM_WIN_KEYBOARD_OFF);
|
if (top) elm_win_keyboard_mode_set(top, ELM_WIN_KEYBOARD_OFF);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -143,17 +143,17 @@ _hoversel_position(Evas_Object *obj)
|
||||||
Evas_Coord cx, cy, cw, ch, x, y, mw, mh;
|
Evas_Coord cx, cy, cw, ch, x, y, mw, mh;
|
||||||
evas_object_geometry_get(wd->ent, &x, &y, NULL, NULL);
|
evas_object_geometry_get(wd->ent, &x, &y, NULL, NULL);
|
||||||
edje_object_part_text_cursor_geometry_get(wd->ent, "elm.text",
|
edje_object_part_text_cursor_geometry_get(wd->ent, "elm.text",
|
||||||
&cx, &cy, &cw, &ch);
|
&cx, &cy, &cw, &ch);
|
||||||
evas_object_size_hint_min_get(wd->hoversel, &mw, &mh);
|
evas_object_size_hint_min_get(wd->hoversel, &mw, &mh);
|
||||||
if (cw < mw)
|
if (cw < mw)
|
||||||
{
|
{
|
||||||
cx += (cw - mw) / 2;
|
cx += (cw - mw) / 2;
|
||||||
cw = mw;
|
cw = mw;
|
||||||
}
|
}
|
||||||
if (ch < mh)
|
if (ch < mh)
|
||||||
{
|
{
|
||||||
cy += (ch - mh) / 2;
|
cy += (ch - mh) / 2;
|
||||||
ch = mh;
|
ch = mh;
|
||||||
}
|
}
|
||||||
evas_object_move(wd->hoversel, x + cx, y + cy);
|
evas_object_move(wd->hoversel, x + cx, y + cy);
|
||||||
evas_object_resize(wd->hoversel, cw, ch);
|
evas_object_resize(wd->hoversel, cw, ch);
|
||||||
|
@ -205,16 +205,16 @@ _paste(void *data, Evas_Object *obj, void *event_info)
|
||||||
if (wd->sel_notify_handler)
|
if (wd->sel_notify_handler)
|
||||||
{
|
{
|
||||||
#ifdef HAVE_ELEMENTARY_X
|
#ifdef HAVE_ELEMENTARY_X
|
||||||
Evas_Object *top;
|
Evas_Object *top;
|
||||||
|
|
||||||
top = elm_widget_top_get(data);
|
top = elm_widget_top_get(data);
|
||||||
if ((top) && (elm_win_xwindow_get(top)))
|
if ((top) && (elm_win_xwindow_get(top)))
|
||||||
{
|
{
|
||||||
ecore_x_selection_primary_request
|
ecore_x_selection_primary_request
|
||||||
(elm_win_xwindow_get(top),
|
(elm_win_xwindow_get(top),
|
||||||
ECORE_X_SELECTION_TARGET_UTF8_STRING);
|
ECORE_X_SELECTION_TARGET_UTF8_STRING);
|
||||||
wd->selection_asked = EINA_TRUE;
|
wd->selection_asked = EINA_TRUE;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -278,20 +278,20 @@ _long_press(void *data)
|
||||||
evas_object_smart_callback_add(wd->hoversel, "dismissed", _dismissed, data);
|
evas_object_smart_callback_add(wd->hoversel, "dismissed", _dismissed, data);
|
||||||
if (!wd->selmode)
|
if (!wd->selmode)
|
||||||
{
|
{
|
||||||
elm_hoversel_item_add(wd->hoversel, "Select", NULL, ELM_ICON_NONE, _select, data);
|
elm_hoversel_item_add(wd->hoversel, "Select", NULL, ELM_ICON_NONE, _select, data);
|
||||||
elm_hoversel_item_add(wd->hoversel, "Paste", NULL, ELM_ICON_NONE, _paste, data);
|
elm_hoversel_item_add(wd->hoversel, "Paste", NULL, ELM_ICON_NONE, _paste, data);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
elm_hoversel_item_add(wd->hoversel, "Copy", NULL, ELM_ICON_NONE, _copy, data);
|
elm_hoversel_item_add(wd->hoversel, "Copy", NULL, ELM_ICON_NONE, _copy, data);
|
||||||
elm_hoversel_item_add(wd->hoversel, "Cut", NULL, ELM_ICON_NONE, _cut, data);
|
elm_hoversel_item_add(wd->hoversel, "Cut", NULL, ELM_ICON_NONE, _cut, data);
|
||||||
elm_hoversel_item_add(wd->hoversel, "Cancel", NULL, ELM_ICON_NONE, _cancel, data);
|
elm_hoversel_item_add(wd->hoversel, "Cancel", NULL, ELM_ICON_NONE, _cancel, data);
|
||||||
}
|
}
|
||||||
if (wd->hoversel)
|
if (wd->hoversel)
|
||||||
{
|
{
|
||||||
_hoversel_position(data);
|
_hoversel_position(data);
|
||||||
evas_object_show(wd->hoversel);
|
evas_object_show(wd->hoversel);
|
||||||
elm_hoversel_hover_begin(wd->hoversel);
|
elm_hoversel_hover_begin(wd->hoversel);
|
||||||
}
|
}
|
||||||
wd->longpress_timer = NULL;
|
wd->longpress_timer = NULL;
|
||||||
edje_object_part_text_select_allow_set(wd->ent, "elm.text", 0);
|
edje_object_part_text_select_allow_set(wd->ent, "elm.text", 0);
|
||||||
|
@ -322,9 +322,9 @@ _mouse_up(void *data, Evas *evas, Evas_Object *obj, void *event_info)
|
||||||
if (ev->button != 1) return;
|
if (ev->button != 1) return;
|
||||||
if (wd->longpress_timer)
|
if (wd->longpress_timer)
|
||||||
{
|
{
|
||||||
elm_widget_scroll_freeze_pop(data);
|
elm_widget_scroll_freeze_pop(data);
|
||||||
ecore_timer_del(wd->longpress_timer);
|
ecore_timer_del(wd->longpress_timer);
|
||||||
wd->longpress_timer = NULL;
|
wd->longpress_timer = NULL;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -335,49 +335,49 @@ _mouse_move(void *data, Evas *evas, Evas_Object *obj, void *event_info)
|
||||||
Evas_Event_Mouse_Move *ev = event_info;
|
Evas_Event_Mouse_Move *ev = event_info;
|
||||||
if (!wd->selmode)
|
if (!wd->selmode)
|
||||||
{
|
{
|
||||||
if (ev->event_flags & EVAS_EVENT_FLAG_ON_HOLD)
|
if (ev->event_flags & EVAS_EVENT_FLAG_ON_HOLD)
|
||||||
{
|
{
|
||||||
if (wd->longpress_timer)
|
if (wd->longpress_timer)
|
||||||
{
|
{
|
||||||
elm_widget_scroll_freeze_pop(data);
|
elm_widget_scroll_freeze_pop(data);
|
||||||
ecore_timer_del(wd->longpress_timer);
|
ecore_timer_del(wd->longpress_timer);
|
||||||
wd->longpress_timer = NULL;
|
wd->longpress_timer = NULL;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (wd->longpress_timer)
|
else if (wd->longpress_timer)
|
||||||
{
|
{
|
||||||
Evas_Coord dx, dy;
|
Evas_Coord dx, dy;
|
||||||
|
|
||||||
dx = wd->downx - ev->cur.canvas.x;
|
dx = wd->downx - ev->cur.canvas.x;
|
||||||
dx *= dx;
|
dx *= dx;
|
||||||
dy = wd->downy - ev->cur.canvas.y;
|
dy = wd->downy - ev->cur.canvas.y;
|
||||||
dy *= dy;
|
dy *= dy;
|
||||||
if ((dx + dy) >
|
if ((dx + dy) >
|
||||||
((_elm_config->finger_size / 2) *
|
((_elm_config->finger_size / 2) *
|
||||||
(_elm_config->finger_size / 2)))
|
(_elm_config->finger_size / 2)))
|
||||||
{
|
{
|
||||||
elm_widget_scroll_freeze_pop(data);
|
elm_widget_scroll_freeze_pop(data);
|
||||||
ecore_timer_del(wd->longpress_timer);
|
ecore_timer_del(wd->longpress_timer);
|
||||||
wd->longpress_timer = NULL;
|
wd->longpress_timer = NULL;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (wd->longpress_timer)
|
else if (wd->longpress_timer)
|
||||||
{
|
{
|
||||||
Evas_Coord dx, dy;
|
Evas_Coord dx, dy;
|
||||||
|
|
||||||
dx = wd->downx - ev->cur.canvas.x;
|
dx = wd->downx - ev->cur.canvas.x;
|
||||||
dx *= dx;
|
dx *= dx;
|
||||||
dy = wd->downy - ev->cur.canvas.y;
|
dy = wd->downy - ev->cur.canvas.y;
|
||||||
dy *= dy;
|
dy *= dy;
|
||||||
if ((dx + dy) >
|
if ((dx + dy) >
|
||||||
((_elm_config->finger_size / 2) *
|
((_elm_config->finger_size / 2) *
|
||||||
(_elm_config->finger_size / 2)))
|
(_elm_config->finger_size / 2)))
|
||||||
{
|
{
|
||||||
elm_widget_scroll_freeze_pop(data);
|
elm_widget_scroll_freeze_pop(data);
|
||||||
ecore_timer_del(wd->longpress_timer);
|
ecore_timer_del(wd->longpress_timer);
|
||||||
wd->longpress_timer = NULL;
|
wd->longpress_timer = NULL;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -421,14 +421,14 @@ _str_append(char *str, const char *txt, int *len, int *alloc)
|
||||||
if (txt_len <= 0) return str;
|
if (txt_len <= 0) return str;
|
||||||
if ((*len + txt_len) >= *alloc)
|
if ((*len + txt_len) >= *alloc)
|
||||||
{
|
{
|
||||||
char *str2;
|
char *str2;
|
||||||
int alloc2;
|
int alloc2;
|
||||||
|
|
||||||
alloc2 = *alloc + txt_len + 128;
|
alloc2 = *alloc + txt_len + 128;
|
||||||
str2 = realloc(str, alloc2);
|
str2 = realloc(str, alloc2);
|
||||||
if (!str2) return str;
|
if (!str2) return str;
|
||||||
*alloc = alloc2;
|
*alloc = alloc2;
|
||||||
str = str2;
|
str = str2;
|
||||||
}
|
}
|
||||||
strcpy(str + *len, txt);
|
strcpy(str + *len, txt);
|
||||||
*len += txt_len;
|
*len += txt_len;
|
||||||
|
@ -449,114 +449,114 @@ _mkup_to_text(const char *mkup)
|
||||||
s = p;
|
s = p;
|
||||||
for (;;)
|
for (;;)
|
||||||
{
|
{
|
||||||
if ((*p == 0) ||
|
if ((*p == 0) ||
|
||||||
(tag_end) || (esc_end) ||
|
(tag_end) || (esc_end) ||
|
||||||
(tag_start) || (esc_start))
|
(tag_start) || (esc_start))
|
||||||
{
|
{
|
||||||
if (tag_end)
|
if (tag_end)
|
||||||
{
|
{
|
||||||
char *ttag, *match;
|
char *ttag, *match;
|
||||||
|
|
||||||
ttag = malloc(tag_end - tag_start);
|
ttag = malloc(tag_end - tag_start);
|
||||||
if (ttag)
|
if (ttag)
|
||||||
{
|
{
|
||||||
strncpy(ttag, tag_start + 1, tag_end - tag_start - 1);
|
strncpy(ttag, tag_start + 1, tag_end - tag_start - 1);
|
||||||
ttag[tag_end - tag_start - 1] = 0;
|
ttag[tag_end - tag_start - 1] = 0;
|
||||||
if (!strcmp(ttag, "br"))
|
if (!strcmp(ttag, "br"))
|
||||||
str = _str_append(str, "\n", &str_len, &str_alloc);
|
str = _str_append(str, "\n", &str_len, &str_alloc);
|
||||||
else if (!strcmp(ttag, "\n"))
|
else if (!strcmp(ttag, "\n"))
|
||||||
str = _str_append(str, "\n", &str_len, &str_alloc);
|
str = _str_append(str, "\n", &str_len, &str_alloc);
|
||||||
else if (!strcmp(ttag, "\\n"))
|
else if (!strcmp(ttag, "\\n"))
|
||||||
str = _str_append(str, "\n", &str_len, &str_alloc);
|
str = _str_append(str, "\n", &str_len, &str_alloc);
|
||||||
else if (!strcmp(ttag, "\t"))
|
else if (!strcmp(ttag, "\t"))
|
||||||
str = _str_append(str, "\t", &str_len, &str_alloc);
|
str = _str_append(str, "\t", &str_len, &str_alloc);
|
||||||
else if (!strcmp(ttag, "\\t"))
|
else if (!strcmp(ttag, "\\t"))
|
||||||
str = _str_append(str, "\t", &str_len, &str_alloc);
|
str = _str_append(str, "\t", &str_len, &str_alloc);
|
||||||
free(ttag);
|
free(ttag);
|
||||||
}
|
}
|
||||||
tag_start = tag_end = NULL;
|
tag_start = tag_end = NULL;
|
||||||
}
|
}
|
||||||
else if (esc_end)
|
else if (esc_end)
|
||||||
{
|
{
|
||||||
ts = malloc(esc_end - esc_start + 1);
|
ts = malloc(esc_end - esc_start + 1);
|
||||||
if (ts)
|
if (ts)
|
||||||
{
|
{
|
||||||
const char *esc;
|
const char *esc;
|
||||||
strncpy(ts, esc_start, esc_end - esc_start);
|
strncpy(ts, esc_start, esc_end - esc_start);
|
||||||
ts[esc_end - esc_start] = 0;
|
ts[esc_end - esc_start] = 0;
|
||||||
esc = evas_textblock_escape_string_get(ts);
|
esc = evas_textblock_escape_string_get(ts);
|
||||||
if (esc)
|
if (esc)
|
||||||
str = _str_append(str, esc, &str_len, &str_alloc);
|
str = _str_append(str, esc, &str_len, &str_alloc);
|
||||||
free(ts);
|
free(ts);
|
||||||
}
|
}
|
||||||
esc_start = esc_end = NULL;
|
esc_start = esc_end = NULL;
|
||||||
}
|
}
|
||||||
else if (*p == 0)
|
else if (*p == 0)
|
||||||
{
|
{
|
||||||
ts = malloc(p - s + 1);
|
ts = malloc(p - s + 1);
|
||||||
if (ts)
|
if (ts)
|
||||||
{
|
{
|
||||||
strncpy(ts, s, p - s);
|
strncpy(ts, s, p - s);
|
||||||
ts[p - s] = 0;
|
ts[p - s] = 0;
|
||||||
str = _str_append(str, ts, &str_len, &str_alloc);
|
str = _str_append(str, ts, &str_len, &str_alloc);
|
||||||
free(ts);
|
free(ts);
|
||||||
}
|
}
|
||||||
s = NULL;
|
s = NULL;
|
||||||
}
|
}
|
||||||
if (*p == 0)
|
if (*p == 0)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
if (*p == '<')
|
if (*p == '<')
|
||||||
{
|
{
|
||||||
if (!esc_start)
|
if (!esc_start)
|
||||||
{
|
{
|
||||||
tag_start = p;
|
tag_start = p;
|
||||||
tag_end = NULL;
|
tag_end = NULL;
|
||||||
ts = malloc(p - s + 1);
|
ts = malloc(p - s + 1);
|
||||||
if (ts)
|
if (ts)
|
||||||
{
|
{
|
||||||
strncpy(ts, s, p - s);
|
strncpy(ts, s, p - s);
|
||||||
ts[p - s] = 0;
|
ts[p - s] = 0;
|
||||||
str = _str_append(str, ts, &str_len, &str_alloc);
|
str = _str_append(str, ts, &str_len, &str_alloc);
|
||||||
free(ts);
|
free(ts);
|
||||||
}
|
}
|
||||||
s = NULL;
|
s = NULL;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (*p == '>')
|
else if (*p == '>')
|
||||||
{
|
{
|
||||||
if (tag_start)
|
if (tag_start)
|
||||||
{
|
{
|
||||||
tag_end = p;
|
tag_end = p;
|
||||||
s = p + 1;
|
s = p + 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (*p == '&')
|
else if (*p == '&')
|
||||||
{
|
{
|
||||||
if (!tag_start)
|
if (!tag_start)
|
||||||
{
|
{
|
||||||
esc_start = p;
|
esc_start = p;
|
||||||
esc_end = NULL;
|
esc_end = NULL;
|
||||||
ts = malloc(p - s + 1);
|
ts = malloc(p - s + 1);
|
||||||
if (ts)
|
if (ts)
|
||||||
{
|
{
|
||||||
strncpy(ts, s, p - s);
|
strncpy(ts, s, p - s);
|
||||||
ts[p - s] = 0;
|
ts[p - s] = 0;
|
||||||
str = _str_append(str, ts, &str_len, &str_alloc);
|
str = _str_append(str, ts, &str_len, &str_alloc);
|
||||||
free(ts);
|
free(ts);
|
||||||
}
|
}
|
||||||
s = NULL;
|
s = NULL;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (*p == ';')
|
else if (*p == ';')
|
||||||
{
|
{
|
||||||
if (esc_start)
|
if (esc_start)
|
||||||
{
|
{
|
||||||
esc_end = p;
|
esc_end = p;
|
||||||
s = p + 1;
|
s = p + 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
p++;
|
p++;
|
||||||
}
|
}
|
||||||
return str;
|
return str;
|
||||||
}
|
}
|
||||||
|
@ -571,23 +571,23 @@ _text_to_mkup(const char *text)
|
||||||
if (!text) return NULL;
|
if (!text) return NULL;
|
||||||
for (;;)
|
for (;;)
|
||||||
{
|
{
|
||||||
// FIXME: use evas_string_char_next_get()
|
// FIXME: use evas_string_char_next_get()
|
||||||
pos = pos2;
|
pos = pos2;
|
||||||
ch = evas_common_font_utf8_get_next((unsigned char *)(text), &pos2);
|
ch = evas_common_font_utf8_get_next((unsigned char *)(text), &pos2);
|
||||||
if (ch <= 0) break;
|
if (ch <= 0) break;
|
||||||
if (ch == '\n') str = _str_append(str, "<br>", &str_len, &str_alloc);
|
if (ch == '\n') str = _str_append(str, "<br>", &str_len, &str_alloc);
|
||||||
else if (ch == '\t') str = _str_append(str, "<\t>", &str_len, &str_alloc);
|
else if (ch == '\t') str = _str_append(str, "<\t>", &str_len, &str_alloc);
|
||||||
else if (ch == '<') str = _str_append(str, "<", &str_len, &str_alloc);
|
else if (ch == '<') str = _str_append(str, "<", &str_len, &str_alloc);
|
||||||
else if (ch == '>') str = _str_append(str, ">", &str_len, &str_alloc);
|
else if (ch == '>') str = _str_append(str, ">", &str_len, &str_alloc);
|
||||||
else if (ch == '&') str = _str_append(str, "&", &str_len, &str_alloc);
|
else if (ch == '&') str = _str_append(str, "&", &str_len, &str_alloc);
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
char tstr[16];
|
char tstr[16];
|
||||||
|
|
||||||
strncpy(tstr, text + pos, pos2 - pos);
|
strncpy(tstr, text + pos, pos2 - pos);
|
||||||
tstr[pos2 - pos] = 0;
|
tstr[pos2 - pos] = 0;
|
||||||
str = _str_append(str, tstr, &str_len, &str_alloc);
|
str = _str_append(str, tstr, &str_len, &str_alloc);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return str;
|
return str;
|
||||||
}
|
}
|
||||||
|
@ -609,25 +609,25 @@ _signal_selection_start(void *data, Evas_Object *obj, const char *emission, cons
|
||||||
Evas_Object *entry;
|
Evas_Object *entry;
|
||||||
EINA_LIST_FOREACH(entries, l, entry)
|
EINA_LIST_FOREACH(entries, l, entry)
|
||||||
{
|
{
|
||||||
if (entry != data) elm_entry_select_none(entry);
|
if (entry != data) elm_entry_select_none(entry);
|
||||||
}
|
}
|
||||||
wd->have_selection = EINA_TRUE;
|
wd->have_selection = EINA_TRUE;
|
||||||
evas_object_smart_callback_call(data, "selection,start", NULL);
|
evas_object_smart_callback_call(data, "selection,start", NULL);
|
||||||
if (wd->sel_notify_handler)
|
if (wd->sel_notify_handler)
|
||||||
{
|
{
|
||||||
char *txt = _mkup_to_text(elm_entry_selection_get(data));
|
char *txt = _mkup_to_text(elm_entry_selection_get(data));
|
||||||
if (txt)
|
if (txt)
|
||||||
{
|
{
|
||||||
#ifdef HAVE_ELEMENTARY_X
|
#ifdef HAVE_ELEMENTARY_X
|
||||||
Evas_Object *top;
|
Evas_Object *top;
|
||||||
|
|
||||||
top = elm_widget_top_get(data);
|
top = elm_widget_top_get(data);
|
||||||
if ((top) && (elm_win_xwindow_get(top)))
|
if ((top) && (elm_win_xwindow_get(top)))
|
||||||
ecore_x_selection_primary_set
|
ecore_x_selection_primary_set
|
||||||
(elm_win_xwindow_get(top), txt, strlen(txt));
|
(elm_win_xwindow_get(top), txt, strlen(txt));
|
||||||
#endif
|
#endif
|
||||||
free(txt);
|
free(txt);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -639,19 +639,19 @@ _signal_selection_changed(void *data, Evas_Object *obj, const char *emission, co
|
||||||
evas_object_smart_callback_call(data, "selection,changed", NULL);
|
evas_object_smart_callback_call(data, "selection,changed", NULL);
|
||||||
if (wd->sel_notify_handler)
|
if (wd->sel_notify_handler)
|
||||||
{
|
{
|
||||||
char *txt = _mkup_to_text(elm_entry_selection_get(data));
|
char *txt = _mkup_to_text(elm_entry_selection_get(data));
|
||||||
if (txt)
|
if (txt)
|
||||||
{
|
{
|
||||||
#ifdef HAVE_ELEMENTARY_X
|
#ifdef HAVE_ELEMENTARY_X
|
||||||
Evas_Object *top;
|
Evas_Object *top;
|
||||||
|
|
||||||
top = elm_widget_top_get(data);
|
top = elm_widget_top_get(data);
|
||||||
if ((top) && (elm_win_xwindow_get(top)))
|
if ((top) && (elm_win_xwindow_get(top)))
|
||||||
ecore_x_selection_primary_set
|
ecore_x_selection_primary_set
|
||||||
(elm_win_xwindow_get(top), txt, strlen(txt));
|
(elm_win_xwindow_get(top), txt, strlen(txt));
|
||||||
#endif
|
#endif
|
||||||
free(txt);
|
free(txt);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -664,38 +664,38 @@ _signal_selection_cleared(void *data, Evas_Object *obj, const char *emission, co
|
||||||
evas_object_smart_callback_call(data, "selection,cleared", NULL);
|
evas_object_smart_callback_call(data, "selection,cleared", NULL);
|
||||||
if (wd->sel_notify_handler)
|
if (wd->sel_notify_handler)
|
||||||
{
|
{
|
||||||
if (wd->cut_sel)
|
if (wd->cut_sel)
|
||||||
{
|
{
|
||||||
#ifdef HAVE_ELEMENTARY_X
|
#ifdef HAVE_ELEMENTARY_X
|
||||||
Evas_Object *top;
|
Evas_Object *top;
|
||||||
|
|
||||||
top = elm_widget_top_get(data);
|
top = elm_widget_top_get(data);
|
||||||
if ((top) && (elm_win_xwindow_get(top)))
|
if ((top) && (elm_win_xwindow_get(top)))
|
||||||
{
|
{
|
||||||
char *t;
|
char *t;
|
||||||
|
|
||||||
t = _mkup_to_text(wd->cut_sel);
|
t = _mkup_to_text(wd->cut_sel);
|
||||||
if (t)
|
if (t)
|
||||||
{
|
{
|
||||||
ecore_x_selection_primary_set
|
ecore_x_selection_primary_set
|
||||||
(elm_win_xwindow_get(top), t, strlen(t));
|
(elm_win_xwindow_get(top), t, strlen(t));
|
||||||
free(t);
|
free(t);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
eina_stringshare_del(wd->cut_sel);
|
eina_stringshare_del(wd->cut_sel);
|
||||||
wd->cut_sel = NULL;
|
wd->cut_sel = NULL;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
#ifdef HAVE_ELEMENTARY_X
|
#ifdef HAVE_ELEMENTARY_X
|
||||||
Evas_Object *top;
|
Evas_Object *top;
|
||||||
|
|
||||||
top = elm_widget_top_get(data);
|
top = elm_widget_top_get(data);
|
||||||
if ((top) && (elm_win_xwindow_get(top)))
|
if ((top) && (elm_win_xwindow_get(top)))
|
||||||
ecore_x_selection_primary_clear();
|
ecore_x_selection_primary_clear();
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -707,16 +707,16 @@ _signal_entry_paste_request(void *data, Evas_Object *obj, const char *emission,
|
||||||
if (wd->sel_notify_handler)
|
if (wd->sel_notify_handler)
|
||||||
{
|
{
|
||||||
#ifdef HAVE_ELEMENTARY_X
|
#ifdef HAVE_ELEMENTARY_X
|
||||||
Evas_Object *top;
|
Evas_Object *top;
|
||||||
|
|
||||||
top = elm_widget_top_get(data);
|
top = elm_widget_top_get(data);
|
||||||
if ((top) && (elm_win_xwindow_get(top)))
|
if ((top) && (elm_win_xwindow_get(top)))
|
||||||
{
|
{
|
||||||
ecore_x_selection_primary_request
|
ecore_x_selection_primary_request
|
||||||
(elm_win_xwindow_get(top),
|
(elm_win_xwindow_get(top),
|
||||||
ECORE_X_SELECTION_TARGET_UTF8_STRING);
|
ECORE_X_SELECTION_TARGET_UTF8_STRING);
|
||||||
wd->selection_asked = EINA_TRUE;
|
wd->selection_asked = EINA_TRUE;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -739,8 +739,8 @@ _signal_entry_cut_notify(void *data, Evas_Object *obj, const char *emission, con
|
||||||
txt = _mkup_to_text(elm_entry_selection_get(data));
|
txt = _mkup_to_text(elm_entry_selection_get(data));
|
||||||
if (txt)
|
if (txt)
|
||||||
{
|
{
|
||||||
wd->cut_sel = eina_stringshare_add(txt);
|
wd->cut_sel = eina_stringshare_add(txt);
|
||||||
free(txt);
|
free(txt);
|
||||||
}
|
}
|
||||||
edje_object_part_text_insert(wd->ent, "elm.text", "");
|
edje_object_part_text_insert(wd->ent, "elm.text", "");
|
||||||
wd->changed = EINA_TRUE;
|
wd->changed = EINA_TRUE;
|
||||||
|
@ -758,11 +758,11 @@ _signal_cursor_changed(void *data, Evas_Object *obj, const char *emission, const
|
||||||
elm_widget_show_region_set(data, cx, cy, cw, ch);
|
elm_widget_show_region_set(data, cx, cy, cw, ch);
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
wd->deferred_cur = EINA_TRUE;
|
wd->deferred_cur = EINA_TRUE;
|
||||||
wd->cx = cx;
|
wd->cx = cx;
|
||||||
wd->cy = cy;
|
wd->cy = cy;
|
||||||
wd->cw = cw;
|
wd->cw = cw;
|
||||||
wd->ch = ch;
|
wd->ch = ch;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -859,22 +859,22 @@ _event_selection_notify(void *data, int type, void *event)
|
||||||
if ((ev->selection == ECORE_X_SELECTION_CLIPBOARD) ||
|
if ((ev->selection == ECORE_X_SELECTION_CLIPBOARD) ||
|
||||||
(ev->selection == ECORE_X_SELECTION_PRIMARY))
|
(ev->selection == ECORE_X_SELECTION_PRIMARY))
|
||||||
{
|
{
|
||||||
Ecore_X_Selection_Data_Text *text_data;
|
Ecore_X_Selection_Data_Text *text_data;
|
||||||
|
|
||||||
text_data = ev->data;
|
text_data = ev->data;
|
||||||
if (text_data->data.content == ECORE_X_SELECTION_CONTENT_TEXT)
|
if (text_data->data.content == ECORE_X_SELECTION_CONTENT_TEXT)
|
||||||
{
|
{
|
||||||
if (text_data->text)
|
if (text_data->text)
|
||||||
{
|
{
|
||||||
char *txt = _text_to_mkup(text_data->text);
|
char *txt = _text_to_mkup(text_data->text);
|
||||||
if (txt)
|
if (txt)
|
||||||
{
|
{
|
||||||
elm_entry_entry_insert(data, txt);
|
elm_entry_entry_insert(data, txt);
|
||||||
free(txt);
|
free(txt);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
wd->selection_asked = EINA_FALSE;
|
wd->selection_asked = EINA_FALSE;
|
||||||
}
|
}
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
@ -888,7 +888,7 @@ _event_selection_clear(void *data, int type, void *event)
|
||||||
if ((ev->selection == ECORE_X_SELECTION_CLIPBOARD) ||
|
if ((ev->selection == ECORE_X_SELECTION_CLIPBOARD) ||
|
||||||
(ev->selection == ECORE_X_SELECTION_PRIMARY))
|
(ev->selection == ECORE_X_SELECTION_PRIMARY))
|
||||||
{
|
{
|
||||||
elm_entry_select_none(data);
|
elm_entry_select_none(data);
|
||||||
}
|
}
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
@ -945,12 +945,12 @@ elm_entry_add(Evas_Object *parent)
|
||||||
top = elm_widget_top_get(obj);
|
top = elm_widget_top_get(obj);
|
||||||
if ((top) && (elm_win_xwindow_get(top)))
|
if ((top) && (elm_win_xwindow_get(top)))
|
||||||
{
|
{
|
||||||
wd->sel_notify_handler =
|
wd->sel_notify_handler =
|
||||||
ecore_event_handler_add(ECORE_X_EVENT_SELECTION_NOTIFY,
|
ecore_event_handler_add(ECORE_X_EVENT_SELECTION_NOTIFY,
|
||||||
_event_selection_notify, obj);
|
_event_selection_notify, obj);
|
||||||
wd->sel_clear_handler =
|
wd->sel_clear_handler =
|
||||||
ecore_event_handler_add(ECORE_X_EVENT_SELECTION_CLEAR,
|
ecore_event_handler_add(ECORE_X_EVENT_SELECTION_CLEAR,
|
||||||
_event_selection_clear, obj);
|
_event_selection_clear, obj);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -1068,9 +1068,9 @@ elm_entry_select_none(Evas_Object *obj)
|
||||||
Widget_Data *wd = elm_widget_data_get(obj);
|
Widget_Data *wd = elm_widget_data_get(obj);
|
||||||
if (wd->selmode)
|
if (wd->selmode)
|
||||||
{
|
{
|
||||||
wd->selmode = EINA_FALSE;
|
wd->selmode = EINA_FALSE;
|
||||||
edje_object_part_text_select_allow_set(wd->ent, "elm.text", 0);
|
edje_object_part_text_select_allow_set(wd->ent, "elm.text", 0);
|
||||||
edje_object_signal_emit(wd->ent, "elm,state,select,off", "elm");
|
edje_object_signal_emit(wd->ent, "elm,state,select,off", "elm");
|
||||||
}
|
}
|
||||||
wd->have_selection = EINA_FALSE;
|
wd->have_selection = EINA_FALSE;
|
||||||
edje_object_part_text_select_none(wd->ent, "elm.text");
|
edje_object_part_text_select_none(wd->ent, "elm.text");
|
||||||
|
@ -1082,9 +1082,9 @@ elm_entry_select_all(Evas_Object *obj)
|
||||||
Widget_Data *wd = elm_widget_data_get(obj);
|
Widget_Data *wd = elm_widget_data_get(obj);
|
||||||
if (wd->selmode)
|
if (wd->selmode)
|
||||||
{
|
{
|
||||||
wd->selmode = EINA_FALSE;
|
wd->selmode = EINA_FALSE;
|
||||||
edje_object_part_text_select_allow_set(wd->ent, "elm.text", 0);
|
edje_object_part_text_select_allow_set(wd->ent, "elm.text", 0);
|
||||||
edje_object_signal_emit(wd->ent, "elm,state,select,off", "elm");
|
edje_object_signal_emit(wd->ent, "elm,state,select,off", "elm");
|
||||||
}
|
}
|
||||||
wd->have_selection = EINA_TRUE;
|
wd->have_selection = EINA_TRUE;
|
||||||
edje_object_part_text_select_all(wd->ent, "elm.text");
|
edje_object_part_text_select_all(wd->ent, "elm.text");
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -398,19 +398,19 @@ elm_hover_best_content_location_get(const Evas_Object *obj, Elm_Hover_Axis pref_
|
||||||
if (spc_b < 0) spc_b = 0;
|
if (spc_b < 0) spc_b = 0;
|
||||||
if (pref_axis == ELM_HOVER_AXIS_HORIZONTAL)
|
if (pref_axis == ELM_HOVER_AXIS_HORIZONTAL)
|
||||||
{
|
{
|
||||||
if (spc_l < spc_r) return "right";
|
if (spc_l < spc_r) return "right";
|
||||||
else return "left";
|
else return "left";
|
||||||
}
|
}
|
||||||
else if (pref_axis == ELM_HOVER_AXIS_VERTICAL)
|
else if (pref_axis == ELM_HOVER_AXIS_VERTICAL)
|
||||||
{
|
{
|
||||||
if (spc_t < spc_b) return "bottom";
|
if (spc_t < spc_b) return "bottom";
|
||||||
else return "top";
|
else return "top";
|
||||||
}
|
}
|
||||||
if (spc_l < spc_r)
|
if (spc_l < spc_r)
|
||||||
{
|
{
|
||||||
if (spc_t > spc_r) return "top";
|
if (spc_t > spc_r) return "top";
|
||||||
else if (spc_b > spc_r) return "bottom";
|
else if (spc_b > spc_r) return "bottom";
|
||||||
return "right";
|
return "right";
|
||||||
}
|
}
|
||||||
if (spc_t > spc_r) return "top";
|
if (spc_t > spc_r) return "top";
|
||||||
else if (spc_b > spc_r) return "bottom";
|
else if (spc_b > spc_r) return "bottom";
|
||||||
|
|
|
@ -55,7 +55,7 @@ _sizing_eval(Evas_Object *obj)
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
_els_smart_icon_scale_set(wd->img, elm_widget_scale_get(obj) *
|
_els_smart_icon_scale_set(wd->img, elm_widget_scale_get(obj) *
|
||||||
_elm_config->scale);
|
_elm_config->scale);
|
||||||
_els_smart_icon_size_get(wd->img, &w, &h);
|
_els_smart_icon_size_get(wd->img, &w, &h);
|
||||||
}
|
}
|
||||||
if (!wd->scale_down)
|
if (!wd->scale_down)
|
||||||
|
|
|
@ -50,14 +50,14 @@ _del_hook(Evas_Object *obj)
|
||||||
EINA_LIST_FREE(wd->items, it)
|
EINA_LIST_FREE(wd->items, it)
|
||||||
{
|
{
|
||||||
if (it->del_cb) it->del_cb((void *)it->data, it->obj, it);
|
if (it->del_cb) it->del_cb((void *)it->data, it->obj, it);
|
||||||
eina_stringshare_del(it->label);
|
eina_stringshare_del(it->label);
|
||||||
if (!it->fixed)
|
if (!it->fixed)
|
||||||
{
|
{
|
||||||
if (it->icon) evas_object_del(it->icon);
|
if (it->icon) evas_object_del(it->icon);
|
||||||
if (it->end) evas_object_del(it->end);
|
if (it->end) evas_object_del(it->end);
|
||||||
}
|
}
|
||||||
if (it->base) evas_object_del(it->base);
|
if (it->base) evas_object_del(it->base);
|
||||||
free(it);
|
free(it);
|
||||||
}
|
}
|
||||||
eina_list_free(wd->selected);
|
eina_list_free(wd->selected);
|
||||||
free(wd);
|
free(wd);
|
||||||
|
@ -101,16 +101,16 @@ _sub_del(void *data, Evas_Object *obj, void *event_info)
|
||||||
|
|
||||||
EINA_LIST_FOREACH(wd->items, l, it)
|
EINA_LIST_FOREACH(wd->items, l, it)
|
||||||
{
|
{
|
||||||
if ((sub == it->icon) || (sub == it->end))
|
if ((sub == it->icon) || (sub == it->end))
|
||||||
{
|
{
|
||||||
if (it->icon == sub) it->icon = NULL;
|
if (it->icon == sub) it->icon = NULL;
|
||||||
if (it->end == sub) it->end = NULL;
|
if (it->end == sub) it->end = NULL;
|
||||||
evas_object_event_callback_del
|
evas_object_event_callback_del
|
||||||
(sub, EVAS_CALLBACK_CHANGED_SIZE_HINTS, _changed_size_hints);
|
(sub, EVAS_CALLBACK_CHANGED_SIZE_HINTS, _changed_size_hints);
|
||||||
_fix_items(obj);
|
_fix_items(obj);
|
||||||
_sizing_eval(obj);
|
_sizing_eval(obj);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -134,8 +134,8 @@ _item_select(Elm_List_Item *it)
|
||||||
const char *selectraise;
|
const char *selectraise;
|
||||||
if (it->selected)
|
if (it->selected)
|
||||||
{
|
{
|
||||||
if (wd->always_select) goto call;
|
if (wd->always_select) goto call;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
it->selected = EINA_TRUE;
|
it->selected = EINA_TRUE;
|
||||||
wd->selected = eina_list_append(wd->selected, it);
|
wd->selected = eina_list_append(wd->selected, it);
|
||||||
|
@ -155,15 +155,15 @@ _item_unselect(Elm_List_Item *it)
|
||||||
selectraise = edje_object_data_get(it->base, "selectraise");
|
selectraise = edje_object_data_get(it->base, "selectraise");
|
||||||
if ((selectraise) && (!strcmp(selectraise, "on")))
|
if ((selectraise) && (!strcmp(selectraise, "on")))
|
||||||
{
|
{
|
||||||
if ((stacking) && (!strcmp(stacking, "below")))
|
if ((stacking) && (!strcmp(stacking, "below")))
|
||||||
evas_object_lower(it->base);
|
evas_object_lower(it->base);
|
||||||
}
|
}
|
||||||
it->hilighted = EINA_FALSE;
|
it->hilighted = EINA_FALSE;
|
||||||
if (it->selected)
|
if (it->selected)
|
||||||
{
|
{
|
||||||
it->selected = EINA_FALSE;
|
it->selected = EINA_FALSE;
|
||||||
wd->selected = eina_list_remove(wd->selected, it);
|
wd->selected = eina_list_remove(wd->selected, it);
|
||||||
evas_object_smart_callback_call(it->obj, "unselected", it);
|
evas_object_smart_callback_call(it->obj, "unselected", it);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -175,11 +175,11 @@ _mouse_move(void *data, Evas *evas, Evas_Object *obj, void *event_info)
|
||||||
Evas_Event_Mouse_Move *ev = event_info;
|
Evas_Event_Mouse_Move *ev = event_info;
|
||||||
if (ev->event_flags & EVAS_EVENT_FLAG_ON_HOLD)
|
if (ev->event_flags & EVAS_EVENT_FLAG_ON_HOLD)
|
||||||
{
|
{
|
||||||
if (!wd->on_hold)
|
if (!wd->on_hold)
|
||||||
{
|
{
|
||||||
wd->on_hold = EINA_TRUE;
|
wd->on_hold = EINA_TRUE;
|
||||||
_item_unselect(it);
|
_item_unselect(it);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -206,35 +206,35 @@ _mouse_up(void *data, Evas *evas, Evas_Object *obj, void *event_info)
|
||||||
else wd->on_hold = EINA_FALSE;
|
else wd->on_hold = EINA_FALSE;
|
||||||
if (wd->on_hold)
|
if (wd->on_hold)
|
||||||
{
|
{
|
||||||
wd->on_hold = EINA_FALSE;
|
wd->on_hold = EINA_FALSE;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (wd->multi)
|
if (wd->multi)
|
||||||
{
|
{
|
||||||
if (!it->selected)
|
if (!it->selected)
|
||||||
{
|
{
|
||||||
_item_hilight(it);
|
_item_hilight(it);
|
||||||
_item_select(it);
|
_item_select(it);
|
||||||
}
|
}
|
||||||
else _item_unselect(it);
|
else _item_unselect(it);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (!it->selected)
|
if (!it->selected)
|
||||||
{
|
{
|
||||||
while (wd->selected)
|
while (wd->selected)
|
||||||
_item_unselect(wd->selected->data);
|
_item_unselect(wd->selected->data);
|
||||||
_item_hilight(it);
|
_item_hilight(it);
|
||||||
_item_select(it);
|
_item_select(it);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
const Eina_List *l, *l_next;
|
const Eina_List *l, *l_next;
|
||||||
Elm_List_Item *it2;
|
Elm_List_Item *it2;
|
||||||
EINA_LIST_FOREACH_SAFE(wd->selected, l, l_next, it2)
|
EINA_LIST_FOREACH_SAFE(wd->selected, l, l_next, it2)
|
||||||
if (it2 != it) _item_unselect(it2);
|
if (it2 != it) _item_unselect(it2);
|
||||||
_item_hilight(it);
|
_item_hilight(it);
|
||||||
_item_select(it);
|
_item_select(it);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -254,24 +254,24 @@ _item_new(Evas_Object *obj, const char *label, Evas_Object *icon, Evas_Object *e
|
||||||
it->data = data;
|
it->data = data;
|
||||||
it->base = edje_object_add(evas_object_evas_get(obj));
|
it->base = edje_object_add(evas_object_evas_get(obj));
|
||||||
evas_object_event_callback_add(it->base, EVAS_CALLBACK_MOUSE_DOWN,
|
evas_object_event_callback_add(it->base, EVAS_CALLBACK_MOUSE_DOWN,
|
||||||
_mouse_down, it);
|
_mouse_down, it);
|
||||||
evas_object_event_callback_add(it->base, EVAS_CALLBACK_MOUSE_UP,
|
evas_object_event_callback_add(it->base, EVAS_CALLBACK_MOUSE_UP,
|
||||||
_mouse_up, it);
|
_mouse_up, it);
|
||||||
evas_object_event_callback_add(it->base, EVAS_CALLBACK_MOUSE_MOVE,
|
evas_object_event_callback_add(it->base, EVAS_CALLBACK_MOUSE_MOVE,
|
||||||
_mouse_move, it);
|
_mouse_move, it);
|
||||||
evas_object_size_hint_weight_set(it->base, 1.0, 1.0);
|
evas_object_size_hint_weight_set(it->base, 1.0, 1.0);
|
||||||
evas_object_size_hint_align_set(it->base, -1.0, -1.0);
|
evas_object_size_hint_align_set(it->base, -1.0, -1.0);
|
||||||
if (it->icon)
|
if (it->icon)
|
||||||
{
|
{
|
||||||
elm_widget_sub_object_add(obj, it->icon);
|
elm_widget_sub_object_add(obj, it->icon);
|
||||||
evas_object_event_callback_add(it->icon, EVAS_CALLBACK_CHANGED_SIZE_HINTS,
|
evas_object_event_callback_add(it->icon, EVAS_CALLBACK_CHANGED_SIZE_HINTS,
|
||||||
_changed_size_hints, obj);
|
_changed_size_hints, obj);
|
||||||
}
|
}
|
||||||
if (it->end)
|
if (it->end)
|
||||||
{
|
{
|
||||||
elm_widget_sub_object_add(obj, it->end);
|
elm_widget_sub_object_add(obj, it->end);
|
||||||
evas_object_event_callback_add(it->end, EVAS_CALLBACK_CHANGED_SIZE_HINTS,
|
evas_object_event_callback_add(it->end, EVAS_CALLBACK_CHANGED_SIZE_HINTS,
|
||||||
_changed_size_hints, obj);
|
_changed_size_hints, obj);
|
||||||
}
|
}
|
||||||
return it;
|
return it;
|
||||||
}
|
}
|
||||||
|
@ -289,107 +289,107 @@ _fix_items(Evas_Object *obj)
|
||||||
|
|
||||||
EINA_LIST_FOREACH(wd->items, l, it)
|
EINA_LIST_FOREACH(wd->items, l, it)
|
||||||
{
|
{
|
||||||
Evas_Coord mw, mh;
|
Evas_Coord mw, mh;
|
||||||
if (it->icon)
|
if (it->icon)
|
||||||
{
|
{
|
||||||
evas_object_size_hint_min_get(it->icon, &mw, &mh);
|
evas_object_size_hint_min_get(it->icon, &mw, &mh);
|
||||||
if (mw > minw[0]) minw[0] = mw;
|
if (mw > minw[0]) minw[0] = mw;
|
||||||
if (mh > minh[0]) minh[0] = mh;
|
if (mh > minh[0]) minh[0] = mh;
|
||||||
}
|
}
|
||||||
if (it->end)
|
if (it->end)
|
||||||
{
|
{
|
||||||
evas_object_size_hint_min_get(it->end, &mw, &mh);
|
evas_object_size_hint_min_get(it->end, &mw, &mh);
|
||||||
if (mw > minw[1]) minw[1] = mw;
|
if (mw > minw[1]) minw[1] = mw;
|
||||||
if (mh > minh[1]) minh[1] = mh;
|
if (mh > minh[1]) minh[1] = mh;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if ((minw[0] != wd->minw[0]) || (minw[1] != wd->minw[1]) ||
|
if ((minw[0] != wd->minw[0]) || (minw[1] != wd->minw[1]) ||
|
||||||
(minw[0] != wd->minh[0]) || (minh[1] != wd->minh[1]))
|
(minw[0] != wd->minh[0]) || (minh[1] != wd->minh[1]))
|
||||||
{
|
{
|
||||||
wd->minw[0] = minw[0];
|
wd->minw[0] = minw[0];
|
||||||
wd->minw[1] = minw[1];
|
wd->minw[1] = minw[1];
|
||||||
wd->minh[0] = minh[0];
|
wd->minh[0] = minh[0];
|
||||||
wd->minh[1] = minh[1];
|
wd->minh[1] = minh[1];
|
||||||
redo = 1;
|
redo = 1;
|
||||||
}
|
}
|
||||||
i = 0;
|
i = 0;
|
||||||
EINA_LIST_FOREACH(wd->items, l, it)
|
EINA_LIST_FOREACH(wd->items, l, it)
|
||||||
{
|
{
|
||||||
it->even = i & 0x1;
|
it->even = i & 0x1;
|
||||||
if ((it->even != it->is_even) || (!it->fixed) || (redo))
|
if ((it->even != it->is_even) || (!it->fixed) || (redo))
|
||||||
{
|
{
|
||||||
const char *stacking;
|
const char *stacking;
|
||||||
|
|
||||||
if (wd->mode == ELM_LIST_COMPRESS)
|
if (wd->mode == ELM_LIST_COMPRESS)
|
||||||
{
|
{
|
||||||
if (it->even)
|
if (it->even)
|
||||||
_elm_theme_set(it->base, "list", "item_compress", style);
|
_elm_theme_set(it->base, "list", "item_compress", style);
|
||||||
else
|
else
|
||||||
_elm_theme_set(it->base, "list", "item_compress_odd", style);
|
_elm_theme_set(it->base, "list", "item_compress_odd", style);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (it->even)
|
if (it->even)
|
||||||
_elm_theme_set(it->base, "list", "item", style);
|
_elm_theme_set(it->base, "list", "item", style);
|
||||||
else
|
else
|
||||||
_elm_theme_set(it->base, "list", "item_odd", style);
|
_elm_theme_set(it->base, "list", "item_odd", style);
|
||||||
}
|
}
|
||||||
stacking = edje_object_data_get(it->base, "stacking");
|
stacking = edje_object_data_get(it->base, "stacking");
|
||||||
if (stacking)
|
if (stacking)
|
||||||
{
|
{
|
||||||
if (!strcmp(stacking, "below"))
|
if (!strcmp(stacking, "below"))
|
||||||
evas_object_lower(it->base);
|
evas_object_lower(it->base);
|
||||||
else if (!strcmp(stacking, "above"))
|
else if (!strcmp(stacking, "above"))
|
||||||
evas_object_raise(it->base);
|
evas_object_raise(it->base);
|
||||||
}
|
}
|
||||||
edje_object_part_text_set(it->base, "elm.text", it->label);
|
edje_object_part_text_set(it->base, "elm.text", it->label);
|
||||||
if ((!it->icon) && (minh[0] > 0))
|
if ((!it->icon) && (minh[0] > 0))
|
||||||
{
|
{
|
||||||
it->icon = evas_object_rectangle_add(evas_object_evas_get(it->base));
|
it->icon = evas_object_rectangle_add(evas_object_evas_get(it->base));
|
||||||
evas_object_color_set(it->icon, 0, 0, 0, 0);
|
evas_object_color_set(it->icon, 0, 0, 0, 0);
|
||||||
it->dummy_icon = EINA_TRUE;
|
it->dummy_icon = EINA_TRUE;
|
||||||
}
|
}
|
||||||
if ((!it->end) && (minh[1] > 0))
|
if ((!it->end) && (minh[1] > 0))
|
||||||
{
|
{
|
||||||
it->end = evas_object_rectangle_add(evas_object_evas_get(it->base));
|
it->end = evas_object_rectangle_add(evas_object_evas_get(it->base));
|
||||||
evas_object_color_set(it->end, 0, 0, 0, 0);
|
evas_object_color_set(it->end, 0, 0, 0, 0);
|
||||||
it->dummy_end = EINA_TRUE;
|
it->dummy_end = EINA_TRUE;
|
||||||
}
|
}
|
||||||
if (it->icon)
|
if (it->icon)
|
||||||
{
|
{
|
||||||
evas_object_size_hint_min_set(it->icon, minw[0], minh[0]);
|
evas_object_size_hint_min_set(it->icon, minw[0], minh[0]);
|
||||||
evas_object_size_hint_max_set(it->icon, 99999, 99999);
|
evas_object_size_hint_max_set(it->icon, 99999, 99999);
|
||||||
edje_object_part_swallow(it->base, "elm.swallow.icon", it->icon);
|
edje_object_part_swallow(it->base, "elm.swallow.icon", it->icon);
|
||||||
}
|
}
|
||||||
if (it->end)
|
if (it->end)
|
||||||
{
|
{
|
||||||
evas_object_size_hint_min_set(it->end, minw[1], minh[1]);
|
evas_object_size_hint_min_set(it->end, minw[1], minh[1]);
|
||||||
evas_object_size_hint_max_set(it->end, 99999, 99999);
|
evas_object_size_hint_max_set(it->end, 99999, 99999);
|
||||||
edje_object_part_swallow(it->base, "elm.swallow.end", it->end);
|
edje_object_part_swallow(it->base, "elm.swallow.end", it->end);
|
||||||
}
|
}
|
||||||
if (!it->fixed)
|
if (!it->fixed)
|
||||||
{
|
{
|
||||||
edje_object_message_signal_process(it->base);
|
edje_object_message_signal_process(it->base);
|
||||||
mw = mh = -1;
|
mw = mh = -1;
|
||||||
elm_coords_finger_size_adjust(1, &mw, 1, &mh);
|
elm_coords_finger_size_adjust(1, &mw, 1, &mh);
|
||||||
edje_object_size_min_restricted_calc(it->base, &mw, &mh, mw, mh);
|
edje_object_size_min_restricted_calc(it->base, &mw, &mh, mw, mh);
|
||||||
elm_coords_finger_size_adjust(1, &mw, 1, &mh);
|
elm_coords_finger_size_adjust(1, &mw, 1, &mh);
|
||||||
evas_object_size_hint_min_set(it->base, mw, mh);
|
evas_object_size_hint_min_set(it->base, mw, mh);
|
||||||
evas_object_show(it->base);
|
evas_object_show(it->base);
|
||||||
}
|
}
|
||||||
if ((it->selected) || (it->hilighted))
|
if ((it->selected) || (it->hilighted))
|
||||||
{
|
{
|
||||||
const char *selectraise;
|
const char *selectraise;
|
||||||
|
|
||||||
edje_object_signal_emit(it->base, "elm,state,selected", "elm");
|
edje_object_signal_emit(it->base, "elm,state,selected", "elm");
|
||||||
selectraise = edje_object_data_get(it->base, "selectraise");
|
selectraise = edje_object_data_get(it->base, "selectraise");
|
||||||
if ((selectraise) && (!strcmp(selectraise, "on")))
|
if ((selectraise) && (!strcmp(selectraise, "on")))
|
||||||
evas_object_raise(it->base);
|
evas_object_raise(it->base);
|
||||||
stacking = edje_object_data_get(it->base, "stacking");
|
stacking = edje_object_data_get(it->base, "stacking");
|
||||||
}
|
}
|
||||||
it->fixed = EINA_TRUE;
|
it->fixed = EINA_TRUE;
|
||||||
it->is_even = it->even;
|
it->is_even = it->even;
|
||||||
}
|
}
|
||||||
i++;
|
i++;
|
||||||
}
|
}
|
||||||
mw = 0; mh = 0;
|
mw = 0; mh = 0;
|
||||||
|
@ -565,13 +565,13 @@ elm_list_item_selected_set(Elm_List_Item *it, Eina_Bool selected)
|
||||||
|
|
||||||
if (selected)
|
if (selected)
|
||||||
{
|
{
|
||||||
if (!wd->multi)
|
if (!wd->multi)
|
||||||
{
|
{
|
||||||
while (wd->selected)
|
while (wd->selected)
|
||||||
_item_unselect(wd->selected->data);
|
_item_unselect(wd->selected->data);
|
||||||
}
|
}
|
||||||
_item_hilight(it);
|
_item_hilight(it);
|
||||||
_item_select(it);
|
_item_select(it);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
_item_unselect(it);
|
_item_unselect(it);
|
||||||
|
|
|
@ -286,21 +286,21 @@ _elm_window_property_change(void *data, int ev_type, void *ev)
|
||||||
|
|
||||||
if (event->win == ecore_x_window_root_first_get())
|
if (event->win == ecore_x_window_root_first_get())
|
||||||
{
|
{
|
||||||
if (event->atom == _elm_atom_enlightenment_scale)
|
if (event->atom == _elm_atom_enlightenment_scale)
|
||||||
{
|
{
|
||||||
int val = 1000;
|
int val = 1000;
|
||||||
|
|
||||||
if (ecore_x_window_prop_card32_get(event->win,
|
if (ecore_x_window_prop_card32_get(event->win,
|
||||||
event->atom,
|
event->atom,
|
||||||
&val, 1) > 0)
|
&val, 1) > 0)
|
||||||
{
|
{
|
||||||
double pscale;
|
double pscale;
|
||||||
|
|
||||||
pscale = _elm_config->scale;
|
pscale = _elm_config->scale;
|
||||||
if (val > 0) _elm_config->scale = (double)val / 1000.0;
|
if (val > 0) _elm_config->scale = (double)val / 1000.0;
|
||||||
if (pscale != _elm_config->scale) _elm_rescale();
|
if (pscale != _elm_config->scale) _elm_rescale();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
@ -368,50 +368,50 @@ elm_quicklaunch_init(int argc, char **argv)
|
||||||
|
|
||||||
if (!_elm_data_dir)
|
if (!_elm_data_dir)
|
||||||
{
|
{
|
||||||
s = getenv("ELM_DATA_DIR");
|
s = getenv("ELM_DATA_DIR");
|
||||||
_elm_data_dir = eina_stringshare_add(s);
|
_elm_data_dir = eina_stringshare_add(s);
|
||||||
}
|
}
|
||||||
if (!_elm_data_dir)
|
if (!_elm_data_dir)
|
||||||
{
|
{
|
||||||
s = getenv("ELM_PREFIX");
|
s = getenv("ELM_PREFIX");
|
||||||
if (s)
|
if (s)
|
||||||
{
|
{
|
||||||
snprintf(buf, sizeof(buf), "%s/share/elementary", s);
|
snprintf(buf, sizeof(buf), "%s/share/elementary", s);
|
||||||
_elm_data_dir = eina_stringshare_add(buf);
|
_elm_data_dir = eina_stringshare_add(buf);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#ifdef HAVE_DLADDR
|
#ifdef HAVE_DLADDR
|
||||||
if (!_elm_data_dir)
|
if (!_elm_data_dir)
|
||||||
{
|
{
|
||||||
Dl_info elementary_dl;
|
Dl_info elementary_dl;
|
||||||
// libelementary.so/../../share/elementary/
|
// libelementary.so/../../share/elementary/
|
||||||
if (dladdr(elm_init, &elementary_dl))
|
if (dladdr(elm_init, &elementary_dl))
|
||||||
{
|
{
|
||||||
char *dir, *dir2;
|
char *dir, *dir2;
|
||||||
|
|
||||||
dir = ecore_file_dir_get(elementary_dl.dli_fname);
|
dir = ecore_file_dir_get(elementary_dl.dli_fname);
|
||||||
if (dir)
|
if (dir)
|
||||||
{
|
{
|
||||||
dir2 = ecore_file_dir_get(dir);
|
dir2 = ecore_file_dir_get(dir);
|
||||||
if (dir2)
|
if (dir2)
|
||||||
{
|
{
|
||||||
snprintf(buf, sizeof(buf), "%s/share/elementary", dir2);
|
snprintf(buf, sizeof(buf), "%s/share/elementary", dir2);
|
||||||
if (ecore_file_is_dir(buf))
|
if (ecore_file_is_dir(buf))
|
||||||
_elm_data_dir = eina_stringshare_add(buf);
|
_elm_data_dir = eina_stringshare_add(buf);
|
||||||
free(dir2);
|
free(dir2);
|
||||||
}
|
}
|
||||||
free(dir);
|
free(dir);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
if (!_elm_data_dir)
|
if (!_elm_data_dir)
|
||||||
{
|
{
|
||||||
_elm_data_dir = eina_stringshare_add(PACKAGE_DATA_DIR);
|
_elm_data_dir = eina_stringshare_add(PACKAGE_DATA_DIR);
|
||||||
}
|
}
|
||||||
if (!_elm_data_dir)
|
if (!_elm_data_dir)
|
||||||
{
|
{
|
||||||
_elm_data_dir = eina_stringshare_add("/");
|
_elm_data_dir = eina_stringshare_add("/");
|
||||||
}
|
}
|
||||||
|
|
||||||
// FIXME: actually load config
|
// FIXME: actually load config
|
||||||
|
@ -436,38 +436,38 @@ elm_quicklaunch_init(int argc, char **argv)
|
||||||
s = getenv("ELM_ENGINE");
|
s = getenv("ELM_ENGINE");
|
||||||
if (s)
|
if (s)
|
||||||
{
|
{
|
||||||
if ((!strcasecmp(s, "x11")) ||
|
if ((!strcasecmp(s, "x11")) ||
|
||||||
(!strcasecmp(s, "x")) ||
|
(!strcasecmp(s, "x")) ||
|
||||||
(!strcasecmp(s, "software-x11")) ||
|
(!strcasecmp(s, "software-x11")) ||
|
||||||
(!strcasecmp(s, "software_x11")))
|
(!strcasecmp(s, "software_x11")))
|
||||||
_elm_config->engine = ELM_SOFTWARE_X11;
|
_elm_config->engine = ELM_SOFTWARE_X11;
|
||||||
else if ((!strcasecmp(s, "x11-16")) ||
|
else if ((!strcasecmp(s, "x11-16")) ||
|
||||||
(!strcasecmp(s, "x16")) ||
|
(!strcasecmp(s, "x16")) ||
|
||||||
(!strcasecmp(s, "software-16-x11")) ||
|
(!strcasecmp(s, "software-16-x11")) ||
|
||||||
(!strcasecmp(s, "software_16_x11")))
|
(!strcasecmp(s, "software_16_x11")))
|
||||||
_elm_config->engine = ELM_SOFTWARE_16_X11;
|
_elm_config->engine = ELM_SOFTWARE_16_X11;
|
||||||
else if ((!strcasecmp(s, "xrender")) ||
|
else if ((!strcasecmp(s, "xrender")) ||
|
||||||
(!strcasecmp(s, "xr")) ||
|
(!strcasecmp(s, "xr")) ||
|
||||||
(!strcasecmp(s, "xrender-x11")) ||
|
(!strcasecmp(s, "xrender-x11")) ||
|
||||||
(!strcasecmp(s, "xrender_x11")))
|
(!strcasecmp(s, "xrender_x11")))
|
||||||
_elm_config->engine = ELM_XRENDER_X11;
|
_elm_config->engine = ELM_XRENDER_X11;
|
||||||
else if ((!strcasecmp(s, "fb")) ||
|
else if ((!strcasecmp(s, "fb")) ||
|
||||||
(!strcasecmp(s, "software-fb")) ||
|
(!strcasecmp(s, "software-fb")) ||
|
||||||
(!strcasecmp(s, "software_fb")))
|
(!strcasecmp(s, "software_fb")))
|
||||||
_elm_config->engine = ELM_SOFTWARE_FB;
|
_elm_config->engine = ELM_SOFTWARE_FB;
|
||||||
else if ((!strcasecmp(s, "opengl")) ||
|
else if ((!strcasecmp(s, "opengl")) ||
|
||||||
(!strcasecmp(s, "gl")) ||
|
(!strcasecmp(s, "gl")) ||
|
||||||
(!strcasecmp(s, "opengl-x11")) ||
|
(!strcasecmp(s, "opengl-x11")) ||
|
||||||
(!strcasecmp(s, "opengl_x11")))
|
(!strcasecmp(s, "opengl_x11")))
|
||||||
_elm_config->engine = ELM_OPENGL_X11;
|
_elm_config->engine = ELM_OPENGL_X11;
|
||||||
else if ((!strcasecmp(s, "gdi")) ||
|
else if ((!strcasecmp(s, "gdi")) ||
|
||||||
(!strcasecmp(s, "software-gdi")) ||
|
(!strcasecmp(s, "software-gdi")) ||
|
||||||
(!strcasecmp(s, "software_gdi")))
|
(!strcasecmp(s, "software_gdi")))
|
||||||
_elm_config->engine = ELM_SOFTWARE_WIN32;
|
_elm_config->engine = ELM_SOFTWARE_WIN32;
|
||||||
else if ((!strcasecmp(s, "wince-gdi")) ||
|
else if ((!strcasecmp(s, "wince-gdi")) ||
|
||||||
(!strcasecmp(s, "software-16-wince-gdi")) ||
|
(!strcasecmp(s, "software-16-wince-gdi")) ||
|
||||||
(!strcasecmp(s, "software_16_wince_gdi")))
|
(!strcasecmp(s, "software_16_wince_gdi")))
|
||||||
_elm_config->engine = ELM_SOFTWARE_16_WINCE;
|
_elm_config->engine = ELM_SOFTWARE_16_WINCE;
|
||||||
}
|
}
|
||||||
|
|
||||||
s = getenv("ELM_THUMBSCROLL_ENABLE");
|
s = getenv("ELM_THUMBSCROLL_ENABLE");
|
||||||
|
@ -488,43 +488,43 @@ elm_quicklaunch_init(int argc, char **argv)
|
||||||
s= getenv("ELM_FONT_HINTING");
|
s= getenv("ELM_FONT_HINTING");
|
||||||
if (s)
|
if (s)
|
||||||
{
|
{
|
||||||
if (!strcasecmp(s, "none"))
|
if (!strcasecmp(s, "none"))
|
||||||
_elm_config->font_hinting = 0;
|
_elm_config->font_hinting = 0;
|
||||||
else if (!strcasecmp(s, "auto"))
|
else if (!strcasecmp(s, "auto"))
|
||||||
_elm_config->font_hinting = 1;
|
_elm_config->font_hinting = 1;
|
||||||
else if (!strcasecmp(s, "bytecode"))
|
else if (!strcasecmp(s, "bytecode"))
|
||||||
_elm_config->font_hinting = 2;
|
_elm_config->font_hinting = 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
s = getenv("ELM_FONT_PATH");
|
s = getenv("ELM_FONT_PATH");
|
||||||
if (s)
|
if (s)
|
||||||
{
|
{
|
||||||
const char *p, *pp;
|
const char *p, *pp;
|
||||||
char *buf;
|
char *buf;
|
||||||
|
|
||||||
buf = alloca(strlen(s) + 1);
|
buf = alloca(strlen(s) + 1);
|
||||||
p = s;
|
p = s;
|
||||||
pp = p;
|
pp = p;
|
||||||
for (;;)
|
for (;;)
|
||||||
{
|
{
|
||||||
if ((*p == ':') || (*p == 0))
|
if ((*p == ':') || (*p == 0))
|
||||||
{
|
{
|
||||||
int len;
|
int len;
|
||||||
|
|
||||||
len = p - pp;
|
len = p - pp;
|
||||||
strncpy(buf, pp, len);
|
strncpy(buf, pp, len);
|
||||||
buf[len] = 0;
|
buf[len] = 0;
|
||||||
_elm_config->font_dirs = eina_list_append(_elm_config->font_dirs, eina_stringshare_add(buf));
|
_elm_config->font_dirs = eina_list_append(_elm_config->font_dirs, eina_stringshare_add(buf));
|
||||||
if (*p == 0) break;
|
if (*p == 0) break;
|
||||||
p++;
|
p++;
|
||||||
pp = p;
|
pp = p;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (*p == 0) break;
|
if (*p == 0) break;
|
||||||
p++;
|
p++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
s = getenv("ELM_IMAGE_CACHE");
|
s = getenv("ELM_IMAGE_CACHE");
|
||||||
|
@ -563,32 +563,32 @@ elm_quicklaunch_sub_init(int argc, char **argv)
|
||||||
int val = 1000;
|
int val = 1000;
|
||||||
|
|
||||||
if (!ecore_x_init(NULL))
|
if (!ecore_x_init(NULL))
|
||||||
{
|
{
|
||||||
EINA_ERROR_PERR("elementary: ERROR. Cannot connect to X11 display. check $DISPLAY variable\n");
|
EINA_ERROR_PERR("elementary: ERROR. Cannot connect to X11 display. check $DISPLAY variable\n");
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
if (!ecore_x_screen_is_composited(0))
|
if (!ecore_x_screen_is_composited(0))
|
||||||
_elm_config->compositing = 0;
|
_elm_config->compositing = 0;
|
||||||
_elm_atom_enlightenment_scale = ecore_x_atom_get("ENLIGHTENMENT_SCALE");
|
_elm_atom_enlightenment_scale = ecore_x_atom_get("ENLIGHTENMENT_SCALE");
|
||||||
ecore_x_event_mask_set(ecore_x_window_root_first_get(),
|
ecore_x_event_mask_set(ecore_x_window_root_first_get(),
|
||||||
ECORE_X_EVENT_MASK_WINDOW_PROPERTY);
|
ECORE_X_EVENT_MASK_WINDOW_PROPERTY);
|
||||||
_elm_event_property_change = ecore_event_handler_add
|
_elm_event_property_change = ecore_event_handler_add
|
||||||
(ECORE_X_EVENT_WINDOW_PROPERTY, _elm_window_property_change, NULL);
|
(ECORE_X_EVENT_WINDOW_PROPERTY, _elm_window_property_change, NULL);
|
||||||
if (!getenv("ELM_SCALE"))
|
if (!getenv("ELM_SCALE"))
|
||||||
{
|
{
|
||||||
if (ecore_x_window_prop_card32_get(ecore_x_window_root_first_get(),
|
if (ecore_x_window_prop_card32_get(ecore_x_window_root_first_get(),
|
||||||
_elm_atom_enlightenment_scale,
|
_elm_atom_enlightenment_scale,
|
||||||
&val, 1) > 0)
|
&val, 1) > 0)
|
||||||
{
|
{
|
||||||
if (val > 0)
|
if (val > 0)
|
||||||
{
|
{
|
||||||
_elm_config->scale = (double)val / 1000.0;
|
_elm_config->scale = (double)val / 1000.0;
|
||||||
// FIXME: hack until e export finger size too
|
// FIXME: hack until e export finger size too
|
||||||
if (getenv("ELM_FINGER_SIZE"))
|
if (getenv("ELM_FINGER_SIZE"))
|
||||||
_elm_config->finger_size = 40.0 * _elm_config->scale;
|
_elm_config->finger_size = 40.0 * _elm_config->scale;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -606,11 +606,11 @@ elm_quicklaunch_sub_shutdown(void)
|
||||||
(_elm_config->engine == ELM_SOFTWARE_16_WINCE))
|
(_elm_config->engine == ELM_SOFTWARE_16_WINCE))
|
||||||
{
|
{
|
||||||
#ifdef HAVE_ELEMENTARY_X
|
#ifdef HAVE_ELEMENTARY_X
|
||||||
ecore_event_handler_del(_elm_event_property_change);
|
ecore_event_handler_del(_elm_event_property_change);
|
||||||
_elm_event_property_change = NULL;
|
_elm_event_property_change = NULL;
|
||||||
ecore_x_disconnect();
|
ecore_x_disconnect();
|
||||||
#endif
|
#endif
|
||||||
evas_cserve_disconnect();
|
evas_cserve_disconnect();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -624,7 +624,7 @@ elm_quicklaunch_shutdown(void)
|
||||||
|
|
||||||
EINA_LIST_FREE(_elm_config->font_dirs, fontdir)
|
EINA_LIST_FREE(_elm_config->font_dirs, fontdir)
|
||||||
{
|
{
|
||||||
eina_stringshare_del(fontdir);
|
eina_stringshare_del(fontdir);
|
||||||
}
|
}
|
||||||
|
|
||||||
ecore_event_handler_del(_elm_exit_handler);
|
ecore_event_handler_del(_elm_exit_handler);
|
||||||
|
@ -661,7 +661,7 @@ elm_quicklaunch_seed(void)
|
||||||
(_elm_config->engine == ELM_OPENGL_X11))
|
(_elm_config->engine == ELM_OPENGL_X11))
|
||||||
{
|
{
|
||||||
#ifdef HAVE_ELEMENTARY_X
|
#ifdef HAVE_ELEMENTARY_X
|
||||||
ecore_x_sync();
|
ecore_x_sync();
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
ecore_main_loop_iterate();
|
ecore_main_loop_iterate();
|
||||||
|
@ -677,32 +677,32 @@ elm_quicklaunch_prepare(int argc, char **argv)
|
||||||
char *exe = elm_quicklaunch_exe_path_get(argv[0]);
|
char *exe = elm_quicklaunch_exe_path_get(argv[0]);
|
||||||
if (!exe)
|
if (!exe)
|
||||||
{
|
{
|
||||||
printf("ERROR: %s does not exist\n", argv[0]);
|
printf("ERROR: %s does not exist\n", argv[0]);
|
||||||
return EINA_FALSE;
|
return EINA_FALSE;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
char *exe2, *p;
|
char *exe2, *p;
|
||||||
char *exename;
|
char *exename;
|
||||||
|
|
||||||
exe2 = malloc(strlen(exe) + 1 + 10);
|
exe2 = malloc(strlen(exe) + 1 + 10);
|
||||||
strcpy(exe2, exe);
|
strcpy(exe2, exe);
|
||||||
p = strrchr(exe2, '/');
|
p = strrchr(exe2, '/');
|
||||||
if (p) p++;
|
if (p) p++;
|
||||||
else p = exe2;
|
else p = exe2;
|
||||||
exename = alloca(strlen(p) + 1);
|
exename = alloca(strlen(p) + 1);
|
||||||
strcpy(exename, p);
|
strcpy(exename, p);
|
||||||
*p = 0;
|
*p = 0;
|
||||||
strcat(p, "../lib/");
|
strcat(p, "../lib/");
|
||||||
strcat(p, exename);
|
strcat(p, exename);
|
||||||
strcat(p, ".so");
|
strcat(p, ".so");
|
||||||
if (access(exe2, R_OK | X_OK) == 0)
|
if (access(exe2, R_OK | X_OK) == 0)
|
||||||
{
|
{
|
||||||
free(exe);
|
free(exe);
|
||||||
exe = exe2;
|
exe = exe2;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
free(exe2);
|
free(exe2);
|
||||||
}
|
}
|
||||||
qr_handle = dlopen(exe, RTLD_NOW | RTLD_GLOBAL);
|
qr_handle = dlopen(exe, RTLD_NOW | RTLD_GLOBAL);
|
||||||
free(exe);
|
free(exe);
|
||||||
|
@ -710,9 +710,9 @@ elm_quicklaunch_prepare(int argc, char **argv)
|
||||||
qr_main = dlsym(qr_handle, "elm_main");
|
qr_main = dlsym(qr_handle, "elm_main");
|
||||||
if (!qr_main)
|
if (!qr_main)
|
||||||
{
|
{
|
||||||
dlclose(qr_handle);
|
dlclose(qr_handle);
|
||||||
qr_handle = NULL;
|
qr_handle = NULL;
|
||||||
return EINA_FALSE;
|
return EINA_FALSE;
|
||||||
}
|
}
|
||||||
return EINA_TRUE;
|
return EINA_TRUE;
|
||||||
#else
|
#else
|
||||||
|
@ -757,24 +757,24 @@ elm_quicklaunch_fork(int argc, char **argv, char *cwd, void (postfork_func) (voi
|
||||||
// need to accept current environment from elementary_run
|
// need to accept current environment from elementary_run
|
||||||
if (!qr_main)
|
if (!qr_main)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
char **args;
|
char **args;
|
||||||
|
|
||||||
child = fork();
|
child = fork();
|
||||||
if (child > 0) return EINA_TRUE;
|
if (child > 0) return EINA_TRUE;
|
||||||
else if (child < 0)
|
else if (child < 0)
|
||||||
{
|
{
|
||||||
perror("could not fork");
|
perror("could not fork");
|
||||||
return EINA_FALSE;
|
return EINA_FALSE;
|
||||||
}
|
}
|
||||||
setsid();
|
setsid();
|
||||||
if (chdir(cwd) != 0)
|
if (chdir(cwd) != 0)
|
||||||
perror("could not chdir");
|
perror("could not chdir");
|
||||||
args = alloca((argc + 1) * sizeof(char *));
|
args = alloca((argc + 1) * sizeof(char *));
|
||||||
for (i = 0; i < argc; i++) args[i] = argv[i];
|
for (i = 0; i < argc; i++) args[i] = argv[i];
|
||||||
args[argc] = NULL;
|
args[argc] = NULL;
|
||||||
printf("WARNING: %s not quicklaunch capable\n", argv[0]);
|
printf("WARNING: %s not quicklaunch capable\n", argv[0]);
|
||||||
exit(execvp(argv[0], args));
|
exit(execvp(argv[0], args));
|
||||||
}
|
}
|
||||||
child = fork();
|
child = fork();
|
||||||
if (child > 0) return EINA_TRUE;
|
if (child > 0) return EINA_TRUE;
|
||||||
|
@ -794,12 +794,12 @@ elm_quicklaunch_fork(int argc, char **argv, char *cwd, void (postfork_func) (voi
|
||||||
save_env();
|
save_env();
|
||||||
if (real_argv)
|
if (real_argv)
|
||||||
{
|
{
|
||||||
char *lastarg, *p;
|
char *lastarg, *p;
|
||||||
|
|
||||||
ecore_app_args_get(&real_argc, &real_argv);
|
ecore_app_args_get(&real_argc, &real_argv);
|
||||||
lastarg = real_argv[real_argc - 1] + strlen(real_argv[real_argc - 1]);
|
lastarg = real_argv[real_argc - 1] + strlen(real_argv[real_argc - 1]);
|
||||||
for (p = real_argv[0]; p < lastarg; p++) *p = 0;
|
for (p = real_argv[0]; p < lastarg; p++) *p = 0;
|
||||||
strcpy(real_argv[0], argv[0]);
|
strcpy(real_argv[0], argv[0]);
|
||||||
}
|
}
|
||||||
ecore_app_args_set(argc, (const char **)argv);
|
ecore_app_args_set(argc, (const char **)argv);
|
||||||
ret = qr_main(argc, argv);
|
ret = qr_main(argc, argv);
|
||||||
|
@ -816,9 +816,9 @@ elm_quicklaunch_cleanup(void)
|
||||||
#ifdef HAVE_FORK
|
#ifdef HAVE_FORK
|
||||||
if (qr_handle)
|
if (qr_handle)
|
||||||
{
|
{
|
||||||
dlclose(qr_handle);
|
dlclose(qr_handle);
|
||||||
qr_handle = NULL;
|
qr_handle = NULL;
|
||||||
qr_main = NULL;
|
qr_main = NULL;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
@ -848,37 +848,37 @@ elm_quicklaunch_exe_path_get(const char *exe)
|
||||||
if ((exe[0] == '.') && (exe[1] == '.') && (exe[2] == '/')) return strdup(exe);
|
if ((exe[0] == '.') && (exe[1] == '.') && (exe[2] == '/')) return strdup(exe);
|
||||||
if (!path)
|
if (!path)
|
||||||
{
|
{
|
||||||
const char *p, *pp, *s;
|
const char *p, *pp, *s;
|
||||||
char *buf;
|
char *buf;
|
||||||
path = getenv("PATH");
|
path = getenv("PATH");
|
||||||
buf = alloca(strlen(path) + 1);
|
buf = alloca(strlen(path) + 1);
|
||||||
p = path;
|
p = path;
|
||||||
pp = p;
|
pp = p;
|
||||||
for (;;)
|
for (;;)
|
||||||
{
|
{
|
||||||
if ((*p == ':') || (*p == 0))
|
if ((*p == ':') || (*p == 0))
|
||||||
{
|
{
|
||||||
int len;
|
int len;
|
||||||
|
|
||||||
len = p - pp;
|
len = p - pp;
|
||||||
strncpy(buf, pp, len);
|
strncpy(buf, pp, len);
|
||||||
buf[len] = 0;
|
buf[len] = 0;
|
||||||
pathlist = eina_list_append(pathlist, eina_stringshare_add(buf));
|
pathlist = eina_list_append(pathlist, eina_stringshare_add(buf));
|
||||||
if (*p == 0) break;
|
if (*p == 0) break;
|
||||||
p++;
|
p++;
|
||||||
pp = p;
|
pp = p;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (*p == 0) break;
|
if (*p == 0) break;
|
||||||
p++;
|
p++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
EINA_LIST_FOREACH(pathlist, l, pathitr)
|
EINA_LIST_FOREACH(pathlist, l, pathitr)
|
||||||
{
|
{
|
||||||
snprintf(buf, sizeof(buf), "%s/%s", pathitr, exe);
|
snprintf(buf, sizeof(buf), "%s/%s", pathitr, exe);
|
||||||
if (access(buf, R_OK | X_OK) == 0) return strdup(buf);
|
if (access(buf, R_OK | X_OK) == 0) return strdup(buf);
|
||||||
}
|
}
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
|
@ -69,8 +69,8 @@ _sizing_eval(Evas_Object *obj)
|
||||||
Item *it;
|
Item *it;
|
||||||
EINA_LIST_FOREACH(wd->stack, l, it)
|
EINA_LIST_FOREACH(wd->stack, l, it)
|
||||||
{
|
{
|
||||||
if (it->minw > minw) minw = it->minw;
|
if (it->minw > minw) minw = it->minw;
|
||||||
if (it->minh > minh) minh = it->minh;
|
if (it->minh > minh) minh = it->minh;
|
||||||
}
|
}
|
||||||
evas_object_size_hint_min_set(obj, minw, minh);
|
evas_object_size_hint_min_set(obj, minw, minh);
|
||||||
evas_object_size_hint_max_set(obj, maxw, maxh);
|
evas_object_size_hint_max_set(obj, maxw, maxh);
|
||||||
|
@ -94,30 +94,30 @@ _eval_top(Evas_Object *obj)
|
||||||
ittop = eina_list_last(wd->stack)->data;
|
ittop = eina_list_last(wd->stack)->data;
|
||||||
if (ittop != wd->top)
|
if (ittop != wd->top)
|
||||||
{
|
{
|
||||||
Evas_Object *o;
|
Evas_Object *o;
|
||||||
const char *onshow, *onhide;
|
const char *onshow, *onhide;
|
||||||
|
|
||||||
if (wd->top)
|
if (wd->top)
|
||||||
{
|
{
|
||||||
o = wd->top->base;
|
o = wd->top->base;
|
||||||
edje_object_signal_emit(o, "elm,action,hide", "elm");
|
edje_object_signal_emit(o, "elm,action,hide", "elm");
|
||||||
onhide = edje_object_data_get(o, "onhide");
|
onhide = edje_object_data_get(o, "onhide");
|
||||||
if (onhide)
|
if (onhide)
|
||||||
{
|
{
|
||||||
if (!strcmp(onhide, "raise")) evas_object_raise(o);
|
if (!strcmp(onhide, "raise")) evas_object_raise(o);
|
||||||
else if (!strcmp(onhide, "lower")) evas_object_lower(o);
|
else if (!strcmp(onhide, "lower")) evas_object_lower(o);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
wd->top = ittop;
|
wd->top = ittop;
|
||||||
o = wd->top->base;
|
o = wd->top->base;
|
||||||
evas_object_show(o);
|
evas_object_show(o);
|
||||||
edje_object_signal_emit(o, "elm,action,show", "elm");
|
edje_object_signal_emit(o, "elm,action,show", "elm");
|
||||||
onshow = edje_object_data_get(o, "onshow");
|
onshow = edje_object_data_get(o, "onshow");
|
||||||
if (onshow)
|
if (onshow)
|
||||||
{
|
{
|
||||||
if (!strcmp(onshow, "raise")) evas_object_raise(o);
|
if (!strcmp(onshow, "raise")) evas_object_raise(o);
|
||||||
else if (!strcmp(onshow, "lower")) evas_object_lower(o);
|
else if (!strcmp(onshow, "lower")) evas_object_lower(o);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -142,16 +142,16 @@ _sub_del(void *data, Evas_Object *obj, void *event_info)
|
||||||
Item *it;
|
Item *it;
|
||||||
EINA_LIST_FOREACH(wd->stack, l, it)
|
EINA_LIST_FOREACH(wd->stack, l, it)
|
||||||
{
|
{
|
||||||
if (it->content == sub)
|
if (it->content == sub)
|
||||||
{
|
{
|
||||||
wd->stack = eina_list_remove_list(wd->stack, l);
|
wd->stack = eina_list_remove_list(wd->stack, l);
|
||||||
evas_object_event_callback_del
|
evas_object_event_callback_del
|
||||||
(sub, EVAS_CALLBACK_CHANGED_SIZE_HINTS, _changed_size_hints);
|
(sub, EVAS_CALLBACK_CHANGED_SIZE_HINTS, _changed_size_hints);
|
||||||
evas_object_del(it->base);
|
evas_object_del(it->base);
|
||||||
_eval_top(it->obj);
|
_eval_top(it->obj);
|
||||||
free(it);
|
free(it);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -177,7 +177,7 @@ _signal_hide_finished(void *data, Evas_Object *obj, const char *emission, const
|
||||||
edje_object_message_signal_process(it->base);
|
edje_object_message_signal_process(it->base);
|
||||||
if (it->popme)
|
if (it->popme)
|
||||||
{
|
{
|
||||||
evas_object_del(it->content);
|
evas_object_del(it->content);
|
||||||
}
|
}
|
||||||
_sizing_eval(obj2);
|
_sizing_eval(obj2);
|
||||||
}
|
}
|
||||||
|
@ -248,7 +248,7 @@ elm_pager_content_push(Evas_Object *obj, Evas_Object *content)
|
||||||
edje_object_size_min_calc(it->base, &it->minw, &it->minh);
|
edje_object_size_min_calc(it->base, &it->minw, &it->minh);
|
||||||
evas_object_show(it->content);
|
evas_object_show(it->content);
|
||||||
evas_object_event_callback_add(content, EVAS_CALLBACK_CHANGED_SIZE_HINTS,
|
evas_object_event_callback_add(content, EVAS_CALLBACK_CHANGED_SIZE_HINTS,
|
||||||
_changed_size_hints, it);
|
_changed_size_hints, it);
|
||||||
wd->stack = eina_list_append(wd->stack, it);
|
wd->stack = eina_list_append(wd->stack, it);
|
||||||
_eval_top(obj);
|
_eval_top(obj);
|
||||||
_sizing_eval(obj);
|
_sizing_eval(obj);
|
||||||
|
@ -277,28 +277,28 @@ elm_pager_content_pop(Evas_Object *obj)
|
||||||
ll = eina_list_last(wd->stack);
|
ll = eina_list_last(wd->stack);
|
||||||
if (ll)
|
if (ll)
|
||||||
{
|
{
|
||||||
ll = ll->prev;
|
ll = ll->prev;
|
||||||
if (!ll)
|
if (!ll)
|
||||||
{
|
{
|
||||||
Evas_Object *o;
|
Evas_Object *o;
|
||||||
const char *onhide;
|
const char *onhide;
|
||||||
|
|
||||||
wd->top = it;
|
wd->top = it;
|
||||||
o = wd->top->base;
|
o = wd->top->base;
|
||||||
edje_object_signal_emit(o, "elm,action,hide", "elm");
|
edje_object_signal_emit(o, "elm,action,hide", "elm");
|
||||||
onhide = edje_object_data_get(o, "onhide");
|
onhide = edje_object_data_get(o, "onhide");
|
||||||
if (onhide)
|
if (onhide)
|
||||||
{
|
{
|
||||||
if (!strcmp(onhide, "raise")) evas_object_raise(o);
|
if (!strcmp(onhide, "raise")) evas_object_raise(o);
|
||||||
else if (!strcmp(onhide, "lower")) evas_object_lower(o);
|
else if (!strcmp(onhide, "lower")) evas_object_lower(o);
|
||||||
}
|
}
|
||||||
wd->top = NULL;
|
wd->top = NULL;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
it = ll->data;
|
it = ll->data;
|
||||||
elm_pager_content_promote(obj, it->content);
|
elm_pager_content_promote(obj, it->content);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -322,13 +322,13 @@ elm_pager_content_promote(Evas_Object *obj, Evas_Object *content)
|
||||||
Item *it;
|
Item *it;
|
||||||
EINA_LIST_FOREACH(wd->stack, l, it)
|
EINA_LIST_FOREACH(wd->stack, l, it)
|
||||||
{
|
{
|
||||||
if (it->content == content)
|
if (it->content == content)
|
||||||
{
|
{
|
||||||
wd->stack = eina_list_remove_list(wd->stack, l);
|
wd->stack = eina_list_remove_list(wd->stack, l);
|
||||||
wd->stack = eina_list_append(wd->stack, it);
|
wd->stack = eina_list_append(wd->stack, it);
|
||||||
_eval_top(obj);
|
_eval_top(obj);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -367,4 +367,3 @@ elm_pager_content_top_get(Evas_Object *obj)
|
||||||
it = eina_list_last(wd->stack)->data;
|
it = eina_list_last(wd->stack)->data;
|
||||||
return it->content;
|
return it->content;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -37,8 +37,8 @@ _sizing_eval(Evas_Object *obj)
|
||||||
Evas_Coord minw = -1, minh = -1, maxw = -1, maxh = -1;
|
Evas_Coord minw = -1, minh = -1, maxw = -1, maxh = -1;
|
||||||
|
|
||||||
evas_object_size_hint_min_set(wd->img,
|
evas_object_size_hint_min_set(wd->img,
|
||||||
wd->size * elm_widget_scale_get(obj) * _elm_config->scale,
|
wd->size * elm_widget_scale_get(obj) * _elm_config->scale,
|
||||||
wd->size * elm_widget_scale_get(obj) * _elm_config->scale);
|
wd->size * elm_widget_scale_get(obj) * _elm_config->scale);
|
||||||
edje_object_part_swallow(wd->frm, "elm.swallow.content", wd->img);
|
edje_object_part_swallow(wd->frm, "elm.swallow.content", wd->img);
|
||||||
elm_coords_finger_size_adjust(1, &minw, 1, &minh);
|
elm_coords_finger_size_adjust(1, &minw, 1, &minh);
|
||||||
edje_object_size_min_restricted_calc(wd->frm, &minw, &minh, minw, minh);
|
edje_object_size_min_restricted_calc(wd->frm, &minw, &minh, minw, minh);
|
||||||
|
|
|
@ -137,11 +137,11 @@ _state_set(Evas_Object *obj, Eina_Bool state)
|
||||||
Widget_Data *wd = elm_widget_data_get(obj);
|
Widget_Data *wd = elm_widget_data_get(obj);
|
||||||
if (state != wd->state)
|
if (state != wd->state)
|
||||||
{
|
{
|
||||||
wd->state = state;
|
wd->state = state;
|
||||||
if (wd->state)
|
if (wd->state)
|
||||||
edje_object_signal_emit(wd->chk, "elm,state,radio,on", "elm");
|
edje_object_signal_emit(wd->chk, "elm,state,radio,on", "elm");
|
||||||
else
|
else
|
||||||
edje_object_signal_emit(wd->chk, "elm,state,radio,off", "elm");
|
edje_object_signal_emit(wd->chk, "elm,state,radio,off", "elm");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -153,9 +153,9 @@ _state_set_all(Widget_Data *wd)
|
||||||
|
|
||||||
EINA_LIST_FOREACH(wd->group->radios, l, child)
|
EINA_LIST_FOREACH(wd->group->radios, l, child)
|
||||||
{
|
{
|
||||||
Widget_Data *wd2 = elm_widget_data_get(child);
|
Widget_Data *wd2 = elm_widget_data_get(child);
|
||||||
if (wd2->value == wd->group->value) _state_set(child, 1);
|
if (wd2->value == wd->group->value) _state_set(child, 1);
|
||||||
else _state_set(child, 0);
|
else _state_set(child, 0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -227,13 +227,13 @@ elm_radio_label_set(Evas_Object *obj, const char *label)
|
||||||
if (wd->label) eina_stringshare_del(wd->label);
|
if (wd->label) eina_stringshare_del(wd->label);
|
||||||
if (label)
|
if (label)
|
||||||
{
|
{
|
||||||
wd->label = eina_stringshare_add(label);
|
wd->label = eina_stringshare_add(label);
|
||||||
edje_object_signal_emit(wd->chk, "elm,state,text,visible", "elm");
|
edje_object_signal_emit(wd->chk, "elm,state,text,visible", "elm");
|
||||||
edje_object_message_signal_process(wd->chk);
|
edje_object_message_signal_process(wd->chk);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
wd->label = NULL;
|
wd->label = NULL;
|
||||||
edje_object_signal_emit(wd->chk, "elm,state,text,hidden", "elm");
|
edje_object_signal_emit(wd->chk, "elm,state,text,hidden", "elm");
|
||||||
edje_object_message_signal_process(wd->chk);
|
edje_object_message_signal_process(wd->chk);
|
||||||
}
|
}
|
||||||
|
@ -380,18 +380,18 @@ elm_radio_value_pointer_set(Evas_Object *obj, int *valuep)
|
||||||
|
|
||||||
if (valuep)
|
if (valuep)
|
||||||
{
|
{
|
||||||
wd->group->valuep = valuep;
|
wd->group->valuep = valuep;
|
||||||
if (*(wd->group->valuep) != wd->group->value)
|
if (*(wd->group->valuep) != wd->group->value)
|
||||||
{
|
{
|
||||||
const Eina_List *l;
|
const Eina_List *l;
|
||||||
Evas_Object *child;
|
Evas_Object *child;
|
||||||
|
|
||||||
wd->group->value = *(wd->group->valuep);
|
wd->group->value = *(wd->group->valuep);
|
||||||
_state_set_all(wd);
|
_state_set_all(wd);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
wd->group->valuep = NULL;
|
wd->group->valuep = NULL;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -187,7 +187,7 @@ elm_scroller_add(Evas_Object *parent)
|
||||||
wd->scr = elm_smart_scroller_add(e);
|
wd->scr = elm_smart_scroller_add(e);
|
||||||
elm_widget_resize_object_set(obj, wd->scr);
|
elm_widget_resize_object_set(obj, wd->scr);
|
||||||
evas_object_event_callback_add(wd->scr, EVAS_CALLBACK_CHANGED_SIZE_HINTS,
|
evas_object_event_callback_add(wd->scr, EVAS_CALLBACK_CHANGED_SIZE_HINTS,
|
||||||
_changed_size_hints, obj);
|
_changed_size_hints, obj);
|
||||||
|
|
||||||
edje_object_size_min_calc(elm_smart_scroller_edje_object_get(wd->scr), &minw, &minh);
|
edje_object_size_min_calc(elm_smart_scroller_edje_object_get(wd->scr), &minw, &minh);
|
||||||
evas_object_size_hint_min_set(obj, minw, minh);
|
evas_object_size_hint_min_set(obj, minw, minh);
|
||||||
|
@ -252,9 +252,9 @@ elm_scroller_policy_set(Evas_Object *obj, Elm_Scroller_Policy policy_h, Elm_Scro
|
||||||
Widget_Data *wd = elm_widget_data_get(obj);
|
Widget_Data *wd = elm_widget_data_get(obj);
|
||||||
const Elm_Scroller_Policy map[3] =
|
const Elm_Scroller_Policy map[3] =
|
||||||
{
|
{
|
||||||
ELM_SMART_SCROLLER_POLICY_AUTO,
|
ELM_SMART_SCROLLER_POLICY_AUTO,
|
||||||
ELM_SMART_SCROLLER_POLICY_ON,
|
ELM_SMART_SCROLLER_POLICY_ON,
|
||||||
ELM_SMART_SCROLLER_POLICY_OFF
|
ELM_SMART_SCROLLER_POLICY_OFF
|
||||||
};
|
};
|
||||||
if (!wd) return;
|
if (!wd) return;
|
||||||
if ((policy_h < 0) || (policy_h >= 3) || (policy_v < 0) || (policy_v >= 3))
|
if ((policy_h < 0) || (policy_h >= 3) || (policy_v < 0) || (policy_v >= 3))
|
||||||
|
|
|
@ -159,17 +159,17 @@ _val_fetch(Evas_Object *obj)
|
||||||
double posx = 0.0, posy = 0.0, pos = 0.0, val;
|
double posx = 0.0, posy = 0.0, pos = 0.0, val;
|
||||||
|
|
||||||
edje_object_part_drag_value_get(wd->slider, "elm.dragable.slider",
|
edje_object_part_drag_value_get(wd->slider, "elm.dragable.slider",
|
||||||
&posx, &posy);
|
&posx, &posy);
|
||||||
if (wd->horizontal) pos = posx;
|
if (wd->horizontal) pos = posx;
|
||||||
else pos = posy;
|
else pos = posy;
|
||||||
if (wd->inverted) pos = 1.0 - pos;
|
if (wd->inverted) pos = 1.0 - pos;
|
||||||
val = (pos * (wd->val_max - wd->val_min)) + wd->val_min;
|
val = (pos * (wd->val_max - wd->val_min)) + wd->val_min;
|
||||||
if (val != wd->val)
|
if (val != wd->val)
|
||||||
{
|
{
|
||||||
wd->val = val;
|
wd->val = val;
|
||||||
evas_object_smart_callback_call(obj, "changed", NULL);
|
evas_object_smart_callback_call(obj, "changed", NULL);
|
||||||
if (wd->delay) ecore_timer_del(wd->delay);
|
if (wd->delay) ecore_timer_del(wd->delay);
|
||||||
wd->delay = ecore_timer_add(0.2, _delay_change, obj);
|
wd->delay = ecore_timer_add(0.2, _delay_change, obj);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -194,10 +194,10 @@ _units_set(Evas_Object *obj)
|
||||||
Widget_Data *wd = elm_widget_data_get(obj);
|
Widget_Data *wd = elm_widget_data_get(obj);
|
||||||
if (wd->units)
|
if (wd->units)
|
||||||
{
|
{
|
||||||
char buf[1024];
|
char buf[1024];
|
||||||
|
|
||||||
snprintf(buf, sizeof(buf), wd->units, wd->val);
|
snprintf(buf, sizeof(buf), wd->units, wd->val);
|
||||||
edje_object_part_text_set(wd->slider, "elm.units", buf);
|
edje_object_part_text_set(wd->slider, "elm.units", buf);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
edje_object_part_text_set(wd->slider, "elm.units", NULL);
|
edje_object_part_text_set(wd->slider, "elm.units", NULL);
|
||||||
|
@ -209,10 +209,10 @@ _indicator_set(Evas_Object *obj)
|
||||||
Widget_Data *wd = elm_widget_data_get(obj);
|
Widget_Data *wd = elm_widget_data_get(obj);
|
||||||
if (wd->indicator)
|
if (wd->indicator)
|
||||||
{
|
{
|
||||||
char buf[1024];
|
char buf[1024];
|
||||||
|
|
||||||
snprintf(buf, sizeof(buf), wd->indicator, wd->val);
|
snprintf(buf, sizeof(buf), wd->indicator, wd->val);
|
||||||
edje_object_part_text_set(wd->slider, "elm.indicator", buf);
|
edje_object_part_text_set(wd->slider, "elm.indicator", buf);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
edje_object_part_text_set(wd->slider, "elm.indicator", NULL);
|
edje_object_part_text_set(wd->slider, "elm.indicator", NULL);
|
||||||
|
@ -310,13 +310,13 @@ elm_slider_label_set(Evas_Object *obj, const char *label)
|
||||||
if (wd->label) eina_stringshare_del(wd->label);
|
if (wd->label) eina_stringshare_del(wd->label);
|
||||||
if (label)
|
if (label)
|
||||||
{
|
{
|
||||||
wd->label = eina_stringshare_add(label);
|
wd->label = eina_stringshare_add(label);
|
||||||
edje_object_signal_emit(wd->slider, "elm,state,text,visible", "elm");
|
edje_object_signal_emit(wd->slider, "elm,state,text,visible", "elm");
|
||||||
edje_object_message_signal_process(wd->slider);
|
edje_object_message_signal_process(wd->slider);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
wd->label = NULL;
|
wd->label = NULL;
|
||||||
edje_object_signal_emit(wd->slider, "elm,state,text,hidden", "elm");
|
edje_object_signal_emit(wd->slider, "elm,state,text,hidden", "elm");
|
||||||
edje_object_message_signal_process(wd->slider);
|
edje_object_message_signal_process(wd->slider);
|
||||||
}
|
}
|
||||||
|
@ -402,13 +402,13 @@ elm_slider_unit_format_set(Evas_Object *obj, const char *units)
|
||||||
if (wd->units) eina_stringshare_del(wd->units);
|
if (wd->units) eina_stringshare_del(wd->units);
|
||||||
if (units)
|
if (units)
|
||||||
{
|
{
|
||||||
wd->units = eina_stringshare_add(units);
|
wd->units = eina_stringshare_add(units);
|
||||||
edje_object_signal_emit(wd->slider, "elm,state,units,visible", "elm");
|
edje_object_signal_emit(wd->slider, "elm,state,units,visible", "elm");
|
||||||
edje_object_message_signal_process(wd->slider);
|
edje_object_message_signal_process(wd->slider);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
wd->units = NULL;
|
wd->units = NULL;
|
||||||
edje_object_signal_emit(wd->slider, "elm,state,units,hidden", "elm");
|
edje_object_signal_emit(wd->slider, "elm,state,units,hidden", "elm");
|
||||||
edje_object_message_signal_process(wd->slider);
|
edje_object_message_signal_process(wd->slider);
|
||||||
}
|
}
|
||||||
|
|
|
@ -13,12 +13,12 @@ _elm_theme_find_try(const char *f, const char *group)
|
||||||
|
|
||||||
if (edje_file_group_exists(f, group))
|
if (edje_file_group_exists(f, group))
|
||||||
{
|
{
|
||||||
file = eina_stringshare_add(f);
|
file = eina_stringshare_add(f);
|
||||||
if (file)
|
if (file)
|
||||||
{
|
{
|
||||||
eina_hash_add(cache, group, file);
|
eina_hash_add(cache, group, file);
|
||||||
return file;
|
return file;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
@ -35,8 +35,8 @@ _elm_theme_theme_element_try(const char *home, const char *f, const char *group)
|
||||||
return _elm_theme_find_try(f, group);
|
return _elm_theme_find_try(f, group);
|
||||||
else if (((f[0] == '~') && (f[1] == '/')))
|
else if (((f[0] == '~') && (f[1] == '/')))
|
||||||
{
|
{
|
||||||
snprintf(buf, sizeof(buf), "%s/%s", home, f + 2);
|
snprintf(buf, sizeof(buf), "%s/%s", home, f + 2);
|
||||||
return _elm_theme_find_try(buf, group);
|
return _elm_theme_find_try(buf, group);
|
||||||
}
|
}
|
||||||
snprintf(buf, sizeof(buf), "%s/.elementary/themes/%s.edj", home, f);
|
snprintf(buf, sizeof(buf), "%s/.elementary/themes/%s.edj", home, f);
|
||||||
file = _elm_theme_find_try(buf, group);
|
file = _elm_theme_find_try(buf, group);
|
||||||
|
@ -57,23 +57,23 @@ _elm_theme_group_file_find(const char *group)
|
||||||
if (file) return file;
|
if (file) return file;
|
||||||
if (!home)
|
if (!home)
|
||||||
{
|
{
|
||||||
home = getenv("HOME");
|
home = getenv("HOME");
|
||||||
if (!home) home = "";
|
if (!home) home = "";
|
||||||
}
|
}
|
||||||
EINA_LIST_FOREACH(overlay, l, f)
|
EINA_LIST_FOREACH(overlay, l, f)
|
||||||
{
|
{
|
||||||
file = _elm_theme_theme_element_try(home, f, group);
|
file = _elm_theme_theme_element_try(home, f, group);
|
||||||
if (file) return file;
|
if (file) return file;
|
||||||
}
|
}
|
||||||
EINA_LIST_FOREACH(themes, l, f)
|
EINA_LIST_FOREACH(themes, l, f)
|
||||||
{
|
{
|
||||||
file = _elm_theme_theme_element_try(home, f, group);
|
file = _elm_theme_theme_element_try(home, f, group);
|
||||||
if (file) return file;
|
if (file) return file;
|
||||||
}
|
}
|
||||||
EINA_LIST_FOREACH(extension, l, f)
|
EINA_LIST_FOREACH(extension, l, f)
|
||||||
{
|
{
|
||||||
file = _elm_theme_theme_element_try(home, f, group);
|
file = _elm_theme_theme_element_try(home, f, group);
|
||||||
if (file) return file;
|
if (file) return file;
|
||||||
}
|
}
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
@ -103,8 +103,8 @@ _elm_theme_set(Evas_Object *o, const char *clas, const char *group, const char *
|
||||||
file = _elm_theme_group_file_find(buf2);
|
file = _elm_theme_group_file_find(buf2);
|
||||||
if (file)
|
if (file)
|
||||||
{
|
{
|
||||||
ok = edje_object_file_set(o, file, buf2);
|
ok = edje_object_file_set(o, file, buf2);
|
||||||
if (ok) return 1;
|
if (ok) return 1;
|
||||||
}
|
}
|
||||||
snprintf(buf2, sizeof(buf2), "elm/%s/%s/default", clas, group);
|
snprintf(buf2, sizeof(buf2), "elm/%s/%s/default", clas, group);
|
||||||
file = _elm_theme_group_file_find(buf2);
|
file = _elm_theme_group_file_find(buf2);
|
||||||
|
@ -125,9 +125,9 @@ _elm_theme_icon_set(Evas_Object *o, const char *group, const char *style)
|
||||||
file = _elm_theme_group_file_find(buf2);
|
file = _elm_theme_group_file_find(buf2);
|
||||||
if (file)
|
if (file)
|
||||||
{
|
{
|
||||||
_els_smart_icon_file_edje_set(o, file, buf2);
|
_els_smart_icon_file_edje_set(o, file, buf2);
|
||||||
_els_smart_icon_size_get(o, &w, &h);
|
_els_smart_icon_size_get(o, &w, &h);
|
||||||
if (w > 0) return 1;
|
if (w > 0) return 1;
|
||||||
}
|
}
|
||||||
snprintf(buf2, sizeof(buf2), "elm/icon/%s/default", group);
|
snprintf(buf2, sizeof(buf2), "elm/icon/%s/default", group);
|
||||||
file = _elm_theme_group_file_find(buf2);
|
file = _elm_theme_group_file_find(buf2);
|
||||||
|
@ -154,47 +154,47 @@ _elm_theme_parse(const char *theme)
|
||||||
pe = p;
|
pe = p;
|
||||||
for (;;)
|
for (;;)
|
||||||
{
|
{
|
||||||
if ((*pe == ':') || (*pe == 0))
|
if ((*pe == ':') || (*pe == 0))
|
||||||
{ // p -> pe == 'name/'
|
{ // p -> pe == 'name/'
|
||||||
if (pe > p)
|
if (pe > p)
|
||||||
{
|
{
|
||||||
char *n = malloc(pe - p + 1);
|
char *n = malloc(pe - p + 1);
|
||||||
if (n)
|
if (n)
|
||||||
{
|
{
|
||||||
const char *nn;
|
const char *nn;
|
||||||
strncpy(n, p, pe - p);
|
strncpy(n, p, pe - p);
|
||||||
n[pe - p] = 0;
|
n[pe - p] = 0;
|
||||||
nn = eina_stringshare_add(n);
|
nn = eina_stringshare_add(n);
|
||||||
if (nn)
|
if (nn)
|
||||||
names = eina_list_append(names, nn);
|
names = eina_list_append(names, nn);
|
||||||
free(n);
|
free(n);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (*pe == 0) break;
|
if (*pe == 0) break;
|
||||||
p = pe + 1;
|
p = pe + 1;
|
||||||
pe = p;
|
pe = p;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
pe++;
|
pe++;
|
||||||
}
|
}
|
||||||
p = eina_list_data_get(eina_list_last(names));
|
p = eina_list_data_get(eina_list_last(names));
|
||||||
if ((!p) || ((p) && (strcmp(p, "default"))))
|
if ((!p) || ((p) && (strcmp(p, "default"))))
|
||||||
{
|
{
|
||||||
p = eina_stringshare_add("default");
|
p = eina_stringshare_add("default");
|
||||||
if (p)
|
if (p)
|
||||||
names = eina_list_append(names, p);
|
names = eina_list_append(names, p);
|
||||||
}
|
}
|
||||||
if (cache)
|
if (cache)
|
||||||
{
|
{
|
||||||
eina_hash_foreach(cache, _cache_free_cb, NULL);
|
eina_hash_foreach(cache, _cache_free_cb, NULL);
|
||||||
eina_hash_free(cache);
|
eina_hash_free(cache);
|
||||||
cache = NULL;
|
cache = NULL;
|
||||||
}
|
}
|
||||||
cache = eina_hash_string_superfast_new(NULL);
|
cache = eina_hash_string_superfast_new(NULL);
|
||||||
|
|
||||||
EINA_LIST_FREE(themes, p)
|
EINA_LIST_FREE(themes, p)
|
||||||
{
|
{
|
||||||
eina_stringshare_del(p);
|
eina_stringshare_del(p);
|
||||||
}
|
}
|
||||||
|
|
||||||
themes = names;
|
themes = names;
|
||||||
|
|
|
@ -154,13 +154,13 @@ elm_toggle_label_set(Evas_Object *obj, const char *label)
|
||||||
if (wd->label) eina_stringshare_del(wd->label);
|
if (wd->label) eina_stringshare_del(wd->label);
|
||||||
if (label)
|
if (label)
|
||||||
{
|
{
|
||||||
wd->label = eina_stringshare_add(label);
|
wd->label = eina_stringshare_add(label);
|
||||||
edje_object_signal_emit(wd->tgl, "elm,state,text,visible", "elm");
|
edje_object_signal_emit(wd->tgl, "elm,state,text,visible", "elm");
|
||||||
edje_object_message_signal_process(wd->tgl);
|
edje_object_message_signal_process(wd->tgl);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
wd->label = NULL;
|
wd->label = NULL;
|
||||||
edje_object_signal_emit(wd->tgl, "elm,state,text,hidden", "elm");
|
edje_object_signal_emit(wd->tgl, "elm,state,text,hidden", "elm");
|
||||||
edje_object_message_signal_process(wd->tgl);
|
edje_object_message_signal_process(wd->tgl);
|
||||||
}
|
}
|
||||||
|
@ -242,6 +242,6 @@ elm_toggle_state_pointer_set(Evas_Object *obj, Eina_Bool *statep)
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
wd->statep = NULL;
|
wd->statep = NULL;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -47,12 +47,12 @@ _item_select(Elm_Toolbar_Item *it)
|
||||||
if (it->selected) return;
|
if (it->selected) return;
|
||||||
EINA_LIST_FOREACH(wd->items, l, it2)
|
EINA_LIST_FOREACH(wd->items, l, it2)
|
||||||
{
|
{
|
||||||
if (it2->selected)
|
if (it2->selected)
|
||||||
{
|
{
|
||||||
it2->selected = EINA_FALSE;
|
it2->selected = EINA_FALSE;
|
||||||
edje_object_signal_emit(it2->base, "elm,state,unselected", "elm");
|
edje_object_signal_emit(it2->base, "elm,state,unselected", "elm");
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
it->selected = EINA_TRUE;
|
it->selected = EINA_TRUE;
|
||||||
edje_object_signal_emit(it->base, "elm,state,selected", "elm");
|
edje_object_signal_emit(it->base, "elm,state,selected", "elm");
|
||||||
|
@ -69,10 +69,10 @@ _del_hook(Evas_Object *obj)
|
||||||
Elm_Toolbar_Item *it;
|
Elm_Toolbar_Item *it;
|
||||||
EINA_LIST_FREE(wd->items, it)
|
EINA_LIST_FREE(wd->items, it)
|
||||||
{
|
{
|
||||||
eina_stringshare_del(it->label);
|
eina_stringshare_del(it->label);
|
||||||
if (it->icon) evas_object_del(it->icon);
|
if (it->icon) evas_object_del(it->icon);
|
||||||
evas_object_del(it->base);
|
evas_object_del(it->base);
|
||||||
free(it);
|
free(it);
|
||||||
}
|
}
|
||||||
free(wd);
|
free(wd);
|
||||||
}
|
}
|
||||||
|
@ -89,24 +89,24 @@ _theme_hook(Evas_Object *obj)
|
||||||
edje_object_scale_set(wd->scr, elm_widget_scale_get(obj) * _elm_config->scale);
|
edje_object_scale_set(wd->scr, elm_widget_scale_get(obj) * _elm_config->scale);
|
||||||
EINA_LIST_FOREACH(wd->items, l, it)
|
EINA_LIST_FOREACH(wd->items, l, it)
|
||||||
{
|
{
|
||||||
edje_object_scale_set(it->base, elm_widget_scale_get(obj) * _elm_config->scale);
|
edje_object_scale_set(it->base, elm_widget_scale_get(obj) * _elm_config->scale);
|
||||||
if (it->selected)
|
if (it->selected)
|
||||||
edje_object_signal_emit(it->base, "elm,state,selected", "elm");
|
edje_object_signal_emit(it->base, "elm,state,selected", "elm");
|
||||||
_elm_theme_set(it->base, "toolbar", "item", style);
|
_elm_theme_set(it->base, "toolbar", "item", style);
|
||||||
if (it->icon)
|
if (it->icon)
|
||||||
{
|
{
|
||||||
edje_extern_object_min_size_set(it->icon,
|
edje_extern_object_min_size_set(it->icon,
|
||||||
(double)wd->icon_size * _elm_config->scale,
|
(double)wd->icon_size * _elm_config->scale,
|
||||||
(double)wd->icon_size * _elm_config->scale);
|
(double)wd->icon_size * _elm_config->scale);
|
||||||
edje_object_part_swallow(it->base, "elm.swallow.icon", it->icon);
|
edje_object_part_swallow(it->base, "elm.swallow.icon", it->icon);
|
||||||
}
|
}
|
||||||
edje_object_part_text_set(it->base, "elm.text", it->label);
|
edje_object_part_text_set(it->base, "elm.text", it->label);
|
||||||
mw = mh = -1;
|
mw = mh = -1;
|
||||||
elm_coords_finger_size_adjust(1, &mw, 1, &mh);
|
elm_coords_finger_size_adjust(1, &mw, 1, &mh);
|
||||||
edje_object_size_min_restricted_calc(it->base, &mw, &mh, mw, mh);
|
edje_object_size_min_restricted_calc(it->base, &mw, &mh, mw, mh);
|
||||||
elm_coords_finger_size_adjust(1, &mw, 1, &mh);
|
elm_coords_finger_size_adjust(1, &mw, 1, &mh);
|
||||||
evas_object_size_hint_min_set(it->base, mw, mh);
|
evas_object_size_hint_min_set(it->base, mw, mh);
|
||||||
evas_object_size_hint_max_set(it->base, 9999, mh);
|
evas_object_size_hint_max_set(it->base, 9999, mh);
|
||||||
}
|
}
|
||||||
_sizing_eval(obj);
|
_sizing_eval(obj);
|
||||||
}
|
}
|
||||||
|
@ -125,13 +125,13 @@ _sizing_eval(Evas_Object *obj)
|
||||||
elm_smart_scroller_child_viewport_size_get(wd->scr, &vw, &vh);
|
elm_smart_scroller_child_viewport_size_get(wd->scr, &vw, &vh);
|
||||||
if (wd->scrollable)
|
if (wd->scrollable)
|
||||||
{
|
{
|
||||||
minw = 500 - vw;
|
minw = 500 - vw;
|
||||||
minh = minh + (500 - vh);
|
minh = minh + (500 - vh);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
minw = minw + (500 - vw);
|
minw = minw + (500 - vw);
|
||||||
minh = minh + (500 - vh);
|
minh = minh + (500 - vh);
|
||||||
}
|
}
|
||||||
evas_object_size_hint_min_set(obj, minw, minh);
|
evas_object_size_hint_min_set(obj, minw, minh);
|
||||||
evas_object_size_hint_max_set(obj, maxw, maxh);
|
evas_object_size_hint_max_set(obj, maxw, maxh);
|
||||||
|
@ -150,15 +150,15 @@ _resize(void *data, Evas *e, Evas_Object *obj, void *event_info)
|
||||||
evas_object_geometry_get(wd->bx, NULL, NULL, &w, &h);
|
evas_object_geometry_get(wd->bx, NULL, NULL, &w, &h);
|
||||||
if (vw >= mw)
|
if (vw >= mw)
|
||||||
{
|
{
|
||||||
if (w != vw) evas_object_resize(wd->bx, vw, h);
|
if (w != vw) evas_object_resize(wd->bx, vw, h);
|
||||||
}
|
}
|
||||||
EINA_LIST_FOREACH(wd->items, l, it)
|
EINA_LIST_FOREACH(wd->items, l, it)
|
||||||
{
|
{
|
||||||
if (it->selected)
|
if (it->selected)
|
||||||
{
|
{
|
||||||
_item_show(it);
|
_item_show(it);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -191,8 +191,8 @@ elm_toolbar_add(Evas_Object *parent)
|
||||||
elm_smart_scroller_theme_set(wd->scr, "toolbar", "base", "default");
|
elm_smart_scroller_theme_set(wd->scr, "toolbar", "base", "default");
|
||||||
elm_widget_resize_object_set(obj, wd->scr);
|
elm_widget_resize_object_set(obj, wd->scr);
|
||||||
elm_smart_scroller_policy_set(wd->scr,
|
elm_smart_scroller_policy_set(wd->scr,
|
||||||
ELM_SMART_SCROLLER_POLICY_AUTO,
|
ELM_SMART_SCROLLER_POLICY_AUTO,
|
||||||
ELM_SMART_SCROLLER_POLICY_OFF);
|
ELM_SMART_SCROLLER_POLICY_OFF);
|
||||||
|
|
||||||
wd->icon_size = 32;
|
wd->icon_size = 32;
|
||||||
wd->scrollable = EINA_TRUE;
|
wd->scrollable = EINA_TRUE;
|
||||||
|
@ -205,7 +205,7 @@ elm_toolbar_add(Evas_Object *parent)
|
||||||
evas_object_show(wd->bx);
|
evas_object_show(wd->bx);
|
||||||
|
|
||||||
evas_object_event_callback_add(wd->scr, EVAS_CALLBACK_RESIZE,
|
evas_object_event_callback_add(wd->scr, EVAS_CALLBACK_RESIZE,
|
||||||
_resize, obj);
|
_resize, obj);
|
||||||
|
|
||||||
_sizing_eval(obj);
|
_sizing_eval(obj);
|
||||||
return obj;
|
return obj;
|
||||||
|
@ -227,16 +227,16 @@ elm_toolbar_item_add(Evas_Object *obj, Evas_Object *icon, const char *label, voi
|
||||||
it->base = edje_object_add(evas_object_evas_get(obj));
|
it->base = edje_object_add(evas_object_evas_get(obj));
|
||||||
_elm_theme_set(it->base, "toolbar", "item", elm_widget_style_get(obj));
|
_elm_theme_set(it->base, "toolbar", "item", elm_widget_style_get(obj));
|
||||||
edje_object_signal_callback_add(it->base, "elm,action,click", "elm",
|
edje_object_signal_callback_add(it->base, "elm,action,click", "elm",
|
||||||
_select, it);
|
_select, it);
|
||||||
elm_widget_sub_object_add(obj, it->base);
|
elm_widget_sub_object_add(obj, it->base);
|
||||||
if (it->icon)
|
if (it->icon)
|
||||||
{
|
{
|
||||||
edje_extern_object_min_size_set(it->icon,
|
edje_extern_object_min_size_set(it->icon,
|
||||||
(double)wd->icon_size * _elm_config->scale,
|
(double)wd->icon_size * _elm_config->scale,
|
||||||
(double)wd->icon_size * _elm_config->scale);
|
(double)wd->icon_size * _elm_config->scale);
|
||||||
edje_object_part_swallow(it->base, "elm.swallow.icon", it->icon);
|
edje_object_part_swallow(it->base, "elm.swallow.icon", it->icon);
|
||||||
evas_object_show(it->icon);
|
evas_object_show(it->icon);
|
||||||
elm_widget_sub_object_add(obj, it->icon);
|
elm_widget_sub_object_add(obj, it->icon);
|
||||||
}
|
}
|
||||||
edje_object_part_text_set(it->base, "elm.text", it->label);
|
edje_object_part_text_set(it->base, "elm.text", it->label);
|
||||||
mw = mh = -1;
|
mw = mh = -1;
|
||||||
|
|
|
@ -5,8 +5,8 @@
|
||||||
#define API_ENTRY \
|
#define API_ENTRY \
|
||||||
Smart_Data *sd = evas_object_smart_data_get(obj); \
|
Smart_Data *sd = evas_object_smart_data_get(obj); \
|
||||||
if ((!obj) || (!sd) || \
|
if ((!obj) || (!sd) || \
|
||||||
(evas_object_type_get(obj) && \
|
(evas_object_type_get(obj) && \
|
||||||
strcmp(evas_object_type_get(obj), SMART_NAME)))
|
strcmp(evas_object_type_get(obj), SMART_NAME)))
|
||||||
#define INTERNAL_ENTRY \
|
#define INTERNAL_ENTRY \
|
||||||
Smart_Data *sd = evas_object_smart_data_get(obj); \
|
Smart_Data *sd = evas_object_smart_data_get(obj); \
|
||||||
if (!sd) return;
|
if (!sd) return;
|
||||||
|
@ -68,12 +68,12 @@ _sub_obj_del(void *data, Evas *e, Evas_Object *obj, void *event_info)
|
||||||
Smart_Data *sd = data;
|
Smart_Data *sd = data;
|
||||||
if (obj == sd->resize_obj)
|
if (obj == sd->resize_obj)
|
||||||
{
|
{
|
||||||
sd->resize_obj = NULL;
|
sd->resize_obj = NULL;
|
||||||
}
|
}
|
||||||
else if (obj == sd->hover_obj) sd->hover_obj = NULL;
|
else if (obj == sd->hover_obj) sd->hover_obj = NULL;
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
sd->subobjs = eina_list_remove(sd->subobjs, obj);
|
sd->subobjs = eina_list_remove(sd->subobjs, obj);
|
||||||
}
|
}
|
||||||
evas_object_smart_callback_call(sd->obj, "sub-object-del", obj);
|
evas_object_smart_callback_call(sd->obj, "sub-object-del", obj);
|
||||||
}
|
}
|
||||||
|
@ -238,11 +238,11 @@ elm_widget_resize_object_set(Evas_Object *obj, Evas_Object *sobj)
|
||||||
API_ENTRY return;
|
API_ENTRY return;
|
||||||
if (sd->resize_obj)
|
if (sd->resize_obj)
|
||||||
{
|
{
|
||||||
if (!strcmp(evas_object_type_get(sd->resize_obj), SMART_NAME))
|
if (!strcmp(evas_object_type_get(sd->resize_obj), SMART_NAME))
|
||||||
{
|
{
|
||||||
Smart_Data *sd2 = evas_object_smart_data_get(sd->resize_obj);
|
Smart_Data *sd2 = evas_object_smart_data_get(sd->resize_obj);
|
||||||
if (sd2) sd2->parent_obj = NULL;
|
if (sd2) sd2->parent_obj = NULL;
|
||||||
}
|
}
|
||||||
evas_object_event_callback_del(sd->resize_obj, EVAS_CALLBACK_DEL, _sub_obj_del);
|
evas_object_event_callback_del(sd->resize_obj, EVAS_CALLBACK_DEL, _sub_obj_del);
|
||||||
evas_object_event_callback_del(sd->resize_obj, EVAS_CALLBACK_MOUSE_DOWN, _sub_obj_mouse_down);
|
evas_object_event_callback_del(sd->resize_obj, EVAS_CALLBACK_MOUSE_DOWN, _sub_obj_mouse_down);
|
||||||
evas_object_smart_member_del(sd->resize_obj);
|
evas_object_smart_member_del(sd->resize_obj);
|
||||||
|
@ -250,11 +250,11 @@ elm_widget_resize_object_set(Evas_Object *obj, Evas_Object *sobj)
|
||||||
sd->resize_obj = sobj;
|
sd->resize_obj = sobj;
|
||||||
if (sd->resize_obj)
|
if (sd->resize_obj)
|
||||||
{
|
{
|
||||||
if (!strcmp(evas_object_type_get(sd->resize_obj), SMART_NAME))
|
if (!strcmp(evas_object_type_get(sd->resize_obj), SMART_NAME))
|
||||||
{
|
{
|
||||||
Smart_Data *sd2 = evas_object_smart_data_get(sd->resize_obj);
|
Smart_Data *sd2 = evas_object_smart_data_get(sd->resize_obj);
|
||||||
if (sd2) sd2->parent_obj = obj;
|
if (sd2) sd2->parent_obj = obj;
|
||||||
}
|
}
|
||||||
evas_object_clip_set(sobj, evas_object_clip_get(obj));
|
evas_object_clip_set(sobj, evas_object_clip_get(obj));
|
||||||
evas_object_smart_member_add(sobj, obj);
|
evas_object_smart_member_add(sobj, obj);
|
||||||
evas_object_event_callback_add(sobj, EVAS_CALLBACK_DEL, _sub_obj_del, sd);
|
evas_object_event_callback_add(sobj, EVAS_CALLBACK_DEL, _sub_obj_del, sd);
|
||||||
|
@ -345,7 +345,7 @@ elm_widget_focus_jump(Evas_Object *obj, int forward)
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
int focus_next;
|
int focus_next;
|
||||||
int noloop = 0;
|
int noloop = 0;
|
||||||
|
|
||||||
focus_next = 0;
|
focus_next = 0;
|
||||||
if (!sd->focused)
|
if (!sd->focused)
|
||||||
|
@ -359,53 +359,53 @@ elm_widget_focus_jump(Evas_Object *obj, int forward)
|
||||||
{
|
{
|
||||||
if (forward)
|
if (forward)
|
||||||
{
|
{
|
||||||
if (elm_widget_can_focus_get(sd->resize_obj))
|
if (elm_widget_can_focus_get(sd->resize_obj))
|
||||||
{
|
{
|
||||||
if ((focus_next) &&
|
if ((focus_next) &&
|
||||||
(!elm_widget_disabled_get(sd->resize_obj)))
|
(!elm_widget_disabled_get(sd->resize_obj)))
|
||||||
{
|
{
|
||||||
/* the previous focused item was unfocused - so focus
|
/* the previous focused item was unfocused - so focus
|
||||||
* the next one (that can be focused) */
|
* the next one (that can be focused) */
|
||||||
if (elm_widget_focus_jump(sd->resize_obj, forward)) return 1;
|
if (elm_widget_focus_jump(sd->resize_obj, forward)) return 1;
|
||||||
else noloop = 1;
|
else noloop = 1;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (elm_widget_focus_get(sd->resize_obj))
|
if (elm_widget_focus_get(sd->resize_obj))
|
||||||
{
|
{
|
||||||
/* jump to the next focused item or focus this item */
|
/* jump to the next focused item or focus this item */
|
||||||
if (elm_widget_focus_jump(sd->resize_obj, forward)) return 1;
|
if (elm_widget_focus_jump(sd->resize_obj, forward)) return 1;
|
||||||
/* it returned 0 - it got to the last item and is past it */
|
/* it returned 0 - it got to the last item and is past it */
|
||||||
focus_next = 1;
|
focus_next = 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (!noloop)
|
if (!noloop)
|
||||||
{
|
{
|
||||||
const Eina_List *l;
|
const Eina_List *l;
|
||||||
Evas_Object *child;
|
Evas_Object *child;
|
||||||
EINA_LIST_FOREACH(sd->subobjs, l, child)
|
EINA_LIST_FOREACH(sd->subobjs, l, child)
|
||||||
{
|
{
|
||||||
if (elm_widget_can_focus_get(child))
|
if (elm_widget_can_focus_get(child))
|
||||||
{
|
{
|
||||||
if ((focus_next) &&
|
if ((focus_next) &&
|
||||||
(!elm_widget_disabled_get(child)))
|
(!elm_widget_disabled_get(child)))
|
||||||
{
|
{
|
||||||
/* the previous focused item was unfocused - so focus
|
/* the previous focused item was unfocused - so focus
|
||||||
* the next one (that can be focused) */
|
* the next one (that can be focused) */
|
||||||
if (elm_widget_focus_jump(child, forward)) return 1;
|
if (elm_widget_focus_jump(child, forward)) return 1;
|
||||||
else break;
|
else break;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (elm_widget_focus_get(child))
|
if (elm_widget_focus_get(child))
|
||||||
{
|
{
|
||||||
/* jump to the next focused item or focus this item */
|
/* jump to the next focused item or focus this item */
|
||||||
if (elm_widget_focus_jump(child, forward)) return 1;
|
if (elm_widget_focus_jump(child, forward)) return 1;
|
||||||
/* it returned 0 - it got to the last item and is past it */
|
/* it returned 0 - it got to the last item and is past it */
|
||||||
focus_next = 1;
|
focus_next = 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -439,8 +439,8 @@ elm_widget_focus_jump(Evas_Object *obj, int forward)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (!l)
|
if (!l)
|
||||||
{
|
{
|
||||||
if (elm_widget_can_focus_get(sd->resize_obj))
|
if (elm_widget_can_focus_get(sd->resize_obj))
|
||||||
{
|
{
|
||||||
if ((focus_next) &&
|
if ((focus_next) &&
|
||||||
|
@ -461,15 +461,15 @@ elm_widget_focus_jump(Evas_Object *obj, int forward)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
/* no next item can be focused */
|
/* no next item can be focused */
|
||||||
if (sd->focused)
|
if (sd->focused)
|
||||||
{
|
{
|
||||||
sd->focused = 0;
|
sd->focused = 0;
|
||||||
if (sd->on_focus_func) sd->on_focus_func(sd->on_focus_data, obj);
|
if (sd->on_focus_func) sd->on_focus_func(sd->on_focus_data, obj);
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -492,25 +492,25 @@ elm_widget_focus_set(Evas_Object *obj, int first)
|
||||||
{
|
{
|
||||||
if (first)
|
if (first)
|
||||||
{
|
{
|
||||||
if ((elm_widget_can_focus_get(sd->resize_obj)) &&
|
if ((elm_widget_can_focus_get(sd->resize_obj)) &&
|
||||||
(!elm_widget_disabled_get(sd->resize_obj)))
|
(!elm_widget_disabled_get(sd->resize_obj)))
|
||||||
{
|
{
|
||||||
elm_widget_focus_set(sd->resize_obj, first);
|
elm_widget_focus_set(sd->resize_obj, first);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
const Eina_List *l;
|
const Eina_List *l;
|
||||||
Evas_Object *child;
|
Evas_Object *child;
|
||||||
EINA_LIST_FOREACH(sd->subobjs, l, child)
|
EINA_LIST_FOREACH(sd->subobjs, l, child)
|
||||||
{
|
{
|
||||||
if ((elm_widget_can_focus_get(child)) &&
|
if ((elm_widget_can_focus_get(child)) &&
|
||||||
(!elm_widget_disabled_get(child)))
|
(!elm_widget_disabled_get(child)))
|
||||||
{
|
{
|
||||||
elm_widget_focus_set(child, first);
|
elm_widget_focus_set(child, first);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -525,14 +525,14 @@ elm_widget_focus_set(Evas_Object *obj, int first)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (!l)
|
if (!l)
|
||||||
{
|
{
|
||||||
if ((elm_widget_can_focus_get(sd->resize_obj)) &&
|
if ((elm_widget_can_focus_get(sd->resize_obj)) &&
|
||||||
(!elm_widget_disabled_get(sd->resize_obj)))
|
(!elm_widget_disabled_get(sd->resize_obj)))
|
||||||
{
|
{
|
||||||
elm_widget_focus_set(sd->resize_obj, first);
|
elm_widget_focus_set(sd->resize_obj, first);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -551,20 +551,20 @@ elm_widget_focused_object_clear(Evas_Object *obj)
|
||||||
if (!sd->focused) return;
|
if (!sd->focused) return;
|
||||||
if (elm_widget_focus_get(sd->resize_obj))
|
if (elm_widget_focus_get(sd->resize_obj))
|
||||||
{
|
{
|
||||||
elm_widget_focused_object_clear(sd->resize_obj);
|
elm_widget_focused_object_clear(sd->resize_obj);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
const Eina_List *l;
|
const Eina_List *l;
|
||||||
Evas_Object *child;
|
Evas_Object *child;
|
||||||
EINA_LIST_FOREACH(sd->subobjs, l, child)
|
EINA_LIST_FOREACH(sd->subobjs, l, child)
|
||||||
{
|
{
|
||||||
if (elm_widget_focus_get(child))
|
if (elm_widget_focus_get(child))
|
||||||
{
|
{
|
||||||
elm_widget_focused_object_clear(child);
|
elm_widget_focused_object_clear(child);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
sd->focused = 0;
|
sd->focused = 0;
|
||||||
if (sd->on_focus_func) sd->on_focus_func(sd->on_focus_data, obj);
|
if (sd->on_focus_func) sd->on_focus_func(sd->on_focus_data, obj);
|
||||||
|
@ -595,31 +595,31 @@ elm_widget_focus_steal(Evas_Object *obj)
|
||||||
{
|
{
|
||||||
o = elm_widget_parent_get(parent);
|
o = elm_widget_parent_get(parent);
|
||||||
if (!o) break;
|
if (!o) break;
|
||||||
sd = evas_object_smart_data_get(o);
|
sd = evas_object_smart_data_get(o);
|
||||||
if (sd->focused) break;
|
if (sd->focused) break;
|
||||||
parent = o;
|
parent = o;
|
||||||
}
|
}
|
||||||
if (!elm_widget_parent_get(parent))
|
if (!elm_widget_parent_get(parent))
|
||||||
elm_widget_focused_object_clear(parent);
|
elm_widget_focused_object_clear(parent);
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
parent = elm_widget_parent_get(parent);
|
parent = elm_widget_parent_get(parent);
|
||||||
sd = evas_object_smart_data_get(parent);
|
sd = evas_object_smart_data_get(parent);
|
||||||
if (elm_widget_focus_get(sd->resize_obj))
|
if (elm_widget_focus_get(sd->resize_obj))
|
||||||
elm_widget_focused_object_clear(sd->resize_obj);
|
elm_widget_focused_object_clear(sd->resize_obj);
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
const Eina_List *l;
|
const Eina_List *l;
|
||||||
Evas_Object *child;
|
Evas_Object *child;
|
||||||
EINA_LIST_FOREACH(sd->subobjs, l, child)
|
EINA_LIST_FOREACH(sd->subobjs, l, child)
|
||||||
{
|
{
|
||||||
if (elm_widget_focus_get(child))
|
if (elm_widget_focus_get(child))
|
||||||
{
|
{
|
||||||
elm_widget_focused_object_clear(child);
|
elm_widget_focused_object_clear(child);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
_elm_widget_parent_focus(obj);
|
_elm_widget_parent_focus(obj);
|
||||||
return;
|
return;
|
||||||
|
@ -653,8 +653,8 @@ elm_widget_disabled_set(Evas_Object *obj, int disabled)
|
||||||
Evas_Object *o, *parent;
|
Evas_Object *o, *parent;
|
||||||
|
|
||||||
parent = obj;
|
parent = obj;
|
||||||
for (;;)
|
for (;;)
|
||||||
{
|
{
|
||||||
o = elm_widget_parent_get(parent);
|
o = elm_widget_parent_get(parent);
|
||||||
if (!o) break;
|
if (!o) break;
|
||||||
parent = o;
|
parent = o;
|
||||||
|
@ -756,8 +756,8 @@ elm_widget_scale_set(Evas_Object *obj, double scale)
|
||||||
if (scale <= 0.0) scale = 0.0;
|
if (scale <= 0.0) scale = 0.0;
|
||||||
if (sd->scale != scale)
|
if (sd->scale != scale)
|
||||||
{
|
{
|
||||||
sd->scale = scale;
|
sd->scale = scale;
|
||||||
elm_widget_theme(obj);
|
elm_widget_theme(obj);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -853,24 +853,24 @@ _smart_del(Evas_Object *obj)
|
||||||
if (sd->del_pre_func) sd->del_pre_func(obj);
|
if (sd->del_pre_func) sd->del_pre_func(obj);
|
||||||
if (sd->resize_obj)
|
if (sd->resize_obj)
|
||||||
{
|
{
|
||||||
sobj = sd->resize_obj;
|
sobj = sd->resize_obj;
|
||||||
sd->resize_obj = NULL;
|
sd->resize_obj = NULL;
|
||||||
evas_object_event_callback_del(sobj, EVAS_CALLBACK_DEL, _sub_obj_del);
|
evas_object_event_callback_del(sobj, EVAS_CALLBACK_DEL, _sub_obj_del);
|
||||||
evas_object_smart_callback_call(sd->obj, "sub-object-del", sd->resize_obj);
|
evas_object_smart_callback_call(sd->obj, "sub-object-del", sd->resize_obj);
|
||||||
evas_object_del(sobj);
|
evas_object_del(sobj);
|
||||||
}
|
}
|
||||||
if (sd->hover_obj)
|
if (sd->hover_obj)
|
||||||
{
|
{
|
||||||
sobj = sd->resize_obj;
|
sobj = sd->resize_obj;
|
||||||
sd->hover_obj = NULL;
|
sd->hover_obj = NULL;
|
||||||
evas_object_event_callback_del(sobj, EVAS_CALLBACK_DEL, _sub_obj_del);
|
evas_object_event_callback_del(sobj, EVAS_CALLBACK_DEL, _sub_obj_del);
|
||||||
evas_object_smart_callback_call(sd->obj, "sub-object-del", sobj);
|
evas_object_smart_callback_call(sd->obj, "sub-object-del", sobj);
|
||||||
evas_object_del(sobj);
|
evas_object_del(sobj);
|
||||||
}
|
}
|
||||||
EINA_LIST_FREE(sd->subobjs, sobj)
|
EINA_LIST_FREE(sd->subobjs, sobj)
|
||||||
{
|
{
|
||||||
evas_object_event_callback_del(sobj, EVAS_CALLBACK_DEL, _sub_obj_del);
|
evas_object_event_callback_del(sobj, EVAS_CALLBACK_DEL, _sub_obj_del);
|
||||||
evas_object_smart_callback_call(sd->obj, "sub-object-del", sobj);
|
evas_object_smart_callback_call(sd->obj, "sub-object-del", sobj);
|
||||||
evas_object_del(sobj);
|
evas_object_del(sobj);
|
||||||
}
|
}
|
||||||
if (sd->del_func) sd->del_func(obj);
|
if (sd->del_func) sd->del_func(obj);
|
||||||
|
@ -957,6 +957,6 @@ _smart_init(void)
|
||||||
NULL,
|
NULL,
|
||||||
NULL
|
NULL
|
||||||
};
|
};
|
||||||
_e_smart = evas_smart_class_new(&sc);
|
_e_smart = evas_smart_class_new(&sc);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -80,12 +80,12 @@ _elm_win_obj_callback_del(void *data, Evas *e, Evas_Object *obj, void *event_inf
|
||||||
while (evas_object_bottom_get(win->evas) &&
|
while (evas_object_bottom_get(win->evas) &&
|
||||||
(evas_object_bottom_get(win->evas) != obj))
|
(evas_object_bottom_get(win->evas) != obj))
|
||||||
{
|
{
|
||||||
evas_object_del(evas_object_bottom_get(win->evas));
|
evas_object_del(evas_object_bottom_get(win->evas));
|
||||||
}
|
}
|
||||||
while (evas_object_top_get(win->evas) &&
|
while (evas_object_top_get(win->evas) &&
|
||||||
(evas_object_top_get(win->evas) != obj))
|
(evas_object_top_get(win->evas) != obj))
|
||||||
{
|
{
|
||||||
evas_object_del(evas_object_top_get(win->evas));
|
evas_object_del(evas_object_top_get(win->evas));
|
||||||
}
|
}
|
||||||
evas_image_cache_flush(win->evas);
|
evas_image_cache_flush(win->evas);
|
||||||
evas_font_cache_flush(win->evas);
|
evas_font_cache_flush(win->evas);
|
||||||
|
@ -345,11 +345,11 @@ elm_win_add(Evas_Object *parent, const char *name, Elm_Win_Type type)
|
||||||
evas_object_pass_events_set(win->win_obj, 1);
|
evas_object_pass_events_set(win->win_obj, 1);
|
||||||
|
|
||||||
ecore_evas_object_associate(win->ee, win->win_obj,
|
ecore_evas_object_associate(win->ee, win->win_obj,
|
||||||
ECORE_EVAS_OBJECT_ASSOCIATE_BASE |
|
ECORE_EVAS_OBJECT_ASSOCIATE_BASE |
|
||||||
ECORE_EVAS_OBJECT_ASSOCIATE_STACK |
|
ECORE_EVAS_OBJECT_ASSOCIATE_STACK |
|
||||||
ECORE_EVAS_OBJECT_ASSOCIATE_LAYER);
|
ECORE_EVAS_OBJECT_ASSOCIATE_LAYER);
|
||||||
evas_object_event_callback_add(win->win_obj, EVAS_CALLBACK_DEL,
|
evas_object_event_callback_add(win->win_obj, EVAS_CALLBACK_DEL,
|
||||||
_elm_win_obj_callback_del, win);
|
_elm_win_obj_callback_del, win);
|
||||||
|
|
||||||
ecore_evas_name_class_set(win->ee, name, _elm_appname);
|
ecore_evas_name_class_set(win->ee, name, _elm_appname);
|
||||||
ecore_evas_callback_delete_request_set(win->ee, _elm_win_delete_request);
|
ecore_evas_callback_delete_request_set(win->ee, _elm_win_delete_request);
|
||||||
|
@ -377,7 +377,7 @@ elm_win_add(Evas_Object *parent, const char *name, Elm_Win_Type type)
|
||||||
{
|
{
|
||||||
case ELM_SOFTWARE_16_WINCE:
|
case ELM_SOFTWARE_16_WINCE:
|
||||||
case ELM_SOFTWARE_FB:
|
case ELM_SOFTWARE_FB:
|
||||||
ecore_evas_fullscreen_set(win->ee, 1);
|
ecore_evas_fullscreen_set(win->ee, 1);
|
||||||
break;
|
break;
|
||||||
case ELM_SOFTWARE_X11:
|
case ELM_SOFTWARE_X11:
|
||||||
case ELM_SOFTWARE_16_X11:
|
case ELM_SOFTWARE_16_X11:
|
||||||
|
@ -516,12 +516,12 @@ elm_win_fullscreen_set(Evas_Object *obj, Eina_Bool fullscreen)
|
||||||
{
|
{
|
||||||
case ELM_SOFTWARE_16_WINCE:
|
case ELM_SOFTWARE_16_WINCE:
|
||||||
case ELM_SOFTWARE_FB:
|
case ELM_SOFTWARE_FB:
|
||||||
// these engines... can ONLY be fullscreen
|
// these engines... can ONLY be fullscreen
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
ecore_evas_fullscreen_set(win->ee, fullscreen);
|
ecore_evas_fullscreen_set(win->ee, fullscreen);
|
||||||
_elm_win_xwin_update(win);
|
_elm_win_xwin_update(win);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -661,10 +661,10 @@ _sub_del(void *data, Evas_Object *obj, void *event_info)
|
||||||
Evas_Object *sub = event_info;
|
Evas_Object *sub = event_info;
|
||||||
if (sub == wd->content)
|
if (sub == wd->content)
|
||||||
{
|
{
|
||||||
evas_object_event_callback_del
|
evas_object_event_callback_del
|
||||||
(sub, EVAS_CALLBACK_CHANGED_SIZE_HINTS, _changed_size_hints);
|
(sub, EVAS_CALLBACK_CHANGED_SIZE_HINTS, _changed_size_hints);
|
||||||
wd->content = NULL;
|
wd->content = NULL;
|
||||||
_sizing_eval(obj);
|
_sizing_eval(obj);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -722,11 +722,11 @@ elm_win_inwin_content_set(Evas_Object *obj, Evas_Object *content)
|
||||||
wd->content = content;
|
wd->content = content;
|
||||||
if (content)
|
if (content)
|
||||||
{
|
{
|
||||||
elm_widget_sub_object_add(obj, content);
|
elm_widget_sub_object_add(obj, content);
|
||||||
edje_object_part_swallow(wd->frm, "elm.swallow.content", content);
|
edje_object_part_swallow(wd->frm, "elm.swallow.content", content);
|
||||||
evas_object_event_callback_add(content, EVAS_CALLBACK_CHANGED_SIZE_HINTS,
|
evas_object_event_callback_add(content, EVAS_CALLBACK_CHANGED_SIZE_HINTS,
|
||||||
_changed_size_hints, obj);
|
_changed_size_hints, obj);
|
||||||
_sizing_eval(obj);
|
_sizing_eval(obj);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue