Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Z
zmap
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Iterations
Wiki
Requirements
Jira
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Container Registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
ensembl-gh-mirror
zmap
Commits
e72c0101
Commit
e72c0101
authored
16 years ago
by
rds
Browse files
Options
Downloads
Patches
Plain Diff
more functions to access set data
parent
3bb43cbb
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/zmapWindow/zmapWindowItemFeatureSet.c
+83
-4
83 additions, 4 deletions
src/zmapWindow/zmapWindowItemFeatureSet.c
src/zmapWindow/zmapWindowItemFeatureSet.h
+7
-2
7 additions, 2 deletions
src/zmapWindow/zmapWindowItemFeatureSet.h
with
90 additions
and
6 deletions
src/zmapWindow/zmapWindowItemFeatureSet.c
+
83
−
4
View file @
e72c0101
...
...
@@ -27,12 +27,12 @@
*
* Exported functions: See XXXXXXXXXXXXX.h
* HISTORY:
* Last edited: Feb 1
0
1
5:2
9 2009 (rds)
* Last edited: Feb 1
1
1
4:1
9 2009 (rds)
* Created: Mon Jul 30 13:09:33 2007 (rds)
* CVS info: $Id: zmapWindowItemFeatureSet.c,v 1.
5
2009-02-11 1
0:03:46
rds Exp $
* CVS info: $Id: zmapWindowItemFeatureSet.c,v 1.
6
2009-02-11 1
5:12:23
rds Exp $
*-------------------------------------------------------------------
*/
#include
<string.h>
/* memset */
#include
<ZMap/zmapStyle.h>
#include
<ZMap/zmapUtils.h>
#include
<zmapWindowItemFeatureSet_I.h>
...
...
@@ -141,12 +141,85 @@ ZMapWindowItemFeatureSetData zmapWindowItemFeatureSetCreate(ZMapWindow window,
set_data
->
style_id
=
zMapStyleGetID
(
style
);
set_data
->
unique_id
=
zMapStyleGetUniqueID
(
style
);
zmapWindow
StyleTableAddCopy
(
set_data
->
style_table
,
style
);
zmapWindow
ItemFeatureSetStyleFromStyle
(
set_data
,
style
);
}
return
set_data
;
}
/*!
* \brief Gets the style we must use to draw with, given a style
*/
ZMapFeatureTypeStyle
zmapWindowItemFeatureSetStyleFromStyle
(
ZMapWindowItemFeatureSetData
set_data
,
ZMapFeatureTypeStyle
style2copy
)
{
ZMapFeatureTypeStyle
duplicated
=
NULL
;
g_return_val_if_fail
(
ZMAP_IS_WINDOW_ITEM_FEATURE_SET
(
set_data
),
duplicated
);
g_return_val_if_fail
(
ZMAP_IS_FEATURE_STYLE
(
style2copy
),
duplicated
);
if
(
!
(
duplicated
=
zmapWindowStyleTableFind
(
set_data
->
style_table
,
zMapStyleGetUniqueID
(
style2copy
))))
{
int
s
=
sizeof
(
set_data
->
lazy_loaded
);
duplicated
=
zmapWindowStyleTableAddCopy
(
set_data
->
style_table
,
style2copy
);
memset
(
&
set_data
->
lazy_loaded
,
0
,
s
);
}
return
duplicated
;
}
ZMapFeatureTypeStyle
zmapWindowItemFeatureSetStyleFromID
(
ZMapWindowItemFeatureSetData
set_data
,
GQuark
style_unique_id
)
{
ZMapFeatureTypeStyle
duplicated
=
NULL
;
g_return_val_if_fail
(
ZMAP_IS_WINDOW_ITEM_FEATURE_SET
(
set_data
),
duplicated
);
if
(
!
(
duplicated
=
zmapWindowStyleTableFind
(
set_data
->
style_table
,
style_unique_id
)))
{
zMapAssertNotReached
();
}
return
duplicated
;
}
ZMapWindow
zmapWindowItemFeatureSetGetWindow
(
ZMapWindowItemFeatureSetData
set_data
)
{
ZMapWindow
window
=
NULL
;
g_return_val_if_fail
(
ZMAP_IS_WINDOW_ITEM_FEATURE_SET
(
set_data
),
window
);
window
=
set_data
->
window
;
return
window
;
}
ZMapStrand
zmapWindowItemFeatureSetGetStrand
(
ZMapWindowItemFeatureSetData
set_data
)
{
ZMapStrand
strand
=
ZMAPSTRAND_NONE
;
g_return_val_if_fail
(
ZMAP_IS_WINDOW_ITEM_FEATURE_SET
(
set_data
),
strand
);
strand
=
set_data
->
strand
;
return
strand
;
}
ZMapFrame
zmapWindowItemFeatureSetGetFrame
(
ZMapWindowItemFeatureSetData
set_data
)
{
ZMapFrame
frame
=
ZMAPFRAME_NONE
;
g_return_val_if_fail
(
ZMAP_IS_WINDOW_ITEM_FEATURE_SET
(
set_data
),
frame
);
frame
=
set_data
->
frame
;
return
frame
;
}
ZMapFeatureTypeStyle
zmapWindowItemFeatureSetGetStyle
(
ZMapWindowItemFeatureSetData
set_data
,
ZMapFeature
feature
)
{
...
...
@@ -286,6 +359,12 @@ gboolean zmapWindowItemFeatureSetIsFrameSpecific(ZMapWindowItemFeatureSetData se
if
(
frame_mode
!=
ZMAPSTYLE_3_FRAME_NEVER
)
set_data
->
settings
.
frame_specific
=
TRUE
;
if
(
frame_mode
==
ZMAPSTYLE_3_FRAME_INVALID
)
{
zMapLogWarning
(
"Frame mode for column %s is invalid."
,
g_quark_to_string
(
set_data
->
style_id
));
set_data
->
settings
.
frame_specific
=
FALSE
;
}
}
frame_specific
=
set_data
->
settings
.
frame_specific
;
...
...
This diff is collapsed.
Click to expand it.
src/zmapWindow/zmapWindowItemFeatureSet.h
+
7
−
2
View file @
e72c0101
...
...
@@ -27,9 +27,9 @@
*
* Exported functions: See XXXXXXXXXXXXX.h
* HISTORY:
* Last edited: Feb 1
0
1
5:12
2009 (rds)
* Last edited: Feb 1
1
1
1:38
2009 (rds)
* Created: Fri Feb 6 15:32:46 2009 (rds)
* CVS info: $Id: zmapWindowItemFeatureSet.h,v 1.
2
2009-02-11 1
0:03:48
rds Exp $
* CVS info: $Id: zmapWindowItemFeatureSet.h,v 1.
3
2009-02-11 1
5:12:30
rds Exp $
*-------------------------------------------------------------------
*/
...
...
@@ -67,6 +67,11 @@ ZMapWindowItemFeatureSetData zmapWindowItemFeatureSetCreate(ZMapWindow window,
ZMapStrand
strand
,
ZMapFrame
frame
);
ZMapFeatureTypeStyle
zmapWindowItemFeatureSetStyleFromStyle
(
ZMapWindowItemFeatureSetData
set_data
,
ZMapFeatureTypeStyle
style2copy
);
ZMapFeatureTypeStyle
zmapWindowItemFeatureSetStyleFromID
(
ZMapWindowItemFeatureSetData
set_data
,
GQuark
style_unique_id
);
ZMapWindow
zmapWindowItemFeatureSetGetWindow
(
ZMapWindowItemFeatureSetData
set_data
);
ZMapStrand
zmapWindowItemFeatureSetGetStrand
(
ZMapWindowItemFeatureSetData
set_data
);
ZMapFrame
zmapWindowItemFeatureSetGetFrame
(
ZMapWindowItemFeatureSetData
set_data
);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment