From b5e613d453921f87d59a911bd555e96e46abc5cc Mon Sep 17 00:00:00 2001 From: Robin Gareus Date: Mon, 20 Mar 2017 04:21:08 +0100 Subject: Move NSGlView into libgtkmm2ext This allows to re-use the concept with CairoWidget --- libs/gtkmm2ext/gtkmm2ext/cairo_canvas.h | 38 +++++++++++++++++++++++++++++++++ libs/gtkmm2ext/gtkmm2ext/nsglview.h | 15 +++++++++++++ 2 files changed, 53 insertions(+) create mode 100644 libs/gtkmm2ext/gtkmm2ext/cairo_canvas.h create mode 100644 libs/gtkmm2ext/gtkmm2ext/nsglview.h (limited to 'libs/gtkmm2ext/gtkmm2ext') 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 +#include "gtkmm2ext/visibility.h" + +namespace Gtkmm2ext { + +class LIBGTKMM2EXT_API CairoCanvas +{ +public: + virtual ~CairoCanvas () {} + + virtual void render (Cairo::RefPtr 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 + +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 -- cgit v1.2.3