17ec681f3Smrg/**************************************************************************
27ec681f3Smrg *
37ec681f3Smrg * Copyright 2009 Artur Wyszynski <harakash@gmail.com>
47ec681f3Smrg * Copyright 2013 Alexander von Gluck IV <kallisti5@unixzen.com>
57ec681f3Smrg *
67ec681f3Smrg * Permission is hereby granted, free of charge, to any person obtaining a
77ec681f3Smrg * copy of this software and associated documentation files (the
87ec681f3Smrg * "Software"), to deal in the Software without restriction, including
97ec681f3Smrg * without limitation the rights to use, copy, modify, merge, publish,
107ec681f3Smrg * distribute, sub license, and/or sell copies of the Software, and to
117ec681f3Smrg * permit persons to whom the Software is furnished to do so, subject to
127ec681f3Smrg * the following conditions:
137ec681f3Smrg *
147ec681f3Smrg * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
157ec681f3Smrg * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
167ec681f3Smrg * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL
177ec681f3Smrg * THE COPYRIGHT HOLDERS, AUTHORS AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM,
187ec681f3Smrg * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
197ec681f3Smrg * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
207ec681f3Smrg * USE OR OTHER DEALINGS IN THE SOFTWARE.
217ec681f3Smrg *
227ec681f3Smrg * The above copyright notice and this permission notice (including the
237ec681f3Smrg * next paragraph) shall be included in all copies or substantial portions
247ec681f3Smrg * of the Software.
257ec681f3Smrg *
267ec681f3Smrg **************************************************************************/
277ec681f3Smrg#ifndef __BBITMAP_WRAPPER_H__
287ec681f3Smrg#define __BBITMAP_WRAPPER_H__
297ec681f3Smrg
307ec681f3Smrg
317ec681f3Smrg#include <interface/GraphicsDefs.h>
327ec681f3Smrg#include <support/SupportDefs.h>
337ec681f3Smrg
347ec681f3Smrg
357ec681f3Smrgtypedef void Bitmap;
367ec681f3Smrg
377ec681f3Smrg#ifdef __cplusplus
387ec681f3Smrgextern "C" {
397ec681f3Smrg#endif
407ec681f3Smrg
417ec681f3Smrg
427ec681f3SmrgBitmap* create_bitmap(int32 width, int32 height, color_space colorSpace);
437ec681f3Smrgvoid delete_bitmap(Bitmap* bitmap);
447ec681f3Smrg
457ec681f3Smrgvoid copy_bitmap_bits(const Bitmap* bitmap, void* data, int32 length);
467ec681f3Smrgvoid import_bitmap_bits(const Bitmap* bitmap, void* data, int32 length,
477ec681f3Smrg	unsigned srcStride, color_space srcColorSpace);
487ec681f3Smrg
497ec681f3Smrgvoid get_bitmap_size(const Bitmap* bitmap, int32* width, int32* height);
507ec681f3Smrgcolor_space get_bitmap_color_space(const Bitmap* bitmap);
517ec681f3Smrgint32 get_bitmap_bytes_per_row(const Bitmap* bitmap);
527ec681f3Smrgint32 get_bitmap_bits_length(const Bitmap* bitmap);
537ec681f3Smrg
547ec681f3Smrgvoid dump_bitmap(const Bitmap* bitmap);
557ec681f3Smrg
567ec681f3Smrg
577ec681f3Smrg#ifdef __cplusplus
587ec681f3Smrg}
597ec681f3Smrg#endif
607ec681f3Smrg
617ec681f3Smrg
627ec681f3Smrg#endif /* __BBITMAP_WRAPPER_H__ */
63