Change license from GPLv2+ to GPLv3+.
[pspp-builds.git] / src / ui / gui / customentry.h
1 /* PSPPIRE - a graphical user interface for PSPP.
2    Copyright (C) 2005  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    This widget is a subclass of GtkEntry.  It's an entry widget with a
19    button on the right hand side.
20
21    This code is heavily based upon the GtkSpinButton widget.  Therefore
22    the copyright notice of that code is pasted below.
23
24    Please note however,  this code is covered by the GPL, not the LGPL.
25 */
26
27 /* GTK - The GIMP Toolkit
28  * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald
29  *
30  * GtkSpinButton widget for GTK+
31  * Copyright (C) 1998 Lars Hamann and Stefan Jeske
32  *
33  * This library is free software; you can redistribute it and/or
34  * modify it under the terms of the GNU Lesser General Public
35  * License as published by the Free Software Foundation; either
36  * version 2 of the License, or (at your option) any later version.
37  *
38  * This library is distributed in the hope that it will be useful,
39  * but WITHOUT ANY WARRANTY; without even the implied warranty of
40  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
41  * Lesser General Public License for more details.
42  *
43  * You should have received a copy of the GNU Lesser General Public
44  * License along with this library.  If not, see
45  * <http://www.gnu.org/licenses/>.
46  */
47
48 /*
49  * Modified by the GTK+ Team and others 1997-2000.  See the AUTHORS
50  * file for a list of people on the GTK+ Team.  See the ChangeLog
51  * files for a list of changes.  These files are distributed with
52  * GTK+ at ftp://ftp.gtk.org/pub/gtk/.
53  */
54
55
56 #ifndef __PSPPIRE_CUSTOM_ENTRY_H__
57 #define __PSPPIRE_CUSTOM_ENTRY_H__
58
59
60 #include <glib.h>
61 #include <glib-object.h>
62
63
64 GType psppire_custom_entry_get_type (void);
65
66 G_BEGIN_DECLS
67
68 #define PSPPIRE_CUSTOM_ENTRY_TYPE (psppire_custom_entry_get_type ())
69
70 #define PSPPIRE_CUSTOM_ENTRY(obj)            \
71      (G_TYPE_CHECK_INSTANCE_CAST ((obj),PSPPIRE_CUSTOM_ENTRY_TYPE, PsppireCustomEntry))
72
73 #define PSPPIRE_CUSTOM_ENTRY_CLASS(klass)    \
74      (G_TYPE_CHECK_CLASS_CAST ((klass),PSPPIRE_CUSTOM_ENTRY_TYPE, PsppireCustomEntryClass))
75
76 #define PSPPIRE_IS_CUSTOM_ENTRY(obj)         \
77      (G_TYPE_CHECK_INSTANCE_TYPE ((obj), PSPPIRE_CUSTOM_ENTRY_TYPE))
78
79 #define IS_PSPPIRE_CUSTOM_ENTRY_CLASS(klass) \
80      (G_TYPE_CHECK_CLASS_TYPE ((klass),  PSPPIRE_CUSTOM_ENTRY_TYPE))
81
82
83 typedef struct _PsppireCustomEntry       PsppireCustomEntry;
84 typedef struct _PsppireCustomEntryClass  PsppireCustomEntryClass;
85
86 struct _PsppireCustomEntry
87 {
88   GtkEntry entry;
89
90   GdkWindow *panel;
91 };
92
93 struct _PsppireCustomEntryClass
94 {
95   GtkEntryClass parent_class;
96
97   void (*clicked)  (PsppireCustomEntry *spin_button);
98
99 };
100
101 GType          custom_entry_get_type        (void);
102 GtkWidget*     custom_entry_new             (void);
103
104 G_END_DECLS
105
106 #endif /* __PSPPIRE_CUSTOM_ENTRY_H__ */