gnome-icon-container.h 3.69 KB
Newer Older
Ettore Perazzoli's avatar
Ettore Perazzoli committed
1
2
3
/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
/* gnome-icon-container.h - Icon container widget.

Elliot Lee's avatar
Elliot Lee committed
4
   Copyright (C) 1999, 2000 Free Software Foundation
5
   Copyright (C) 2000 Eazel, Inc.
Ettore Perazzoli's avatar
Ettore Perazzoli committed
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27

   The Gnome Library is free software; you can redistribute it and/or
   modify it under the terms of the GNU Library General Public License as
   published by the Free Software Foundation; either version 2 of the
   License, or (at your option) any later version.

   The Gnome Library is distributed in the hope that it will be useful,
   but WITHOUT ANY WARRANTY; without even the implied warranty of
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
   Library General Public License for more details.

   You should have received a copy of the GNU Library General Public
   License along with the Gnome Library; see the file COPYING.LIB.  If not,
   write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
   Boston, MA 02111-1307, USA.

   Author: Ettore Perazzoli <ettore@gnu.org>
*/

#ifndef _GNOME_ICON_CONTAINER_H
#define _GNOME_ICON_CONTAINER_H

28
29
#include <libgnomeui/gnome-canvas.h>
#include "nautilus-icons-controller.h"
Ettore Perazzoli's avatar
Ettore Perazzoli committed
30
31
32

typedef struct _GnomeIconContainer GnomeIconContainer;
typedef struct _GnomeIconContainerClass GnomeIconContainerClass;
33
typedef struct _GnomeIconContainerDetails GnomeIconContainerDetails;
Ettore Perazzoli's avatar
Ettore Perazzoli committed
34
35
36
37
38
39
40
41
42
43
44
45


#define GNOME_ICON_CONTAINER(obj) \
	GTK_CHECK_CAST (obj, gnome_icon_container_get_type (), GnomeIconContainer)
#define GNOME_ICON_CONTAINER_CLASS(k) \
	GTK_CHECK_CLASS_CAST (k, gnome_icon_container_get_type (), GnomeIconListView)
#define GNOME_IS_ICON_CONTAINER(obj) \
	GTK_CHECK_TYPE (obj, gnome_icon_container_get_type ())


struct _GnomeIconContainer {
	GnomeCanvas canvas;
46
	GnomeIconContainerDetails *details;
Ettore Perazzoli's avatar
Ettore Perazzoli committed
47
48
49
50
51
};

struct _GnomeIconContainerClass {
	GnomeCanvasClass parent_class;

52
53
54
55
56
	void (* selection_changed) 	  (GnomeIconContainer *container);
	int  (* button_press) 		  (GnomeIconContainer *container,
					   GdkEventButton *event);
	void (* activate)	  	  (GnomeIconContainer *container,
					   NautilusControllerIcon *icon);
Ettore Perazzoli's avatar
Ettore Perazzoli committed
57

58
59
	void (* context_click_icon)	  (GnomeIconContainer *container,
					   NautilusControllerIcon *icon);
60
61
62

	void (* context_click_background) (GnomeIconContainer *container);

63
64
65
	void (* icon_moved)		  (GnomeIconContainer *container,
					   NautilusControllerIcon *icon,
					   int x, int y);
Ettore Perazzoli's avatar
Ettore Perazzoli committed
66
67
68
};


69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
guint      gnome_icon_container_get_type                (void);
GtkWidget *gnome_icon_container_new                     (NautilusIconsController *controller);

void       gnome_icon_container_enable_linger_selection (GnomeIconContainer      *view,
							 gboolean                 enable);

void       gnome_icon_container_clear                   (GnomeIconContainer      *view);
void       gnome_icon_container_add                     (GnomeIconContainer      *view,
							 NautilusControllerIcon  *icon,
							 gint                     x,
							 gint                     y);
void       gnome_icon_container_add_auto                (GnomeIconContainer      *view,
							 NautilusControllerIcon  *icon);

void       gnome_icon_container_relayout                (GnomeIconContainer      *view);
void       gnome_icon_container_line_up                 (GnomeIconContainer      *view);

GList *    gnome_icon_container_get_selection           (GnomeIconContainer      *view);

88
89
90
gint       gnome_icon_container_get_zoom_level          (GnomeIconContainer      *view);
void       gnome_icon_container_set_zoom_level          (GnomeIconContainer      *view, gint new_zoom_level);

91
92
93
void       gnome_icon_container_unselect_all            (GnomeIconContainer      *view);
void       gnome_icon_container_select_all              (GnomeIconContainer      *view);

Ettore Perazzoli's avatar
Ettore Perazzoli committed
94
#endif