1 /*
2  * gtr-tab-activatable.h
3  * This file is part of gtr
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 General Public License as published by
9  *     the Free Software Foundation, either version 3 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 General Public License for more details.
16  *
17  *     You should have received a copy of the GNU General Public License
18  *     along with this program.  If not, see <http://www.gnu.org/licenses/>.
19  */
20 
21 #ifndef __GTR_TAB_ACTIVATABLE_H__
22 #define __GTR_TAB_ACTIVATABLE_H__
23 
24 #include <glib-object.h>
25 
26 G_BEGIN_DECLS
27 /*
28  * Type checking and casting macros
29  */
30 #define GTR_TYPE_TAB_ACTIVATABLE		(gtr_tab_activatable_get_type ())
31 #define GTR_TAB_ACTIVATABLE(obj)		(G_TYPE_CHECK_INSTANCE_CAST ((obj), GTR_TYPE_TAB_ACTIVATABLE, GtrTabActivatable))
32 #define GTR_TAB_ACTIVATABLE_IFACE(obj)	(G_TYPE_CHECK_CLASS_CAST ((obj), GTR_TYPE_TAB_ACTIVATABLE, GtrTabActivatableInterface))
33 #define GTR_IS_TAB_ACTIVATABLE(obj)	(G_TYPE_CHECK_INSTANCE_TYPE ((obj), GTR_TYPE_TAB_ACTIVATABLE))
34 #define GTR_TAB_ACTIVATABLE_GET_IFACE(obj)	(G_TYPE_INSTANCE_GET_INTERFACE ((obj), GTR_TYPE_TAB_ACTIVATABLE, GtrTabActivatableInterface))
35 typedef struct _GtrTabActivatable GtrTabActivatable;      /* dummy typedef */
36 typedef struct _GtrTabActivatableInterface GtrTabActivatableInterface;
37 
38 struct _GtrTabActivatableInterface
39 {
40   GTypeInterface g_iface;
41 
42   /* Virtual public methods */
43   void (*activate) (GtrTabActivatable * activatable);
44   void (*deactivate) (GtrTabActivatable * activatable);
45 };
46 
47 /*
48  * Public methods
49  */
50 GType
51 gtr_tab_activatable_get_type (void)
52   G_GNUC_CONST;
53 
54      void gtr_tab_activatable_activate (GtrTabActivatable *
55                                            activatable);
56      void gtr_tab_activatable_deactivate (GtrTabActivatable *
57                                              activatable);
58 
59 G_END_DECLS
60 #endif /* __GTR_TAB_ACTIVATABLE_H__ */
61