2 * Copyright 2013 Samsung Electronics Co., Ltd
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.
20 enum buffer_type { /*!< Must have to be sync with libprovider, liblivebox-viewer */
32 * \param[in] pixel_size
35 extern struct buffer_info *buffer_handler_create(struct inst_info *inst, enum buffer_type type, int w, int h, int pixel_size);
42 extern int buffer_handler_destroy(struct buffer_info *info);
49 extern int buffer_handler_load(struct buffer_info *info);
56 extern int buffer_handler_unload(struct buffer_info *info);
63 extern int buffer_handler_is_loaded(const struct buffer_info *info);
66 * \brief Reallocate buffer
72 extern int buffer_handler_resize(struct buffer_info *info, int w, int h);
75 * \brief Only update the size information
81 extern void buffer_handler_update_size(struct buffer_info *info, int w, int h);
86 * \return const char *
88 extern const char *buffer_handler_id(const struct buffer_info *info);
94 extern enum buffer_type buffer_handler_type(const struct buffer_info *info);
97 * \brief This API is not supported for Pixmap.
101 extern void *buffer_handler_fb(struct buffer_info *info);
110 extern int buffer_handler_get_size(struct buffer_info *info, int *w, int *h);
113 * \brief This API only can be used for file type buffer
117 extern void buffer_handler_flush(struct buffer_info *info);
122 * \return 0 if fails. Return value should be casted to Pixmap type
124 extern int buffer_handler_pixmap(const struct buffer_info *info);
131 extern void *buffer_handler_pixmap_acquire_buffer(struct buffer_info *info);
138 extern int buffer_handler_pixmap_release_buffer(void *canvas);
144 extern int buffer_handler_init(void);
150 extern int buffer_handler_fini(void);
152 extern void *buffer_handler_pixmap_ref(struct buffer_info *info);
154 extern int buffer_handler_pixmap_unref(void *buffer_ptr);
156 extern void *buffer_handler_pixmap_find(int pixmap);
158 extern void *buffer_handler_pixmap_buffer(struct buffer_info *info);
160 extern struct inst_info *buffer_handler_instance(struct buffer_info *info);