[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
gEDA-cvs: CVS update: prototype.h
User: peterb
Date: 07/05/28 03:37:49
Modified: . prototype.h struct.h
Log:
Implement new component library system in libgeda.
A new component library model is needed to allow gschem etc.
to work well with part database systems. This patch
provides the necessary infrastructure in libgeda, without
the frontend Guile commands required to make use of the new
features. In particular, it abstracts the component
library into the concepts of "Component Sources" and
"Symbols", and allows external "Library Commands" to
provide symbol data in addition to the traditional directory
libraries.
In order to allow the new system to work, there are major
changes in all code which manipulates COMPLEX objects; in
particular, the magic "EMBEDDED" string is now only used
in the on-disc representation.
Revision Changes Path
1.128 eda/geda/gaf/libgeda/include/prototype.h
(In the diff below, changes in quantity of whitespace are not shown.)
Index: prototype.h
===================================================================
RCS file: /home/cvspsrv/cvsroot/eda/geda/gaf/libgeda/include/prototype.h,v
retrieving revision 1.127
retrieving revision 1.128
diff -u -b -r1.127 -r1.128
--- prototype.h 28 May 2007 07:30:31 -0000 1.127
+++ prototype.h 28 May 2007 07:37:49 -0000 1.128
@@ -286,15 +286,22 @@
OBJECT *add_head(void);
int o_complex_is_eligible_attribute(TOPLEVEL *w_current, OBJECT *object, int promote_invisible);
int o_complex_is_embedded(OBJECT *o_current);
+OBJECT *o_complex_add_by_name(TOPLEVEL *w_current, OBJECT *object_list,
+ GList **object_glist, char type,
+ int color, int x, int y, int angle,
+ int mirror, const gchar *basename,
+ int selectable,
+ int attribute_promotion);
OBJECT *o_complex_add(TOPLEVEL *w_current, OBJECT *object_list,
GList **object_glist, char type, int color,
- int x, int y, int angle, int mirror, char *clib,
- char *basename, int selectable, int attribute_promotion);
-OBJECT *o_complex_add_embedded(TOPLEVEL *w_current, OBJECT *object_list, char type, int color, int x, int y, int angle, char *clib, char *basename, int selectable);
+ int x, int y, int angle, int mirror,
+ const CLibSymbol *clib_sym, const gchar *basename,
+ int selectable, int attribute_promotion);
+OBJECT *o_complex_add_embedded(TOPLEVEL *w_current, OBJECT *object_list, char type, int color, int x, int y, int angle, const gchar *basename, int selectable);
void o_complex_recalc(TOPLEVEL *w_current, OBJECT *o_current);
OBJECT *o_complex_read(TOPLEVEL *w_current, OBJECT *object_list, char buf[], unsigned int release_ver, unsigned int fileformat_ver);
char *o_complex_save(OBJECT *object);
-void o_complex_set_filename(TOPLEVEL *w_current, char *clib, char *basename);
+void o_complex_set_filename(TOPLEVEL *w_current, const CLibSymbol *clib, char *basename);
void o_complex_free_filename(TOPLEVEL *w_current);
void o_complex_world_translate(TOPLEVEL *w_current, int x1, int y1, OBJECT *prim_objs);
void o_complex_world_translate_toplevel(TOPLEVEL *w_current, int x1, int y1, OBJECT *object);
@@ -490,10 +497,18 @@
/* s_clib.c */
void s_clib_init (void);
void s_clib_free (void);
-void s_clib_add_directory (const gchar *directory);
-const GList* s_clib_get_directories ();
-GSList* s_clib_get_files (const gchar *directory, const gchar *filter);
-const GSList* s_clib_search_basename (const gchar *basename);
+GList *s_clib_get_sources ();
+void s_clib_refresh ();
+const CLibSource *s_clib_add_directory (const gchar *directory);
+const CLibSource *s_clib_add_command (const gchar *command);
+const gchar *s_clib_source_get_name (const CLibSource *source);
+GList *s_clib_source_get_symbols (const CLibSource *source);
+const gchar *s_clib_symbol_get_name (const CLibSymbol *symbol);
+gchar *s_clib_symbol_get_filename (const CLibSymbol *symbol);
+const CLibSource *s_clib_symbol_get_source (const CLibSymbol *symbol);
+gchar *s_clib_symbol_get_data (const CLibSymbol *symbol);
+GList *s_clib_glob (const gchar *glob);
+gchar *s_clib_symbol_get_data_by_name (const gchar *name);
/* s_color.c */
void s_color_init(void);
@@ -536,7 +551,7 @@
/* s_hierarchy.c */
int s_hierarchy_down_schematic_single(TOPLEVEL *w_current, const gchar *filename, PAGE *parent, int page_control, int flag);
void s_hierarchy_down_schematic_multiple (TOPLEVEL *w_current, const gchar *filename, PAGE *parent);
-void s_hierarchy_down_symbol (TOPLEVEL *w_current, const gchar *filename, PAGE *parent);
+void s_hierarchy_down_symbol (TOPLEVEL *w_current, const CLibSymbol *symbol, PAGE *parent);
void s_hierarchy_up(TOPLEVEL *w_current, int pid);
GList* s_hierarchy_traversepages(TOPLEVEL *w_current, gint flags);
gint s_hierarchy_print_page(PAGE *p_current, void * data);
1.103 eda/geda/gaf/libgeda/include/struct.h
(In the diff below, changes in quantity of whitespace are not shown.)
Index: struct.h
===================================================================
RCS file: /home/cvspsrv/cvsroot/eda/geda/gaf/libgeda/include/struct.h,v
retrieving revision 1.102
retrieving revision 1.103
diff -u -b -r1.102 -r1.103
--- struct.h 28 May 2007 07:27:24 -0000 1.102
+++ struct.h 28 May 2007 07:37:49 -0000 1.103
@@ -58,6 +58,9 @@
/* Managed text buffers */
typedef struct _TextBuffer TextBuffer;
+/* Component library objects */
+typedef struct _CLibSource CLibSource;
+typedef struct _CLibSymbol CLibSymbol;
/* PB : change begin */
/* PB : these enum are constant to define :
@@ -209,8 +212,9 @@
int visited; /* used in gnetlist for travesal purposes */
- char *complex_basename; /* Complex basename */
- char *complex_clib; /* Complex Component Library */
+ gboolean complex_embedded; /* is embedded component? */
+ gchar *complex_basename; /* Component Library Symbol name */
+ const CLibSymbol *complex_clib; /* Component Library Symbol */
OBJECT *complex_parent; /* Complex parent object pointer */
/* used only in complex head nodes */
@@ -417,8 +421,7 @@
/* if it should go in here or not */
/* leave outside for now */
- char *internal_basename;
- char *internal_clib;
+ const CLibSymbol *internal_clib;
/* have to decided on component list stuff */
/* if it should go in here or not */
/* leave outside for now */
@@ -547,9 +550,7 @@
GtkWidget *cswindow; /* component select */
GtkWidget *clib_list;
GtkWidget *basename_list;
- char *current_clib;
- char current_basename[256];
-
+ CLibSymbol *current_clib;
GtkWidget *iwindow; /* image write dialog box */
GtkWidget *ifilename_entry;
_______________________________________________
geda-cvs mailing list
geda-cvs@xxxxxxxxxxxxxx
http://www.seul.org/cgi-bin/mailman/listinfo/geda-cvs