From 5ee8efda7a18d471728a5a26e1f50465ff60a14c Mon Sep 17 00:00:00 2001
From: rds <rds>
Date: Thu, 4 Jun 2009 09:13:04 +0000
Subject: [PATCH] Mainly compiler warning cures

---
 src/libpfetch/libpfetch.c                     |  8 ++-
 src/libpfetch/tests/check_libpfetch.h         | 19 ++++--
 .../items/zmapWindowContainerBlock.c          | 19 +-----
 .../items/zmapWindowContainerBlock.h          | 15 +++--
 .../items/zmapWindowContainerBlock_I.h        |  6 +-
 .../items/zmapWindowContainerChildren.h       |  6 +-
 .../items/zmapWindowContainerContext.c        | 10 +---
 .../items/zmapWindowContainerFeatureSet.c     |  6 +-
 .../items/zmapWindowContainerFeatureSet.h     |  8 ++-
 .../items/zmapWindowContainerFeatureSet_I.h   |  9 +--
 .../items/zmapWindowContainerGroup.h          | 59 ++++++++++++++++---
 .../items/zmapWindowContainerGroup_I.h        |  8 ++-
 .../items/zmapWindowContainerStrand.c         | 18 ++++--
 .../items/zmapWindowContainerStrand.h         | 19 +++---
 .../items/zmapWindowContainerStrand_I.h       | 12 ++--
 .../items/zmapWindowContainerUtils.c          | 10 ++--
 .../items/zmapWindowContainerUtils.h          | 18 +++---
 .../items/zmapWindowContainerUtils_P.h        | 15 ++++-
 src/zmapWindow/items/zmapWindowContainers.h   | 51 ++++++++++++++++
 19 files changed, 212 insertions(+), 104 deletions(-)
 create mode 100755 src/zmapWindow/items/zmapWindowContainers.h

diff --git a/src/libpfetch/libpfetch.c b/src/libpfetch/libpfetch.c
index 081c98db3..f7e95d11c 100755
--- a/src/libpfetch/libpfetch.c
+++ b/src/libpfetch/libpfetch.c
@@ -27,9 +27,9 @@
  *
  * Exported functions: See XXXXXXXXXXXXX.h
  * HISTORY:
- * Last edited: May 22 17:22 2009 (rds)
+ * Last edited: Jun  3 10:13 2009 (rds)
  * Created: Fri Apr  4 14:21:42 2008 (rds)
- * CVS info:   $Id: libpfetch.c,v 1.11 2009-05-22 18:32:51 rds Exp $
+ * CVS info:   $Id: libpfetch.c,v 1.12 2009-06-04 09:15:59 rds Exp $
  *-------------------------------------------------------------------
  */
 
@@ -1018,8 +1018,10 @@ static void pfetch_pipe_handle_finalize(GObject *gobject)
  * -L/usr/totalview/linux-x86/lib -ldbfork */
 static void detach_group_for_later_kill(gpointer unused)
 {
+#ifdef WHY_IS_THIS_HERE
   ChildWatchData child_data = (ChildWatchData)unused;
   PFetchHandlePipe handle;
+#endif /* WHY_IS_THIS_HERE */
   int setgrp_rv = 0;
 
   errno = 0;
@@ -1065,7 +1067,7 @@ static void detach_group_for_later_kill(gpointer unused)
 		  detail, &output[0], &actual_read_uint, error);
 
     }
-#endif
+#endif /* WHY_IS_THIS_HERE */
 
   return ;
 }
diff --git a/src/libpfetch/tests/check_libpfetch.h b/src/libpfetch/tests/check_libpfetch.h
index 9d426d317..a7e6f7559 100755
--- a/src/libpfetch/tests/check_libpfetch.h
+++ b/src/libpfetch/tests/check_libpfetch.h
@@ -27,9 +27,9 @@
  *
  * Exported functions: See XXXXXXXXXXXXX.h
  * HISTORY:
- * Last edited: Mar 31 15:44 2009 (rds)
+ * Last edited: Apr 16 10:57 2009 (rds)
  * Created: Tue Mar 31 10:14:55 2009 (rds)
- * CVS info:   $Id: check_libpfetch.h,v 1.1 2009-04-01 10:37:23 rds Exp $
+ * CVS info:   $Id: check_libpfetch.h,v 1.2 2009-06-04 09:15:59 rds Exp $
  *-------------------------------------------------------------------
  */
 
@@ -45,12 +45,23 @@
 
 #define PFETCH_READ_SIZE 80
 
+#define CHECK_PFETCH_ISOFORM_SEQ TRUE
 #define CHECK_PFETCH_DEBUG       TRUE
 #define CHECK_PFETCH_FULL        TRUE
-#define CHECK_PFETCH_LOCATION    "/software/noarch/bin/pfetch"
-#define CHECK_PFETCH_ISOFORM_SEQ TRUE
+
+
+/* Allow for -D for location, port and cookie jar when compiling */
+#ifndef CHECK_PFETCH_LOCATION
+#define CHECK_PFETCH_LOCATION    "pfetch"
+#endif 
+
+#ifndef CHECK_PFETCH_PORT
 #define CHECK_PFETCH_PORT        80
+#endif 
+
+#ifndef CHECK_PFETCH_COOKIE_JAR
 #define CHECK_PFETCH_COOKIE_JAR  "~/.cookie_jar"
