cairoSurfaceImage.h
1 /*
2  @copyright Russell Standish 2017
3  @author Russell Standish
4  This file is part of EcoLab
5 
6  Open source licensed under the MIT license. See LICENSE for details.
7 */
8 
9 #ifndef CAIROSURFACEIMAGE_H
10 #define CAIROSURFACEIMAGE_H
11 #if defined(CAIRO) && defined(TK)
12 #include "cairo_base.h"
13 
14 namespace ecolab
15 {
24  struct CairoSurface
25  {
26  Exclude<cairo::SurfacePtr> surface;
27  virtual void redraw(int x0, int y0, int width, int height)=0;
28  virtual ~CairoSurface() {}
29 
35  static void registerImage();
36  };
37 }
38 
39 #ifdef _CLASSDESC
40 #pragma omit pack CairoSurface
41 #pragma omit unpack CairoSurface
42 #endif
43 namespace classdesc_access
44 {
45  template <>
46  struct access_pack<ecolab::CairoSurface>:
47  public classdesc::NullDescriptor<classdesc::pack_t> {};
48  template <>
49  struct access_unpack<ecolab::CairoSurface>:
50  public classdesc::NullDescriptor<classdesc::unpack_t> {};
51 }
52 #endif
53 #endif
helper for constructing null descriptors
Definition: classdesc.h:784
_OPENMP
Definition: accessor.h:16
Contains access_* structs, and nothing else. These structs are used to gain access to private members...
Definition: accessor.h:55