Blame clutter/clutter-constraint.h

Packit Service bf98b9
/*
Packit Service bf98b9
 * Clutter.
Packit Service bf98b9
 *
Packit Service bf98b9
 * An OpenGL based 'interactive canvas' library.
Packit Service bf98b9
 *
Packit Service bf98b9
 * Copyright (C) 2010  Intel Corporation.
Packit Service bf98b9
 *
Packit Service bf98b9
 * This library is free software; you can redistribute it and/or
Packit Service bf98b9
 * modify it under the terms of the GNU Lesser General Public
Packit Service bf98b9
 * License as published by the Free Software Foundation; either
Packit Service bf98b9
 * version 2 of the License, or (at your option) any later version.
Packit Service bf98b9
 *
Packit Service bf98b9
 * This library is distributed in the hope that it will be useful,
Packit Service bf98b9
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
Packit Service bf98b9
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
Packit Service bf98b9
 * Lesser General Public License for more details.
Packit Service bf98b9
 *
Packit Service bf98b9
 * You should have received a copy of the GNU Lesser General Public
Packit Service bf98b9
 * License along with this library. If not, see <http://www.gnu.org/licenses/>.
Packit Service bf98b9
 *
Packit Service bf98b9
 * Author:
Packit Service bf98b9
 *   Emmanuele Bassi <ebassi@linux.intel.com>
Packit Service bf98b9
 */
Packit Service bf98b9
Packit Service bf98b9
#ifndef __CLUTTER_CONSTRAINT_H__
Packit Service bf98b9
#define __CLUTTER_CONSTRAINT_H__
Packit Service bf98b9
Packit Service bf98b9
#if !defined(__CLUTTER_H_INSIDE__) && !defined(CLUTTER_COMPILATION)
Packit Service bf98b9
#error "Only <clutter/clutter.h> can be included directly."
Packit Service bf98b9
#endif
Packit Service bf98b9
Packit Service bf98b9
#include <clutter/clutter-actor-meta.h>
Packit Service bf98b9
Packit Service bf98b9
G_BEGIN_DECLS
Packit Service bf98b9
Packit Service bf98b9
#define CLUTTER_TYPE_CONSTRAINT                 (clutter_constraint_get_type ())
Packit Service bf98b9
#define CLUTTER_CONSTRAINT(obj)                 (G_TYPE_CHECK_INSTANCE_CAST ((obj), CLUTTER_TYPE_CONSTRAINT, ClutterConstraint))
Packit Service bf98b9
#define CLUTTER_IS_CONSTRAINT(obj)              (G_TYPE_CHECK_INSTANCE_TYPE ((obj), CLUTTER_TYPE_CONSTRAINT))
Packit Service bf98b9
#define CLUTTER_CONSTRAINT_CLASS(klass)         (G_TYPE_CHECK_CLASS_CAST ((klass), CLUTTER_TYPE_CONSTRAINT, ClutterConstraintClass))
Packit Service bf98b9
#define CLUTTER_IS_CONSTRAINT_CLASS(klass)      (G_TYPE_CHECK_CLASS_TYPE ((klass), CLUTTER_TYPE_CONSTRAINT))
Packit Service bf98b9
#define CLUTTER_CONSTRAINT_GET_CLASS(obj)       (G_TYPE_INSTANCE_GET_CLASS ((obj), CLUTTER_TYPE_CONSTRAINT, ClutterConstraintClass))
Packit Service bf98b9
Packit Service bf98b9
typedef struct _ClutterConstraintClass          ClutterConstraintClass;
Packit Service bf98b9
Packit Service bf98b9
/**
Packit Service bf98b9
 * ClutterConstraint:
Packit Service bf98b9
 *
Packit Service bf98b9
 * The #ClutterConstraint structure contains only
Packit Service bf98b9
 * private data and should be accessed using the provided API
Packit Service bf98b9
 *
Packit Service bf98b9
 * Since: 1.4
Packit Service bf98b9
 */
Packit Service bf98b9
struct _ClutterConstraint
Packit Service bf98b9
{
Packit Service bf98b9
  /*< private >*/
Packit Service bf98b9
  ClutterActorMeta parent_instance;
Packit Service bf98b9
};
Packit Service bf98b9
Packit Service bf98b9
/**
Packit Service bf98b9
 * ClutterConstraintClass:
Packit Service bf98b9
 * @update_allocation: virtual function used to update the allocation
Packit Service bf98b9
 *   of the #ClutterActor using the #ClutterConstraint
Packit Service bf98b9
 * @update_preferred_size: virtual function used to update the preferred
Packit Service bf98b9
 *   size of the #ClutterActor using the #ClutterConstraint; optional,
Packit Service bf98b9
 *   since 1.22
Packit Service bf98b9
 *
Packit Service bf98b9
 * The #ClutterConstraintClass structure contains
Packit Service bf98b9
 * only private data
Packit Service bf98b9
 *
Packit Service bf98b9
 * Since: 1.4
Packit Service bf98b9
 */
