~ubuntu-branches/ubuntu/vivid/clutter-1.0/vivid-proposed

« back to all changes in this revision

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

  • Committer: Bazaar Package Importer
  • Author(s): Emilio Pozuelo Monfort
  • Date: 2010-07-18 17:21:49 UTC
  • mfrom: (1.2.1 upstream) (4.1.3 experimental)
  • Revision ID: james.westby@ubuntu.com-20100718172149-j6s9u4chocaoykme
Tags: 1.2.12-1
* New upstream release.
* debian/libclutter-1.0-0.symbols,
  debian/rules:
  - Add a symbols file.
* debian/rules,
  debian/source/format:
  - Switch to source format 3.0 (quilt).
* debian/control.in:
  - Standards-Version is 3.9.0, no changes needed.
* Upload to unstable.

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, see <http://www.gnu.org/licenses/>.
 
22
 *
 
23
 *
 
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
  guint8          *data;
 
37
  CoglPixelFormat  format;
 
38
  int              width;
 
39
  int              height;
 
40
  int              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 (CoglBitmap *dst_bmp);
 
72
 
 
73
gboolean
 
74
_cogl_bitmap_fallback_unpremult (CoglBitmap *dst_bmp);
 
75
 
 
76
gboolean
 
77
_cogl_bitmap_premult (CoglBitmap *dst_bmp);
 
78
 
 
79
gboolean
 
80
_cogl_bitmap_fallback_premult (CoglBitmap *dst_bmp);
 
81
 
 
82
gboolean
 
83
_cogl_bitmap_from_file (CoglBitmap  *bmp,
 
84
                        const char *filename,
 
85
                        GError     **error);
 
86
 
 
87
gboolean
 
88
_cogl_bitmap_fallback_from_file (CoglBitmap  *bmp,
 
89
                                 const char *filename);
 
90
 
 
91
gboolean
 
92
_cogl_bitmap_convert_premult_status (CoglBitmap      *bmp,
 
93
                                     CoglPixelFormat  dst_format);
 
94
 
 
95
gboolean
 
96
_cogl_bitmap_convert_format_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
                             int         src_x,
 
104
                             int         src_y,
 
105
                             int         dst_x,
 
106
                             int         dst_y,
 
107
                             int         width,
 
108
                             int         height);
 
109
 
 
110
gboolean
 
111
_cogl_bitmap_get_size_from_file (const char *filename,
 
112
                                 int        *width,
 
113
                                 int        *height);
 
114
 
 
115
#endif /* __COGL_BITMAP_H */