1 /*
2  * xed-view-activatable.h
3  * This file is part of xed
4  *
5  * Copyright (C) 2010 - Steve Frécinaux
6  *
7  *  This program is free software; you can redistribute it and/or modify
8  *  it under the terms of the GNU Library 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  *  This program 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 Library General Public License for more details.
16  *
17  *  You should have received a copy of the GNU Library General Public License
18  *  along with this program; if not, write to the Free Software
19  *  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.
20  */
21 
22 #ifndef __XED_VIEW_ACTIVATABLE_H__
23 #define __XED_VIEW_ACTIVATABLE_H__
24 
25 #include <glib-object.h>
26 
27 G_BEGIN_DECLS
28 
29 /*
30  * Type checking and casting macros
31  */
32 #define XED_TYPE_VIEW_ACTIVATABLE     (xed_view_activatable_get_type ())
33 #define XED_VIEW_ACTIVATABLE(obj)     (G_TYPE_CHECK_INSTANCE_CAST ((obj), XED_TYPE_VIEW_ACTIVATABLE, XedViewActivatable))
34 #define XED_VIEW_ACTIVATABLE_IFACE(obj)   (G_TYPE_CHECK_CLASS_CAST ((obj), XED_TYPE_VIEW_ACTIVATABLE, XedViewActivatableInterface))
35 #define XED_IS_VIEW_ACTIVATABLE(obj)      (G_TYPE_CHECK_INSTANCE_TYPE ((obj), XED_TYPE_VIEW_ACTIVATABLE))
36 #define XED_VIEW_ACTIVATABLE_GET_IFACE(obj)   (G_TYPE_INSTANCE_GET_INTERFACE ((obj), XED_TYPE_VIEW_ACTIVATABLE, XedViewActivatableInterface))
37 
38 typedef struct _XedViewActivatable           XedViewActivatable; /* dummy typedef */
39 typedef struct _XedViewActivatableInterface  XedViewActivatableInterface;
40 
41 struct _XedViewActivatableInterface
42 {
43     GTypeInterface g_iface;
44 
45     /* Virtual public methods */
46     void    (*activate)     (XedViewActivatable *activatable);
47     void    (*deactivate)       (XedViewActivatable   *activatable);
48 };
49 
50 /*
51  * Public methods
52  */
53 GType    xed_view_activatable_get_type    (void)  G_GNUC_CONST;
54 
55 void     xed_view_activatable_activate    (XedViewActivatable *activatable);
56 void     xed_view_activatable_deactivate  (XedViewActivatable *activatable);
57 
58 G_END_DECLS
59 
60 #endif /* __XED_VIEW_ACTIVATABLE_H__ */
61