remove trailing spaces

SVN revision: 41261
This commit is contained in:
Vincent Torri 2009-07-07 06:46:51 +00:00
parent 66a02d654c
commit e2be9d2b24
39 changed files with 2833 additions and 2835 deletions

View File

@ -6,8 +6,8 @@ MAINTAINERCLEANFILES = Makefile.in aclocal.m4 config.guess \
config.h.in config.sub configure install-sh \
ltconfig ltmain.sh missing mkinstalldirs \
stamp-h.in acconfig.h depcomp
EXTRA_DIST = README AUTHORS COPYING autogen.sh elementary.pc.in
EXTRA_DIST = README AUTHORS COPYING autogen.sh elementary.pc.in
pkgconfigdir = $(libdir)/pkgconfig
pkgconfig_DATA = elementary.pc
@ -20,4 +20,3 @@ installed_headers_DATA = elementary_config.h
doc:
@echo "entering doc/"
$(MAKE) -C doc doc

View File

@ -44,7 +44,7 @@ case "$host_os" in
;;
esac
AC_SUBST(release_info)
requirement_elm=""
PKG_PROG_PKG_CONFIG
@ -83,15 +83,15 @@ dnl managed by evil
ELM_UNIX_DEF="#define"
AC_CHECK_FUNCS(dlopen, res=yes, res=no)
if test "x$res" = "xyes"; then
AC_CHECK_FUNCS(dladdr, AC_DEFINE(HAVE_DLADDR))
AC_CHECK_FUNCS(dladdr, AC_DEFINE(HAVE_DLADDR))
else
AC_CHECK_LIB(dl, dlopen, res=yes, res=no)
if test "x$res" = "xyes"; then
AC_CHECK_LIB(dl, dladdr, AC_DEFINE(HAVE_DLADDR))
dlopen_libs=-ldl
else
AC_MSG_ERROR(Cannot find dlopen)
fi
AC_CHECK_LIB(dl, dlopen, res=yes, res=no)
if test "x$res" = "xyes"; then
AC_CHECK_LIB(dl, dladdr, AC_DEFINE(HAVE_DLADDR))
dlopen_libs=-ldl
else
AC_MSG_ERROR(Cannot find dlopen)
fi
fi
have_socket="yes"
;;

View File

@ -53,7 +53,7 @@ child_handler(int x, siginfo_t *info, void *data)
{
int status;
pid_t pid;
while ((pid = waitpid(-1, &status, WNOHANG)) > 0);
}
@ -61,13 +61,13 @@ static void
crash_handler(int x, siginfo_t *info, void *data)
{
double t;
EINA_ERROR_PERR("elementary_quicklaunch: crash detected. restarting.\n");
t = ecore_time_get();
if ((t - restart_time) <= 2.0)
{
EINA_ERROR_PERR("elementary_quicklaunch: crash too fast - less than 2 seconds. abort restart\n");
exit(-1);
EINA_ERROR_PERR("elementary_quicklaunch: crash too fast - less than 2 seconds. abort restart\n");
exit(-1);
}
ecore_app_restart();
}
@ -80,12 +80,12 @@ handle_run(int fd, unsigned long bytes)
char **argv = NULL;
char *cwd;
int argc;
buf = alloca(bytes);
if ((num = read(fd, buf, bytes)) < 0)
{
close(fd);
return;
close(fd);
return;
}
close(fd);
argc = ((unsigned long *)(buf))[0];
@ -101,16 +101,16 @@ int
main(int argc, char **argv)
{
int sock, socket_unix_len;
struct stat st;
struct stat st;
struct sockaddr_un socket_unix;
struct linger lin;
char buf[PATH_MAX];
struct sigaction action;
if (!getenv("DISPLAY"))
{
EINA_ERROR_PERR("elementary_quicklaunch: DISPLAY env var not set\n");
exit(-1);
EINA_ERROR_PERR("elementary_quicklaunch: DISPLAY env var not set\n");
exit(-1);
}
snprintf(buf, sizeof(buf), "/tmp/elm-ql-%i", getuid());
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);
if (sock < 0)
{
perror("elementary_quicklaunch: socket(AF_UNIX, SOCK_STREAM, 0)");
EINA_ERROR_PERR("elementary_quicklaunch: cannot create socket for socket for '%s'\n", buf);
exit(-1);
perror("elementary_quicklaunch: socket(AF_UNIX, SOCK_STREAM, 0)");
EINA_ERROR_PERR("elementary_quicklaunch: cannot create socket for socket for '%s'\n", buf);
exit(-1);
}
if (fcntl(sock, F_SETFD, FD_CLOEXEC) < 0)
{
perror("elementary_quicklaunch: fcntl(sock, F_SETFD, FD_CLOEXEC)");
EINA_ERROR_PERR("elementary_quicklaunch: cannot set close on exec socket for '%s'\n", buf);
exit(-1);
perror("elementary_quicklaunch: fcntl(sock, F_SETFD, FD_CLOEXEC)");
EINA_ERROR_PERR("elementary_quicklaunch: cannot set close on exec socket for '%s'\n", buf);
exit(-1);
}
lin.l_onoff = 1;
lin.l_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)) ");
EINA_ERROR_PERR("elementary_quicklaunch: cannot set linger for socket for '%s'\n", buf);
exit(-1);
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);
exit(-1);
}
socket_unix.sun_family = AF_UNIX;
strncpy(socket_unix.sun_path, buf, sizeof(socket_unix.sun_path));
socket_unix_len = LENGTH_OF_SOCKADDR_UN(&socket_unix);
if (bind(sock, (struct sockaddr *)&socket_unix, socket_unix_len) < 0)
{
perror("elementary_quicklaunch: bind(sock, (struct sockaddr *)&socket_unix, socket_unix_len)");
EINA_ERROR_PERR("elementary_quicklaunch: cannot bind socket for '%s'\n", buf);
exit(-1);
perror("elementary_quicklaunch: bind(sock, (struct sockaddr *)&socket_unix, socket_unix_len)");
EINA_ERROR_PERR("elementary_quicklaunch: cannot bind socket for '%s'\n", buf);
exit(-1);
}
if (listen(sock, 4096) < 0)
{
perror("elementary_quicklaunch: listen(sock, 4096)");
exit(-1);
perror("elementary_quicklaunch: listen(sock, 4096)");
exit(-1);
}
elm_quicklaunch_init(argc, argv);
restart_time = ecore_time_get();
@ -160,43 +160,43 @@ main(int argc, char **argv)
action.sa_flags = SA_RESTART | SA_SIGINFO;
sigemptyset(&action.sa_mask);
sigaction(SIGINT, &action, &old_sigint);
action.sa_handler = SIG_DFL;
action.sa_sigaction = NULL;
action.sa_flags = SA_RESTART | SA_SIGINFO;
sigemptyset(&action.sa_mask);
sigaction(SIGTERM, &action, &old_sigterm);
action.sa_handler = SIG_DFL;
action.sa_sigaction = NULL;
action.sa_flags = SA_RESTART | SA_SIGINFO;
sigemptyset(&action.sa_mask);
sigaction(SIGQUIT, &action, &old_sigquit);
action.sa_handler = SIG_DFL;
action.sa_sigaction = NULL;
action.sa_flags = SA_RESTART | SA_SIGINFO;
sigemptyset(&action.sa_mask);
sigaction(SIGALRM, &action, &old_sigalrm);
action.sa_handler = SIG_DFL;
action.sa_sigaction = NULL;
action.sa_flags = SA_RESTART | SA_SIGINFO;
sigemptyset(&action.sa_mask);
sigaction(SIGUSR1, &action, &old_sigusr1);
action.sa_handler = SIG_DFL;
action.sa_sigaction = NULL;
action.sa_flags = SA_RESTART | SA_SIGINFO;
sigemptyset(&action.sa_mask);
sigaction(SIGUSR2, &action, &old_sigusr2);
action.sa_handler = SIG_DFL;
action.sa_sigaction = NULL;
action.sa_flags = SA_RESTART | SA_SIGINFO;
sigemptyset(&action.sa_mask);
sigaction(SIGHUP, &action, &old_sighup);
action.sa_handler = NULL;
action.sa_sigaction = child_handler;
action.sa_flags = SA_RESTART | SA_SIGINFO;
@ -208,55 +208,55 @@ main(int argc, char **argv)
action.sa_flags = SA_NODEFER | SA_RESETHAND | SA_SIGINFO;
sigemptyset(&action.sa_mask);
sigaction(SIGSEGV, &action, &old_sigsegv);
action.sa_handler = NULL;
action.sa_sigaction = crash_handler;
action.sa_flags = SA_NODEFER | SA_RESETHAND | SA_SIGINFO;
sigemptyset(&action.sa_mask);
sigaction(SIGILL, &action, &old_sigill);
action.sa_handler = NULL;
action.sa_sigaction = crash_handler;
action.sa_flags = SA_NODEFER | SA_RESETHAND | SA_SIGINFO;
sigemptyset(&action.sa_mask);
sigaction(SIGFPE, &action, &old_sigfpe);
action.sa_handler = NULL;
action.sa_sigaction = crash_handler;
action.sa_flags = SA_NODEFER | SA_RESETHAND | SA_SIGINFO;
sigemptyset(&action.sa_mask);
sigaction(SIGBUS, &action, &old_sigbus);
action.sa_handler = NULL;
action.sa_sigaction = crash_handler;
action.sa_flags = SA_NODEFER | SA_RESETHAND | SA_SIGINFO;
sigemptyset(&action.sa_mask);
sigaction(SIGABRT, &action, &old_sigabrt);
for (;;)
{
int fd;
struct sockaddr_un client;
socklen_t len;
int fd;
struct sockaddr_un client;
socklen_t len;
elm_quicklaunch_sub_init(argc, argv);
elm_quicklaunch_seed();
len = sizeof(struct sockaddr_un);
fd = accept(sock, (struct sockaddr *)&client, &len);
if (fd >= 0)
{
int bytes;
char line[4096];
int num;
num = read(fd, &bytes, sizeof(unsigned long));
if (num == sizeof(unsigned long))
{
ecore_app_args_set(argc, (const char **)argv);
handle_run(fd, bytes);
}
}
elm_quicklaunch_sub_shutdown();
elm_quicklaunch_sub_init(argc, argv);
elm_quicklaunch_seed();
len = sizeof(struct sockaddr_un);
fd = accept(sock, (struct sockaddr *)&client, &len);
if (fd >= 0)
{
int bytes;
char line[4096];
int num;
num = read(fd, &bytes, sizeof(unsigned long));
if (num == sizeof(unsigned long))
{
ecore_app_args_set(argc, (const char **)argv);
handle_run(fd, bytes);
}
}
elm_quicklaunch_sub_shutdown();
}
elm_quicklaunch_shutdown();
return 0;

View File

