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
ea6e6443
Commit
ea6e6443
authored
15 years ago
by
rds
Browse files
Options
Downloads
Patches
Plain Diff
function to get style properties from a list of styles.
parent
363abd9e
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
+45
-2
45 additions, 2 deletions
src/zmapWindow/zmapWindowItemFeatureSet.c
src/zmapWindow/zmapWindowItemFeatureSet.h
+5
-2
5 additions, 2 deletions
src/zmapWindow/zmapWindowItemFeatureSet.h
with
50 additions
and
4 deletions
src/zmapWindow/zmapWindowItemFeatureSet.c
+
45
−
2
View file @
ea6e6443
...
...
@@ -27,9 +27,9 @@
*
* Exported functions: See XXXXXXXXXXXXX.h
* HISTORY:
* Last edited:
Apr 27 14:55
2009 (
edgrif
)
* Last edited:
May 7 16:01
2009 (
rds
)
* Created: Mon Jul 30 13:09:33 2007 (rds)
* CVS info: $Id: zmapWindowItemFeatureSet.c,v 1.1
6
2009-0
4-28 14:33:41 edgrif
Exp $
* CVS info: $Id: zmapWindowItemFeatureSet.c,v 1.1
7
2009-0
5-07 21:35:14 rds
Exp $
*-------------------------------------------------------------------
*/
#include
<string.h>
/* memset */
...
...
@@ -607,6 +607,49 @@ ZMapWindowItemFeatureSetData zmapWindowItemFeatureSetDestroy(ZMapWindowItemFeatu
return
item_feature_set
;
}
/* This function is written the wrong way round. It should be
* re-written, along with extract_value_from_style_table so that
* this function is part of utils and extract_value_from_style_table
* calls it. It wouldn't need to be here then! */
gboolean
zmapWindowStyleListGetSetting
(
GList
*
list_of_styles
,
char
*
setting_name
,
GValue
*
value_in_out
)
{
GList
*
list
;
gboolean
result
=
FALSE
;
if
(
value_in_out
&&
(
list
=
g_list_first
(
list_of_styles
)))
{
ItemFeatureValueDataStruct
value_data
=
{};
GObjectClass
*
object_class
;
GParamSpec
*
param_spec
;
object_class
=
g_type_class_peek
(
ZMAP_TYPE_WINDOW_ITEM_FEATURE_SET
);
if
((
param_spec
=
g_object_class_find_property
(
object_class
,
setting_name
)))
{
value_data
.
param_id
=
param_spec
->
param_id
;
value_data
.
spec_name
=
setting_name
;
value_data
.
gvalue
=
value_in_out
;
result
=
TRUE
;
do
{
ZMapFeatureTypeStyle
style
;
GQuark
unique_id
;
style
=
ZMAP_FEATURE_STYLE
(
list
->
data
);
unique_id
=
zMapStyleGetUniqueID
(
style
);
extract_value_from_style_table
(
GINT_TO_POINTER
(
unique_id
),
style
,
&
value_data
);
}
while
((
list
=
g_list_next
(
list
)));
}
}
return
result
;
}
/* Object code */
static
void
zmap_window_item_feature_set_class_init
(
ZMapWindowItemFeatureSetDataClass
set_data_class
)
...
...
This diff is collapsed.
Click to expand it.
src/zmapWindow/zmapWindowItemFeatureSet.h
+
5
−
2
View file @
ea6e6443
...
...
@@ -27,9 +27,9 @@
*
* Exported functions: See XXXXXXXXXXXXX.h
* HISTORY:
* Last edited:
Apr 27 11:45
2009 (
edgrif
)
* Last edited:
May 7 22:36
2009 (
rds
)
* Created: Fri Feb 6 15:32:46 2009 (rds)
* CVS info: $Id: zmapWindowItemFeatureSet.h,v 1.
9
2009-0
4-28 14:33:41 edgrif
Exp $
* CVS info: $Id: zmapWindowItemFeatureSet.h,v 1.
10
2009-0
5-07 21:36:12 rds
Exp $
*-------------------------------------------------------------------
*/
...
...
@@ -111,6 +111,9 @@ void zmapWindowItemFeatureSetFeatureRemove(ZMapWindowItemFeatureSetData item_fea
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__ */
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