Compare commits

...

90 Commits

Author SHA1 Message Date
Mike Blumenkrantz aebda73e19 set pass_events on client mirrors when beginning zoom hide 4 years ago
Mike Blumenkrantz 53c83301c8 unset client list from zoom object when beginning hide 4 years ago
Mike Blumenkrantz a663cccaf9 grab input during pip editing 5 years ago
Mike Blumenkrantz aafb9954ba remove sandbox base infra 5 years ago
Mike Blumenkrantz 054b72912b add parsing for X-Gadget-Orientations in sandboxed gadgets 5 years ago
Mike Blumenkrantz 1a2d94810a force sandbox gadget popup sizing immediately 5 years ago
Mike Blumenkrantz e46924b357 fix sandbox gadget popup size hints 5 years ago
Mike Blumenkrantz 528e25e0bb send SIGSTOP to sandbox gadgets on load if RUNNER_DEBUG env var is set 5 years ago
Mike Blumenkrantz e2b0c045b5 require efl-wl 1.20.99 5 years ago
Mike Blumenkrantz fb2b5c6772 handle weight hints on sandbox gadget popup surfaces 5 years ago
Mike Blumenkrantz 74bbda4657 add support for opening uris from sandboxed gadgets 5 years ago
Mike Blumenkrantz 2f74316f7d destroy runner child popups when underlying surface is deleted 5 years ago
Mike Blumenkrantz ccebc776aa set all windows to borderless in sandbox loader 5 years ago
Mike Blumenkrantz 036cc63fd9 bump efl-wl req 5 years ago
Mike Blumenkrantz 1cdf98e934 fix perms on meson-installed edj 5 years ago
Mike Blumenkrantz f2c7052be9 don't double grab input on runner popups 5 years ago
Mike Blumenkrantz 67f59ab01e fix runner gadget del callbacks 5 years ago
Mike Blumenkrantz 0b328cb10d feed mouse up to runner gadgets when creating child popup 5 years ago
Mike Blumenkrantz a4c57fba2d use separate pid namespaces when forking runner gadgets 5 years ago
Mike Blumenkrantz b751d27463 delete runner popup content on content hide 5 years ago
Mike Blumenkrantz d32e5de81b use new menu_show_object action for start gadget 5 years ago
Mike Blumenkrantz e352dc07d1 test gadget: delete popup window when main window is clicked while visible 5 years ago
Mike Blumenkrantz a0d72c5d91 add sandbox gadget type for runner gadgets 5 years ago
Mike Blumenkrantz 62128d19d8 set aspect on start gadget window, not layout 5 years ago
Mike Blumenkrantz 1f651fbfe8 SIGTERM sandboxed gadgets on config delete 5 years ago
Mike Blumenkrantz 0ef6c85982 handle popups and child windows in runner gadget 5 years ago
Mike Blumenkrantz b420b4af60 don't disable ds fade object if it doesn't exist 5 years ago
Mike Blumenkrantz 67811b1f3a remove option for disabling events on runner gadgets 5 years ago
Mike Blumenkrantz 26c589e745 support fully sandboxed sub-gadgets in runner gadget 5 years ago
Mike Blumenkrantz f1fd2a827a meson formatting 5 years ago
Mike Blumenkrantz 39c65797de set minmax on runner gadgets 5 years ago
Mike Blumenkrantz 49ba605d48 kill runner subprocess on gadget deletion 5 years ago
Mike Blumenkrantz cdaf50cac3 add gadget test 5 years ago
Mike Blumenkrantz 4945d1b257 fix runner entry focus 5 years ago
Mike Blumenkrantz 5807ac7b89 add proto 5 years ago
Mike Blumenkrantz 8ffae277b3 set aspect on runner gadgets 5 years ago
Mike Blumenkrantz 23ef468a29 escape runner cmdline strings 5 years ago
Mike Blumenkrantz 68467df44d meson 5 years ago
Mike Blumenkrantz e63871d929 generate fewer files 5 years ago
Mike Blumenkrantz 4de6a6ef34 temp force events on in runner config 5 years ago
Mike Blumenkrantz ca2e4eb738 add runner gadget for testing 5 years ago
Mike Blumenkrantz 3623f8a7e0 bump dep version, use internal efx 5 years ago
Mike Blumenkrantz d8c3317d3c set pass_events on move/resize objects 5 years ago
Mike Blumenkrantz 364c6baefb /EAPI/E_API/ 7 years ago
Mike Blumenkrantz 35b323adfd remove maximize from e21 builds: present in main 7 years ago
Mike Blumenkrantz 6b4bd60895 1.1.0 NEWS updates 7 years ago
Mike Blumenkrantz 76c0e98bf9 1.1.0 release 7 years ago
Mike Blumenkrantz 790d62c67d require E20+ 7 years ago
Mike Blumenkrantz c2a1464d1e switch bzip2->xz in dist 7 years ago
Mike Blumenkrantz 289f356c28 move to single makefile build 7 years ago
Mike Blumenkrantz 6a21290dcd add handling for maintaining sticky windows with superkey 7 years ago
Mike Blumenkrantz 26bf74f991 add multipress functionality for superkey 7 years ago
Mike Blumenkrantz 29a28405b9 add Super Ultimate Window Management binding under Desksanity actions 7 years ago
Mike Blumenkrantz c82393c2a4 enable pip edit mode when creating a pip 7 years ago
Mike Blumenkrantz 7c90ff8136 make pip move/resize while clipped more accurate based on clip geometry 7 years ago
Mike Blumenkrantz 267e84ca6d remove pip delete callback during pip free 7 years ago
Mike Blumenkrantz 24d4459e61 force sizing of zoom effect tables before adding to layout 7 years ago
Mike Blumenkrantz 3664906fd3 disable maximize effect for x11 csd windows 7 years ago
Mike Blumenkrantz 546346d8bc use bring_in for zoom keyboard navigation 7 years ago
Mike Blumenkrantz 2d2ce8c298 improve keyboard navigation for zoom effect 7 years ago
Mike Blumenkrantz d0e3824adf redo "active" signalling for zoom effect to be more easily themable 7 years ago
Mike Blumenkrantz ba54cf5497 use color3 for setting OUTLINE color on zoom text 7 years ago
Mike Blumenkrantz e98d5390de make zoom effect more subtle when indicating which window is "active" 7 years ago
Mike Blumenkrantz 233cd9aac1 don't enable map for zoom client effect 7 years ago
Mike Blumenkrantz 32421e0ca5 make zoom focus rect more translucent when active 7 years ago
Mike Blumenkrantz 265a355693 clip zoom client focus rect to clipper 7 years ago
Mike Blumenkrantz 24f89c2361 fix zoom focus rect sizing to be even on all sides 7 years ago
Mike Blumenkrantz 18f1fea269 add scroller indicator for zoom effect 7 years ago
Mike Blumenkrantz a8e8bb1a15 use correct int size for ds effect iterating 7 years ago
Mike Blumenkrantz 568ee43e6f reorder ds client iterator filter to catch override clients before ec->desk deref 7 years ago
Mike Blumenkrantz b88c9bee34 fix zoom key actions 7 years ago
Mike Blumenkrantz 9ffa7c119a show clients before performing desk flip 8 years ago
Mike Blumenkrantz 09f508c2ed maybe fix zoom animation geometries? 8 years ago
Mike Blumenkrantz e86fb3e610 ignore/clean 'compile' file 8 years ago
Mike Blumenkrantz 2662081d22 more api updates 8 years ago
Mike Blumenkrantz e1ae86f80a update to latest api changes 8 years ago
Mike Blumenkrantz 95b961304e disallow pip manage action if no pips exist 8 years ago
Mike Blumenkrantz b2bd0365cd and null the clip pointer because this module is way too smart to crash 8 years ago
Mike Blumenkrantz aec23ab918 make pip crop reset if user shift+clicks without moving 8 years ago
Mike Blumenkrantz b0793df659 update news, bump version 8 years ago
Mike Blumenkrantz 4e991a1d92 bump e version req 8 years ago
Mike Blumenkrantz b7aef3ec51 fix multiscreen zoom and current desks zoom 8 years ago
Mike Blumenkrantz 3165448d4c fix input regions on shaded clients after desk flip 8 years ago
Mike Blumenkrantz 37f6636696 raise client zoom obj on mouse in 8 years ago
Mike Blumenkrantz b38237ae6a more elm conversions 8 years ago
Mike Blumenkrantz f7d0e9f50d fix edje warnings 8 years ago
Mike Blumenkrantz eafb98e32a zsq 8 years ago
Mike Blumenkrantz 14ebb8eecc remove bad comp usage in pip 8 years ago
Mike Blumenkrantz 0371ed95a2 convert zoom to elm widgets 8 years ago
Mike Blumenkrantz 1a63585b60 e_comp_get() -> e_comp 8 years ago
  1. 3
      .gitignore
  2. 18
      Makefile.am
  3. 71
      NEWS
  4. 77
      action_route.xml
  5. 29
      configure.ac
  6. 38
      e-gadget.xml
  7. 504
      e-module-desksanity.edc
  8. BIN
      e-module-desksanity.edj
  9. BIN
      epic-e-256.png
  10. 182
      loader/start.c
  11. 5
      loader/start.desktop.in
  12. 121
      loader/test.c
  13. 4
      loader/test.desktop.in
  14. 182
      meson.build
  15. 6
      meson_modules.sh
  16. 0
      module.desktop
  17. 27
      src/Makefile.am
  18. 24
      src/Makefile.mk
  19. 83
      src/desksanity.c
  20. 7
      src/ds_config.c
  21. 219
      src/e_mod_main.c
  22. 8
      src/e_mod_main.h
  23. 30
      src/magnify.c
  24. 20
      src/maximize.c
  25. 99
      src/moveresize.c
  26. 226
      src/pip.c
  27. 237
      src/zoom.c
  28. BIN
      win_shadow.png

