New interface PsppireSelectDestWidget.
[pspp-builds.git] / src / ui / gui / psppire-select-dest.c
1 /* PSPPIRE - a graphical user interface for PSPP.
2    Copyright (C) 2009  Free Software Foundation
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 as published by
6    the Free Software Foundation, either version 3 of the License, or
7    (at your option) any later version.
8
9    This program 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
12    GNU General Public License for more details.
13
14    You should have received a copy of the GNU General Public License
15    along with this program.  If not, see <http://www.gnu.org/licenses/>.
16 */
17
18 #include <config.h>
19 #include "psppire-select-dest.h"
20 #include <gtk/gtkwidget.h>
21
22 GType
23 psppire_select_dest_widget_get_type (void)
24 {
25   static GType dest_widget_type = 0;
26
27   if (! dest_widget_type)
28     {
29       const GTypeInfo dest_widget_info =
30       {
31         sizeof (PsppireSelectDestWidgetIface), /* class_size */
32         NULL,           /* base_init */
33         NULL,           /* base_finalize */
34         NULL,
35         NULL,           /* class_finalize */
36         NULL,           /* class_data */
37         0,
38         0,              /* n_preallocs */
39         NULL
40       };
41
42       dest_widget_type =
43         g_type_register_static (G_TYPE_INTERFACE, "PsppireSelectDestWidget",
44                                 &dest_widget_info, 0);
45
46       g_type_interface_add_prerequisite (dest_widget_type, GTK_TYPE_WIDGET);
47     }
48
49   return dest_widget_type;
50 }
51
52
53 gboolean
54 psppire_select_dest_widget_contains_var (PsppireSelectDestWidget *sdm, const GValue *value)
55 {
56   return PSPPIRE_SELECT_DEST_GET_IFACE (sdm)->contains_var (sdm, value);
57 }