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
86e6a89e
Commit
86e6a89e
authored
19 years ago
by
rds
Browse files
Options
Downloads
Patches
Plain Diff
additional handlers and destroy the parser when finished.
parent
09ff140a
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/zmapControl/zmapControlRemote.c
+67
-7
67 additions, 7 deletions
src/zmapControl/zmapControlRemote.c
with
67 additions
and
7 deletions
src/zmapControl/zmapControlRemote.c
+
67
−
7
View file @
86e6a89e
...
...
@@ -30,9 +30,9 @@
*
* Exported functions: See zmapControl_P.h
* HISTORY:
* Last edited:
Feb 21 18:4
8 2006 (rds)
* Last edited:
Mar 1 19:2
8 2006 (rds)
* Created: Wed Nov 3 17:38:36 2004 (edgrif)
* CVS info: $Id: zmapControlRemote.c,v 1.2
1
2006-0
2-21 18:48:56
rds Exp $
* CVS info: $Id: zmapControlRemote.c,v 1.2
2
2006-0
3-02 09:10:24
rds Exp $
*-------------------------------------------------------------------
*/
...
...
@@ -86,6 +86,10 @@ typedef struct {
/* queries.... */
GList
*
featureQueries_first
;
GList
*
featureQueries_last
;
GList
*
styles
;
/* These should be ZMapFeatureTypeStyle */
GList
*
locations
;
/* This is just a list of ZMapSpan Structs */
}
xmlObjectsDataStruct
,
*
xmlObjectsData
;
typedef
struct
...
...
@@ -123,6 +127,12 @@ static gboolean featureEndHndlr(void *userData,
static
gboolean
clientStrtHndlr
(
gpointer
userdata
,
zmapXMLElement
client_element
,
zmapXMLParser
parser
);
static
gboolean
locationEndHndlr
(
gpointer
userdata
,
zmapXMLElement
zmap_element
,
zmapXMLParser
parser
);
static
gboolean
styleEndHndlr
(
gpointer
userdata
,
zmapXMLElement
zmap_element
,
zmapXMLParser
parser
);
static
gboolean
zmapEndHndlr
(
gpointer
userdata
,
zmapXMLElement
zmap_element
,
zmapXMLParser
parser
);
...
...
@@ -203,8 +213,10 @@ static zmapXMLParser setupControlRemoteXMLParser(void *data)
{
NULL
,
NULL
}
};
ZMapXMLObjTagFunctionsStruct
ends
[]
=
{
{
"zmap"
,
zmapEndHndlr
},
{
"subfeature"
,
featureEndHndlr
},
{
"zmap"
,
zmapEndHndlr
},
{
"subfeature"
,
featureEndHndlr
},
{
"location"
,
locationEndHndlr
},
{
"style"
,
styleEndHndlr
},
{
NULL
,
NULL
}
};
...
...
@@ -216,10 +228,12 @@ static zmapXMLParser setupControlRemoteXMLParser(void *data)
return
parser
;
}
static
void
alterFeature
(
gpointer
data
,
gpointer
userdata
)
{
}
static
void
deleteFeature
(
gpointer
data
,
gpointer
userdata
)
{
FooCanvasItem
*
ftitm
=
NULL
;
...
...
@@ -533,8 +547,10 @@ static char *controlexecuteCommand(char *command_text, ZMap zmap, int *statusCod
}
}
xml_reply
=
g_strdup
(
zmap
->
info
->
message
);
xml_reply
=
g_strdup
(
zmap
->
info
->
message
);
*
statusCode
=
zmap
->
info
->
code
;
/* use the code from the info (GError) */
zMapXMLParser_destroy
(
parser
);
return
xml_reply
;
}
...
...
@@ -595,8 +611,11 @@ static gboolean zmapStrtHndlr(gpointer userdata,
obj
->
action
=
ZMAP_CONTROL_ACTION_FIND_FEATURE
;
else
if
(
action
==
g_quark_from_string
(
"create_feature"
))
obj
->
action
=
ZMAP_CONTROL_ACTION_CREATE_FEATURE
;
else
if
(
action
==
g_quark_from_string
(
"alter_feature"
))
obj
->
action
=
ZMAP_CONTROL_ACTION_ALTER_FEATURE
;
/********************************************************
* delete and create will have to do
* else if(action == g_quark_from_string("alter_feature"))
* obj->action = ZMAP_CONTROL_ACTION_ALTER_FEATURE;
*******************************************************/
else
if
(
action
==
g_quark_from_string
(
"delete_feature"
))
obj
->
action
=
ZMAP_CONTROL_ACTION_DELETE_FEATURE
;
else
if
(
action
==
g_quark_from_string
(
"highlight_feature"
))
...
...
@@ -805,6 +824,47 @@ static gboolean clientStrtHndlr(gpointer userdata,
return
FALSE
;
}
static
gboolean
locationEndHndlr
(
gpointer
userdata
,
zmapXMLElement
zmap_element
,
zmapXMLParser
parser
)
{
/* we only allow one of these objects???? */
return
TRUE
;
}
static
gboolean
styleEndHndlr
(
gpointer
userdata
,
zmapXMLElement
element
,
zmapXMLParser
parser
)
{
ZMapFeatureTypeStyle
style
=
NULL
;
zmapXMLAttribute
attr
=
NULL
;
xmlObjectsData
data
=
(
xmlObjectsData
)
userdata
;
GQuark
id
=
0
,
everything_else
=
0
;
if
((
attr
=
zMapXMLElement_getAttributeByName
(
element
,
"id"
)))
id
=
zMapXMLAttribute_getValue
(
attr
);
if
(
id
&&
(
style
=
zMapFindStyle
(
zMapWindowFeatureAllStyles
(
data
->
window
),
id
))
!=
NULL
)
{
#ifdef PARSINGCOLOURS
if
((
attr
=
zMapXMLElement_getAttributeByName
(
element
,
"foreground"
)))
gdk_color_parse
(
g_quark_to_string
(
zMapXMLAttribute_getValue
(
attr
)),
&
(
style
->
foreground
));
if
((
attr
=
zMapXMLElement_getAttributeByName
(
element
,
"background"
)))
gdk_color_parse
(
g_quark_to_string
(
zMapXMLAttribute_getValue
(
attr
)),
&
(
style
->
background
));
if
((
attr
=
zMapXMLElement_getAttributeByName
(
element
,
"outline"
)))
gdk_color_parse
(
g_quark_to_string
(
zMapXMLAttribute_getValue
(
attr
)),
&
(
style
->
outline
));
#endif
if
((
attr
=
zMapXMLElement_getAttributeByName
(
element
,
"description"
)))
style
->
description
=
g_quark_to_string
(
zMapXMLAttribute_getValue
(
attr
)
);
}
return
TRUE
;
}
static
gboolean
zmapEndHndlr
(
void
*
userData
,
zmapXMLElement
element
,
zmapXMLParser
parser
)
...
...
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