3
.gitignore vendored

@ -10,6 +10,7 @@ Makefile
Makefile.in
aclocal.m4
autom4te.cache/
compile
config.guess
config.h
config.h.in
@ -20,7 +21,6 @@ config.sub
configure
configure.ac.orig
depcomp
e-module-desksanity.edj
e_modules-desksanity.spec
install-sh
libtool
@ -28,7 +28,6 @@ ltmain.sh
*.m4
missing
mkinstalldirs
module.desktop
po/Makefile
po/Makefile.in
po/Makefile.in.in

@ -1,9 +1,9 @@
ACLOCAL_AMFLAGS = -I m4
MAINTAINERCLEANFILES = Makefile.in aclocal.m4 config.guess config.h.in \
config.sub configure depcomp install-sh ltmain.sh \
missing module.desktop config.rpath mkinstalldirs
AUTOMAKE_OPTIONS = subdir-objects
SUBDIRS = src
MAINTAINERCLEANFILES = Makefile.in aclocal.m4 config.guess config.h.in \
config.sub configure compile depcomp install-sh ltmain.sh \
missing config.rpath mkinstalldirs
#if HAVE_PO
@ -18,13 +18,15 @@ EXTRA_DIST = module.desktop.in \
e_modules-desksanity.spec.in \
e-module-desksanity.edc \
epic-e-256.png \
win_shadow.png
win_shadow.png \
glow_bottom.png \
glow_top.png
e-module-desksanity.edj: e-module-desksanity.edc
$(EDJE_CC) -id $(top_srcdir) $< $@
include src/Makefile.mk
clean-local:
rm -rf *.edj module.desktop e_modules-desksanity.spec *~
rm rf e_modules-desksanity.spec *~
uninstall-local:
rm -rf $(DESTDIR)$(module_dir)/$(PACKAGE)

