aboutsummaryrefslogtreecommitdiff
path: root/include/cru/platform/graphics/web_canvas/WebCanvasRef.h
blob: 4cb960bd79d9620b9479359a4a60522bc982d6a2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#pragma once

#include "cru/common/Base.h"

#include <emscripten/val.h>

namespace cru::platform::graphics::web_canvas {
  class WebCanvasRef {
    public:
      explicit WebCanvasRef(emscripten::val canvas_val);

      CRU_DEFAULT_COPY(WebCanvasRef)
      CRU_DEFAULT_MOVE(WebCanvasRef)

      CRU_DEFAULT_DESTRUCTOR(WebCanvasRef)

    public:
      int GetWidth() const;
      int GetHeight() const;

    private:
      emscripten::val val_;
  };
}