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

« back to all changes in this revision

Viewing changes to clutter/cogl/cogl/cogl-bitmap.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
 * Cogl
 
3
 *
 
4
 * An object oriented GL/GLES Abstraction/Utility Layer
 
5
 *
 
6
 * Copyright (C) 2007,2008,2009 Intel Corporation.
 
7
 *
 
8
 * This library is free software; you can redistribute it and/or
 
9
 * modify it under the terms of the GNU Lesser General Public
 
10
 * License as published by the Free Software Foundation; either
 
11
 * version 2 of the License, or (at your option) any later version.
 
12
 *
 
13
 * This library is distributed in the hope that it will be useful,
 
14
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 
15
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 
16
 * Lesser General Public License for more details.
 
17
 *
 
18
 * You should have received a copy of the GNU Lesser General Public
 
19
 * License along with this library. If not, see <http://www.gnu.org/licenses/>.
 
20
 *
 
21
 *
 
22
 */
 
23
 
 
24
#if !defined(__COGL_H_INSIDE__) && !defined(CLUTTER_COMPILATION)
 
25
#error "Only <cogl/cogl.h> can be included directly."
 
26
#endif
 
27
 
 
28
#ifndef __COGL_BITMAP_H__
 
29
#define __COGL_BITMAP_H__
 
30
 
 
31
#include <cogl/cogl-types.h>
 
32
 
 
33
G_BEGIN_DECLS
 
34
 
 
35
/**
 
36
 * SECTION:cogl-bitmap
 
37
 * @short_description: Fuctions for loading images
 
38
 *
 
39
 * Cogl allows loading image data into memory as CoglBitmaps without
 
40
 * loading them immediately into GPU textures.
 
41
 *
 
42
 * #CoglBitmap is available since Cogl 1.0
 
43
 */
 
44
 
 
45
 
 
46
/**
 
47
 * cogl_bitmap_new_from_file:
 
48
 * @filename: the file to load.
 
49
 * @error: a #GError or %NULL.
 
50
 *
 
51
 * Loads an image file from disk. This function can be safely called from
 
52
 * within a thread.
 
53
 *
 
54
 * Return value: a #CoglHandle to the new loaded image data, or
 
55
 *   %COGL_INVALID_HANDLE if loading the image failed.
 
56
 *
 
57
 * Since: 1.0
 
58
 */
 
59
CoglHandle
 
60
cogl_bitmap_new_from_file (const char *filename,
 
61
                           GError **error);
 
62
 
 
63
/**
 
64
 * cogl_bitmap_get_size_from_file:
 
65
 * @filename: the file to check
 
66
 * @width: (out): return location for the bitmap width, or %NULL
 
67
 * @height: (out): return location for the bitmap height, or %NULL
 
68
 *
 
69
 * Parses an image file enough to extract the width and height
 
70
 * of the bitmap.
 
71
 *
 
72
 * Return value: %TRUE if the image was successfully parsed
 
73
 *
 
74
 * Since: 1.0
 
75
 */
 
76
gboolean
 
77
cogl_bitmap_get_size_from_file (const char *filename,
 
78
                                int *width,
 
79
                                int *height);
 
80
 
 
81
/**
 
82
 * cogl_is_bitmap:
 
83
 * @handle: a #CoglHandle for a bitmap
 
84
 *
 
85
 * Checks whether @handle is a #CoglHandle for a bitmap
 
86
 *
 
87
 * Return value: %TRUE if the passed handle represents a bitmap,
 
88
 *   and %FALSE otherwise
 
89
 *
 
90
 * Since: 1.0
 
91
 */
 
92
gboolean
 
93
cogl_is_bitmap (CoglHandle handle);
 
94
 
 
95
G_END_DECLS
 
96
 
 
97
#endif /* __COGL_BITMAP_H__ */