/* autogenerated by generator-surface.js */

#pragma once

#include <nan.h>
#include <node.h>
#include <girepository.h>
#include <glib.h>
#include <cairo.h>

namespace GNodeJS {

namespace Cairo {


class Surface: public Nan::ObjectWrap {
  public:
    static Nan::Persistent<v8::FunctionTemplate> constructorTemplate;
    static Nan::Persistent<v8::Function>         constructor;
    static void Initialize(Nan::ADDON_REGISTER_FUNCTION_ARGS_TYPE target);
    static void SetupTemplate();
    static Local<v8::FunctionTemplate> GetTemplate();
    static Local<v8::Function> GetConstructor();

    static NAN_METHOD(New);

    static NAN_METHOD(createSimilar);
    static NAN_METHOD(createSimilarImage);
    static NAN_METHOD(createForRectangle);
    static NAN_METHOD(writeToPng);
    static NAN_METHOD(status);
    static NAN_METHOD(finish);
    static NAN_METHOD(flush);
    static NAN_METHOD(getDevice);
    static NAN_METHOD(getFontOptions);
    static NAN_METHOD(getContent);
    static NAN_METHOD(markDirty);
    static NAN_METHOD(markDirtyRectangle);
    static NAN_METHOD(setDeviceOffset);
    static NAN_METHOD(getDeviceOffset);
    static NAN_METHOD(getDeviceScale);
    static NAN_METHOD(setDeviceScale);
    static NAN_METHOD(setFallbackResolution);
    static NAN_METHOD(getFallbackResolution);
    static NAN_METHOD(getType);
    static NAN_METHOD(getReferenceCount);
    static NAN_METHOD(copyPage);
    static NAN_METHOD(showPage);
    static NAN_METHOD(hasShowTextGlyphs);
    static NAN_METHOD(supportsMimeType);
    static NAN_METHOD(mapToImage);
    static NAN_METHOD(unmapImage);


    Surface(cairo_surface_t* data);
    ~Surface();

    cairo_surface_t* _data;
};

class ImageSurface: public Surface {
  public:
    static Nan::Persistent<v8::FunctionTemplate> constructorTemplate;
    static Nan::Persistent<v8::Function>         constructor;
    static void Initialize(Nan::ADDON_REGISTER_FUNCTION_ARGS_TYPE target);
    static void SetupTemplate(Local<v8::FunctionTemplate> parentTpl);
    static Local<v8::FunctionTemplate> GetTemplate();
    static Local<v8::Function> GetConstructor();

    static NAN_METHOD(New);

    static NAN_METHOD(createFromPng);
    static NAN_METHOD(getData);
    static NAN_METHOD(getFormat);
    static NAN_METHOD(getWidth);
    static NAN_METHOD(getHeight);
    static NAN_METHOD(getStride);


    ImageSurface(cairo_surface_t* data) : Surface(data) {};
};

class RecordingSurface: public Surface {
  public:
    static Nan::Persistent<v8::FunctionTemplate> constructorTemplate;
    static Nan::Persistent<v8::Function>         constructor;
    static void Initialize(Nan::ADDON_REGISTER_FUNCTION_ARGS_TYPE target);
    static void SetupTemplate(Local<v8::FunctionTemplate> parentTpl);
    static Local<v8::FunctionTemplate> GetTemplate();
    static Local<v8::Function> GetConstructor();

    static NAN_METHOD(New);

    static NAN_METHOD(inkExtents);
    static NAN_METHOD(getExtents);


    RecordingSurface(cairo_surface_t* data) : Surface(data) {};
};

}; // Cairo

}; // GNodeJS