~mterry/ubuntu/natty/gnome-shell/wip

« back to all changes in this revision

Viewing changes to src/st/st-table.h

  • Committer: Bazaar Package Importer
  • Author(s): Sebastien Bacher
  • Date: 2009-10-12 22:44:00 UTC
  • mfrom: (1.1.5 upstream)
  • Revision ID: james.westby@ubuntu.com-20091012224400-k91p42yvou07i525
Tags: 2.28.0-0ubuntu1
* New upstream version
* debian/control:
  - updated build requirement
* debian/patches/80_git_change_fix_alt_tab_ressource_usage.patch:
  - git change to fix ressources not being freed on alt-tab

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */
 
2
/*
 
3
 * st-table.h: Table layout widget
 
4
 *
 
5
 * Copyright 2008, 2009 Intel Corporation.
 
6
 *
 
7
 * This program is free software; you can redistribute it and/or modify it
 
8
 * under the terms and conditions of the GNU Lesser General Public License,
 
9
 * version 2.1, as published by the Free Software Foundation.
 
10
 *
 
11
 * This program is distributed in the hope it will be useful, but WITHOUT ANY
 
12
 * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
 
13
 * FOR A PARTICULAR PURPOSE.  See the GNU Lesser General Public License for
 
14
 * more details.
 
15
 *
 
16
 * You should have received a copy of the GNU Lesser General Public License
 
17
 * along with this program; if not, write to the Free Software Foundation,
 
18
 * Inc., 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA.
 
19
 * Boston, MA 02111-1307, USA.
 
20
 *
 
21
 * Written by: Thomas Wood  <thomas@linux.intel.com>
 
22
 *
 
23
 */
 
24
 
 
25
#if !defined(ST_H_INSIDE) && !defined(ST_COMPILATION)
 
26
#error "Only <st/st.h> can be included directly.h"
 
27
#endif
 
28
 
 
29
#ifndef __ST_TABLE_H__
 
30
#define __ST_TABLE_H__
 
31
 
 
32
#include <st/st-types.h>
 
33
#include <st/st-widget.h>
 
34
 
 
35
G_BEGIN_DECLS
 
36
 
 
37
/**
 
38
 * StTableChildOptions:
 
39
 * @ST_KEEP_ASPECT_RATIO: whether to respect the widget's aspect ratio
 
40
 * @ST_X_EXPAND: whether to allocate extra space on the widget's x-axis
 
41
 * @ST_Y_EXPAND: whether to allocate extra space on the widget's y-axis
 
42
 * @ST_X_FILL: whether to stretch the child to fill the cell horizontally
 
43
 * @ST_Y_FILL: whether to stretch the child to fill the cell vertically
 
44
 *
 
45
 * Denotes the child properties an StTable child will have.
 
46
 */
 
47
typedef enum
 
48
{
 
49
  ST_KEEP_ASPECT_RATIO = 1 << 0,
 
50
  ST_X_EXPAND          = 1 << 1,
 
51
  ST_Y_EXPAND          = 1 << 2,
 
52
  ST_X_FILL            = 1 << 3,
 
53
  ST_Y_FILL            = 1 << 4
 
54
} StTableChildOptions;
 
55
 
 
56
#define ST_TYPE_TABLE                (st_table_get_type ())
 
57
#define ST_TABLE(obj)                (G_TYPE_CHECK_INSTANCE_CAST ((obj), ST_TYPE_TABLE, StTable))
 
58
#define ST_IS_TABLE(obj)             (G_TYPE_CHECK_INSTANCE_TYPE ((obj), ST_TYPE_TABLE))
 
59
#define ST_TABLE_CLASS(klass)        (G_TYPE_CHECK_CLASS_CAST ((klass), ST_TYPE_TABLE, StTableClass))
 
60
#define ST_IS_TABLE_CLASS(klass)     (G_TYPE_CHECK_CLASS_TYPE ((klass), ST_TYPE_TABLE))
 
61
#define ST_TABLE_GET_CLASS(obj)      (G_TYPE_INSTANCE_GET_CLASS ((obj), ST_TYPE_TABLE, StTableClass))
 
62
 
 
63
typedef struct _StTable              StTable;
 
64
typedef struct _StTablePrivate       StTablePrivate;
 
65
typedef struct _StTableClass         StTableClass;
 
66
 
 
67
/**
 
68
 * StTable:
 
69
 *
 
70
 * The contents of this structure is private and should only be accessed using
 
71
 * the provided API.
 
72
 */
 
73
struct _StTable
 
74
{
 
75
  /*< private >*/
 
76
  StWidget parent_instance;
 
77
 
 
78
  StTablePrivate *priv;
 
79
};
 
80
 
 
81
struct _StTableClass
 
82
{
 
83
  StWidgetClass parent_class;
 
84
};
 
85
 
 
86
GType st_table_get_type (void) G_GNUC_CONST;
 
87
 
 
88
StWidget* st_table_new (void);
 
89
 
 
90
gint st_table_get_row_count    (StTable *table);
 
91
gint st_table_get_column_count (StTable *table);
 
92
 
 
93
G_END_DECLS
 
94
 
 
95
#endif /* __ST_TABLE_H__ */