root/trunk/src/tmut-shell-child.c

Revision 73 (checked in by pvanhoof, 7 months ago)

2008-01-28 Philip Van Hoof <pvanhoof@gnome.org>

        • Adapted TMut to the latest Tinymail API changes in trunk.
Line 
1 /* TMut
2  * Copyright (C) 2006-2007 Philip Van Hoof <pvanhoof@gnome.org>
3  *
4  * This library is free software; you can redistribute it and/or
5  * modify it under the terms of the GNU Lesser General Public
6  * License as published by the Free Software Foundation; either
7  * version 2 of the License, or (at your option) any later version.
8  *
9  * This library is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
12  * Lesser General Public License for more details.
13  *
14  * You should have received a copy of the GNU Lesser General Public
15  * License along with self library; if not, write to the
16  * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
17  * Boston, MA 02110-1301, USA.
18  */
19
20 #if HAVE_CONFIG_H
21 #include "config.h"
22 #endif
23
24 #include <glib/gi18n-lib.h>
25
26 #include <tmut-shell-child.h>
27
28 void 
29 tmut_shell_child_set_window (TMutShellChild *self, TMutShellWindow *window)
30 {
31 #ifdef DEBUG
32         if (!TMUT_SHELL_CHILD_GET_IFACE (self)->set_window)
33                 g_critical ("You must implement tmut_shell_child_set_window\n");
34 #endif
35
36         TMUT_SHELL_CHILD_GET_IFACE (self)->set_window (self, window);
37
38         return;
39 }
40
41 TMutShellWindow*
42 tmut_shell_child_get_window (TMutShellChild *self)
43 {
44 #ifdef DEBUG
45         if (!TMUT_SHELL_CHILD_GET_IFACE (self)->get_window)
46                 g_critical ("You must implement tmut_shell_child_get_window\n");
47 #endif
48
49         return TMUT_SHELL_CHILD_GET_IFACE (self)->get_window (self);
50 }
51
52 static void
53 tmut_shell_child_base_init (gpointer g_class)
54 {
55         static gboolean initialized = FALSE;
56
57         if (!initialized) {
58                 /* create interface signals here. */
59                 initialized = TRUE;
60         }
61 }
62
63 GType
64 tmut_shell_child_get_type (void)
65 {
66         static GType type = 0;
67
68         if (G_UNLIKELY(type == 0))
69         {
70                 static const GTypeInfo info =
71                 {
72                   sizeof (TMutShellChildIface),
73                   tmut_shell_child_base_init,   /* base_init */
74                   NULL,   /* base_finalize */
75                   NULL,   /* class_init */
76                   NULL,   /* class_finalize */
77                   NULL,   /* class_data */
78                   0,
79                   0,      /* n_preallocs */
80                   NULL    /* instance_init */
81                 };
82
83                 type = g_type_register_static (G_TYPE_INTERFACE,
84                         "TMutShellChild", &info, 0);
85         }
86
87         return type;
88 }
89
90
Note: See TracBrowser for help on using the browser.