4
* A Low Level GPU Graphics and Utilities API
6
* Copyright (C) 2011 Intel Corporation.
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:
16
* The above copyright notice and this permission notice shall be
17
* included in all copies or substantial portions of the Software.
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
31
#if !defined(__COGL_H_INSIDE__) && !defined(COGL_COMPILATION)
32
#error "Only <cogl/cogl.h> can be included directly."
35
#ifndef __COGL_GSOURCE_H__
36
#define __COGL_GSOURCE_H__
39
#include <cogl/cogl-context.h>
44
* cogl_glib_source_new:
45
* @context: A #CoglContext
46
* @priority: The priority of the #GSource
48
* Creates a #GSource which handles Cogl's internal system event
49
* processing. This can be used as a convenience instead of
50
* cogl_poll_renderer_get_info() and cogl_poll_renderer_dispatch() in
51
* applications that are already using the GLib main loop. After this
52
* is called the #GSource should be attached to the main loop using
55
* Applications that manually connect to a #CoglRenderer before they
56
* create a #CoglContext should instead use
57
* cogl_glib_renderer_source_new() so that events may be dispatched
58
* before a context has been created. In that case you don't need to
59
* use this api in addition later, it is simply enough to use
60
* cogl_glib_renderer_source_new() instead.
62
* <note>This api is actually just a thin convenience wrapper around
63
* cogl_glib_renderer_source_new()</note>
65
* Return value: a new #GSource
71
cogl_glib_source_new (CoglContext *context,
75
* cogl_glib_renderer_source_new:
76
* @renderer: A #CoglRenderer
77
* @priority: The priority of the #GSource
79
* Creates a #GSource which handles Cogl's internal system event
80
* processing. This can be used as a convenience instead of
81
* cogl_poll_renderer_get_info() and cogl_poll_renderer_dispatch() in
82
* applications that are already using the GLib main loop. After this
83
* is called the #GSource should be attached to the main loop using
86
* Return value: a new #GSource
92
cogl_glib_renderer_source_new (CoglRenderer *renderer,
97
#endif /* __COGL_GSOURCE_H__ */