2 * Copyright (c) 2013 Samsung Electronics Co., Ltd All Rights Reserved
4 * Licensed under the Flora License, Version 1.1 (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
8 * http://floralicense.org/license/
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.
17 * @file BoxRenderBuffer.h
18 * @author Yunchan Cho (yunchan.cho@samsung.com)
20 #ifndef BOX_RENDER_BUFFER_H
21 #define BOX_RENDER_BUFFER_H
24 #include <provider_buffer.h>
25 #include "IRenderBuffer.h"
26 #include "RenderBuffer.h"
28 #define EXPORT_CLASS __attribute__ ((visibility("default"))
30 class EXPORT_CLASS BoxRenderBuffer: public RenderBuffer {
33 TOUCH_EVENT_UNRECOGNIZED = -1,
39 static IRenderBufferPtr create(
40 std::string boxId, std::string instanceId,
41 int width, int height)
43 return IRenderBufferPtr(new BoxRenderBuffer(
44 boxId, instanceId, width, height));
50 // this function may be overriden by derived class
51 virtual void didHandleTouchEvent(
52 TouchType type, double timestamp, double x, double y);
55 std::string boxId, std::string instanceId,
56 int width, int height);
59 // RenderBuffer Implementation
60 int getWidth() { return m_width; };
61 int getHeight() { return m_height; };
62 void setWidth(int width) { m_width = width; };
63 void setHeight(int height) { m_height = height; };
64 BufferInfoPtr acquireBuffer();
68 static int handleTouchEventCallback(
69 BufferInfoPtr bufferInfo,
78 std::string m_instanceId;
83 #endif // BOX_RENDER_BUFFER_H