71
NEWS

@ -0,0 +1,71 @@
Release 1.1.0
--------------------
Highlights:
* Convert to Elementary widgets
* Greatly improve PiP UX
* Tweaks to Zoom effect
* Superkey binding for managing window focus
Mike Blumenkrantz (44):
e_comp_get() -> e_comp
convert zoom to elm widgets
remove bad comp usage in pip
zsq
fix edje warnings
more elm conversions
bump e version req
make pip crop reset if user shift+clicks without moving
and null the clip pointer because this module is way too smart to crash
disallow pip manage action if no pips exist
update to latest api changes
more api updates
ignore/clean 'compile' file
maybe fix zoom animation geometries?
show clients before performing desk flip
fix zoom key actions
add scroller indicator for zoom effect
fix zoom focus rect sizing to be even on all sides
clip zoom client focus rect to clipper
make zoom focus rect more translucent when active
don't enable map for zoom client effect
make zoom effect more subtle when indicating which window is "active"
use color3 for setting OUTLINE color on zoom text
redo "active" signalling for zoom effect to be more easily themable
improve keyboard navigation for zoom effect
use bring_in for zoom keyboard navigation
disable maximize effect for x11 csd windows
force sizing of zoom effect tables before adding to layout
remove pip delete callback during pip free
make pip move/resize while clipped more accurate based on clip geometry
enable pip edit mode when creating a pip
add Super Ultimate Window Management binding under Desksanity actions
add multipress functionality for superkey
add handling for maintaining sticky windows with superkey
move to single makefile build
require E20+
Release 1.0.3
--------------------
Mike Blumenkrantz (1):
use correct int size for ds effect iterating
Release 1.0.2
--------------------
Mike Blumenkrantz (1):
reorder ds client iterator filter to catch override clients before ec->desk deref
Release 1.0.1
--------------------
Mike Blumenkrantz (3):
raise client zoom obj on mouse in
fix input regions on shaded clients after desk flip
fix multiscreen zoom and current desks zoom

@ -0,0 +1,77 @@
<protocol name="zwp_action_route">
<interface name="action_route" version="1">
<enum name="mode">
<description summary="types of state on the surface">
</description>
<entry name="focus_shared" value="1" summary="Activatable by any surface if its wl_client has focus">
</entry>
<entry name="focus_topmost" value="2" summary="Activatable by topmost surface with focus">
<description summary="Restricts activation to only the top-most client"/>
</entry>
<entry name="exclusive" value="3" summary="Activatable by one surface at any time">
<description summary="Allows activation for exactly one client at all times"/>
</entry>
</enum>
<enum name="modifiers">
<entry name="shift" value="1"></entry>
<entry name="control" value="2"></entry>
<entry name="alt" value="4"></entry>
<entry name="win" value="8"></entry>
<entry name="altgr" value="16"></entry>
</enum>
<request name="bind_action">
<description summary="Request a new grab for a key press">
</description>
<arg name="id" type="new_id" interface="action_route_bind"/>
<arg name="action" type="string"/>
</request>
<request name="grab_key">
<description summary="Request a new grab for a key press">
</description>
<arg name="id" type="new_id" interface="action_route_key_grab"/>
<arg name="surface" type="object" interface="wl_surface"/>
<arg name="key" type="string"/>
<arg name="mode" type="uint"/>
<arg name="modifiers" type="uint"/>
<arg name="action" type="string"/>
<arg name="params" type="string" allow-null="true"/>
</request>
</interface>
<interface name="action_route_bind" version="1">
<enum name="state">
<entry name="Rejected" value="0"></entry>
<entry name="Active" value="1"></entry>
<entry name="Queued" value="2"></entry>
</enum>
<event name="status">
<description summary="Status update on a bind request"></description>
<arg name="state" type="uint"/>
</event>
<request name="activate">
<description summary="Activate a bind"/>
<arg name="params" type="string" allow-null="true"/>
</request>
<request name="destroy" type="destructor">
<description summary="Destroy a requested bind">
</description>
</request>
<event name="end">
<description summary="The bind has completed execution"/>
</event>
</interface>
<interface name="action_route_key_grab" version="1">
<enum name="state">
<entry name="Rejected" value="0"></entry>
<entry name="Active" value="1"></entry>
<entry name="Queued" value="2"></entry>
</enum>
<event name="status">
<description summary="Status update on a grab request"></description>
<arg name="state" type="uint"/>
</event>
<request name="destroy" type="destructor">
<description summary="Destroy a requested grab">
</description>
</request>
</interface>
</protocol>

