2008-04-25 09:37:36 -04:00
|
|
|
/*
|
2009-04-27 10:48:12 -04:00
|
|
|
* Cogl
|
2008-04-25 09:37:36 -04:00
|
|
|
*
|
2014-02-21 20:28:54 -05:00
|
|
|
* A Low Level GPU Graphics and Utilities API
|
2008-04-25 09:37:36 -04:00
|
|
|
*
|
2009-04-27 10:48:12 -04:00
|
|
|
* Copyright (C) 2008,2009 Intel Corporation.
|
2008-04-25 09:37:36 -04:00
|
|
|
*
|
2014-02-21 20:28:54 -05:00
|
|
|
* Permission is hereby granted, free of charge, to any person
|
|
|
|
* obtaining a copy of this software and associated documentation
|
|
|
|
* files (the "Software"), to deal in the Software without
|
|
|
|
* restriction, including without limitation the rights to use, copy,
|
|
|
|
* modify, merge, publish, distribute, sublicense, and/or sell copies
|
|
|
|
* of the Software, and to permit persons to whom the Software is
|
|
|
|
* furnished to do so, subject to the following conditions:
|
2008-04-25 09:37:36 -04:00
|
|
|
*
|
2014-02-21 20:28:54 -05:00
|
|
|
* The above copyright notice and this permission notice shall be
|
|
|
|
* included in all copies or substantial portions of the Software.
|
2008-04-25 09:37:36 -04:00
|
|
|
*
|
2014-02-21 20:28:54 -05:00
|
|
|
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
|
|
|
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
|
|
|
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
|
|
|
* NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
|
|
|
|
* BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
|
|
|
|
* ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
|
|
|
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
|
|
* SOFTWARE.
|
2010-03-01 07:56:10 -05:00
|
|
|
*
|
|
|
|
*
|
2008-04-25 09:37:36 -04:00
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef __COGL_H__
|
|
|
|
#define __COGL_H__
|
|
|
|
|
2013-10-09 08:31:12 -04:00
|
|
|
#ifdef COGL_COMPILATION
|
|
|
|
#error "<cogl/cogl.h> shouldn't be included internally"
|
|
|
|
#endif
|
|
|
|
|
2013-11-28 07:34:45 -05:00
|
|
|
/* Note: When building Cogl .gir we explicitly define
|
|
|
|
* __COGL_H_INSIDE__ */
|
|
|
|
#ifndef __COGL_H_INSIDE__
|
2009-02-23 07:47:02 -05:00
|
|
|
#define __COGL_H_INSIDE__
|
2013-11-28 07:34:45 -05:00
|
|
|
#define __COGL_MUST_UNDEF_COGL_H_INSIDE__
|
|
|
|
#endif
|
2009-02-23 07:47:02 -05:00
|
|
|
|
2010-11-03 16:26:20 -04:00
|
|
|
#ifdef COGL_ENABLE_EXPERIMENTAL_2_0_API
|
2010-11-03 20:27:47 -04:00
|
|
|
#ifndef COGL_ENABLE_EXPERIMENTAL_API
|
2010-11-03 16:26:20 -04:00
|
|
|
#define COGL_ENABLE_EXPERIMENTAL_API
|
|
|
|
#endif
|
2010-11-03 20:27:47 -04:00
|
|
|
#endif
|
2010-11-03 16:26:20 -04:00
|
|
|
|
2010-11-29 16:42:06 -05:00
|
|
|
/* We currently keep gtype integration delimited in case we eventually
|
|
|
|
* want to split it out into a separate utility library when Cogl
|
|
|
|
* becomes a standalone project. (like cairo-gobject.so)
|
|
|
|
*/
|
|
|
|
#define _COGL_SUPPORTS_GTYPE_INTEGRATION
|
|
|
|
|
2012-02-17 20:41:20 -05:00
|
|
|
/*
|
|
|
|
* API common to the 1.x and 2.0 api...
|
|
|
|
*/
|
|
|
|
|
2009-11-18 12:35:07 -05:00
|
|
|
#include <cogl/cogl-defines.h>
|
2013-03-22 17:18:53 -04:00
|
|
|
#include <cogl/cogl-macros.h>
|
|
|
|
|
2012-08-31 14:28:27 -04:00
|
|
|
#include <cogl/cogl-error.h>
|
2008-10-30 13:25:00 -04:00
|
|
|
|
2010-05-27 17:24:56 -04:00
|
|
|
#include <cogl/cogl-object.h>
|
2012-02-17 16:46:39 -05:00
|
|
|
#include <cogl/cogl1-context.h>
|
2009-11-06 10:06:39 -05:00
|
|
|
#include <cogl/cogl-bitmap.h>
|
2008-10-30 12:50:07 -04:00
|
|
|
#include <cogl/cogl-color.h>
|
2009-11-06 10:06:39 -05:00
|
|
|
#include <cogl/cogl-matrix.h>
|
2012-11-20 12:08:43 -05:00
|
|
|
#include <cogl/cogl-matrix-stack.h>
|
2009-11-06 10:06:39 -05:00
|
|
|
#include <cogl/cogl-offscreen.h>
|
2010-02-10 17:30:37 -05:00
|
|
|
#include <cogl/cogl-primitives.h>
|
2008-10-30 13:25:00 -04:00
|
|
|
#include <cogl/cogl-texture.h>
|
|
|
|
#include <cogl/cogl-types.h>
|
2012-04-23 09:09:19 -04:00
|
|
|
#include <cogl/cogl-version.h>
|
2009-11-06 10:06:39 -05:00
|
|
|
|
2012-02-17 20:41:20 -05:00
|
|
|
/*
|
|
|
|
* 1.x only api...
|
|
|
|
*/
|
|
|
|
#ifndef COGL_ENABLE_EXPERIMENTAL_2_0_API
|
2009-05-29 07:31:47 -04:00
|
|
|
#include <cogl/cogl-enum-types.h>
|
2013-12-04 11:12:25 -05:00
|
|
|
#include <cogl/deprecated/cogl-clip-state.h>
|
2013-09-23 13:21:16 -04:00
|
|
|
#include <cogl/deprecated/cogl-vertex-buffer.h>
|
|
|
|
#include <cogl/deprecated/cogl-fixed.h>
|
|
|
|
#include <cogl/deprecated/cogl-material-compat.h>
|
|
|
|
#include <cogl/deprecated/cogl-shader.h>
|
2013-06-27 13:33:04 -04:00
|
|
|
#include <cogl/deprecated/cogl-texture-deprecated.h>
|
2012-02-17 20:41:20 -05:00
|
|
|
#endif
|
2008-04-25 09:37:36 -04:00
|
|
|
|
2013-10-09 08:31:12 -04:00
|
|
|
/* It would be good to move these casts up into 1.x only api if we can
|
|
|
|
* update Clutter, Mutter and GnomeShell to avoid redundant casts when
|
|
|
|
* they enable the experimental api... */
|
|
|
|
#include <cogl/deprecated/cogl-type-casts.h>
|
|
|
|
|
2014-01-09 11:35:58 -05:00
|
|
|
#include <cogl/deprecated/cogl-framebuffer-deprecated.h>
|
2014-01-01 20:39:56 -05:00
|
|
|
#include <cogl/deprecated/cogl-auto-texture.h>
|
|
|
|
|
2012-02-17 20:41:20 -05:00
|
|
|
/*
|
|
|
|
* 2.0 api that's compatible with the 1.x api...
|
|
|
|
*/
|
2010-01-10 12:28:24 -05:00
|
|
|
#if defined (COGL_ENABLE_EXPERIMENTAL_API)
|
2010-11-05 08:28:33 -04:00
|
|
|
#include <cogl/cogl-swap-chain.h>
|
|
|
|
#include <cogl/cogl-renderer.h>
|
2013-01-20 20:18:25 -05:00
|
|
|
#include <cogl/cogl-output.h>
|
2010-11-05 08:28:33 -04:00
|
|
|
#include <cogl/cogl-display.h>
|
2010-11-04 20:00:25 -04:00
|
|
|
#include <cogl/cogl-context.h>
|
2010-01-10 12:28:24 -05:00
|
|
|
#include <cogl/cogl-buffer.h>
|
2011-03-02 10:19:57 -05:00
|
|
|
#include <cogl/cogl-pixel-buffer.h>
|
2010-05-20 09:54:44 -04:00
|
|
|
#include <cogl/cogl-vector.h>
|
2010-02-24 20:40:29 -05:00
|
|
|
#include <cogl/cogl-euler.h>
|
2010-02-24 20:40:29 -05:00
|
|
|
#include <cogl/cogl-quaternion.h>
|
2011-05-16 19:05:54 -04:00
|
|
|
#include <cogl/cogl-texture-2d.h>
|
2012-09-10 16:45:33 -04:00
|
|
|
#include <cogl/cogl-texture-2d-gl.h>
|
2011-10-14 04:25:12 -04:00
|
|
|
#include <cogl/cogl-texture-rectangle.h>
|
2010-07-01 17:04:59 -04:00
|
|
|
#include <cogl/cogl-texture-3d.h>
|
2011-10-08 06:53:20 -04:00
|
|
|
#include <cogl/cogl-texture-2d-sliced.h>
|
2011-10-21 06:36:25 -04:00
|
|
|
#include <cogl/cogl-sub-texture.h>
|
2013-06-07 20:58:05 -04:00
|
|
|
#include <cogl/cogl-atlas-texture.h>
|
2011-10-08 09:13:03 -04:00
|
|
|
#include <cogl/cogl-meta-texture.h>
|
2012-04-04 10:09:43 -04:00
|
|
|
#include <cogl/cogl-primitive-texture.h>
|
2011-03-02 18:31:19 -05:00
|
|
|
#include <cogl/cogl-index-buffer.h>
|
2011-03-02 10:01:41 -05:00
|
|
|
#include <cogl/cogl-attribute-buffer.h>
|
2010-10-12 07:48:58 -04:00
|
|
|
#include <cogl/cogl-indices.h>
|
2011-01-20 14:31:53 -05:00
|
|
|
#include <cogl/cogl-attribute.h>
|
2010-10-12 07:54:07 -04:00
|
|
|
#include <cogl/cogl-primitive.h>
|
2011-04-14 13:12:03 -04:00
|
|
|
#include <cogl/cogl-depth-state.h>
|
2010-10-27 13:54:57 -04:00
|
|
|
#include <cogl/cogl-pipeline.h>
|
2011-09-07 18:44:37 -04:00
|
|
|
#include <cogl/cogl-pipeline-state.h>
|
2011-09-07 19:42:22 -04:00
|
|
|
#include <cogl/cogl-pipeline-layer-state.h>
|
2011-11-17 11:38:49 -05:00
|
|
|
#include <cogl/cogl-snippet.h>
|
2010-11-05 08:28:33 -04:00
|
|
|
#include <cogl/cogl-framebuffer.h>
|
2011-10-13 16:31:04 -04:00
|
|
|
#include <cogl/cogl-onscreen.h>
|
2012-11-12 11:58:10 -05:00
|
|
|
#include <cogl/cogl-frame-info.h>
|
2011-12-16 12:49:28 -05:00
|
|
|
#include <cogl/cogl-poll.h>
|
2013-01-10 20:13:34 -05:00
|
|
|
#include <cogl/cogl-fence.h>
|
2012-01-23 10:37:51 -05:00
|
|
|
#if defined (COGL_HAS_EGL_PLATFORM_KMS_SUPPORT)
|
|
|
|
#include <cogl/cogl-kms-renderer.h>
|
2012-01-30 06:06:41 -05:00
|
|
|
#include <cogl/cogl-kms-display.h>
|
2012-01-23 10:37:51 -05:00
|
|
|
#endif
|
2014-11-20 13:11:05 -05:00
|
|
|
#if defined (COGL_HAS_EGL_PLATFORM_MIR_SUPPORT)
|
|
|
|
#include <cogl/cogl-mir-renderer.h>
|
|
|
|
#endif
|
2012-03-05 22:21:30 -05:00
|
|
|
#ifdef COGL_HAS_WIN32_SUPPORT
|
2011-07-14 04:22:26 -04:00
|
|
|
#include <cogl/cogl-win32-renderer.h>
|
|
|
|
#endif
|
2011-12-19 09:38:28 -05:00
|
|
|
#ifdef COGL_HAS_GLIB_SUPPORT
|
|
|
|
#include <cogl/cogl-glib-source.h>
|
|
|
|
#endif
|
2010-11-05 08:28:33 -04:00
|
|
|
/* XXX: This will definitly go away once all the Clutter winsys
|
|
|
|
* code has been migrated down into Cogl! */
|
2013-09-23 13:21:16 -04:00
|
|
|
#include <cogl/deprecated/cogl-clutter.h>
|
2010-01-10 12:28:24 -05:00
|
|
|
#endif
|
|
|
|
|
2012-02-17 20:41:20 -05:00
|
|
|
/*
|
2013-04-27 22:22:24 -04:00
|
|
|
* API deprecations
|
2012-02-17 20:41:20 -05:00
|
|
|
*/
|
2013-04-27 22:22:24 -04:00
|
|
|
#include <cogl/cogl-deprecated.h>
|
2012-02-17 20:41:20 -05:00
|
|
|
|
|
|
|
/*
|
2013-04-27 22:22:24 -04:00
|
|
|
* Cogl Path api compatability
|
|
|
|
*
|
|
|
|
* The cogl_path_ api used to be part of the core Cogl api so for
|
|
|
|
* compatability we include cogl-path.h via cogl.h
|
2013-11-27 16:02:03 -05:00
|
|
|
*
|
|
|
|
* Note: we have to make sure not to include cogl-path.h while
|
|
|
|
* building core cogl or generating the Cogl .gir data because
|
|
|
|
* cogl-path now gets built after cogl and some cogl-path headers are
|
|
|
|
* only generated at build time...
|
2012-02-17 20:41:20 -05:00
|
|
|
*/
|
2013-11-27 16:02:03 -05:00
|
|
|
#if defined (COGL_HAS_COGL_PATH_SUPPORT) && \
|
|
|
|
!defined (COGL_COMPILATION) && \
|
|
|
|
!defined (COGL_GIR_SCANNING)
|
2013-04-27 22:22:24 -04:00
|
|
|
#include <cogl-path/cogl-path.h>
|
|
|
|
#endif
|
2012-02-17 20:41:20 -05:00
|
|
|
|
2008-06-12 13:21:16 -04:00
|
|
|
/**
|
|
|
|
* SECTION:cogl
|
|
|
|
* @short_description: General purpose API
|
|
|
|
*
|
|
|
|
* General utility functions for COGL.
|
|
|
|
*/
|
|
|
|
|
2013-11-28 07:34:45 -05:00
|
|
|
/* The gobject introspection scanner seems to parse public headers in
|
|
|
|
* isolation which means we need to be extra careful about how we
|
|
|
|
* define and undefine __COGL_H_INSIDE__ used to detect when internal
|
|
|
|
* headers are incorrectly included by developers. In the gobject
|
|
|
|
* introspection case we have to manually define __COGL_H_INSIDE__ as
|
|
|
|
* a commandline argument for the scanner which means we must be
|
|
|
|
* careful not to undefine it in a header...
|
|
|
|
*/
|
|
|
|
#ifdef __COGL_MUST_UNDEF_COGL_H_INSIDE__
|
2008-10-30 13:04:34 -04:00
|
|
|
#undef __COGL_H_INSIDE__
|
2013-11-28 07:34:45 -05:00
|
|
|
#undef __COGL_MUST_UNDEF_COGL_H_INSIDE__
|
|
|
|
#endif
|
2008-10-30 13:04:34 -04:00
|
|
|
|
2008-04-25 09:37:36 -04:00
|
|
|
#endif /* __COGL_H__ */
|