27dd5fdf |
1 | /* This file is part of the Linux Trace Toolkit viewer |
2 | * Copyright (C) 2006 Mathieu Desnoyers |
3 | * |
4 | * This program is free software; you can redistribute it and/or modify |
5 | * it under the terms of the GNU General Public License Version 2 as |
6 | * published by the Free Software Foundation; |
7 | * |
8 | * This program is distributed in the hope that it will be useful, |
9 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
11 | * GNU General Public License for more details. |
12 | * |
13 | * You should have received a copy of the GNU General Public License |
14 | * along with this program; if not, write to the Free Software |
15 | * Foundation, Inc., 59 Temple Place - Suite 330, Boston, |
16 | * MA 02111-1307, USA. |
17 | */ |
18 | |
19 | |
20 | #include "lttv_plugin.h" |
21 | |
22 | /* |
23 | * forward definitions |
24 | */ |
25 | |
26 | |
27 | |
28 | static void |
29 | lttv_plugin_class_init (LttvPluginClass *klass) |
30 | { |
31 | klass->update_filter = NULL; /* Pure Virtual */ |
32 | } |
33 | |
34 | static void |
35 | lttv_plugin_instance_init (GTypeInstance *instance, gpointer g_class) |
36 | { |
37 | LttvPlugin *self; |
38 | self->top_widget = NULL; |
39 | } |
40 | |
41 | GType |
42 | lttv_plugin_get_type (void) |
43 | { |
44 | static GType type = 0; |
45 | if (type == 0) { |
46 | static const GTypeInfo info = { |
47 | sizeof (LttvPluginClass), |
48 | NULL, /* base_init */ |
49 | NULL, /* base_finalize */ |
50 | lttv_plugin_class_init, /* class_init */ |
51 | NULL, /* class_finalize */ |
52 | NULL, /* class_data */ |
53 | sizeof (LttvPlugin), |
54 | 0, /* n_preallocs */ |
55 | NULL /* instance_init */ |
56 | }; |
57 | type = g_type_register_static (G_TYPE_OBJECT, |
58 | "LttvPluginType", |
59 | &info, 0); |
60 | } |
61 | return type; |
62 | } |
63 | |
64 | |
65 | /* implementation in the source file */ |
66 | void lttv_plugin_update_filter (LttvPlugin *self, LttvFilter *filter) |
67 | { |
68 | LTTV_PLUGIN_GET_CLASS (self)->update_filter (self, filter); |
69 | } |
70 | |
71 | |
72 | |
73 | |