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
fbf70055
Commit
fbf70055
authored
17 years ago
by
rds
Browse files
Options
Downloads
Patches
Plain Diff
Moving stuff around
parent
de86f0ac
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/include/ZMap/zmapXRemote.h
+36
-46
36 additions, 46 deletions
src/include/ZMap/zmapXRemote.h
with
36 additions
and
46 deletions
src/include/ZMap/zmapXRemote.h
+
36
−
46
View file @
fbf70055
...
...
@@ -27,9 +27,9 @@
*
* Exported functions: See ZMap/zmapXRemote.h (this file)
* HISTORY:
* Last edited: Ju
n 8 15:18
2007 (rds)
* Last edited: Ju
l 12 09:22
2007 (rds)
* Created: Wed Apr 13 19:02:52 2005 (rds)
* CVS info: $Id: zmapXRemote.h,v 1.1
7
2007-0
6-08 14:19:18
rds Exp $
* CVS info: $Id: zmapXRemote.h,v 1.1
8
2007-0
7-16 17:26:57
rds Exp $
*-------------------------------------------------------------------
*/
...
...
@@ -48,7 +48,7 @@
#include
<X11/Xatom.h>
/* These are here just to allow checking */
#define ZMAP_XREMOTE_CURRENT_VERSION "$Revision: 1.1
7
$"
#define ZMAP_XREMOTE_CURRENT_VERSION "$Revision: 1.1
8
$"
#define ZMAP_XREMOTE_CURRENT_VERSION_ATOM "_ZMAP_XREMOTE_VERSION"
#define ZMAP_XREMOTE_APPLICATION_ATOM "_ZMAP_XREMOTE_APP"
#define ZMAPXREMOTE_PING_COMMAND "ping"
...
...
@@ -87,34 +87,23 @@
#define ZMAP_DEFAULT_RESPONSE_ATOM_NAME "_ZMAP_XREMOTE_RESPONSE"
#define ZMAPXREMOTE_CALLBACK(f) ((
z
MapXRemoteCallback) (f))
#define ZMAPXREMOTE_CALLBACK(f) ((
Z
MapXRemoteCallback) (f))
typedef
struct
_
z
MapXRemoteObjStruct
*
z
MapXRemoteObj
;
typedef
struct
_
Z
MapXRemoteObjStruct
*
Z
MapXRemoteObj
;
typedef
char
*
(
*
zMapXRemoteCallback
)
(
char
*
command
,
gpointer
user_data
,
int
*
statusCode
);
/* This data struct gets passed to the PropertyEvent Handler which
* processes the event and if it's a valid event (for us!) execute the
* callback with the data.
* e.g. g_signal_connect(G_OBJECT(widget), "property_notify_event",
* G_CALLBACK(zMapXRemotePropertyNotifyEvent), (gpointer)dataStruct) ;
*/
typedef
struct
_zMapXRemoteNotifyDataStruct
{
zMapXRemoteObj
xremote
;
/* The xremote object which has the atoms for us to check */
zMapXRemoteCallback
callback
;
/* The callback which does something when the property notify event happens */
GList
*
clients
;
zMapXRemoteCallback
client_callback
;
gpointer
data
;
/* The data which is passed to the callback above. */
}
zMapXRemoteNotifyDataStruct
,
*
zMapXRemoteNotifyData
;
typedef
char
*
(
*
ZMapXRemoteCallback
)
(
char
*
command
,
gpointer
user_data
,
int
*
statusCode
);
typedef
enum
{
ZMAPXREMOTE_SENDCOMMAND_SUCCEED
=
0
,
ZMAPXREMOTE_SENDCOMMAND_ISSERVER
,
ZMAPXREMOTE_SENDCOMMAND_INVALID_WINDOW
=
6
,
ZMAPXREMOTE_SENDCOMMAND_VERSION_MISMATCH
=
9
,
ZMAPXREMOTE_SENDCOMMAND_UNKNOWN
ZMAPXREMOTE_SENDCOMMAND_SUCCEED
=
0
,
ZMAPXREMOTE_SENDCOMMAND_ISSERVER
=
1
<<
0
,
ZMAPXREMOTE_SENDCOMMAND_INVALID_WINDOW
=
1
<<
1
,
ZMAPXREMOTE_SENDCOMMAND_VERSION_MISMATCH
=
1
<<
2
,
ZMAPXREMOTE_SENDCOMMAND_APP_MISMATCH
=
1
<<
3
,
ZMAPXREMOTE_SENDCOMMAND_PROPERTY_ERROR
=
1
<<
4
,
ZMAPXREMOTE_SENDCOMMAND_TIMEOUT
=
1
<<
5
,
ZMAPXREMOTE_SENDCOMMAND_UNAVAILABLE
=
1
<<
6
,
ZMAPXREMOTE_SENDCOMMAND_UNKNOWN
=
1
<<
15
}
ZMapXRemoteSendCommandError
;
typedef
enum
{
...
...
@@ -144,53 +133,54 @@ typedef enum {
ZMAPXREMOTE_UNAVAILABLE
=
503
,
/* Unavailable No Window with that id */
ZMAPXREMOTE_TIMEDOUT
=
504
,
/* Connection timed out. */
}
z
MapXRemoteStatus
;
}
Z
MapXRemoteStatus
;
extern
gboolean
externalPerl
;
/* ================================================ */
/* COMMON MODE METHODS */
/* ================================================ */
zMapXRemoteObj
zMapXRemoteNew
(
void
);
/* This just returns the object and checks XOpenDisplay(getenv(DISPLAY)) */
void
zMapXRemoteSetRequestAtomName
(
zMapXRemoteObj
object
,
char
*
name
);
/* Better set in zMapXRemoteInitServer if Server though */
void
zMapXRemoteSetResponseAtomName
(
zMapXRemoteObj
object
,
char
*
name
);
/* Ditto */
void
zMapXRemoteSetWindowID
(
zMapXRemoteObj
object
,
unsigned
long
window_id
);
/* Ditto */
ZMapXRemoteObj
zMapXRemoteNew
(
void
);
/* This just returns the object and checks XOpenDisplay(getenv(DISPLAY)) */
char
*
zMapXRemoteGetResponse
(
zMapXRemoteObj
object
);
Window
zMapXRemoteGetWindowID
(
zMapXRemoteObj
object
)
;
void
zMapXRemoteSetRequestAtomName
(
ZMapXRemoteObj
object
,
char
*
name
);
/* Better set in zMapXRemoteInitServer if Server though */
void
zMapXRemoteSetResponseAtomName
(
ZMapXRemoteObj
object
,
char
*
name
);
/* Ditto */
void
zMapXRemoteSetWindowID
(
ZMapXRemoteObj
object
,
unsigned
long
window_id
);
/* Ditto */
GdkAtom
zMapXRemoteG
dkRequestAtom
(
z
MapXRemoteObj
object
);
GdkAtom
zMapXRemoteG
dkResponseAtom
(
z
MapXRemoteObj
object
);
char
*
zMapXRemoteG
etResponse
(
Z
MapXRemoteObj
object
);
Window
zMapXRemoteG
etWindowID
(
Z
MapXRemoteObj
object
)
;
void
zMapXRemoteResponseSplit
(
z
MapXRemoteObj
object
,
char
*
full_response
,
int
*
code
,
char
**
response
);
gboolean
zMapXRemoteResponseIsError
(
z
MapXRemoteObj
object
,
char
*
response
);
void
zMapXRemoteResponseSplit
(
Z
MapXRemoteObj
object
,
char
*
full_response
,
int
*
code
,
char
**
response
);
gboolean
zMapXRemoteResponseIsError
(
Z
MapXRemoteObj
object
,
char
*
response
);
int
zMapXRemoteIsPingCommand
(
char
*
command
,
int
*
statusCode
,
char
**
reply
);
void
zMapXRemoteDestroy
(
z
MapXRemoteObj
object
);
void
zMapXRemoteDestroy
(
Z
MapXRemoteObj
object
);
/* ================================================ */
/* CLIENT MODE ONLY METHODS */
/* ================================================ */
int
zMapXRemoteInitClient
(
z
MapXRemoteObj
object
,
Window
id
);
/* Initialise Client */
int
zMapXRemoteSendRemoteCommand
(
z
MapXRemoteObj
object
,
char
*
command
,
char
**
response
);
int
zMapXRemoteInitClient
(
Z
MapXRemoteObj
object
,
Window
id
);
/* Initialise Client */
int
zMapXRemoteSendRemoteCommand
(
Z
MapXRemoteObj
object
,
char
*
command
,
char
**
response
);
/* ================================================ */
/* SERVER MODE ONLY METHODS */
/* ================================================ */
int
zMapXRemoteInitServer
(
zMapXRemoteObj
object
,
Window
id
,
char
*
appName
,
char
*
requestName
,
char
*
responseName
);
gint
zMapXRemotePropertyNotifyEvent
(
GtkWidget
*
widget
,
GdkEventProperty
*
ev
,
gpointer
notifyData
);
int
zMapXRemoteInitServer
(
ZMapXRemoteObj
object
,
Window
id
,
char
*
appName
,
char
*
requestName
,
char
*
responseName
);
gint
zMapXRemoteHandlePropertyNotify
(
ZMapXRemoteObj
xremote
,
Atom
event_atom
,
guint
event_state
,
ZMapXRemoteCallback
callback
,
gpointer
cb_data
);
/* ================================================ */
/* METHODS TO HELP PERL INTEGRATION */
/* the perl stuff can't do these very easily so here they are */
/* ================================================ */
int
zMapXRemoteSetReply
(
z
MapXRemoteObj
object
,
char
*
content
);
char
*
zMapXRemoteGetRequest
(
z
MapXRemoteObj
object
);
/* */
int
zMapXRemoteSetReply
(
Z
MapXRemoteObj
object
,
char
*
content
);
char
*
zMapXRemoteGetRequest
(
Z
MapXRemoteObj
object
);
/* */
/* Broken Methods */
#ifdef MULTIPLE_COMMANDS_DONT_WORK
int
zMapXRemoteSendRemoteCommands
(
z
MapXRemoteObj
object
);
int
zMapXRemoteSendRemoteCommands
(
Z
MapXRemoteObj
object
);
#endif
/* MULTIPLE_COMMANDS_DONT_WORK */
...
...
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