devilhorns pushed a commit to branch master.

http://git.enlightenment.org/apps/express.git/commit/?id=4b45acb50cf59347d5808b5ac1a190b7739460d4

commit 4b45acb50cf59347d5808b5ac1a190b7739460d4
Author: Chris Michael <cp.mich...@samsung.com>
Date:   Wed Aug 12 13:02:01 2015 -0400

    express: Add media control part to express default theme
    
    Signed-off-by: Chris Michael <cp.mich...@samsung.com>
---
 data/themes/default.edc | 326 +++++++++++++++++++++++++++++++++++++++++++++++-
 1 file changed, 325 insertions(+), 1 deletion(-)

diff --git a/data/themes/default.edc b/data/themes/default.edc
index c82896e..6fd64ee 100644
--- a/data/themes/default.edc
+++ b/data/themes/default.edc
@@ -2007,6 +2007,7 @@ collections
                }
 
              /* TODO: bell */
+             /* TODO: popmedia */
           }
         programs
           {
@@ -3656,6 +3657,329 @@ collections
                    target: "fade";
                 }
            }
-    }
+     }
+
+   group
+     {
+        name: "express/mediactrl";
+        images
+          {
+             image: "media_bg.png" COMP;
+             image: "media_play.png" COMP;
+             image: "media_stop.png" COMP;
+             image: "media_pause.png" COMP;
+             image: "media_line.png" COMP;
+             image: "media_knob_vol.png" COMP;
+             image: "media_knob_pos.png" COMP;
+          }
+        parts
+          {
+             part
+               {
+                  name: "clip";
+                  type: RECT;
+                  mouse_events: 0;
+                  description
+                    {
+                       state: "default" 0.0;
+                       rel1.to: "background";
+                       rel2.to: "background";
+                    }
+               }
+             part
+               {
+                  name: "background";
+                  clip_to: "clip";
+                  description
+                    {
+                       state: "default" 0.0;
+                       image.normal: "media_bg.png";
+                       image.border: 11 11 11 11;
+                       min: 24 24;
+                       max: 24 24;
+                       align: 1.0 0.0;
+                    }
+                  description
+                    {
+                       state: "expanded" 0.0;
+                       inherit: "default" 0.0;
+                       min: 216 24;
+                       max: 216 24;
+                    }
+               }
+             part
+               {
+                  name: "play";
+                  mouse_events: 1;
+                  repeat_events: 1;
+                  clip_to: "clip";
+                  description
+                    {
+                       state: "default" 0.0;
+                       image.normal: "media_pause.png";
+                       max: 24 24;
+                       align: 1.0 0.0;
+                    }
+                  description
+                    {
+                       state: "paused" 0.0;
+                       inherit: "default" 0.0;
+                       image.normal: "media_play.png";
+                    }
+               }
+             part
+               {
+                  name: "stop";
+                  mouse_events: 1;
+                  repeat_events: 1;
+                  clip_to: "clip";
+                  description
+                    {
+                       state: "default" 0.0;
+                       image.normal: "media_stop.png";
+                       max: 24 24;
+                       rel1.to: "play";
+                       rel1.offset: -16 0;
+                       rel2.to: "play";
+                       rel2.offset: -16 0;
+                    }
+               }
+             part
+               {
+                  name: "posline";
+                  mouse_events: 1;
+                  repeat_events: 1;
+                  clip_to: "clip";
+                  description
+                    {
+                       state: "default" 0.0;
+                       image.normal: "media_line.png";
+                       image.border: 15 15 0 0;
+                       min: 90 14;
+                       max: 90 14;
+                       rel1.to: "stop";
+                       rel1.offset: -25 0;
+                       rel2.to: "stop";
+                       rel2.offset: -90 0;
+                    }
+               }
+             part
+               {
+                  name: "express.posdrag";
+                  mouse_events: 0;
+                  repeat_events: 1;
+                  clip_to: "clip";
+                  dragable
+                    {
+                       confine: "posline";
+                       x: 1 1 0;
+                       y: 0 0 0;
+                    }
+                  description
+                    {
+                       state: "default" 0.0;
+                       image.normal: "media_knob_pos.png";
+                       min: 14 14;
+                       max: 14 14;
+                    }
+                  description
+                    {
+                       state: "muted" 0.0;
+                       visible: 0;
+                    }
+               }
+             part
+               {
+                  name: "volline";
+                  mouse_events: 1;
+                  repeat_events: 1;
+                  clip_to: "clip";
+                  description
+                    {
+                       state: "default" 0.0;
+                       image.normal: "media_line.png";
+                       image.border: 15 15 0 0;
+                       min: 60 14;
+                       max: 60 14;
+                       rel1.to: "posline";
+                       rel1.offset: -25 0;
+                       rel2.to: "posline";
+                       rel2.relative: 0.0 1.0;
+                       rel2.offset: -60 0;
+                    }
+               }
+             part
+               {
+                  name: "express.voldrag";
+                  mouse_events: 1;
+                  repeat_events: 1;
+                  clip_to: "clip";
+                  dragable
+                    {
+                       confine: "volline";
+                       x: 1 1 0;
+                       y: 0 0 0;
+                    }
+                  description
+                    {
+                       state: "default" 0.0;
+                       image.normal: "media_knob_vol.png";
+                       min: 14 14;
+                       max: 14 14;
+                    }
+                  description
+                    {
+                       state: "muted" 0.0;
+                       visible: 0;
+                    }
+               }
+          }
+        programs
+          {
+             program 
+               {
+                  signal: "mouse,in";
+                  source: "background";
+                  action: STATE_SET "expanded" 0.0;
+                  transition: SINUSOIDAL 0.4 CURRENT;
+                  target: "background";
+               }
+             program 
+               {
+                  signal: "mouse,out";
+                  source: "background";
+                  action: STATE_SET "default" 0.0;
+                  transition: SINUSOIDAL 0.4 CURRENT;
+                  target: "background";
+               }
+             program 
+               {
+                  signal: "mouse,up,*";
+                  source: "play";
+                  filter: "play" "default";
+                  action: SIGNAL_EMIT "pause" "";
+               }
+             program 
+               {
+                  signal: "mouse,up,1";
+                  source: "play";
+                  filter: "play" "paused";
+                  action: SIGNAL_EMIT "play" "";
+               }
+             program 
+               {
+                  signal: "mouse,up,1";
+                  source: "stop";
+                  action: SIGNAL_EMIT "stop" "";
+               }
+             program 
+               {
+                  signal: "pause,set";
+                  source: "express";
+                  action: STATE_SET "paused" 0.0;
+                  target: "play";
+               }
+             program 
+               {
+                  signal: "play,set";
+                  source: "express";
+                  action: STATE_SET "default" 0.0;
+                  target: "play";
+               }
+             program 
+               {
+                  signal: "mute,set";
+                  source: "express";
+                  action: STATE_SET "muted" 0.0;
+                  target: "express.voldrag";
+               }
+             program 
+               {
+                  signal: "mute,unset";
+                  source: "express";
+                  action: STATE_SET "default" 0.0;
+                  target: "express.voldrag";
+               }
+             program 
+               {
+                  signal: "mouse,down,1";
+                  source: "posline";
+                  filter: "express.posdrag" "default";
+                  script 
+                    {
+                       new x, y, w, h, m_x, m_y;
+                       new Float:pos;
 
+                       get_geometry(PART:"posline", x, y, w, h);
+                       get_mouse(m_x, m_y);
+                       pos = m_x - x;
+                       pos = pos / w;
+                       set_drag(PART:"express.posdrag", pos, 0.0);
+                       emit("pos,drag,start", "");
+                    }
+               }
+             program 
+               {
+                  signal: "mouse,up,1";
+                  source: "posline";
+                  action: SIGNAL_EMIT "pos,drag,stop" "";
+               }
+             program 
+               {
+                  signal: "mouse,move";
+                  source: "posline";
+                  script 
+                    {
+                       new x, y, w, h, m_x, m_y;
+                       new Float:pos;
+
+                       if (!get_mouse_buttons()) return;
+
+                       get_geometry(PART:"posline", x, y, w, h);
+                       get_mouse(m_x, m_y);
+                       pos = m_x - x;
+                       pos = pos / w;
+                       set_drag(PART:"express.posdrag", pos, 0.0);
+                       emit("pos,drag", "");
+                    }
+               }
+         program 
+               {
+                  signal: "mouse,down,1";
+                  source: "volline";
+                  filter: "express.voldrag" "default";
+                  script 
+                    {
+                       new x, y, w, h, m_x, m_y;
+                       new Float:pos;
+
+                       get_geometry(PART:"volline", x, y, w, h);
+                       get_mouse(m_x, m_y);
+                       pos = m_x - x;
+                       pos = pos / w;
+                       set_drag(PART:"express.voldrag", pos, 0.0);
+                       emit("vol,drag", "");
+                    }
+               }
+             program 
+               {
+                  signal: "mouse,move";
+                  source: "volline";
+                  script 
+                    {
+                       new x, y, w, h, m_x, m_y;
+                       new Float:pos;
+
+                       if (!get_mouse_buttons()) return;
+
+                       get_geometry(PART:"volline", x, y, w, h);
+                       get_mouse(m_x, m_y);
+                       pos = m_x - x;
+                       pos = pos / w;
+                       set_drag(PART:"express.voldrag", pos, 0.0);
+                       emit("vol,drag", "");
+                    }
+               }
+          }
+     }
 }

-- 


Reply via email to