@ -1,4 +1,4 @@
AC_INIT(desksanity, 1.0, zmike@enlightenment.org)
AC_INIT(desksanity, 1.1.0, zmike@enlightenment.org)
AC_CONFIG_MACRO_DIR([m4])
AC_PREREQ(2.52)
AC_CONFIG_SRCDIR(configure.ac)
@ -6,7 +6,7 @@ AC_CANONICAL_BUILD
AC_CANONICAL_HOST
AC_ISC_POSIX
AM_INIT_AUTOMAKE([1.8 dist-bzip2])
AM_INIT_AUTOMAKE([1.8 dist-xz])
AM_CONFIG_HEADER(config.h)
m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
@ -30,7 +30,15 @@ AC_PROG_LIBTOOL
#])
#AC_SUBST(LTLIBINTL)
PKG_CHECK_MODULES([E], [efx enlightenment > 0.18.99])
PKG_CHECK_EXISTS([efl-wl], [build_runner="yes"], [build_runner="no"])
if test "x$build_runner" = "xyes" ; then
runner="efl-wl"
AC_DEFINE_UNQUOTED(HAVE_RUNNER, 1, "have runner deps")
fi
AM_CONDITIONAL([BUILD_RUNNER], [test "x${build_runner}" = "xyes"])
PKG_CHECK_MODULES([E], [enlightenment >= 0.21.0 $runner])
release=$(pkg-config --variable=release enlightenment)
MODULE_ARCH="$host_os-$host_cpu-$release"
AC_SUBST(MODULE_ARCH)
@ -39,24 +47,9 @@ AC_DEFINE_UNQUOTED(MODULE_ARCH, "$MODULE_ARCH", "Module architecture")
module_dir="$(pkg-config --variable=modules enlightenment)"
AC_SUBST(module_dir)
datadir="$module_dir/desksanity"
# Find edje_cc
AC_ARG_WITH(edje-cc,
AC_HELP_STRING([--with-edje-cc=PATH], [specify a specific path to edje_cc]),
[
v=$withval;
EDJE_CC=$v
],[
EDJE_CC=$(pkg-config --variable=prefix edje)/bin/edje_cc
]
)
AC_SUBST(EDJE_CC)
AC_MSG_CHECKING([Which edje_cc to use])
AC_MSG_RESULT(${EDJE_CC})
AC_OUTPUT([
Makefile
src/Makefile
module.desktop
e_modules-desksanity.spec
], [
])

@ -0,0 +1,38 @@
<protocol name="e_gadget">
<interface name="e_gadget" version="1">
<enum name="orient">
<entry name="none" value="0"/>
<entry name="horizontal" value="1"/>
<entry name="vertical" value="2"/>
</enum>
<enum name="gravity">
<entry name="none" value="0"/>
<entry name="left" value="1"/>
<entry name="right" value="2"/>
<entry name="top" value="3"/>
<entry name="bottom" value="4"/>
<entry name="center" value="5"/>
</enum>
<enum name="anchor" bitfield="true">
<entry name="none" value="0"/>
<entry name="left" value="1"/>
<entry name="right" value="2"/>
<entry name="top" value="4"/>
<entry name="bottom" value="8"/>
</enum>
<event name="gadget_anchor">
<arg name="anchor" type="uint" enum="anchor"/>
</event>
<event name="gadget_orient">
<arg name="orient" type="uint" enum="orient"/>
</event>
<event name="gadget_gravity">
<arg name="gravity" type="uint" enum="gravity"/>
</event>
<request name="open_uri">
<arg name="uri" type="string"/>
</request>
</interface>
</protocol>

