Skip to content
Snippets Groups Projects
Commit 165716d0 authored by rds's avatar rds
Browse files

remove old objects now containers used

parent 45992994
No related branches found
No related tags found
No related merge requests found
/* File: zmapWindowItemFeatureBlock.c
* Author: Roy Storey (rds@sanger.ac.uk)
* Copyright (c) 2007: 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: Apr 20 11:20 2009 (rds)
* Created: Mon Jul 30 13:09:33 2007 (rds)
* CVS info: $Id: zmapWindowItemFeatureBlock.c,v 1.3 2009-04-20 11:05:28 rds Exp $
*-------------------------------------------------------------------
*/
#include <ZMap/zmapSeqBitmap.h>
#include <zmapWindowItemFeatureBlock_I.h>
#include <zmapWindowItemFeatureSet.h>
#include <zmapWindow_P.h> /* ITEM_FEATURE_SET_DATA */
enum
{
ITEM_FEATURE_BLOCK_0, /* zero == invalid prop value */
};
static ZMapSeqBitmap get_bitmap_for_style(ZMapWindowItemFeatureBlockData block_data,
ZMapFeatureBlock block,
ZMapFeatureTypeStyle style);
static ZMapSeqBitmap get_bitmap_for_key(ZMapWindowItemFeatureBlockData block_data,
ZMapFeatureBlock block,
GQuark key);
static void zmap_window_item_feature_block_class_init (ZMapWindowItemFeatureBlockDataClass block_data_class);
static void zmap_window_item_feature_block_init (ZMapWindowItemFeatureBlockData block_data);
static void zmap_window_item_feature_block_set_property(GObject *gobject,
guint param_id,
const GValue *value,
GParamSpec *pspec);
static void zmap_window_item_feature_block_get_property(GObject *gobject,
guint param_id,
GValue *value,
GParamSpec *pspec);
static void zmap_window_item_feature_block_dispose (GObject *object);
static void zmap_window_item_feature_block_finalize (GObject *object);
static GObjectClass *parent_class_G = NULL;
GType zmapWindowItemFeatureBlockGetType(void)
{
static GType group_type = 0;
if (!group_type)
{
static const GTypeInfo group_info =
{
sizeof (zmapWindowItemFeatureBlockDataClass),
(GBaseInitFunc) NULL,
(GBaseFinalizeFunc) NULL,
(GClassInitFunc) zmap_window_item_feature_block_class_init,
NULL, /* class_finalize */
NULL, /* class_data */
sizeof (zmapWindowItemFeatureBlockData),
0, /* n_preallocs */
(GInstanceInitFunc) zmap_window_item_feature_block_init
};
group_type = g_type_register_static (G_TYPE_OBJECT,
"zmapWindowItemFeatureBlockData",
&group_info,
0);
}
return group_type;
}
ZMapWindowItemFeatureBlockData zmapWindowItemFeatureBlockCreate(ZMapWindow window)
{
ZMapWindowItemFeatureBlockData block_data;
if((block_data = g_object_new(zmapWindowItemFeatureBlockGetType(), NULL)))
{
block_data->window = window;
}
return block_data;
}
void zmapWindowItemFeatureBlockAddCompressedColumn(ZMapWindowItemFeatureBlockData block_data,
FooCanvasGroup *container)
{
block_data->compressed_cols = g_list_append(block_data->compressed_cols, container) ;
return ;
}
GList *zmapWindowItemFeatureBlockRemoveCompressedColumns(ZMapWindowItemFeatureBlockData block_data)
{
GList *list = NULL;
list = block_data->compressed_cols;
block_data->compressed_cols = NULL;
return list;
}
void zmapWindowItemFeatureBlockAddBumpedColumn(ZMapWindowItemFeatureBlockData block_data,
FooCanvasGroup *container)
{
block_data->bumped_cols = g_list_append(block_data->bumped_cols, container) ;
return ;
}
GList *zmapWindowItemFeatureBlockRemoveBumpedColumns(ZMapWindowItemFeatureBlockData block_data)
{
GList *list = NULL;
list = block_data->bumped_cols;
block_data->bumped_cols = NULL;
return list;
}
ZMapWindow zmapWindowItemFeatureBlockGetWindow(ZMapWindowItemFeatureBlockData block_data)
{
ZMapWindow window = NULL;
g_return_val_if_fail(ZMAP_IS_WINDOW_ITEM_FEATURE_BLOCK(block_data), window);
window = block_data->window;
return window;
}
void zmapWindowItemFeatureBlockMarkRegion(ZMapWindowItemFeatureBlockData block_data,
ZMapFeatureBlock block)
{
ZMapSeqBitmap bitmap;
if((bitmap = get_bitmap_for_key(block_data, block, block->unique_id)))
{
if(block->features_start == 0)
block->features_start = block->block_to_sequence.q1;
if(block->features_end == 0)
block->features_end = block->block_to_sequence.q2;
zmapSeqBitmapMarkRegion(bitmap, block->features_start, block->features_end);
}
return ;
}
void zmapWindowItemFeatureBlockMarkRegionForColumn(ZMapWindowItemFeatureBlockData block_data,
ZMapFeatureBlock block,
ZMapWindowItemFeatureSetData set_data)
{
ZMapSeqBitmap bitmap;
if((bitmap = get_bitmap_for_key(block_data, block, set_data->unique_id)))
{
if(block->features_start == 0)
block->features_start = block->block_to_sequence.q1;
if(block->features_end == 0)
block->features_end = block->block_to_sequence.q2;
zmapSeqBitmapMarkRegion(bitmap, block->features_start, block->features_end);
}
return ;
}
GList *zmapWindowItemFeatureBlockFilterMarkedColumns(ZMapWindowItemFeatureBlockData block_data,
GList *list, int world1, int world2)
{
GList *key_list;
key_list = list;
while(key_list)
{
ZMapSeqBitmap bitmap;
GQuark key;
GList *tmp_list;
tmp_list = key_list->next;
key = GPOINTER_TO_UINT(key_list->data);
/* we don't want to create anything... */
if((bitmap = get_bitmap_for_key(block_data, NULL, key)))
{
if(zmapSeqBitmapIsRegionFullyMarked(bitmap, world1, world2))
list = g_list_delete_link(list, key_list);
}
key_list = tmp_list;
}
return list;
}
gboolean zmapWindowItemFeatureBlockIsColumnLoaded(ZMapWindowItemFeatureBlockData block_data,
FooCanvasGroup *column_group, int world1, int world2)
{
ZMapWindowItemFeatureSetData set_data;
ZMapSeqBitmap bitmap;
gboolean fully_marked = FALSE;
if((set_data = g_object_get_data(G_OBJECT(column_group), ITEM_FEATURE_SET_DATA)))
{
if((bitmap = get_bitmap_for_key(block_data, NULL, set_data->unique_id)))
{
fully_marked = zmapSeqBitmapIsRegionFullyMarked(bitmap, world1, world2);
}
}
return fully_marked;
}
ZMapWindowItemFeatureBlockData zmapWindowItemFeatureBlockDestroy(ZMapWindowItemFeatureBlockData item_feature_block)
{
g_object_unref(G_OBJECT(item_feature_block));
item_feature_block = NULL;
return item_feature_block;
}
/* INTERNAL */
static ZMapSeqBitmap get_bitmap_for_style(ZMapWindowItemFeatureBlockData block_data,
ZMapFeatureBlock block,
ZMapFeatureTypeStyle style)
{
ZMapSeqBitmap bitmap;
GQuark key;
key = zMapStyleGetUniqueID(style);
bitmap = get_bitmap_for_key(block_data, block, key);
return bitmap;
}
static ZMapSeqBitmap get_bitmap_for_key(ZMapWindowItemFeatureBlockData block_data,
ZMapFeatureBlock block,
GQuark key)
{
ZMapSeqBitmap bitmap = NULL;
if(!(bitmap = g_hash_table_lookup(block_data->loaded_region_hash, GUINT_TO_POINTER(key))))
{
if(block)
{
int length;
length = block->block_to_sequence.q2 - block->block_to_sequence.q1 + 1;
bitmap = zmapSeqBitmapCreate(block->block_to_sequence.q1, length, 9000);
g_hash_table_insert(block_data->loaded_region_hash, GUINT_TO_POINTER(key), bitmap);
}
}
return bitmap;
}
/* Object code */
static void zmap_window_item_feature_block_class_init(ZMapWindowItemFeatureBlockDataClass block_data_class)
{
GObjectClass *gobject_class;
gobject_class = (GObjectClass *)block_data_class;
gobject_class->set_property = zmap_window_item_feature_block_set_property;
gobject_class->get_property = zmap_window_item_feature_block_get_property;
parent_class_G = g_type_class_peek_parent(block_data_class);
#ifdef RDS_DONT_INCLUDE
/* width */
g_object_class_install_property(gobject_class,
ITEM_FEATURE_BLOCK_WIDTH,
g_param_spec_double(ZMAPSTYLE_PROPERTY_WIDTH,
ZMAPSTYLE_PROPERTY_WIDTH,
"The minimum width the column should be displayed at.",
0.0, 32000.00, 16.0,
ZMAP_PARAM_STATIC_RO));
#endif
gobject_class->dispose = zmap_window_item_feature_block_dispose;
gobject_class->finalize = zmap_window_item_feature_block_finalize;
return ;
}
static void zmap_window_item_feature_block_init(ZMapWindowItemFeatureBlockData block_data)
{
block_data->loaded_region_hash = g_hash_table_new_full(NULL, NULL, NULL, (GDestroyNotify)zmapSeqBitmapDestroy);
block_data->compressed_cols = NULL;
return ;
}
static void zmap_window_item_feature_block_set_property(GObject *gobject,
guint param_id,
const GValue *value,
GParamSpec *pspec)
{
switch(param_id)
{
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, param_id, pspec);
break;
}
return ;
}
static void zmap_window_item_feature_block_get_property(GObject *gobject,
guint param_id,
GValue *value,
GParamSpec *pspec)
{
ZMapWindowItemFeatureBlockData block_data;
block_data = ZMAP_WINDOW_ITEM_FEATURE_BLOCK(gobject);
switch(param_id)
{
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID(gobject, param_id, pspec);
break;
}
return ;
}
static void zmap_window_item_feature_block_dispose(GObject *object)
{
ZMapWindowItemFeatureBlockData block_data;
GObjectClass *gobject_class = G_OBJECT_CLASS(parent_class_G);
block_data = ZMAP_WINDOW_ITEM_FEATURE_BLOCK(object);
block_data->window = NULL; /* not ours */
/* compressed and bumped columns are not ours. canvas owns them, just free the lists */
if(block_data->compressed_cols)
g_list_free(block_data->compressed_cols) ;
if(block_data->bumped_cols)
g_list_free(block_data->bumped_cols);
if(block_data->loaded_region_hash)
g_hash_table_destroy(block_data->loaded_region_hash);
if(gobject_class->dispose)
(*gobject_class->dispose)(object);
return ;
}
static void zmap_window_item_feature_block_finalize(GObject *object)
{
GObjectClass *gobject_class = G_OBJECT_CLASS(parent_class_G);
if(gobject_class->finalize)
(*gobject_class->finalize)(object);
return ;
}
/* File: zmapWindowItemFeatureBlock.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: Apr 16 15:11 2009 (rds)
* Created: Fri Feb 6 15:32:46 2009 (rds)
* CVS info: $Id: zmapWindowItemFeatureBlock.h,v 1.2 2009-04-16 14:37:24 rds Exp $
*-------------------------------------------------------------------
*/
#ifndef __ZMAP_WINDOW_ITEM_FEATURE_BLOCK_H__
#define __ZMAP_WINDOW_ITEM_FEATURE_BLOCK_H__
#include <glib.h>
#include <glib-object.h>
#include <ZMap/zmapWindow.h>
#define ZMAP_TYPE_WINDOW_ITEM_FEATURE_BLOCK (zmapWindowItemFeatureBlockGetType())
#define ZMAP_WINDOW_ITEM_FEATURE_BLOCK(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), ZMAP_TYPE_WINDOW_ITEM_FEATURE_BLOCK, zmapWindowItemFeatureBlockData))
#define ZMAP_WINDOW_ITEM_FEATURE_BLOCK_CONST(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), ZMAP_TYPE_WINDOW_ITEM_FEATURE_BLOCK, zmapWindowItemFeatureBlockData const))
#define ZMAP_WINDOW_ITEM_FEATURE_BLOCK_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass), ZMAP_TYPE_WINDOW_ITEM_FEATURE_BLOCK, zmapWindowItemFeatureBlockDataClass))
#define ZMAP_IS_WINDOW_ITEM_FEATURE_BLOCK(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), ZMAP_TYPE_WINDOW_ITEM_FEATURE_BLOCK))
#define ZMAP_WINDOW_ITEM_FEATURE_BLOCK_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), ZMAP_TYPE_WINDOW_ITEM_FEATURE_BLOCK, zmapWindowItemFeatureBlockDataClass))
/* Instance */
typedef struct _zmapWindowItemFeatureBlockDataStruct zmapWindowItemFeatureBlockData, *ZMapWindowItemFeatureBlockData;
/* Class */
typedef struct _zmapWindowItemFeatureBlockDataClassStruct zmapWindowItemFeatureBlockDataClass, *ZMapWindowItemFeatureBlockDataClass ;
/* Public funcs */
GType zmapWindowItemFeatureBlockGetType(void);
ZMapWindowItemFeatureBlockData zmapWindowItemFeatureBlockCreate(ZMapWindow window);
void zmapWindowItemFeatureBlockAddCompressedColumn(ZMapWindowItemFeatureBlockData block_data,
FooCanvasGroup *container);
GList *zmapWindowItemFeatureBlockRemoveCompressedColumns(ZMapWindowItemFeatureBlockData block_data);
void zmapWindowItemFeatureBlockAddBumpedColumn(ZMapWindowItemFeatureBlockData block_data,
FooCanvasGroup *container);
GList *zmapWindowItemFeatureBlockRemoveBumpedColumns(ZMapWindowItemFeatureBlockData block_data);
ZMapWindow zmapWindowItemFeatureBlockGetWindow(ZMapWindowItemFeatureBlockData block_data);
void zmapWindowItemFeatureBlockMarkRegion(ZMapWindowItemFeatureBlockData block_data,
ZMapFeatureBlock block);
void zmapWindowItemFeatureBlockMarkRegionForStyle(ZMapWindowItemFeatureBlockData block_data,
ZMapFeatureBlock block,
ZMapFeatureTypeStyle style);
GList *zmapWindowItemFeatureBlockFilterMarkedColumns(ZMapWindowItemFeatureBlockData block_data,
GList *list, int world1, int world2);
gboolean zmapWindowItemFeatureBlockIsColumnLoaded(ZMapWindowItemFeatureBlockData block_data,
FooCanvasGroup *column_group, int world1, int world2);
ZMapWindowItemFeatureBlockData zmapWindowItemFeatureBlockDestroy(ZMapWindowItemFeatureBlockData block_data);
#endif /* __ZMAP_WINDOW_ITEM_FEATURE_BLOCK_H__ */
/* File: zmapWindowItemFeatureBlock_I.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: Apr 16 14:59 2009 (rds)
* Created: Fri Feb 6 11:49:03 2009 (rds)
* CVS info: $Id: zmapWindowItemFeatureBlock_I.h,v 1.2 2009-04-16 14:37:29 rds Exp $
*-------------------------------------------------------------------
*/
#ifndef __ZMAP_WINDOW_ITEM_FEATURE_BLOCK_I_H__
#define __ZMAP_WINDOW_ITEM_FEATURE_BLOCK_I_H__
#include <zmapWindowItemFeatureBlock.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_BIN_MAX_VALUE(BITMAP) ((1 << BITMAP->bin_depth) - 1)
typedef struct _zmapWindowItemFeatureBlockDataStruct
{
GObject __parent__;
ZMapWindow window;
GList *compressed_cols, *bumped_cols ;
GHashTable *loaded_region_hash;
} zmapWindowItemFeatureBlockDataStruct;
typedef struct _zmapWindowItemFeatureBlockDataClassStruct
{
GObjectClass __parent__;
} zmapWindowItemFeatureBlockDataClassStruct;
#endif /* __ZMAP_WINDOW_ITEM_FEATURE_BLOCK_I_H__ */
This diff is collapsed.
/* File: zmapWindowItemFeatureSet.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: May 7 22:36 2009 (rds)
* Created: Fri Feb 6 15:32:46 2009 (rds)
* CVS info: $Id: zmapWindowItemFeatureSet.h,v 1.10 2009-05-07 21:36:12 rds Exp $
*-------------------------------------------------------------------
*/
#ifndef __ZMAP_WINDOW_ITEM_FEATURE_SET_H__
#define __ZMAP_WINDOW_ITEM_FEATURE_SET_H__
#include <glib.h>
#include <glib-object.h>
#define ZMAP_TYPE_WINDOW_ITEM_FEATURE_SET (zmapWindowItemFeatureSetGetType())
#define ZMAP_WINDOW_ITEM_FEATURE_SET(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), ZMAP_TYPE_WINDOW_ITEM_FEATURE_SET, zmapWindowItemFeatureSetData))
#define ZMAP_WINDOW_ITEM_FEATURE_SET_CONST(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), ZMAP_TYPE_WINDOW_ITEM_FEATURE_SET, zmapWindowItemFeatureSetData const))
#define ZMAP_WINDOW_ITEM_FEATURE_SET_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass), ZMAP_TYPE_WINDOW_ITEM_FEATURE_SET, zmapWindowItemFeatureSetDataClass))
#define ZMAP_IS_WINDOW_ITEM_FEATURE_SET(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), ZMAP_TYPE_WINDOW_ITEM_FEATURE_SET) || zmap_g_return_moan(__FILE__, __LINE__) )
#define ZMAP_WINDOW_ITEM_FEATURE_SET_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), ZMAP_TYPE_WINDOW_ITEM_FEATURE_SET, zmapWindowItemFeatureSetDataClass))
/* Instance */
typedef struct _zmapWindowItemFeatureSetDataStruct zmapWindowItemFeatureSetData, *ZMapWindowItemFeatureSetData;
/* Class */
typedef struct _zmapWindowItemFeatureSetDataClassStruct zmapWindowItemFeatureSetDataClass, *ZMapWindowItemFeatureSetDataClass ;
gboolean zmap_g_return_moan(char *file, int line);
/* Public funcs */
GType zmapWindowItemFeatureSetGetType(void);
ZMapWindowItemFeatureSetData zmapWindowItemFeatureSetCreate(ZMapWindow window,
FooCanvasGroup *column_container,
GQuark feature_set_unique_id,
GQuark feature_set_original_id,
GList *style_list,
ZMapStrand strand,
ZMapFrame frame);
void zmapWindowItemFeatureSetAttachFeatureSet(ZMapWindowItemFeatureSetData set_data,
ZMapFeatureSet feature_set_to_attach);
ZMapFeatureSet zmapWindowItemFeatureSetRecoverFeatureSet(ZMapWindowItemFeatureSetData set_data);
//ZMapWindowStats zmapWindowItemFeatureSetRecoverStats(ZMapWindowItemFeatureSetData set_data);
ZMapFeatureTypeStyle zmapWindowItemFeatureSetStyleFromStyle(ZMapWindowItemFeatureSetData set_data,
ZMapFeatureTypeStyle style2copy);
ZMapFeatureTypeStyle zmapWindowItemFeatureSetStyleFromID(ZMapWindowItemFeatureSetData set_data,
GQuark style_unique_id);
GQuark zmapWindowItemFeatureSetColumnDisplayName(ZMapWindowItemFeatureSetData set_data);
ZMapWindow zmapWindowItemFeatureSetGetWindow(ZMapWindowItemFeatureSetData set_data);
ZMapStrand zmapWindowItemFeatureSetGetStrand(ZMapWindowItemFeatureSetData set_data);
ZMapFrame zmapWindowItemFeatureSetGetFrame (ZMapWindowItemFeatureSetData set_data);
ZMapFeatureTypeStyle zmapWindowItemFeatureSetGetStyle(ZMapWindowItemFeatureSetData set_data,
ZMapFeature feature);
double zmapWindowItemFeatureSetGetWidth(ZMapWindowItemFeatureSetData set_data);
double zmapWindowItemFeatureGetBumpSpacing(ZMapWindowItemFeatureSetData set_data);
gboolean zmapWindowItemFeatureSetGetMagValues(ZMapWindowItemFeatureSetData set_data,
double *min_mag_out, double *max_mag_out);
ZMapStyleColumnDisplayState zmapWindowItemFeatureSetGetDisplay(ZMapWindowItemFeatureSetData set_data);
void zmapWindowItemFeatureSetDisplay(ZMapWindowItemFeatureSetData set_data, ZMapStyleColumnDisplayState state);
gboolean zmapWindowItemFeatureSetShowWhenEmpty(ZMapWindowItemFeatureSetData set_data);
ZMapStyle3FrameMode zmapWindowItemFeatureSetGetFrameMode(ZMapWindowItemFeatureSetData set_data);
gboolean zmapWindowItemFeatureSetIsFrameSpecific(ZMapWindowItemFeatureSetData set_data,
ZMapStyle3FrameMode *frame_mode_out);
gboolean zmapWindowItemFeatureSetIsStrandSpecific(ZMapWindowItemFeatureSetData set_data);
ZMapStyleBumpMode zmapWindowItemFeatureSetGetBumpMode(ZMapWindowItemFeatureSetData set_data);
ZMapStyleBumpMode zmapWindowItemFeatureSetGetDefaultBumpMode(ZMapWindowItemFeatureSetData set_data);
ZMapStyleBumpMode zmapWindowItemFeatureSetResetBumpModes(ZMapWindowItemFeatureSetData set_data);
gboolean zmapWindowItemFeatureSetJoinAligns(ZMapWindowItemFeatureSetData set_data, unsigned int *threshold);
gboolean zmapWindowItemFeatureSetGetDeferred(ZMapWindowItemFeatureSetData set_data);
void zmapWindowItemFeatureSetFeatureRemove(ZMapWindowItemFeatureSetData item_feature_set,
ZMapFeature feature);
ZMapWindowItemFeatureSetData zmapWindowItemFeatureSetDestroy(ZMapWindowItemFeatureSetData item_feature_set);
gboolean zmapWindowStyleListGetSetting(GList *list_of_styles,
char *setting_name,
GValue *value_in_out);
#endif /* __ZMAP_WINDOW_ITEM_FEATURE_SET_H__ */
/* File: zmapWindowItemFeatureSet_I.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: Apr 27 11:46 2009 (edgrif)
* Created: Fri Feb 6 11:49:03 2009 (rds)
* CVS info: $Id: zmapWindowItemFeatureSet_I.h,v 1.7 2009-04-28 14:33:41 edgrif Exp $
*-------------------------------------------------------------------
*/
#ifndef __ZMAP_WINDOW_ITEM_FEATURE_SET_I_H__
#define __ZMAP_WINDOW_ITEM_FEATURE_SET_I_H__
#include <ZMap/zmapStyle.h>
#include <zmapWindow_P.h>
#include <zmapWindowItemFeatureSet.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)
typedef struct _zmapWindowItemFeatureSetDataStruct
{
GObject __parent__;
ZMapWindow window;
ZMapStrand strand ;
ZMapFrame frame ;
GHashTable *style_table ;
FooCanvasGroup *column_container;
//GQuark style_id;
GQuark unique_id;
/* We keep the features sorted by position and size so we can cursor through them... */
gboolean sorted ;
/* Features hidden by user, should stay hidden. */
GQueue *user_hidden_stack ;
/* These fields are used for some of the more exotic column bumping. */
gboolean hidden_bump_features ; /* Features were hidden because they
* are out of the marked range. */
GList *extra_items ; /* Match backgrounds etc. */
GList *gaps_added_items ; /* List of features where gap data was added. */
struct
{
unsigned int frame_mode : 1;
unsigned int frame_specific : 1;
unsigned int display_state : 1;
unsigned int show_when_empty : 1;
}lazy_loaded;
struct
{
gboolean has_feature_set;
gboolean has_stats;
gboolean show_when_empty;
gboolean frame_specific;
gboolean strand_specific;
ZMapStyle3FrameMode frame_mode;
ZMapStyleColumnDisplayState display_state;
ZMapStyleBumpMode bump_mode;
ZMapStyleBumpMode default_bump_mode;
}settings;
} zmapWindowItemFeatureSetDataStruct;
typedef struct _zmapWindowItemFeatureSetDataClassStruct
{
GObjectClass __parent__;
} zmapWindowItemFeatureSetDataClassStruct;
#endif /* __ZMAP_WINDOW_ITEM_FEATURE_SET_I_H__ */
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