~oem-solutions-group/unity-2d/clutter-1.0

« back to all changes in this revision

Viewing changes to clutter/clutter-bin-layout.h

  • Committer: Bazaar Package Importer
  • Author(s): Emilio Pozuelo Monfort
  • Date: 2010-03-21 13:27:56 UTC
  • mto: (2.1.3 experimental)
  • mto: This revision was merged to the branch mainline in revision 8.
  • Revision ID: james.westby@ubuntu.com-20100321132756-nf8yd30yxo3zzwcm
Tags: upstream-1.2.2
ImportĀ upstreamĀ versionĀ 1.2.2

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
 * Clutter.
 
3
 *
 
4
 * An OpenGL based 'interactive canvas' library.
 
5
 *
 
6
 * Copyright (C) 2009  Intel Corporation.
 
7
 *
 
8
 * This library is free software; you can redistribute it and/or
 
9
 * modify it under the terms of the GNU Lesser General Public
 
10
 * License as published by the Free Software Foundation; either
 
11
 * version 2 of the License, or (at your option) any later version.
 
12
 *
 
13
 * This library is distributed in the hope that it will be useful,
 
14
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 
15
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 
16
 * Lesser General Public License for more details.
 
17
 *
 
18
 * You should have received a copy of the GNU Lesser General Public
 
19
 * License along with this library. If not, see <http://www.gnu.org/licenses/>.
 
20
 *
 
21
 * Author:
 
22
 *   Emmanuele Bassi <ebassi@linux.intel.com>
 
23
 */
 
24
 
 
25
#if !defined(__CLUTTER_H_INSIDE__) && !defined(CLUTTER_COMPILATION)
 
26
#error "Only <clutter/clutter.h> can be included directly."
 
27
#endif
 
28
 
 
29
#ifndef __CLUTTER_BIN_LAYOUT_H__
 
30
#define __CLUTTER_BIN_LAYOUT_H__
 
31
 
 
32
#include <clutter/clutter-layout-manager.h>
 
33
 
 
34
G_BEGIN_DECLS
 
35
 
 
36
#define CLUTTER_TYPE_BIN_LAYOUT                 (clutter_bin_layout_get_type ())
 
37
#define CLUTTER_BIN_LAYOUT(obj)                 (G_TYPE_CHECK_INSTANCE_CAST ((obj), CLUTTER_TYPE_BIN_LAYOUT, ClutterBinLayout))
 
38
#define CLUTTER_IS_BIN_LAYOUT(obj)              (G_TYPE_CHECK_INSTANCE_TYPE ((obj), CLUTTER_TYPE_BIN_LAYOUT))
 
39
#define CLUTTER_BIN_LAYOUT_CLASS(klass)         (G_TYPE_CHECK_CLASS_CAST ((klass), CLUTTER_TYPE_BIN_LAYOUT, ClutterBinLayoutClass))
 
40
#define CLUTTER_IS_BIN_LAYOUT_CLASS(klass)      (G_TYPE_CHECK_CLASS_TYPE ((klass), CLUTTER_TYPE_BIN_LAYOUT))
 
41
#define CLUTTER_BIN_LAYOUT_GET_CLASS(obj)       (G_TYPE_INSTANCE_GET_CLASS ((obj), CLUTTER_TYPE_BIN_LAYOUT, ClutterBinLayoutClass))
 
42
 
 
43
typedef struct _ClutterBinLayout                ClutterBinLayout;
 
44
typedef struct _ClutterBinLayoutPrivate         ClutterBinLayoutPrivate;
 
45
typedef struct _ClutterBinLayoutClass           ClutterBinLayoutClass;
 
46
 
 
47
/**
 
48
 * ClutterBinAlignment:
 
49
 * @CLUTTER_BIN_ALIGNMENT_FIXED: Fixed position alignment; the
 
50
 *   #ClutterBinLayout will honour the fixed position provided
 
51
 *   by the actors themselves when allocating them
 
52
 * @CLUTTER_BIN_ALIGNMENT_FILL: Fill the allocation size
 
53
 * @CLUTTER_BIN_ALIGNMENT_START: Position the actors at the top
 
54
 *   or left side of the container, depending on the axis
 
55
 * @CLUTTER_BIN_ALIGNMENT_END: Position the actors at the bottom
 
56
 *   or right side of the container, depending on the axis
 
57
 * @CLUTTER_BIN_ALIGNMENT_CENTER: Position the actors at the
 
58
 *   center of the container, depending on the axis
 
59
 *
 
60
 * The alignment policies available on each axis for #ClutterBinLayout
 
61
 *
 
62
 * Since: 1.2
 
63
 */
 
64
typedef enum {
 
65
  CLUTTER_BIN_ALIGNMENT_FIXED,
 
66
  CLUTTER_BIN_ALIGNMENT_FILL,
 
67
  CLUTTER_BIN_ALIGNMENT_START,
 
68
  CLUTTER_BIN_ALIGNMENT_END,
 
69
  CLUTTER_BIN_ALIGNMENT_CENTER
 
70
} ClutterBinAlignment;
 
71
 
 
72
/**
 
73
 * ClutterBinLayout:
 
74
 *
 
75
 * The #ClutterBinLayout structure contains only private data
 
76
 * and should be accessed using the provided API
 
77
 *
 
78
 * Since: 1.2
 
79
 */
 
80
struct _ClutterBinLayout
 
81
{
 
82
  /*< private >*/
 
83
  ClutterLayoutManager parent_instance;
 
84
 
 
85
  ClutterBinLayoutPrivate *priv;
 
86
};
 
87
 
 
88
/**
 
89
 * ClutterBinLayoutClass:
 
90
 *
 
91
 * The #ClutterBinLayoutClass structure contains only private
 
92
 * data and should be accessed using the provided API
 
93
 *
 
94
 * Since: 1.2
 
95
 */
 
96
struct _ClutterBinLayoutClass
 
97
{
 
98
  /*< private >*/
 
99
  ClutterLayoutManagerClass parent_class;
 
100
};
 
101
 
 
102
GType clutter_bin_layout_get_type (void) G_GNUC_CONST;
 
103
 
 
104
ClutterLayoutManager *clutter_bin_layout_new           (ClutterBinAlignment  x_align,
 
105
                                                        ClutterBinAlignment  y_align);
 
106
 
 
107
void                  clutter_bin_layout_set_alignment (ClutterBinLayout    *self,
 
108
                                                        ClutterActor        *child,
 
109
                                                        ClutterBinAlignment  x_align,
 
110
                                                        ClutterBinAlignment  y_align);
 
111
void                  clutter_bin_layout_get_alignment (ClutterBinLayout    *self,
 
112
                                                        ClutterActor        *child,
 
113
                                                        ClutterBinAlignment *x_align,
 
114
                                                        ClutterBinAlignment *y_align);
 
115
 
 
116
void                  clutter_bin_layout_add           (ClutterBinLayout    *self,
 
117
                                                        ClutterActor        *child,
 
118
                                                        ClutterBinAlignment  x_align,
 
119
                                                        ClutterBinAlignment  y_align);
 
120
 
 
121
G_END_DECLS
 
122
 
 
123
#endif /* __CLUTTER_BIN_LAYOUT_H__ */