@ -1,504 +0,0 @@
collections {
group { name: "icon";
images.image: "epic-e-256.png" COMP;
parts {
part { name: "icon"; mouse_events: 0;
description { state: "default";
aspect_preference: BOTH;
image.normal: "epic-e-256.png";
}
}
}
}
group { name: "e/modules/desksanity/moveresize";
parts {
part { name: "outline"; type: TEXT; mouse_events: 0;
effect: OUTLINE;
scale: 1;
description { state: "default" 0.0;
rel1.to: "e.text";
rel1.offset: -1 -1;
rel2.to: "e.text";
color: 0 0 0 255;
color2: 0 0 0 255;
color3: 0 0 0 255;
text { font: "Sans"; size: 16;
text_source: "e.text";
min: 1 1;
ellipsis: -1;
}
}
}
part { name: "e.text"; type: TEXT; mouse_events: 0;
effect: GLOW;
scale: 1;
description { state: "default" 0.0;
color: 51 153 255 255;
color2: 51 153 255 24;
color3: 51 153 255 18;
text { font: "Sans"; size: 16;
min: 1 1;
ellipsis: -1;
}
}
}
}
}
group { name: "e/modules/desksanity/zoom/base"; program_source: "e";
parts {
rect { "drag_clip"; nomouse;
desc { hid; }
desc { "vis";
link.base: "e,state,dragging";
}
}
rect { "zoomt"; clip: "drag_clip"; nomouse;
desc {
min: 0 4;
max: -1 4;
rel2.relative: 1 0;
color: 51 153 255 0;
hid;
}
desc { "enable"; inherit: "default";
color: 51 153 255 200;
vis;
}
desc { "anim"; inherit: "enable";
rel1.relative: 0.5 0.5;
rel2.relative: 0.5 0.5;
}
}
rect { "zooml"; clip: "drag_clip"; nomouse;
desc {
min: 4 0;
max: 4 -1;
rel2.relative: 0 1;
color: 51 153 255 0;
hid;
}
desc { "enable"; inherit: "default";
color: 51 153 255 200;
vis;
}
desc { "anim"; inherit: "enable";
rel1.relative: 0.5 0.5;
rel2.relative: 0.5 0.5;
}
}
rect { "zoomr"; clip: "drag_clip"; nomouse;
desc {
min: 4 0;
max: 4 -1;
rel1.relative: 1 0;
color: 51 153 255 0;
hid;
}
desc { "enable"; inherit: "default";
color: 51 153 255 200;
vis;
}
desc { "anim"; inherit: "enable";
rel1.relative: 0.5 0.5;
rel2.relative: 0.5 0.5;
}
}
rect { "zoomb"; clip: "drag_clip"; nomouse;
desc {
min: 0 4;
max: -1 4;;
rel1.relative: 0 1;
color: 51 153 255 0;
hid;
}
desc { "enable"; inherit: "default";
color: 51 153 255 200;
vis;
}
desc { "anim"; inherit: "enable";
rel1.relative: 0.5 0.5;
rel2.relative: 0.5 0.5;
}
}
program { signal: "e,state,current";
after: "drag_start";
}
program { "drag_start"; filter: "drag_clip" "vis";
signal: "mouse,in"; source: "events";
action: STATE_SET "enable";
transition: LINEAR 0.1;
targets: "zoomt" "zooml" "zoomr" "zoomb";
after: "drag_anim";
}
program { filter: "drag_clip" "vis";
signal: "mouse,out"; source: "events";
action: STATE_SET "default";
transition: ACCEL 0.1;
targets: "zoomt" "zooml" "zoomr" "zoomb";
}
program { "drag_anim";
action: STATE_SET "anim";
transition: ACCEL 0.8;
targets: "zoomt" "zooml" "zoomr" "zoomb";
after: "drag_anim2";
}
program { "drag_anim2";
action: STATE_SET "default";
targets: "zoomt" "zooml" "zoomr" "zoomb";
after: "drag_anim";
}
swallow { "e.swallow.background"; clip: "clip";
}
rect { "fader";
desc {
color: 0 0 0 0;
link.base: "e,state,dragging";
link.transition: LINEAR 0.3;
link.base: "e,state,inactive";
link.transition: LINEAR 0.3;
link.after: "fade_post";
}
desc { "fade";
color: 0 0 0 192;
link.base: "e,state,active";
link.transition: LINEAR 0.3;
}
program { "fade_post";
action: SIGNAL_EMIT "e,action,done" "e";
}
}
rect { "clip";
desc { hid; color: 255 255 255 0;
link.base: "e,state,dragging";
link.transition: LINEAR 0.3;
link.base: "e,state,inactive";
link.transition: LINEAR 0.3;
}
desc { "active";
link.base: "e,state,active";
link.transition: LINEAR 0.3;
}
}
swallow { "e.swallow.layout"; clip: "clip"; }
program { signal: "e,state,inactive";
action: SIGNAL_EMIT "e,state,hiding" "e";
}
rect { "events"; repeat;
desc { color: 0 0 0 0; }
}
}
}
group { name: "e/modules/desksanity/zoom/scrollframe";
parts {
rect { "clipper"; nomouse;
desc {
rel1.to: "e.swallow.content";
rel2.to: "e.swallow.content";
}
}
swallow { "e.swallow.content";
clip: "clipper";
}
}
}
group { name: "e/modules/desksanity/zoom/client"; nomouse;
images.image: "win_shadow.png" COMP;
script {
public message(Msg_Type:type, id, ...) {
if (type == MSG_INT_SET) {
/* client diff geom[4] */
new x, y, w, h;
x = getarg(2);
y = getarg(3);
w = getarg(4);
h = getarg(5);
custom_state(PART:"spacer", "default", 0.0);
set_state_val(PART:"spacer", STATE_REL1_OFFSET, x, y);
set_state_val(PART:"spacer", STATE_REL2_OFFSET, w, h);
set_state(PART:"spacer", "custom", 0.0);
}
}
}
parts {
spacer { "spacer";
program { signal: "e,action,show"; source: "e";
action: STATE_SET "default" 0.0;
transition: LINEAR 0.3;
target: "spacer";
//after: "idle";
}
program { signal: "e,action,hide"; source: "e";
action: STATE_SET "custom" 0.0;
transition: LINEAR 0.3;
target: "spacer";
}
}
part { "shadow"; clip: "clip";
desc {
image.normal: "win_shadow.png";
image.border: 14 14 14 14;
image.middle: 0;
rel1.to: "e.swallow.client";
rel1.offset: -7 -3;
rel2.to: "e.swallow.client";
rel2.offset: 6 11;
fill.smooth: 0;
}
}
rect { "outline";
desc {
color: 51 153 255 0;
rel1.to: "e.swallow.client";
rel1.offset: -2 -2;
rel2.to: "e.swallow.client";
rel2.offset: 2 2;
visible: 0;
link.base: "e,state,unfocused" "e";
link.transition: LINEAR 0.2;
}
desc { "active"; inherit: "default";
color: 51 153 255 170;
visible: 1;
link.base: "e,state,focused" "e";
link.transition: LINEAR 0.2;
}
}
rect { "bg";
desc {
color: 0 0 0 255;
rel1.to: "e.swallow.client";
rel2.to: "e.swallow.client";
}
}
swallow { "e.swallow.client"; clip: "clip";
desc {
rel1.to: "spacer";
rel2.to: "spacer";
rel1.offset: 10 10;
rel2.offset: -10 -10;
map.on: 1;
link.base: "mouse,out" "events";
link.transition: LINEAR 0.2;
//link.after: "idle";
}
desc { "active";
rel1.to: "spacer";
rel2.to: "spacer";
rel2.relative: 1.3 1.3;
rel2.offset: -1 -1;
link.base: "mouse,in" "events";
link.transition: LINEAR 0.2;
}
desc { "idle1"; inherit: "default";
map.on: 1;
map.rotation.z: -5;
}
desc { "idle2"; inherit: "idle1";
map.rotation.z: 5;
}
desc { "idle3"; inherit: "idle1";
map.rotation.z: 5;
map.rotation.x: -70;
}
desc { "idle4"; inherit: "idle1";
map.rotation.z: 0;
map.rotation.x: -360;
map.rotation.y: 360;
}
program { "idle";
in: 2.0 10.0;
action: STATE_SET "idle1";
transition: SINUSOIDAL 6.0;
target: "e.swallow.client";
sequence {
action: STATE_SET "idle2";
name: "idle2";
transition: SINUSOIDAL 6.0;
target: "e.swallow.client";
in: 2.0 10.0;
action: STATE_SET "idle3";
name: "idle3";
transition: ACCEL 6.0;
target: "e.swallow.client";
in: 2.0 10.0;
action: STATE_SET "idle4";
name: "idle4";
transition: SINUSOIDAL 6.0;
target: "e.swallow.client";
in: 2.0 10.0;
after: "idle";
}
}
}
rect { "clip";
desc {
rel1.offset: -9999 -9999;
rel2.offset: 9999 9999;
color: 255 255 255 200;
link.base: "mouse,out" "events";
link.transition: LINEAR 0.2;
}
desc { "active"; inherit: "default";
color: 255 255 255 255;
link.base: "mouse,in" "events";
link.transition: LINEAR 0.2;
}
}
proxy { "clone";
desc {
source: "e.swallow.client";
rel1.to: "e.swallow.client";
rel2.to: "e.swallow.client";
hid;
color: 255 255 255 0;
}
desc { "urgent1"; inherit: "default";
vis;
color: 255 255 255 255;
}
desc { "urgent2"; inherit: "default";
vis;
rel1.relative: -0.5 -0.5;
rel2.relative: 1.5 1.5;
color: 255 255 255 0;
}
program { name: "urgent";
signal: "e,state,urgent"; source: "e";
action: ACTION_STOP;
target: "go_big";
target: "go_big2";
after: "go_big";
}
program { name: "go_big";
action: STATE_SET "urgent1" 0.0;
target: "clone";
after: "go_big2";
}
program { name: "go_big2";
action: STATE_SET "urgent2" 0.0;
transition: LINEAR 0.5;
target: "clone";
after: "go_big";
}
program { name: "not_urgent";
signal: "e,state,not_urgent"; source: "e";
action: ACTION_STOP;
target: "go_big";
target: "go_big2";
after: "go_hid";
}
program { name: "go_hid";
action: STATE_SET "default" 0.0;
transition: LINEAR 0.5;
target: "clone";
}
}
text { "e.text.title"; clip: "clip"; effect: OUTLINE;
desc {
fixed: 1 1;
align: 0.0 0.0;
rel1.to_x: "e.swallow.icon";
rel1.to_y: "e.swallow.client";
rel1.relative: 1.0 1.0;
rel1.offset: 0 10;
rel2.to: "e.swallow.client";
color: 255 255 255 255;
color2: 0 0 0 255;
text {
font: "Sans:style=Bold"; size: 12;
}
}
}
swallow { "e.swallow.icon"; clip: "clip";
desc {
fixed: 1 1;
min: 16 16;
align: 0.0 0.0;
rel1.to_x: "e.swallow.client";
rel1.to_y: "e.text.title";
rel1.offset: 0 -6;
rel2.to: "e.swallow.client";
rel2.relative: 0.0 1.0;
}
}
rect { "events"; mouse; repeat;
desc { color: 0 0 0 0; };
program { signal: "mouse,clicked,1"; source: "events";
action: SIGNAL_EMIT "e,action,activate" "e";
}
program { signal: "mouse,in"; source: "events";
action: SIGNAL_EMIT "e,state,active" "e";
sequence {
action: ACTION_STOP;
targets: "idle" "idle2" "idle3" "idle4";
}
}
program { signal: "mouse,out"; source: "events";
action: SIGNAL_EMIT "e,state,inactive" "e";
}
}
}
}
group { "e/modules/desksanity/zoom/client/drag";
images.image: "win_shadow.png" COMP;
script {
public message(Msg_Type:type, id, ...) {
if (type == MSG_INT_SET) {
/* client diff geom[4] */
new x, y, w, h;
x = getarg(2);
y = getarg(3);
w = getarg(4);
h = getarg(5);
custom_state(PART:"e.swallow.client", "default", 0.0);
set_state_val(PART:"e.swallow.client", STATE_REL1_OFFSET, x, y);
set_state_val(PART:"e.swallow.client", STATE_REL2_OFFSET, w, h);
}
}
}
parts {
rect { "clip";
desc {}
desc { "hid"; hid;
color: 255 255 255 0;
link.base: "e,drag,release" "e";
link.transition: LINEAR 0.1;
}
}
image { "shadow"; clip: "clip";
desc {
image.normal: "win_shadow.png";
image.border: 14 14 14 14;
image.middle: 0;
rel1.to: "e.swallow.client";
rel1.offset: -7 -3;
rel2.to: "e.swallow.client";
rel2.offset: 6 11;
fill.smooth: 0;
}
}
swallow { "e.swallow.client"; }
rect { "over"; clip: "clip";
desc {
rel1.to: "e.swallow.client";
rel2.to: "e.swallow.client";
color: 255 255 255 90;
}
}
program { signal: "e,drag,release"; source: "e";
action: STATE_SET "custom";
target: "e.swallow.client";
transition: LINEAR 0.1;
sequence {
action: SIGNAL_EMIT "e,action,done" "e";
}
}
}
}
}

