E-MODULES-EXTRA/elfe : * protoype of windows list :
* display windows list on E action * Close window by sliding it up * select window with click SVN revision: 62833
This commit is contained in:
parent
75dc2a1fd9
commit
d4af7a8dea
|
@ -120,14 +120,40 @@ collections
|
||||||
type: SWALLOW;
|
type: SWALLOW;
|
||||||
description {
|
description {
|
||||||
state: "default" 0.0;
|
state: "default" 0.0;
|
||||||
visible: 1;
|
visible: 0;
|
||||||
rel1 { relative: 0.0 0.0;
|
|
||||||
|
|
||||||
|
rel1 { relative: 0.0 1.0;
|
||||||
}
|
}
|
||||||
rel2 { relative: 1.0 1.0;
|
rel2 { relative: 1.0 2.0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
description {
|
||||||
|
state: "show" 0.0;
|
||||||
|
visible: 1;
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
programs {
|
||||||
|
program {
|
||||||
|
name: "desktop,show";
|
||||||
|
signal: "elfe,desktop,show";
|
||||||
|
source: "elfe";
|
||||||
|
action: STATE_SET "show" 0.0;
|
||||||
|
target: "elfe.swallow.desktop";
|
||||||
|
transition: "DECELERATE" 0.5;
|
||||||
|
}
|
||||||
|
program {
|
||||||
|
name: "desktop,hide";
|
||||||
|
signal: "elfe,desktop,hide";
|
||||||
|
source: "elfe";
|
||||||
|
action: STATE_SET "default" 0.0;
|
||||||
|
target: "elfe.swallow.desktop";
|
||||||
|
transition: "ACCELERATE" 0.5;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
group {
|
group {
|
||||||
name: "elfe/desktop/gadget/frame";
|
name: "elfe/desktop/gadget/frame";
|
||||||
|
@ -827,6 +853,207 @@ collections
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
group {
|
||||||
|
name: "elfe/winlist/layout";
|
||||||
|
parts {
|
||||||
|
part {
|
||||||
|
name: "clip";
|
||||||
|
type: RECT;
|
||||||
|
description {
|
||||||
|
state: "default" 0.0;
|
||||||
|
color: 0 0 0 0;
|
||||||
|
visible: 0;
|
||||||
|
}
|
||||||
|
description {
|
||||||
|
state: "visible" 0.0;
|
||||||
|
color: 255 255 255 255;
|
||||||
|
visible: 1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
part {
|
||||||
|
name: "bg";
|
||||||
|
clip_to: "clip";
|
||||||
|
type: RECT;
|
||||||
|
description {
|
||||||
|
state: "default" 0.0;
|
||||||
|
color: 0 0 0 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
part {
|
||||||
|
name: "elfe.swallow.windows";
|
||||||
|
type: SWALLOW;
|
||||||
|
clip_to: "clip";
|
||||||
|
description {
|
||||||
|
state: "default" 0.0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
part {
|
||||||
|
name: "event";
|
||||||
|
type: RECT;
|
||||||
|
clip_to: "clip";
|
||||||
|
description {
|
||||||
|
state: "default" 0.0;
|
||||||
|
color: 255 255 255 0;
|
||||||
|
rel1.relative: 0.0 0.0;
|
||||||
|
rel2.relative: 1.0 0.3;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
part {
|
||||||
|
name: "event2";
|
||||||
|
type: RECT;
|
||||||
|
clip_to: "clip";
|
||||||
|
description {
|
||||||
|
state: "default" 0.0;
|
||||||
|
color: 255 255 255 0;
|
||||||
|
rel1.relative: 0.0 0.7;
|
||||||
|
rel2.relative: 1.0 1.0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
programs {
|
||||||
|
program {
|
||||||
|
name: "winlist,show";
|
||||||
|
signal: "elfe,winlist,show";
|
||||||
|
source: "*";
|
||||||
|
action: STATE_SET "visible" 0.0;
|
||||||
|
transition: ACCELERATE 0.5;
|
||||||
|
target: "clip";
|
||||||
|
}
|
||||||
|
program {
|
||||||
|
name: "winlist,hide";
|
||||||
|
signal: "elfe,winlist,hide";
|
||||||
|
source: "*";
|
||||||
|
action: STATE_SET "default" 0.0;
|
||||||
|
transition: ACCELERATE 0.5;
|
||||||
|
target: "clip";
|
||||||
|
}
|
||||||
|
program {
|
||||||
|
name: "event_click";
|
||||||
|
signal: "mouse,clicked,1";
|
||||||
|
source: "event";
|
||||||
|
action: SIGNAL_EMIT "elfe,action,click" "";
|
||||||
|
}
|
||||||
|
program {
|
||||||
|
name: "event2_click";
|
||||||
|
signal: "mouse,clicked,1";
|
||||||
|
source: "event2";
|
||||||
|
action: SIGNAL_EMIT "elfe,action,click" "";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
group {
|
||||||
|
name: "elfe/winlist/window";
|
||||||
|
parts {
|
||||||
|
images {
|
||||||
|
image: "app_text_bg.png" COMP;
|
||||||
|
image: "thumbnail_bg.png" COMP;
|
||||||
|
}
|
||||||
|
|
||||||
|
part {
|
||||||
|
name: "clip";
|
||||||
|
type: RECT;
|
||||||
|
description {
|
||||||
|
state: "default" 0.0;
|
||||||
|
color: 255 255 255 255;
|
||||||
|
}
|
||||||
|
description {
|
||||||
|
state: "active" 0.0;
|
||||||
|
color: 255 255 255 100;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
part {
|
||||||
|
name: "text.bg";
|
||||||
|
clip_to: "clip";
|
||||||
|
description {
|
||||||
|
rel1.to: "elfe.text.label";
|
||||||
|
rel1.offset: -2 -1;
|
||||||
|
rel2.to: "elfe.text.label";
|
||||||
|
rel2.offset: 1 -1;
|
||||||
|
image.normal: "app_text_bg.png";
|
||||||
|
image.border: 4 4 4 4;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
part {
|
||||||
|
name: "elfe.text.label";
|
||||||
|
type: TEXT;
|
||||||
|
effect: SHADOW;
|
||||||
|
//type: RECT;
|
||||||
|
clip_to: "clip";
|
||||||
|
scale: 1;
|
||||||
|
description {
|
||||||
|
min: 10 10;
|
||||||
|
state: "default" 0.0;
|
||||||
|
rel1.relative: 0 1;
|
||||||
|
rel1.offset: 0 16;
|
||||||
|
rel1.to_y: "content.bg";
|
||||||
|
rel2.relative: 1 1;
|
||||||
|
rel2.to_y: "content.bg";
|
||||||
|
rel2.offset: 0 16;
|
||||||
|
fixed: 1 1;
|
||||||
|
color3: 0 0 0 200;
|
||||||
|
color: 220 220 220 200;
|
||||||
|
align: 0.5 1;
|
||||||
|
text {
|
||||||
|
font: "Sans";
|
||||||
|
size: 10;
|
||||||
|
min: 0 1;
|
||||||
|
max: 1 1;
|
||||||
|
text: "Mozilla Firefox";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
part {
|
||||||
|
name: "content.bg";
|
||||||
|
type: IMAGE;
|
||||||
|
clip_to: "clip";
|
||||||
|
description {
|
||||||
|
state: "default" 0.0;
|
||||||
|
rel1.to: "elfe.swallow.content";
|
||||||
|
rel1.offset: -5 -7;
|
||||||
|
rel2.to: "elfe.swallow.content";
|
||||||
|
rel2.offset: 4 6;
|
||||||
|
image.normal: "thumbnail_bg.png";
|
||||||
|
image.border: 10 10 10 10;
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
part {
|
||||||
|
name: "elfe.swallow.content";
|
||||||
|
type: SWALLOW;
|
||||||
|
clip_to: "clip";
|
||||||
|
description {
|
||||||
|
state: "default" 0.0;
|
||||||
|
}
|
||||||
|
program {
|
||||||
|
name: "bt_click";
|
||||||
|
signal: "mouse,clicked,1";
|
||||||
|
source: "elfe.swallow.content";
|
||||||
|
action: SIGNAL_EMIT "elfe,action,click" "";
|
||||||
|
}
|
||||||
|
program {
|
||||||
|
name: "bt_down";
|
||||||
|
signal: "mouse,down,1";
|
||||||
|
source: "elfe.swallow.content";
|
||||||
|
action: STATE_SET "active" 0.0;
|
||||||
|
transition: ACCELERATE 0.5;
|
||||||
|
target: "clip";
|
||||||
|
}
|
||||||
|
program {
|
||||||
|
name: "bt_up";
|
||||||
|
signal: "mouse,up,1";
|
||||||
|
source: "elfe.swallow.content";
|
||||||
|
action: STATE_SET "default" 0.0;
|
||||||
|
transition: ACCELERATE 0.5;
|
||||||
|
target: "clip";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
ICON_SET("application-default-icon", "icon/application-default");
|
ICON_SET("application-default-icon", "icon/application-default");
|
||||||
ICON("icon_application.png", "icon/applications");
|
ICON("icon_application.png", "icon/applications");
|
||||||
ICON("icon_widgets.png", "icon/widgets");
|
ICON("icon_widgets.png", "icon/widgets");
|
||||||
|
|
Binary file not shown.
After Width: | Height: | Size: 1.1 KiB |
Binary file not shown.
After Width: | Height: | Size: 1.1 KiB |
|
@ -7,10 +7,7 @@
|
||||||
#include "utils.h"
|
#include "utils.h"
|
||||||
#include "dock.h"
|
#include "dock.h"
|
||||||
#include "allapps.h"
|
#include "allapps.h"
|
||||||
|
#include "main.h"
|
||||||
#define ELFE_DESKTOP_NUM 5
|
|
||||||
#define ELFE_DESKTOP_PADDING_W 10
|
|
||||||
#define ELFE_DESKTOP_PADDING_H 10
|
|
||||||
|
|
||||||
typedef struct _Elfe_Desktop Elfe_Desktop;
|
typedef struct _Elfe_Desktop Elfe_Desktop;
|
||||||
|
|
||||||
|
|
45
src/main.c
45
src/main.c
|
@ -1,4 +1,6 @@
|
||||||
#include <e.h>
|
#include <e.h>
|
||||||
|
#include <Elementary.h>
|
||||||
|
|
||||||
#include "main.h"
|
#include "main.h"
|
||||||
#include "elfe_config.h"
|
#include "elfe_config.h"
|
||||||
#include "allapps.h"
|
#include "allapps.h"
|
||||||
|
@ -10,23 +12,10 @@
|
||||||
#define ELFE_HOME_WIN_TYPE 0xE0b0102f
|
#define ELFE_HOME_WIN_TYPE 0xE0b0102f
|
||||||
|
|
||||||
/* local structures */
|
/* local structures */
|
||||||
typedef struct _Elfe_Home_Win Elfe_Home_Win;
|
|
||||||
typedef struct _Elfe_Home_Exec Elfe_Home_Exec;
|
typedef struct _Elfe_Home_Exec Elfe_Home_Exec;
|
||||||
|
|
||||||
struct _Elfe_Home_Win
|
Elfe_Home_Win *hwin;
|
||||||
{
|
Elm_Theme *elfe_theme;
|
||||||
E_Object e_obj_inherit;
|
|
||||||
|
|
||||||
E_Win *win;
|
|
||||||
Evas_Object *o_bg;
|
|
||||||
Evas_Object *layout;
|
|
||||||
Evas_Object *desktop;
|
|
||||||
|
|
||||||
E_Zone *zone;
|
|
||||||
|
|
||||||
};
|
|
||||||
|
|
||||||
static Elfe_Home_Win *hwin;
|
|
||||||
|
|
||||||
/* local function prototypes */
|
/* local function prototypes */
|
||||||
static void _elfe_home_win_new(E_Zone *zone);
|
static void _elfe_home_win_new(E_Zone *zone);
|
||||||
|
@ -53,7 +42,7 @@ e_modapi_init(E_Module *m)
|
||||||
|
|
||||||
if (!elfe_home_config_init(m)) return NULL;
|
if (!elfe_home_config_init(m)) return NULL;
|
||||||
|
|
||||||
e_winilist_init();
|
elfe_winlist_init();
|
||||||
|
|
||||||
hdls =
|
hdls =
|
||||||
eina_list_append(hdls,
|
eina_list_append(hdls,
|
||||||
|
@ -91,7 +80,7 @@ e_modapi_shutdown(E_Module *m __UNUSED__)
|
||||||
Ecore_Event_Handler *hdl;
|
Ecore_Event_Handler *hdl;
|
||||||
Elfe_Home_Win *hwin;
|
Elfe_Home_Win *hwin;
|
||||||
|
|
||||||
e_winilist_shutdown();
|
elfe_winlist_shutdown();
|
||||||
|
|
||||||
EINA_LIST_FREE(hwins, hwin)
|
EINA_LIST_FREE(hwins, hwin)
|
||||||
e_object_del(E_OBJECT(hwin));
|
e_object_del(E_OBJECT(hwin));
|
||||||
|
@ -123,7 +112,7 @@ _elfe_home_win_new(E_Zone *zone)
|
||||||
E_Desk *desk;
|
E_Desk *desk;
|
||||||
char buf[PATH_MAX];
|
char buf[PATH_MAX];
|
||||||
const char *bgfile;
|
const char *bgfile;
|
||||||
Elm_Theme *theme;
|
|
||||||
Evas_Object *o_edje;
|
Evas_Object *o_edje;
|
||||||
const char *file;
|
const char *file;
|
||||||
|
|
||||||
|
@ -184,10 +173,10 @@ _elfe_home_win_new(E_Zone *zone)
|
||||||
}
|
}
|
||||||
o_edje = elm_layout_edje_get(hwin->layout);
|
o_edje = elm_layout_edje_get(hwin->layout);
|
||||||
|
|
||||||
theme = elm_theme_new();
|
elfe_theme = elm_theme_new();
|
||||||
/* Use specific module theme as elm theme overlay */
|
/* Use specific module theme as elm theme overlay */
|
||||||
elm_theme_overlay_add(theme, buf);
|
elm_theme_overlay_add(elfe_theme, buf);
|
||||||
elm_object_theme_set(hwin->layout, theme);
|
elm_object_theme_set(hwin->layout, elfe_theme);
|
||||||
|
|
||||||
hwin->desktop = elfe_desktop_add(hwin->layout, hwin->zone);
|
hwin->desktop = elfe_desktop_add(hwin->layout, hwin->zone);
|
||||||
elm_layout_content_set(hwin->layout, "elfe.swallow.desktop", hwin->desktop);
|
elm_layout_content_set(hwin->layout, "elfe.swallow.desktop", hwin->desktop);
|
||||||
|
@ -201,6 +190,8 @@ _elfe_home_win_new(E_Zone *zone)
|
||||||
if (hwin->win->evas_win)
|
if (hwin->win->evas_win)
|
||||||
e_drop_xdnd_register_set(hwin->win->evas_win, EINA_TRUE);
|
e_drop_xdnd_register_set(hwin->win->evas_win, EINA_TRUE);
|
||||||
|
|
||||||
|
elfe_home_winlist_show(EINA_TRUE);
|
||||||
|
|
||||||
hwins = eina_list_append(hwins, hwin);
|
hwins = eina_list_append(hwins, hwin);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -249,3 +240,15 @@ _elfe_home_cb_bg_change(void *data __UNUSED__, int type, void *event __UNUSED__)
|
||||||
|
|
||||||
return ECORE_CALLBACK_PASS_ON;
|
return ECORE_CALLBACK_PASS_ON;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
elfe_home_winlist_show(Eina_Bool show)
|
||||||
|
{
|
||||||
|
Evas_Object *o_edje;
|
||||||
|
|
||||||
|
o_edje = elm_layout_edje_get(hwin->layout);
|
||||||
|
if (show)
|
||||||
|
edje_object_signal_emit(o_edje, "elfe,desktop,show", "elfe");
|
||||||
|
else
|
||||||
|
edje_object_signal_emit(o_edje, "elfe,desktop,hide", "elfe");
|
||||||
|
}
|
||||||
|
|
23
src/main.h
23
src/main.h
|
@ -1,12 +1,35 @@
|
||||||
#ifndef E_MOD_MAIN_H
|
#ifndef E_MOD_MAIN_H
|
||||||
#define E_MOD_MAIN_H
|
#define E_MOD_MAIN_H
|
||||||
|
|
||||||
|
#define ELFE_DESKTOP_NUM 5
|
||||||
|
#define ELFE_DESKTOP_PADDING_W 10
|
||||||
|
#define ELFE_DESKTOP_PADDING_H 10
|
||||||
|
|
||||||
|
typedef struct _Elfe_Home_Win Elfe_Home_Win;
|
||||||
|
|
||||||
|
struct _Elfe_Home_Win
|
||||||
|
{
|
||||||
|
E_Object e_obj_inherit;
|
||||||
|
|
||||||
|
E_Win *win;
|
||||||
|
Evas_Object *o_bg;
|
||||||
|
Evas_Object *layout;
|
||||||
|
Evas_Object *desktop;
|
||||||
|
|
||||||
|
E_Zone *zone;
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
EAPI extern E_Module_Api e_modapi;
|
EAPI extern E_Module_Api e_modapi;
|
||||||
|
EAPI extern Elfe_Home_Win *hwin;
|
||||||
|
EAPI extern Elm_Theme *elfe_theme;
|
||||||
|
|
||||||
EAPI void *e_modapi_init(E_Module *m);
|
EAPI void *e_modapi_init(E_Module *m);
|
||||||
EAPI int e_modapi_shutdown(E_Module *m);
|
EAPI int e_modapi_shutdown(E_Module *m);
|
||||||
EAPI int e_modapi_save(E_Module *m);
|
EAPI int e_modapi_save(E_Module *m);
|
||||||
|
|
||||||
void elfe_home_win_cfg_update(void);
|
void elfe_home_win_cfg_update(void);
|
||||||
|
void elfe_home_winlist_show(Eina_Bool show);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
1090
src/winlist.c
1090
src/winlist.c
File diff suppressed because it is too large
Load Diff
|
@ -1,13 +1,9 @@
|
||||||
#ifndef E_WINILIST_H
|
#ifndef _ELFE_WINLIST_H_
|
||||||
#define E_WINILIST_H
|
#define _ELFE_WINLIST_H_
|
||||||
|
|
||||||
EAPI int e_winilist_init(void);
|
int elfe_winlist_init(void);
|
||||||
EAPI int e_winilist_shutdown(void);
|
int elfe_winlist_shutdown(void);
|
||||||
|
|
||||||
EAPI Evas_Object *e_winilist_add(Evas_Object *parent);
|
Evas_Object *e_winilist_add(Evas_Object *parent);
|
||||||
EAPI void e_winilist_border_select_callback_set(Evas_Object *obj, void (*func) (void *data, E_Border *bd), void *data);
|
|
||||||
EAPI void e_winilist_special_append(Evas_Object *obj, Evas_Object *icon, const char *label, void (*func) (void *data1, void *data2), void *data1, void *data2);
|
#endif /* _ELFE_WINLIST_H_ */
|
||||||
EAPI void e_winilist_special_prepend(Evas_Object *obj, Evas_Object *icon, const char *label, void (*func) (void *data1, void *data2), void *data1, void *data2);
|
|
||||||
EAPI void e_winilist_optimial_size_get(Evas_Object *obj, Evas_Coord *w, Evas_Coord *h);
|
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
Loading…
Reference in New Issue