b68b6b2432c270a5675e0d834502122a5fbfd909
[platform/framework/web/web-provider.git] / src / Plugin / AppBoxPlugin / AppBoxRenderBuffer.h
1 /*
2  * Copyright (c) 2013 Samsung Electronics Co., Ltd All Rights Reserved
3  *
4  *    Licensed under the Flora License, Version 1.0 (the "License");
5  *    you may not use this file except in compliance with the License.
6  *    You may obtain a copy of the License at
7  *
8  *        http://floralicense.org/license/
9  *
10  *    Unless required by applicable law or agreed to in writing, software
11  *    distributed under the License is distributed on an "AS IS" BASIS,
12  *    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  *    See the License for the specific language governing permissions and
14  *    limitations under the License.
15  */
16 /**
17  * @file    AppBoxRenderBuffer.h
18  * @author  Yunchan Cho (yunchan.cho@samsung.com)
19  */
20 #ifndef APP_BOX_RENDER_BUFFER_H
21 #define APP_BOX_RENDER_BUFFER_H
22
23 #include <string.h>
24 #include <Core/Buffer/BoxRenderBuffer.h>
25
26 struct _Ecore_Timer;
27 typedef _Ecore_Timer Ecore_Timer;
28
29 class AppBoxRenderBuffer: public BoxRenderBuffer {
30     public:
31         static IRenderBufferPtr create(
32                 std::string boxId, std::string instanceId,
33                 int width, int height, std::string data)
34         {
35             return IRenderBufferPtr(new AppBoxRenderBuffer(
36                         boxId, instanceId, width, height, data));
37         }
38         ~AppBoxRenderBuffer();
39
40     private:
41         void didHandleTouchEvent(
42                 TouchType type, double timestamp, double x, double y);
43         void deleteTouchTimer();
44         static Eina_Bool fireTouchTimerCallback(void* data);
45
46         AppBoxRenderBuffer(
47                 std::string boxId, std::string instanceId, 
48                 int width, int height, std::string data);
49
50         // members
51         std::string m_boxId;
52         std::string m_instanceId;
53         bool m_mouseEventRecievable;
54         Ecore_Timer* m_touchTimer;
55         AppBoxRenderView* m_renderView;
56
57         friend class AppBoxRenderView;
58 };
59
60 #endif // APP_BOX_RENDER_BUFFER_H