@ -27,119 +27,119 @@ main(int argc, char **argv)
int we_are_elementary_run = 0;
char *disp;
char *cwd;
int sargc, slen;
unsigned char *sbuf = NULL, *pos;
char **sargv = NULL;
if (!getcwd(buf, sizeof(buf) - 1))
{
fprintf(stderr, "elementary_quicklaunch: currect working dir too big.\n");
exit(-1);
fprintf(stderr, "elementary_quicklaunch: currect working dir too big.\n");
exit(-1);
}
cwd = strdup(buf);
if (!(disp = getenv("DISPLAY")))
{
fprintf(stderr, "elementary_quicklaunch: DISPLAY env var not set\n");
exit(-1);
fprintf(stderr, "elementary_quicklaunch: DISPLAY env var not set\n");
exit(-1);
}
snprintf(buf, sizeof(buf), "/tmp/elm-ql-%i/%s", getuid(), disp);
if ((sock = socket(AF_UNIX, SOCK_STREAM, 0)) < 0)
{
perror("elementary_quicklaunch: socket(AF_UNIX, SOCK_STREAM, 0)");
exit(-1);
perror("elementary_quicklaunch: socket(AF_UNIX, SOCK_STREAM, 0)");
exit(-1);
}
socket_unix.sun_family = AF_UNIX;
strncpy(socket_unix.sun_path, buf, sizeof(socket_unix.sun_path));
socket_unix_len = LENGTH_OF_SOCKADDR_UN(&socket_unix);
if (connect(sock, (struct sockaddr *)&socket_unix, socket_unix_len) < 0)
{
perror("elementary_quicklaunch: connect(sock, (struct sockaddr *)&socket_unix, socket_unix_len)");
printf("elementary_quicklaunch: cannot connect to socket '%s'\n", buf);
exit(1);
perror("elementary_quicklaunch: connect(sock, (struct sockaddr *)&socket_unix, socket_unix_len)");
printf("elementary_quicklaunch: cannot connect to socket '%s'\n", buf);
exit(1);
}
exe = argv[0];
if (!(((exe[0] == '/')) ||
((exe[0] == '.') && (exe[1] == '/')) ||
((exe[0] == '.') && (exe[1] == '.') && (exe[2] == '/'))))
((exe[0] == '.') && (exe[1] == '/')) ||
((exe[0] == '.') && (exe[1] == '.') && (exe[2] == '/'))))
{
char *path = getenv("PATH");
int exelen = strlen(argv[0]);
if (path)
{
const char *p, *pp, *s;
int exelen;
p = path;
pp = p;
exe = NULL;
for (;;)
{
if ((*p == ':') || (*p == 0))
{
int len;
len = p - pp;
if (len < (sizeof(buf) - exelen - 3))
{
strncpy(buf, pp, len);
strcpy(buf + len, "/");
strcpy(buf + len + 1, argv[0]);
if (access(buf, R_OK | X_OK) == 0)
{
exe = buf;
break;
}
if (*p == 0) break;
p++;
pp = p;
}
}
else
{
if (*p == 0) break;
p++;
}
}
}
char *path = getenv("PATH");
int exelen = strlen(argv[0]);
if (path)
{
const char *p, *pp, *s;
int exelen;
p = path;
pp = p;
exe = NULL;
for (;;)
{
if ((*p == ':') || (*p == 0))
{
int len;
len = p - pp;
if (len < (sizeof(buf) - exelen - 3))
{
strncpy(buf, pp, len);
strcpy(buf + len, "/");
strcpy(buf + len + 1, argv[0]);
if (access(buf, R_OK | X_OK) == 0)
{
exe = buf;
break;
}
if (*p == 0) break;
p++;
pp = p;
}
}
else
{
if (*p == 0) break;
p++;
}
}
}
}
if (exe)
{
if (lstat(exe, &st) == 0)
{
if (S_ISLNK(st.st_mode))
{
char buf2[PATH_MAX];
ssize_t len = readlink(exe, buf2, sizeof(buf2) - 1);
if (len >= 0)
{
char *p;
buf2[len] = 0;
p = strrchr(buf2, '/');
if (p) p++;
else p = buf2;
if (!strncasecmp(p, "elementary_run", 14))
we_are_elementary_run = 1;
}
}
}
if (lstat(exe, &st) == 0)
{
if (S_ISLNK(st.st_mode))
{
char buf2[PATH_MAX];
ssize_t len = readlink(exe, buf2, sizeof(buf2) - 1);
if (len >= 0)
{
char *p;
buf2[len] = 0;
p = strrchr(buf2, '/');
if (p) p++;
else p = buf2;
if (!strncasecmp(p, "elementary_run", 14))
we_are_elementary_run = 1;
}
}
}
}
if (we_are_elementary_run)
{
sargc = argc;
sargv = argv;
sargc = argc;
sargv = argv;
}
else
{
sargc = argc - 1;
sargv = &(argv[1]);
sargc = argc - 1;
sargv = &(argv[1]);
}
slen = sizeof(unsigned long) + sizeof(unsigned long);
for (i = 0; i < sargc; i++)
{
slen += sizeof(unsigned long);
slen += strlen(sargv[i]) + 1;
slen += sizeof(unsigned long);
slen += strlen(sargv[i]) + 1;
}
slen += strlen(cwd) + 1;
sbuf = alloca(slen);
@ -148,10 +148,10 @@ main(int argc, char **argv)
pos = (unsigned char *)(&((((unsigned long *)(sbuf))[2 + sargc])));
for (i = 0; i < sargc; i++)
{
((unsigned long *)(sbuf))[2 + i] =
(unsigned long)pos - ((unsigned long)sbuf + sizeof(unsigned long));
strcpy(pos, sargv[i]);
pos += strlen(sargv[i]) + 1;
((unsigned long *)(sbuf))[2 + i] =
(unsigned long)pos - ((unsigned long)sbuf + sizeof(unsigned long));
strcpy(pos, sargv[i]);
pos += strlen(sargv[i]) + 1;
}
strcpy(pos, cwd);
write(sock, sbuf, slen);

File diff suppressed because it is too large Load Diff

View File

