]> git.sesse.net Git - casparcg/blobdiff - common/diagnostics/graph.h
- Fixed diag to work with new SFML version.
[casparcg] / common / diagnostics / graph.h
index b23e2fff4ac2e7422f8f6352bbbf5aa363c73168..f925b78b690be9f3237e81cbce2feae9438ec37c 100644 (file)
@@ -25,6 +25,7 @@
 
 #include <string>
 #include <tuple>
+#include <functional>
 
 #include <boost/noncopyable.hpp>
 
@@ -49,7 +50,24 @@ private:
 };
 
 void register_graph(const spl::shared_ptr<graph>& graph);
-void show_graphs(bool value);
-void shutdown();
+
+namespace spi {
+
+class graph_sink : boost::noncopyable
+{
+public:
+       virtual ~graph_sink() { }
+       virtual void activate() = 0;
+       virtual void set_text(const std::wstring& value) = 0;
+       virtual void set_value(const std::string& name, double value) = 0;
+       virtual void set_color(const std::string& name, int color) = 0;
+       virtual void set_tag(const std::string& name) = 0;
+       virtual void auto_reset() = 0;
+};
+
+typedef std::function<spl::shared_ptr<graph_sink>()> sink_factory_t;
+void register_sink_factory(sink_factory_t factory);
+
+}
 
 }}
\ No newline at end of file