1 /* 2 * Cogl 3 * 4 * A Low Level GPU Graphics and Utilities API 5 * 6 * Copyright (C) 2008,2009 Intel Corporation. 7 * 8 * Permission is hereby granted, free of charge, to any person 9 * obtaining a copy of this software and associated documentation 10 * files (the "Software"), to deal in the Software without 11 * restriction, including without limitation the rights to use, copy, 12 * modify, merge, publish, distribute, sublicense, and/or sell copies 13 * of the Software, and to permit persons to whom the Software is 14 * furnished to do so, subject to the following conditions: 15 * 16 * The above copyright notice and this permission notice shall be 17 * included in all copies or substantial portions of the Software. 18 * 19 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 20 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 21 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 22 * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS 23 * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN 24 * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 25 * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 26 * SOFTWARE. 27 * 28 * 29 */ 30 31 #ifndef __COGL_H__ 32 #define __COGL_H__ 33 34 #ifdef COGL_COMPILATION 35 #error "<cogl/cogl.h> shouldn't be included internally" 36 #endif 37 38 /* Note: When building Cogl .gir we explicitly define 39 * __COGL_H_INSIDE__ */ 40 #ifndef __COGL_H_INSIDE__ 41 #define __COGL_H_INSIDE__ 42 #define __COGL_MUST_UNDEF_COGL_H_INSIDE__ 43 #endif 44 45 /* We currently keep gtype integration delimited in case we eventually 46 * want to split it out into a separate utility library when Cogl 47 * becomes a standalone project. (like cairo-gobject.so) 48 */ 49 #define _COGL_SUPPORTS_GTYPE_INTEGRATION 50 51 /* 52 * API common to the 1.x and 2.0 api... 53 */ 54 55 #include <cogl/cogl-defines.h> 56 #include <cogl/cogl-macros.h> 57 58 #include <cogl/cogl-error.h> 59 60 #include <cogl/cogl-object.h> 61 #include <cogl/cogl1-context.h> 62 #include <cogl/cogl-bitmap.h> 63 #include <cogl/cogl-color.h> 64 #include <cogl/cogl-matrix.h> 65 #include <cogl/cogl-matrix-stack.h> 66 #include <cogl/cogl-offscreen.h> 67 #include <cogl/cogl-primitives.h> 68 #include <cogl/cogl-texture.h> 69 #include <cogl/cogl-types.h> 70 #include <cogl/cogl-version.h> 71 72 /* 73 * 1.x only api... 74 */ 75 #if 0 76 #ifndef COGL_ENABLE_EXPERIMENTAL_2_0_API 77 #warning 78 #endif 79 #endif 80 81 /* It would be good to move these casts up into 1.x only api if we can 82 * update Clutter, Mutter and GnomeShell to avoid redundant casts when 83 * they enable the experimental api... */ 84 #include <cogl/deprecated/cogl-type-casts.h> 85 86 #include <cogl/deprecated/cogl-framebuffer-deprecated.h> 87 #include <cogl/deprecated/cogl-auto-texture.h> 88 #include <cogl/deprecated/cogl-shader.h> 89 #include <cogl/deprecated/cogl-material-compat.h> 90 #include <cogl/deprecated/cogl-vertex-buffer.h> 91 92 #ifdef COGL_ENABLE_MUFFIN_API 93 #include <cogl/cogl-muffin.h> 94 #endif 95 96 #include <cogl/cogl-swap-chain.h> 97 #include <cogl/cogl-renderer.h> 98 #include <cogl/cogl-output.h> 99 #include <cogl/cogl-display.h> 100 #include <cogl/cogl-context.h> 101 #include <cogl/cogl-buffer.h> 102 #include <cogl/cogl-pixel-buffer.h> 103 #include <cogl/cogl-vector.h> 104 #include <cogl/cogl-euler.h> 105 #include <cogl/cogl-quaternion.h> 106 #include <cogl/cogl-texture-2d.h> 107 #include <cogl/cogl-texture-2d-gl.h> 108 #include <cogl/cogl-texture-rectangle.h> 109 #include <cogl/cogl-texture-3d.h> 110 #include <cogl/cogl-texture-2d-sliced.h> 111 #include <cogl/cogl-sub-texture.h> 112 #include <cogl/cogl-atlas-texture.h> 113 #include <cogl/cogl-meta-texture.h> 114 #include <cogl/cogl-primitive-texture.h> 115 #include <cogl/cogl-index-buffer.h> 116 #include <cogl/cogl-attribute-buffer.h> 117 #include <cogl/cogl-indices.h> 118 #include <cogl/cogl-attribute.h> 119 #include <cogl/cogl-primitive.h> 120 #include <cogl/cogl-depth-state.h> 121 #include <cogl/cogl-pipeline.h> 122 #include <cogl/cogl-pipeline-state.h> 123 #include <cogl/cogl-pipeline-layer-state.h> 124 #include <cogl/cogl-snippet.h> 125 #include <cogl/cogl-framebuffer.h> 126 #include <cogl/cogl-onscreen.h> 127 #include <cogl/cogl-frame-info.h> 128 #include <cogl/cogl-poll.h> 129 #include <cogl/cogl-fence.h> 130 #include <cogl/cogl-glib-source.h> 131 /* XXX: This will definitly go away once all the Clutter winsys 132 * code has been migrated down into Cogl! */ 133 #include <cogl/deprecated/cogl-clutter.h> 134 135 /* 136 * API deprecations 137 */ 138 #include <cogl/cogl-deprecated.h> 139 140 /* 141 * Cogl Path api compatability 142 * 143 * The cogl_path_ api used to be part of the core Cogl api so for 144 * compatability we include cogl-path.h via cogl.h 145 * 146 * Note: we have to make sure not to include cogl-path.h while 147 * building core cogl or generating the Cogl .gir data because 148 * cogl-path now gets built after cogl and some cogl-path headers are 149 * only generated at build time... 150 */ 151 #if defined (COGL_HAS_COGL_PATH_SUPPORT) && \ 152 !defined (COGL_COMPILATION) && \ 153 !defined (COGL_GIR_SCANNING) 154 #include <cogl-path/cogl-path.h> 155 #endif 156 157 /** 158 * SECTION:cogl 159 * @short_description: General purpose API 160 * 161 * General utility functions for COGL. 162 */ 163 164 /* The gobject introspection scanner seems to parse public headers in 165 * isolation which means we need to be extra careful about how we 166 * define and undefine __COGL_H_INSIDE__ used to detect when internal 167 * headers are incorrectly included by developers. In the gobject 168 * introspection case we have to manually define __COGL_H_INSIDE__ as 169 * a commandline argument for the scanner which means we must be 170 * careful not to undefine it in a header... 171 */ 172 #ifdef __COGL_MUST_UNDEF_COGL_H_INSIDE__ 173 #undef __COGL_H_INSIDE__ 174 #undef __COGL_MUST_UNDEF_COGL_H_INSIDE__ 175 #endif 176 177 #endif /* __COGL_H__ */ 178