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

« back to all changes in this revision

Viewing changes to clutter/clutter-flow-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_FLOW_LAYOUT_H__
 
30
#define __CLUTTER_FLOW_LAYOUT_H__
 
31
 
 
32
#include <clutter/clutter-layout-manager.h>
 
33
 
 
34
G_BEGIN_DECLS
 
35
 
 
36
#define CLUTTER_TYPE_FLOW_LAYOUT                (clutter_flow_layout_get_type ())
 
37
#define CLUTTER_FLOW_LAYOUT(obj)                (G_TYPE_CHECK_INSTANCE_CAST ((obj), CLUTTER_TYPE_FLOW_LAYOUT, ClutterFlowLayout))
 
38
#define CLUTTER_IS_FLOW_LAYOUT(obj)             (G_TYPE_CHECK_INSTANCE_TYPE ((obj), CLUTTER_TYPE_FLOW_LAYOUT))
 
39
#define CLUTTER_FLOW_LAYOUT_CLASS(klass)        (G_TYPE_CHECK_CLASS_CAST ((klass), CLUTTER_TYPE_FLOW_LAYOUT, ClutterFlowLayoutClass))
 
40
#define CLUTTER_IS_FLOW_LAYOUT_CLASS(klass)     (G_TYPE_CHECK_CLASS_TYPE ((klass), CLUTTER_TYPE_FLOW_LAYOUT))
 
41
#define CLUTTER_FLOW_LAYOUT_GET_CLASS(obj)      (G_TYPE_INSTANCE_GET_CLASS ((obj), CLUTTER_TYPE_FLOW_LAYOUT, ClutterFlowLayoutClass))
 
42
 
 
43
typedef struct _ClutterFlowLayout               ClutterFlowLayout;
 
44
typedef struct _ClutterFlowLayoutPrivate        ClutterFlowLayoutPrivate;
 
45
typedef struct _ClutterFlowLayoutClass          ClutterFlowLayoutClass;
 
46
 
 
47
/**
 
48
 * ClutterFlowOrientation:
 
49
 * @CLUTTER_FLOW_HORIZONTAL: Arrange the children of the flow layout
 
50
 *   horizontally first
 
51
 * @CLUTTER_FLOW_VERTICAL: Arrange the children of the flow layout
 
52
 *   vertically first
 
53
 *
 
54
 * The direction of the arrangement of the children inside
 
55
 * a #ClutterFlowLayout
 
56
 *
 
57
 * Since: 1.2
 
58
 */
 
59
typedef enum { /*< prefix=CLUTTER_FLOW >*/
 
60
  CLUTTER_FLOW_HORIZONTAL,
 
61
  CLUTTER_FLOW_VERTICAL
 
62
} ClutterFlowOrientation;
 
63
 
 
64
/**
 
65
 * ClutterFlowLayout:
 
66
 *
 
67
 * The #ClutterFlowLayout structure contains only private data
 
68
 * and should be accessed using the provided API
 
69
 *
 
70
 * Since: 1.2
 
71
 */
 
72
struct _ClutterFlowLayout
 
73
{
 
74
  /*< private >*/
 
75
  ClutterLayoutManager parent_instance;
 
76
 
 
77
  ClutterFlowLayoutPrivate *priv;
 
78
};
 
79
 
 
80
/**
 
81
 * ClutterFlowLayoutClass:
 
82
 *
 
83
 * The #ClutterFlowLayoutClass structure contains only private data
 
84
 * and should be accessed using the provided API
 
85
 *
 
86
 * Since: 1.2
 
87
 */
 
88
struct _ClutterFlowLayoutClass
 
89
{
 
90
  /*< private >*/
 
91
  ClutterLayoutManagerClass parent_class;
 
92
};
 
93
 
 
94
GType clutter_flow_layout_get_type (void) G_GNUC_CONST;
 
95
 
 
96
ClutterLayoutManager * clutter_flow_layout_new                (ClutterFlowOrientation  orientation);
 
97
 
 
98
void                   clutter_flow_layout_set_orientation    (ClutterFlowLayout      *layout,
 
99
                                                               ClutterFlowOrientation  orientation);
 
100
ClutterFlowOrientation clutter_flow_layout_get_orientation    (ClutterFlowLayout      *layout);
 
101
void                   clutter_flow_layout_set_homogeneous    (ClutterFlowLayout      *layout,
 
102
                                                               gboolean                homogeneous);
 
103
gboolean               clutter_flow_layout_get_homogeneous    (ClutterFlowLayout      *layout);
 
104
 
 
105
void                   clutter_flow_layout_set_column_spacing (ClutterFlowLayout      *layout,
 
106
                                                               gfloat                  spacing);
 
107
gfloat                 clutter_flow_layout_get_column_spacing (ClutterFlowLayout      *layout);
 
108
void                   clutter_flow_layout_set_row_spacing    (ClutterFlowLayout      *layout,
 
109
                                                               gfloat                  spacing);
 
110
gfloat                 clutter_flow_layout_get_row_spacing    (ClutterFlowLayout      *layout);
 
111
 
 
112
void                   clutter_flow_layout_set_column_width   (ClutterFlowLayout      *layout,
 
113
                                                               gfloat                  min_width,
 
114
                                                               gfloat                  max_width);
 
115
void                   clutter_flow_layout_get_column_width   (ClutterFlowLayout      *layout,
 
116
                                                               gfloat                 *min_width,
 
117
                                                               gfloat                 *max_width);
 
118
void                   clutter_flow_layout_set_row_height     (ClutterFlowLayout      *layout,
 
119
                                                               gfloat                  min_height,
 
120
                                                               gfloat                  max_height);
 
121
void                   clutter_flow_layout_get_row_height     (ClutterFlowLayout      *layout,
 
122
                                                               gfloat                 *min_height,
 
123
                                                               gfloat                 *max_height);
 
124
 
 
125
G_END_DECLS
 
126
 
 
127
#endif /* __CLUTTER_FLOW_LAYOUT_H__ */