Revert "Corresponding to TizenIVI3.0 M14.3, GENIVI-LayerManagement was used instead...
[profile/ivi/ico-uxf-homescreen.git] / src / homescreen / CicoHSSwipeTouch.h
1 /*
2  * Copyright (c) 2013, TOYOTA MOTOR CORPORATION.
3  *
4  * This program is licensed under the terms and conditions of the
5  * Apache License, version 2.0.  The full text of the Apache License is at
6  * http://www.apache.org/licenses/LICENSE-2.0
7  *
8  */
9 /**
10  * @brief   touch action of menu
11  *
12  * @date    Aug-08-2013
13  */
14 #ifndef __CICO_HS_SWIPE_TOUCH_H__
15 #define __CICO_HS_SWIPE_TOUCH_H__
16 #include <stdio.h>
17 #include <pthread.h>
18 #include <libwebsockets.h>
19
20
21 #include <unistd.h>
22 #include "CicoHSSwipeInputWindow.h"
23 #include "CicoHSControlBarWindow.h"
24 #include "CicoHSAppHistoryExt.h"
25
26 #define ICO_HS_SWIPE_TOUCH_SWIPE_WIDTH  100
27 #define ICO_HS_SWIPE_TOUCH_SWIPE_HEIGHT 100
28 #define ICO_HS_SWIPE_TOUCH_DISTANCE_TOP     200
29 #define ICO_HS_SWIPE_TOUCH_DISTANCE_BOTTOM  128
30 #define ICO_HS_SWIPE_TOUCH_SWIPE_THREASHOLD_DISTANCE 60
31 #define ICO_HS_SWIPE_TOUCH_SWIPE_ANIMA_TIME 300
32
33 #define ICO_HS_MAX_SWIPEWINDOWS 4
34
35 class CicoHSSwipeTouch
36 {
37   public:
38     static void Initialize(CicoHSControlBarWindow* ctl_bar, CicoHSAppHistoryExt *apphist,
39                            int width, int height);
40     static void Finalize(void);
41     static void TouchDownSwipe(void *data, Evas *evas, Evas_Object *obj, void *event_info);
42     static void TouchUpSwipe(void *data, Evas *evas, Evas_Object *obj, void *event_info);
43     static void TouchMoveSwipe(void *data, Evas *evas, Evas_Object *obj, void *event_info);
44     static Eina_Bool LongPushed(void *data);
45
46   private:
47     static CicoHSControlBarWindow* ctl_bar_window;
48
49     static int full_width;
50     static int full_height;
51     static int touch_state_b_x;
52     static int touch_state_b_y;
53     static int touch_state_a_x;
54     static int touch_state_a_y;
55
56     static int touch_down;
57     static bool set_xy_pos;
58     static int num_windows;
59     static CicoHSSwipeInputWindow* swipe_windows[ICO_HS_MAX_SWIPEWINDOWS];
60     static CicoHSAppHistoryExt*    app_history;
61
62   protected:
63     CicoHSSwipeTouch operator=(const CicoHSSwipeTouch&);
64     CicoHSSwipeTouch(const CicoHSSwipeTouch&);
65 };
66 #endif
67 // vim: set expandtab ts=4 sw=4: