+2007-12-15 Emmanuele Bassi <ebassi@openedhand.com>
+
+ * clutter/clutter-actor.c:
+ * clutter/clutter-alpha.h:
+ * clutter/clutter-event.h:
+ * clutter/clutter-fixed.[ch]:
+ * clutter/clutter-model.h:
+ * clutter/clutter-shader.[ch]:
+ * clutter/clutter-stage.c: Documentation fixes.
+
2007-12-15 Emmanuele Bassi <ebassi@openedhand.com>
* clutter/clutter-model-default.c:
*
* Matrix: 4x4 of ClutterFixed
*/
-#define M(m,row,col) (m)[col*4+row]
+#define M(m,row,col) (m)[(col) * 4 + (row)]
/* Transform point (x,y,z) by matrix */
static void
*/
}
+#undef M
+
/* Applies the transforms associated with this actor and its ancestors,
* retrieves the resulting OpenGL modelview matrix, and uses the matrix
* to transform the supplied point
actor_priv->shader_data = NULL;
}
+/**
+ * clutter_actor_apply_shader:
+ * @self: a #ClutterActor
+ * @shader: a #ClutterShader or %NULL
+ *
+ * Sets the #ClutterShader to be applied on @self.
+ *
+ * Return value: %TRUE if the shader was successfully applied
+ *
+ * Since: 0.6
+ */
gboolean
clutter_actor_apply_shader (ClutterActor *self,
ClutterShader *shader)
}
}
+/**
+ * clutter_actor_set_shader_param:
+ * @self: a #ClutterActor
+ * @param: the name of the parameter
+ * @value: the value of the parameter
+ *
+ * Sets the value for a named parameter of the shader applied
+ * to @actor.
+ *
+ * Since: 0.6
+ */
void
-clutter_actor_set_shader_param (ClutterActor *actor,
+clutter_actor_set_shader_param (ClutterActor *self,
const gchar *param,
gfloat value)
{
ShaderData *shader_data;
BoxedFloat *box;
- g_return_if_fail (CLUTTER_IS_ACTOR (actor));
+ g_return_if_fail (CLUTTER_IS_ACTOR (self));
g_return_if_fail (param != NULL);
- priv = actor->priv;
+ priv = self->priv;
shader_data = priv->shader_data;
if (!shader_data)
box->value = value;
g_hash_table_insert (shader_data->float1f_hash, g_strdup (param), box);
}
-
-#undef M
typedef guint32 (*ClutterAlphaFunc) (ClutterAlpha *alpha,
gpointer user_data);
+/**
+ * ClutterAlpha:
+ *
+ * #ClutterAlpha combines a #ClutterTimeline and a function.
+ * The contents of the #ClutterAlpha structure are private and should
+ * only be accessed using the provided API.
+ *
+ * Since: 0.2
+ */
struct _ClutterAlpha
{
/*< private >*/
ClutterAlphaPrivate *priv;
};
+/**
+ * ClutterAlphaClass:
+ *
+ * Base class for #ClutterAlpha
+ *
+ * Since: 0.2
+ */
struct _ClutterAlphaClass
{
+ /*< private >*/
GInitiallyUnownedClass parent_class;
void (*_clutter_alpha_1) (void);
typedef struct _ClutterInputDevice ClutterInputDevice;
+/**
+ * ClutterAnyEvent:
+ * @type: event type
+ * @time: event time
+ * @flags: event flags
+ * @source: event source actor
+ *
+ * Common members for a #ClutterEvent
+ *
+ * Since: 0.2
+ */
struct _ClutterAnyEvent
{
ClutterEventType type;
ClutterActor *source;
};
+/**
+ * ClutterKeyEvent:
+ * @type: event type
+ * @time: event time
+ * @flags: event flags
+ * @source: event source actor
+ * @modifier_state: key modifiers
+ * @keyval: raw key value
+ * @hardware_keycode: raw hardware key value
+ *
+ * Key event
+ *
+ * Since: 0.2
+ */
struct _ClutterKeyEvent
{
ClutterEventType type;
guint16 hardware_keycode;
};
+/**
+ * ClutterButtonEvent:
+ * @type: event type
+ * @time: event time
+ * @flags: event flags
+ * @source: event source actor
+ * @x: event X coordinate
+ * @y: event Y coordinate
+ * @modifier_state: button modifiers
+ * @button: event button
+ * @click_count: number of button presses within the default time
+ * and radius
+ * @axes: reserved for future use
+ * @device: reserved for future use
+ *
+ * Button event
+ *
+ * Since: 0.2
+ */
struct _ClutterButtonEvent
{
ClutterEventType type;
* @op1: #ClutterFixed
* @op2: #ClutterFixed
*
- * Return value: #ClutterFixed.
- *
* Multiplies two fixed values using 64bit arithmetic; this provides
* significantly better precission than the #CLUTTER_FIXED_MUL macro,
* but at performance cost (about 2.7 times slowdown on ARMv5e, and 2 times
* on x86).
*
- * Since: 0.3
+ * Return value: the result of the operation
+ *
+ * Since: 0.4
*/
ClutterFixed
clutter_qmulx (ClutterFixed op1, ClutterFixed op2)
/* Some handy fixed point short aliases to avoid exessively long lines */
/* FIXME: Remove from public API */
+/*< private >*/
#define CFX_INT CLUTTER_FIXED_INT
#define CFX_MUL CLUTTER_FIXED_MUL
#define CFX_DIV CLUTTER_FIXED_DIV
#define CFX_QMUL(x,y) clutter_qmulx (x,y)
+/*< public >*/
/* Fixed point math routines */
extern inline
ClutterFixed clutter_qmulx (ClutterFixed op1, ClutterFixed op2);
* at the last row in the model
* @is_first: Virtual function for knowing whether the iterator points
* at the first row in the model
+ * @next: Virtual function for moving the iterator to the following
+ * row in the model
+ * @prev: Virtual function for moving the iterator toe the previous
+ * row in the model
* @get_model: Virtual function for getting the model to which the
* iterator belongs to
* @get_row: Virtual function for getting the row to which the iterator
* Boston, MA 02111-1307, USA.
*/
+/**
+ * SECTION:clutter-shader
+ * @short_description: Programmable pipeline abstraction
+ *
+ * #ClutterShader is an object providing an abstraction over the
+ * OpenGL programmable pipeline. By using #ClutterShader<!-- -->s is
+ * possible to override the drawing pipeline by using small programs
+ * also known as "shaders".
+ *
+ * #ClutterShader is available since Clutter 0.6
+ */
+
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
/**
* clutter_shader_bind:
* @shader: a #ClutterShader
+ * @error: return location for a #GError, or %NULL
*
* FIXME
*
#define CLUTTER_SHADER_ERROR (clutter_shader_error_quark ())
+/**
+ * ClutterShaderError:
+ * @CLUTTER_SHADER_ERROR_NO_ASM: No ASM shaders support
+ * @CLUTTER_SHADER_ERROR_NO_GLSL: No GLSL shaders support
+ * @CLUTTER_SHADER_ERROR_COMPILE: Compilation error
+ *
+ * #ClutterShader error enumeration
+ *
+ * Since: 0.6
+ */
typedef enum {
CLUTTER_SHADER_ERROR_NO_ASM,
CLUTTER_SHADER_ERROR_NO_GLSL,
*fog = stage->priv->fog;
}
+/**
+ * clutter_stage_get_resolution:
+ * @stage: the #ClutterStage
+ *
+ * Retrieves the resolution (in DPI) of the stage from the default
+ * backend.
+ *
+ * Return value: the resolution of the stage
+ *
+ * Since: 0.6
+ */
gdouble
clutter_stage_get_resolution (ClutterStage *stage)
{
return clutter_backend_get_resolution (context->backend);
}
+/**
+ * clutter_stage_get_resolutionx:
+ * @stage: the #ClutterStage
+ *
+ * Fixed point version of clutter_stage_get_resolution().
+ *
+ * Return value: the resolution of the stage
+ *
+ * Since: 0.6
+ */
ClutterFixed
clutter_stage_get_resolutionx (ClutterStage *stage)
{
2007-12-15 Emmanuele Bassi <ebassi@openedhand.com>
+ * clutter-sections.txt: Move the shorthand fixed point macros
+ in the private section
+
+2007-12-15 Emmanuele Bassi <ebassi@openedhand.com>
+
* clutter-sections.txt: Added all the unused symbols.
2007-12-14 Emmanuele Bassi <ebassi@openedhand.com>
ClutterFixed
CFX_Q
CFX_ONE
+CFX_HALF
CFX_MAX
CFX_MIN
-ClutterAngle
CFX_PI
CFX_2PI
CFX_PI_2
CFX_360
CFX_60
CFX_255
-CFX_DIV
-CFX_INT
-CFX_MUL
-CFX_HALF
-CFX_QMUL
CLUTTER_FIXED_TO_INT
CLUTTER_FIXED_TO_FLOAT
CLUTTER_FIXED_TO_DOUBLE
CLUTTER_FIXED_CEIL
CLUTTER_FIXED_MUL
CLUTTER_FIXED_DIV
+ClutterAngle
CLUTTER_ANGLE_FROM_DEG
CLUTTER_ANGLE_FROM_DEGF
CLUTTER_ANGLE_FROM_DEGX
clutter_powx
clutter_qmulx
clutter_tani
+<SUBSECTION Private>
+CFX_DIV
+CFX_INT
+CFX_MUL
+CFX_QMUL
</SECTION>
<SECTION>