summaryrefslogtreecommitdiff
path: root/Ivy
diff options
context:
space:
mode:
authorfcolin2007-02-01 13:01:25 +0000
committerfcolin2007-02-01 13:01:25 +0000
commit9d592353f88d58e0449e8311818ff92185ec5fe0 (patch)
treeccdd3922dac84d617683fb7930bd1637236b69bd /Ivy
parent1172ab63f087da01ee116d155b1b9d3e87bf2ef3 (diff)
downloadivy-cplusplus-9d592353f88d58e0449e8311818ff92185ec5fe0.zip
ivy-cplusplus-9d592353f88d58e0449e8311818ff92185ec5fe0.tar.gz
ivy-cplusplus-9d592353f88d58e0449e8311818ff92185ec5fe0.tar.bz2
ivy-cplusplus-9d592353f88d58e0449e8311818ff92185ec5fe0.tar.xz
Utilisateur : Fcolin Date : 25/10/01 Heure : 18:39 Archivé dans $/Ivy (vss 8)
Diffstat (limited to 'Ivy')
-rw-r--r--Ivy/IvyCallback.h10
1 files changed, 6 insertions, 4 deletions
diff --git a/Ivy/IvyCallback.h b/Ivy/IvyCallback.h
index 68b286a..25368f0 100644
--- a/Ivy/IvyCallback.h
+++ b/Ivy/IvyCallback.h
@@ -19,22 +19,24 @@ public:
};
class IvyMessageCallbackFunction: public IvyMessageCallback {
public:
- typedef void ( *IvyMessageCallback_fun )( IvyApplication *app, int argc, const char **argv );
+ typedef void ( *IvyMessageCallback_fun )( IvyApplication *app, void *user_data, int argc, const char **argv );
IvyMessageCallback_fun MessageCb;
+ void *data;
public:
- IvyMessageCallbackFunction ( IvyMessageCallback_fun m_cb ) : MessageCb( m_cb )
+ IvyMessageCallbackFunction ( IvyMessageCallback_fun m_cb, void *udata = NULL ) : MessageCb( m_cb )
{
+ data = udata;
}
~IvyMessageCallbackFunction ()
{
}
void OnMessage (IvyApplication *app, int argc, const char **argv)
{
- (*MessageCb) (app, argc, argv);
+ (*MessageCb) (app, data, argc, argv);
}
/* raccourci d'ecriture */
-#define BUS_CALLBACK( m ) new IvyMessageCallbackFunction( m )
+#define BUS_CALLBACK( m , d ) new IvyMessageCallbackFunction( m, d )
};
/* template Class Callback for the normal bus Message */
template <class T> class IvyMessageCallbackOf : public IvyMessageCallback {