+#endif 
 
 #ifdef VARIANT_TEST
 #define CHECK_PFETCH_SEQUENCE    "Sw:Q9Y6M0-3.1"
diff --git a/src/zmapWindow/items/zmapWindowContainerBlock.c b/src/zmapWindow/items/zmapWindowContainerBlock.c
index 859786236..ba9692776 100755
--- a/src/zmapWindow/items/zmapWindowContainerBlock.c
+++ b/src/zmapWindow/items/zmapWindowContainerBlock.c
@@ -27,9 +27,9 @@
  *
  * Exported functions: See XXXXXXXXXXXXX.h
  * HISTORY:
- * Last edited: Jun  3 08:35 2009 (rds)
+ * Last edited: Jun  4 10:05 2009 (rds)
  * Created: Mon Jul 30 13:09:33 2007 (rds)
- * CVS info:   $Id: zmapWindowContainerBlock.c,v 1.2 2009-06-03 22:29:08 rds Exp $
+ * CVS info:   $Id: zmapWindowContainerBlock.c,v 1.3 2009-06-04 09:13:04 rds Exp $
  *-------------------------------------------------------------------
  */
 
@@ -96,10 +96,8 @@ GType zmapWindowContainerBlockGetType(void)
 }
 
 
-ZMapWindowContainerBlock zmapWindowContainerBlockAugment(ZMapWindowContainerBlock container_block,
-							 ZMapWindow window)
+ZMapWindowContainerBlock zmapWindowContainerBlockAugment(ZMapWindowContainerBlock container_block)
 {
-  container_block->window = window;
 
   return container_block;
 }
@@ -142,17 +140,6 @@ GList *zmapWindowContainerBlockRemoveBumpedColumns(ZMapWindowContainerBlock bloc
   return list;
 }
 