Binary file not shown.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 36 KiB

@ -0,0 +1,182 @@
#include <Elementary.h>
#include <e_gadget_types.h>
static E_Gadget_Site_Orient gorient;
static E_Gadget_Site_Anchor ganchor;
static char *menu_action;
static void
do_orient(Evas_Object *ly, E_Gadget_Site_Orient orient, E_Gadget_Site_Anchor anchor)
{
char buf[4096];
const char *s = "float";
if (anchor & E_GADGET_SITE_ANCHOR_LEFT)
{
if (anchor & E_GADGET_SITE_ANCHOR_TOP)
{
switch (orient)
{
case E_GADGET_SITE_ORIENT_HORIZONTAL:
s = "top_left";
break;
case E_GADGET_SITE_ORIENT_VERTICAL:
s = "left_top";
break;
case E_GADGET_SITE_ORIENT_NONE:
s = "left_top";
break;
}
}
else if (anchor & E_GADGET_SITE_ANCHOR_BOTTOM)
{
switch (orient)
{
case E_GADGET_SITE_ORIENT_HORIZONTAL:
s = "bottom_left";
break;
case E_GADGET_SITE_ORIENT_VERTICAL:
s = "left_bottom";
break;
case E_GADGET_SITE_ORIENT_NONE:
s = "left_bottom";
break;
}
}
else
s = "left";
}
else if (anchor & E_GADGET_SITE_ANCHOR_RIGHT)
{
if (anchor & E_GADGET_SITE_ANCHOR_TOP)
{
switch (orient)
{
case E_GADGET_SITE_ORIENT_HORIZONTAL:
s = "top_right";
break;
case E_GADGET_SITE_ORIENT_VERTICAL:
s = "right_top";
break;
case E_GADGET_SITE_ORIENT_NONE:
s = "right_top";
break;
}
}
else if (anchor & E_GADGET_SITE_ANCHOR_BOTTOM)
{
switch (orient)
{
case E_GADGET_SITE_ORIENT_HORIZONTAL:
s = "bottom_right";
break;
case E_GADGET_SITE_ORIENT_VERTICAL:
s = "right_bottom";
break;
case E_GADGET_SITE_ORIENT_NONE:
s = "right_bottom";
break;
}
}
else
s = "right";
}
else if (anchor & E_GADGET_SITE_ANCHOR_TOP)
s = "top";
else if (anchor & E_GADGET_SITE_ANCHOR_BOTTOM)
s = "bottom";
else
{
switch (orient)
{
case E_GADGET_SITE_ORIENT_HORIZONTAL:
s = "horizontal";
break;
case E_GADGET_SITE_ORIENT_VERTICAL:
s = "vertical";
break;
default: break;
}
}
snprintf(buf, sizeof(buf), "e,state,orientation,%s", s);
elm_layout_signal_emit(ly, buf, "e");
}
static void
_menu_cb_post(void *data, Evas_Object *obj EINA_UNUSED, void *event_info)
{
if (eina_streq(event_info, menu_action))
elm_layout_signal_emit(data, "e,state,unfocused", "e");
}
static void
_button_cb_mouse_down(void *data EINA_UNUSED, Evas *e EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_info)
{
Evas_Event_Mouse_Down *ev = event_info;
if (ev->button != 1) return;
if (ev->event_flags & EVAS_EVENT_FLAG_ON_HOLD) return;
if (!menu_action) return;
ev->event_flags |= EVAS_EVENT_FLAG_ON_HOLD;
evas_object_smart_callback_call(elm_win_get(obj), menu_action, "main");
elm_layout_signal_emit(obj, "e,state,focused", "e");
}
static void
anchor_change(void *data, Evas_Object *obj EINA_UNUSED, void *event_info)
{
ganchor = (uintptr_t)event_info;
do_orient(data, gorient, ganchor);
}
static void
orient_change(void *data, Evas_Object *obj EINA_UNUSED, void *event_info)
{
gorient = (uintptr_t)event_info;
do_orient(data, gorient, ganchor);
}
static void
action_deleted(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_info)
{
if (eina_streq(menu_action, event_info))
{
free(menu_action);
menu_action = NULL;
}
}
static void
action_return(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_info)
{
fprintf(stderr, "AR RETURN: %s\n", (char*)event_info);
menu_action = eina_strdup(event_info);
}
int
main(int argc, char *argv[])
{
Evas_Object *win, *ly;
elm_init(argc, (char**)argv);
win = elm_win_add(NULL, "start", ELM_WIN_BASIC);
elm_win_autodel_set(win, 1);
elm_win_alpha_set(win, 1);
ly = elm_layout_add(win);
evas_object_size_hint_min_set(win, 100, 100);
evas_object_size_hint_aspect_set(win, EVAS_ASPECT_CONTROL_BOTH, 1, 1);
elm_layout_file_set(ly,
elm_theme_group_path_find(NULL, "e/gadget/start/main"), "e/gadget/start/main");
elm_win_resize_object_add(win, ly);
evas_object_show(ly);
evas_object_smart_callback_add(win, "gadget_site_anchor", anchor_change, ly);
evas_object_smart_callback_add(win, "gadget_site_orient", orient_change, ly);
evas_object_smart_callback_add(win, "gadget_action", action_return, NULL);
evas_object_smart_callback_add(win, "gadget_action_end", _menu_cb_post, ly);
evas_object_smart_callback_add(win, "gadget_action_deleted", action_deleted, NULL);
evas_object_event_callback_add(ly, EVAS_CALLBACK_MOUSE_DOWN, _button_cb_mouse_down, NULL);
evas_object_smart_callback_call(win, "gadget_action_request", "menu_show_object");
evas_object_show(win);
ecore_main_loop_begin();
return 0;
}

