summaryrefslogtreecommitdiff
path: root/Ivycpp.h
diff options
context:
space:
mode:
authorfourdan2006-05-24 13:02:58 +0000
committerfourdan2006-05-24 13:02:58 +0000
commite5596cb2311ae3b8ac7d3b9f9f7dbd0e842fde80 (patch)
treeeb5eb30932b0f2dc58fbf8292e82ff88258591e5 /Ivycpp.h
parent23abb4b87c7e40ed259dd02f653516f60e55ade4 (diff)
downloadivy-cplusplus-e5596cb2311ae3b8ac7d3b9f9f7dbd0e842fde80.zip
ivy-cplusplus-e5596cb2311ae3b8ac7d3b9f9f7dbd0e842fde80.tar.gz
ivy-cplusplus-e5596cb2311ae3b8ac7d3b9f9f7dbd0e842fde80.tar.bz2
ivy-cplusplus-e5596cb2311ae3b8ac7d3b9f9f7dbd0e842fde80.tar.xz
Initial revision
Diffstat (limited to 'Ivycpp.h')
-rw-r--r--Ivycpp.h71
1 files changed, 71 insertions, 0 deletions
diff --git a/Ivycpp.h b/Ivycpp.h
new file mode 100644
index 0000000..f55c5c7
--- /dev/null
+++ b/Ivycpp.h
@@ -0,0 +1,71 @@
+// Ivy.h: interface for the Ivy class.
+//
+//////////////////////////////////////////////////////////////////////
+
+#if !defined(__IVY_H)
+#define __IVY_H
+
+#ifdef USE_GLFW
+#include <GL/glfw.h>
+#endif
+
+namespace IvyC
+{
+ #include <Ivy/ivyloop.h>
+ #include <Ivy/ivysocket.h>
+ #include <Ivy/ivy.h>
+}
+#include "IvyCallback.h"
+
+class IvyApplication;
+
+class Ivy
+{
+
+public:
+
+ Ivy();
+#ifdef USE_GLFW
+ Ivy( const char *name, const char* ready, IvyApplicationCallback *callback,
+ bool argaFrc, GLFWmutex _ivyCbmutex = NULL);
+#else
+ Ivy( const char *name, const char* ready, IvyApplicationCallback *callback,
+ bool argaFrc);
+#endif
+ virtual ~Ivy();
+
+ static long BindMsg (const char *regexp, IvyMessageCallback *cb );
+ static long BindMsg (IvyMessageCallback *cb, const char *regexp, ... );
+ static void UnbindMsg( int id );
+ static void Classes( int argc, const char **argv );
+
+ static int SendMsg(const char * message, ... );
+ static void SendDirectMsg( IvyApplication *app, int id,
+ const char *message);
+ static void BindDirectMsg( IvyDirectMessageCallback *callback );
+
+
+
+ static void start(const char *domain);
+ static void stop();
+#ifndef USE_GLFW
+static void ivyMainLoop ();
+#endif
+
+protected:
+
+ static void ApplicationCb( IvyC::IvyClientPtr app, void *user_data,
+ IvyC::IvyApplicationEvent event ) ;
+ static void DieCb( IvyC::IvyClientPtr app, void *user_data, int id ) ;
+ static void MsgCb( IvyC::IvyClientPtr app, void *user_data, int argc, char **argv ) ;
+ static void MsgDirectCb( IvyC::IvyClientPtr app, void *user_data, int id, char *msg ) ;
+#ifdef USE_GLFW
+ static void GLFWCALL ivyMainLoopInSeparateThread (void *arg);
+
+private:
+ static GLFWmutex ivyCbmutex;
+
+#endif
+};
+
+#endif // !defined(__IVY_H)