From 8e5adf71a6fc2fa06ae602f8f51f8294e243b099 Mon Sep 17 00:00:00 2001 From: Carsten Haitzler Date: Fri, 19 Oct 2001 09:13:18 +0000 Subject: [PATCH] much cleaner iconboar. ok - right now it doesn't scroll. use the buidl scritp again (pass in a directory path to set up.. i'd suggest mkdir ~/.e mkdir ~/.e/desktop mkdir ~/.e/desktop/default build_iconbar_db.sh ~/.e/desktop/default the scritp is a bit smaller now :) SVN revision: 5519 --- Makefile.am | 2 +- config.h.in | 280 ++++----- configure.in | 1 + data/iconbar/iconbar_bottom.bits.db | Bin 0 -> 94208 bytes data/scripts/build_iconbar_db.sh | 83 +-- src/config.c | 8 + src/config.h | 3 +- src/iconbar.c | 872 +++++++++++----------------- src/iconbar.h | 106 +--- src/view.c | 11 +- tools/.cvsignore | 5 + tools/Makefile.am | 12 + tools/e_img_import.c | 22 + 13 files changed, 544 insertions(+), 861 deletions(-) create mode 100644 data/iconbar/iconbar_bottom.bits.db create mode 100644 tools/.cvsignore create mode 100644 tools/Makefile.am create mode 100644 tools/e_img_import.c diff --git a/Makefile.am b/Makefile.am index f08166129..71abbe967 100644 --- a/Makefile.am +++ b/Makefile.am @@ -1,6 +1,6 @@ ## Process this file with automake to produce Makefile.in -SUBDIRS = intl po src lib client doc +SUBDIRS = intl po src lib client tools doc MAINTAINERCLEANFILES = Makefile.in aclocal.m4 config.guess \ config.h.in config.sub configure install-sh \ diff --git a/config.h.in b/config.h.in index de4217ab6..aa79be36e 100644 --- a/config.h.in +++ b/config.h.in @@ -1,4 +1,48 @@ -/* config.h.in. Generated automatically from configure.ac by autoheader. */ +/* config.h.in. Generated automatically from configure.in by autoheader. */ + +/* Define if using alloca.c. */ +#undef C_ALLOCA + +/* Define to empty if the keyword does not work. */ +#undef const + +/* Define to one of _getb67, GETB67, getb67 for Cray-2 and Cray-YMP systems. + This function is required for alloca.c support on those systems. */ +#undef CRAY_STACKSEG_END + +/* Define if you have alloca, as a function or macro. */ +#undef HAVE_ALLOCA + +/* Define if you have and it should be used (not on Ultrix). */ +#undef HAVE_ALLOCA_H + +/* Define if you have a working `mmap' system call. */ +#undef HAVE_MMAP + +/* Define as __inline if that's what the C compiler calls it. */ +#undef inline + +/* Define to `long' if doesn't define. */ +#undef off_t + +/* Define if you need to in order for stat and other things to work. */ +#undef _POSIX_SOURCE + +/* Define to `unsigned' if doesn't define. */ +#undef size_t + +/* If using the C implementation of alloca, define if you know the + direction of stack growth for your system; otherwise it will be + automatically deduced at run-time. + STACK_DIRECTION > 0 => grows toward higher addresses + STACK_DIRECTION < 0 => grows toward lower addresses + STACK_DIRECTION = 0 => direction of growth unknown + */ +#undef STACK_DIRECTION + +/* Define if you have the ANSI C header files. */ +#undef STDC_HEADERS + #undef ENLIGHTENMENT_VERSION #undef ENLIGHTENMENT_MAJOR #undef ENLIGHTENMENT_MINOR @@ -16,191 +60,81 @@ #undef PACKAGE_LIB_DIR #undef USE_FERITE -/* Define to one of `_getb67', `GETB67', `getb67' for Cray-2 and Cray-YMP - systems. This function is required for `alloca.c' support on those systems. - */ -#undef CRAY_STACKSEG_END - -/* Define if using `alloca.c'. */ -#undef C_ALLOCA - -/* Define to 1 if translation of program messages to the user's native - language is requested. */ -#undef ENABLE_NLS - -/* Define if you have `alloca', as a function or macro. */ -#undef HAVE_ALLOCA - -/* Define if you have and it should be used (not on Ultrix). */ -#undef HAVE_ALLOCA_H - -/* Define if you have the header file. */ -#undef HAVE_ARGZ_H - -/* Define if you have the `dcgettext' function. */ -#undef HAVE_DCGETTEXT - -/* Define if you have the header file. */ -#undef HAVE_DLFCN_H - -/* Define if you have the `feof_unlocked' function. */ -#undef HAVE_FEOF_UNLOCKED - -/* Define if you have the `fgets_unlocked' function. */ -#undef HAVE_FGETS_UNLOCKED - -/* Define if you have the `getcwd' function. */ -#undef HAVE_GETCWD - -/* Define if you have the `getegid' function. */ -#undef HAVE_GETEGID - -/* Define if you have the `geteuid' function. */ -#undef HAVE_GETEUID - -/* Define if you have the `getgid' function. */ -#undef HAVE_GETGID - -/* Define if you have the `getpagesize' function. */ -#undef HAVE_GETPAGESIZE - -/* Define if the GNU gettext() function is already present or preinstalled. */ -#undef HAVE_GETTEXT - -/* Define if you have the `getuid' function. */ -#undef HAVE_GETUID - -/* Define if you have the iconv() function. */ -#undef HAVE_ICONV - -/* Define if you have the header file. */ -#undef HAVE_INTTYPES_H - -/* Define if you have and nl_langinfo(CODESET). */ -#undef HAVE_LANGINFO_CODESET - -/* Define if your file defines LC_MESSAGES. */ -#undef HAVE_LC_MESSAGES - -/* Define if you have the header file. */ -#undef HAVE_LIMITS_H - -/* Define if you have the header file. */ -#undef HAVE_LOCALE_H - -/* Define if you have the header file. */ -#undef HAVE_MALLOC_H - -/* Define if you have the header file. */ -#undef HAVE_MEMORY_H - -/* Define if you have the `mempcpy' function. */ -#undef HAVE_MEMPCPY - -/* Define if you have a working `mmap' system call. */ -#undef HAVE_MMAP - -/* Define if you have the `munmap' function. */ -#undef HAVE_MUNMAP - -/* Define if you have the header file. */ -#undef HAVE_NL_TYPES_H - -/* Define if you have the `putenv' function. */ -#undef HAVE_PUTENV - -/* Define if you have the `setenv' function. */ -#undef HAVE_SETENV - -/* Define if you have the `setlocale' function. */ -#undef HAVE_SETLOCALE - -/* Define if you have the header file. */ -#undef HAVE_STDDEF_H - -/* Define if you have the header file. */ -#undef HAVE_STDINT_H - -/* Define if you have the header file. */ -#undef HAVE_STDLIB_H - -/* Define if you have the `stpcpy' function. */ -#undef HAVE_STPCPY - -/* Define if you have the `strcasecmp' function. */ -#undef HAVE_STRCASECMP - -/* Define if you have the `strchr' function. */ -#undef HAVE_STRCHR - -/* Define if you have the `strdup' function. */ -#undef HAVE_STRDUP - -/* Define if you have the header file. */ -#undef HAVE_STRINGS_H - -/* Define if you have the header file. */ -#undef HAVE_STRING_H - -/* Define if you have the `strtoul' function. */ -#undef HAVE_STRTOUL - -/* Define if you have the header file. */ -#undef HAVE_SYS_PARAM_H - -/* Define if you have the header file. */ -#undef HAVE_SYS_STAT_H - -/* Define if you have the header file. */ -#undef HAVE_SYS_TYPES_H - -/* Define if you have the `tsearch' function. */ -#undef HAVE_TSEARCH - -/* Define if you have the header file. */ -#undef HAVE_UNISTD_H - -/* Define if you have the `__argz_count' function. */ +/* Define if you have the __argz_count function. */ #undef HAVE___ARGZ_COUNT -/* Define if you have the `__argz_next' function. */ +/* Define if you have the __argz_next function. */ #undef HAVE___ARGZ_NEXT -/* Define if you have the `__argz_stringify' function. */ +/* Define if you have the __argz_stringify function. */ #undef HAVE___ARGZ_STRINGIFY -/* Define as const if the declaration of iconv() needs const. */ -#undef ICONV_CONST +/* Define if you have the dcgettext function. */ +#undef HAVE_DCGETTEXT + +/* Define if you have the getcwd function. */ +#undef HAVE_GETCWD + +/* Define if you have the getpagesize function. */ +#undef HAVE_GETPAGESIZE + +/* Define if you have the munmap function. */ +#undef HAVE_MUNMAP + +/* Define if you have the putenv function. */ +#undef HAVE_PUTENV + +/* Define if you have the setenv function. */ +#undef HAVE_SETENV + +/* Define if you have the setlocale function. */ +#undef HAVE_SETLOCALE + +/* Define if you have the stpcpy function. */ +#undef HAVE_STPCPY + +/* Define if you have the strcasecmp function. */ +#undef HAVE_STRCASECMP + +/* Define if you have the strchr function. */ +#undef HAVE_STRCHR + +/* Define if you have the strdup function. */ +#undef HAVE_STRDUP + +/* Define if you have the header file. */ +#undef HAVE_ARGZ_H + +/* Define if you have the header file. */ +#undef HAVE_LIMITS_H + +/* Define if you have the header file. */ +#undef HAVE_LOCALE_H + +/* Define if you have the header file. */ +#undef HAVE_MALLOC_H + +/* Define if you have the header file. */ +#undef HAVE_NL_TYPES_H + +/* Define if you have the header file. */ +#undef HAVE_STRING_H + +/* Define if you have the header file. */ +#undef HAVE_SYS_PARAM_H + +/* Define if you have the header file. */ +#undef HAVE_UNISTD_H + +/* Define if you have the i library (-li). */ +#undef HAVE_LIBI /* Name of package */ #undef PACKAGE -/* If using the C implementation of alloca, define if you know the - direction of stack growth for your system; otherwise it will be - automatically deduced at run-time. - STACK_DIRECTION > 0 => grows toward higher addresses - STACK_DIRECTION < 0 => grows toward lower addresses - STACK_DIRECTION = 0 => direction of growth unknown */ -#undef STACK_DIRECTION - -/* Define if you have the ANSI C header files. */ -#undef STDC_HEADERS - /* Version number of package */ #undef VERSION /* Define if using the dmalloc debugging malloc package */ #undef WITH_DMALLOC -/* Define to empty if `const' does not conform to ANSI C. */ -#undef const - -/* Define as `__inline' if that's what the C compiler calls it, or to nothing - if it is not supported. */ -#undef inline - -/* Define to `long' if does not define. */ -#undef off_t - -/* Define to `unsigned' if does not define. */ -#undef size_t diff --git a/configure.in b/configure.in index 97f0f3687..06c9a1f2f 100644 --- a/configure.in +++ b/configure.in @@ -252,6 +252,7 @@ lib/Makefile client/Makefile intl/Makefile po/Makefile.in +tools/Makefile doc/Makefile doc/kernel-doc doc/html-customizations.dsl diff --git a/data/iconbar/iconbar_bottom.bits.db b/data/iconbar/iconbar_bottom.bits.db new file mode 100644 index 0000000000000000000000000000000000000000..7c042755eff1acbb29cdb0f19cca29877651bb75 GIT binary patch literal 94208 zcmeHw33MIBm3GOHKu~v8FpG^b#wOk{wx1Ro+w#84mKS;7WlNSU3nW=c!pO!kX2-;A z3HuTrfnf_<*bbke?{VrqaPyI=sWuKwb&og#34yE`C_j?SEBk>(t!r1@5W_um}%1&TKpSRAf`Y}ftUg@1!4-s6o@GhQy`{5 zOo5mJF$H1@m=u6m?|nwIH*MDE|A{|~--us}ABdO4BjQ2v6>+WT5#3^oSR-bMDPoiu zCi)64{=whpZ}K^CIlO|8;RE=|yo7&X|IU8Xe#8Ey z{V(=+?MLi;?Q89;?DOpod!xP9o@dXr$J(RpZP+= z+Kv7ic62s2btaICkFS!K6IG`*vQBGB;0oJ!bhg#ECR*C+n{jR1ceFJnI_tZ-sp~{b z!{+Xm?$)NU9qrA&OYl`PE~7lr)yjC}N*u>|*GE-1Jy5>8 zrL`$_)BJbAO*hJyCEDtH65Gw2rji5WE~5*rNObPPJ(Ew5{`jOb1HHI+q`|v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_iconbar_db.sh +++ b/data/scripts/build_iconbar_db.sh @@ -1,83 +1,40 @@ #!/bin/sh -# db to create -DB="./.e_iconbar.db" +DB=$1"/.e_iconbar.db" +BIT=$1"/.e_iconbar.bits.db" -# replace ICONDIR with where you keep icons, or just use full paths below setup () { - NUM=0 - ICONDIR="/usr/share/pixmaps" - E_PREFIX="/usr/local" - rm -f $DB + PREFIX="/usr/local" + SYSIC="/usr/share/pixmaps" + USRIC=$HOME"/stuff/icons" + NUM=0 + rm -f $DB } finish () { - edb_ed $DB add "/ib/num" int $NUM + edb_ed $DB add "/icons/count" int $NUM } -# usage: icon 'image_path' 'exec' icon () { - edb_ed $DB add "/ib/"$NUM"/icon" str "$1" - edb_ed $DB add "/ib/"$NUM"/exec" str "$2" - NUM=$[ $NUM + 1 ]; + e_img_import "$1" $DB":""/icons/"$NUM"/image" + edb_ed $DB add "/icons/"$NUM"/exec" str "$2" + NUM=$[ $NUM + 1 ]; } -config () -{ - edb_ed $DB add "/ib/"$1 int $2 -} - -str () -{ - edb_ed $DB add "/ib/"$1 str $2 -} -################################################# -## -## Define Icons here -## - setup -# title is put at top or left of bar, this may be removed in future -# vline/hline are the images that are repeated as borders for the bar / scroll region (for vert / horiz. bars). - -str 'image/title' $E_PREFIX'/share/enlightenment/data/images/ib_title.png' -str 'image/vline' $E_PREFIX'/share/enlightenment/data/images/vline.png' -str 'image/hline' $E_PREFIX'/share/enlightenment/data/images/hline.png' - -# 0 width / height makes it equal view's width / height, negative values for left/top go from bottowm right corner. scroll_w is used for both horizontal and vertical bars (i guess it should be renamed scroll_thikness or something). - -config 'geom/w' 0 -config 'geom/h' 75 -config 'geom/top' -75 -config 'geom/left' 0 -config 'geom/scroll_w' 16 -config 'geom/horizontal' 1 -config 'scroll_when_less' 0 - -# change icondir above, or replace with full pathname - -icon $ICONDIR'/gnome-term.png' 'Eterm' -icon $ICONDIR'/gnome-ccdesktop.png' 'sylpheed' -icon $ICONDIR'/netscape.png' 'netscape' -icon $ICONDIR'/gnome-irc.png' 'xchat' - -icon $ICONDIR'/gnome-gimp.png' 'gimp' -icon $ICONDIR'/mc/gnome-audio.png' 'xmms' -icon $ICONDIR'/home/raster/stuff/icons/star_office.png' '/home/raster/.desktop/Office' - -#icon $ICONDIR'/write.png' 'abiword' -#icon $ICONDIR'/spreadsheet.png' 'gnumeric' - -#icon $ICONDIR'/synth.png' 'SpiralSynth' -#icon $ICONDIR'/modsynth.png' 'SpiralSynthModular' -#icon $ICONDIR'/loops.png' 'SpiralLoops' -#icon $ICONDIR'/drakconf.png' 'gnomecc' -#icon $ICONDIR'/floppy.png' 'NULL' -#icon $ICONDIR'/trash.png' 'NULL' +icon $SYSIC"/gnome-term.png" "Eterm" +icon $SYSIC"/gnome-ccdesktop.png" "sylpheed" +icon $SYSIC"/netscape.png" "netscape" +icon $USRIC"/mozilla.png" "mozilla" +icon $SYSIC"/gnome-irc.png" "xchat" +icon $SYSIC"/gnome-gimp.png" "gimp" +icon $SYSIC"/mc/gnome-audio.png" "xmms" +icon $USRIC"star_office.png" "/home/raster/.desktop/Office" finish +cp -f $PREFIX"/share/enlightenment/data/iconbar/iconbar_bottom.bits.db" $BIT diff --git a/src/config.c b/src/config.c index baac6f5e7..6be697e7a 100644 --- a/src/config.c +++ b/src/config.c @@ -259,6 +259,14 @@ e_config_load(char *file, char *prefix, E_Config_Base_Type *type) (*((Evas_List *)(&(data[node->offset])))) = l2; } break; + case E_CFG_TYPE_KEY: + { + char *val; + + sprintf(buf, "%s/%s", prefix, node->prefix); + (*((char **)(&(data[node->offset])))) = strdup(buf); + } + break; default: break; } diff --git a/src/config.h b/src/config.h index 5ef3873ce..a1f9214cf 100644 --- a/src/config.h +++ b/src/config.h @@ -162,7 +162,8 @@ enum _e_config_datatype E_CFG_TYPE_INT, E_CFG_TYPE_STR, E_CFG_TYPE_FLOAT, - E_CFG_TYPE_LIST + E_CFG_TYPE_LIST, + E_CFG_TYPE_KEY }; struct _e_config_base_type diff --git a/src/iconbar.c b/src/iconbar.c index 94174aada..eeb5442f5 100644 --- a/src/iconbar.c +++ b/src/iconbar.c @@ -1,567 +1,363 @@ #include "iconbar.h" -static Evas_List iconbars; +static Evas_List iconbars = NULL; + +static E_Config_Base_Type *cf_iconbar = NULL; +static E_Config_Base_Type *cf_iconbar_icon = NULL; + +static void ib_bits_show(void *data); +static void ib_bits_hide(void *data); +static void ib_bits_move(void *data, double x, double y); +static void ib_bits_resize(void *data, double w, double h); +static void ib_bits_raise(void *data); +static void ib_bits_lower(void *data); +static void ib_bits_set_layer(void *data, int l); +static void ib_bits_set_clip(void *data, Evas_Object clip); +static void ib_bits_set_color_class(void *data, char *cc, int r, int g, int b, int a); +static void ib_bits_get_min_size(void *data, double *w, double *h); +static void ib_bits_get_max_size(void *data, double *w, double *h); + +static void ib_mouse_in(void *data, Evas _e, Evas_Object _o, int _b, int _x, int _y); +static void ib_mouse_out(void *data, Evas _e, Evas_Object _o, int _b, int _x, int _y); +static void ib_mouse_down(void *data, Evas _e, Evas_Object _o, int _b, int _x, int _y); +static void ib_mouse_up(void *data, Evas _e, Evas_Object _o, int _b, int _x, int _y); + +void +e_iconbar_init() +{ + cf_iconbar_icon = e_config_type_new(); + E_CONFIG_NODE(cf_iconbar_icon, "exec", E_CFG_TYPE_STR, NULL, E_Iconbar_Icon, exec, 0, 0, ""); + E_CONFIG_NODE(cf_iconbar_icon, "image", E_CFG_TYPE_KEY, NULL, E_Iconbar_Icon, image_path, 0, 0, ""); + + cf_iconbar = e_config_type_new(); + E_CONFIG_NODE(cf_iconbar, "icons", E_CFG_TYPE_LIST, cf_iconbar_icon, E_Iconbar, icons, 0, 0, NULL); +} E_Iconbar * e_iconbar_new(E_View *v) { - /* vertical lines (left, center, right) and title */ - /* Evas_Object ovl, ovc, ovr, ot; */ - - E_Iconbar *ib; - - ib = NEW(E_Iconbar, 1); - ZERO(ib, E_Iconbar, 1); - OBJ_INIT(ib, e_iconbar_free); - - printf("in ib_new()\n"); - - ib->v = v; - ib->e = v->evas; - /* ib->name = strdup(v->dir); */ - - /* e_iconbar_draw(ib); */ - iconbars = evas_list_append(iconbars, ib); - - if(e_iconbar_config(ib) == 0) - return NULL; - - return ib; -} - -void -e_iconbar_realize(E_Iconbar *ib) -{ - printf("in e_iconbar_realize()\n"); - - if(ib->geom.conf.left < 0) - ib->geom.left = ib->geom.conf.left + ib->v->size.w; - if(ib->geom.conf.top < 0) - ib->geom.top = ib->geom.conf.top + ib->v->size.h; - if(ib->geom.conf.w == 0) - ib->geom.w = ib->v->size.w; - if(ib->geom.conf.h == 0) - ib->geom.h = ib->v->size.h; - - printf("w: %i, h: %i\nt: %i, l: %i\n", ib->geom.w, ib->geom.h, ib->geom.top, ib->geom.left); - - - /* horizontal */ - if (ib->geom.horizontal) - { - ib->obj.scroll = evas_add_rectangle(ib->e); - ib->obj.line_l = evas_add_image_from_file(ib->e, ib->image.hline); - ib->obj.line_c = evas_add_image_from_file(ib->e, ib->image.hline); - ib->obj.line_r = evas_add_image_from_file(ib->e, ib->image.hline); - ib->obj.title = evas_add_image_from_file(ib->e, ib->image.title); - ib->obj.clip = evas_add_rectangle(ib->e); - - evas_get_image_size(ib->e, ib->obj.title, &ib->geom.title_w, &ib->geom.title_h); - evas_get_image_size(ib->e, ib->obj.line_l, &ib->geom.line_w, &ib->geom.line_h); - - evas_set_layer(ib->e, ib->obj.scroll, 400); - - evas_resize(ib->e, ib->obj.scroll, ib->geom.w, ib->geom.scroll_w); - evas_resize(ib->e, ib->obj.line_l, ib->geom.w, ib->geom.line_h); - evas_resize(ib->e, ib->obj.line_c, ib->geom.w, ib->geom.line_h); - evas_resize(ib->e, ib->obj.line_r, ib->geom.w, ib->geom.line_h); - evas_resize(ib->e, ib->obj.clip, ib->geom.w, ib->geom.h); - - evas_set_image_fill(ib->e, ib->obj.line_l, 0, 0, ib->geom.line_w, ib->geom.line_h); - evas_set_image_fill(ib->e, ib->obj.line_c, 0, 0, ib->geom.line_w, ib->geom.line_h); - evas_set_image_fill(ib->e, ib->obj.line_r, 0, 0, ib->geom.line_w, ib->geom.line_h); - - evas_move(ib->e, ib->obj.scroll, ib->geom.left, ib->geom.top + ib->geom.h - ib->geom.scroll_w); - evas_move(ib->e, ib->obj.line_l, ib->geom.left, ib->geom.top); - evas_move(ib->e, ib->obj.line_c, ib->geom.left, ib->geom.top + ib->geom.h - ib->geom.scroll_w); - evas_move(ib->e, ib->obj.line_r, ib->geom.left, ib->geom.top + ib->geom.h); - evas_move(ib->e, ib->obj.title, ib->geom.left - ib->geom.title_w - 5, ib->geom.top + (ib->geom.h - ib->geom.title_h) / 2); - evas_move(ib->e, ib->obj.clip, ib->geom.left, ib->geom.top); - - evas_set_color(ib->e, ib->obj.scroll, 129, 129, 129, 0); - evas_set_color(ib->e, ib->obj.clip, 255, 255, 255, 255); - } - - /* vertical */ - if (!ib->geom.horizontal) - { - ib->obj.scroll = evas_add_rectangle(ib->e); - ib->obj.line_l = evas_add_image_from_file(ib->e, ib->image.vline); - ib->obj.line_c = evas_add_image_from_file(ib->e, ib->image.vline); - ib->obj.line_r = evas_add_image_from_file(ib->e, ib->image.vline); - ib->obj.title = evas_add_image_from_file(ib->e, ib->image.title); - ib->obj.clip = evas_add_rectangle(ib->e); - - evas_get_image_size(ib->e, ib->obj.title, &ib->geom.title_w, &ib->geom.title_h); - evas_get_image_size(ib->e, ib->obj.line_l, &ib->geom.line_w, &ib->geom.line_h); - - evas_set_layer(ib->e, ib->obj.scroll, 400); - - evas_resize(ib->e, ib->obj.scroll, ib->geom.scroll_w, ib->geom.h); - evas_resize(ib->e, ib->obj.line_l, ib->geom.line_w, ib->geom.h); - evas_resize(ib->e, ib->obj.line_c, ib->geom.line_w, ib->geom.h); - evas_resize(ib->e, ib->obj.line_r, ib->geom.line_w, ib->geom.h); - evas_resize(ib->e, ib->obj.clip, ib->geom.w, ib->geom.h); - - evas_set_image_fill(ib->e, ib->obj.line_l, 0, 0, ib->geom.line_w, ib->geom.line_h); - evas_set_image_fill(ib->e, ib->obj.line_c, 0, 0, ib->geom.line_w, ib->geom.line_h); - evas_set_image_fill(ib->e, ib->obj.line_r, 0, 0, ib->geom.line_w, ib->geom.line_h); - - evas_move(ib->e, ib->obj.scroll, ib->geom.left + ib->geom.w - ib->geom.scroll_w, ib->geom.top); - evas_move(ib->e, ib->obj.line_l, ib->geom.left, ib->geom.top); - evas_move(ib->e, ib->obj.line_c, ib->geom.left + ib->geom.w - ib->geom.scroll_w, ib->geom.top); - evas_move(ib->e, ib->obj.line_r, ib->geom.left + ib->geom.w, ib->geom.top); - evas_move(ib->e, ib->obj.title, ib->geom.left + ((ib->geom.w - ib->geom.title_w - ib->geom.scroll_w) / 2 ), ib->geom.top - ib->geom.title_h - 5); - evas_move(ib->e, ib->obj.clip, ib->geom.left, ib->geom.top); - - evas_set_color(ib->e, ib->obj.scroll, 129, 129, 129, 0); - evas_set_color(ib->e, ib->obj.clip, 255, 255, 255, 255); - } - - - /* Clip icons */ - { - Evas_List l; - for (l = ib->icons; l; l = l->next) - { - E_Iconbar_Icon *i; - i = l->data; - evas_set_clip(ib->e, i->image, ib->obj.clip); - } - } - - /* show the iconbar */ - evas_show(ib->e, ib->obj.scroll); - evas_show(ib->e, ib->obj.line_l); - evas_show(ib->e, ib->obj.line_c); - evas_show(ib->e, ib->obj.line_r); - evas_show(ib->e, ib->obj.title); - evas_show(ib->e, ib->obj.clip); - - evas_callback_add(ib->e, ib->obj.scroll, CALLBACK_MOUSE_MOVE, s_mouse_move, ib); - evas_callback_add(ib->e, ib->obj.scroll, CALLBACK_MOUSE_IN, s_mouse_in, ib); - evas_callback_add(ib->e, ib->obj.scroll, CALLBACK_MOUSE_OUT, s_mouse_out, ib); - - e_iconbar_fix_icons(ib); - - printf("realized!\n"); -} - - -E_Iconbar_Icon * -e_iconbar_new_icon(E_Iconbar *ib, char *image, char *exec) -{ - E_Iconbar_Icon *i; - - i = NEW(E_Iconbar_Icon, 1); - i->image = evas_add_image_from_file(ib->e, image); - i->exec = strdup(exec); - evas_get_image_size(ib->e, i->image, &(i->w), &(i->h)); - - if (ib->geom.horizontal) - { - i->x = 0; - i->y = (ib->geom.h - i->h - ib->geom.scroll_w) / 2 + ib->geom.top; - } - else - { - i->x = (ib->geom.w - i->w - ib->geom.scroll_w) / 2 + ib->geom.left; - i->y = 0; - } - - printf("x: %f, y: %f\n", i->x, i->y); - evas_callback_add(ib->e, i->image, CALLBACK_MOUSE_IN, i_mouse_in, NULL); - evas_callback_add(ib->e, i->image, CALLBACK_MOUSE_OUT, i_mouse_out, NULL); - evas_callback_add(ib->e, i->image, CALLBACK_MOUSE_DOWN, i_mouse_down, i->exec); - - evas_set_color(ib->e, i->image, 255, 255, 255, 128); - evas_set_layer(ib->e, i->image, 400); - /* evas_set_clip(ib->e, i->image, ib->obj.clip); */ - /* printf("before ib->icons set\n"); */ - ib->icons = evas_list_append(ib->icons, i); - /* printf("after set\n"); */ - - return i; -} - - -int -e_iconbar_config(E_Iconbar *ib) -{ - E_DB_File *db; - char buf[PATH_MAX], *userdir; - - /* userdir = e_config_user_dir(); */ - /* sprintf(buf, "%sbehavior/iconbar.db", userdir); */ - sprintf(buf, "%s/.e_iconbar.db", ib->v->dir); - ib->db = strdup(buf); - db = e_db_open_read(ib->db); - - if (!db) - { - /* ib->no_show = 1; - - db = e_db_open(ib->db); - e_db_int_set(db, "/ib/num", 0); - e_db_int_set(db, "/ib/geom/w", 75); - e_db_int_set(db, "/ib/geom/h", 620); - e_db_int_set(db, "/ib/geom/top", 165); - e_db_int_set(db, "/ib/geom/left", -150); - e_db_int_set(db, "/ib/geom/scroll_w", 16); - e_db_int_set(db, "/ib/geom/horizontal", 0); - e_db_int_set(db, "/ib/scroll_when_less", 0); - e_db_str_set(db, "/ib/image/title", "/usr/local/share/enlightenment/data/ib_title.png"); - e_db_str_set(db, "/ib/image/vline", "/usr/local/share/enlightenment/data/vline.png"); - e_db_str_set(db, "/ib/image/hline", "/usr/local/share/enlightenment/data/hline.png"); - */ - return 0; - } - - e_db_int_get(db, "/ib/geom/w", &(ib->geom.conf.w) ); - e_db_int_get(db, "/ib/geom/h", &(ib->geom.conf.h)); - e_db_int_get(db, "/ib/geom/top", &(ib->geom.conf.top)); - e_db_int_get(db, "/ib/geom/left", &(ib->geom.conf.left)); - e_db_int_get(db, "/ib/geom/scroll_w", &(ib->geom.scroll_w)); - e_db_int_get(db, "/ib/geom/horizontal", &(ib->geom.horizontal)); - e_db_int_get(db, "/ib/scroll_when_less", &(ib->scroll_when_less)); - ib->image.title = e_db_str_get(db, "/ib/image/title"); - ib->image.vline = e_db_str_get(db, "/ib/image/vline"); - ib->image.hline = e_db_str_get(db, "/ib/image/hline"); - - ib->start = 0.0; - ib->icons = NULL; - - ib->geom.left = ib->geom.conf.left; - ib->geom.top = ib->geom.conf.top; - ib->geom.w = ib->geom.conf.w; - ib->geom.h = ib->geom.conf.h; - - /* - { - double w, h; - evas_get_viewport(ib->e, NULL, NULL, &w, &h); - - if(ib->geom.conf.left < 0) - ib->geom.left = ib->geom.conf.left + w; - else - ib->geom.left = ib->geom.conf.left; - if(ib->geom.conf.top < 0) - ib->geom.top = ib->geom.conf.top + h; - else - ib->geom.top = ib->geom.conf.top; - } - - */ - printf("w: %i, h: %i\nt: %i, l: %i\n", ib->geom.w, ib->geom.h, ib->geom.top, ib->geom.left); - - - { - int i, num; - - if (e_db_int_get(db, "/ib/num", &num)) - { - printf("making %i icons...\n", num); + Evas_List l; + char buf[PATH_MAX]; + E_Iconbar *ib; + + sprintf(buf, "%s/.e_iconbar.db", v->dir); + + ib = e_config_load(buf, "", cf_iconbar); + if (!ib) return NULL; + + OBJ_INIT(ib, e_iconbar_free); + ib->view = v; + + for (l = ib->icons; l; l = l->next) + { + E_Iconbar_Icon *ic; - for ( i = 0; i < num; i++) - { - char *icon, *exec, buf[PATH_MAX]; - - sprintf(buf, "/ib/%i/icon", i); - /* printf("reading #%i's icon...\n", i); */ - icon = e_db_str_get(db, buf); - /* printf("icon: %s, reading #%i's exec...\n", icon, i); */ - sprintf(buf, "/ib/%i/exec", i); - exec = e_db_str_get(db, buf); - printf("exec: %s... creating icon\n", exec); - - /* printf("creating icon, %s, %s\n", icon, exec); */ - e_iconbar_new_icon(ib, icon, exec); - printf("created...\n"); - } - } - } - /* printf("created icon.\n"); */ - - e_db_close(db); - - return 1; -} - - -void -e_iconbar_fix_icons(E_Iconbar *ib) -{ - Evas_List l; - double cur, spacer; - - spacer = 8.0; - - if (!ib->geom.horizontal) - { - cur = ib->geom.top + ib->start + spacer; - for (l = ib->icons; l; l = l->next) - { - E_Iconbar_Icon *i; - - i = l->data; - i->y = cur; - i->x = (ib->geom.w - i->w - ib->geom.scroll_w) / 2 + ib->geom.left; - cur = cur + i->h + spacer; - - evas_move(ib->e, i->image, i->x, i->y); - evas_show(ib->e, i->image); - } - - ib->length = cur - ib->start - ib->geom.top; - } - else - { - cur = ib->geom.left + ib->start + spacer; - for (l = ib->icons; l; l = l->next) - { - E_Iconbar_Icon *i; - - i = l->data; - i->x = cur; - i->y = (ib->geom.h - i->h - ib->geom.scroll_w) / 2 + ib->geom.top; - cur = cur + i->w + spacer; - - evas_move(ib->e, i->image, i->x, i->y); - evas_show(ib->e, i->image); - } - - ib->length = cur - ib->start - ib->geom.left; - } -} - -void -e_iconbar_scroll(int val, void *data) -{ - E_Iconbar *ib; - double vis_length; - - /* printf("before scroll data to ib set\n"); */ - ib = data; - /* printf("after data set\n"); */ - /* printf("start: %f, speed: %f\n", ib->start, ib->speed); */ - ib->start = ib->start - ib->speed; - if (ib->geom.horizontal) vis_length = ib->geom.w; - else vis_length = ib->geom.h; - - if (ib->length > vis_length) - { - if (ib->start > 0) - ib->start = 0; - else if (ib->start < vis_length - ib->length) - ib->start = vis_length - ib->length; - } - else if (ib->scroll_when_less) - { - /* icons scroll even if they don't fill the bar */ - if (ib->start < 0) - ib->start = 0; - else if (ib->start > vis_length - ib->length) - ib->start = vis_length - ib->length; - - } - else - { - ib->start = 0; - } - /* printf("before fix\n"); */ - e_iconbar_fix_icons(ib); - /* printf("after fix\n"); */ - - if (ib->scrolling) - { - /* printf("before timer\n"); */ - ecore_add_event_timer("e_iconbar_scroll()", 0.01, e_iconbar_scroll, 1, ib); - /* printf("after timer\n"); */ - } -} - -void -i_mouse_in(void *_data, Evas _e, Evas_Object _o, int _b, int _x, int _y) -{ - evas_set_color(_e, _o, 255, 255, 255, 255); -} - -void -i_mouse_out(void *_data, Evas _e, Evas_Object _o, int _b, int _x, int _y) -{ - evas_set_color(_e, _o, 255, 255, 255, 128); -} - -void -i_mouse_down(void *_data, Evas _e, Evas_Object _o, int _b, int _x, int _y) -{ - char *file = _data; - e_exec_run(file); -} - - -void -s_mouse_move(void *_data, Evas _e, Evas_Object _o, int _b, int _x, int _y) -{ - E_Iconbar *ib; - - double center; - int top_speed; - double r; - - /* printf("set ib in s_mouse_move\n"); */ - - ib = _data; - - top_speed = 5; - - if (ib->geom.horizontal) - { - center = ib->geom.left + (.5 * ib->geom.w); - r = (_x - center) / (.5 * ib->geom.w); - } - else - { - center = ib->geom.top + (.5 * ib->geom.h); - r = (_y - center) / (.5 * ib->geom.h); - } - - ib->speed = r * (double)top_speed; - - e_iconbar_scroll(1, ib); -} - -void -s_mouse_in(void *_data, Evas _e, Evas_Object _o, int _b, int _x, int _y) -{ - E_Iconbar *ib; - ib = _data; - /* printf("setting scrolling\n"); */ - ib->scrolling = 1; - /* printf("set scrolling\n"); */ -} - -void -s_mouse_out(void *_data, Evas _e, Evas_Object _o, int _b, int _x, int _y) -{ - E_Iconbar *ib; - ib = _data; - ib->scrolling = 0; + ic = l->data; + OBJ_INIT(ic, e_iconbar_icon_free); + ic->iconbar = ib; + } + sprintf(buf, "%s/.e_iconbar.bits.db", v->dir); + + ib->bit = ebits_load(buf); + if (!ib->bit) + { + OBJ_UNREF(ib); + return NULL; + } + + return ib; } void e_iconbar_free(E_Iconbar *ib) { + iconbars = evas_list_remove(iconbars, ib); + + ib->view->changed = 1; + if (ib->bit) ebits_free(ib->bit); + if (ib->icons) + { + Evas_List l; - Evas_List l; - - printf("in e_iconbar_clean_up()\n"); - - iconbars = evas_list_remove(iconbars, ib); - - for (l = ib->icons; l; l = l->next) - { - E_Iconbar_Icon *i; - i = l->data; - FREE(i); - } - FREE(ib->icons); + for (l = ib->icons; l; l = l->next) + { + E_Iconbar_Icon *ic; + + ic = l->data; + OBJ_UNREF(ic); + } + evas_list_free(ib->icons); + } FREE(ib); - e_db_runtime_flush(); - - printf("e_iconbar_clean_up() run successfully\n"); } +void +e_iconbar_icon_free(E_Iconbar_Icon *ic) +{ + if (ic->image) evas_del_object(ic->iconbar->view->evas, ic->image); + IF_FREE(ic->image_path); + IF_FREE(ic->exec); + FREE(ic); +} + +void +e_iconbar_realize(E_Iconbar *ib) +{ + Evas_List l; + + for (l = ib->icons; l; l = l->next) + { + E_Iconbar_Icon *ic; + char buf[PATH_MAX]; + + ic = l->data; + sprintf(buf, "%s/.e_iconbar.db:%s", ib->view->dir, ic->image_path); + ic->image = evas_add_image_from_file(ib->view->evas, buf); + evas_set_color(ib->view->evas, ic->image, 255, 255, 255, 128); + evas_callback_add(ib->view->evas, ic->image, CALLBACK_MOUSE_IN, ib_mouse_in, ic); + evas_callback_add(ib->view->evas, ic->image, CALLBACK_MOUSE_OUT, ib_mouse_out, ic); + evas_callback_add(ib->view->evas, ic->image, CALLBACK_MOUSE_DOWN, ib_mouse_down, ic); + evas_callback_add(ib->view->evas, ic->image, CALLBACK_MOUSE_UP, ib_mouse_up, ic); + } + ebits_add_to_evas(ib->bit, ib->view->evas); + ebits_set_named_bit_replace(ib->bit, "Icons", + ib_bits_show, + ib_bits_hide, + ib_bits_move, + ib_bits_resize, + ib_bits_raise, + ib_bits_lower, + ib_bits_set_layer, + ib_bits_set_clip, + ib_bits_set_color_class, + ib_bits_get_min_size, + ib_bits_get_max_size, + ib); + ebits_set_layer(ib->bit, 10000); + e_iconbar_fix(ib); +} + +void +e_iconbar_fix(E_Iconbar *ib) +{ + Evas_List l; + double ix, iy, aw, ah; + + ebits_move(ib->bit, 0, 0); + ebits_resize(ib->bit, ib->view->size.w, ib->view->size.h); + ebits_show(ib->bit); + ib->view->changed = 1; + + ix = ib->icon_area.x; + iy = ib->icon_area.y; + aw = ib->icon_area.w; + ah = ib->icon_area.h; + + if (aw > ah) /* horizontal */ + { + } + else /* vertical */ + { + } + + for (l = ib->icons; l; l = l->next) + { + E_Iconbar_Icon *ic; + int iw, ih; + double w, h; + double ox, oy; + + ic = l->data; + evas_get_image_size(ic->iconbar->view->evas, ic->image, &iw, &ih); + w = iw; + h = ih; + ox = 0; + oy = 0; + if (aw > ah) /* horizontal */ + { + if (h > ah) + { + w = (ah * w) / h; + h = ah; + } + ox = 0; + oy = (ah - h) / 2; + evas_move(ic->iconbar->view->evas, ic->image, ix + ox, iy + oy); + evas_resize(ic->iconbar->view->evas, ic->image, w, h); + ix += w; + } + else /* vertical */ + { + if (w > aw) + { + h = (aw * h) / w; + w = aw; + } + ox = (aw - w) / 2; + oy = 0; + evas_move(ic->iconbar->view->evas, ic->image, ix + ox, iy + oy); + evas_resize(ic->iconbar->view->evas, ic->image, w, h); + iy += h; + } + } +} static void -e_iconbar_idle(void *data) +ib_bits_show(void *data) { - Evas_List l; - - for (l = iconbars; l; l = l->next) - { - E_Iconbar *ib; - - ib = l->data; - e_iconbar_update(ib); - /* e_iconbar_redraw(ib); */ - } + E_Iconbar *ib; + Evas_List l; + + ib = (E_Iconbar *)data; + for (l = ib->icons; l; l = l->next) + { + E_Iconbar_Icon *ic; + + ic = l->data; + evas_show(ic->iconbar->view->evas, ic->image); + } } -void -e_iconbar_update(E_Iconbar *ib) +static void +ib_bits_hide(void *data) { - if (ib->v->changed) - { - e_iconbar_redraw(ib); - } + E_Iconbar *ib; + Evas_List l; + + ib = (E_Iconbar *)data; + for (l = ib->icons; l; l = l->next) + { + E_Iconbar_Icon *ic; + + ic = l->data; + evas_hide(ic->iconbar->view->evas, ic->image); + } } - -void -e_iconbar_redraw(E_Iconbar *ib) +static void +ib_bits_move(void *data, double x, double y) { - if(ib->geom.conf.left < 0) - ib->geom.left = ib->geom.conf.left + ib->v->size.w; - if(ib->geom.conf.top < 0) - ib->geom.top = ib->geom.conf.top + ib->v->size.h; - if(ib->geom.conf.w == 0) - ib->geom.w = ib->v->size.w; - if(ib->geom.conf.h == 0) - ib->geom.h = ib->v->size.h; - - - /* horizontal */ - if (ib->geom.horizontal) - { - evas_move(ib->e, ib->obj.scroll, ib->geom.left, ib->geom.top + ib->geom.h - ib->geom.scroll_w); - evas_move(ib->e, ib->obj.line_l, ib->geom.left, ib->geom.top); - evas_move(ib->e, ib->obj.line_c, ib->geom.left, ib->geom.top + ib->geom.h - ib->geom.scroll_w); - evas_move(ib->e, ib->obj.line_r, ib->geom.left, ib->geom.top + ib->geom.h); - evas_move(ib->e, ib->obj.title, ib->geom.left - ib->geom.title_w - 5, ib->geom.top + (ib->geom.h - ib->geom.title_h) / 2); - evas_move(ib->e, ib->obj.clip, ib->geom.left, ib->geom.top); - } - - /* vertical */ - if (!ib->geom.horizontal) - { - evas_move(ib->e, ib->obj.scroll, ib->geom.left + ib->geom.w - ib->geom.scroll_w, ib->geom.top); - evas_move(ib->e, ib->obj.line_l, ib->geom.left, ib->geom.top); - evas_move(ib->e, ib->obj.line_c, ib->geom.left + ib->geom.w - ib->geom.scroll_w, ib->geom.top); - evas_move(ib->e, ib->obj.line_r, ib->geom.left + ib->geom.w, ib->geom.top); - evas_move(ib->e, ib->obj.title, ib->geom.left + ((ib->geom.w - ib->geom.title_w - ib->geom.scroll_w) / 2 ), ib->geom.top - ib->geom.title_h - 5); - evas_move(ib->e, ib->obj.clip, ib->geom.left, ib->geom.top); - } - - - /* Clip icons */ - { - Evas_List l; - for (l = ib->icons; l; l = l->next) - { - E_Iconbar_Icon *i; - i = l->data; - evas_set_clip(ib->e, i->image, ib->obj.clip); - } - } - - /* show the iconbar */ - evas_show(ib->e, ib->obj.scroll); - evas_show(ib->e, ib->obj.line_l); - evas_show(ib->e, ib->obj.line_c); - evas_show(ib->e, ib->obj.line_r); - evas_show(ib->e, ib->obj.title); - evas_show(ib->e, ib->obj.clip); - - evas_callback_add(ib->e, ib->obj.scroll, CALLBACK_MOUSE_MOVE, s_mouse_move, ib); - evas_callback_add(ib->e, ib->obj.scroll, CALLBACK_MOUSE_IN, s_mouse_in, ib); - evas_callback_add(ib->e, ib->obj.scroll, CALLBACK_MOUSE_OUT, s_mouse_out, ib); - - e_iconbar_fix_icons(ib); + E_Iconbar *ib; + Evas_List l; + + ib = (E_Iconbar *)data; + ib->icon_area.x = x; + ib->icon_area.y = y; } -void -e_iconbar_init() +static void +ib_bits_resize(void *data, double w, double h) +{ + E_Iconbar *ib; + Evas_List l; + + ib = (E_Iconbar *)data; + ib->icon_area.w = w; + ib->icon_area.h = h; +} + +static void +ib_bits_raise(void *data) +{ + E_Iconbar *ib; + Evas_List l; + + ib = (E_Iconbar *)data; + for (l = ib->icons; l; l = l->next) + { + E_Iconbar_Icon *ic; + + ic = l->data; + evas_raise(ic->iconbar->view->evas, ic->image); + } +} + +static void +ib_bits_lower(void *data) +{ + E_Iconbar *ib; + Evas_List l; + + ib = (E_Iconbar *)data; + for (l = ib->icons; l; l = l->next) + { + E_Iconbar_Icon *ic; + + ic = l->data; + evas_lower(ic->iconbar->view->evas, ic->image); + } +} + +static void +ib_bits_set_layer(void *data, int lay) +{ + E_Iconbar *ib; + Evas_List l; + + ib = (E_Iconbar *)data; + for (l = ib->icons; l; l = l->next) + { + E_Iconbar_Icon *ic; + + ic = l->data; + evas_set_layer(ic->iconbar->view->evas, ic->image, lay); + } +} + +static void +ib_bits_set_clip(void *data, Evas_Object clip) +{ +} + +static void +ib_bits_set_color_class(void *data, char *cc, int r, int g, int b, int a) +{ +} + +static void +ib_bits_get_min_size(void *data, double *w, double *h) +{ + *w = 0; + *h = 0; +} + +static void +ib_bits_get_max_size(void *data, double *w, double *h) +{ + *w = 999999; + *h = 999999; +} + +static void +ib_mouse_in(void *data, Evas _e, Evas_Object _o, int _b, int _x, int _y) +{ + E_Iconbar_Icon *ic; + + ic = (E_Iconbar_Icon *)data; + evas_set_color(ic->iconbar->view->evas, ic->image, 255, 255, 255, 255); + ic->iconbar->view->changed = 1; +} + +static void +ib_mouse_out(void *data, Evas _e, Evas_Object _o, int _b, int _x, int _y) +{ + E_Iconbar_Icon *ic; + + ic = (E_Iconbar_Icon *)data; + evas_set_color(ic->iconbar->view->evas, ic->image, 255, 255, 255, 128); + ic->iconbar->view->changed = 1; +} + +static void +ib_mouse_down(void *data, Evas _e, Evas_Object _o, int _b, int _x, int _y) +{ + E_Iconbar_Icon *ic; + + ic = (E_Iconbar_Icon *)data; + e_exec_run(ic->exec); +} + +static void +ib_mouse_up(void *data, Evas _e, Evas_Object _o, int _b, int _x, int _y) { - ecore_event_filter_idle_handler_add(e_iconbar_idle, NULL); } diff --git a/src/iconbar.h b/src/iconbar.h index f5482d3d0..eb66e9afc 100644 --- a/src/iconbar.h +++ b/src/iconbar.h @@ -6,11 +6,7 @@ #include "exec.h" #include "view.h" -#define SCROLL_W 16 -#define SCREEN_W 1280 - -typedef struct _iconbar_icon E_Iconbar_Icon; - +typedef struct _E_Iconbar_Icon E_Iconbar_Icon; #ifndef E_ICONBAR_TYPEDEF #define E_ICONBAR_TYPEDEF typedef struct _E_Iconbar E_Iconbar; @@ -21,86 +17,38 @@ typedef struct _E_Iconbar E_Iconbar; typedef struct _E_View E_View; #endif - -struct _iconbar_icon -{ - OBJ_PROPERTIES; - - Evas_Object image; - char *exec; - int w, h; - double x, y; - - int selected; -}; - struct _E_Iconbar { - OBJ_PROPERTIES; + OBJ_PROPERTIES; + + E_View *view; + Evas_List icons; - char *name; - E_View *v; - Evas e; - Evas_List icons; - char *db; - - struct { - Evas_Object clip; - Evas_Object scroll; - Evas_Object line_l; - Evas_Object line_c; - Evas_Object line_r; - Evas_Object title; - } obj; - - struct { - char *title; - char *vline; - char *hline; - } image; - - - double start, speed, length; - - int scrolling, scroll_when_less; - - struct { - int w; - int h; - int top; - int left; - int scroll_w; - int title_w, title_h, line_w, line_h; - - int horizontal; /* 1 - horiz, 0 - vert */ - - struct { - int top; - int left; - int h; - int w; - } conf; - } geom; + Ebits_Object *bit; + struct { + double x, y, w, h; + } icon_area; }; +struct _E_Iconbar_Icon +{ + OBJ_PROPERTIES; + + E_Iconbar *iconbar; + + Evas_Object image; + + char *image_path; + char *exec; + + int selected; +}; void e_iconbar_init(void); -E_Iconbar *e_iconbar_new(E_View *); -int e_iconbar_config(E_Iconbar *); -void e_iconbar_realize(E_Iconbar *); -void e_iconbar_redraw(E_Iconbar *); -E_Iconbar_Icon *e_iconbar_new_icon(E_Iconbar *, char *, char *); -void e_iconbar_fix_icons(E_Iconbar *); -void e_iconbar_create_icons_from_db(E_Iconbar *); -void e_iconbar_free(E_Iconbar *); -void e_iconbar_update(E_Iconbar *); - -void i_mouse_in(void *_data, Evas _e, Evas_Object _o, int _b, int _x, int _y); -void i_mouse_out(void *_data, Evas _e, Evas_Object _o, int _b, int _x, int _y); -void i_mouse_down(void *_data, Evas _e, Evas_Object _o, int _b, int _x, int _y); - -void s_mouse_move(void *_data, Evas _e, Evas_Object _o, int _b, int _x, int _y); -void s_mouse_in(void *_data, Evas _e, Evas_Object _o, int _b, int _x, int _y); -void s_mouse_out(void *_data, Evas _e, Evas_Object _o, int _b, int _x, int _y); +E_Iconbar *e_iconbar_new(E_View *v); +void e_iconbar_free(E_Iconbar *ib); +void e_iconbar_icon_free(E_Iconbar_Icon *); +void e_iconbar_realize(E_Iconbar *ib); +void e_iconbar_fix(E_Iconbar *ib); #endif diff --git a/src/view.c b/src/view.c index db14248f6..b290229f3 100644 --- a/src/view.c +++ b/src/view.c @@ -1264,6 +1264,7 @@ e_configure(Ecore_Event * ev) e_scrollbar_resize(v->scrollbar.v, 12, v->size.h - 12); e_scrollbar_move(v->scrollbar.h, 0, v->size.h - 12); e_scrollbar_resize(v->scrollbar.h, v->size.w - 12, 12); + if (v->iconbar) e_iconbar_fix(v->iconbar); } } } @@ -2184,6 +2185,7 @@ e_view_free(E_View *v) { char name[PATH_MAX]; + if (v->iconbar) OBJ_UNREF(v->iconbar); sprintf(name, "resort_timer.%s", v->dir); ecore_del_event_timer(name); @@ -2199,7 +2201,6 @@ e_view_free(E_View *v) v->restarter = NULL; ecore_window_destroy(v->win.base); - if (v->iconbar) e_iconbar_free(v->iconbar); FREE(v); } @@ -2252,7 +2253,6 @@ _member.r = _r; _member.g = _g; _member.b = _b; _member.a = _a; v->spacing.icon.s = 7; v->spacing.icon.g = 7; v->spacing.icon.b = 7; -// v->iconbar = e_iconbar_new(v); views = evas_list_append(views, v); return v; @@ -2288,8 +2288,8 @@ e_view_set_dir(E_View *v, char *dir) v->geom_get.h = efsd_get_metadata(e_fs_get_connection(), "/view/h", v->dir, EFSD_INT); v->geom_get.busy = 1; - v->getbg = efsd_get_metadata(e_fs_get_connection(), "/view/background", v->dir, EFSD_STRING); - { + v->getbg = efsd_get_metadata(e_fs_get_connection(), "/view/background", v->dir, EFSD_STRING); + { EfsdOptions *ops; ops = efsd_ops(2, efsd_op_get_stat(), efsd_op_get_filetype()); @@ -2392,8 +2392,7 @@ e_view_realize(E_View *v) } v->iconbar = e_iconbar_new(v); - - if(v->iconbar) e_iconbar_realize(v->iconbar); + if (v->iconbar) e_iconbar_realize(v->iconbar); v->changed = 1; } diff --git a/tools/.cvsignore b/tools/.cvsignore new file mode 100644 index 000000000..03206ec26 --- /dev/null +++ b/tools/.cvsignore @@ -0,0 +1,5 @@ +e_ipc_client +Makefile.in +Makefile +.libs +.deps diff --git a/tools/Makefile.am b/tools/Makefile.am new file mode 100644 index 000000000..81500fa33 --- /dev/null +++ b/tools/Makefile.am @@ -0,0 +1,12 @@ +## Process this file with automake to produce Makefile.in + +INCLUDES = \ + -I$(top_srcdir)/intl \ + @evas_cflags@ @edb_cflags@ @ebits_cflags@ @ecore_cflags@ @efsd_cflags@ @ferite_cflags@ + +bin_PROGRAMS = e_img_import + +e_img_import_SOURCES = \ +e_img_import.c + +e_img_import_LDADD = @evas_libs@ @edb_libs@ @ebits_libs@ @ecore_libs@ @ferite_libs@ -lm -lc $(INTLLIBS) diff --git a/tools/e_img_import.c b/tools/e_img_import.c new file mode 100644 index 000000000..ba5a1898e --- /dev/null +++ b/tools/e_img_import.c @@ -0,0 +1,22 @@ +#include +#include + +int main(int argc, char **argv) +{ + Imlib_Image im; + + if (argc == 1) + { + printf("usage:\n\t%s source_image.png dest.db:/key/in/db\n", argv[0]); + exit(-1); + } + im = imlib_load_image(argv[1]); + if (im) + { + imlib_context_set_image(im); + imlib_image_attach_data_value("compression", NULL, 9, NULL); + imlib_image_set_format("db"); + imlib_save_image(argv[2]); + } + return 0; +}