Enlightenment CVS committal

Author  : lok
Project : e_modules
Module  : notification

Dir     : e_modules/notification


Modified Files:
        e-module-notification.edc 


Log Message:
Handle the xy hint.
A click on the popup should find and focus the source application of the event.
Close button added.
Theme requirement added as a comment within the theme.

===================================================================
RCS file: /cvs/e/e_modules/notification/e-module-notification.edc,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -3 -r1.1 -r1.2
--- e-module-notification.edc   16 Jan 2008 19:28:09 -0000      1.1
+++ e-module-notification.edc   22 Feb 2008 14:53:22 -0000      1.2
@@ -1,19 +1,37 @@
+/* Guidelines for a notification theme.
+ *
+ * Groups needed :
+ *  - modules/notification/main : Main theme for the popup
+ * The theme must contains two parts :
+ *  - notification.swallow.app_icon  : Contains the notification icon
+ *  - notification.textblock.message : Contains the notification message
+ * The module can send those signals to the theme :
+ *  - notification,new : A new notification occured
+ *  - notification,del : The notification is to be deleted
+ * A notification theme must send those signals to the module :
+ *  - notification,deleted : The notification is ready to be deleted
+ * Optionally those signals can be used to add some features :
+ *  - notification,close : Close the popup
+ *  - notification,find  : Find the source application of the event
+ */
+
 images {
    image: "module_icon.png" COMP;
-       image: "e17_menu_bg_border.png" COMP;
+   image: "e17_menu_bg_border.png" COMP;
    image: "e17_dialog_watermark.png" COMP;
+   image: "close_btn.png" COMP;
 }
 
 styles {
-       style {
-               name: "notification_style";
-               base: "font=Edje-Vera font_size=11 align=left color=#3c3c3c 
wrap=word text_class=module_normal";
-               tag:  "subject"  "+ text_class=module_large font_size=16"; 
-               tag:  "/subject" "- text_class=module_large font_size=16"; 
-               tag:  "body"  "+ text_class=module_normal font_size=13"; 
-               tag:  "/body" "- text_class=module_normal"; 
-               tag:  "br" "\n";
-       }
+   style {
+      name: "notification_style";
+      base: "font=Edje-Vera font_size=11 align=left color=#3c3c3c wrap=word 
text_class=module_normal";
+      tag:  "subject"  "+ text_class=module_large font_size=16"; 
+      tag:  "/subject" "- text_class=module_large font_size=16"; 
+      tag:  "body"  "+ text_class=module_normal font_size=13"; 
+      tag:  "/body" "- text_class=module_normal"; 
+      tag:  "br" "\n";
+   }
 }
 
 collections {
@@ -39,74 +57,95 @@
       name: "modules/notification/main";
       parts {
          /* Background */
-                       part {
-                               name:          "base";
-                               mouse_events:  0;
-                               type:          RECT;
-                               description {
-                                       state:    "default" 0.0;
-                                       min:      200 90;
-                                       rel1 {
-                                               relative: 0.0  0.0;
-                                               offset:   1    1;
-                                       }
-                                       rel2 {
-                                               relative: 1.0  1.0;
-                                               offset:   -2   -2;
-                                       }
-                                       color: 221 221 221 255;
-                               }
-                       }
-                       part {
-                               name:          "base2";
-                               mouse_events:  0;
-                               description {
-                                       state:    "default" 0.0;
-                                       min:      200 90;
-                                       max:      200 90;
-                                       align:    1.0 1.0;
-                                       fixed:    1 1;
-                                       rel1 {
-                                               relative: 1.0  1.0;
-                                               offset:   -1   -1;
-                                       }
-                                       rel2 {
-                                               relative: 1.0  1.0;
-                                               offset:   -1   -1;
-                                       }
-                                       image {
-                                               normal: 
"e17_dialog_watermark.png";
-                                       }
-                               }
-                       }
-                       part {
-                               name:          "base3";
-                               mouse_events:  0;
-                               description {
-                                       state:    "default" 0.0;
-                                       rel1 {
-                                               relative: 0.0  0.0;
-                                               offset:   0    0;
-                                       }
-                                       rel2 {
-                                               relative: 1.0  1.0;
-                                               offset:   -1   -1;
-                                       }
-                                       image {
-                                               normal: 
"e17_menu_bg_border.png";
-                                               border: 1 1 1 1;
-                                               middle: 0;
-                                       }
-                                       fill {
-                                               smooth: 0;
-                                       }
-                               }
-                       }
+         part {
+            name: "base";
+            type: RECT;
+            mouse_events: 1;
+            description {
+               state: "default" 0.0;
+               min: 200 90;
+               rel1 {
+                  relative: 0.0  0.0;
+                  offset:   1    1;
+               }
+               rel2 {
+                  relative: 1.0  1.0;
+                  offset:   -2   -2;
+               }
+               color: 221 221 221 255;
+            }
+         }
+         part {
+            name: "base2";
+            mouse_events:  0;
+            description {
+               state: "default" 0.0;
+               align: 1.0 1.0;
+               fixed: 1 1;
+               min: 200 90;
+               max: 200 90;
+               rel1 {
+                  relative: 1.0  1.0;
+                  offset:   -1   -1;
+               }
+               rel2 {
+                  relative: 1.0  1.0;
+                  offset:   -1   -1;
+               }
+               image {
+                  normal: "e17_dialog_watermark.png";
+               }
+            }
+         }
+         part {
+            name: "base3";
+            mouse_events:  0;
+            description {
+               state:    "default" 0.0;
+               rel1 {
+                  relative: 0.0  0.0;
+                  offset:   0    0;
+               }
+               rel2 {
+                  relative: 1.0  1.0;
+                  offset:   -1   -1;
+               }
+               image {
+                  normal: "e17_menu_bg_border.png";
+                  border: 1 1 1 1;
+                  middle: 0;
+               }
+               fill {
+                  smooth: 0;
+               }
+            }
+         }
+
+         /* Close Button */
+         part {
+            name: "notification.close_btn";
+            description {
+               state: "default" 0.0;
+
+               rel1 {
+                  relative: 1 0;
+                  offset: -15 5;
+               }
+               rel2 {
+                  relative: 1 0;
+                  offset:  -5 15;
+               }
+               image {
+                  normal: "close_btn.png";
+               }
+            }
+         }
 
          /* App Icon */
          part {
             name: "notification.swallow.app_icon";
             type: SWALLOW;
+            mouse_events:  0;
 
             description {
                state: "default" 0.0;
@@ -124,30 +163,30 @@
                   relative: 0.0 1.0;
                   offset: 85 -127;
                }
-                               }
-                               description {
-                                       state: "high" 0.0;
-                                       inherit: "default" 0.0;
-                                       rel1.offset: 5  -63;
-                                       rel2.offset: 85 -63;
-            }
-                               description {
-                                       state: "medium" 0.0;
-                                       inherit: "default" 0.0;
+            }
+            description {
+               state: "high" 0.0;
+               inherit: "default" 0.0;
+               rel1.offset: 5  -63;
+               rel2.offset: 85 -63;
+            }
+            description {
+               state: "medium" 0.0;
+               inherit: "default" 0.0;
                rel1.offset: 5  -23;
                rel2.offset: 85 -23;
             }
-                               description {
-                                       state: "low" 0.0;
-                                       inherit: "default" 0.0;
-                                       rel1.offset: 5   5;
-                                       rel2.offset: 85 -5;
-            }
-                               description {
-                                       state: "underground" 0.0;
-                                       inherit: "default" 0.0;
-                                       rel1.offset: 5  127;
-                                       rel2.offset: 85 127;
+            description {
+               state: "low" 0.0;
+               inherit: "default" 0.0;
+               rel1.offset: 5   5;
+               rel2.offset: 85 -5;
+            }
+            description {
+               state: "underground" 0.0;
+               inherit: "default" 0.0;
+               rel1.offset: 5  127;
+               rel2.offset: 85 127;
             }
          }
 
@@ -159,12 +198,12 @@
 
             description {
                state: "default" 0.0;
-                                       align: 0.0 0.5;
-                               //      fixed: 1 1;
+               align: 0.0 0.5;
+                      //       fixed: 1 1;
 
                rel1 { 
                   to_x: "notification.swallow.app_icon";
-                                               relative: 1.0 0.5;
+                  relative: 1.0 0.5;
                   offset: 10 0; 
                }
 
@@ -180,62 +219,77 @@
             }
          }
       }
