[clutter] Add _clutter_actor_peek_layout_info
- From: Alexander Larsson <alexl src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [clutter] Add _clutter_actor_peek_layout_info
- Date: Thu, 7 Jun 2012 14:44:58 +0000 (UTC)
commit 962bcb12224685b3a93fe5b449331d5d477eaf87
Author: Alexander Larsson <alexl redhat com>
Date: Thu Jun 7 16:31:22 2012 +0200
Add _clutter_actor_peek_layout_info
This will be needed later to get a layout_info without creating one
if there is none already.
clutter/clutter-actor-private.h | 1 +
clutter/clutter-actor.c | 20 ++++++++++++++++++--
2 files changed, 19 insertions(+), 2 deletions(-)
---
diff --git a/clutter/clutter-actor-private.h b/clutter/clutter-actor-private.h
index 55e4f46..07e2960 100644
--- a/clutter/clutter-actor-private.h
+++ b/clutter/clutter-actor-private.h
@@ -177,6 +177,7 @@ struct _ClutterLayoutInfo
const ClutterLayoutInfo * _clutter_actor_get_layout_info_or_defaults (ClutterActor *self);
ClutterLayoutInfo * _clutter_actor_get_layout_info (ClutterActor *self);
+ClutterLayoutInfo * _clutter_actor_peek_layout_info (ClutterActor *self);
struct _ClutterTransformInfo
{
diff --git a/clutter/clutter-actor.c b/clutter/clutter-actor.c
index fda5aca..96d3de2 100644
--- a/clutter/clutter-actor.c
+++ b/clutter/clutter-actor.c
@@ -16372,6 +16372,22 @@ layout_info_free (gpointer data)
}
/*< private >
+ * _clutter_actor_peek_layout_info:
+ * @self: a #ClutterActor
+ *
+ * Retrieves a pointer to the ClutterLayoutInfo structure.
+ *
+ * If the actor does not have a ClutterLayoutInfo associated to it, %NULL is returned.
+ *
+ * Return value: (transfer none): a pointer to the ClutterLayoutInfo structure
+ */
+ClutterLayoutInfo *
+_clutter_actor_peek_layout_info (ClutterActor *self)
+{
+ return g_object_get_qdata (G_OBJECT (self), quark_actor_layout_info);
+}
+
+/*< private >
* _clutter_actor_get_layout_info:
* @self: a #ClutterActor
*
@@ -16392,7 +16408,7 @@ _clutter_actor_get_layout_info (ClutterActor *self)
{
ClutterLayoutInfo *retval;
- retval = g_object_get_qdata (G_OBJECT (self), quark_actor_layout_info);
+ retval = _clutter_actor_peek_layout_info (self);
if (retval == NULL)
{
retval = g_slice_new (ClutterLayoutInfo);
@@ -16425,7 +16441,7 @@ _clutter_actor_get_layout_info_or_defaults (ClutterActor *self)
{
const ClutterLayoutInfo *info;
- info = g_object_get_qdata (G_OBJECT (self), quark_actor_layout_info);
+ info = _clutter_actor_peek_layout_info (self);
if (info == NULL)
return &default_layout_info;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]