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