Update FSF address
[lttv.git] / lttv / modules / gui / resourceview / lttv_plugin_cfv.c
CommitLineData
9e01e6d4 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.
9e01e6d4 17 */
18
19
20#include "lttv_plugin_cfv.h"
21#include <lttvwindow/lttvwindow.h>
22#include "drawing.h"
43ed82b5 23#include "eventhooks.h"
9e01e6d4 24
25/*
26 * forward definitions
27 */
28
29/*
30 * Implementation
31 */
32
33static void cfv_update_filter(LttvPlugin *parent, LttvFilter *filter)
34{
35 LttvPluginCFV *self = LTTV_PLUGIN_CFV(parent);
36 g_message("In CFV update filter.");
dd47d0d8 37#ifdef BABEL_CLEANUP
9e01e6d4 38 lttv_filter_destroy(self->cfd->filter);
dd47d0d8 39#endif //babel_cleanup
9e01e6d4 40 self->cfd->filter = filter;
41 redraw_notify(self->cfd, NULL);
42}
43
44
45static void
46lttv_plugin_cfv_class_init (LttvPluginCFVClass *klass)
47{
48 LttvPluginClass *parent_klass;
49 parent_klass = &klass->parent;
50 parent_klass->update_filter = cfv_update_filter;
51 g_type_class_add_private (klass, sizeof (ControlFlowData));
52}
53
54
55static void
56lttv_plugin_cfv_init (GTypeInstance *instance, gpointer g_class)
57{
58 LttvPluginCFV *self = LTTV_PLUGIN_CFV (instance);
59 self->cfd = G_TYPE_INSTANCE_GET_PRIVATE (self,
60 LTTV_TYPE_PLUGIN_CFV, ControlFlowData);
61}
62
63
64GType
65lttv_plugin_cfv_get_type (void)
66{
67 static GType type = 0;
68 if (type == 0) {
69 static const GTypeInfo info = {
70 sizeof (LttvPluginCFVClass),
71 NULL, /* base_init */
72 NULL, /* base_finalize */
8d8c5ea7 73 (GClassInitFunc) lttv_plugin_cfv_class_init, /* class_init */
9e01e6d4 74 NULL, /* class_finalize */
75 NULL, /* class_data */
76 sizeof (LttvPluginCFV),
77 0, /* n_preallocs */
78 lttv_plugin_cfv_init /* instance_init */
79 };
80 type = g_type_register_static (G_TYPE_OBJECT,
44ffb95f 81 "LttvPluginRVType",
9e01e6d4 82 &info, 0);
83 }
84 return type;
85}
86
87
This page took 0.047416 seconds and 4 git commands to generate.