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
b89ed61d
Commit
b89ed61d
authored
20 years ago
by
edgrif
Browse files
Options
Downloads
Patches
Plain Diff
remove redundant code.
parent
e01665aa
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/zmapWindow/zmapWindow.c
+3
-182
3 additions, 182 deletions
src/zmapWindow/zmapWindow.c
src/zmapWindow/zmapWindow_P.h
+2
-11
2 additions, 11 deletions
src/zmapWindow/zmapWindow_P.h
with
5 additions
and
193 deletions
src/zmapWindow/zmapWindow.c
+
3
−
182
View file @
b89ed61d
...
...
@@ -27,9 +27,9 @@
*
* Exported functions: See ZMap/zmapWindow.h
* HISTORY:
* Last edited: Jan 24 1
0:35
2005 (edgrif)
* Last edited: Jan 24 1
3:53
2005 (edgrif)
* Created: Thu Jul 24 14:36:27 2003 (edgrif)
* CVS info: $Id: zmapWindow.c,v 1.5
8
2005-01-24 1
1:44:51
edgrif Exp $
* CVS info: $Id: zmapWindow.c,v 1.5
9
2005-01-24 1
3:57:45
edgrif Exp $
*-------------------------------------------------------------------
*/
...
...
@@ -76,7 +76,7 @@ static void changeRegion(ZMapWindow window, guint keyval) ;
/* These
callback routines are static because they
are set just once for the lifetime of the
/* These
structure is static because the callback routines
are set just once for the lifetime of the
* process. */
/* Callbacks we make back to the level above us. */
...
...
@@ -84,13 +84,6 @@ static ZMapWindowCallbacks window_cbs_G = NULL ;
#ifdef ED_G_NEVER_INCLUDE_THIS_CODE
/* Callbacks to us from the level below, ie zmapWindowDrawFeatures */
static
ZMapFeatureCallbacksStruct
feature_cbs_G
=
{
clickCB
,
rightClickCB
}
;
#endif
/* ED_G_NEVER_INCLUDE_THIS_CODE */
/* This routine must be called just once before any other windows routine, it is undefined
* if the caller calls this routine more than once. The caller must supply all of the callback
...
...
@@ -119,12 +112,6 @@ void zMapWindowInit(ZMapWindowCallbacks callbacks)
window_cbs_G
->
destroy
=
callbacks
->
destroy
;
#ifdef ED_G_NEVER_INCLUDE_THIS_CODE
zmapFeatureInit
(
&
feature_cbs_G
);
#endif
/* ED_G_NEVER_INCLUDE_THIS_CODE */
return
;
}
...
...
@@ -259,15 +246,6 @@ ZMapWindow zMapWindowCopy(GtkWidget *parent_widget, char *sequence,
foo_canvas_get_scroll_offsets
(
copy_window
->
canvas
,
&
x
,
&
y
)
;
foo_canvas_scroll_to
(
new
->
canvas
,
x
,
y
)
;
#ifdef ED_G_NEVER_INCLUDE_THIS_CODE
foo_canvas_get_scroll_offsets
(
new
->
canvas
,
&
x
,
&
y
)
;
printf
(
"here
\n
"
)
;
#endif
/* ED_G_NEVER_INCLUDE_THIS_CODE */
}
return
new
;
...
...
@@ -1248,160 +1226,3 @@ static gboolean canvasRootEventCB(GtkWidget *widget, GdkEventClient *event, gpoi
return
event_handled
;
}
#ifdef ED_G_NEVER_INCLUDE_THIS_CODE
STORE_HANDLE
zMapWindowGetHandle
(
ZMapWindow
window
)
{
return
window
->
handle
;
}
void
zMapWindowSetHandle
(
ZMapWindow
window
)
{
window
->
handle
=
NULL
;
return
;
}
#endif
/* ED_G_NEVER_INCLUDE_THIS_CODE */
#ifdef ED_G_NEVER_INCLUDE_THIS_CODE
void
zMapWindowSetBorderWidth
(
GtkWidget
*
container
,
int
width
)
{
gtk_container_border_width
(
GTK_CONTAINER
(
container
),
width
);
return
;
}
ScreenCoord
zMapWindowGetScaleOffset
(
ZMapWindow
window
)
{
return
0
;
}
void
zMapWindowSetScaleOffset
(
ZMapWindow
window
,
ScreenCoord
offset
)
{
return
;
}
Coord
zMapWindowGetCoord
(
ZMapWindow
window
,
char
*
field
)
{
/* if (field == "s")
return window->navStart;
else
return window->navEnd;
*/
return
0
;
}
#endif
/* ED_G_NEVER_INCLUDE_THIS_CODE */
#ifdef ED_G_NEVER_INCLUDE_THIS_CODE
void
zMapWindowSetCoord
(
ZMapWindow
window
,
char
*
field
,
int
size
)
{
if
(
field
==
"s"
)
window
->
navStart
=
window
->
focuspane
->
zMapRegion
->
area1
-
size
;
else
window
->
navEnd
=
window
->
focuspane
->
zMapRegion
->
area2
+
size
;
if
(
window
->
navStart
==
window
->
navEnd
)
window
->
navEnd
=
window
->
navStart
+
1
;
return
;
}
ScreenCoord
zMapWindowGetScreenCoord1
(
ZMapWindow
window
,
int
height
)
{
return
zMapWindowGetScreenCoord
(
window
,
window
->
focuspane
->
zMapRegion
->
area1
,
height
);
}
ScreenCoord
zMapWindowGetScreenCoord2
(
ZMapWindow
window
,
int
height
)
{
return
zMapWindowGetScreenCoord
(
window
,
window
->
focuspane
->
zMapRegion
->
area2
,
height
);
}
ScreenCoord
zMapWindowGetScreenCoord
(
ZMapWindow
window
,
Coord
coord
,
int
height
)
{
return
height
*
(
coord
-
window
->
navStart
)
/
(
window
->
navEnd
-
window
->
navStart
);
}
#endif
/* ED_G_NEVER_INCLUDE_THIS_CODE */
#ifdef ED_G_NEVER_INCLUDE_THIS_CODE
/* ZMapRegion functions */
GPtrArray
*
zMapRegionNewMethods
(
ZMapRegion
*
region
)
{
return
region
->
methods
=
g_ptr_array_new
();
}
GPtrArray
*
zMapRegionGetMethods
(
ZMapRegion
*
region
)
{
return
region
->
methods
;
}
GPtrArray
*
zMapRegionGetOldMethods
(
ZMapRegion
*
region
)
{
return
region
->
oldMethods
;
}
void
zMapRegionFreeMethods
(
ZMapRegion
*
region
)
{
g_ptr_array_free
(
region
->
methods
,
TRUE
);
return
;
}
void
zMapRegionFreeOldMethods
(
ZMapRegion
*
region
)
{
g_ptr_array_free
(
region
->
oldMethods
,
TRUE
);
return
;
}
GArray
*
zMapRegionNewSegs
(
ZMapRegion
*
region
)
{
return
region
->
segs
=
g_array_new
(
FALSE
,
FALSE
,
sizeof
(
ZMapFeatureStruct
))
;
}
GArray
*
zMapRegionGetSegs
(
ZMapRegion
*
region
)
{
return
region
->
segs
;
}
void
zMapRegionFreeSegs
(
ZMapRegion
*
region
)
{
free
(
region
->
segs
);
return
;
}
GArray
*
zMapRegionGetDNA
(
ZMapRegion
*
region
)
{
return
region
->
dna
;
}
void
zMapRegionFreeDNA
(
ZMapRegion
*
region
)
{
g_array_free
(
region
->
dna
,
TRUE
);
return
;
}
#endif
/* ED_G_NEVER_INCLUDE_THIS_CODE */
/****************** end of file ************************************/
This diff is collapsed.
Click to expand it.
src/zmapWindow/zmapWindow_P.h
+
2
−
11
View file @
b89ed61d
...
...
@@ -26,9 +26,9 @@
* Description: Defines internal interfaces/data structures of zMapWindow.
*
* HISTORY:
* Last edited: Jan 2
0
13:
2
6 2005 (edgrif)
* Last edited: Jan 2
4
13:
5
6 2005 (edgrif)
* Created: Fri Aug 1 16:45:58 2003 (edgrif)
* CVS info: $Id: zmapWindow_P.h,v 1.
39
2005-01-24 1
1:4
7:4
8
edgrif Exp $
* CVS info: $Id: zmapWindow_P.h,v 1.
40
2005-01-24 1
3:5
7:4
5
edgrif Exp $
*-------------------------------------------------------------------
*/
#ifndef ZMAP_WINDOW_P_H
...
...
@@ -36,18 +36,9 @@
#include
<gtk/gtk.h>
#include
<ZMap/zmapWindow.h>
/* Test scaffoling */
#include
<ZMap/zmapFeature.h>
#ifdef ED_G_NEVER_INCLUDE_THIS_CODE
#define PIXELS_PER_BASE 20.0
/* arbitrary text size to limit zooming in. Must be tied
** in to actual text size dynamically some time soon. */
#endif
/* ED_G_NEVER_INCLUDE_THIS_CODE */
/* This is the name of the window config stanza. */
#define ZMAP_WINDOW_CONFIG "ZMapWindow"
...
...
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