2 * Copyright (c) 2013, TOYOTA MOTOR CORPORATION.
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
10 * @brief touch action of menu
14 #ifndef __CICO_HS_SWIPE_TOUCH_H__
15 #define __CICO_HS_SWIPE_TOUCH_H__
18 #include <libwebsockets.h>
22 #include "CicoHSSwipeInputWindow.h"
23 #include "CicoHSControlBarWindow.h"
24 #include "CicoHSAppHistoryExt.h"
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
33 #define ICO_HS_MAX_SWIPEWINDOWS 4
35 class CicoHSSwipeTouch
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);
47 static CicoHSControlBarWindow* ctl_bar_window;
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;
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;
63 CicoHSSwipeTouch operator=(const CicoHSSwipeTouch&);
64 CicoHSSwipeTouch(const CicoHSSwipeTouch&);
67 // vim: set expandtab ts=4 sw=4: