mirror of
https://github.com/brl/mutter.git
synced 2024-11-26 10:00:45 -05:00
Add initializer utilities for ClutterVertex
Similar to what we did for ClutterActorBox.
This commit is contained in:
parent
63f3eaab62
commit
82bc728584
@ -13297,11 +13297,33 @@ clutter_vertex_new (gfloat x,
|
||||
ClutterVertex *vertex;
|
||||
|
||||
vertex = g_slice_new (ClutterVertex);
|
||||
clutter_vertex_init (vertex, x, y, z);
|
||||
|
||||
return vertex;
|
||||
}
|
||||
|
||||
/**
|
||||
* clutter_vertex_init:
|
||||
* @vertex: a #ClutterVertex
|
||||
* @x: X coordinate
|
||||
* @y: Y coordinate
|
||||
* @z: Z coordinate
|
||||
*
|
||||
* Initializes @vertex with the given coordinates.
|
||||
*
|
||||
* Since: 1.10
|
||||
*/
|
||||
void
|
||||
clutter_vertex_init (ClutterVertex *vertex,
|
||||
gfloat x,
|
||||
gfloat y,
|
||||
gfloat z)
|
||||
{
|
||||
g_return_if_fail (vertex != NULL);
|
||||
|
||||
vertex->x = x;
|
||||
vertex->y = y;
|
||||
vertex->z = z;
|
||||
|
||||
return vertex;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -122,10 +122,30 @@ struct _ClutterVertex
|
||||
gfloat z;
|
||||
};
|
||||
|
||||
/**
|
||||
* CLUTTER_VERTEX_INIT:
|
||||
* @x: the X coordinate of the vertex
|
||||
* @y: the Y coordinate of the vertex
|
||||
* @z: the Z coordinate of the vertex
|
||||
*
|
||||
* A simple macro for initializing a #ClutterVertex when declaring it, e.g.:
|
||||
*
|
||||
* |[
|
||||
* ClutterVertext v = CLUTTER_VERTEX_INIT (x, y, z);
|
||||
* ]|
|
||||
*
|
||||
* Since: 1.10
|
||||
*/
|
||||
#define CLUTTER_VERTEX_INIT(x,y,z) { (x), (y), (z) }
|
||||
|
||||
GType clutter_vertex_get_type (void) G_GNUC_CONST;
|
||||
ClutterVertex *clutter_vertex_new (gfloat x,
|
||||
gfloat y,
|
||||
gfloat z);
|
||||
void clutter_vertex_init (ClutterVertex *vertex,
|
||||
gfloat x,
|
||||
gfloat y,
|
||||
gfloat z);
|
||||
ClutterVertex *clutter_vertex_copy (const ClutterVertex *vertex);
|
||||
void clutter_vertex_free (ClutterVertex *vertex);
|
||||
gboolean clutter_vertex_equal (const ClutterVertex *vertex_a,
|
||||
|
@ -1413,6 +1413,7 @@ clutter_vertex_copy
|
||||
clutter_vertex_equal
|
||||
clutter_vertex_free
|
||||
clutter_vertex_get_type
|
||||
clutter_vertex_init
|
||||
clutter_vertex_new
|
||||
#ifdef CLUTTER_WINDOWING_WAYLAND
|
||||
clutter_wayland_get_egl_display
|
||||
|
@ -546,7 +546,9 @@ clutter_actor_box_union
|
||||
|
||||
<SUBSECTION>
|
||||
ClutterVertex
|
||||
CLUTTER_VERTEX_INIT
|
||||
clutter_vertex_new
|
||||
clutter_vertex_init
|
||||
clutter_vertex_copy
|
||||
clutter_vertex_free
|
||||
clutter_vertex_equal
|
||||
|
Loading…
Reference in New Issue
Block a user