jpeg pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=9fb4f0ab2b27dafccb5fe72a9863b1ba6fb646ec

commit 9fb4f0ab2b27dafccb5fe72a9863b1ba6fb646ec
Author: Jean-Philippe Andre <jp.an...@samsung.com>
Date:   Mon Nov 14 17:53:01 2016 +0900

    theme: Implement CSD & non-CSD styles in window.edc
    
    Also converts border.edc to lazEDC (easier to read, imho).
    
    This is still work in progress but currently this supports
    CSD & no-CSD modes for normal, maximized, main menu usage, shadow
    on and off.
    
    Note that shaded support is not implemented. I've made some
    attempts towards this goal, with some success under X but it
    was ugly code, and didn't work under Wayland (weston). So, no
    extra support for shaded mode yet.
---
 data/elementary/themes/edc/elm/border.edc | 649 ++++++++++++++----------------
 1 file changed, 312 insertions(+), 337 deletions(-)

diff --git a/data/elementary/themes/edc/elm/border.edc 
b/data/elementary/themes/edc/elm/border.edc
index 788e529..ccf0dd2 100644
--- a/data/elementary/themes/edc/elm/border.edc
+++ b/data/elementary/themes/edc/elm/border.edc
@@ -1,3 +1,12 @@
+/* Window client-side decorations and extra slots
+ * Includes swallows for:
+ *  - app content
+ *  - main menu
+ *  - indicator
+ *  - soft key
+ *  - virtual keyboard
+ */
+
 group { name: "elm/border/base/default";
    images.image: "vgrad_med_lighter.png" COMP;
    images.image: "vgrad_med_dark.png" COMP;
@@ -25,80 +34,57 @@ group { name: "elm/border/base/default";
       /* opaque region of the window, to inform the compositor */
       spacer { "elm.spacer.opaque";
          desc {
-            rel1.to: "top";
-            rel2.to: "bottom";
+            rel1.to: "top_clip";
+            rel2.to: "bottom_clip";
          }
-         desc { "shaded";
-            rel1.to: "top";
-            rel2.to: "elm.swallow.client";
-         }
-         desc { "max"; inherit: "shaded"; }
+         desc { "max"; inherit: "default"; }
       }
       /* covers the entire client contents, including the main menu */
       spacer { "elm.spacer.content";
          required; // since 1.19
          desc {
-           rel1.to: "top";
-           rel1.relative: 0.0 1.0;
-           rel2.to: "bottom";
-           rel2.relative: 1.0 0.0;
-        }
-      }
-      part { name: "shadow_clip"; type: RECT; mouse_events: 0;
-         description { state: "default";
-            rel1.to: "shadow";
-            rel2.to: "shadow";
-         }
-         description { state: "hidden";
-            visible: 0;
+            rel1.to: "top_clip";
+            rel1.relative: 0.0 1.0;
+            rel2.to: "bottom_clip";
+            rel2.relative: 1.0 0.0;
          }
       }
-      part { name: "shadow_spacer"; type: SPACER;
-         description { state: "default";
+      /* shadow spacer and clipper */
+      spacer { "shadow_spacer";
+         desc { "default";
             WIN_SHADOW_SPACER;
          }
-         description { state: "max";
+         desc { "hidden";
             rel1.offset: 0 0;
             rel2.offset: -1 -1;
          }
       }
-      part { name: "shadow"; mouse_events: 0; clip_to: "shadow_clip";
-         description { state: "default" 0.0;
-            rel1.to: "shadow_spacer";
-            rel2.to: "shadow_spacer";
+      image { "shadow"; nomouse;
+         desc { "default";
+            rel.to: "shadow_spacer";
             WIN_SHADOW;
          }
-         description { state: "shaded";
-            inherit: "default";
-            rel2.to: "elm.swallow.client";
-         }
+         desc { "hidden"; inherit: "default"; hid; }
       }
-      rect { "client_clip";
+      /* window background: solid color */
+      rect { "bg_clip";
          nomouse;
          desc { "default";
-            rel1.to_y: "elm.swallow.client";
-            rel2.to_y: "elm.swallow.client";
+            rel.to: "elm.spacer.content";
          }
       }
-      rect { "bg_clip";
-         nomouse;
-        desc { "default";
-           rel.to: "elm.spacer.content";
-        }
-      }
-      /* window background: solid color */
       rect { "elm.rect.background";
          required; // @since 1.19
          clip: "bg_clip";
          desc { "default";
-           color: 255 255 255 255;
-           color_class: "elm/win/background"; // FIXME: color_class naming 
scheme
-           visible: 0;
-        }
-        desc { "visible";
-           inherit: "default";
-           visible: 1;
-        }
+            color: 255 255 255 255;
+            color_class: "elm/win/background"; // FIXME: color_class naming 
scheme
+            visible: 0;
+         }
+         desc { "visible";
+            inherit: "default";
+            visible: 1;
+         }
       }
       /* window background: image */
       swallow { "elm.swallow.background";
@@ -116,7 +102,7 @@ group { name: "elm/border/base/default";
       swallow { "elm.swallow.menu";
          required: 1; // since 1.19
          desc { "default";
-            rel.to: "top";
+            rel.to: "top_clip";
             rel1.relative: 0.0 1.0;
             rel1.offset: 0 -1;
             visible: 0;
@@ -128,57 +114,78 @@ group { name: "elm/border/base/default";
             fixed: 0 1;
          }
       }
-      /* application contents */
-      part { name: "elm.swallow.client"; type: SWALLOW;
-         clip_to: "client_clip";
-         description { state: "default" 0.0;
-            rel1.relative: 0.0 1.0;
+      /* application contents - spacer and clipper (without main menu) */
+      spacer { "client_spacer";
+         desc { "default";
             rel1.to: "elm.swallow.menu";
+            rel1.relative: 0.0 1.0;
+            rel2.to: "bottom_clip";
             rel2.relative: 1.0 0.0;
-            rel2.to: "bottom";
          }
-         description { state: "shaded" 0.0;
-            inherit: "default" 0.0;
-            rel2.relative: 1.0 1.0;
-            rel2.offset: -1 -1;
+      }
+      rect { "client_clip";
+         nomouse;
+         desc { "default";
+            rel.to: "client_spacer";
          }
-         description { state: "max" 0.0;
-            inherit: "default" 0.0;
-            rel2.relative: 1.0 1.0;
-            rel2.offset: -1 -1;
+      }
+      /* application contents */
+      swallow { "elm.swallow.client";
+         clip: "client_clip";
+         desc { "default";
+            rel.to: "client_spacer";
          }
       }
-      part { name: "top"; mouse_events: 0;
-         description { state: "default" 0.0;
-            image.normal: "vgrad_med_lighter.png";
+      /* top title bar - spacer and clipper */
+      rect { "top_clip"; //nomouse;
+         desc { "default";
             rel1.to: "shadow_spacer";
             rel2.to_y: "title2";
             rel2.to_x: "shadow_spacer";
             rel2.offset: -1 0;
+            vis;
+         }
+         desc { "hidden";
+            inherit: "default";
+            rel1.relative: 0.0 0.0;
+            rel2.relative: 1.0 0.0;
+            max: -1 0;
+            min: 0 0;
+            fixed: 0 1;
+            hid;
+         }
+      }
+      /* top title bar */
+      image { "top"; nomouse;
+         clip: "top_clip";
+         desc { "default";
+            image.normal: "vgrad_med_lighter.png";
+            rel.to: "top_clip";
             fill.smooth: 0;
             TILED_HORIZ(120)
             color_class: "border_frame";
          }
-         description { state: "focused" 0.0;
-            inherit: "default" 0.0;
+         desc { "focused";
+            inherit: "default";
             image.normal: "vgrad_med_dark.png";
             color_class: "border_frame_active";
          }
       }
-      part { name: "bevel"; mouse_events: 0;
-         description { state: "default" 0.0;
+      image { "bevel"; nomouse;
+         clip: "top_clip";
+         desc { "default";
             image.normal: "bevel_out.png";
             image.border: 1 1 1 1;
             image.middle: 0;
-            rel1.to: "top";
-            rel2.to: "top";
+            rel.to: "top_clip";
             fill.smooth: 0;
          }
       }
-      part { name: "elm.text.title"; type: TEXT; mouse_events: 0;
+      text {  "elm.text.title"; nomouse;
          scale: 1;
          effect: SHADOW BOTTOM;
-         description { state: "default" 0.0;
+         clip: "top_clip";
+         desc { "default";
             rel1.relative: 1.0 0.0;
             rel1.offset: 1 3;
             rel1.to_x: "elm.event.icon";
@@ -197,15 +204,16 @@ group { name: "elm/border/base/default";
             }
             fixed: 0 1;
          }
-         description { state: "focused" 0.0;
-            inherit: "default" 0.0;
+         desc { "focused";
+            inherit: "default";
             visible: 0;
          }
       }
-      part { name: "title2"; type: TEXT; mouse_events: 0;
+      text {  "title2"; nomouse;
          scale: 1;
          effect: SOFT_SHADOW BOTTOM;
-         description { state: "default" 0.0;
+         clip: "top_clip";
+         desc { "default";
             rel1.relative: 1.0 0.0;
             rel1.offset: 1 2;
             rel1.to_x: "elm.event.icon";
@@ -226,29 +234,29 @@ group { name: "elm/border/base/default";
             fixed: 0 1;
             visible: 0;
          }
-         description { state: "focused" 0.0;
-            inherit: "default" 0.0;
+         desc { "focused";
+            inherit: "default";
             visible: 1;
          }
       }
-      part { name: "icon"; type: SPACER;
-         description { state: "default" 0.0;
+      spacer {  "icon";
+         desc { "default";
             rel1.to: "elm.event.icon";
             rel2.to: "elm.event.icon";
          }
-         description { state: "bounce1" 0.0;
-            inherit: "default" 0.0;
+         desc { "bounce1";
+            inherit: "default";
             rel1.relative: 0.5 0.5;
             rel2.relative: 0.5 0.5;
          }
-         description { state: "bounce2" 0.0;
-            inherit: "default" 0.0;
+         desc { "bounce2";
+            inherit: "default";
             rel1.relative: -0.5 -0.5;
             rel2.relative: 1.2 1.2;
          }
       }
-      part { name: "elm.swallow.icon"; type: SWALLOW; mouse_events: 0;
-         description { state: "default" 0.0;
+      swallow {  "elm.swallow.icon"; nomouse;
+         desc { "default";
             rel1.to: "icon";
             rel1.relative: 0.15 0.15;
             rel2.to: "icon";
@@ -256,20 +264,20 @@ group { name: "elm/border/base/default";
             rel2.offset: 0 0;
          }
       }
-      part { name: "busy_clip"; type: RECT; mouse_events: 0;
-         description { state: "default" 0.0;
+      rect {  "busy_clip"; nomouse;
+         desc { "default";
             color: 255 255 255 0;
             visible: 0;
          }
-         description { state: "hung" 0.0;
-            inherit: "default" 0.0;
+         desc { "hung";
+            inherit: "default";
             color: 255 255 255 255;
             visible: 1;
          }
       }
-      part { name: "knob"; mouse_events: 0;
-         clip_to: "busy_clip";
-         description { state: "default" 0.0;
+      image { "knob"; nomouse;
+         clip: "busy_clip";
+         desc { "default";
             fixed: 1 1;
             image.normal: "knob_round_small_busy.png";
             aspect: 1.0 1.0; aspect_preference: VERTICAL;
@@ -284,9 +292,9 @@ group { name: "elm/border/base/default";
             fixed: 1 1;
          }
       }
-      part { name: "knob_spinner"; mouse_events: 0;
-         clip_to: "busy_clip";
-         description { state: "default" 0.0;
+      image { "knob_spinner"; nomouse;
+         clip: "busy_clip";
+         desc { "default";
             fixed: 1 1;
             rel1.to: "knob";
             rel2.to: "knob";
@@ -295,35 +303,35 @@ group { name: "elm/border/base/default";
             map.smooth: 1;
             map.rotation.center: "knob";
          }
-         description { state: "spin" 0.0;
-            inherit: "default" 0.0;
+         desc { "spin";
+            inherit: "default";
             map.rotation.z: 360;
          }
       }
-      part { name: "clip1"; type: RECT; mouse_events: 0;
-         description { state: "default" 0.0;
-            rel1.to: "top";
-            rel2.to: "top";
+      rect {  "clip1"; nomouse;
+         desc { "default";
+            rel1.to: "top_clip";
+            rel2.to: "top_clip";
          }
-         description { state: "focused" 0.0;
-            inherit: "default" 0.0;
+         desc { "focused";
+            inherit: "default";
             visible: 0;
          }
       }
-      part { name: "clip2"; type: RECT; mouse_events: 0;
-         description { state: "default" 0.0;
-            rel1.to: "top";
-            rel2.to: "top";
+      rect {  "clip2"; nomouse;
+         desc { "default";
+            rel1.to: "top_clip";
+            rel2.to: "top_clip";
             visible: 0;
          }
-         description { state: "focused" 0.0;
-            inherit: "default" 0.0;
+         desc { "focused";
+            inherit: "default";
             visible: 1;
          }
       }
-      part { name: "close1";  mouse_events: 0;
-         clip_to: "clip1";
-         description { state: "default" 0.0;
+      image { "close1";  nomouse;
+         clip: "clip1";
+         desc { "default";
             image.normal: "sym_close_dark_normal.png";
             rel1.to: "elm.event.close";
             rel2.to: "elm.event.close";
@@ -331,14 +339,14 @@ group { name: "elm/border/base/default";
             max: 15 15;
             fixed: 1 1;
          }
-         description { state: "selected" 0.0;
-            inherit: "default" 0.0;
+         desc { "selected";
+            inherit: "default";
             image.normal: "sym_close_dark_selected.png";
          }
       }
-      part { name: "max1"; mouse_events: 0;
-         clip_to: "clip1";
-         description { state: "default" 0.0;
+      image { "max1"; nomouse;
+         clip: "clip1";
+         desc { "default";
             image.normal: "sym_up_dark_normal.png";
             rel1.to: "elm.event.maximize";
             rel2.to: "elm.event.maximize";
@@ -346,14 +354,14 @@ group { name: "elm/border/base/default";
             max: 15 15;
             fixed: 1 1;
          }
-         description { state: "selected" 0.0;
-            inherit: "default" 0.0;
+         desc { "selected";
+            inherit: "default";
             image.normal: "sym_up_dark_selected.png";
          }
       }
-      part { name: "min1"; mouse_events: 0;
-         clip_to: "clip1";
-         description { state: "default" 0.0;
+      image { "min1"; nomouse;
+         clip: "clip1";
+         desc { "default";
             image.normal: "sym_down_dark_normal.png";
             rel1.to: "elm.event.minimize";
             rel2.to: "elm.event.minimize";
@@ -361,14 +369,14 @@ group { name: "elm/border/base/default";
             max: 15 15;
             fixed: 1 1;
          }
-         description { state: "selected" 0.0;
-            inherit: "default" 0.0;
+         desc { "selected";
+            inherit: "default";
             image.normal: "sym_down_dark_selected.png";
          }
       }
-      part { name: "close2"; mouse_events: 0;
-         clip_to: "clip2";
-         description { state: "default" 0.0;
+      image { "close2"; nomouse;
+         clip: "clip2";
+         desc { "default";
             image.normal: "sym_close_light_normal.png";
             rel1.to: "elm.event.close";
             rel2.to: "elm.event.close";
@@ -376,14 +384,14 @@ group { name: "elm/border/base/default";
             max: 15 15;
             fixed: 1 1;
          }
-         description { state: "selected" 0.0;
-            inherit: "default" 0.0;
+         desc { "selected";
+            inherit: "default";
             image.normal: "sym_close_light_selected.png";
          }
       }
-      part { name: "max2"; mouse_events: 0;
-         clip_to: "clip2";
-         description { state: "default" 0.0;
+      image { "max2"; nomouse;
+         clip: "clip2";
+         desc { "default";
             image.normal: "sym_up_light_normal.png";
             rel1.to: "elm.event.maximize";
             rel2.to: "elm.event.maximize";
@@ -391,14 +399,14 @@ group { name: "elm/border/base/default";
             max: 15 15;
             fixed: 1 1;
          }
-         description { state: "selected" 0.0;
-            inherit: "default" 0.0;
+         desc { "selected";
+            inherit: "default";
             image.normal: "sym_up_light_selected.png";
          }
       }
-      part { name: "min2"; mouse_events: 0;
-         clip_to: "clip2";
-         description { state: "default" 0.0;
+      image { "min2"; nomouse;
+         clip: "clip2";
+         desc { "default";
             image.normal: "sym_down_light_normal.png";
             rel1.to: "elm.event.minimize";
             rel2.to: "elm.event.minimize";
@@ -406,255 +414,258 @@ group { name: "elm/border/base/default";
             max: 15 15;
             fixed: 1 1;
          }
-         description { state: "selected" 0.0;
-            inherit: "default" 0.0;
+         desc { "selected";
+            inherit: "default";
             image.normal: "sym_down_light_selected.png";
          }
       }
-      part { name: "elm.event.icon"; type: RECT;
-         description { state: "default" 0.0;
+      rect {  "elm.event.icon";
+         desc { "default";
             rel1.relative: 0.0 0.0;
-            rel1.to: "top";
+            rel1.to: "top_clip";
             rel2.relative: 0.0 1.0;
-            rel2.to: "top";
+            rel2.to: "top_clip";
             align: 0.0 0.5;
             aspect: 1.0 1.0; aspect_preference: VERTICAL;
             color: 0 0 0 0;
          }
       }
-      part { name: "elm.event.titlebar"; type: RECT;
-         description { state: "default" 0.0;
+      rect {  "elm.event.titlebar";
+         desc { "default";
             rel1.relative: 1.0 0.0;
             rel1.to_x: "elm.event.icon";
-            rel1.to_y: "top";
+            rel1.to_y: "top_clip";
             rel2.relative: 0.0 1.0;
             rel2.offset: 0 -1;
             rel2.to_x: "elm.event.minimize";
-            rel2.to_y: "top";
+            rel2.to_y: "top_clip";
             color: 0 0 0 0;
          }
       }
-      part { name: "elm.event.close"; type: RECT;
-         description { state: "default" 0.0;
+      rect {  "elm.event.close";
+         desc { "default";
+            rel.to: "top_clip";
             rel1.relative: 1.0 0.0;
-            rel1.to: "top";
             rel2.relative: 1.0 1.0;
-            rel2.to: "top";
             align: 1.0 0.5;
             aspect: 1.0 1.0; aspect_preference: VERTICAL;
             color: 0 0 0 0;
          }
       }
-      part { name: "elm.event.maximize"; type: RECT;
-         description { state: "default" 0.0;
+      rect {  "elm.event.maximize";
+         desc { "default";
             rel1.relative: -0.25 0.0;
             rel1.offset: -1 0;
             rel1.to_x: "elm.event.close";
-            rel1.to_y: "top";
+            rel1.to_y: "top_clip";
             rel2.relative: -0.25 1.0;
             rel2.to_x: "elm.event.close";
-            rel2.to_y: "top";
+            rel2.to_y: "top_clip";
             align: 1.0 0.5;
             aspect: 1.0 1.0; aspect_preference: VERTICAL;
             color: 0 0 0 0;
          }
       }
-      part { name: "elm.event.minimize"; type: RECT;
-         description { state: "default" 0.0;
+      rect {  "elm.event.minimize";
+         desc { "default";
             rel1.relative: 0.0 0.0;
             rel1.offset: -1 0;
             rel1.to_x: "elm.event.maximize";
-            rel1.to_y: "top";
+            rel1.to_y: "top_clip";
             rel2.relative: 0.0 1.0;
-            rel2.to_y: "top";
+            rel2.to_y: "top_clip";
             rel2.to_x: "elm.event.maximize";
             align: 1.0 0.5;
             aspect: 1.0 1.0; aspect_preference: VERTICAL;
             color: 0 0 0 0;
          }
       }
-      part { name: "elm.event.resize.tl"; type: RECT;
-         description { state: "default" 0.0;
-            rel1.to: "top";
+      rect {  "elm.event.resize.tl";
+         clip: "top_clip";
+         desc { "default";
+            rel.to: "top_clip";
             rel2.relative: 0.0 0.0;
-            rel2.to: "top";
             min: 32 4;
             align: 0.0 0.0;
             color: 0 0 0 0;
             fixed: 1 1;
          }
+         desc { "hidden"; inherit: "default"; hid; }
       }
-      part { name: "elm.event.resize.t"; type: RECT;
-         description { state: "default" 0.0;
+      rect {  "elm.event.resize.t";
+         clip: "top_clip";
+         desc { "default";
             rel1.relative: 1.0 0.0;
-            rel1.to_y: "top";
+            rel1.to_y: "top_clip";
             rel1.to_x: "elm.event.resize.tl";
             rel2.relative: 0.0 0.0;
             rel2.to_x: "elm.event.resize.tr";
-            rel2.to_y: "top";
+            rel2.to_y: "top_clip";
             min: 0 4;
             align: 0.5 0.0;
             color: 0 0 0 0;
             fixed: 1 1;
          }
+         desc { "hidden"; inherit: "default"; hid; }
       }
-      part { name: "elm.event.resize.tr"; type: RECT;
-         description { state: "default" 0.0;
+      rect {  "elm.event.resize.tr";
+         clip: "top_clip";
+         desc { "default";
+            rel.to: "top_clip";
             rel1.relative: 1.0 0.0;
-            rel1.to: "top";
             rel2.relative: 1.0 0.0;
-            rel2.to: "top";
             min: 32 4;
             align: 1.0 0.0;
             color: 0 0 0 0;
             fixed: 1 1;
          }
+         desc { "hidden"; inherit: "default"; hid; }
       }
-      part { name: "bottom"; type: RECT; mouse_events: 0;
-         description { state: "default" 0.0;
-            color_class: "border_bottom";
-            color: 64 64 64 255;
-            rel1.relative: 0.0 1.0;
-            rel1.offset: 0 -5;
-            rel1.to: "shadow_spacer";
-            rel2.to: "shadow_spacer";
+      /* bottom border - spacer and clipper */
+      rect { "bottom_clip";
+         desc { "default";
+            rel.to: "shadow_spacer";
+            rel1 { relative: 0.0 1.0; offset: 0 -5; }
             min: 0 5;
             fixed: 0 1;
          }
-         description { state: "shaded" 0.0;
-            inherit: "default" 0.0;
+         desc { "hidden";
+            inherit: "default";
+            rel1 { relative: 0.0 1.0; offset: 0 0; }
             min: 0 0;
-            visible: 0;
+            hid;
          }
-         description { state: "max" 0.0;
-            inherit: "default" 0.0;
-            min: 0 0;
-            visible: 0;
+      }
+      rect { "bottom";
+         nomouse;
+         desc { "default";
+            color_class: "border_bottom";
+            color: 64 64 64 255; /* FIXME */
+            rel.to: "bottom_clip";
          }
       }
-      part { name: "bevel2"; mouse_events: 0;
-         description { state: "default" 0.0;
+      image { "bevel2"; nomouse;
+         clip: "bottom_clip";
+         desc { "default";
             image.normal: "bevel_dark_out.png";
             image.border: 1 1 1 1;
             image.middle: 0;
-            rel1.to: "bottom";
-            rel2.to: "bottom";
+            rel.to: "bottom_clip";
             fill.smooth: 0;
          }
-         description { state: "shaded" 0.0;
-            inherit: "default" 0.0;
-            visible: 0;
-         }
-         description { state: "max" 0.0;
-            inherit: "default" 0.0;
-            visible: 0;
-         }
       }
-      part { name: "elm.event.resize.bl"; type: RECT;
-         description { state: "default" 0.0;
+      rect {  "elm.event.resize.bl";
+         clip: "bottom_clip";
+         desc { "default";
             rel1.relative: 0.0 1.0;
-            rel1.to: "bottom";
+            rel1.to: "bottom_clip";
             rel2.relative: 0.0 1.0;
-            rel2.to: "bottom";
+            rel2.to: "bottom_clip";
             min: 32 5;
             align: 0.0 1.0;
             color: 0 0 0 0;
             fixed: 1 1;
          }
-         description { state: "shaded" 0.0;
-            inherit: "default" 0.0;
-            min: 0 0;
-            visible: 0;
-         }
-         description { state: "max" 0.0;
-            inherit: "default" 0.0;
-            min: 0 0;
-            visible: 0;
-         }
+         desc { "hidden"; inherit: "default"; hid; }
       }
-      part { name: "elm.event.resize.b"; type: RECT;
-         description { state: "default" 0.0;
+      rect {  "elm.event.resize.b";
+         clip: "bottom_clip";
+         desc { "default";
             rel1.relative: 1.0 1.0;
             rel1.to_x: "elm.event.resize.tl";
-            rel1.to_y: "bottom";
+            rel1.to_y: "bottom_clip";
             rel1.offset: 0 -1;
             rel2.relative: 0.0 1.0;
             rel2.to_x: "elm.event.resize.tr";
-            rel2.to_y: "bottom";
+            rel2.to_y: "bottom_clip";
             min: 0 5;
             align: 0.5 1.0;
             color: 0 0 0 0;
             fixed: 0 1;
          }
-         description { state: "shaded" 0.0;
-            inherit: "default" 0.0;
-            min: 0 0;
-            visible: 0;
-         }
-         description { state: "max" 0.0;
-            inherit: "default" 0.0;
-            min: 0 0;
-            visible: 0;
-         }
+         desc { "hidden"; inherit: "default"; hid; }
       }
-      part { name: "elm.event.resize.br"; type: RECT;
-         description { state: "default" 0.0;
+      rect {  "elm.event.resize.br";
+         clip: "bottom_clip";
+         desc { "default";
             rel1.relative: 1.0 1.0;
-            rel1.to: "bottom";
+            rel1.to: "bottom_clip";
             rel2.relative: 1.0 1.0;
-            rel2.to: "bottom";
+            rel2.to: "bottom_clip";
             min: 32 5;
             align: 1.0 1.0;
             color: 0 0 0 0;
             fixed: 1 1;
          }
-         description { state: "shaded" 0.0;
-            inherit: "default" 0.0;
-            min: 0 0;
-            visible: 0;
-         }
-         description { state: "max" 0.0;
-            inherit: "default" 0.0;
-            min: 0 0;
-            visible: 0;
-         }
+         desc { "hidden"; inherit: "default"; hid; }
       }
-      part { name: "shine"; mouse_events: 0;
-         description { state: "default" 0.0;
+      /* top title bar decoration */
+      image { "shine"; nomouse;
+         clip: "top_clip";
+         desc { "default";
             image.normal: "shine.png";
+            rel.to: "top_clip";
             rel1.offset: 0 -2;
-            rel1.to: "top";
             rel2.relative: 1.0 0.0;
             rel2.offset: -1 2;
-            rel2.to: "top";
             FIXED_SIZE(69, 5)
          }
       }
    }
+
+#define BORDERLESS 1
+#define MAXIMIZED  2
+#define SET_MODE(a) script { new m = get_int(border_mode); m |= (a); 
set_int(border_mode, m); eval_mode(m); }
+#define UNSET_MODE(a) script { new m = get_int(border_mode); m &= ~(a); 
set_int(border_mode, m); eval_mode(m); }
+
    programs {
+      script {
+         public border_mode;
+         public eval_mode(m) {
+            if (m & (BORDERLESS | MAXIMIZED)) {
+               set_state(PART:"bottom_clip", "hidden", 0.0);
+            } else {
+               set_state(PART:"bottom_clip", "default", 0.0);
+            }
+         }
+      }
+      program {
+         signal: "elm,state,borderless,on"; source: "elm";
+         action: STATE_SET "hidden";
+         targets: "top_clip" "bottom_clip";
+         after: "borderless,on";
+      }
+      program { "borderless,on"; SET_MODE(BORDERLESS); }
+      program {
+         signal: "elm,state,borderless,off"; source: "elm";
+         action: STATE_SET "default";
+         targets: "top_clip" "bottom_clip";
+         after: "borderless,off";
+      }
+      program { "borderless,off"; UNSET_MODE(BORDERLESS); }
       program {
          signal: "elm,state,shadow,on"; source: "elm";
-         action: STATE_SET "default" 0.0;
-         target: "shadow_clip";
+         action: STATE_SET "default";
+         targets: "shadow_spacer" "shadow";
       }
       program {
          signal: "elm,state,shadow,off"; source: "elm";
-         action: STATE_SET "hidden" 0.0;
-         target: "shadow_clip";
+         action: STATE_SET "hidden";
+         targets: "shadow_spacer" "shadow";
       }
       program {
          signal: "elm,state,background,solid,on"; source: "elm";
-        action: STATE_SET "visible" 0.0;
-        target: "elm.rect.background";
+         action: STATE_SET "visible";
+         target: "elm.rect.background";
       }
       program {
          signal: "elm,state,background,solid,off"; source: "elm";
-        action: STATE_SET "default" 0.0;
-        target: "elm.rect.background";
+         action: STATE_SET "default";
+         target: "elm.rect.background";
       }
       program {
          signal: "elm,action,focus"; source: "elm";
-         action: STATE_SET "focused" 0.0;
+         action: STATE_SET "focused";
          target: "top";
          target: "elm.text.title";
          target: "title2";
@@ -663,7 +674,7 @@ group { name: "elm/border/base/default";
       }
       program {
          signal: "elm,action,unfocus"; source: "elm";
-         action: STATE_SET "default" 0.0;
+         action: STATE_SET "default";
          target: "top";
          target: "elm.text.title";
          target: "title2";
@@ -672,48 +683,48 @@ group { name: "elm/border/base/default";
       }
       program {
          signal: "elm,state,urgent"; source: "elm";
-         action: STATE_SET "bounce1" 0.0;
+         action: STATE_SET "bounce1";
          target: "icon";
          after: "urg1";
       }
       program { name: "urg1";
-         action: STATE_SET "bounce2" 0.0;
+         action: STATE_SET "bounce2";
          transition: DECELERATE 0.4;
          target: "icon";
          after: "urg2";
       }
       program { name: "urg2";
-         action: STATE_SET "bounce1" 0.0;
+         action: STATE_SET "bounce1";
          transition: ACCELERATE 0.3;
          target: "icon";
          after: "urg1";
       }
       program {
          signal: "elm,state,not_urgent"; source: "elm";
-         action: STATE_SET "default" 0.0;
+         action: STATE_SET "default";
          target: "icon";
       }
       program { name: "spin";
          signal: "elm,state,hung"; source: "elm";
-         action: STATE_SET "spin" 0.0;
+         action: STATE_SET "spin";
          transition: LINEAR 1.0;
          target: "knob_spinner";
          after: "spin2";
       }
       program { name: "spin2";
-         action: STATE_SET "default" 0.0;
+         action: STATE_SET "default";
          target: "knob_spinner";
          after: "spin";
       }
       program {
          signal: "elm,state,hung"; source: "elm";
-         action: STATE_SET "hung" 0.0;
+         action: STATE_SET "hung";
          transition: SINUSOIDAL 0.25;
          target: "busy_clip";
       }
       program {
          signal: "elm,state,unhung"; source: "elm";
-         action: STATE_SET "default" 0.0;
+         action: STATE_SET "default";
          transition: SINUSOIDAL 1.0;
          target: "busy_clip";
          after: "spin3";
@@ -725,124 +736,82 @@ group { name: "elm/border/base/default";
          after: "spin4";
       }
       program { name: "spin4";
-         action: STATE_SET "default" 0.0;
+         action: STATE_SET "default";
          target: "knob_spinner";
       }
+
+      /* maximize & unmaximize */
       program {
-         signal: "elm,state,shaded"; source: "elm";
-         action: STATE_SET "shaded" 0.0;
-         target: "shadow";
-         after: "shading";
-      }
-      program { name: "shading";
-//         signal: "elm,state,shading"; source: "elm";
-         action: STATE_SET "shaded" 0.0;
-         target: "elm.swallow.client";
+         signal: "elm,state,maximize*"; source: "elm";
+         action: STATE_SET "max";
          target: "elm.spacer.opaque";
-         target: "bottom";
-         target: "bevel2";
-         target: "elm.event.resize.bl";
-         target: "elm.event.resize.b";
-         target: "elm.event.resize.br";
       }
       program {
-         signal: "elm,state,unshading"; source: "elm";
-         action: STATE_SET "default" 0.0;
-         target: "bottom";
-         target: "elm.spacer.opaque";
-         target: "bevel2";
-         target: "elm.event.resize.bl";
-         target: "elm.event.resize.b";
-         target: "elm.event.resize.br";
-         target: "client_clip";
-         after: "unshading";
-      }
-      program { name: "unshading";
-//         signal: "elm,state,unshading"; source: "elm";
-         action: STATE_SET "default" 0.0;
-         target: "elm.swallow.client";
-         target: "shadow";
-         target: "client_clip";
-      }
-//      program {
-//         signal: "e,action,maximize"; source: "elm";
-//      }
-//      program {
-//         signal: "e,action,unmaximize"; source: "elm";
-//      }
-//      program {
-//         signal: "e,action,maximize,fullscreen"; source: "elm";
-//      }
-//      program {
-//         signal: "e,action,unmaximize,fullscreen"; source: "elm";
-//      }
-      program {
          signal: "elm,state,maximize*"; source: "elm";
-         action: STATE_SET "max" 0.0;
-         target: "elm.swallow.client";
-         target: "elm.spacer.opaque";
-         target: "bottom";
-         target: "bevel2";
-         target: "shadow_spacer";
-         target: "elm.event.resize.bl";
-         target: "elm.event.resize.b";
-         target: "elm.event.resize.br";
+         action: STATE_SET "hidden";
+         targets: "elm.event.resize.t" "elm.event.resize.tl" 
"elm.event.resize.tr" "bottom_clip";
+         after: "maximized,on";
       }
+      program { "maximized,on"; SET_MODE(MAXIMIZED); }
       program {
          signal: "elm,state,unmaximize*"; source: "elm";
-         action: STATE_SET "default" 0.0;
-         target: "elm.swallow.client";
+         action: STATE_SET "default";
          target: "elm.spacer.opaque";
-         target: "bottom";
-         target: "bevel2";
-         target: "shadow_spacer";
-         target: "elm.event.resize.bl";
-         target: "elm.event.resize.b";
-         target: "elm.event.resize.br";
       }
+      program {
+         signal: "elm,state,unmaximize*"; source: "elm";
+         action: STATE_SET "default";
+         targets: "elm.event.resize.t" "elm.event.resize.tl" 
"elm.event.resize.tr" "bottom_clip";
+         after: "maximized,off";
+      }
+      program { "maximized,off"; UNSET_MODE(MAXIMIZED); }
+
+      /* application desktop menu */
       program { name: "show_menu";
          signal: "elm,action,show_menu"; source: "elm";
-         action: STATE_SET "visible" 0.0;
+         action: STATE_SET "visible";
          target: "elm.swallow.menu";
       }
       program { name: "hide_menu";
          signal: "elm,action,hide"; source: "elm";
-         action: STATE_SET "default" 0.0;
+         action: STATE_SET "default";
          target: "elm.swallow.menu";
       }
+
+      /* minimize, maximize & close buttons */
       program {
          signal: "mouse,down,*"; source: "elm.event.close";
-         action: STATE_SET "selected" 0.0;
+         action: STATE_SET "selected";
          target: "close1";
          target: "close2";
       }
       program {
          signal: "mouse,up,*"; source: "elm.event.close";
-         action: STATE_SET "default" 0.0;
+         action: STATE_SET "default";
          target: "close1";
          target: "close2";
       }
       program {
          signal: "mouse,down,*"; source: "elm.event.maximize";
-         action: STATE_SET "selected" 0.0;
+         action: STATE_SET "selected";
          target: "max1";
          target: "max2";
       }
       program {
          signal: "mouse,up,*"; source: "elm.event.maximize";
-         action: STATE_SET "default" 0.0;
+         action: STATE_SET "default";
          target: "max1";
          target: "max2";
       }
       program {
          signal: "mouse,down,*"; source: "elm.event.minimize";
-         action: STATE_SET "selected" 0.0;
+         action: STATE_SET "selected";
          target: "min1";
          target: "min2";
       }
       program {
          signal: "mouse,up,*"; source: "elm.event.minimize";
-         action: STATE_SET "default" 0.0;
+         action: STATE_SET "default";
          target: "min1";
          target: "min2";
       }
@@ -944,3 +913,9 @@ group { name: "elm/border/base/default";
       }
    }
 }
+
+#undef BORDERLESS
+#undef MAXIMIZED
+#undef SET_MODE
+#undef UNSET_MODE
+

-- 


Reply via email to