gattrib

struct.h

Go to the documentation of this file.
00001 /* gEDA - GPL Electronic Design Automation
00002  * gattrib -- gEDA component and net attribute manipulation using spreadsheet.
00003  * Copyright (C) 2003-2010 Stuart D. Brorson.
00004  *
00005  * This program is free software; you can redistribute it and/or modify
00006  * it under the terms of the GNU General Public License as published by
00007  * the Free Software Foundation; either version 2 of the License, or
00008  * (at your option) any later version.
00009  *
00010  * This program is distributed in the hope that it will be useful,
00011  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00012  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00013  * GNU General Public License for more details.
00014  *
00015  * You should have received a copy of the GNU General Public License
00016  * along with this program; if not, write to the Free Software
00017  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
00018  */
00019 
00020 /* ----------------------------------------------------------------- */
00026 /* ----------------------------------------------------------------- */
00027 
00028 
00029 #ifndef SHEET_DATA_STRUCT
00030 #define SHEET_DATA_STRUCT
00031 
00032 #include <gtk/gtk.h>
00033 #include <gdk/gdk.h>
00034 #include <gdk/gdkkeysyms.h>
00035 
00036 #include <glib.h>
00037 #include <glib-object.h>
00038 
00039 /* -------  Includes needed to make the GTK stuff work  ------ */
00040 
00041 #include "gtksheet_2_2.h"
00042 
00043 
00044 /* ========  Data structures used in processing below here  ========== */
00045 
00046 
00047 /* ----------------------------------------------------------------- *
00048  *  The sheet data hierarchy built by the prog should look like this:
00049  *  SHEET_DATA->(STRING_LIST *master_XXX_list)          // list of comps/nets/pins (row labels) 
00050  *            ->(STRING_LIST *master_XXX_attrib_list)   // list of attached names  (column labels)
00051  *            ->(TABLE *XXX_table)                      // table of attrib values (table entries)
00052  * ----------------------------------------------------------------- */
00053 typedef struct st_sheet_data SHEET_DATA;
00054 typedef struct st_table TABLE;
00055 typedef struct st_string_list STRING_LIST;
00056 typedef struct st_pin_list PIN_LIST;
00057 typedef struct st_main_window MAIN_WINDOW;
00058 
00059 
00060 /* -------------------------------------------------------------------- */
00067 /* -------------------------------------------------------------------- */
00068 struct st_sheet_data {
00069   STRING_LIST *master_comp_list_head;         
00070   STRING_LIST *master_comp_attrib_list_head;  
00071   int comp_count;                             
00072   int comp_attrib_count;                      
00074   STRING_LIST *master_net_list_head;          
00075   STRING_LIST *master_net_attrib_list_head;   
00076   int net_count;                              
00077   int net_attrib_count;                       
00079   STRING_LIST *master_pin_list_head;          
00080   STRING_LIST *master_pin_attrib_list_head;   
00081   int pin_count;                              
00082   int pin_attrib_count;                       
00085   TABLE **component_table;                    
00086   TABLE **net_table;                          
00087   TABLE **pin_table;                          
00089   int CHANGED;                                
00090 };
00091 
00092 
00093 
00094 /* -------------------------------------------------------------------- */
00095 /* \brief Table cell struct
00096  *
00097  * st_table defined what is held in a spreadsheet cell for both 
00098  * comp and net spreadsheets.  Holds pointer to individual comp/net name, and 
00099  * pointer to attrib list.  Ideally, the name pointer points to the 
00100  * refdes/netname string held in the TOPLEVEL data structure, so that 
00101  * when SHEET_DATA is manipulated, so is TOPLEVEL.
00102  */
00103 /* -------------------------------------------------------------------- */
00104 struct st_table {
00105   int row;                       
00106   int col;                       
00107   gchar *row_name;               
00108   gchar *col_name;               
00109   gchar *attrib_value;           
00110   gint visibility;
00111   gint show_name_value;
00112 
00113 };
00114 
00115 
00116 /* -------------------------------------------------------------------- */
00125 /* -------------------------------------------------------------------- */
00126 struct st_string_list {
00127   gchar *data;     
00128   int pos;         
00129   int length;      
00130   STRING_LIST *prev; 
00131   STRING_LIST *next; 
00132 };
00133 
00134 /* -------------------------------------------------------------------- */
00145 /* -------------------------------------------------------------------- */
00146 struct st_pin_list {
00147   gchar *refdes;       
00148   gint pinnumber;
00149   gchar *pinlabel;     
00150   int pos;             
00151   int length;          
00152   PIN_LIST *prev;
00153   PIN_LIST *next;
00154 };
00155 
00156 #endif // #ifndef SHEET_DATA_STRUCT
00157 
00158 
00159 
00160 
00161 
00162 
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Defines