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
|
|
|
*
|
2009-04-27 10:48:12 -04:00
|
|
|
* An object oriented GL/GLES Abstraction/Utility Layer
|
2008-04-25 09:37:36 -04:00
|
|
|
*
|
2009-04-27 10:48:12 -04:00
|
|
|
* Copyright (C) 2007,2008,2009 Intel Corporation.
|
2008-04-25 09:37:36 -04:00
|
|
|
*
|
|
|
|
* This library is free software; you can redistribute it and/or
|
|
|
|
* modify it under the terms of the GNU Lesser General Public
|
|
|
|
* License as published by the Free Software Foundation; either
|
|
|
|
* version 2 of the License, or (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This library is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
|
|
* Lesser General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU Lesser General Public
|
2010-03-01 07:56:10 -05:00
|
|
|
* License along with this library. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
*
|
|
|
|
*
|
2008-04-25 09:37:36 -04:00
|
|
|
*/
|
|
|
|
|
2011-02-22 15:08:16 -05:00
|
|
|
#ifndef __COGL_WINSYS_PRIVATE_H
|
|
|
|
#define __COGL_WINSYS_PRIVATE_H
|
2008-04-25 09:37:36 -04:00
|
|
|
|
2011-06-20 08:29:12 -04:00
|
|
|
#include "cogl-renderer.h"
|
2011-10-13 16:31:04 -04:00
|
|
|
#include "cogl-onscreen.h"
|
2012-03-05 22:21:30 -05:00
|
|
|
#include "cogl-gles2.h"
|
2011-06-20 08:29:12 -04:00
|
|
|
|
2011-03-01 09:43:43 -05:00
|
|
|
#ifdef COGL_HAS_XLIB_SUPPORT
|
|
|
|
#include "cogl-texture-pixmap-x11-private.h"
|
|
|
|
#endif
|
2010-11-05 08:28:33 -04:00
|
|
|
|
|
|
|
#ifdef COGL_HAS_XLIB_SUPPORT
|
|
|
|
#include <X11/Xutil.h>
|
2011-02-25 06:29:08 -05:00
|
|
|
#include "cogl-texture-pixmap-x11-private.h"
|
2010-11-05 08:28:33 -04:00
|
|
|
#endif
|
|
|
|
|
2012-07-10 09:14:07 -04:00
|
|
|
#ifdef COGL_HAS_EGL_SUPPORT
|
|
|
|
#include "cogl-egl.h"
|
|
|
|
#endif
|
|
|
|
|
2012-02-17 20:19:17 -05:00
|
|
|
#include "cogl-poll.h"
|
|
|
|
|
2012-08-31 14:28:27 -04:00
|
|
|
uint32_t
|
2010-11-05 08:28:33 -04:00
|
|
|
_cogl_winsys_error_quark (void);
|
|
|
|
|
|
|
|
#define COGL_WINSYS_ERROR (_cogl_winsys_error_quark ())
|
|
|
|
|
|
|
|
typedef enum { /*< prefix=COGL_WINSYS_ERROR >*/
|
|
|
|
COGL_WINSYS_ERROR_INIT,
|
|
|
|
COGL_WINSYS_ERROR_CREATE_CONTEXT,
|
|
|
|
COGL_WINSYS_ERROR_CREATE_ONSCREEN,
|
2012-03-05 22:21:30 -05:00
|
|
|
COGL_WINSYS_ERROR_MAKE_CURRENT,
|
|
|
|
COGL_WINSYS_ERROR_CREATE_GLES2_CONTEXT,
|
2010-11-05 08:28:33 -04:00
|
|
|
} CoglWinsysError;
|
|
|
|
|
|
|
|
typedef enum
|
|
|
|
{
|
|
|
|
COGL_WINSYS_RECTANGLE_STATE_UNKNOWN,
|
|
|
|
COGL_WINSYS_RECTANGLE_STATE_DISABLE,
|
|
|
|
COGL_WINSYS_RECTANGLE_STATE_ENABLE
|
|
|
|
} CoglWinsysRectangleState;
|
|
|
|
|
2011-02-25 06:29:08 -05:00
|
|
|
typedef struct _CoglWinsysVtable
|
|
|
|
{
|
2011-06-20 08:29:12 -04:00
|
|
|
CoglWinsysID id;
|
2012-01-13 11:48:26 -05:00
|
|
|
CoglRendererConstraint constraints;
|
2011-06-20 08:29:12 -04:00
|
|
|
|
2011-04-18 11:24:51 -04:00
|
|
|
const char *name;
|
|
|
|
|
2011-05-10 08:51:41 -04:00
|
|
|
/* Required functions */
|
|
|
|
|
2011-02-25 06:29:08 -05:00
|
|
|
CoglFuncPtr
|
2011-07-27 07:30:02 -04:00
|
|
|
(*renderer_get_proc_address) (CoglRenderer *renderer,
|
2012-06-20 07:42:31 -04:00
|
|
|
const char *name,
|
|
|
|
CoglBool in_core);
|
2008-04-25 09:37:36 -04:00
|
|
|
|
Switch use of primitive glib types to c99 equivalents
The coding style has for a long time said to avoid using redundant glib
data types such as gint or gchar etc because we feel that they make the
code look unnecessarily foreign to developers coming from outside of the
Gnome developer community.
Note: When we tried to find the historical rationale for the types we
just found that they were apparently only added for consistent syntax
highlighting which didn't seem that compelling.
Up until now we have been continuing to use some of the platform
specific type such as gint{8,16,32,64} and gsize but this patch switches
us over to using the standard c99 equivalents instead so we can further
ensure that our code looks familiar to the widest range of C developers
who might potentially contribute to Cogl.
So instead of using the gint{8,16,32,64} and guint{8,16,32,64} types this
switches all Cogl code to instead use the int{8,16,32,64}_t and
uint{8,16,32,64}_t c99 types instead.
Instead of gsize we now use size_t
For now we are not going to use the c99 _Bool type and instead we have
introduced a new CoglBool type to use instead of gboolean.
Reviewed-by: Neil Roberts <neil@linux.intel.com>
(cherry picked from commit 5967dad2400d32ca6319cef6cb572e81bf2c15f0)
2012-04-16 16:56:40 -04:00
|
|
|
CoglBool
|
2012-08-31 14:28:27 -04:00
|
|
|
(*renderer_connect) (CoglRenderer *renderer, CoglError **error);
|
2010-11-05 08:28:33 -04:00
|
|
|
|
2011-02-25 06:29:08 -05:00
|
|
|
void
|
|
|
|
(*renderer_disconnect) (CoglRenderer *renderer);
|
2010-11-05 08:28:33 -04:00
|
|
|
|
2012-11-12 11:31:16 -05:00
|
|
|
void
|
|
|
|
(*renderer_outputs_changed) (CoglRenderer *renderer);
|
|
|
|
|
Switch use of primitive glib types to c99 equivalents
The coding style has for a long time said to avoid using redundant glib
data types such as gint or gchar etc because we feel that they make the
code look unnecessarily foreign to developers coming from outside of the
Gnome developer community.
Note: When we tried to find the historical rationale for the types we
just found that they were apparently only added for consistent syntax
highlighting which didn't seem that compelling.
Up until now we have been continuing to use some of the platform
specific type such as gint{8,16,32,64} and gsize but this patch switches
us over to using the standard c99 equivalents instead so we can further
ensure that our code looks familiar to the widest range of C developers
who might potentially contribute to Cogl.
So instead of using the gint{8,16,32,64} and guint{8,16,32,64} types this
switches all Cogl code to instead use the int{8,16,32,64}_t and
uint{8,16,32,64}_t c99 types instead.
Instead of gsize we now use size_t
For now we are not going to use the c99 _Bool type and instead we have
introduced a new CoglBool type to use instead of gboolean.
Reviewed-by: Neil Roberts <neil@linux.intel.com>
(cherry picked from commit 5967dad2400d32ca6319cef6cb572e81bf2c15f0)
2012-04-16 16:56:40 -04:00
|
|
|
CoglBool
|
2012-08-31 14:28:27 -04:00
|
|
|
(*display_setup) (CoglDisplay *display, CoglError **error);
|
2010-11-05 08:28:33 -04:00
|
|
|
|
2011-02-25 06:29:08 -05:00
|
|
|
void
|
|
|
|
(*display_destroy) (CoglDisplay *display);
|
2010-11-05 08:28:33 -04:00
|
|
|
|
Switch use of primitive glib types to c99 equivalents
The coding style has for a long time said to avoid using redundant glib
data types such as gint or gchar etc because we feel that they make the
code look unnecessarily foreign to developers coming from outside of the
Gnome developer community.
Note: When we tried to find the historical rationale for the types we
just found that they were apparently only added for consistent syntax
highlighting which didn't seem that compelling.
Up until now we have been continuing to use some of the platform
specific type such as gint{8,16,32,64} and gsize but this patch switches
us over to using the standard c99 equivalents instead so we can further
ensure that our code looks familiar to the widest range of C developers
who might potentially contribute to Cogl.
So instead of using the gint{8,16,32,64} and guint{8,16,32,64} types this
switches all Cogl code to instead use the int{8,16,32,64}_t and
uint{8,16,32,64}_t c99 types instead.
Instead of gsize we now use size_t
For now we are not going to use the c99 _Bool type and instead we have
introduced a new CoglBool type to use instead of gboolean.
Reviewed-by: Neil Roberts <neil@linux.intel.com>
(cherry picked from commit 5967dad2400d32ca6319cef6cb572e81bf2c15f0)
2012-04-16 16:56:40 -04:00
|
|
|
CoglBool
|
2012-08-31 14:28:27 -04:00
|
|
|
(*context_init) (CoglContext *context, CoglError **error);
|
2010-11-05 08:28:33 -04:00
|
|
|
|
2011-02-25 06:29:08 -05:00
|
|
|
void
|
|
|
|
(*context_deinit) (CoglContext *context);
|
2010-11-05 08:28:33 -04:00
|
|
|
|
2012-03-05 22:21:30 -05:00
|
|
|
void *
|
2012-08-31 14:28:27 -04:00
|
|
|
(*context_create_gles2_context) (CoglContext *ctx, CoglError **error);
|
2012-03-05 22:21:30 -05:00
|
|
|
|
Switch use of primitive glib types to c99 equivalents
The coding style has for a long time said to avoid using redundant glib
data types such as gint or gchar etc because we feel that they make the
code look unnecessarily foreign to developers coming from outside of the
Gnome developer community.
Note: When we tried to find the historical rationale for the types we
just found that they were apparently only added for consistent syntax
highlighting which didn't seem that compelling.
Up until now we have been continuing to use some of the platform
specific type such as gint{8,16,32,64} and gsize but this patch switches
us over to using the standard c99 equivalents instead so we can further
ensure that our code looks familiar to the widest range of C developers
who might potentially contribute to Cogl.
So instead of using the gint{8,16,32,64} and guint{8,16,32,64} types this
switches all Cogl code to instead use the int{8,16,32,64}_t and
uint{8,16,32,64}_t c99 types instead.
Instead of gsize we now use size_t
For now we are not going to use the c99 _Bool type and instead we have
introduced a new CoglBool type to use instead of gboolean.
Reviewed-by: Neil Roberts <neil@linux.intel.com>
(cherry picked from commit 5967dad2400d32ca6319cef6cb572e81bf2c15f0)
2012-04-16 16:56:40 -04:00
|
|
|
CoglBool
|
2012-08-31 14:28:27 -04:00
|
|
|
(*onscreen_init) (CoglOnscreen *onscreen, CoglError **error);
|
2010-11-05 08:28:33 -04:00
|
|
|
|
2011-02-25 06:29:08 -05:00
|
|
|
void
|
|
|
|
(*onscreen_deinit) (CoglOnscreen *onscreen);
|
2010-11-05 08:28:33 -04:00
|
|
|
|
2011-02-25 06:29:08 -05:00
|
|
|
void
|
|
|
|
(*onscreen_bind) (CoglOnscreen *onscreen);
|
2010-11-05 08:28:33 -04:00
|
|
|
|
2011-02-25 06:29:08 -05:00
|
|
|
void
|
|
|
|
(*onscreen_swap_buffers) (CoglOnscreen *onscreen);
|
2010-11-05 08:28:33 -04:00
|
|
|
|
2011-05-10 08:51:41 -04:00
|
|
|
void
|
|
|
|
(*onscreen_update_swap_throttled) (CoglOnscreen *onscreen);
|
|
|
|
|
|
|
|
void
|
|
|
|
(*onscreen_set_visibility) (CoglOnscreen *onscreen,
|
Switch use of primitive glib types to c99 equivalents
The coding style has for a long time said to avoid using redundant glib
data types such as gint or gchar etc because we feel that they make the
code look unnecessarily foreign to developers coming from outside of the
Gnome developer community.
Note: When we tried to find the historical rationale for the types we
just found that they were apparently only added for consistent syntax
highlighting which didn't seem that compelling.
Up until now we have been continuing to use some of the platform
specific type such as gint{8,16,32,64} and gsize but this patch switches
us over to using the standard c99 equivalents instead so we can further
ensure that our code looks familiar to the widest range of C developers
who might potentially contribute to Cogl.
So instead of using the gint{8,16,32,64} and guint{8,16,32,64} types this
switches all Cogl code to instead use the int{8,16,32,64}_t and
uint{8,16,32,64}_t c99 types instead.
Instead of gsize we now use size_t
For now we are not going to use the c99 _Bool type and instead we have
introduced a new CoglBool type to use instead of gboolean.
Reviewed-by: Neil Roberts <neil@linux.intel.com>
(cherry picked from commit 5967dad2400d32ca6319cef6cb572e81bf2c15f0)
2012-04-16 16:56:40 -04:00
|
|
|
CoglBool visibility);
|
2011-05-10 08:51:41 -04:00
|
|
|
|
|
|
|
/* Optional functions */
|
|
|
|
|
2013-01-28 12:22:57 -05:00
|
|
|
int64_t
|
|
|
|
(*context_get_clock_time) (CoglContext *context);
|
|
|
|
|
2011-02-25 06:29:08 -05:00
|
|
|
void
|
|
|
|
(*onscreen_swap_region) (CoglOnscreen *onscreen,
|
2011-07-22 07:23:40 -04:00
|
|
|
const int *rectangles,
|
2011-02-25 06:29:08 -05:00
|
|
|
int n_rectangles);
|
2010-11-05 08:28:33 -04:00
|
|
|
|
2012-06-20 11:22:36 -04:00
|
|
|
void
|
|
|
|
(*onscreen_set_resizable) (CoglOnscreen *onscreen, CoglBool resizable);
|
|
|
|
|
2012-12-14 17:26:30 -05:00
|
|
|
int
|
|
|
|
(*onscreen_get_buffer_age) (CoglOnscreen *onscreen);
|
|
|
|
|
2011-05-10 08:51:41 -04:00
|
|
|
#ifdef COGL_HAS_EGL_SUPPORT
|
|
|
|
EGLDisplay
|
|
|
|
(*context_egl_get_egl_display) (CoglContext *context);
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifdef COGL_HAS_XLIB_SUPPORT
|
|
|
|
XVisualInfo *
|
|
|
|
(*xlib_get_visual_info) (void);
|
|
|
|
#endif
|
2010-11-05 08:28:33 -04:00
|
|
|
|
Switch use of primitive glib types to c99 equivalents
The coding style has for a long time said to avoid using redundant glib
data types such as gint or gchar etc because we feel that they make the
code look unnecessarily foreign to developers coming from outside of the
Gnome developer community.
Note: When we tried to find the historical rationale for the types we
just found that they were apparently only added for consistent syntax
highlighting which didn't seem that compelling.
Up until now we have been continuing to use some of the platform
specific type such as gint{8,16,32,64} and gsize but this patch switches
us over to using the standard c99 equivalents instead so we can further
ensure that our code looks familiar to the widest range of C developers
who might potentially contribute to Cogl.
So instead of using the gint{8,16,32,64} and guint{8,16,32,64} types this
switches all Cogl code to instead use the int{8,16,32,64}_t and
uint{8,16,32,64}_t c99 types instead.
Instead of gsize we now use size_t
For now we are not going to use the c99 _Bool type and instead we have
introduced a new CoglBool type to use instead of gboolean.
Reviewed-by: Neil Roberts <neil@linux.intel.com>
(cherry picked from commit 5967dad2400d32ca6319cef6cb572e81bf2c15f0)
2012-04-16 16:56:40 -04:00
|
|
|
uint32_t
|
2011-02-25 06:29:08 -05:00
|
|
|
(*onscreen_x11_get_window_xid) (CoglOnscreen *onscreen);
|
2010-11-05 08:28:33 -04:00
|
|
|
|
2011-05-09 12:48:50 -04:00
|
|
|
#ifdef COGL_HAS_WIN32_SUPPORT
|
|
|
|
HWND
|
|
|
|
(*onscreen_win32_get_window) (CoglOnscreen *onscreen);
|
|
|
|
#endif
|
|
|
|
|
2011-12-16 12:49:28 -05:00
|
|
|
void
|
|
|
|
(*poll_get_info) (CoglContext *context,
|
|
|
|
CoglPollFD **poll_fds,
|
|
|
|
int *n_poll_fds,
|
Switch use of primitive glib types to c99 equivalents
The coding style has for a long time said to avoid using redundant glib
data types such as gint or gchar etc because we feel that they make the
code look unnecessarily foreign to developers coming from outside of the
Gnome developer community.
Note: When we tried to find the historical rationale for the types we
just found that they were apparently only added for consistent syntax
highlighting which didn't seem that compelling.
Up until now we have been continuing to use some of the platform
specific type such as gint{8,16,32,64} and gsize but this patch switches
us over to using the standard c99 equivalents instead so we can further
ensure that our code looks familiar to the widest range of C developers
who might potentially contribute to Cogl.
So instead of using the gint{8,16,32,64} and guint{8,16,32,64} types this
switches all Cogl code to instead use the int{8,16,32,64}_t and
uint{8,16,32,64}_t c99 types instead.
Instead of gsize we now use size_t
For now we are not going to use the c99 _Bool type and instead we have
introduced a new CoglBool type to use instead of gboolean.
Reviewed-by: Neil Roberts <neil@linux.intel.com>
(cherry picked from commit 5967dad2400d32ca6319cef6cb572e81bf2c15f0)
2012-04-16 16:56:40 -04:00
|
|
|
int64_t *timeout);
|
2011-12-16 12:49:28 -05:00
|
|
|
void
|
|
|
|
(*poll_dispatch) (CoglContext *context,
|
|
|
|
const CoglPollFD *poll_fds,
|
|
|
|
int n_poll_fds);
|
|
|
|
|
2011-03-01 09:43:43 -05:00
|
|
|
#ifdef COGL_HAS_XLIB_SUPPORT
|
Switch use of primitive glib types to c99 equivalents
The coding style has for a long time said to avoid using redundant glib
data types such as gint or gchar etc because we feel that they make the
code look unnecessarily foreign to developers coming from outside of the
Gnome developer community.
Note: When we tried to find the historical rationale for the types we
just found that they were apparently only added for consistent syntax
highlighting which didn't seem that compelling.
Up until now we have been continuing to use some of the platform
specific type such as gint{8,16,32,64} and gsize but this patch switches
us over to using the standard c99 equivalents instead so we can further
ensure that our code looks familiar to the widest range of C developers
who might potentially contribute to Cogl.
So instead of using the gint{8,16,32,64} and guint{8,16,32,64} types this
switches all Cogl code to instead use the int{8,16,32,64}_t and
uint{8,16,32,64}_t c99 types instead.
Instead of gsize we now use size_t
For now we are not going to use the c99 _Bool type and instead we have
introduced a new CoglBool type to use instead of gboolean.
Reviewed-by: Neil Roberts <neil@linux.intel.com>
(cherry picked from commit 5967dad2400d32ca6319cef6cb572e81bf2c15f0)
2012-04-16 16:56:40 -04:00
|
|
|
CoglBool
|
2011-02-25 06:29:08 -05:00
|
|
|
(*texture_pixmap_x11_create) (CoglTexturePixmapX11 *tex_pixmap);
|
|
|
|
void
|
|
|
|
(*texture_pixmap_x11_free) (CoglTexturePixmapX11 *tex_pixmap);
|
2011-03-01 09:43:43 -05:00
|
|
|
|
Switch use of primitive glib types to c99 equivalents
The coding style has for a long time said to avoid using redundant glib
data types such as gint or gchar etc because we feel that they make the
code look unnecessarily foreign to developers coming from outside of the
Gnome developer community.
Note: When we tried to find the historical rationale for the types we
just found that they were apparently only added for consistent syntax
highlighting which didn't seem that compelling.
Up until now we have been continuing to use some of the platform
specific type such as gint{8,16,32,64} and gsize but this patch switches
us over to using the standard c99 equivalents instead so we can further
ensure that our code looks familiar to the widest range of C developers
who might potentially contribute to Cogl.
So instead of using the gint{8,16,32,64} and guint{8,16,32,64} types this
switches all Cogl code to instead use the int{8,16,32,64}_t and
uint{8,16,32,64}_t c99 types instead.
Instead of gsize we now use size_t
For now we are not going to use the c99 _Bool type and instead we have
introduced a new CoglBool type to use instead of gboolean.
Reviewed-by: Neil Roberts <neil@linux.intel.com>
(cherry picked from commit 5967dad2400d32ca6319cef6cb572e81bf2c15f0)
2012-04-16 16:56:40 -04:00
|
|
|
CoglBool
|
2011-02-25 06:29:08 -05:00
|
|
|
(*texture_pixmap_x11_update) (CoglTexturePixmapX11 *tex_pixmap,
|
Switch use of primitive glib types to c99 equivalents
The coding style has for a long time said to avoid using redundant glib
data types such as gint or gchar etc because we feel that they make the
code look unnecessarily foreign to developers coming from outside of the
Gnome developer community.
Note: When we tried to find the historical rationale for the types we
just found that they were apparently only added for consistent syntax
highlighting which didn't seem that compelling.
Up until now we have been continuing to use some of the platform
specific type such as gint{8,16,32,64} and gsize but this patch switches
us over to using the standard c99 equivalents instead so we can further
ensure that our code looks familiar to the widest range of C developers
who might potentially contribute to Cogl.
So instead of using the gint{8,16,32,64} and guint{8,16,32,64} types this
switches all Cogl code to instead use the int{8,16,32,64}_t and
uint{8,16,32,64}_t c99 types instead.
Instead of gsize we now use size_t
For now we are not going to use the c99 _Bool type and instead we have
introduced a new CoglBool type to use instead of gboolean.
Reviewed-by: Neil Roberts <neil@linux.intel.com>
(cherry picked from commit 5967dad2400d32ca6319cef6cb572e81bf2c15f0)
2012-04-16 16:56:40 -04:00
|
|
|
CoglBool needs_mipmap);
|
2011-03-01 09:43:43 -05:00
|
|
|
|
2011-02-25 06:29:08 -05:00
|
|
|
void
|
|
|
|
(*texture_pixmap_x11_damage_notify) (CoglTexturePixmapX11 *tex_pixmap);
|
2011-03-01 09:43:43 -05:00
|
|
|
|
2012-04-16 09:14:10 -04:00
|
|
|
CoglTexture *
|
2011-02-25 06:29:08 -05:00
|
|
|
(*texture_pixmap_x11_get_texture) (CoglTexturePixmapX11 *tex_pixmap);
|
2011-03-01 09:43:43 -05:00
|
|
|
#endif
|
|
|
|
|
2012-03-05 22:21:30 -05:00
|
|
|
void
|
|
|
|
(*save_context) (CoglContext *ctx);
|
|
|
|
|
|
|
|
CoglBool
|
2012-08-31 14:28:27 -04:00
|
|
|
(*set_gles2_context) (CoglGLES2Context *gles2_ctx, CoglError **error);
|
2012-03-05 22:21:30 -05:00
|
|
|
|
|
|
|
void
|
|
|
|
(*restore_context) (CoglContext *ctx);
|
|
|
|
|
|
|
|
void
|
|
|
|
(*destroy_gles2_context) (CoglGLES2Context *gles2_ctx);
|
|
|
|
|
2011-02-25 06:29:08 -05:00
|
|
|
} CoglWinsysVtable;
|
|
|
|
|
Switch use of primitive glib types to c99 equivalents
The coding style has for a long time said to avoid using redundant glib
data types such as gint or gchar etc because we feel that they make the
code look unnecessarily foreign to developers coming from outside of the
Gnome developer community.
Note: When we tried to find the historical rationale for the types we
just found that they were apparently only added for consistent syntax
highlighting which didn't seem that compelling.
Up until now we have been continuing to use some of the platform
specific type such as gint{8,16,32,64} and gsize but this patch switches
us over to using the standard c99 equivalents instead so we can further
ensure that our code looks familiar to the widest range of C developers
who might potentially contribute to Cogl.
So instead of using the gint{8,16,32,64} and guint{8,16,32,64} types this
switches all Cogl code to instead use the int{8,16,32,64}_t and
uint{8,16,32,64}_t c99 types instead.
Instead of gsize we now use size_t
For now we are not going to use the c99 _Bool type and instead we have
introduced a new CoglBool type to use instead of gboolean.
Reviewed-by: Neil Roberts <neil@linux.intel.com>
(cherry picked from commit 5967dad2400d32ca6319cef6cb572e81bf2c15f0)
2012-04-16 16:56:40 -04:00
|
|
|
CoglBool
|
2011-05-03 16:00:00 -04:00
|
|
|
_cogl_winsys_has_feature (CoglWinsysFeature feature);
|
|
|
|
|
2011-02-22 15:08:16 -05:00
|
|
|
#endif /* __COGL_WINSYS_PRIVATE_H */
|