|
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 |
|
|---|
| 2 |
|
|---|
| 3 |
|
|---|
| 4 |
|
|---|
| 5 |
|
|---|
| 6 |
|
|---|
| 7 |
|
|---|
| 8 |
|
|---|
| 9 |
|
|---|
| 10 |
|
|---|
| 11 |
|
|---|
| 12 |
|
|---|
| 13 |
|
|---|
| 14 |
|
|---|
| 15 |
|
|---|
| 16 |
|
|---|
| 17 |
|
|---|
| 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 |
|
|---|
| 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, |
|---|
| 74 |
NULL, |
|---|
| 75 |
NULL, |
|---|
| 76 |
NULL, |
|---|
| 77 |
NULL, |
|---|
| 78 |
0, |
|---|
| 79 |
0, |
|---|
| 80 |
NULL |
|---|
| 81 |
}; |
|---|
| 82 |
|
|---|
| 83 |
type = g_type_register_static (G_TYPE_INTERFACE, |
|---|
| 84 |
"TMutShellChild", &info, 0); |
|---|
| 85 |
} |
|---|
| 86 |
|
|---|
| 87 |
return type; |
|---|
| 88 |
} |
|---|
| 89 |
|
|---|
| 90 |
|
|---|