X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Fui%2Fgui%2Fpsppire-data-store.h;h=699f924a2a13c5a04616264b62895495baa19813;hb=87b30887d6b08f4bfe92e0474f5f38cc4bf1acfa;hp=1974aed8ddb400e281ff76d7938bc9a9cf83d0ef;hpb=bc02bc027697df3207f827de722c26d8cc87e824;p=pspp-builds.git diff --git a/src/ui/gui/psppire-data-store.h b/src/ui/gui/psppire-data-store.h index 1974aed8..699f924a 100644 --- a/src/ui/gui/psppire-data-store.h +++ b/src/ui/gui/psppire-data-store.h @@ -1,11 +1,9 @@ -/* psppire-data-store.h - - PSPPIRE --- A Graphical User Interface for PSPP +/* PSPPIRE - a graphical user interface for PSPP. Copyright (C) 2006 Free Software Foundation - This program is free software; you can redistribute it and/or modify + This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or + the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, @@ -14,9 +12,7 @@ GNU General Public License for more details. You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA - 02110-1301, USA. */ + along with this program. If not, see . */ #ifndef __PSPPIRE_DATA_STORE_H__ #define __PSPPIRE_DATA_STORE_H__ @@ -25,24 +21,33 @@ #include "psppire-dict.h" #include "psppire-case-file.h" +#define FIRST_CASE_NUMBER 1 + + #ifdef __cplusplus extern "C" { #endif /* __cplusplus */ #define GTK_TYPE_DATA_STORE (psppire_data_store_get_type ()) -#define PSPPIRE_DATA_STORE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), \ +#define PSPPIRE_DATA_STORE(obj) \ + (G_TYPE_CHECK_INSTANCE_CAST ((obj), \ GTK_TYPE_DATA_STORE, PsppireDataStore)) -#define PSPPIRE_DATA_STORE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), \ +#define PSPPIRE_DATA_STORE_CLASS(klass) \ + (G_TYPE_CHECK_CLASS_CAST ((klass), \ GTK_TYPE_DATA_STORE, \ PsppireDataStoreClass)) -#define PSPPIRE_IS_DATA_STORE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GTK_TYPE_DATA_STORE)) -#define PSPPIRE_IS_DATA_STORE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GTK_TYPE_DATA_STORE)) +#define PSPPIRE_IS_DATA_STORE(obj) \ + (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GTK_TYPE_DATA_STORE)) -#define PSPPIRE_DATA_STORE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), \ +#define PSPPIRE_IS_DATA_STORE_CLASS(klass) \ + (G_TYPE_CHECK_CLASS_TYPE ((klass), GTK_TYPE_DATA_STORE)) + +#define PSPPIRE_DATA_STORE_GET_CLASS(obj) \ + (G_TYPE_INSTANCE_GET_CLASS ((obj), \ GTK_TYPE_DATA_STORE, \ PsppireDataStoreClass)) @@ -84,8 +89,11 @@ struct _PsppireDataStoreClass inline GType psppire_data_store_get_type (void) G_GNUC_CONST; PsppireDataStore *psppire_data_store_new (PsppireDict *dict); +void psppire_data_store_set_case_file (PsppireDataStore *data_store, + PsppireCaseFile *cf); + void psppire_data_store_set_dictionary (PsppireDataStore *data_store, - PsppireDict *dict); + PsppireDict *dict); void psppire_data_store_set_font (PsppireDataStore *store, const PangoFontDescription *fd); @@ -95,13 +103,22 @@ void psppire_data_store_show_labels (PsppireDataStore *store, void psppire_data_store_clear (PsppireDataStore *data_store); -struct file_handle; +gboolean psppire_data_store_insert_new_case (PsppireDataStore *ds, casenumber posn); + + +gboolean psppire_data_store_delete_cases (PsppireDataStore *ds, casenumber first, casenumber count); + + +struct casereader * psppire_data_store_get_reader (PsppireDataStore *ds); -void psppire_data_store_create_system_file (PsppireDataStore *store, - struct file_handle *handle); +gchar * psppire_data_store_get_string (PsppireDataStore *ds, + casenumber row, glong column); -gboolean psppire_data_store_insert_new_case (PsppireDataStore *ds, gint posn); +gboolean psppire_data_store_set_string (PsppireDataStore *ds, + const gchar *text, + glong row, glong column); +casenumber psppire_data_store_get_case_count (PsppireDataStore *store); #ifdef __cplusplus