2008-05-05 Paolo Borelli <pborelli@katamail.com>
[nautilus.git] / src / nautilus-zoom-control.h
blob51b66de5f80641f10e964e4cf2d94fc7fc135c09
1 /* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
3 /*
4 * Nautilus
6 * Copyright (C) 2000 Eazel, Inc.
8 * Nautilus is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License as published by
10 * the Free Software Foundation; either version 2 of the License, or
11 * (at your option) any later version.
13 * Nautilus is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
18 * You should have received a copy of the GNU General Public License
19 * along with this program; if not, write to the Free Software
20 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
22 * Author: Andy Hertzfeld <andy@eazel.com>
24 * This is the header file for the zoom control on the location bar
28 #ifndef NAUTILUS_ZOOM_CONTROL_H
29 #define NAUTILUS_ZOOM_CONTROL_H
31 #include <gtk/gtkhbox.h>
32 #include <libnautilus-private/nautilus-icon-info.h> /* For NautilusZoomLevel */
34 #define NAUTILUS_TYPE_ZOOM_CONTROL (nautilus_zoom_control_get_type ())
35 #define NAUTILUS_ZOOM_CONTROL(obj) (GTK_CHECK_CAST ((obj), NAUTILUS_TYPE_ZOOM_CONTROL, NautilusZoomControl))
36 #define NAUTILUS_ZOOM_CONTROL_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), NAUTILUS_TYPE_ZOOM_CONTROL, NautilusZoomControlClass))
37 #define NAUTILUS_IS_ZOOM_CONTROL(obj) (GTK_CHECK_TYPE ((obj), NAUTILUS_TYPE_ZOOM_CONTROL))
38 #define NAUTILUS_IS_ZOOM_CONTROL_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), NAUTILUS_TYPE_ZOOM_CONTROL))
40 typedef struct NautilusZoomControl NautilusZoomControl;
41 typedef struct NautilusZoomControlClass NautilusZoomControlClass;
42 typedef struct NautilusZoomControlDetails NautilusZoomControlDetails;
44 struct NautilusZoomControl {
45 GtkHBox parent;
46 NautilusZoomControlDetails *details;
49 struct NautilusZoomControlClass {
50 GtkHBoxClass parent_class;
52 void (*zoom_in) (NautilusZoomControl *control);
53 void (*zoom_out) (NautilusZoomControl *control);
54 void (*zoom_to_level) (NautilusZoomControl *control,
55 NautilusZoomLevel zoom_level);
56 void (*zoom_to_default) (NautilusZoomControl *control);
58 /* Action signal for keybindings, do not connect to this */
59 void (*change_value) (NautilusZoomControl *control,
60 GtkScrollType scroll);
63 GType nautilus_zoom_control_get_type (void);
64 GtkWidget * nautilus_zoom_control_new (void);
65 void nautilus_zoom_control_set_zoom_level (NautilusZoomControl *zoom_control,
66 NautilusZoomLevel zoom_level);
67 void nautilus_zoom_control_set_parameters (NautilusZoomControl *zoom_control,
68 NautilusZoomLevel min_zoom_level,
69 NautilusZoomLevel max_zoom_level,
70 gboolean has_min_zoom_level,
71 gboolean has_max_zoom_level,
72 GList *zoom_levels);
73 NautilusZoomLevel nautilus_zoom_control_get_zoom_level (NautilusZoomControl *zoom_control);
74 NautilusZoomLevel nautilus_zoom_control_get_min_zoom_level (NautilusZoomControl *zoom_control);
75 NautilusZoomLevel nautilus_zoom_control_get_max_zoom_level (NautilusZoomControl *zoom_control);
76 gboolean nautilus_zoom_control_has_min_zoom_level (NautilusZoomControl *zoom_control);
77 gboolean nautilus_zoom_control_has_max_zoom_level (NautilusZoomControl *zoom_control);
78 gboolean nautilus_zoom_control_can_zoom_in (NautilusZoomControl *zoom_control);
79 gboolean nautilus_zoom_control_can_zoom_out (NautilusZoomControl *zoom_control);
81 #endif /* NAUTILUS_ZOOM_CONTROL_H */