summaryrefslogtreecommitdiff
path: root/libs/gtkmm2ext/gtkmm2ext
diff options
context:
space:
mode:
authorRobin Gareus <robin@gareus.org>2017-03-20 04:21:08 +0100
committerRobin Gareus <robin@gareus.org>2017-03-20 04:35:05 +0100
commitb5e613d453921f87d59a911bd555e96e46abc5cc (patch)
tree366a800d3163757ac5d9d50da10afdd654f43022 /libs/gtkmm2ext/gtkmm2ext
parentb726255007bfdafb29c547bafd71bbe32d11f58e (diff)
Move NSGlView into libgtkmm2ext
This allows to re-use the concept with CairoWidget
Diffstat (limited to 'libs/gtkmm2ext/gtkmm2ext')
-rw-r--r--libs/gtkmm2ext/gtkmm2ext/cairo_canvas.h38
-rw-r--r--libs/gtkmm2ext/gtkmm2ext/nsglview.h15
2 files changed, 53 insertions, 0 deletions
diff --git a/libs/gtkmm2ext/gtkmm2ext/cairo_canvas.h b/libs/gtkmm2ext/gtkmm2ext/cairo_canvas.h
new file mode 100644
index 0000000000..7dd9d44b44
--- /dev/null
+++ b/libs/gtkmm2ext/gtkmm2ext/cairo_canvas.h
@@ -0,0 +1,38 @@
+/*
+ Copyright (C) 2009 Paul Davis
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+*/
+
+#ifndef __gtk2_ardour_cairo_canvas_h__
+#define __gtk2_ardour_cairo_canvas_h__
+
+#include <cairomm/context.h>
+#include "gtkmm2ext/visibility.h"
+
+namespace Gtkmm2ext {
+
+class LIBGTKMM2EXT_API CairoCanvas
+{
+public:
+ virtual ~CairoCanvas () {}
+
+ virtual void render (Cairo::RefPtr<Cairo::Context> const&, cairo_rectangle_t*) = 0;
+ virtual uint32_t background_color () = 0;
+};
+
+} /* namespace */
+#endif
diff --git a/libs/gtkmm2ext/gtkmm2ext/nsglview.h b/libs/gtkmm2ext/gtkmm2ext/nsglview.h
new file mode 100644
index 0000000000..8a175f3322
--- /dev/null
+++ b/libs/gtkmm2ext/gtkmm2ext/nsglview.h
@@ -0,0 +1,15 @@
+#ifndef __CANVAS_NSGLVIEW_H__
+#define __CANVAS_NSGLVIEW_H__
+
+#include <gdk/gdk.h>
+
+namespace Gtkmm2ext
+{
+ class CairoCanvas;
+
+ void* nsglview_create (CairoCanvas*);
+ void nsglview_overlay (void*, GdkWindow*);
+ void nsglview_resize (void*, int x, int y, int w, int h);
+ void nsglview_queue_draw (void*, int x, int y, int w, int h);
+}
+#endif