Packit Service bf98b9
struct _ClutterConstraintClass
Packit Service bf98b9
{
Packit Service bf98b9
  /*< private >*/
Packit Service bf98b9
  ClutterActorMetaClass parent_class;
Packit Service bf98b9
Packit Service bf98b9
  /*< public >*/
Packit Service bf98b9
  void (* update_allocation) (ClutterConstraint *constraint,
Packit Service bf98b9
                              ClutterActor      *actor,
Packit Service bf98b9
                              ClutterActorBox   *allocation);
Packit Service bf98b9
Packit Service bf98b9
  void (* update_preferred_size) (ClutterConstraint  *constraint,
Packit Service bf98b9
                                  ClutterActor       *actor,
Packit Service bf98b9
                                  ClutterOrientation  direction,
Packit Service bf98b9
                                  float               for_size,
Packit Service bf98b9
                                  float              *minimum_size,
Packit Service bf98b9
                                  float              *natural_size);
Packit Service bf98b9
Packit Service bf98b9
  /*< private >*/
Packit Service bf98b9
  void (* _clutter_constraint1) (void);
Packit Service bf98b9
  void (* _clutter_constraint2) (void);
Packit Service bf98b9
  void (* _clutter_constraint3) (void);
Packit Service bf98b9
  void (* _clutter_constraint4) (void);
Packit Service bf98b9
  void (* _clutter_constraint5) (void);
Packit Service bf98b9
  void (* _clutter_constraint6) (void);
Packit Service bf98b9
  void (* _clutter_constraint7) (void);
Packit Service bf98b9
};
Packit Service bf98b9
Packit Service bf98b9
CLUTTER_AVAILABLE_IN_1_4
Packit Service bf98b9
GType clutter_constraint_get_type (void) G_GNUC_CONST;
Packit Service bf98b9
Packit Service bf98b9
/* ClutterActor API */
Packit Service bf98b9
CLUTTER_AVAILABLE_IN_1_4
Packit Service bf98b9
void               clutter_actor_add_constraint            (ClutterActor      *self,
Packit Service bf98b9
                                                            ClutterConstraint *constraint);
Packit Service bf98b9
CLUTTER_AVAILABLE_IN_1_4
Packit Service bf98b9
void               clutter_actor_add_constraint_with_name  (ClutterActor      *self,
Packit Service bf98b9
                                                            const gchar       *name,
Packit Service bf98b9
                                                            ClutterConstraint *constraint);
Packit Service bf98b9
CLUTTER_AVAILABLE_IN_1_4
Packit Service bf98b9
void               clutter_actor_remove_constraint         (ClutterActor      *self,
Packit Service bf98b9
                                                            ClutterConstraint *constraint);
Packit Service bf98b9
CLUTTER_AVAILABLE_IN_1_4
Packit Service bf98b9
void               clutter_actor_remove_constraint_by_name (ClutterActor      *self,
Packit Service bf98b9
                                                            const gchar       *name);
Packit Service bf98b9
CLUTTER_AVAILABLE_IN_1_4
Packit Service bf98b9
GList *            clutter_actor_get_constraints           (ClutterActor      *self);
Packit Service bf98b9
CLUTTER_AVAILABLE_IN_1_4
Packit Service bf98b9
ClutterConstraint *clutter_actor_get_constraint            (ClutterActor      *self,
Packit Service bf98b9
                                                            const gchar       *name);
Packit Service bf98b9
CLUTTER_AVAILABLE_IN_1_4
Packit Service bf98b9
void               clutter_actor_clear_constraints         (ClutterActor      *self);
Packit Service bf98b9
Packit Service bf98b9
CLUTTER_AVAILABLE_IN_1_10
Packit Service bf98b9
gboolean           clutter_actor_has_constraints           (ClutterActor      *self);
Packit Service bf98b9
Packit Service bf98b9
G_END_DECLS
Packit Service bf98b9
Packit Service bf98b9
#endif /* __CLUTTER_CONSTRAINT_H__ */