Commit | Line | Data |
---|---|---|
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 | |
b9ce0bad YB |
15 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, |
16 | * MA 02110-1301, USA. | |
27dd5fdf | 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 | |
8d8c5ea7 | 35 | lttv_plugin_init (GTypeInstance *instance, gpointer g_class) |
27dd5fdf | 36 | { |
8d8c5ea7 | 37 | LttvPlugin *self = LTTV_PLUGIN (instance); |
27dd5fdf | 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 */ | |
8d8c5ea7 | 50 | (GClassInitFunc) lttv_plugin_class_init, /* class_init */ |
27dd5fdf | 51 | NULL, /* class_finalize */ |
52 | NULL, /* class_data */ | |
53 | sizeof (LttvPlugin), | |
54 | 0, /* n_preallocs */ | |
8d8c5ea7 | 55 | lttv_plugin_init /* instance_init */ |
27dd5fdf | 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 */ | |
f9240312 | 66 | __EXPORT void lttv_plugin_update_filter (LttvPlugin *self, LttvFilter *filter) |
27dd5fdf | 67 | { |
68 | LTTV_PLUGIN_GET_CLASS (self)->update_filter (self, filter); | |
69 | } | |
70 | ||
71 | ||
72 | ||
73 |