[MOVE] Add: Set Animation Start Position of Quickpanel which exists on screen. 05/9805/2
authorMun, Gwan-gyeong <kk.moon@samsung.com>
Wed, 7 Aug 2013 06:15:37 +0000 (15:15 +0900)
committerMun, Gwan-gyeong <kk.moon@samsung.com>
Wed, 7 Aug 2013 07:48:10 +0000 (16:48 +0900)
Change-Id: I59950201c13db52ea1dc0b3ca81f6338027363e0

move-tizen/src/e_mod_move.c
move-tizen/src/e_mod_move_indicator.c
move-tizen/src/e_mod_move_indicator_widget.c
move-tizen/src/e_mod_move_quickpanel.c
move-tizen/src/e_mod_move_quickpanel.h

index 7265014..6b0f8e2 100644 (file)
@@ -2088,7 +2088,8 @@ _e_mod_move_msg_window_show(Ecore_X_Event_Client_Message *ev)
 
              e_mod_move_quickpanel_e_border_move(qp_mb, mx, my);
              e_mod_move_quickpanel_objs_animation_start_position_set(qp_mb,
-                                                                     angles[0]);
+                                                                     angles[0],
+                                                                     EINA_FALSE);
              e_mod_move_quickpanel_objs_animation_move(qp_mb, ax, ay);
              L(LT_EVENT_X,
                "[MOVE] ev:%15.15s Quickpanel Show %s():%d\n",
@@ -2273,6 +2274,9 @@ _e_mod_move_msg_window_show(Ecore_X_Event_Client_Message *ev)
              e_mod_move_quickpanel_anim_state_send(qp_mb, EINA_TRUE);
 
              e_mod_move_quickpanel_e_border_move(qp_mb, mx, my);
+             e_mod_move_quickpanel_objs_animation_start_position_set(qp_mb,
+                                                                     angles[0],
+                                                                     EINA_TRUE);
              e_mod_move_quickpanel_objs_animation_move(qp_mb, ax, ay);
              L(LT_EVENT_X,
                "[MOVE] ev:%15.15s Quickpanel Hide %s():%d\n",
@@ -2531,7 +2535,8 @@ _e_mod_move_msg_qp_state(Ecore_X_Event_Client_Message *ev)
 
         e_mod_move_quickpanel_e_border_move(qp_mb, mx, my);
         e_mod_move_quickpanel_objs_animation_start_position_set(qp_mb,
-                                                                angles[0]);
+                                                                angles[0],
+                                                                EINA_FALSE);
         e_mod_move_quickpanel_objs_animation_move(qp_mb, ax, ay);
      }
    else if ((!open) && (state))// Quickpanel Close
@@ -2645,6 +2650,9 @@ _e_mod_move_msg_qp_state(Ecore_X_Event_Client_Message *ev)
         e_mod_move_quickpanel_anim_state_send(qp_mb, EINA_TRUE);
 
         e_mod_move_quickpanel_e_border_move(qp_mb, mx, my);
+        e_mod_move_quickpanel_objs_animation_start_position_set(qp_mb,
+                                                                angles[0],
+                                                                EINA_TRUE);
         e_mod_move_quickpanel_objs_animation_move(qp_mb, ax, ay);
      }
    else
index 7f691b4..aafccc3 100644 (file)
@@ -184,7 +184,8 @@ _e_mod_move_indicator_cb_motion_start(void *data,
           }
         _e_mod_move_indicator_quickpanel_move_set(mb, EINA_TRUE);
         e_mod_move_quickpanel_objs_animation_start_position_set(qp_mb,
-                                                                angle);
+                                                                angle,
+                                                                EINA_FALSE);
        // send quickpanel to "move start message".
        e_mod_move_quickpanel_anim_state_send(qp_mb, EINA_TRUE);
      }
index 9f95701..28344b9 100644 (file)
@@ -477,7 +477,8 @@ _e_mod_move_indicator_widget_cb_motion_start(void *data,
                {
                   _e_mod_move_indicator_widget_quickpanel_move_set(indi_widget, EINA_TRUE);
                   e_mod_move_quickpanel_objs_animation_start_position_set(qp_mb,
-                                                                          mb->angle);
+                                                                          mb->angle,
+                                                                          EINA_FALSE);
                   // send quickpanel to "move start message".
                   e_mod_move_quickpanel_anim_state_send(qp_mb, EINA_TRUE);
                }
