4 * An OpenGL based 'interactive canvas' library.
6 * Authored By Matthew Allum <mallum@openedhand.com>
8 * Copyright (C) 2008 Intel Corporation.
10 * This library is free software; you can redistribute it and/or
11 * modify it under the terms of the GNU Lesser General Public
12 * License as published by the Free Software Foundation; either
13 * version 2 of the License, or (at your option) any later version.
15 * This library is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
18 * Lesser General Public License for more details.
20 * You should have received a copy of the GNU Lesser General Public
21 * License along with this library. If not, see <http://www.gnu.org/licenses/>.
24 #if !defined(__CLUTTER_H_INSIDE__) && !defined(CLUTTER_COMPILATION)
25 #error "Only <clutter/clutter.h> can be included directly."
28 #ifndef __CLUTTER_SHADER_TYPES_H__
29 #define __CLUTTER_SHADER_TYPES_H__
31 #include <glib-object.h>
35 #define CLUTTER_TYPE_SHADER_FLOAT (clutter_shader_float_get_type ())
36 #define CLUTTER_TYPE_SHADER_INT (clutter_shader_int_get_type ())
37 #define CLUTTER_TYPE_SHADER_MATRIX (clutter_shader_matrix_get_type ())
39 typedef struct _ClutterShaderFloat ClutterShaderFloat;
40 typedef struct _ClutterShaderInt ClutterShaderInt;
41 typedef struct _ClutterShaderMatrix ClutterShaderMatrix;
44 * CLUTTER_VALUE_HOLDS_SHADER_FLOAT:
47 * Evaluates to %TRUE if @x holds a #ClutterShaderFloat.
51 #define CLUTTER_VALUE_HOLDS_SHADER_FLOAT(x) (G_VALUE_HOLDS ((x), CLUTTER_TYPE_SHADER_FLOAT))
54 * CLUTTER_VALUE_HOLDS_SHADER_INT:
57 * Evaluates to %TRUE if @x holds a #ClutterShaderInt.
61 #define CLUTTER_VALUE_HOLDS_SHADER_INT(x) (G_VALUE_HOLDS ((x), CLUTTER_TYPE_SHADER_INT))
64 * CLUTTER_VALUE_HOLDS_SHADER_MATRIX:
67 * Evaluates to %TRUE if @x holds a #ClutterShaderMatrix.
71 #define CLUTTER_VALUE_HOLDS_SHADER_MATRIX(x) (G_VALUE_HOLDS ((x), CLUTTER_TYPE_SHADER_MATRIX))
73 GType clutter_shader_float_get_type (void) G_GNUC_CONST;
74 GType clutter_shader_int_get_type (void) G_GNUC_CONST;
75 GType clutter_shader_matrix_get_type (void) G_GNUC_CONST;
77 void clutter_value_set_shader_float (GValue *value,
79 const gfloat *floats);
80 void clutter_value_set_shader_int (GValue *value,
83 void clutter_value_set_shader_matrix (GValue *value,
85 const gfloat *matrix);
86 const gfloat * clutter_value_get_shader_float (const GValue *value,
88 const gint * clutter_value_get_shader_int (const GValue *value,
90 const gfloat * clutter_value_get_shader_matrix (const GValue *value,
95 #endif /* __CLUTTER_SHADER_TYPES_H__ */