2 * Copyright 2012 Samsung Electronics Co., Ltd
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
8 * http://www.tizenopensource.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 #ifndef __PROVIDER_BUFFER_H
18 #define __PROVIDER_BUFFER_H
26 * This enumeration value has to be sync'd with the liblivebox interface. (only for inhouse livebox)
36 * This enumeration value should be sync'd with liblivebox interface. (only for inhouse livebox)
39 BUFFER_EVENT_ENTER, /*!< */
40 BUFFER_EVENT_LEAVE, /*!< */
41 BUFFER_EVENT_DOWN, /*!< */
42 BUFFER_EVENT_MOVE, /*!< */
43 BUFFER_EVENT_UP, /*!< */
46 struct livebox_buffer;
55 * \param[in] pixel_size
59 extern struct livebox_buffer *provider_buffer_acquire(enum target_type type, const char *pkgname, const char *id, int width, int height, int pixel_size, int (*handler)(struct livebox_buffer *, enum buffer_event, double, double, double, void *data), void *data);
68 extern int provider_buffer_resize(struct livebox_buffer *info, int w, int h);
75 extern void *provider_buffer_ref(struct livebox_buffer *info);
82 extern int provider_buffer_unref(void *ptr);
89 extern int provider_buffer_release(struct livebox_buffer *info);
96 extern int provider_buffer_sync(struct livebox_buffer *info);
99 * \brief Get the buffer type
101 * \return target type PD or LB
103 extern enum target_type provider_buffer_type(struct livebox_buffer *info);
106 * \brief Get the package name
110 extern const char *provider_buffer_pkgname(struct livebox_buffer *info);
117 extern const char *provider_buffer_id(struct livebox_buffer *info);
124 * \param[out] pixel_size
127 extern int provider_buffer_get_size(struct livebox_buffer *info, int *w, int *h, int *pixel_size);
130 * \brief Getting the PIXMAP id of mapped on this livebox_buffer
132 * \return 0 if fails or pixmap ID
134 extern unsigned long provider_buffer_pixmap_id(struct livebox_buffer *info);
141 extern int provider_buffer_init(void *disp);
147 extern int provider_buffer_fini(void);
151 extern int provider_buffer_pixmap_is_support_hw(struct livebox_buffer *info);
155 extern int provider_buffer_pixmap_create_hw(struct livebox_buffer *info);
159 extern int provider_buffer_pixmap_destroy_hw(struct livebox_buffer *info);
163 extern void *provider_buffer_pixmap_hw_addr(struct livebox_buffer *info);
167 extern int provider_buffer_pre_render(struct livebox_buffer *info);
171 extern int provider_buffer_post_render(struct livebox_buffer *info);