index 33d0a29..f7f4a3c 100644 (file)
@@ -2180,9 +2180,11 @@ e_mod_move_quickpanel_dim_hide(E_Move_Border *mb)
    return EINA_TRUE;
 }
 
+// on_screen is true: quickpanel exists inside. false: quickpanel exists outside.
 EINTERN Eina_Bool
 e_mod_move_quickpanel_objs_animation_start_position_set(E_Move_Border *mb,
-                                                       int             angle)
+                                                        int            angle,
+                                                        Eina_Bool      on_screen)
 {
    int x = 0; int y = 0;
    int cx = 0; int cy = 0; int cw = 0; int ch = 0;
@@ -2198,50 +2200,79 @@ e_mod_move_quickpanel_objs_animation_start_position_set(E_Move_Border *mb,
    angle = ((angle % 360) / 90) * 90;
    contents = e_mod_move_border_contents_rect_get(mb, &cx, &cy ,&cw, &ch);
 
-   if (m->qp_scroll_with_clipping)
+   if (on_screen)
      {
-       switch (angle)
-         {
-          case 0:
-          case 90:
-          default:
-             x = mb->x; y = mb->y;
-             break;
-          case 180:
-          case 270:
-             x = mb->x + mb->w; y = mb->y + mb->h;
-             break;
+        if (m->qp_scroll_with_clipping)
+          {
+             switch (angle)
+               {
+                case 90:
+                   x = mb->x + mb->w;
+                   break;
+                case 180:
+                   y = mb->y;
+                   break;
+                case 270:
+                   x = mb->x;
+                   break;
+                case 0:
+                default:
+                   y = mb->y + mb->h;
+                   break;
+               }
           }
      }
    else
      {
-        switch (angle)
+        if (m->qp_scroll_with_clipping)
           {
-           case  90:
-              if (contents)
-                 x = cw * -1;
-              else
-                 x = mb->w * -1;
-              break;
-           case 180:
-              if (contents)
-                 y = zone->y + zone->h - cy;
-              else
-                 y = zone->y + zone->h;
-              break;
-           case 270:
-              if (contents)
-                 x = zone->x + zone->w - cx;
-              else
-                 x = zone->x + zone->w;
-              break;
-           case   0:
-           default :
-              if (contents)
-                 y = ch * -1;
-              else
-                 y = mb->h * -1;
-              break;
+             switch (angle)
+               {
+                case 90:
+                   x = zone->x;
+                   break;
+                case 180:
+                   y = zone->y + zone->h;
+                   break;
+                case 270:
+                   x = zone->x + zone->w;
+                   break;
+                case 0:
+                default:
+                   y = zone->y;
+                   break;
+               }
+          }
+        else
+          {
+             switch (angle)
+               {
+                case  90:
+                   if (contents)
+                      x = cw * -1;
+                   else
+                      x = mb->w * -1;
+                   break;
+                case 180:
+                   if (contents)
+                      y = zone->y + zone->h - cy;
+                   else
+                      y = zone->y + zone->h;
+                   break;
+                case 270:
+                   if (contents)
+                      x = zone->x + zone->w - cx;
+                   else
+                      x = zone->x + zone->w;
+                   break;
+                case   0:
+                default :
+                   if (contents)
+                      y = ch * -1;
+                   else
+                      y = mb->h * -1;
+                   break;
+               }
           }
      }
 
index eb67fe6..02adb45 100644 (file)
@@ -34,7 +34,7 @@ EINTERN Eina_Bool e_mod_move_quickpanel_internal_data_del(E_Move_Border *mb);
 EINTERN Eina_Bool e_mod_move_quickpanel_e_border_move(E_Move_Border *mb, int x, int y);
 EINTERN Eina_List* e_mod_move_quickpanel_dim_show(E_Move_Border *mb);
 EINTERN Eina_Bool e_mod_move_quickpanel_dim_hide(E_Move_Border *mb);
-EINTERN Eina_Bool e_mod_move_quickpanel_objs_animation_start_position_set(E_Move_Border *mb, int angle);
+EINTERN Eina_Bool e_mod_move_quickpanel_objs_animation_start_position_set(E_Move_Border *mb, int angle, Eina_Bool on_screen); // on_screen is true: quickpanel exists inside screen. false: quickpanel exists outside screen.
 EINTERN E_Move_Event_Cb e_mod_move_quickpanel_event_cb_get(E_Move_Event_Type type);
 EINTERN Eina_Bool e_mod_move_quickpanel_visible_check(void);
 EINTERN Eina_Bool e_mod_move_quickpanel_below_window_reset(void);