-ZMapWindow zmapWindowContainerBlockGetWindow(ZMapWindowContainerBlock block_data)
-{
-  ZMapWindow window = NULL;
-
-  g_return_val_if_fail(ZMAP_IS_CONTAINER_BLOCK(block_data), window);
-
-  window = block_data->window;
-
-  return window;
-}
-
 static gboolean maximise_mark_items_cb(ZMapWindowContainerGroup group_updated, 
 				       FooCanvasPoints         *group_bounds,
 				       ZMapContainerLevelType   group_level,
diff --git a/src/zmapWindow/items/zmapWindowContainerBlock.h b/src/zmapWindow/items/zmapWindowContainerBlock.h
index bcb744480..1bb35f3cf 100755
--- a/src/zmapWindow/items/zmapWindowContainerBlock.h
+++ b/src/zmapWindow/items/zmapWindowContainerBlock.h
@@ -27,14 +27,14 @@
  *
  * Exported functions: See XXXXXXXXXXXXX.h
  * HISTORY:
- * Last edited: Jun  1 22:47 2009 (rds)
+ * Last edited: Jun  4 10:04 2009 (rds)
  * Created: Wed Dec  3 08:21:03 2008 (rds)
- * CVS info:   $Id: zmapWindowContainerBlock.h,v 1.1 2009-06-02 11:20:23 rds Exp $
+ * CVS info:   $Id: zmapWindowContainerBlock.h,v 1.2 2009-06-04 09:13:04 rds Exp $
  *-------------------------------------------------------------------
  */
 
-#ifndef ZMAP_WINDOW_CONTAINER_BLOCK_H
-#define ZMAP_WINDOW_CONTAINER_BLOCK_H
+#ifndef __ZMAP_WINDOW_CONTAINER_BLOCK_H__
+#define __ZMAP_WINDOW_CONTAINER_BLOCK_H__
 
 #include <glib-object.h>
 #include <libfoocanvas/libfoocanvas.h>
@@ -62,15 +62,14 @@ typedef struct _zmapWindowContainerBlockClassStruct  zmapWindowContainerBlockCla
 
 /* Public funcs */
 GType zmapWindowContainerBlockGetType(void);
-ZMapWindowContainerBlock zmapWindowContainerBlockAugment(ZMapWindowContainerBlock container_block,
-							 ZMapWindow window);
+ZMapWindowContainerBlock zmapWindowContainerBlockAugment(ZMapWindowContainerBlock container_block);
 void   zmapWindowContainerBlockAddCompressedColumn(ZMapWindowContainerBlock block_data, 
 						   FooCanvasGroup *container);
 GList *zmapWindowContainerBlockRemoveCompressedColumns(ZMapWindowContainerBlock block_data);
 void   zmapWindowContainerBlockAddBumpedColumn(ZMapWindowContainerBlock block_data, 
 					       FooCanvasGroup *container);
 GList *zmapWindowContainerBlockRemoveBumpedColumns(ZMapWindowContainerBlock block_data);
-ZMapWindow zmapWindowContainerBlockGetWindow(ZMapWindowContainerBlock block_data);
+
 void zmapWindowContainerBlockMark(ZMapWindowContainerBlock container_block,
 				  GdkColor  *mark_colour,
 				  GdkBitmap *mark_stipple,
@@ -91,4 +90,4 @@ gboolean zmapWindowContainerBlockIsColumnLoaded(ZMapWindowContainerBlock      co
 ZMapWindowContainerBlock zMapWindowContainerBlockDestroy(ZMapWindowContainerBlock canvas_item);
 
 
-#endif /* ZMAP_WINDOW_CONTAINER_BLOCK_H */
+#endif /* ! __ZMAP_WINDOW_CONTAINER_BLOCK_H__ */
diff --git a/src/zmapWindow/items/zmapWindowContainerBlock_I.h b/src/zmapWindow/items/zmapWindowContainerBlock_I.h
index 2bd33ff71..94bd599c3 100755
--- a/src/zmapWindow/items/zmapWindowContainerBlock_I.h
+++ b/src/zmapWindow/items/zmapWindowContainerBlock_I.h
@@ -27,9 +27,9 @@
  *
  * Exported functions: See XXXXXXXXXXXXX.h
  * HISTORY:
- * Last edited: Jun  2 23:14 2009 (rds)
+ * Last edited: Jun  4 08:56 2009 (rds)
  * Created: Fri Feb  6 11:49:03 2009 (rds)
- * CVS info:   $Id: zmapWindowContainerBlock_I.h,v 1.2 2009-06-03 22:29:08 rds Exp $
+ * CVS info:   $Id: zmapWindowContainerBlock_I.h,v 1.3 2009-06-04 09:13:04 rds Exp $
  *-------------------------------------------------------------------
  */
 
@@ -45,7 +45,7 @@ typedef struct _zmapWindowContainerBlockStruct
 {
   zmapWindowContainerGroup __parent__;
 
-  ZMapWindow  window;
+  gpointer  window;
 
   GList      *compressed_cols, *bumped_cols ;
   
diff --git a/src/zmapWindow/items/zmapWindowContainerChildren.h b/src/zmapWindow/items/zmapWindowContainerChildren.h
index 33979d88b..06932c013 100755
--- a/src/zmapWindow/items/zmapWindowContainerChildren.h
+++ b/src/zmapWindow/items/zmapWindowContainerChildren.h
@@ -27,9 +27,9 @@
  *
  * Exported functions: See XXXXXXXXXXXXX.h
  * HISTORY:
- * Last edited: Jun  3 13:36 2009 (rds)
+ * Last edited: Jun  4 08:32 2009 (rds)
  * Created: Wed Dec  3 08:21:03 2008 (rds)
- * CVS info:   $Id: zmapWindowContainerChildren.h,v 1.2 2009-06-03 22:29:08 rds Exp $
+ * CVS info:   $Id: zmapWindowContainerChildren.h,v 1.3 2009-06-04 09:13:04 rds Exp $
  *-------------------------------------------------------------------
  */
 
@@ -38,7 +38,7 @@
 
 #include <glib-object.h>
 #include <libfoocanvas/libfoocanvas.h>
-#include <zmapWindow_P.h>
+
 
 #ifndef ZMAP_WINDOW_CONTAINER_H
 
diff --git a/src/zmapWindow/items/zmapWindowContainerContext.c b/src/zmapWindow/items/zmapWindowContainerContext.c
index 2471569ae..b959f6d64 100755
--- a/src/zmapWindow/items/zmapWindowContainerContext.c
+++ b/src/zmapWindow/items/zmapWindowContainerContext.c
@@ -27,9 +27,9 @@
  *
  * Exported functions: See XXXXXXXXXXXXX.h
  * HISTORY:
- * Last edited: Jun  3 21:55 2009 (rds)
+ * Last edited: Jun  4 09:02 2009 (rds)
  * Created: Mon Jul 30 13:09:33 2007 (rds)
- * CVS info:   $Id: zmapWindowContainerContext.c,v 1.2 2009-06-03 22:29:08 rds Exp $
+ * CVS info:   $Id: zmapWindowContainerContext.c,v 1.3 2009-06-04 09:13:04 rds Exp $
  *-------------------------------------------------------------------
  */
 #include <zmapWindowCanvas.h>
@@ -90,12 +90,6 @@ GType zmapWindowContainerContextGetType(void)
 }
 
 
-ZMapWindowContainerContext zmapWindowContainerContextCreate(ZMapWindow window)
-{
-  ZMapWindowContainerContext block_data;
-
-  return block_data;
-}
 
 ZMapWindowContainerContext zmapWindowContainerContextDestroy(ZMapWindowContainerContext container_context)
 {
diff --git a/src/zmapWindow/items/zmapWindowContainerFeatureSet.c b/src/zmapWindow/items/zmapWindowContainerFeatureSet.c
index c6a55bf64..09243917b 100755
--- a/src/zmapWindow/items/zmapWindowContainerFeatureSet.c
+++ b/src/zmapWindow/items/zmapWindowContainerFeatureSet.c
@@ -27,9 +27,9 @@
  *
  * Exported functions: See XXXXXXXXXXXXX.h
  * HISTORY:
- * Last edited: Jun  3 23:08 2009 (rds)
+ * Last edited: Jun  4 08:50 2009 (rds)
  * Created: Mon Jul 30 13:09:33 2007 (rds)
- * CVS info:   $Id: zmapWindowContainerFeatureSet.c,v 1.2 2009-06-03 22:29:08 rds Exp $
+ * CVS info:   $Id: zmapWindowContainerFeatureSet.c,v 1.3 2009-06-04 09:13:04 rds Exp $
  *-------------------------------------------------------------------
  */
 #include <string.h>		/* memset */
@@ -130,7 +130,7 @@ GType zmapWindowContainerFeatureSetGetType(void)
 
 
 ZMapWindowContainerFeatureSet zmapWindowContainerFeatureSetAugment(ZMapWindowContainerFeatureSet container_set,
-								   ZMapWindow window,
+								   gpointer   window,
 								   GQuark     feature_set_unique_id,
 								   GQuark     feature_set_original_id, /* unused! */
 								   GList     *style_list,
diff --git a/src/zmapWindow/items/zmapWindowContainerFeatureSet.h b/src/zmapWindow/items/zmapWindowContainerFeatureSet.h
index 907e1582a..5c7411a1d 100755
--- a/src/zmapWindow/items/zmapWindowContainerFeatureSet.h
+++ b/src/zmapWindow/items/zmapWindowContainerFeatureSet.h
@@ -27,9 +27,9 @@
  *
  * Exported functions: See XXXXXXXXXXXXX.h
  * HISTORY:
- * Last edited: Jun  3 23:12 2009 (rds)
+ * Last edited: Jun  4 08:49 2009 (rds)
  * Created: Wed Dec  3 08:21:03 2008 (rds)
- * CVS info:   $Id: zmapWindowContainerFeatureSet.h,v 1.2 2009-06-03 22:29:08 rds Exp $
+ * CVS info:   $Id: zmapWindowContainerFeatureSet.h,v 1.3 2009-06-04 09:13:04 rds Exp $
  *-------------------------------------------------------------------
  */
 
@@ -62,7 +62,7 @@ typedef struct _zmapWindowContainerFeatureSetClassStruct  zmapWindowContainerFea
 GType zmapWindowContainerFeatureSetGetType(void);
 
 ZMapWindowContainerFeatureSet zmapWindowContainerFeatureSetAugment(ZMapWindowContainerFeatureSet container_set,
-								   ZMapWindow window,
+								   gpointer   window,
 								   GQuark     feature_set_unique_id,
 								   GQuark     feature_set_original_id, /* unused! */
 								   GList     *style_list,
@@ -71,7 +71,9 @@ ZMapWindowContainerFeatureSet zmapWindowContainerFeatureSetAugment(ZMapWindowCon
 gboolean zmapWindowContainerFeatureSetAttachFeatureSet(ZMapWindowContainerFeatureSet container_set,
 						       ZMapFeatureSet feature_set_to_attach);
 ZMapFeatureSet zmapWindowContainerFeatureSetRecoverFeatureSet(ZMapWindowContainerFeatureSet container_set);
+#ifdef blah
 ZMapWindowStats zmapWindowContainerFeatureSetRecoverStats(ZMapWindowContainerFeatureSet container_set);
+#endif
 
 /* Style lookup */
 ZMapFeatureTypeStyle zmapWindowContainerFeatureSetStyleFromStyle(ZMapWindowContainerFeatureSet container_set,
diff --git a/src/zmapWindow/items/zmapWindowContainerFeatureSet_I.h b/src/zmapWindow/items/zmapWindowContainerFeatureSet_I.h
index 8f2a6c6a1..9db9bc51c 100755
--- a/src/zmapWindow/items/zmapWindowContainerFeatureSet_I.h
+++ b/src/zmapWindow/items/zmapWindowContainerFeatureSet_I.h
@@ -27,17 +27,18 @@
  *
  * Exported functions: See XXXXXXXXXXXXX.h
  * HISTORY:
- * Last edited: Jun  3 22:58 2009 (rds)
+ * Last edited: Jun  4 08:51 2009 (rds)
  * Created: Fri Feb  6 11:49:03 2009 (rds)
- * CVS info:   $Id: zmapWindowContainerFeatureSet_I.h,v 1.2 2009-06-03 22:29:08 rds Exp $
+ * CVS info:   $Id: zmapWindowContainerFeatureSet_I.h,v 1.3 2009-06-04 09:13:04 rds Exp $
  *-------------------------------------------------------------------
  */
 
 #ifndef __ZMAP_WINDOW_CONTAINER_FEATURE_SET_I_H__
 #define __ZMAP_WINDOW_CONTAINER_FEATURE_SET_I_H__
 
+#include <glib.h>
+#include <ZMap/zmapFeature.h>
 #include <ZMap/zmapStyle.h>
-#include <zmapWindow_P.h>
 #include <zmapWindowContainerGroup_I.h>
 #include <zmapWindowContainerFeatureSet.h>
 #include <zmapWindowContainerUtils_P.h>
@@ -47,7 +48,7 @@ typedef struct _zmapWindowContainerFeatureSetStruct
 {
   zmapWindowContainerGroup __parent__;
 
-  ZMapWindow  window;
+  gpointer    window;
   ZMapStrand  strand ;
   ZMapFrame   frame ;
   GHashTable *style_table ;
diff --git a/src/zmapWindow/items/zmapWindowContainerGroup.h b/src/zmapWindow/items/zmapWindowContainerGroup.h
index 1864c31a8..8cf58da38 100755
--- a/src/zmapWindow/items/zmapWindowContainerGroup.h
+++ b/src/zmapWindow/items/zmapWindowContainerGroup.h
@@ -27,19 +27,66 @@
  *
  * Exported functions: See XXXXXXXXXXXXX.h
  * HISTORY:
- * Last edited: Jun  3 14:28 2009 (rds)
+ * Last edited: Jun  4 09:58 2009 (rds)
  * Created: Wed Dec  3 08:21:03 2008 (rds)
- * CVS info:   $Id: zmapWindowContainerGroup.h,v 1.2 2009-06-03 22:29:08 rds Exp $
+ * CVS info:   $Id: zmapWindowContainerGroup.h,v 1.3 2009-06-04 09:13:04 rds Exp $
  *-------------------------------------------------------------------
  */
 
 #ifndef ZMAP_WINDOW_CONTAINER_GROUP_H
 #define ZMAP_WINDOW_CONTAINER_GROUP_H
 
+#include <gdk/gdk.h>		/* GdkColor */
 #include <glib-object.h>
 #include <libfoocanvas/libfoocanvas.h>
 #include <zmapWindowContainerChildren.h>
 
+
+
+/* ZMapWindowContainerGroup for containing and positioning of canvas items.
+ * Each ZMapWindowContainerGroup consists of:
+ * 
+ *                parent_group
+ *              /     |        \
+ *             /      |         \
+ *            /       |          \
+ *  background   sub_group of     sub_group of
+ *      item     feature items    overlay items
+ *
+ * Note that this means that the the overlay items are above the feature items
+ * which are above the background item.
+ *
+ * The background item is used both as a visible background for the items but also
+ * more importantly to catch events _anywhere_ in the space (e.g. column) where
+ * the items might be drawn.
+ * This arrangement also means that code that has to process all items can do so
+ * simply by processing all members of the item list of the sub_group as they
+ * are guaranteed to all be feature items and it is trivial to perform such operations
+ * as taking the size of all items in a group.
+ * 
+ * Our canvas is guaranteed to have a tree hierachy of these structures from a column
+ * up to the ultimate alignment parent. If the parent is not a container_features
+ * group then we make a container root, i.e. the top of the container tree.
+ * 
+ * The new object code means that each container member including the member itself
+ * has a G_TYPE*  This means code that does ZMAP_IS_CONTAINER_GROUP(pointer) is 
+ * simplier and hopefully more readable.  
+ *
+ * The ZMapWindowContainerGroup are sub classes of FooCanvasGroup and implement the
+ * FooCanvasItem interface (draw, update, bounds, etc...).  The update code takes
+ * care of cropping the Container "owned" items, such as the background and any 
+ * overlays/underlays that might be being drawn.  It also includes hooks to 
+ * provide similar functionality to the ContainerExecute callbacks.  These are 
+ * attached/owned by each specific container so only get called by the container
+ * they relate to.  This again leads to simplier code, without the switch on the
+ * container level.
+ *  
+ */
+
+
+
+
+
 #define ZMAP_WINDOW_CONTAINER_GROUP_NAME 	"ZMapWindowContainerGroup"
 
 
@@ -102,14 +149,8 @@ void zmapWindowContainerGroupRemoveUpdateHook(ZMapWindowContainerGroup container
 					      ZMapWindowContainerUpdateHook hook,
 					      gpointer user_data);
 
-ZMapWindowContainerGroup zMapWindowContainerGroupDestroy(ZMapWindowContainerGroup canvas_item);
-
+ZMapWindowContainerGroup zmapWindowContainerGroupDestroy(ZMapWindowContainerGroup container);
 
-#include <zmapWindowContainerAlignment.h>
-#include <zmapWindowContainerBlock.h>
-#include <zmapWindowContainerContext.h>
-#include <zmapWindowContainerFeatureSet.h>
-#include <zmapWindowContainerStrand.h>
 
 
 #endif /* ZMAP_WINDOW_CONTAINER_GROUP_H */
diff --git a/src/zmapWindow/items/zmapWindowContainerGroup_I.h b/src/zmapWindow/items/zmapWindowContainerGroup_I.h
index 2500e22fa..3b41cbd16 100755
--- a/src/zmapWindow/items/zmapWindowContainerGroup_I.h
+++ b/src/zmapWindow/items/zmapWindowContainerGroup_I.h
@@ -27,15 +27,19 @@
  *
  * Exported functions: See XXXXXXXXXXXXX.h
  * HISTORY:
- * Last edited: Jun  3 21:55 2009 (rds)
+ * Last edited: Jun  4 08:47 2009 (rds)
  * Created: Wed Dec  3 08:38:10 2008 (rds)
- * CVS info:   $Id: zmapWindowContainerGroup_I.h,v 1.2 2009-06-03 22:29:08 rds Exp $
+ * CVS info:   $Id: zmapWindowContainerGroup_I.h,v 1.3 2009-06-04 09:13:04 rds Exp $
  *-------------------------------------------------------------------
  */
 
 #ifndef ZMAP_WINDOW_CONTAINER_GROUP_I_H
 #define ZMAP_WINDOW_CONTAINER_GROUP_I_H
 
+#include <gdk/gdk.h>		/* GdkColor, GdkBitmap */
+#include <glib-object.h>
+#include <libfoocanvas/libfoocanvas.h>
+#include <ZMap/zmapFeature.h>
 #include <zmapWindowContainerGroup.h>
 #include <zmapWindowContainerUtils_P.h>
 
diff --git a/src/zmapWindow/items/zmapWindowContainerStrand.c b/src/zmapWindow/items/zmapWindowContainerStrand.c
index cf91cbd3a..09e4fc655 100755
--- a/src/zmapWindow/items/zmapWindowContainerStrand.c
+++ b/src/zmapWindow/items/zmapWindowContainerStrand.c
@@ -27,9 +27,9 @@
  *
  * Exported functions: See XXXXXXXXXXXXX.h
  * HISTORY:
- * Last edited: Jun  3 09:48 2009 (rds)
+ * Last edited: Jun  4 09:13 2009 (rds)
  * Created: Wed May 20 10:59:40 2009 (rds)
- * CVS info:   $Id: zmapWindowContainerStrand.c,v 1.2 2009-06-03 22:29:08 rds Exp $
+ * CVS info:   $Id: zmapWindowContainerStrand.c,v 1.3 2009-06-04 09:13:04 rds Exp $
  *-------------------------------------------------------------------
  */
 
@@ -86,12 +86,12 @@ GType zmapWindowContainerStrandGetType(void)
 
 
 
-void zmapWindowContainerStrandAugment(ZMapWindowContainerStrand container_strand,
-				      ZMapStrand strand)
+ZMapWindowContainerStrand zmapWindowContainerStrandAugment(ZMapWindowContainerStrand container_strand,
+							   ZMapStrand strand)
 {
   container_strand->strand = strand;
 
-  return ;
+  return container_strand;
 }
 
 void zmapWindowContainerStrandSetAsSeparator(ZMapWindowContainerStrand container_strand)
@@ -101,6 +101,14 @@ void zmapWindowContainerStrandSetAsSeparator(ZMapWindowContainerStrand container
   return ;
 }
 
+ZMapWindowContainerStrand zMapWindowContainerStrandDestroy(ZMapWindowContainerStrand container_strand)
+{
+  g_object_unref(container_strand);
+
+  container_strand = NULL;
+
+  return container_strand;
+}
 
 static void zmap_window_container_strand_class_init  (ZMapWindowContainerStrandClass container_class)
 {
diff --git a/src/zmapWindow/items/zmapWindowContainerStrand.h b/src/zmapWindow/items/zmapWindowContainerStrand.h
index 933d1f8b7..1069b73a6 100755
--- a/src/zmapWindow/items/zmapWindowContainerStrand.h
+++ b/src/zmapWindow/items/zmapWindowContainerStrand.h
@@ -27,18 +27,18 @@
  *
  * Exported functions: See XXXXXXXXXXXXX.h
  * HISTORY:
- * Last edited: May 20 13:11 2009 (rds)
+ * Last edited: Jun  4 09:42 2009 (rds)
  * Created: Wed Dec  3 08:21:03 2008 (rds)
- * CVS info:   $Id: zmapWindowContainerStrand.h,v 1.1 2009-06-02 11:20:24 rds Exp $
+ * CVS info:   $Id: zmapWindowContainerStrand.h,v 1.2 2009-06-04 09:13:04 rds Exp $
  *-------------------------------------------------------------------
  */
 
-#ifndef ZMAP_WINDOW_CONTAINER_STRAND_H
-#define ZMAP_WINDOW_CONTAINER_STRAND_H
+#ifndef __ZMAP_WINDOW_CONTAINER_STRAND_H__
+#define __ZMAP_WINDOW_CONTAINER_STRAND_H__
 
 #include <glib-object.h>
 #include <libfoocanvas/libfoocanvas.h>
-#include <zmapWindowContainerGroup_I.h>
+#include <ZMap/zmapFeature.h>
 
 #define ZMAP_WINDOW_CONTAINER_STRAND_NAME 	"ZMapWindowContainerStrand"
 
@@ -62,8 +62,11 @@ typedef struct _zmapWindowContainerStrandClassStruct  zmapWindowContainerStrandC
 /* Public funcs */
 GType zmapWindowContainerStrandGetType(void);
 
-ZMapWindowContainerStrand zMapWindowContainerStrandCreate(FooCanvasGroup *parent);
-ZMapWindowContainerStrand zMapWindowContainerStrandDestroy(ZMapWindowContainerStrand canvas_item);
+ZMapWindowContainerStrand zmapWindowContainerStrandAugment(ZMapWindowContainerStrand container_strand,
+							   ZMapStrand strand);
+void zmapWindowContainerStrandSetAsSeparator(ZMapWindowContainerStrand container_strand);
 
+ZMapWindowContainerStrand zMapWindowContainerStrandDestroy(ZMapWindowContainerStrand container_strand);
 
-#endif /* ZMAP_WINDOW_CONTAINER_STRAND_H */
+
+#endif /* ! __ZMAP_WINDOW_CONTAINER_STRAND_H__ */
diff --git a/src/zmapWindow/items/zmapWindowContainerStrand_I.h b/src/zmapWindow/items/zmapWindowContainerStrand_I.h
index 31a804585..f1e9659dd 100755
--- a/src/zmapWindow/items/zmapWindowContainerStrand_I.h
+++ b/src/zmapWindow/items/zmapWindowContainerStrand_I.h
@@ -27,16 +27,16 @@
  *
  * Exported functions: See XXXXXXXXXXXXX.h
  * HISTORY:
- * Last edited: May 20 11:16 2009 (rds)
+ * Last edited: Jun  4 09:40 2009 (rds)
  * Created: Wed Dec  3 08:38:10 2008 (rds)
- * CVS info:   $Id: zmapWindowContainerStrand_I.h,v 1.1 2009-06-02 11:20:24 rds Exp $
+ * CVS info:   $Id: zmapWindowContainerStrand_I.h,v 1.2 2009-06-04 09:13:04 rds Exp $
  *-------------------------------------------------------------------
  */
-#ifndef ZMAP_WINDOW_CONTAINER_STRAND_I_H
-#define ZMAP_WINDOW_CONTAINER_STRAND_I_H
-
+#ifndef __ZMAP_WINDOW_CONTAINER_STRAND_I_H__
+#define __ZMAP_WINDOW_CONTAINER_STRAND_I_H__
 
 #include <zmapWindowContainerStrand.h>
+#include <zmapWindowContainerGroup_I.h>
 
 typedef enum
   {
@@ -60,4 +60,4 @@ typedef struct _zmapWindowContainerStrandStruct
 } zmapWindowContainerStrandStruct;
 
 
-#endif /* ZMAP_WINDOW_CONTAINER_STRAND_I_H */
+#endif /* ! __ZMAP_WINDOW_CONTAINER_STRAND_I_H__ */
diff --git a/src/zmapWindow/items/zmapWindowContainerUtils.c b/src/zmapWindow/items/zmapWindowContainerUtils.c
index 473579014..de03126bd 100755
--- a/src/zmapWindow/items/zmapWindowContainerUtils.c
+++ b/src/zmapWindow/items/zmapWindowContainerUtils.c
@@ -27,21 +27,19 @@
  *
  * Exported functions: See XXXXXXXXXXXXX.h
  * HISTORY:
- * Last edited: Jun  3 21:47 2009 (rds)
+ * Last edited: Jun  4 09:41 2009 (rds)
  * Created: Tue Apr 28 16:10:46 2009 (rds)
- * CVS info:   $Id: zmapWindowContainerUtils.c,v 1.2 2009-06-03 22:29:08 rds Exp $
+ * CVS info:   $Id: zmapWindowContainerUtils.c,v 1.3 2009-06-04 09:13:04 rds Exp $
  *-------------------------------------------------------------------
  */
 
 #include <zmapWindowCanvas.h>
+#include <zmapWindowContainerUtils_P.h>
 #include <zmapWindowContainerUtils.h>
 #include <zmapWindowContainerGroup_I.h>
 #include <zmapWindowContainerChildren_I.h>
 #include <zmapWindowContainerFeatureSet_I.h>
 #include <zmapWindowContainerStrand_I.h> /* access to ZMapWindowContainerStrand->strand */
-#include <zmapWindowContainerBlock.h>
-#include <zmapWindowContainerAlignment.h>
-#include <zmapWindowContainerContext.h>
 
 typedef struct ContainerRecursionDataStruct_
 {
@@ -77,7 +75,7 @@ FooCanvasGroup *zmapWindowContainerCreate(FooCanvasGroup *parent,
 					  double child_spacing,
 					  GdkColor *background_fill_colour,
 					  GdkColor *background_border_colour,
-					  ZMapWindowLongItems long_items)
+					  gpointer long_items)
 {
   ZMapWindowContainerGroup container_group;
   FooCanvasGroup *new_container = NULL;
diff --git a/src/zmapWindow/items/zmapWindowContainerUtils.h b/src/zmapWindow/items/zmapWindowContainerUtils.h
index be8248ae7..edbf13e53 100755
--- a/src/zmapWindow/items/zmapWindowContainerUtils.h
+++ b/src/zmapWindow/items/zmapWindowContainerUtils.h
@@ -27,18 +27,17 @@
  *
  * Exported functions: See XXXXXXXXXXXXX.h
  * HISTORY:
- * Last edited: Jun  3 21:48 2009 (rds)
+ * Last edited: Jun  4 09:44 2009 (rds)
  * Created: Thu Apr 30 14:40:12 2009 (rds)
- * CVS info:   $Id: zmapWindowContainerUtils.h,v 1.2 2009-06-03 22:29:08 rds Exp $
+ * CVS info:   $Id: zmapWindowContainerUtils.h,v 1.3 2009-06-04 09:13:04 rds Exp $
  *-------------------------------------------------------------------
  */
 
-#ifndef ZMAP_WINDOW_CONTAINER_UTILS_H
-#define ZMAP_WINDOW_CONTAINER_UTILS_H
-
-#include <zmapWindowContainerGroup.h>
-#include <zmapWindowContainerChildren.h>
+#ifndef __ZMAP_WINDOW_CONTAINER_UTILS_H__
+#define __ZMAP_WINDOW_CONTAINER_UTILS_H__
 
+#include <ZMap/zmapFeature.h>
+#include <zmapWindowContainers.h>
 
 typedef void (*ZMapContainerUtilsExecFunc)(ZMapWindowContainerGroup container, 
 					   FooCanvasPoints         *container_points,
@@ -50,7 +49,7 @@ FooCanvasGroup *zmapWindowContainerCreate(FooCanvasGroup *parent,
 					  double child_spacing,
 					  GdkColor *background_fill_colour,
 					  GdkColor *background_border_colour,
-					  ZMapWindowLongItems long_items);
+					  gpointer long_items);
 
 /* Check a canvas group is a valid container */
 gboolean zmapWindowContainerUtilsIsValid(FooCanvasGroup *any_group);
@@ -74,7 +73,6 @@ ZMapWindowContainerStrand zmapWindowContainerBlockGetContainerStrand(ZMapWindowC
 								     ZMapStrand               strand);
 ZMapWindowContainerStrand zmapWindowContainerBlockGetContainerSeparator(ZMapWindowContainerBlock container_block);
 
-
 ZMapWindowContainerFeatures   zmapWindowContainerGetFeatures  (ZMapWindowContainerGroup container);
 ZMapWindowContainerBackground zmapWindowContainerGetBackground(ZMapWindowContainerGroup container);
 ZMapWindowContainerOverlay    zmapWindowContainerGetOverlay   (ZMapWindowContainerGroup container);
@@ -114,4 +112,4 @@ void zmapWindowContainerUtilsExecute(ZMapWindowContainerGroup   parent,
 				     gpointer                   container_enter_data);
 
 
-#endif /* ZMAP_WINDOW_CONTAINER_UTILS_H */
+#endif /* ! __ZMAP_WINDOW_CONTAINER_UTILS_H__ */
diff --git a/src/zmapWindow/items/zmapWindowContainerUtils_P.h b/src/zmapWindow/items/zmapWindowContainerUtils_P.h
index 5b0493707..93f655567 100755
--- a/src/zmapWindow/items/zmapWindowContainerUtils_P.h
+++ b/src/zmapWindow/items/zmapWindowContainerUtils_P.h
@@ -27,9 +27,9 @@
  *
  * Exported functions: See XXXXXXXXXXXXX.h
  * HISTORY:
- * Last edited: May 20 08:35 2009 (rds)
+ * Last edited: Jun  4 09:52 2009 (rds)
  * Created: Wed May 20 08:33:22 2009 (rds)
- * CVS info:   $Id: zmapWindowContainerUtils_P.h,v 1.1 2009-06-02 11:20:24 rds Exp $
+ * CVS info:   $Id: zmapWindowContainerUtils_P.h,v 1.2 2009-06-04 09:13:04 rds Exp $
  *-------------------------------------------------------------------
  */
 
@@ -37,6 +37,7 @@
 #define ZMAP_WINDOW_CONTAINER_UTILS_P_H
 
 
+
 /* enums, macros etc... */
 #define ZMAP_PARAM_STATIC    (G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB)
 #define ZMAP_PARAM_STATIC_RW (ZMAP_PARAM_STATIC   | G_PARAM_READWRITE)
@@ -47,6 +48,14 @@
 #define CONTAINER_TYPE_KEY "container_type"
 
 
+/* This is _very_ annoying and will be removed ASAP! */
+#ifndef ZMAP_WINDOW_P_H
+
+#ifndef ITEM_FEATURE_DATA
+#define ITEM_FEATURE_DATA  "item_feature_data"
+#endif /* !ITEM_FEATURE_DATA */
+
+#endif /* !ZMAP_WINDOW_P_H */
 
 enum
   {
@@ -61,4 +70,4 @@ enum
   };
 
 
-#endif
+#endif /* !ZMAP_WINDOW_CONTAINER_UTILS_P_H */
diff --git a/src/zmapWindow/items/zmapWindowContainers.h b/src/zmapWindow/items/zmapWindowContainers.h
new file mode 100755
index 000000000..76f0b8f17
--- /dev/null
+++ b/src/zmapWindow/items/zmapWindowContainers.h
@@ -0,0 +1,51 @@
+/*  File: zmapWindowContainers.h
+ *  Author: Roy Storey (rds@sanger.ac.uk)
+ *  Copyright (c) 2009: Genome Research Ltd.
+ *-------------------------------------------------------------------
+ * ZMap 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 (at your option) any later version.
+ * 
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * 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., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
+ * or see the on-line version at http://www.gnu.org/copyleft/gpl.txt
+ *-------------------------------------------------------------------
+ * This file is part of the ZMap genome database package
+ * originally written by:
+ *
+ * 	Ed Griffiths (Sanger Institute, UK) edgrif@sanger.ac.uk,
+ *      Roy Storey (Sanger Institute, UK) rds@sanger.ac.uk
+ *
+ * Description: 
+ *
+ * Exported functions: See XXXXXXXXXXXXX.h
+ * HISTORY:
+ * Last edited: Jun  4 09:38 2009 (rds)
+ * Created: Thu Jun  4 08:39:55 2009 (rds)
+ * CVS info:   $Id: zmapWindowContainers.h,v 1.1 2009-06-04 09:13:04 rds Exp $
+ *-------------------------------------------------------------------
+ */
+
+#ifndef __ZMAP_WINDOW_CONTAINERS_H__
+#define __ZMAP_WINDOW_CONTAINERS_H__
+
+#include <zmapWindowContainerGroup.h>
+
+#include <zmapWindowContainerChildren.h>
+
+#include <zmapWindowContainerContext.h>
+#include <zmapWindowContainerAlignment.h>
+#include <zmapWindowContainerBlock.h>
+#include <zmapWindowContainerStrand.h>
+#include <zmapWindowContainerFeatureSet.h>
+
+#include <zmapWindowContainerUtils.h>
+
+#endif /* ! __ZMAP_WINDOW_CONTAINERS_H__ */
-- 
GitLab