@ -0,0 +1,5 @@
[Desktop Entry]
Type=Application
Name=Start
Exec=@GADGET_DIR@/start/e_gadget_start
Icon=e/gadget/start/main

@ -0,0 +1,121 @@
#include <Elementary.h>
static Evas_Object *popup;
static Evas_Object *child;
static void
popup_del(void *data EINA_UNUSED, Evas *e EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED)
{
popup = NULL;
}
static void
child_del(void *data EINA_UNUSED, Evas *e EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED)
{
child = NULL;
}
static void
popup_unfocus(void *data EINA_UNUSED, Evas *e EINA_UNUSED, Evas_Object *obj, void *event_info EINA_UNUSED)
{
evas_object_del(obj);
}
static void
mouse_button(void *data EINA_UNUSED, Evas *e EINA_UNUSED, Evas_Object *obj, void *event_info)
{
Evas_Object *ic;
Evas_Event_Mouse_Down *ev = event_info;
char buf[PATH_MAX];
int w, h;
Evas_Object *win;
Elm_Win_Type type = ELM_WIN_POPUP_MENU;
if ((ev->button != 1) && (ev->button != 3)) return;
if (ev->button == 3)
{
type = ELM_WIN_BASIC;
if (child)
{
evas_object_del(child);
return;
}
}
else
{
if (popup)
{
evas_object_del(popup);
return;
}
}
win = elm_win_add(elm_win_get(obj), "win", type);
elm_win_alpha_set(win, 1);
if (ev->button == 3)
{
child = win;
evas_object_event_callback_add(win, EVAS_CALLBACK_DEL, child_del, NULL);
}
else
{
popup = win;
evas_object_event_callback_add(win, EVAS_CALLBACK_DEL, popup_del, NULL);
}
if (ev->button == 3)
evas_object_event_callback_add(win, EVAS_CALLBACK_FOCUS_OUT, popup_unfocus, NULL);
ic = elm_icon_add(win);
snprintf(buf, sizeof(buf), "%s/images/bubble.png", elm_app_data_dir_get());
elm_image_file_set(ic, buf, NULL);
elm_image_object_size_get(ic, &w, &h);
evas_object_size_hint_aspect_set(win, EVAS_ASPECT_CONTROL_BOTH, w, h);
if (ev->button == 1)
{
elm_image_resizable_set(ic, EINA_FALSE, EINA_FALSE);
elm_image_no_scale_set(ic, EINA_TRUE);
}
evas_object_size_hint_weight_set(ic, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
evas_object_size_hint_fill_set(ic, 0.5, 0.5);
evas_object_size_hint_min_set(ic, 100, 100);
elm_win_resize_object_add(win, ic);
evas_object_show(ic);
evas_object_show(win);
}
int
main(int argc, char *argv[])
{
Evas_Object *win, *ic;
char buf[PATH_MAX];
int w, h;
elm_init(argc, (char**)argv);
elm_policy_set(ELM_POLICY_QUIT, ELM_POLICY_QUIT_LAST_WINDOW_CLOSED);
elm_app_info_set(main, "elementary", "images/logo.png");
win = elm_win_add(NULL, "icon-transparent", ELM_WIN_BASIC);
elm_win_title_set(win, "Icon Transparent");
elm_win_autodel_set(win, EINA_TRUE);
elm_win_alpha_set(win, EINA_TRUE);
ic = elm_icon_add(win);
elm_object_tooltip_text_set(ic, "this is some test text which is probably going to be a lot longer than the overall icon size haHAA");
elm_object_tooltip_window_mode_set(ic, 1);
snprintf(buf, sizeof(buf), "%s/images/logo.png", elm_app_data_dir_get());
elm_image_file_set(ic, buf, NULL);
elm_image_object_size_get(ic, &w, &h);
evas_object_size_hint_aspect_set(win, EVAS_ASPECT_CONTROL_BOTH, w, h);
if (argc > 1)
{
elm_image_resizable_set(ic, EINA_FALSE, EINA_FALSE);
elm_image_no_scale_set(ic, EINA_TRUE);
}
evas_object_size_hint_weight_set(ic, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
evas_object_size_hint_fill_set(ic, 0.5, 0.5);
evas_object_size_hint_min_set(ic, 100, 100);
elm_win_resize_object_add(win, ic);
evas_object_show(ic);
evas_object_event_callback_add(ic, EVAS_CALLBACK_MOUSE_DOWN, mouse_button, NULL);
evas_object_show(win);
ecore_main_loop_begin();
return 0;
}

@ -0,0 +1,4 @@
[Desktop Entry]
Type=Application
Name=Test
Exec=@GADGET_DIR@/test/e_gadget_test

@ -0,0 +1,182 @@
project('desksanity', 'c',
version: '1.1.99',
license: 'BSD 2 clause',
default_options: [ 'c_std=gnu99', 'warning_level=2' ],
meson_version: '>= 0.40.0')
add_global_arguments('-DHAVE_CONFIG_H=1', language: 'c')
dir_prefix = get_option('prefix')
dir_bin = join_paths(dir_prefix, get_option('bindir'))
dir_sysconf = get_option('sysconfdir')
dir_data = join_paths(dir_prefix, get_option('datadir'))
dir_include = join_paths(dir_prefix, get_option('includedir'))
dir_include_e = join_paths(dir_include, meson.project_name())
dir_lib = join_paths(dir_prefix, get_option('libdir'))
pkgconfig = import('pkgconfig')
cc = meson.get_compiler('c')
# disable for release builds
dev_cflags = []
dev_cflags_try = [
'-Wall',
'-W',
'-Wpointer-arith',
'-Wshadow',
'-Wno-missing-field-initializers',
'-Wfloat-equal',
'-Wuninitialized',
'-Wundef',
'-Wcast-align',
'-Wformat=2',
'-Wno-format-y2k',
]
foreach cf: dev_cflags_try
if cc.has_argument(cf) == true
dev_cflags += cf
endif
endforeach
add_global_arguments(dev_cflags, language: 'c')
dep_e = dependency('enlightenment')
release = dep_e.get_pkgconfig_variable('release')
host_os = host_machine.system()
if host_os == 'linux'
if cc.has_header_symbol('features.h', '__UCLIBC__')
host_os = 'linux-uclibc'
elif cc.has_header_symbol('features.h', '__dietlibc__')
host_os = 'linux-dietlibc'
else
host_os = 'linux-gnu'
endif
endif
module_arch = '@0@-@1@-@2@'.format(host_os, host_machine.cpu_family(), release)
config_h = configuration_data()
config_h.set('_GNU_SOURCE', '1')
config_h.set('_ALL_SOURCE', '1')
config_h.set('_POSIX_PTHREAD_SEMANTICS', '1')
config_h.set('_TANDEM_SOURCE', '1')
config_h.set('__EXTENSIONS__', '1')
config_h.