list_model.h

Go to the documentation of this file.
00001 /*
00002  * Copyright (c) 2005, Ian Paul Larsen 
00003  *
00004  * Permission is hereby granted, free of charge, to any person obtaining 
00005  * a copy of this software and associated documentation files (the "Software"), 
00006  * to deal in the Software without restriction, including without limitation 
00007  * the rights to use, copy, modify, merge, publish, distribute, sublicense, 
00008  * and/or sell copies of the Software, and to permit persons to whom the 
00009  * Software is furnished to do so, subject to the following conditions:
00010  *
00011  * The above copyright notice and this permission notice shall be included 
00012  * in all copies or substantial portions of the Software.
00013  *
00014  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 
00015  * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
00016  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 
00017  * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR 
00018  * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 
00019  * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 
00020  * OTHER DEALINGS IN THE SOFTWARE. 
00021  */
00022 
00030 #ifndef __LIST_MODEL_H
00031 #define __LIST_MODEL_H
00032 
00033 #include "ntw.h"
00034 
00035 struct ntw_list_model_node {
00036   struct ntw_list_model_node *prev;
00037   struct ntw_list_model_node *next;
00038   void *data;
00039   struct ntw_data_store *var_data;
00040 };
00041 
00042 struct ntw_list_model {
00043   int32 id;
00044   int32 columns;
00045   int32 rows;
00046   int32 row_byte_size;
00047   uint8 *column_type;
00048   int32 *column_offset;
00049   struct ntw_list_model_node *first_node;
00050 };
00051 
00052 int
00053 ntw_list_model_data_send(struct ntw_list_model *lm, FILE *file);
00054 
00060 int
00061 ntw_list_model_get_column_type(ntwWidget *widget, int32 column);
00062 
00067 int
00068 ntw_list_model_clear(ntwWidget *widget);
00069 
00075 int32
00076 ntw_list_model_delete_row(ntwWidget *widget, int row);
00077 
00085 int32
00086 ntw_list_model_insert_row(ntwWidget *widget, int row, ...);
00087 
00088 
00102 ntwWidget *
00103 ntw_list_model_new(int32 columns, ...);
00104 
00105 void
00106 ntw_list_model_initialize_callback();
00107 
00108 #endif

Generated on Wed Jun 28 17:00:07 2006 for NTW Server C Library by  doxygen 1.4.6