From 64aed222f3f2106b52b3a07c8dfc6fe63299c51d Mon Sep 17 00:00:00 2001
From: edgrif <edgrif>
Date: Fri, 11 Apr 2008 10:33:36 +0000
Subject: [PATCH] add code for set/get of pfetchable alignment option.

---
 src/include/ZMap/zmapStyle.h  |  6 ++++--
 src/zmapFeature/zmapStyle.c   | 25 +++++++++++++++++++++++--
 src/zmapFeature/zmapStyle_P.h | 10 ++++++++--
 3 files changed, 35 insertions(+), 6 deletions(-)

diff --git a/src/include/ZMap/zmapStyle.h b/src/include/ZMap/zmapStyle.h
index c2dc3cd88..ba49694a7 100755
--- a/src/include/ZMap/zmapStyle.h
+++ b/src/include/ZMap/zmapStyle.h
@@ -26,9 +26,9 @@
  * Description: Style and Style set handling functions.
  *
  * HISTORY:
- * Last edited: Mar 31 14:26 2008 (edgrif)
+ * Last edited: Apr 11 11:12 2008 (edgrif)
  * Created: Mon Feb 26 09:28:26 2007 (edgrif)
- * CVS info:   $Id: zmapStyle.h,v 1.19 2008-04-01 13:04:58 edgrif Exp $
+ * CVS info:   $Id: zmapStyle.h,v 1.20 2008-04-11 10:33:36 edgrif Exp $
  *-------------------------------------------------------------------
  */
 #ifndef ZMAP_STYLE_H
@@ -232,6 +232,8 @@ double zMapStyleGetMinMag(ZMapFeatureTypeStyle style) ;
 double zMapStyleGetMaxMag(ZMapFeatureTypeStyle style) ;
 
 
+void zMapStyleSetPfetch(ZMapFeatureTypeStyle style, gboolean pfetchable) ;
+gboolean zMapStyleGetPfetch(ZMapFeatureTypeStyle style) ;
 
 
 /* Lets change all these names to just be zmapStyle, i.e. lose the featuretype bit..... */
diff --git a/src/zmapFeature/zmapStyle.c b/src/zmapFeature/zmapStyle.c
index 8c93edf46..407bbc465 100755
--- a/src/zmapFeature/zmapStyle.c
+++ b/src/zmapFeature/zmapStyle.c
@@ -28,9 +28,9 @@
  *
  * Exported functions: See ZMap/zmapStyle.h
  * HISTORY:
- * Last edited: Mar 31 14:28 2008 (edgrif)
+ * Last edited: Apr 11 11:19 2008 (edgrif)
  * Created: Mon Feb 26 09:12:18 2007 (edgrif)
- * CVS info:   $Id: zmapStyle.c,v 1.10 2008-04-01 13:04:58 edgrif Exp $
+ * CVS info:   $Id: zmapStyle.c,v 1.11 2008-04-11 10:33:36 edgrif Exp $
  *-------------------------------------------------------------------
  */
 
@@ -444,6 +444,27 @@ char *zMapStyleGetDescription(ZMapFeatureTypeStyle style)
 
 
 
+void zMapStyleSetPfetch(ZMapFeatureTypeStyle style, gboolean pfetchable)
+{
+  ZMapAssert(style) ;
+
+  style->mode_data.alignment.state.pfetchable = pfetchable ;
+
+  return ;
+}
+
+
+gboolean zMapStyleGetPfetch(ZMapFeatureTypeStyle style) ;
+{
+  ZMapAssert(style) ;
+
+  return (style->mode_data.alignment.state.pfetchable) ;
+}
+
+
+
+
+
 /* I'm going to try these more generalised functions.... */
 
 gboolean zMapStyleSetColours(ZMapFeatureTypeStyle style, ZMapStyleColourTarget target, ZMapStyleColourType type,
diff --git a/src/zmapFeature/zmapStyle_P.h b/src/zmapFeature/zmapStyle_P.h
index 8a5d8c1ad..78c359a04 100755
--- a/src/zmapFeature/zmapStyle_P.h
+++ b/src/zmapFeature/zmapStyle_P.h
@@ -26,9 +26,9 @@
  * Description: Private header for style.
  *
  * HISTORY:
- * Last edited: Apr  1 14:03 2008 (edgrif)
+ * Last edited: Apr 11 11:08 2008 (edgrif)
  * Created: Mon Feb 26 09:13:30 2007 (edgrif)
- * CVS info:   $Id: zmapStyle_P.h,v 1.9 2008-04-01 13:04:58 edgrif Exp $
+ * CVS info:   $Id: zmapStyle_P.h,v 1.10 2008-04-11 10:33:36 edgrif Exp $
  *-------------------------------------------------------------------
  */
 #ifndef ZMAP_STYLE_P_H
@@ -175,6 +175,12 @@ typedef struct
   ZMapStyleFullColourStruct colinear ;
   ZMapStyleFullColourStruct noncolinear ;
 
+   /* State for alignments. */
+  struct
+  {
+    unsigned int pfetchable : 1 ;			    /* TRUE => alignments have pfetch entries. */
+  } state ;
+
 } ZMapStyleAlignmentStruct, *ZMapStyleAlignment ;
 
 
-- 
GitLab