-               programs {
-                       program {
-                               name: "bounce";
-                               signal: "notification,new";
-                               source: "notification";
-                               action: STATE_SET "low" 0.0;
-                               transition: ACCELERATE 0.4;
-                               target: "notification.swallow.app_icon";
-                               after: "bounce_2";
-                       }
-                       program {
-                               name: "bounce_2";
-                               action: STATE_SET "high" 0.0;
-                               transition: DECELERATE 0.2;
-                               target: "notification.swallow.app_icon";
-                               after: "bounce_3";
-                       }
-                       program {
-                               name: "bounce_3";
-                               action: STATE_SET "low" 0.0;
-                               transition: ACCELERATE 0.2;
-                               target: "notification.swallow.app_icon";
-                               after: "bounce_4";
-                       }
-                       program {
-                               name: "bounce_4";
-                               action: STATE_SET "medium" 0.0;
-                               transition: DECELERATE 0.1;
-                               target: "notification.swallow.app_icon";
-                               after: "bounce_5";
-                       }
-                       program {
-                               name: "bounce_5";
-                               action: STATE_SET "low" 0.0;
-                               transition: LINEAR 0.1;
-                               target: "notification.swallow.app_icon";
-                       }
-
-                       program {
-                               name: "fall";
-                               signal: "notification,del";
-                               source: "notification";
-                               action: STATE_SET "underground" 0.0;
-                               transition: ACCELERATE 0.4;
-                               target: "notification.swallow.app_icon";
-                               after: "fall_2";
-                       }
-                       program {
-                               name: "fall_2";
-                               action: STATE_SET "default" 0.0;
-                               target: "notification.swallow.app_icon";
-                               after: "fall_3";
-                       }
-                       program {
-                               name: "fall_3";
-                               action: SIGNAL_EMIT "notification,deleted" 
"theme";
-                       }
+      programs {
+         program {
+            name: "bounce";
+            signal: "notification,new";
+            source: "notification";
+            action: STATE_SET "low" 0.0;
+            transition: ACCELERATE 0.4;
+            target: "notification.swallow.app_icon";
+            after: "bounce_2";
+         }
+         program {
+            name: "bounce_2";
+            action: STATE_SET "high" 0.0;
+            transition: DECELERATE 0.2;
+            target: "notification.swallow.app_icon";
+            after: "bounce_3";
+         }
+         program {
+            name: "bounce_3";
+            action: STATE_SET "low" 0.0;
+            transition: ACCELERATE 0.2;
+            target: "notification.swallow.app_icon";
+            after: "bounce_4";
+         }
+         program {
+            name: "bounce_4";
+            action: STATE_SET "medium" 0.0;
+            transition: DECELERATE 0.1;
+            target: "notification.swallow.app_icon";
+            after: "bounce_5";
+         }
+         program {
+            name: "bounce_5";
+            action: STATE_SET "low" 0.0;
+            transition: LINEAR 0.1;
+            target: "notification.swallow.app_icon";
+         }
+
+         program {
+            name: "fall";
+            signal: "notification,del";
+            source: "notification";
+            action: STATE_SET "underground" 0.0;
+            transition: ACCELERATE 0.4;
+            target: "notification.swallow.app_icon";
+            after: "fall_2";
+         }
+         program {
+            name: "fall_2";
+            action: STATE_SET "default" 0.0;
+            target: "notification.swallow.app_icon";
+            after: "fall_3";
+         }
+         program {
+            name: "fall_3";
+            action: SIGNAL_EMIT "notification,deleted" "theme";
+         }
+
+         program {
+           name: "close";
+           signal: "mouse,down,1";
+           source: "notification.close_btn";
+           action: SIGNAL_EMIT "notification,close" "theme";
+         }
+
+         program {
+           name: "find";
+           signal: "mouse,down,1";
+           source: "base";
+           action: SIGNAL_EMIT "notification,find" "theme";
+         }
+      }
    }
 }



-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
enlightenment-cvs mailing list
enlightenment-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs

Reply via email to