summaryrefslogtreecommitdiff
path: root/Ivy
diff options
context:
space:
mode:
authorfcolin2007-02-01 13:03:24 +0000
committerfcolin2007-02-01 13:03:24 +0000
commit62aca5b9f103f6b8a12e2c1925abb02caa946907 (patch)
treed91c0db8206e9cde3d24a12d37cbbd3601d98099 /Ivy
parent71558f893472566b7035f7d7de8df1a9f876374c (diff)
downloadivy-cplusplus-62aca5b9f103f6b8a12e2c1925abb02caa946907.zip
ivy-cplusplus-62aca5b9f103f6b8a12e2c1925abb02caa946907.tar.gz
ivy-cplusplus-62aca5b9f103f6b8a12e2c1925abb02caa946907.tar.bz2
ivy-cplusplus-62aca5b9f103f6b8a12e2c1925abb02caa946907.tar.xz
Utilisateur : Fcolin Date : 1/06/06 Heure : 10:14 Archivé dans $/Bus/Ivy Commentaire: ajout Binding Callback et SetFilter (vss 13)
Diffstat (limited to 'Ivy')
-rw-r--r--Ivy/IvySynchroWnd.cxx53
1 files changed, 53 insertions, 0 deletions
diff --git a/Ivy/IvySynchroWnd.cxx b/Ivy/IvySynchroWnd.cxx
index 9df473a..2109a61 100644
--- a/Ivy/IvySynchroWnd.cxx
+++ b/Ivy/IvySynchroWnd.cxx
@@ -187,4 +187,57 @@ void IvySynchronousApplicationCallback::CallCallback()
target->OnApplicationDisconnected( app );
break;
}
+}
+
+
+IvySynchronousBindingCallback::IvySynchronousBindingCallback( IvyBindingCallback *cb )
+{
+ target = cb;
+}
+void IvySynchronousBindingCallback::OnAddBind( IvyApplication *app, int id, const char *regexp)
+{
+ // duplicate on the Message Queue
+ IvySynchronousBindingCallback *param = new IvySynchronousBindingCallback(target);
+ param->type = ADD_CB;
+ param->app = app;
+ param->id = id;
+ param->regexp = _strdup(regexp);
+ m_synchro->PostIvyCB( param );
+}
+
+void IvySynchronousBindingCallback::OnRemoveBind( IvyApplication *app, int id, const char *regexp)
+{
+ // duplicate on the Message Queue
+ IvySynchronousBindingCallback *param = new IvySynchronousBindingCallback(target);
+ param->type = REMOVE_CB;
+ param->app = app;
+ param->id = id;
+ param->regexp = _strdup(regexp);
+ m_synchro->PostIvyCB( param );
+}
+void IvySynchronousBindingCallback::OnFilterBind( IvyApplication *app, int id, const char *regexp)
+{
+ // duplicate on the Message Queue
+ IvySynchronousBindingCallback *param = new IvySynchronousBindingCallback(target);
+ param->type = FILTER_CB;
+ param->app = app;
+ param->id = id;
+ param->regexp = _strdup(regexp);
+ m_synchro->PostIvyCB( param );
+}
+void IvySynchronousBindingCallback::CallCallback()
+{
+ switch ( type )
+ {
+ case ADD_CB:
+ target->OnAddBind( app, id, regexp );
+ break;
+ case REMOVE_CB:
+ target->OnRemoveBind( app, id, regexp );
+ break;
+ case FILTER_CB:
+ target->OnFilterBind( app, id, regexp );
+ break;
+ }
+ delete regexp;
} \ No newline at end of file