summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorfcolin2007-02-01 13:03:30 +0000
committerfcolin2007-02-01 13:03:30 +0000
commit083e6c611c603c88654be3bc3d60b63212945d3c (patch)
tree4eda7e2db006708b814253a89f63a9c379edface
parentdce9bce91bdb923914835b55beb22ae995433eb3 (diff)
downloadivy-cplusplus-083e6c611c603c88654be3bc3d60b63212945d3c.zip
ivy-cplusplus-083e6c611c603c88654be3bc3d60b63212945d3c.tar.gz
ivy-cplusplus-083e6c611c603c88654be3bc3d60b63212945d3c.tar.bz2
ivy-cplusplus-083e6c611c603c88654be3bc3d60b63212945d3c.tar.xz
Utilisateur : Fcolin Date : 21/07/00 Heure : 10:48 Archivé dans $/Ivy Commentaire: separation file cb de la file de message windows (vss 3)
-rw-r--r--Ivy/IvySynchroWnd.h24
1 files changed, 16 insertions, 8 deletions
diff --git a/Ivy/IvySynchroWnd.h b/Ivy/IvySynchroWnd.h
index 5abd3ff..fba864e 100644
--- a/Ivy/IvySynchroWnd.h
+++ b/Ivy/IvySynchroWnd.h
@@ -12,6 +12,8 @@
#include "IvyApplication.h"
+class IvySynchronousCallback;
+
class IvySynchroWnd //: public CWnd
{
// Construction
@@ -21,12 +23,10 @@ public:
// Attributes
public:
+
// Operations
public:
- void PostMessageCB (IvyMessageCallback *target, IvyApplication *app, int argc, const char **argv );
- void PostApplicationConnectedCB( IvyApplicationCallback *target, IvyApplication *app);
- void PostApplicationDisconnectedCB( IvyApplicationCallback *target, IvyApplication *app);
-
+ void PostIvyCB( IvySynchronousCallback *cb );
// Overrides
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(IvySynchroWnd)
@@ -48,12 +48,13 @@ protected:
WPARAM wParam, // first message parameter
LPARAM lParam // second message parameter
);
+ // Buffer Emission
+ CRITICAL_SECTION m_CritSection;
+ std::list<IvySynchronousCallback*> callbacklist;
protected:
- LRESULT OnMessageCB(WPARAM wParam, LPARAM lParam);
- LRESULT OnApplicationConnectedCB(WPARAM wParam, LPARAM lParam);
- LRESULT OnApplicationDisconnectedCB(WPARAM wParam, LPARAM lParam);
+ LRESULT OnIvyCB(WPARAM wParam, LPARAM lParam);
friend class IvySynchronousMessageCallback;
friend class IvySynchronousApplicationCallback;
@@ -64,12 +65,16 @@ protected:
IvyApplication *app;
static IvySynchroWnd *m_synchro;
friend class Ivy;
+public:
+ virtual void CallCallback() = 0;
+
};
class IvySynchronousMessageCallback: public IvySynchronousCallback, public IvyMessageCallback
{
public:
IvySynchronousMessageCallback( IvyMessageCallback *cb );
virtual ~IvySynchronousMessageCallback();
+ virtual void CallCallback();
virtual void OnMessage (IvyApplication *app, int argc, const char **argv );
protected:
@@ -83,11 +88,14 @@ class IvySynchronousApplicationCallback: public IvySynchronousCallback, public
{
public:
IvySynchronousApplicationCallback( IvyApplicationCallback *cb );
+ virtual void CallCallback();
virtual void OnApplicationConnected (IvyApplication *app);
virtual void OnApplicationDisconnected (IvyApplication *app);
protected:
IvyApplicationCallback *target;
-
+ typedef enum { CONNECTED_CB, DISCONNECTED_CB } CallbackType;
+ CallbackType type;
+
friend class IvySynchroWnd;
};
/////////////////////////////////////////////////////////////////////////////