Updated Spanish translation
[gnome-utils.git] / logview / logview-manager.h
blobb9444323fcb0635c8c2a8501b95a1016392afbed
1 /* logview-manager.h - manager for the opened log objects
3 * Copyright (C) 2008 Cosimo Cecchi <cosimoc@gnome.org>
5 * This program is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU General Public License as
7 * published by the Free Software Foundation; either version 2 of the
8 * License, or (at your option) any later version.
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
15 * You should have received a copy of the GNU General Public License
16 * along with this program; if not, write to the Free Software
17 * Foundation, Inc., 551 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
18 * USA.
21 /* logview-manager.h */
23 #ifndef __LOGVIEW_MANAGER_H__
24 #define __LOGVIEW_MANAGER_H__
26 #include <glib-object.h>
28 #include "logview-log.h"
30 G_BEGIN_DECLS
32 #define LOGVIEW_TYPE_MANAGER logview_manager_get_type()
33 #define LOGVIEW_MANAGER(obj) \
34 (G_TYPE_CHECK_INSTANCE_CAST ((obj), LOGVIEW_TYPE_MANAGER, LogviewManager))
35 #define LOGVIEW_MANAGER_CLASS(klass) \
36 (G_TYPE_CHECK_CLASS_CAST ((klass), LOGVIEW_TYPE_MANAGER, LogviewManagerClass))
37 #define LOGVIEW_IS_MANAGER(obj) \
38 (G_TYPE_CHECK_INSTANCE_TYPE ((obj), LOGVIEW_TYPE_MANAGER))
39 #define LOGVIEW_IS_MANAGER_CLASS(klass) \
40 (G_TYPE_CHECK_CLASS_TYPE ((klass), LOGVIEW_TYPE_MANAGER))
41 #define LOGVIEW_MANAGER_GET_CLASS(obj) \
42 (G_TYPE_INSTANCE_GET_CLASS ((obj), LOGVIEW_TYPE_MANAGER, LogviewManagerClass))
44 typedef struct _LogviewManager LogviewManager;
45 typedef struct _LogviewManagerClass LogviewManagerClass;
46 typedef struct _LogviewManagerPrivate LogviewManagerPrivate;
48 struct _LogviewManager {
49 GObject parent;
50 LogviewManagerPrivate *priv;
53 struct _LogviewManagerClass {
54 GObjectClass parent_class;
56 void (* log_added) (LogviewManager *manager,
57 LogviewLog *log);
58 void (* log_closed) (LogviewManager *manager,
59 LogviewLog *log);
60 void (* active_changed) (LogviewManager *manager,
61 LogviewLog *log,
62 LogviewLog *old_log);
65 GType logview_manager_get_type (void);
67 /* public methods */
68 LogviewManager* logview_manager_get (void);
69 void logview_manager_add_logs_from_name_list (LogviewManager *manager,
70 GSList *names,
71 const char *active);
72 void logview_manager_add_log_from_gfile (LogviewManager *manager,
73 GFile *file,
74 gboolean set_active);
75 void logview_manager_add_logs_from_names (LogviewManager *manager,
76 char ** names,
77 const gchar *active);
78 void logview_manager_set_active_log (LogviewManager *manager,
79 LogviewLog *log);
80 LogviewLog * logview_manager_get_active_log (LogviewManager *manager);
81 int logview_manager_get_log_count (LogviewManager *manager);
82 LogviewLog * logview_manager_get_if_loaded (LogviewManager *manager,
83 char *filename);
84 gboolean logview_manager_log_is_active (LogviewManager *manager,
85 LogviewLog *log);
86 void logview_manager_close_active_log (LogviewManager *manager);
88 G_END_DECLS
90 #endif /* __LOGVIEW_MANAGER_H__ */