From 65f194959c55548a611f1dc5ef71020de7787b97 Mon Sep 17 00:00:00 2001
From: fcolin
Date: Wed, 6 Sep 2006 09:59:16 +0000
Subject: mise a jour doc version 3.9
---
doc/ivy-c.sgml | 39 +++++++++++++++++++++++++--------------
1 file changed, 25 insertions(+), 14 deletions(-)
(limited to 'doc/ivy-c.sgml')
diff --git a/doc/ivy-c.sgml b/doc/ivy-c.sgml
index 7365746..0021035 100644
--- a/doc/ivy-c.sgml
+++ b/doc/ivy-c.sgml
@@ -416,9 +416,9 @@ another library.
Channels
You can get a channel to be managed from the Ivy main loop by using functions
-IvyChannelSetUp and IvyChannelClose.
+IvyChannelAdd and IvyChannelRemove.
-Channel IvyChannelSetUp (HANDLE fd,
+Channel IvyChannelAdd (HANDLE fd,
void* data,
ChannelHandleDelete handle_delete,
ChannelHandleRead handle_read);
@@ -428,7 +428,7 @@ descriptor fd, and function handle_delete
-void IvyChannelClose (Channel ch);
+void IvyChannelRemove (Channel ch);
terminates the management of channel ch.
@@ -529,7 +529,7 @@ following ones:
IvyXtChannelAppContect(app_context) with an existing Xt
context
You can add channels to be handled by Ivy, for instance,
- stdin, with the IvyXtChannelSetUp function
+ stdin, with the IvyChannelAdd function
IvyInit(char *name,char *readyMessage,IvyApplicationCallback
cb,void *cbUserData,IvyDieCallback dieCb,void *dieCbUserdata)
IvyBindMsg() for the behavior
@@ -683,18 +683,21 @@ int main( int argc, char *argv[] ) {
Functions to be provided
You can decide to use the main loop from another toolkit than the X Toolkit
-or the Tk toolkit. If you do that, you'll have to define three functions that
-Ivy will use to get its own channels managed by the other toolkit. The three
-following global variables should be defined:
+or the Tk toolkit. If you do that, you'll have to define four functions that
+Ivy will use to get its own channels managed by the other toolkit.
+you should link ivy with your new module insted of the ivy(xxx)loop module.
+These functions are declared in ivychannel.h:
-ChannelInit channel_init;
-ChannelSetUp channel_setup;
-ChannelClose channel_close;
+IvyChannelInit
+IvyChannelStop
+IvyChannelAdd
+IvyChannelRemove
They should point to functions that respectively:
make the necessary global initializations before entering the main loop
+ make the necessary global finalizations before exiting the main loop
initialize a channel and ensure that it is managed by the main loop
close a channel
@@ -704,13 +707,21 @@ The types ChannelInit, ChannelSetUp and ChannelC
as follows:
-typedef void (*ChannelInit)(void);
-typedef Channel (*ChannelSetUp)(
+extern void IvyChannelInit(void);
+
+extern void IvyChannelStop (void);
+
+/* function called by Ivy to set callback on the sockets */
+extern Channel IvyChannelAdd(
HANDLE fd,
void *data,
ChannelHandleDelete handle_delete,
- ChannelHandleRead handle_read);
-typedef void (*ChannelClose)( Channel channel );
+ ChannelHandleRead handle_read
+);
+
+/* function called by Ivy to remove callback on the sockets */
+extern void IvyChannelRemove( Channel channel );
+
--
cgit v1.1