cleanup specfile for packaging
[profile/ivi/cogl.git] / cogl / cogl-win32-renderer.h
1 /*
2  * Cogl
3  *
4  * An object oriented GL/GLES Abstraction/Utility Layer
5  *
6  * Copyright (C) 2011 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, write to the
20  * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
21  * Boston, MA 02111-1307, USA.
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_WIN32_RENDERER_H__
29 #define __COGL_WIN32_RENDERER_H__
30
31 #include <cogl/cogl-types.h>
32 #include <cogl/cogl-renderer.h>
33
34 G_BEGIN_DECLS
35
36 #define cogl_win32_renderer_handle_event \
37   cogl_win32_renderer_handle_event_EXP
38 /**
39  * cogl_win32_renderer_handle_event:
40  * @message: A pointer to a win32 MSG struct
41  *
42  * This function processes a single event; it can be used to hook into
43  * external event retrieval (for example that done by Clutter or
44  * GDK).
45  *
46  * Return value: #CoglFilterReturn. %COGL_FILTER_REMOVE indicates that
47  * Cogl has internally handled the event and the caller should do no
48  * further processing. %COGL_FILTER_CONTINUE indicates that Cogl is
49  * either not interested in the event, or has used the event to update
50  * internal state without taking any exclusive action.
51  */
52 CoglFilterReturn
53 cogl_win32_renderer_handle_event (CoglRenderer *renderer,
54                                   MSG *message);
55
56 /**
57  * CoglWin32FilterFunc:
58  * @message: A pointer to a win32 MSG struct
59  * @data: The data that was given when the filter was added
60  *
61  * A callback function that can be registered with
62  * cogl_win32_renderer_add_filter(). The function should return
63  * %COGL_FILTER_REMOVE if it wants to prevent further processing or
64  * %COGL_FILTER_CONTINUE otherwise.
65  */
66 typedef CoglFilterReturn (* CoglWin32FilterFunc) (MSG *message,
67                                                   void *data);
68
69 #define cogl_win32_renderer_add_filter cogl_win32_renderer_add_filter_EXP
70 /**
71  * cogl_win32_renderer_add_filter:
72  *
73  * Adds a callback function that will receive all native events. The
74  * function can stop further processing of the event by return
75  * %COGL_FILTER_REMOVE.
76  */
77 void
78 cogl_win32_renderer_add_filter (CoglRenderer *renderer,
79                                 CoglWin32FilterFunc func,
80                                 void *data);
81
82 #define cogl_win32_renderer_remove_filter \
83   cogl_win32_renderer_remove_filter_EXP
84 /**
85  * cogl_win32_renderer_remove_filter:
86  *
87  * Removes a callback that was previously added with
88  * cogl_win32_renderer_add_filter().
89  */
90 void
91 cogl_win32_renderer_remove_filter (CoglRenderer *renderer,
92                                    CoglWin32FilterFunc func,
93                                    void *data);
94
95 G_END_DECLS
96
97 #endif /* __COGL_WIN32_RENDERER_H__ */