Skip to content
Snippets Groups Projects
Commit 669a3086 authored by mh17's avatar mh17
Browse files

reviewed header usage

parent dfed4ec3
No related branches found
No related tags found
No related merge requests found
......@@ -6,12 +6,12 @@
* 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.
......@@ -23,13 +23,13 @@
* Ed Griffiths (Sanger Institute, UK) edgrif@sanger.ac.uk,
* Roy Storey (Sanger Institute, UK) rds@sanger.ac.uk
*
* Description:
* Description:
*
* Exported functions: See XXXXXXXXXXXXX.h
* HISTORY:
* Last edited: Nov 13 10:54 2008 (edgrif)
* Created: Thu Jun 12 12:09:39 2008 (rds)
* CVS info: $Id: zmapBase.h,v 1.3 2008-11-13 11:32:57 edgrif Exp $
* CVS info: $Id: zmapBase.h,v 1.4 2010-02-25 14:14:20 mh17 Exp $
*-------------------------------------------------------------------
*/
......@@ -46,9 +46,9 @@
*/
#define ZMAP_TYPE_BASE (zMapBaseGetType())
#define ZMAP_BASE(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), ZMAP_TYPE_BASE, zmapBase))
#define ZMAP_BASE_CONST(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), ZMAP_TYPE_BASE, zmapBase const))
#define ZMAP_BASE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass), ZMAP_TYPE_BASE, zmapBaseClass))
#define ZMAP_IS_BASE(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), ZMAP_TYPE_BASE))
#define ZMAP_BASE_CONST(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), ZMAP_TYPE_BASE, zmapBase const))
#define ZMAP_BASE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass), ZMAP_TYPE_BASE, zmapBaseClass))
#define ZMAP_IS_BASE(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), ZMAP_TYPE_BASE))
#define ZMAP_BASE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), ZMAP_TYPE_BASE, zmapBaseClass))
......@@ -56,6 +56,12 @@
#define ZMAPBASECOPY_PARAMDATA_KEY "ZMap_Base_Copy_Key"
#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)
#define ZMAP_PARAM_STATIC_RO (ZMAP_PARAM_STATIC | G_PARAM_READABLE)
#define ZMAP_PARAM_STATIC_WO (ZMAP_PARAM_STATIC | G_PARAM_WRITABLE)
/*
* Main object structure
*/
......
......@@ -6,12 +6,12 @@
* 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.
......@@ -23,13 +23,13 @@
* Ed Griffiths (Sanger Institute, UK) edgrif@sanger.ac.uk,
* Roy Storey (Sanger Institute, UK) rds@sanger.ac.uk
*
* Description:
* Description:
*
* Exported functions: See XXXXXXXXXXXXX.h
* HISTORY:
* Last edited: Oct 9 21:40 2008 (rds)
* Created: Thu May 22 10:45:05 2008 (rds)
* CVS info: $Id: zmapGUITreeView.h,v 1.2 2008-10-10 08:28:14 rds Exp $
* CVS info: $Id: zmapGUITreeView.h,v 1.3 2010-02-25 14:14:20 mh17 Exp $
*-------------------------------------------------------------------
*/
......@@ -124,7 +124,7 @@ void zMapGUITreeViewAddTuple(ZMapGUITreeView zmap_tv, gpointer user_data);
/*!
* \brief add a row to the model.
*/
void zMapGUITreeViewAddTupleFromColumnData(ZMapGUITreeView zmap_tv,
void zMapGUITreeViewAddTupleFromColumnData(ZMapGUITreeView zmap_tv,
GList *values_list);
/*!
* \brief add rows to the model
......@@ -145,4 +145,21 @@ void zMapGUITreeViewUpdateTuple(ZMapGUITreeView zmap_tv, GtkTreeIter *iter, gpoi
*/
ZMapGUITreeView zMapGUITreeViewDestroy(ZMapGUITreeView zmap_tv);
/*!
* \brief override this class function
*/
void zMapGUITreeViewSetAddTupleSimple(ZMapGUITreeViewClass zmap_tv, void (*func)(ZMapGUITreeView, gpointer));
/*!
* \brief override this class function
*/
void zMapGUITreeViewSetAddTupleValueList(ZMapGUITreeViewClass zmap_tv, void (*func)(ZMapGUITreeView, GList *));
/*!
* \brief override this class function
*/
void zMapGUITreeViewSetAddTuples(ZMapGUITreeViewClass zmap_tv, void (*func)(ZMapGUITreeView, GList *));
#endif /* __ZMAP_GUITREEVIEW_H__ */
......@@ -6,12 +6,12 @@
* 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.
......@@ -28,7 +28,7 @@
* HISTORY:
* Last edited: Jul 29 09:43 2009 (edgrif)
* Created: Mon Feb 26 09:13:30 2007 (edgrif)
* CVS info: $Id: zmapStyle_I.h,v 1.14 2010-01-11 16:50:20 mh17 Exp $
* CVS info: $Id: zmapStyle_I.h,v 1.15 2010-02-25 14:14:20 mh17 Exp $
*-------------------------------------------------------------------
*/
......@@ -42,9 +42,6 @@
#include <ZMap/zmapStyle.h>
#include <zmapBase_I.h>
#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)
#define ZMAP_PARAM_STATIC_RO (ZMAP_PARAM_STATIC | G_PARAM_READABLE)
/* We need to know whether a get/set is part of a copy or a straight get/set (in a copy
......@@ -123,7 +120,7 @@ typedef struct
{
char *dummy ;
} ZMapStyleBasicStruct, *ZMapBasicGraph ;
} ZMapStyleBasicStruct, *ZMapStyleBasic ;
/*! @struct ZMapSequenceGraph zmapStyle_P.h
* @brief Sequence feature
......@@ -133,7 +130,7 @@ typedef struct
{
char *dummy ;
} ZMapStyleSequenceStruct, *ZMapSequenceGraph ;
} ZMapStyleSequenceStruct, *ZMapStyleSequence ;
/*! @struct ZMapTextGraph zmapStyle_P.h
* @brief Text feature
......@@ -148,7 +145,7 @@ typedef struct
char *font;
} ZMapStyleTextStruct, *ZMapTextGraph ;
} ZMapStyleTextStruct, *ZMapStyleText ;
......@@ -163,7 +160,7 @@ typedef struct
unsigned int mode : 1 ;
unsigned int baseline : 1 ;
} fields_set ; /*!< Fields set. */
ZMapStyleGraphMode mode ; /*!< Graph style. */
double baseline ; /*!< zero level for graph. */
......@@ -185,7 +182,7 @@ typedef struct
ZMapStyleGlyphMode mode ; /*!< Glyph mode. eg splice or marker*/
ZMapStyleGlyphMode type ; /*!< Glyph type. eg diamond or circle */
} ZMapStyleGlyphStruct, *ZMapStyleGlyph ;
......@@ -209,7 +206,7 @@ typedef struct
/*! Allowable align errors, used to decide whether a match should be classified as "perfect".
* between_align_error is used to assess several alignments (e.g. for exon matches) if join_homols = TRUE
*
*
* Number is allowable number of missing bases between blocks/alignments, default is 0. */
unsigned int between_align_error ;
......@@ -220,11 +217,11 @@ typedef struct
ZMapStyleFullColourStruct perfect ;
ZMapStyleFullColourStruct colinear ;
ZMapStyleFullColourStruct noncolinear ;
/*! glyph type and colours for markimng incomplete ends */
ZMapStyleGlyphType incomplete_glyph_type;
ZMapStyleFullColourStruct incomplete_glyph_colour ;
/* State for alignments. */
struct
{
......@@ -350,7 +347,7 @@ typedef struct _zmapFeatureTypeStyleStruct
/*! Data fields for the style. */
GQuark parent_id ; /*!< Styles can inherit from other
styles, the parent style _must_ be
identified by its unique id. */
......@@ -429,7 +426,7 @@ typedef struct _zmapFeatureTypeStyleStruct
unsigned int loaded : 1; /* flag to say if we're loaded */
} opts ;
/*! Mode specific fields, see docs for individual structs. */
/*! Mode specific fields, see docs for individual structs. */
union
{
ZMapStyleBasicStruct basic ;
......
......@@ -6,12 +6,12 @@
* 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.
......@@ -23,13 +23,13 @@
* Ed Griffiths (Sanger Institute, UK) edgrif@sanger.ac.uk,
* Roy Storey (Sanger Institute, UK) rds@sanger.ac.uk
*
* Description:
* Description:
*
* Exported functions: See XXXXXXXXXXXXX.h
* HISTORY:
* Last edited: Jan 12 10:03 2009 (rds)
* Created: Thu Jun 12 12:02:56 2008 (rds)
* CVS info: $Id: zmapBase_I.h,v 1.3 2009-01-12 11:15:36 rds Exp $
* CVS info: $Id: zmapBase_I.h,v 1.4 2010-02-25 14:14:20 mh17 Exp $
*-------------------------------------------------------------------
*/
......@@ -38,10 +38,6 @@
#include <ZMap/zmapBase.h>
#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)
#define ZMAP_PARAM_STATIC_RO (ZMAP_PARAM_STATIC | G_PARAM_READABLE)
#define ZMAP_PARAM_STATIC_WO (ZMAP_PARAM_STATIC | G_PARAM_WRITABLE)
typedef void (* ZMapBaseValueCopyFunc)(const GValue *src_value, GValue *dest_value);
......@@ -60,7 +56,7 @@ typedef struct _zmapBaseClassStruct
/* similar to gobject_class->set_property, but required for copy construction */
GObjectSetPropertyFunc copy_set_property;
/* Our version of the GTypeValueTable->value_copy function.
/* Our version of the GTypeValueTable->value_copy function.
* Ordinarily we'd just use the value_table member of GTypeInfo,
* but threading scuppers that. */
void (*value_copy)(const GValue *src_value, GValue *dest_value);
......
......@@ -6,12 +6,12 @@
* 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.
......@@ -23,26 +23,23 @@
* Ed Griffiths (Sanger Institute, UK) edgrif@sanger.ac.uk,
* Roy Storey (Sanger Institute, UK) rds@sanger.ac.uk
*
* Description:
* Description:
*
* Exported functions: See XXXXXXXXXXXXX.h
* HISTORY:
* Last edited: Jun 3 11:45 2008 (rds)
* Created: Thu May 22 10:49:23 2008 (rds)
* CVS info: $Id: zmapGUITreeView_I.h,v 1.1 2008-06-03 15:54:55 rds Exp $
* CVS info: $Id: zmapGUITreeView_I.h,v 1.2 2010-02-25 14:14:20 mh17 Exp $
*-------------------------------------------------------------------
*/
#ifndef __ZMAP_GUITREEVIEW_I_H__
#define __ZMAP_GUITREEVIEW_I_H__
#include <ZMap/zmapBase.h>
#include <ZMap/zmapGUITreeView.h>
/* If we had a ZMap base class these could go in its _I.h */
#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)
#define ZMAP_PARAM_STATIC_RO (ZMAP_PARAM_STATIC | G_PARAM_READABLE)
#define DEFAULT_COLUMN_FLAGS (ZMAP_GUITREEVIEW_COLUMN_VISIBLE | ZMAP_GUITREEVIEW_COLUMN_CLICKABLE)
/*
......@@ -66,7 +63,7 @@ typedef union
* Main object structure
*/
typedef struct _zmapGUITreeViewStruct
typedef struct _zmapGUITreeViewStruct
{
GObject __parent__;
......
......@@ -6,12 +6,12 @@
* 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.
......@@ -23,28 +23,24 @@
* Ed Griffiths (Sanger Institute, UK) edgrif@sanger.ac.uk,
* Roy Storey (Sanger Institute, UK) rds@sanger.ac.uk
*
* Description:
* Description:
*
* Exported functions: See XXXXXXXXXXXXX.h
* HISTORY:
* Last edited: Feb 16 09:53 2010 (edgrif)
* Created: Wed Dec 3 08:38:10 2008 (rds)
* CVS info: $Id: zmapWindowCanvasItem_I.h,v 1.6 2010-02-16 10:22:11 edgrif Exp $
* CVS info: $Id: zmapWindowCanvasItem_I.h,v 1.7 2010-02-25 14:14:20 mh17 Exp $
*-------------------------------------------------------------------
*/
#ifndef ZMAP_WINDOW_CANVAS_ITEM_I_H
#define ZMAP_WINDOW_CANVAS_ITEM_I_H
#include <ZMap/zmapBase.h>
#include <zmapWindowCanvasItem.h>
#include <zmapWindow_P.h>
#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)
#define ZMAP_PARAM_STATIC_RO (ZMAP_PARAM_STATIC | G_PARAM_READABLE)
#define ZMAP_PARAM_STATIC_WO (ZMAP_PARAM_STATIC | G_PARAM_WRITABLE)
typedef enum
{
......
......@@ -6,12 +6,12 @@
* 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.
......@@ -23,26 +23,22 @@
* Ed Griffiths (Sanger Institute, UK) edgrif@sanger.ac.uk,
* Roy Storey (Sanger Institute, UK) rds@sanger.ac.uk
*
* Description:
* Description:
*
* Exported functions: See XXXXXXXXXXXXX.h
* HISTORY:
* Last edited: Jul 9 18:24 2009 (rds)
* Created: Wed Apr 29 14:45:15 2009 (rds)
* CVS info: $Id: zmapWindowCanvas_I.h,v 1.2 2009-07-27 03:13:28 rds Exp $
* CVS info: $Id: zmapWindowCanvas_I.h,v 1.3 2010-02-25 14:14:20 mh17 Exp $
*-------------------------------------------------------------------
*/
#ifndef ZMAP_WINDOW_CANVAS_I_H
#define ZMAP_WINDOW_CANVAS_I_H
#include <ZMap/zmapBase.h>
#include <zmapWindowCanvas.h>
#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)
#define ZMAP_PARAM_STATIC_RO (ZMAP_PARAM_STATIC | G_PARAM_READABLE)
#define ZMAP_PARAM_STATIC_WO (ZMAP_PARAM_STATIC | G_PARAM_WRITABLE)
typedef struct
{
......@@ -75,7 +71,7 @@ typedef struct _zmapWindowCanvasStruct
unsigned int canvas_busy : 1; /* flag for the expose_event, to avoid
* too many g_queue_get_length calls */
} zmapWindowCanvasStruct;
......
......@@ -6,12 +6,12 @@
* 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.
......@@ -23,13 +23,13 @@
* Ed Griffiths (Sanger Institute, UK) edgrif@sanger.ac.uk,
* Roy Storey (Sanger Institute, UK) rds@sanger.ac.uk
*
* Description:
* Description:
*
* Exported functions: See XXXXXXXXXXXXX.h
* HISTORY:
* Last edited: Feb 16 10:22 2010 (edgrif)
* Created: Wed Dec 3 10:02:22 2008 (rds)
* CVS info: $Id: zmapWindowCollectionFeature.c,v 1.15 2010-02-17 16:00:33 mh17 Exp $
* CVS info: $Id: zmapWindowCollectionFeature.c,v 1.16 2010-02-25 14:14:20 mh17 Exp $
*-------------------------------------------------------------------
*/
#include <math.h>
......@@ -61,7 +61,7 @@ typedef struct
static void zmap_window_collection_feature_class_init (ZMapWindowCollectionFeatureClass collection_class);
static void zmap_window_collection_feature_init (ZMapWindowCollectionFeature group);
static void zmap_window_collection_feature_set_property(GObject *object,
static void zmap_window_collection_feature_set_property(GObject *object,
guint param_id,
const GValue *value,
GParamSpec *pspec);
......@@ -101,7 +101,7 @@ static FooCanvasItemClass *item_parent_class_G = NULL;
GType zMapWindowCollectionFeatureGetType(void)
{
static GType group_type = 0;
if (!group_type) {
static const GTypeInfo group_info = {
sizeof (zmapWindowCollectionFeatureClass),
......@@ -113,16 +113,16 @@ GType zMapWindowCollectionFeatureGetType(void)
sizeof (zmapWindowCollectionFeature),
0, /* n_preallocs */
(GInstanceInitFunc) zmap_window_collection_feature_init
};
group_type = g_type_register_static (zMapWindowCanvasItemGetType(),
ZMAP_WINDOW_COLLECTION_FEATURE_NAME,
&group_info,
0);
}
return group_type;
}
......@@ -132,11 +132,11 @@ ZMapWindowCanvasItem zMapWindowCollectionFeatureCreate(FooCanvasGroup *parent)
FooCanvasItem *item;
//#define DEBUG_PINK_COLLECTION_FEATURE_BACKGROUND
item = foo_canvas_item_new(parent, zMapWindowCollectionFeatureGetType(),
"x", 0.0,
"y", 0.0,
item = foo_canvas_item_new(parent, zMapWindowCollectionFeatureGetType(),
"x", 0.0,
"y", 0.0,
NULL);
if(item && ZMAP_IS_CANVAS_ITEM(item))
{
#ifdef DEBUG_PINK_COLLECTION_FEATURE_BACKGROUND
......@@ -144,7 +144,7 @@ ZMapWindowCanvasItem zMapWindowCollectionFeatureCreate(FooCanvasGroup *parent)
#endif /* DEBUG_PINK_COLLECTION_FEATURE_BACKGROUND */
canvas_item = ZMAP_CANVAS_ITEM(item);
if(ZMAP_CANVAS_ITEM_GET_CLASS(canvas_item)->post_create)
(* ZMAP_CANVAS_ITEM_GET_CLASS(canvas_item)->post_create)(canvas_item);
......@@ -152,21 +152,21 @@ ZMapWindowCanvasItem zMapWindowCollectionFeatureCreate(FooCanvasGroup *parent)
if((background = canvas_item->items[WINDOW_ITEM_BACKGROUND]))
{
GdkColor fill = {0};
gdk_color_parse("pink", &fill);
foo_canvas_item_set(background, "fill_color_gdk", &fill, NULL);
}
#endif
zMapWindowCanvasItemCheckSize(canvas_item);
zMapWindowCanvasItemCheckSize(canvas_item);
}
return canvas_item;
}
void zMapWindowCollectionFeatureRemoveSubFeatures(ZMapWindowCanvasItem collection,
gboolean keep_in_place_x,
void zMapWindowCollectionFeatureRemoveSubFeatures(ZMapWindowCanvasItem collection,
gboolean keep_in_place_x,
gboolean keep_in_place_y)
{
ParentPositionStruct parent_data = {NULL};
......@@ -194,7 +194,7 @@ void zMapWindowCollectionFeatureRemoveSubFeatures(ZMapWindowCanvasItem collectio
return ;
}
void zMapWindowCollectionFeatureStaticReparent(ZMapWindowCanvasItem reparentee,
void zMapWindowCollectionFeatureStaticReparent(ZMapWindowCanvasItem reparentee,
ZMapWindowCanvasItem new_parent)
{
FooCanvasItem *item;
......@@ -210,7 +210,7 @@ void zMapWindowCollectionFeatureStaticReparent(ZMapWindowCanvasItem reparentee,
x = child_group->xpos - parent_group->xpos;
y = child_group->ypos - parent_group->ypos;
foo_canvas_item_set(item,
foo_canvas_item_set(item,
"x", x,
"y", y,
NULL);
......@@ -324,7 +324,7 @@ void zMapWindowCollectionFeatureAddIncompleteMarkers(ZMapWindowCanvasItem collec
markMatchIfIncomplete(collection, ref_strand, LAST_MATCH, last_item, last_feature) ;
}
return ;
}
......@@ -345,7 +345,7 @@ void zMapWindowCollectionFeatureAddSpliceMarkers(ZMapWindowCanvasItem collection
canonical = FALSE ;
/* splce_colour needs to come from the style! */
gdk_color_parse(splice_colour, &marker_colour) ;
if(group->item_list && group->item_list->next)
{
GList *list;
......@@ -362,9 +362,9 @@ void zMapWindowCollectionFeatureAddSpliceMarkers(ZMapWindowCanvasItem collection
{
char *prev, *curr;
gboolean prev_reversed, curr_reversed;
curr_feature = zMapWindowCanvasItemGetFeature(list->data);
prev_reversed = prev_feature->strand == ZMAPSTRAND_REVERSE;
curr_reversed = curr_feature->strand == ZMAPSTRAND_REVERSE;
......@@ -408,7 +408,7 @@ void zMapWindowCollectionFeatureAddSpliceMarkers(ZMapWindowCanvasItem collection
"height", width,
"glyph_style", 6,
"line_width", 1,
NULL);
NULL);
}
/* free */
......@@ -422,7 +422,7 @@ void zMapWindowCollectionFeatureAddSpliceMarkers(ZMapWindowCanvasItem collection
list = list->next;
}
}
......@@ -435,7 +435,7 @@ void zMapWindowCollectionFeatureAddSpliceMarkers(ZMapWindowCanvasItem collection
/*
/*
* Internal routines.
*/
......@@ -512,14 +512,14 @@ static void zmap_window_collection_feature_class_init (ZMapWindowCollectionFeat
ZMapWindowCanvasItemClass canvas_class;
FooCanvasItemClass *item_class;
GObjectClass *gobject_class;
gobject_class = (GObjectClass *) collection_class;
canvas_class = (ZMapWindowCanvasItemClass)collection_class;
item_class = (FooCanvasItemClass *)collection_class;
gobject_class->set_property = zmap_window_collection_feature_set_property;
gobject_class->get_property = zmap_window_collection_feature_get_property;
// g_object_class_override_property(gobject_class, COLLECTION_INTERVAL_TYPE,
// ZMAP_WINDOW_CANVAS_INTERVAL_TYPE);
......@@ -549,7 +549,7 @@ static void zmap_window_collection_feature_init (ZMapWindowCollectionFeat
return ;
}
static void zmap_window_collection_feature_set_property(GObject *object,
static void zmap_window_collection_feature_set_property(GObject *object,
guint param_id,
const GValue *value,
GParamSpec *pspec)
......@@ -582,16 +582,16 @@ static void zmap_window_collection_feature_get_property(GObject *o
return ;
}
static double window_collection_feature_invoke_point (FooCanvasItem *item,
double x, double y,
static double window_collection_feature_invoke_point (FooCanvasItem *item,
double x, double y,
int cx, int cy,
FooCanvasItem **actual_item)
{
/* Calculate x & y in item local coordinates */
if (FOO_CANVAS_ITEM_GET_CLASS (item)->point)
return FOO_CANVAS_ITEM_GET_CLASS (item)->point (item, x, y, cx, cy, actual_item);
return 1e18;
}
......@@ -607,15 +607,15 @@ static double zmap_window_collection_feature_item_point (FooCanvasItem *item, do
double dist, best;
group = FOO_CANVAS_GROUP (item);
x1 = cx - item->canvas->close_enough;
y1 = cy - item->canvas->close_enough;
x2 = cx + item->canvas->close_enough;
y2 = cy + item->canvas->close_enough;
best = 0.0;
*actual_item = NULL;
gx = x - group->xpos;
gy = y - group->ypos;
......@@ -628,7 +628,7 @@ static double zmap_window_collection_feature_item_point (FooCanvasItem *item, do
child = list->data;
if ((child->object.flags & FOO_CANVAS_ITEM_MAPPED)
&& FOO_CANVAS_ITEM_GET_CLASS (child)->point)
&& FOO_CANVAS_ITEM_GET_CLASS (child)->point)
{
dist = window_collection_feature_invoke_point (child, gx, gy, cx, cy, &point_item);
if(point_item && ((int)(dist * item->canvas->pixels_per_unit_x + 0.5) <= item->canvas->close_enough) &&
......@@ -637,10 +637,10 @@ static double zmap_window_collection_feature_item_point (FooCanvasItem *item, do
best = dist;
*actual_item = point_item;
}
}
}
list = list->next;
}
if(actual_item == NULL && item_parent_class_G->point)
best = (item_parent_class_G->point)(item, x, y, cx, cy, actual_item);
......@@ -708,14 +708,14 @@ static void group_remove(gpointer data, gpointer user_data)
"x", &x,
"y", &y,
NULL);
zMapWindowCanvasItemReparent(item2remove, parent_data->new_parent);
x += parent_data->x;
y += parent_data->y;
foo_canvas_item_set(item2remove,
"x", x,
"x", x,
"y", y,
NULL);
}
......@@ -747,7 +747,7 @@ static void add_colinear_lines(gpointer data, gpointer user_data)
if(colinear_data->compare_func)
{
colinearity = (colinear_data->compare_func)(prev_feature, curr_feature,
colinearity = (colinear_data->compare_func)(prev_feature, curr_feature,
colinear_data->compare_data);
if(colinearity != 0)
{
......@@ -789,7 +789,7 @@ static void add_colinear_lines(gpointer data, gpointer user_data)
"points", &line_points,
"fill_color_gdk", draw_colour,
NULL);
zmapWindowLongItemCheckPointFull(colinear_line, &line_points, 0.0, 0.0, 0.0, 0.0);
}
}
......@@ -802,7 +802,7 @@ static void add_colinear_lines(gpointer data, gpointer user_data)
/* Mark a first or last feature in a series of alignment features as incomplete.
* The first feature is incomplete if it's start > 1, the last is incomplete
* if it's end < homol_length.
*
*
* Code is complicated by markers/coord testing needing to be reversed for
* alignments to reverse strand. */
static void markMatchIfIncomplete(ZMapWindowCanvasItem collection,
......@@ -845,7 +845,7 @@ static void markMatchIfIncomplete(ZMapWindowCanvasItem collection,
marker_border = &outline ;
}
x_coord = get_glyph_mid_point(item, width,
x_coord = get_glyph_mid_point(item, width,
NULL, &y_coord_start, NULL, &y_coord_end) ;
if ((match_type == FIRST_MATCH && ref_strand == ZMAPSTRAND_FORWARD)
......@@ -859,7 +859,6 @@ static void markMatchIfIncomplete(ZMapWindowCanvasItem collection,
y_coord = floor(y_coord_end); /* line_thickness */
y_coord = feature->x2 - ((FooCanvasGroup *)collection)->ypos;
}
printf("set glyph: y = %f, x1,x2 = %d,%d ypos = %f\n",y_coord,feature->x1,feature->x2,((FooCanvasGroup *)collection)->ypos);
foo_canvas_item_new(FOO_CANVAS_GROUP(collection->items[WINDOW_ITEM_OVERLAY]),
zMapWindowGlyphItemGetType(),
......@@ -895,7 +894,7 @@ static gboolean fragments_splice(char *fragment_a, char *fragment_b)
spliceosome[2] = fragment_b[0];
spliceosome[3] = fragment_b[1];
spliceosome[4] = '\0';
if(g_ascii_strcasecmp(&spliceosome[0], "GTAG") == 0)
{
splice = TRUE;
......@@ -924,25 +923,25 @@ static void process_feature(ZMapFeature prev_feature)
gboolean reversed;
reversed = prev_feature->strand == ZMAPSTRAND_REVERSE;
if(prev_feature->feature.homol.align &&
prev_feature->feature.homol.align->len > 1)
{
ZMapAlignBlock prev_align, curr_align;
prev_align = &(g_array_index(prev_feature->feature.homol.align,
prev_align = &(g_array_index(prev_feature->feature.homol.align,
ZMapAlignBlockStruct, 0));;
for(i = 1; i < prev_feature->feature.homol.align->len; i++)
{
char *prev, *curr;
curr_align = &(g_array_index(prev_feature->feature.homol.align,
curr_align = &(g_array_index(prev_feature->feature.homol.align,
ZMapAlignBlockStruct, i));
if(prev_align->t2 + 4 < curr_align->t1)
{
prev = zMapFeatureGetDNA((ZMapFeatureAny)prev_feature,
prev_align->t2 + 1,
prev_align->t2 + 2,
prev = zMapFeatureGetDNA((ZMapFeatureAny)prev_feature,
prev_align->t2 + 1,
prev_align->t2 + 2,
reversed);
curr = zMapFeatureGetDNA((ZMapFeatureAny)prev_feature,
curr_align->t1 - 2,
......@@ -956,7 +955,7 @@ static void process_feature(ZMapFeature prev_feature)
if(curr)
g_free(curr);
}
prev_align = curr_align;
}
}
......
......@@ -6,12 +6,12 @@
* 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.
......@@ -23,26 +23,23 @@
* Ed Griffiths (Sanger Institute, UK) edgrif@sanger.ac.uk,
* Roy Storey (Sanger Institute, UK) rds@sanger.ac.uk
*
* Description:
* Description:
*
* Exported functions: See XXXXXXXXXXXXX.h
* HISTORY:
* Last edited: Feb 15 17:21 2010 (edgrif)
* Created: Wed May 20 08:33:22 2009 (rds)
* CVS info: $Id: zmapWindowContainerUtils_P.h,v 1.5 2010-02-16 10:32:29 edgrif Exp $
* CVS info: $Id: zmapWindowContainerUtils_P.h,v 1.6 2010-02-25 14:14:21 mh17 Exp $
*-------------------------------------------------------------------
*/
#ifndef ZMAP_WINDOW_CONTAINER_UTILS_P_H
#define ZMAP_WINDOW_CONTAINER_UTILS_P_H
#include <ZMap/zmapBase.h>
#include <zmapWindowContainerUtils.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)
#define ZMAP_PARAM_STATIC_RO (ZMAP_PARAM_STATIC | G_PARAM_READABLE)
#define ZMAP_PARAM_STATIC_WO (ZMAP_PARAM_STATIC | G_PARAM_WRITABLE)
#define CONTAINER_DATA "container_data"
#define CONTAINER_TYPE_KEY "container_type"
......
......@@ -6,12 +6,12 @@
* 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.
......@@ -29,7 +29,7 @@
* HISTORY:
* Last edited: Jun 16 15:19 2008 (rds)
* Created: Mon Oct 9 15:21:36 2006 (edgrif)
* CVS info: $Id: zmapWindowDNAList.c,v 1.10 2008-06-16 15:15:08 rds Exp $
* CVS info: $Id: zmapWindowDNAList.c,v 1.11 2010-02-25 14:14:20 mh17 Exp $
*-------------------------------------------------------------------
*/
......@@ -44,7 +44,7 @@
typedef struct _ZMapWindowListStruct
{
ZMapWindow window ;
char *title ;
char *title ;
GtkWidget *view ;
GtkWidget *toplevel ;
GtkWidget *tree_widget;
......@@ -63,9 +63,9 @@ static GtkWidget *makeMenuBar(DNAWindowListData wlist);
static void requestDestroyCB(gpointer data, guint cb_action, GtkWidget *widget);
static void helpMenuCB(gpointer data, guint cb_action, GtkWidget *widget);
static void destroyCB(GtkWidget *window, gpointer user_data);
static gboolean selectionFuncCB(GtkTreeSelection *selection,
static gboolean selectionFuncCB(GtkTreeSelection *selection,
GtkTreeModel *model,
GtkTreePath *path,
GtkTreePath *path,
gboolean path_currently_selected,
gpointer user_data);
static void freeDNAMatchCB(gpointer data, gpointer user_data_unused) ;
......@@ -91,11 +91,11 @@ static GtkItemFactoryEntry menu_items_G[] = {
* All the features the chosen column are displayed in ascending start-coordinate
* sequence. When the user selects one, the main display is scrolled to that feature
* and the selected item highlighted.
*
*
*/
void zmapWindowDNAListCreate(ZMapWindow zmap_window,
GList *dna_list,
char *title,
void zmapWindowDNAListCreate(ZMapWindow zmap_window,
GList *dna_list,
char *title,
ZMapFeatureBlock block)
{
DNAWindowListData window_list ;
......@@ -140,21 +140,21 @@ static GtkWidget *zmapWindowDNAListNewToplevel(char *title)
/* Set it up graphically nice */
gtk_window_set_title(gtk_window, title) ;
gtk_window_set_default_size(gtk_window, -1, 600);
gtk_window_set_default_size(gtk_window, -1, 600);
gtk_container_border_width(GTK_CONTAINER(window), 5) ;
return window;
}
static void drawListWindow(DNAWindowListData window_list,
static void drawListWindow(DNAWindowListData window_list,
GtkWidget *tree_view)
{
GtkWidget *window, *vbox, *sub_frame, *scrolled_window;
char *frame_label = NULL;
/* Create window top level */
window_list->toplevel = window =
window_list->toplevel = window =
zmapWindowDNAListNewToplevel(window_list->title);
/* Add ptrs so parent knows about us, and we know parent */
......@@ -230,17 +230,17 @@ GtkWidget *makeMenuBar(DNAWindowListData wlist)
/* Finds dna selected and scrolls to it. */
static gboolean selectionFuncCB(GtkTreeSelection *selection,
static gboolean selectionFuncCB(GtkTreeSelection *selection,
GtkTreeModel *model,
GtkTreePath *path,
GtkTreePath *path,
gboolean path_currently_selected,
gpointer user_data)
{
DNAWindowListData window_list = (DNAWindowListData)user_data;
gint rows_selected = 0;
GtkTreeIter iter;
if(((rows_selected = gtk_tree_selection_count_selected_rows(selection)) < 1)
if(((rows_selected = gtk_tree_selection_count_selected_rows(selection)) < 1)
&& gtk_tree_model_get_iter(model, &iter, path))
{
int start = 0, end = 0 ;
......@@ -260,7 +260,7 @@ static gboolean selectionFuncCB(GtkTreeSelection *selection,
seq_type_index = zMapGUITreeViewGetColumnIndexByName(zmap_tree_view, ZMAP_WINDOWDNALIST_SEQTYPE_COLUMN_NAME);
/* Get the column data */
gtk_tree_model_get(model, &iter,
gtk_tree_model_get(model, &iter,
start_index, &start,
end_index, &end,
seq_type_index, &seq_type,
......@@ -284,7 +284,7 @@ static gboolean selectionFuncCB(GtkTreeSelection *selection,
zMapAssert(block) ;
tree_view = gtk_tree_selection_get_tree_view(selection);
gtk_tree_view_scroll_to_cell(tree_view, path, NULL, FALSE, 0.0, 0.0);
/* conv to dna sequence coords for centering correctly. */
......@@ -329,7 +329,7 @@ static gboolean selectionFuncCB(GtkTreeSelection *selection,
}
}
}
return TRUE ;
}
......@@ -337,7 +337,7 @@ static gboolean selectionFuncCB(GtkTreeSelection *selection,
/* Destroy the list window
*
* Destroy the list window and its corresponding entry in the
* array of such windows held in the ZMapWindow structure.
* array of such windows held in the ZMapWindow structure.
*/
static void destroyCB(GtkWidget *widget, gpointer user_data)
{
......@@ -423,13 +423,13 @@ enum
static void zmap_windowdnalist_class_init(ZMapWindowDNAListClass zmap_tv_class);
static void zmap_windowdnalist_init (ZMapWindowDNAList zmap_tv);
static void zmap_windowdnalist_set_property(GObject *gobject,
guint param_id,
const GValue *value,
static void zmap_windowdnalist_set_property(GObject *gobject,
guint param_id,
const GValue *value,
GParamSpec *pspec);
static void zmap_windowdnalist_get_property(GObject *gobject,
guint param_id,
GValue *value,
static void zmap_windowdnalist_get_property(GObject *gobject,
guint param_id,
GValue *value,
GParamSpec *pspec);
static void zmap_windowdnalist_dispose (GObject *object);
static void zmap_windowdnalist_finalize(GObject *object);
......@@ -457,10 +457,10 @@ static ZMapGUITreeViewClass parent_class_G = NULL;
GType zMapWindowDNAListGetType (void)
{
static GType type = 0;
if (type == 0)
if (type == 0)
{
static const GTypeInfo info =
static const GTypeInfo info =
{
sizeof (zmapWindowDNAListClass),
(GBaseInitFunc) NULL,
......@@ -473,10 +473,10 @@ GType zMapWindowDNAListGetType (void)
(GInstanceInitFunc) zmap_windowdnalist_init,
NULL
};
type = g_type_register_static (zMapGUITreeViewGetType(), "ZMapWindowDNAList", &info, (GTypeFlags)0);
}
return type;
}
......@@ -533,11 +533,12 @@ static void zmap_windowdnalist_class_init(ZMapWindowDNAListClass zmap_tv_class)
/* No need to override this... */
/* parent_class->add_tuple_simple = dna_match_add_simple; */
/* Or parent_class->add_tuples. Parent versions are ok. */
/* add_tuple_value_list _not_ implemented! Doesn't make sense. */
parent_class->add_tuple_value_list = NULL;
/* add_tuple_value_list _not_ implemented! Doesn't make sense. MH17:It nas been sine writing this comment */
zMapGUITreeViewSetAddTupleValueList(parent_class,NULL);
// parent_class->add_tuple_value_list = NULL;
gobject_class->dispose = zmap_windowdnalist_dispose;
gobject_class->finalize = zmap_windowdnalist_finalize;
......@@ -552,9 +553,9 @@ static void zmap_windowdnalist_init (ZMapWindowDNAList dna_list)
return ;
}
static void zmap_windowdnalist_set_property(GObject *gobject,
guint param_id,
const GValue *value,
static void zmap_windowdnalist_set_property(GObject *gobject,
guint param_id,
const GValue *value,
GParamSpec *pspec)
{
switch(param_id)
......@@ -566,13 +567,13 @@ static void zmap_windowdnalist_set_property(GObject *gobject,
return ;
}
static void zmap_windowdnalist_get_property(GObject *gobject,
guint param_id,
GValue *value,
static void zmap_windowdnalist_get_property(GObject *gobject,
guint param_id,
GValue *value,
GParamSpec *pspec)
{
ZMapGUITreeView zmap_tree_view;
switch(param_id)
{
case SCREEN_START_COLUMN_INDEX:
......@@ -662,7 +663,7 @@ static void dna_get_titles_types_funcs(GList **titles_out,
GList **flags_out)
{
GList *titles, *types, *funcs, *flags;
unsigned int flags_set = (ZMAP_GUITREEVIEW_COLUMN_VISIBLE |
unsigned int flags_set = (ZMAP_GUITREEVIEW_COLUMN_VISIBLE |
ZMAP_GUITREEVIEW_COLUMN_CLICKABLE);
titles = types = funcs = flags = NULL;
......
......@@ -6,12 +6,12 @@
* 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.
......@@ -23,13 +23,13 @@
* Ed Griffiths (Sanger Institute, UK) edgrif@sanger.ac.uk,
* Roy Storey (Sanger Institute, UK) rds@sanger.ac.uk
*
* Description:
* Description:
*
* Exported functions: See XXXXXXXXXXXXX.h
* HISTORY:
* Last edited: Jun 4 14:19 2008 (rds)
* Created: Thu May 22 10:49:23 2008 (rds)
* CVS info: $Id: zmapWindowDNAList_I.h,v 1.1 2008-06-04 13:28:02 rds Exp $
* CVS info: $Id: zmapWindowDNAList_I.h,v 1.2 2010-02-25 14:14:20 mh17 Exp $
*-------------------------------------------------------------------
*/
......@@ -48,7 +48,7 @@
* Main object structure
*/
typedef struct _zmapWindowDNAListStruct
typedef struct _zmapWindowDNAListStruct
{
zmapGUITreeViewStruct __parent__;
......
This diff is collapsed.
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment