~oem-solutions-group/unity-2d/clutter-1.0

« back to all changes in this revision

Viewing changes to clutter/cogl/common/cogl-bitmap-private.h

  • Committer: Bazaar Package Importer
  • Author(s): Emilio Pozuelo Monfort
  • Date: 2010-03-21 13:27:56 UTC
  • mto: (2.1.3 experimental)
  • mto: This revision was merged to the branch mainline in revision 8.
  • Revision ID: james.westby@ubuntu.com-20100321132756-nf8yd30yxo3zzwcm
Tags: upstream-1.2.2
ImportĀ upstreamĀ versionĀ 1.2.2

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/*
2
 
 * Clutter COGL
3
 
 *
4
 
 * A basic GL/GLES Abstraction/Utility Layer
5
 
 *
6
 
 * Authored By Matthew Allum  <mallum@openedhand.com>
7
 
 *
8
 
 * Copyright (C) 2007 OpenedHand
9
 
 *
10
 
 * This library is free software; you can redistribute it and/or
11
 
 * modify it under the terms of the GNU Lesser General Public
12
 
 * License as published by the Free Software Foundation; either
13
 
 * version 2 of the License, or (at your option) any later version.
14
 
 *
15
 
 * This library is distributed in the hope that it will be useful,
16
 
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17
 
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
18
 
 * Lesser General Public License for more details.
19
 
 *
20
 
 * You should have received a copy of the GNU Lesser General Public
21
 
 * License along with this library; if not, write to the
22
 
 * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
23
 
 * Boston, MA 02111-1307, USA.
24
 
 */
25
 
 
26
 
#ifndef __COGL_BITMAP_H
27
 
#define __COGL_BITMAP_H
28
 
 
29
 
#include <glib.h>
30
 
 
31
 
#include "cogl-handle.h"
32
 
 
33
 
typedef struct _CoglBitmap
34
 
{
35
 
  CoglHandleObject _parent;
36
 
  guchar          *data;
37
 
  CoglPixelFormat  format;
38
 
  gint             width;
39
 
  gint             height;
40
 
  gint             rowstride;
41
 
} CoglBitmap;
42
 
 
43
 
gboolean
44
 
_cogl_bitmap_can_convert (CoglPixelFormat src, CoglPixelFormat dst);
45
 
 
46
 
gboolean
47
 
_cogl_bitmap_fallback_can_convert (CoglPixelFormat src, CoglPixelFormat dst);
48
 
 
49
 
gboolean
50
 
_cogl_bitmap_can_unpremult (CoglPixelFormat format);
51
 
 
52
 
gboolean
53
 
_cogl_bitmap_fallback_can_unpremult (CoglPixelFormat format);
54
 
 
55
 
gboolean
56
 
_cogl_bitmap_can_premult (CoglPixelFormat format);
57
 
 
58
 
gboolean
59
 
_cogl_bitmap_fallback_can_premult (CoglPixelFormat format);
60
 
 
61
 
gboolean
62
 
_cogl_bitmap_convert (const CoglBitmap *bmp,
63
 
                      CoglBitmap       *dst_bmp,
64
 
                      CoglPixelFormat   dst_format);
65
 
gboolean
66
 
_cogl_bitmap_fallback_convert (const CoglBitmap *bmp,
67
 
                               CoglBitmap       *dst_bmp,
68
 
                               CoglPixelFormat   dst_format);
69
 
 
70
 
gboolean
71
 
_cogl_bitmap_unpremult (const CoglBitmap *bmp,
72
 
                        CoglBitmap       *dst_bmp);
73
 
 
74
 
gboolean
75
 
_cogl_bitmap_fallback_unpremult (const CoglBitmap *bmp,
76
 
                                 CoglBitmap       *dst_bmp);
77
 
 
78
 
gboolean
79
 
_cogl_bitmap_premult (const CoglBitmap *bmp,
80
 
                      CoglBitmap       *dst_bmp);
81
 
 
82
 
gboolean
83
 
_cogl_bitmap_fallback_premult (const CoglBitmap *bmp,
84
 
                               CoglBitmap       *dst_bmp);
85
 
 
86
 
gboolean
87
 
_cogl_bitmap_from_file (CoglBitmap  *bmp,
88
 
                        const gchar *filename,
89
 
                        GError     **error);
90
 
 
91
 
gboolean
92
 
_cogl_bitmap_fallback_from_file (CoglBitmap  *bmp,
93
 
                                 const gchar *filename);
94
 
 
95
 
gboolean
96
 
_cogl_bitmap_convert_and_premult (const CoglBitmap *bmp,
97
 
                                  CoglBitmap       *dst_bmp,
98
 
                                  CoglPixelFormat   dst_format);
99
 
 
100
 
void
101
 
_cogl_bitmap_copy_subregion (CoglBitmap *src,
102
 
                             CoglBitmap *dst,
103
 
                             gint        src_x,
104
 
                             gint        src_y,
105
 
                             gint        dst_x,
106
 
                             gint        dst_y,
107
 
                             gint        width,
108
 
                             gint        height);
109
 
 
110
 
gboolean
111
 
_cogl_bitmap_get_size_from_file (const gchar *filename,
112
 
                                 gint        *width,
113
 
                                 gint        *height);
114
 
 
115
 
#endif /* __COGL_BITMAP_H */