mirror of
https://github.com/brl/mutter.git
synced 2024-11-23 08:30:42 -05:00
1061ebeac9
A BinLayout is a simple layout manager that allocates a single cell, providing alignment on both the horizontal and vertical axis. If the container associated to the BinLayout has more than one child, the preferred size returned by the layout manager will be as big as the maximum of the children preferred sizes; the allocation will be applied to all children - but it will still depend on each child preferred size and the BinLayout horizontal and vertical alignment properties. The supported alignment properties are: * center: align the child by centering it * start: align the child at the top or left border of the layout * end: align the child at the bottom or right border of the layout * fill: expand the child to fill the size of the layout * fixed: let the child position itself
51 lines
1.8 KiB
C
51 lines
1.8 KiB
C
#if !defined(__CLUTTER_H_INSIDE__) && !defined(CLUTTER_COMPILATION)
|
|
#error "Only <clutter/clutter.h> can be included directly."
|
|
#endif
|
|
|
|
#ifndef __CLUTTER_BIN_LAYOUT_H__
|
|
#define __CLUTTER_BIN_LAYOUT_H__
|
|
|
|
#include <clutter/clutter-layout-manager.h>
|
|
|
|
G_BEGIN_DECLS
|
|
|
|
#define CLUTTER_TYPE_BIN_LAYOUT (clutter_bin_layout_get_type ())
|
|
#define CLUTTER_BIN_LAYOUT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), CLUTTER_TYPE_BIN_LAYOUT, ClutterBinLayout))
|
|
#define CLUTTER_IS_BIN_LAYOUT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), CLUTTER_TYPE_BIN_LAYOUT))
|
|
#define CLUTTER_BIN_LAYOUT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), CLUTTER_TYPE_BIN_LAYOUT, ClutterBinLayoutClass))
|
|
#define CLUTTER_IS_BIN_LAYOUT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), CLUTTER_TYPE_BIN_LAYOUT))
|
|
#define CLUTTER_BIN_LAYOUT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), CLUTTER_TYPE_BIN_LAYOUT, ClutterBinLayoutClass))
|
|
|
|
typedef struct _ClutterBinLayout ClutterBinLayout;
|
|
typedef struct _ClutterBinLayoutPrivate ClutterBinLayoutPrivate;
|
|
typedef struct _ClutterBinLayoutClass ClutterBinLayoutClass;
|
|
|
|
typedef enum {
|
|
CLUTTER_BIN_ALIGNMENT_FIXED,
|
|
CLUTTER_BIN_ALIGNMENT_FILL,
|
|
CLUTTER_BIN_ALIGNMENT_START,
|
|
CLUTTER_BIN_ALIGNMENT_END,
|
|
CLUTTER_BIN_ALIGNMENT_CENTER
|
|
} ClutterBinAlignment;
|
|
|
|
struct _ClutterBinLayout
|
|
{
|
|
ClutterLayoutManager parent_instance;
|
|
|
|
ClutterBinLayoutPrivate *priv;
|
|
};
|
|
|
|
struct _ClutterBinLayoutClass
|
|
{
|
|
ClutterLayoutManagerClass parent_class;
|
|
};
|
|
|
|
GType clutter_bin_layout_get_type (void) G_GNUC_CONST;
|
|
|
|
ClutterLayoutManager *clutter_bin_layout_new (ClutterBinAlignment align_x,
|
|
ClutterBinAlignment align_y);
|
|
|
|
G_END_DECLS
|
|
|
|
#endif /* __CLUTTER_BIN_LAYOUT_H__ */
|