1 /* Copyright (C) 2005 Vincent Noel <vnoel@cox.net>
2  * Copyright (C) 2008 Cosimo Cecchi <cosimoc@gnome.org>
3  * Copyright (C) 2012-2021 MATE Developers
4  *
5  * This file is part of MATE Utils.
6  *
7  * MATE Utils is free software: you can redistribute it and/or modify
8  * it under the terms of the GNU General Public License as published by
9  * the Free Software Foundation, either version 2 of the License, or
10  * (at your option) any later version.
11  *
12  * MATE Utils is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15  * GNU General Public License for more details.
16  *
17  * You should have received a copy of the GNU General Public License
18  * along with MATE Utils.  If not, see <https://www.gnu.org/licenses/>.
19  */
20 
21 #ifndef __LOGVIEW_LOGLIST_H__
22 #define __LOGVIEW_LOGLIST_H__
23 
24 #define LOGVIEW_TYPE_LOGLIST logview_loglist_get_type()
25 #define LOGVIEW_LOGLIST(obj) \
26   (G_TYPE_CHECK_INSTANCE_CAST ((obj), LOGVIEW_TYPE_LOGLIST, LogviewLoglist))
27 #define LOGVIEW_LOGLIST_CLASS(klass) \
28   (G_TYPE_CHECK_CLASS_CAST ((klass), LOGVIEW_TYPE_LOGLIST, LogviewLogListClass))
29 #define LOGVIEW_IS_LOGLIST(obj) \
30   (G_TYPE_CHECK_INSTANCE_TYPE ((obj), LOGVIEW_TYPE_LOGLIST))
31 #define LOGVIEW_IS_LOGLIST_CLASS(klass) \
32   (G_TYPE_CHECK_CLASS_TYPE ((klass), LOGVIEW_TYPE_LOGLIST))
33 #define LOGVIEW_LOGLIST_GET_CLASS(obj) \
34   (G_TYPE_INSTANCE_GET_CLASS ((obj), LOGVIEW_TYPE_LOGLIST, LogviewLoglistClass))
35 
36 #include <gtk/gtk.h>
37 #include <glib-object.h>
38 
39 #include "logview-log.h"
40 #include "logview-utils.h"
41 
42 typedef struct _LogviewLoglist LogviewLoglist;
43 typedef struct _LogviewLoglistClass LogviewLoglistClass;
44 typedef struct _LogviewLoglistPrivate LogviewLoglistPrivate;
45 
46 struct _LogviewLoglist {
47   GtkTreeView parent_instance;
48   LogviewLoglistPrivate *priv;
49 };
50 
51 struct _LogviewLoglistClass {
52 	GtkTreeViewClass parent_class;
53 
54   void (* day_selected) (LogviewLoglist *loglist,
55                          Day *day);
56   void (* day_cleared) (LogviewLoglist *loglist);
57 };
58 
59 GType logview_loglist_get_type (void);
60 
61 /* public methods */
62 GtkWidget * logview_loglist_new                (void);
63 void        logview_loglist_update_lines       (LogviewLoglist *loglist,
64                                                 LogviewLog *log);
65 GDate *     logview_loglist_get_date_selection (LogviewLoglist *loglist);
66 void        logview_loglist_clear_date         (LogviewLoglist *loglist);
67 
68 #endif /* __LOGVIEW_LOGLIST_H__ */
69