A little developer docs update in header files.
[lxde/lxpanel.git] / src / icon-grid.h
CommitLineData
2918994e 1/**
b840f7cc 2 * Copyright (c) 2009-2014 LxDE Developers, see the file AUTHORS for details.
2918994e 3 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation; either version 2 of the License, or
7 * (at your option) any later version.
8 *
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
13 *
14 * You should have received a copy of the GNU General Public License
15 * along with this program; if not, write to the Free Software Foundation,
16 * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
17 */
18
b840f7cc 19#ifndef __ICON_GRID_H__
de7ff173 20#define __ICON_GRID_H__ 1
2918994e 21
22#include <gtk/gtk.h>
23
de7ff173
AG
24G_BEGIN_DECLS
25
9fac586f
AG
26#define PANEL_TYPE_ICON_GRID (panel_icon_grid_get_type())
27#define PANEL_ICON_GRID(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), \
28 PANEL_TYPE_ICON_GRID, PanelIconGrid))
29#define PANEL_ICON_GRID_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass), \
30 PANEL_TYPE_ICON_GRID, PanelIconGridClass))
31#define PANEL_IS_ICON_GRID(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), \
32 PANEL_TYPE_ICON_GRID))
33#define PANEL_IS_ICON_GRID_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), \
34ba1c30 34 PANEL_TYPE_ICON_GRID))
9fac586f
AG
35
36extern GType panel_icon_grid_get_type (void) G_GNUC_CONST;
37
38typedef struct _PanelIconGrid PanelIconGrid;
39typedef struct _PanelIconGridClass PanelIconGridClass;
40
41extern GtkWidget * panel_icon_grid_new(
8f9e6256 42 GtkOrientation orientation, gint child_width, gint child_height, gint spacing, gint border, gint target_dimension);
2918994e 43 /* Create an icon grid */
9fac586f 44extern void panel_icon_grid_set_constrain_width(PanelIconGrid * ig, gboolean constrain_width);
b33a8cc6 45 /* Set the constrain-width property */
04544a53
AG
46/**
47 * panel_icon_grid_set_aspect_width
48 * @ig: a widget
49 * @aspect_width: value to set
50 *
51 * Changes #PanelIconGrid::aspect-width property on the @ig. The property
52 * enables or disables taking icons aspect into consideration for @ig.
53 * If disabled then all icons will have the same size (child_width) as
54 * defined for widget. If enabled then child_width will be ignored but
55 * icons aspect will be taken into consideration when children space is
56 * allocated.
57 * Note that if #PanelIconGrid::constrain-width is set to %TRUE then the
58 * #PanelIconGrid::aspect-width is ignored and behavior of widget is that
59 * if #PanelIconGrid::aspect-width is set to %FALSE.
60 *
61 * Since: 0.8.0
62 */
9633d713 63extern void panel_icon_grid_set_aspect_width(PanelIconGrid * ig, gboolean aspect_width);
04544a53 64
756c623e
AG
65/* extern void panel_icon_grid_set_fill_width(PanelIconGrid * ig, gboolean fill_width);
66 Set the fill-width property */
9fac586f 67extern void panel_icon_grid_set_geometry(PanelIconGrid * ig,
8f9e6256 68 GtkOrientation orientation, gint child_width, gint child_height, gint spacing, gint border, gint target_dimension);
69 /* Change the geometry of an icon grid */
9fac586f 70extern gint panel_icon_grid_get_child_position(PanelIconGrid * ig, GtkWidget * child);
eb713fbc 71 /* Get the index of an icon grid element. */
9fac586f 72extern void panel_icon_grid_reorder_child(PanelIconGrid * ig, GtkWidget * child, gint position);
2918994e 73 /* Reorder the position of a child in the icon grid */
2918994e 74
de7ff173
AG
75G_END_DECLS
76
2918994e 77#endif