@ -58,7 +58,7 @@
# endif
#endif
/* EFL headers */
#include <Eina.h>
#include <Eet.h>
@ -109,8 +109,8 @@ extern "C" {
/* handy macros */
#define ELM_RECTS_INTERSECT(x, y, w, h, xx, yy, ww, hh) (((x) < ((xx) + (ww))) && ((y) < ((yy) + (hh))) && (((x) + (w)) > (xx)) && (((y) + (h)) > (yy)))
/**************************************************************************/
/**************************************************************************/
/* Objects */
typedef enum _Elm_Win_Type
{
@ -127,30 +127,30 @@ extern "C" {
typedef enum _Elm_Win_Keyboard_Mode
{
ELM_WIN_KEYBOARD_UNKNOWN,
ELM_WIN_KEYBOARD_OFF,
ELM_WIN_KEYBOARD_ON,
ELM_WIN_KEYBOARD_ALPHA,
ELM_WIN_KEYBOARD_NUMERIC,
ELM_WIN_KEYBOARD_PIN,
ELM_WIN_KEYBOARD_PHONE_NUMBER,
ELM_WIN_KEYBOARD_HEX,
ELM_WIN_KEYBOARD_TERMINAL,
ELM_WIN_KEYBOARD_PASSWORD
ELM_WIN_KEYBOARD_OFF,
ELM_WIN_KEYBOARD_ON,
ELM_WIN_KEYBOARD_ALPHA,
ELM_WIN_KEYBOARD_NUMERIC,
ELM_WIN_KEYBOARD_PIN,
ELM_WIN_KEYBOARD_PHONE_NUMBER,
ELM_WIN_KEYBOARD_HEX,
ELM_WIN_KEYBOARD_TERMINAL,
ELM_WIN_KEYBOARD_PASSWORD
} Elm_Win_Keyboard_Mode;
#ifndef ELM_LIB_QUICKLAUNCH
#ifndef ELM_LIB_QUICKLAUNCH
#define ELM_MAIN() int main(int argc, char **argv) {elm_init(argc, argv); return elm_main(argc, argv);}
#else
#define ELM_MAIN() int main(int argc, char **argv) {return elm_quicklaunch_fallback(argc, argv);}
#endif
/**************************************************************************/
/**************************************************************************/
/* General calls */
EAPI void elm_init(int argc, char **argv);
EAPI void elm_shutdown(void);
EAPI void elm_run(void);
EAPI void elm_exit(void);
EAPI void elm_quicklaunch_init(int argc, char **argv);
EAPI void elm_quicklaunch_sub_init(int argc, char **argv);
EAPI void elm_quicklaunch_sub_shutdown(void);
@ -161,7 +161,7 @@ extern "C" {
EAPI void elm_quicklaunch_cleanup(void);
EAPI int elm_quicklaunch_fallback(int argc, char **argv);
EAPI char *elm_quicklaunch_exe_path_get(const char *exe);
EAPI void elm_object_scale_set(Evas_Object *obj, double scale);
EAPI double elm_object_scale_get(const Evas_Object *obj);
EAPI void elm_object_style_set(Evas_Object *obj, const char *style);
@ -171,14 +171,14 @@ extern "C" {
EAPI void elm_scale_set(double scale);
EAPI Evas_Coord elm_finger_size_get(void);
EAPI void elm_finger_size_set(Evas_Coord size);
EAPI void elm_object_focus(Evas_Object *obj);
EAPI void elm_coords_finger_size_adjust(int times_w, Evas_Coord *w, int times_h, Evas_Coord *h);
EAPI void elm_theme_overlay_add(const char *item);
EAPI void elm_theme_extension_add(const char *item);
EAPI Evas_Object *elm_win_add(Evas_Object *parent, const char *name, Elm_Win_Type type);
EAPI void elm_win_resize_object_add(Evas_Object *obj, Evas_Object *subobj);
EAPI void elm_win_resize_object_del(Evas_Object *obj, Evas_Object *subobj);
@ -206,7 +206,7 @@ extern "C" {
* ecore_x_icccm_window_role_set -> role (add to ecore_evas)
* ecore_x_icccm_transient_for_set -> forwin (add to ecore_evas)
* ecore_x_netwm_window_type_set -> type (add to ecore_evas)
*
*
* (add to ecore_x) set netwm argb icon! (add to ecore_evas)
* (blank mouse, private mouse obj, defaultmouse)
*
@ -218,14 +218,14 @@ extern "C" {
EAPI void elm_win_inwin_activate(Evas_Object *obj);
EAPI void elm_win_inwin_style_set(Evas_Object *obj, const char *style);
EAPI void elm_win_inwin_content_set(Evas_Object *obj, Evas_Object *content);
/* available styles:
/* available styles:
* default
* minimal
* minimal_vertical
*/
/* X specific calls - won't work on non-x engines (return 0) */
EAPI Ecore_X_Window elm_win_xwindow_get(const Evas_Object *obj);
EAPI Ecore_X_Window elm_win_xwindow_get(const Evas_Object *obj);
/* smart callbacks called:
* "delete-request" - the user requested to delete the window
* "focus-in" - window got focus
@ -282,14 +282,14 @@ extern "C" {
EAPI void elm_box_pack_after(Evas_Object *obj, Evas_Object *subobj, Evas_Object *after);
/* smart callbacks called:
*/
EAPI Evas_Object *elm_button_add(Evas_Object *parent);
EAPI void elm_button_label_set(Evas_Object *obj, const char *label);
EAPI void elm_button_icon_set(Evas_Object *obj, Evas_Object *icon);
EAPI void elm_button_style_set(Evas_Object *obj, const char *style);
/* available styles:
* default
* hoversel_vertical
/* available styles:
* default
* hoversel_vertical
* hoversel_vertical_entry
*/
/* smart callbacks called:
@ -298,12 +298,12 @@ extern "C" {
typedef enum _Elm_Scroller_Policy
{
ELM_SCROLLER_POLICY_AUTO,
ELM_SCROLLER_POLICY_ON,
ELM_SCROLLER_POLICY_OFF
ELM_SCROLLER_POLICY_AUTO,
ELM_SCROLLER_POLICY_ON,
ELM_SCROLLER_POLICY_OFF
}
Elm_Scroller_Policy;
EAPI Evas_Object *elm_scroller_add(Evas_Object *parent);
EAPI void elm_scroller_content_set(Evas_Object *obj, Evas_Object *child);
EAPI void elm_scroller_content_min_limit(Evas_Object *obj, Eina_Bool w, Eina_Bool h);
@ -324,7 +324,7 @@ extern "C" {
EAPI void elm_label_label_set(Evas_Object *obj, const char *label);
/* smart callbacks called:
*/
EAPI Evas_Object *elm_toggle_add(Evas_Object *parent);
EAPI void elm_toggle_label_set(Evas_Object *obj, const char *label);
EAPI void elm_toggle_icon_set(Evas_Object *obj, Evas_Object *icon);
@ -335,7 +335,7 @@ extern "C" {
/* smart callbacks called:
* "changed" - the user toggled the state
*/
EAPI Evas_Object *elm_frame_add(Evas_Object *parent);
EAPI void elm_frame_label_set(Evas_Object *obj, const char *label);
EAPI void elm_frame_content_set(Evas_Object *obj, Evas_Object *content);
@ -351,13 +351,13 @@ extern "C" {
*/
/* smart callbacks called:
*/
EAPI Evas_Object *elm_table_add(Evas_Object *parent);
EAPI void elm_table_homogenous_set(Evas_Object *obj, Eina_Bool homogenous);
EAPI void elm_table_pack(Evas_Object *obj, Evas_Object *subobj, int x, int y, int w, int h);
/* smart callbacks called:
*/
EAPI Evas_Object *elm_clock_add(Evas_Object *parent);
EAPI void elm_clock_time_set(Evas_Object *obj, int hrs, int min, int sec);
EAPI void elm_clock_time_get(const Evas_Object *obj, int *hrs, int *min, int *sec);
@ -374,13 +374,13 @@ extern "C" {
EAPI Evas_Object *elm_layout_edje_get(const Evas_Object *obj);
/* smart callbacks called:
*/
typedef enum _Elm_Hover_Axis
{
ELM_HOVER_AXIS_NONE,
ELM_HOVER_AXIS_HORIZONTAL,
ELM_HOVER_AXIS_VERTICAL,
ELM_HOVER_AXIS_BOTH
ELM_HOVER_AXIS_HORIZONTAL,
ELM_HOVER_AXIS_VERTICAL,
ELM_HOVER_AXIS_BOTH
} Elm_Hover_Axis;
EAPI Evas_Object *elm_hover_add(Evas_Object *parent);
EAPI void elm_hover_target_set(Evas_Object *obj, Evas_Object *target);
@ -388,7 +388,7 @@ extern "C" {
EAPI void elm_hover_content_set(Evas_Object *obj, const char *swallow, Evas_Object *content);
EAPI void elm_hover_style_set(Evas_Object *obj, const char *style);
EAPI const char *elm_hover_best_content_location_get(const Evas_Object *obj, Elm_Hover_Axis pref_axis);
/* available styles:
/* available styles:
* default
* popout
* hoversel_vertical
@ -417,7 +417,7 @@ extern "C" {
EAPI void elm_entry_select_all(Evas_Object *obj);
EAPI char *elm_entry_markup_to_utf8(const char *s);
EAPI char *elm_entry_utf8_to_markup(const char *s);
/* smart callbacks called:
* "changed" - the text content changed
* "selection,start" - the user started selecting text
@ -430,7 +430,7 @@ extern "C" {
* "anchor,clicked" - achor called was clicked | event_info = Elm_Entry_Anchor_Info
* "activated" - when the enter key is pressed (useful for single line)
*/
/* composite widgets - these basically put together basic widgets above
* in convenient packages that do more than basic stuff */
@ -466,7 +466,7 @@ extern "C" {
/* smart callbacks called:
* "anchor,clicked" - achor called was clicked | event_info = Elm_Entry_Anchorview_Info
*/
typedef struct _Elm_Entry_Anchorblock_Info Elm_Entry_Anchorblock_Info;
struct _Elm_Entry_Anchorblock_Info
{
@ -489,7 +489,7 @@ extern "C" {
/* smart callbacks called:
* "anchor,clicked" - achor called was clicked | event_info = Elm_Entry_Anchorblock_Info
*/
EAPI Evas_Object *elm_bubble_add(Evas_Object *parent);
EAPI void elm_bubble_label_set(Evas_Object *obj, const char *label);
EAPI void elm_bubble_info_set(Evas_Object *obj, const char *info);
@ -508,9 +508,9 @@ extern "C" {
typedef enum _Elm_Icon_Type
{
ELM_ICON_NONE,
ELM_ICON_FILE,
ELM_ICON_STANDARD
ELM_ICON_NONE,
ELM_ICON_FILE,
ELM_ICON_STANDARD
} Elm_Icon_Type;
typedef struct _Elm_Hoversel_Item Elm_Hoversel_Item;
EAPI Evas_Object *elm_hoversel_add(Evas_Object *parent);
@ -527,7 +527,7 @@ extern "C" {
* "selected" - an item in the hoversel list is selected
* "dismissed" - the hover is dismissed
*/
typedef struct _Elm_Toolbar_Item Elm_Toolbar_Item;
EAPI Evas_Object *elm_toolbar_add(Evas_Object *parent);
EAPI Elm_Toolbar_Item *elm_toolbar_item_add(Evas_Object *obj, Evas_Object *icon, const char *label, void (*func) (void *data, Evas_Object *obj, void *event_info), const void *data);
@ -540,9 +540,9 @@ extern "C" {
typedef enum _Elm_List_Mode
{
ELM_LIST_COMPRESS,
ELM_LIST_SCROLL,
ELM_LIST_LIMIT
ELM_LIST_COMPRESS,
ELM_LIST_SCROLL,
ELM_LIST_LIMIT
} Elm_List_Mode;
typedef struct _Elm_List_Item Elm_List_Item;
EAPI Evas_Object *elm_list_add(Evas_Object *parent);
@ -585,7 +585,7 @@ extern "C" {
/* smart callbacks called:
* "clicked" - when the user clicks on a carousel item and becomes selected
*/
EAPI Evas_Object *elm_slider_add(Evas_Object *parent);
EAPI void elm_slider_label_set(Evas_Object *obj, const char *label);
EAPI void elm_slider_icon_set(Evas_Object *obj, Evas_Object *icon);
@ -601,11 +601,11 @@ extern "C" {
* "changed" - when the slider value changes
* "delay,changed" - when the slider value changed, but a small time after a change (use this if you only want to respond to a change once the slider is held still for a short while).
*/
typedef enum _Elm_Genlist_Item_Flags
{
ELM_GENLIST_ITEM_NONE = 0,
ELM_GENLIST_ITEM_SUBITEMS = (1 << 0)
ELM_GENLIST_ITEM_NONE = 0,
ELM_GENLIST_ITEM_SUBITEMS = (1 << 0)
} Elm_Genlist_Item_Flags;
typedef struct _Elm_Genlist_Item_Class Elm_Genlist_Item_Class;
typedef struct _Elm_Genlist_Item Elm_Genlist_Item;
@ -614,16 +614,16 @@ extern "C" {
typedef Evas_Object *(*GenlistItemIconGetFunc) (const void *data, Evas_Object *obj, const char *part);
typedef Eina_Bool (*GenlistItemStateGetFunc) (const void *data, Evas_Object *obj, const char *part);
typedef void (*GenlistItemDelFunc) (const void *data, Evas_Object *obj);
struct _Elm_Genlist_Item_Class
{
const char *item_style;
struct _Elm_Genlist_Item_Class_Func {
GenlistItemLabelGetFunc label_get;
GenlistItemIconGetFunc icon_get;
GenlistItemStateGetFunc state_get;
GenlistItemDelFunc del;
} func;
const char *item_style;
struct _Elm_Genlist_Item_Class_Func {
GenlistItemLabelGetFunc label_get;
GenlistItemIconGetFunc icon_get;
GenlistItemStateGetFunc state_get;
GenlistItemDelFunc del;
} func;
};
EAPI Evas_Object *elm_genlist_add(Evas_Object *parent);
@ -655,7 +655,7 @@ extern "C" {
EAPI void elm_genlist_horizontal_mode_set(Evas_Object *obj, Elm_List_Mode mode);
EAPI void elm_genlist_always_select_mode_set(Evas_Object *obj, Eina_Bool always_select);
EAPI void elm_genlist_no_select_mode_set(Evas_Object *obj, Eina_Bool no_select);
/* available item styles:
/* available item styles:
* default
* double_label
*/
@ -668,7 +668,7 @@ extern "C" {
* "expand,request" - when the user requested to expand an item
* "contract,request" - when the user requested to expand an item
*/
EAPI Evas_Object *elm_check_add(Evas_Object *parent);
EAPI void elm_check_label_set(Evas_Object *obj, const char *label);
EAPI void elm_check_icon_set(Evas_Object *obj, Evas_Object *icon);
@ -678,7 +678,7 @@ extern "C" {
/* smart callbacks called:
* "changed" - the user toggled the state
*/
EAPI Evas_Object *elm_radio_add(Evas_Object *parent);
EAPI void elm_radio_label_set(Evas_Object *obj, const char *label);
EAPI void elm_radio_icon_set(Evas_Object *obj, Evas_Object *icon);
@ -690,7 +690,7 @@ extern "C" {
/* smart callbacks called:
* "changed" - the user toggled the state
*/
EAPI Evas_Object *elm_pager_add(Evas_Object *parent);
EAPI void elm_pager_content_push(Evas_Object *obj, Evas_Object *content);
EAPI void elm_pager_content_pop(Evas_Object *obj);
@ -699,7 +699,7 @@ extern "C" {
EAPI Evas_Object *elm_pager_content_top_get(Evas_Object *obj);
/* smart callbacks called:
*/
#ifdef __cplusplus
}
#endif
@ -707,20 +707,20 @@ extern "C" {
////////////////////////////////////////////////////////////////////////////
/// FIXME: TODO LIST ///////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////
//
//
//// (bugs - high priority)
// * scale change for hover doesnt seem to do new size alloc nicely
// * left/right arrow broken with password mode for entry + utf8 chars...
// * bubble doesnt handle child size changes right
// * table doesnt do homogenous properly
//
//
//// (incomplete - medium priority)
// * disabled not supported
// * on the fly theme changes - test (should work)
// * need a hold-scroll counter in elm_widget
// * hoversel only vertical right now - make horizontal
// * when entries are in a scroller and change size, the scroller shows scrollbars. fix. same for selecting. for 1 line entries in a scroller should only have scroll arrow indicators.
//
//
//// (more widgets/features - medium priority)
// * multiple genlist item styles (multi-label, 1 icon + 2 line label, header etc.)
// * carousel selector widget
@ -746,7 +746,7 @@ extern "C" {
// * status widget (busy, stalled, running, etc.)
// * full window in window widget (so move/resize of window object does as you'd expect a child window to do within the canvas)
// * window frame widget for borderless windows that want the app to do its own frame (move, resize as well etc.)
//
//
//// (improvements - low priority)
// * test for all bubble styles
// * test for all frame styles
@ -784,6 +784,6 @@ extern "C" {
// * win should emit signals based on vkbd type - if it gets a message and is a vkbd win
// * win needs a way of setting aspect too
// * use the wrong call on the wrong widget and *BOOM* ... crashland
//
//
//////////////////////////////////////////////////////////////////////////////
#endif

View File

@ -3,15 +3,15 @@
/**
* @defgroup Anchorblock Anchorblock
*
*
* Anchorblock is for displaying tet that contains markup with anchors like:
* \<a href=1234\>something\</\> in it. These will be drawn differently and will
* be able to be clicked on by the user to display a popup. This popup then
* is intended to contain extra options such as "call", "add to contacts",
* "open web page" etc.
*
*
* Signals that you can add callbacks for are:
*
*
* anchor,clicked - achor called was clicked. event_info is anchor info -
* Elm_Entry_Anchorview_Info
*/
@ -87,11 +87,11 @@ _anchor_clicked(void *data, Evas_Object *obj, void *event_info)
Evas_Object *hover_parent;
Elm_Entry_Anchorblock_Info ei;
Evas_Coord x, w, y, h, px, py;
wd->pop = elm_icon_add(obj);
evas_object_move(wd->pop, info->x, info->y);
evas_object_resize(wd->pop, info->w, info->h);
wd->hover = elm_hover_add(obj);
if (wd->hover_style) elm_hover_style_set(wd->hover, wd->hover_style);
hover_parent = wd->hover_parent;
@ -114,13 +114,13 @@ _anchor_clicked(void *data, Evas_Object *obj, void *event_info)
px = info->x + (info->w / 2);
py = info->y + (info->h / 2);
ei.hover_left = 1;
if (px < (x + (w / 3))) ei.hover_left = 0;
if (px < (x + (w / 3))) ei.hover_left = 0;
ei.hover_right = 1;
if (px > (x + ((w * 2) / 3))) ei.hover_right = 0;
if (px > (x + ((w * 2) / 3))) ei.hover_right = 0;
ei.hover_top = 1;
if (py < (y + (h / 3))) ei.hover_top = 0;
if (py < (y + (h / 3))) ei.hover_top = 0;
ei.hover_bottom = 1;
if (py > (y + ((h * 2) / 3))) ei.hover_bottom = 0;
if (py > (y + ((h * 2) / 3))) ei.hover_bottom = 0;
evas_object_smart_callback_call(data, "anchor,clicked", &ei);
evas_object_smart_callback_add(wd->hover, "clicked", _hover_clicked, data);
evas_object_show(wd->hover);
@ -135,10 +135,10 @@ _parent_del(void *data, Evas *e, Evas_Object *obj, void *event_info)
/**
* Add a new Anchorblock object
*
*
* @param parent The parent object
* @return The new object or NULL if it cannot be created
*
*
* @ingroup Anchorblock
*/
EAPI Evas_Object *
@ -147,7 +147,7 @@ elm_anchorblock_add(Evas_Object *parent)
Evas_Object *obj;
Evas *e;
Widget_Data *wd;
wd = ELM_NEW(Widget_Data);
e = evas_object_evas_get(parent);
obj = elm_widget_add(e);
@ -156,35 +156,35 @@ elm_anchorblock_add(Evas_Object *parent)
elm_widget_data_set(obj, wd);
elm_widget_del_pre_hook_set(obj, _del_pre_hook);
elm_widget_del_hook_set(obj, _del_hook);
wd->entry = elm_entry_add(parent);
elm_widget_resize_object_set(obj, wd->entry);
elm_entry_editable_set(wd->entry, 0);
evas_object_size_hint_weight_set(wd->entry, 1.0, 1.0);
evas_object_size_hint_align_set(wd->entry, -1.0, -1.0);
evas_object_event_callback_add(wd->entry, EVAS_CALLBACK_CHANGED_SIZE_HINTS,
_changed_size_hints, obj);
elm_entry_entry_set(wd->entry, "");
evas_object_smart_callback_add(wd->entry, "anchor,clicked", _anchor_clicked, obj);
_sizing_eval(obj);
return obj;
}
/**
* Set the text markup of the anchorblock
*
*
* This sets the text of the anchorblock to be the text given as @p text. This
* text is in markup format with \<a href=XXX\> beginning an achor with the
* string link of 'XXX', and \</\> or \</a\> ending the link. Other markup can
* be used dependign on the style support.
*
*
* @param obj The anchorblock object
* @param text The text to set, or NULL to clear
*
*
* @ingroup Anchorblock
*/
EAPI void
@ -201,13 +201,13 @@ elm_anchorblock_text_set(Evas_Object *obj, const char *text)
/**
* Set the parent of the hover popup
*
*
* This sets the parent of the hover that anchorblock will create. See hover
* objects for more information on this.
*
*
* @param obj The anchorblock object
* @param parent The parent the hover should use
*
*
* @ingroup Anchorblock
*/
EAPI void
@ -223,13 +223,13 @@ elm_anchorblock_hover_parent_set(Evas_Object *obj, Evas_Object *parent)
/**
* Set the style that the hover should use
*
*
* This sets the style for the hover that anchorblock will create. See hover
* objects for more information
*
*
* @param obj The anchorblock object
* @param style The style to use
*
*
* @ingroup Anchorblock
*/
EAPI void
@ -239,15 +239,15 @@ elm_anchorblock_hover_style_set(Evas_Object *obj, const char *style)
if (wd->hover_style) eina_stringshare_del(wd->hover_style);
wd->hover_style = NULL;
if (style) wd->hover_style = eina_stringshare_add(style);
}
}
/**
* Stop the hover popup in the anchorblock
*
*
* This will stop the hover popup in the anchorblock if it is currently active.
*
*
* @param obj The anchorblock object
*
*
* @ingroup Anchorblock
*/
EAPI void

View File

@ -3,12 +3,12 @@
/**
* @defgroup Anchorview Anchorview
*
*
* This is just like the Anchorblock object, but provides a scroller to hold
* the text automatically.
*
*
* Signals that you can add callbacks for are:
*
*
* anchor,clicked - achor called was clicked. event_info is anchor info -
* Elm_Entry_Anchorview_Info
*/
@ -73,11 +73,11 @@ _anchor_clicked(void *data, Evas_Object *obj, void *event_info)
Evas_Object *hover_parent;
Elm_Entry_Anchorview_Info ei;
Evas_Coord x, w, y, h, px, py;
wd->pop = elm_icon_add(obj);
evas_object_move(wd->pop, info->x, info->y);
evas_object_resize(wd->pop, info->w, info->h);
wd->hover = elm_hover_add(obj);
if (wd->hover_style) elm_hover_style_set(wd->hover, wd->hover_style);
hover_parent = wd->hover_parent;
@ -100,13 +100,13 @@ _anchor_clicked(void *data, Evas_Object *obj, void *event_info)
px = info->x + (info->w / 2);
py = info->y + (info->h / 2);
ei.hover_left = 1;
if (px < (x + (w / 3))) ei.hover_left = 0;
if (px < (x + (w / 3))) ei.hover_left = 0;
ei.hover_right = 1;
if (px > (x + ((w * 2) / 3))) ei.hover_right = 0;
if (px > (x + ((w * 2) / 3))) ei.hover_right = 0;
ei.hover_top = 1;
if (py < (y + (h / 3))) ei.hover_top = 0;
if (py < (y + (h / 3))) ei.hover_top = 0;
ei.hover_bottom = 1;
if (py > (y + ((h * 2) / 3))) ei.hover_bottom = 0;
if (py > (y + ((h * 2) / 3))) ei.hover_bottom = 0;
evas_object_smart_callback_call(data, "anchor,clicked", &ei);
evas_object_smart_callback_add(wd->hover, "clicked", _hover_clicked, data);
evas_object_show(wd->hover);
@ -133,7 +133,7 @@ elm_anchorview_add(Evas_Object *parent)
Evas_Object *obj;
Evas *e;
Widget_Data *wd;
wd = ELM_NEW(Widget_Data);
e = evas_object_evas_get(parent);
obj = elm_widget_add(e);
@ -142,7 +142,7 @@ elm_anchorview_add(Evas_Object *parent)
elm_widget_data_set(obj, wd);
elm_widget_del_pre_hook_set(obj, _del_pre_hook);
elm_widget_del_hook_set(obj, _del_hook);
wd->scroller = elm_scroller_add(parent);
elm_widget_resize_object_set(obj, wd->scroller);
wd->entry = elm_entry_add(parent);
@ -151,14 +151,14 @@ elm_anchorview_add(Evas_Object *parent)
evas_object_size_hint_align_set(wd->entry, -1.0, -1.0);
elm_scroller_content_set(wd->scroller, wd->entry);
evas_object_show(wd->entry);
evas_object_event_callback_add(wd->entry, EVAS_CALLBACK_CHANGED_SIZE_HINTS,
_changed_size_hints, obj);
elm_entry_entry_set(wd->entry, "");
evas_object_smart_callback_add(wd->entry, "anchor,clicked", _anchor_clicked, obj);
_sizing_eval(obj);
return obj;
}
@ -228,7 +228,7 @@ elm_anchorview_hover_style_set(Evas_Object *obj, const char *style)
if (wd->hover_style) eina_stringshare_del(wd->hover_style);
wd->hover_style = NULL;
if (style) wd->hover_style = eina_stringshare_add(style);
}
}
/**
* Stop the hover popup in the anchorview

View File

@ -3,20 +3,20 @@
/**
* @defgroup Hoversel
*
*
* A hoversel is a button that pops up a list of items (automatically
* choosing the direction to display) that have a lable and/or an icon to
* select from. It is a convenience widget to avoid the need to do all the
* piecing together yourself. It is intended for a small numbr of items in
* the hoversel menu (no more than 8), though is capable of many more.
*
*
* Signals that you can add callbacks for are:
*
*
* clicked - the user clicked the hoversel button and popped up the sel
*
*
* selected - an item in the hoversel list is selected. event_info is the item
* selected - Elm_Hoversel_Item
*
*
* dismissed - the hover is dismissed
*/
typedef struct _Widget_Data Widget_Data;
@ -60,9 +60,9 @@ _del_hook(Evas_Object *obj)
elm_hoversel_hover_end(obj);
EINA_LIST_FREE(wd->items, it)
{
eina_stringshare_del(it->label);
eina_stringshare_del(it->icon_file);
free(it);
eina_stringshare_del(it->label);
eina_stringshare_del(it->icon_file);
free(it);
}
free(wd);
}
@ -122,25 +122,25 @@ _activate(Evas_Object *obj)
EINA_LIST_FOREACH(wd->items, l, it)
{
bt = elm_button_add(wd->hover);
elm_button_style_set(bt, "hoversel_vertical_entry");
elm_button_label_set(bt, it->label);
if (it->icon_file)
{
ic = elm_icon_add(obj);
elm_icon_scale_set(ic, 0, 1);
if (it->icon_type == ELM_ICON_FILE)
elm_icon_file_set(ic, it->icon_file, NULL);
else if (it->icon_type == ELM_ICON_STANDARD)
elm_icon_standard_set(ic, it->icon_file);
elm_button_icon_set(bt, ic);
evas_object_show(ic);
}
evas_object_size_hint_weight_set(bt, 1.0, 0.0);
evas_object_size_hint_align_set(bt, -1.0, -1.0);
elm_box_pack_end(bx, bt);
evas_object_smart_callback_add(bt, "clicked", _item_clicked, it);
evas_object_show(bt);
bt = elm_button_add(wd->hover);
elm_button_style_set(bt, "hoversel_vertical_entry");
elm_button_label_set(bt, it->label);
if (it->icon_file)
{
ic = elm_icon_add(obj);
elm_icon_scale_set(ic, 0, 1);
if (it->icon_type == ELM_ICON_FILE)
elm_icon_file_set(ic, it->icon_file, NULL);
else if (it->icon_type == ELM_ICON_STANDARD)
elm_icon_standard_set(ic, it->icon_file);
elm_button_icon_set(bt, ic);
evas_object_show(ic);
}
evas_object_size_hint_weight_set(bt, 1.0, 0.0);
evas_object_size_hint_align_set(bt, -1.0, -1.0);
elm_box_pack_end(bx, bt);
evas_object_smart_callback_add(bt, "clicked", _item_clicked, it);
evas_object_show(bt);
}
elm_hover_content_set
@ -148,7 +148,7 @@ _activate(Evas_Object *obj)
elm_hover_best_content_location_get(wd->hover, ELM_HOVER_AXIS_VERTICAL),
bx);
evas_object_show(bx);