/* gitg-diff-image-surface-cache.c generated by valac 0.56.19, the Vala compiler
 * generated from gitg-diff-image-surface-cache.vala, do not modify */

/*
 * This file is part of gitg
 *
 * Copyright (C) 2016 - Jesse van den Kieboom
 *
 * gitg 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.
 *
 * gitg 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 gitg. If not, see <http://www.gnu.org/licenses/>.
 */

#include <glib-object.h>
#include <gdk/gdk.h>
#include <cairo-gobject.h>
#include <gdk-pixbuf/gdk-pixbuf.h>
#include <glib.h>
#include "libgitg.h"

#if !defined(VALA_STRICT_C)
#if !defined(__clang__) && defined(__GNUC__) && (__GNUC__ >= 14)
#pragma GCC diagnostic warning "-Wincompatible-pointer-types"
#elif defined(__clang__) && (__clang_major__ >= 16)
#pragma clang diagnostic ignored "-Wincompatible-function-pointer-types"
#pragma clang diagnostic ignored "-Wincompatible-pointer-types"
#endif
#endif

#define GITG_TYPE_DIFF_IMAGE_SURFACE_CACHE (gitg_diff_image_surface_cache_get_type ())
#define GITG_DIFF_IMAGE_SURFACE_CACHE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GITG_TYPE_DIFF_IMAGE_SURFACE_CACHE, GitgDiffImageSurfaceCache))
#define GITG_IS_DIFF_IMAGE_SURFACE_CACHE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GITG_TYPE_DIFF_IMAGE_SURFACE_CACHE))
#define GITG_DIFF_IMAGE_SURFACE_CACHE_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), GITG_TYPE_DIFF_IMAGE_SURFACE_CACHE, GitgDiffImageSurfaceCacheIface))

typedef struct _GitgDiffImageSurfaceCache GitgDiffImageSurfaceCache;
typedef struct _GitgDiffImageSurfaceCacheIface GitgDiffImageSurfaceCacheIface;

struct _GitgDiffImageSurfaceCacheIface {
	GTypeInterface parent_iface;
	cairo_surface_t* (*get_old_surface) (GitgDiffImageSurfaceCache* self, GdkWindow* window);
	cairo_surface_t* (*get_new_surface) (GitgDiffImageSurfaceCache* self, GdkWindow* window);
	GdkPixbuf* (*get_old_pixbuf) (GitgDiffImageSurfaceCache* self);
	void (*set_old_pixbuf) (GitgDiffImageSurfaceCache* self, GdkPixbuf* value);
	GdkPixbuf* (*get_new_pixbuf) (GitgDiffImageSurfaceCache* self);
	void (*set_new_pixbuf) (GitgDiffImageSurfaceCache* self, GdkPixbuf* value);
	GdkWindow* (*get_window) (GitgDiffImageSurfaceCache* self);
	void (*set_window) (GitgDiffImageSurfaceCache* self, GdkWindow* value);
};

VALA_EXTERN GType gitg_diff_image_surface_cache_get_type (void) G_GNUC_CONST ;
VALA_EXTERN cairo_surface_t* gitg_diff_image_surface_cache_get_old_surface (GitgDiffImageSurfaceCache* self,
                                                                GdkWindow* window);
VALA_EXTERN cairo_surface_t* gitg_diff_image_surface_cache_get_new_surface (GitgDiffImageSurfaceCache* self,
                                                                GdkWindow* window);
VALA_EXTERN GdkPixbuf* gitg_diff_image_surface_cache_get_old_pixbuf (GitgDiffImageSurfaceCache* self);
VALA_EXTERN void gitg_diff_image_surface_cache_set_old_pixbuf (GitgDiffImageSurfaceCache* self,
                                                   GdkPixbuf* value);
VALA_EXTERN GdkPixbuf* gitg_diff_image_surface_cache_get_new_pixbuf (GitgDiffImageSurfaceCache* self);
VALA_EXTERN void gitg_diff_image_surface_cache_set_new_pixbuf (GitgDiffImageSurfaceCache* self,
                                                   GdkPixbuf* value);
VALA_EXTERN GdkWindow* gitg_diff_image_surface_cache_get_window (GitgDiffImageSurfaceCache* self);
VALA_EXTERN void gitg_diff_image_surface_cache_set_window (GitgDiffImageSurfaceCache* self,
                                               GdkWindow* value);
static GType gitg_diff_image_surface_cache_get_type_once (void);

cairo_surface_t*
gitg_diff_image_surface_cache_get_old_surface (GitgDiffImageSurfaceCache* self,
                                               GdkWindow* window)
{
	GitgDiffImageSurfaceCacheIface* _iface_;
	g_return_val_if_fail (self != NULL, NULL);
	_iface_ = GITG_DIFF_IMAGE_SURFACE_CACHE_GET_INTERFACE (self);
	if (_iface_->get_old_surface) {
		return _iface_->get_old_surface (self, window);
	}
	return NULL;
}

cairo_surface_t*
gitg_diff_image_surface_cache_get_new_surface (GitgDiffImageSurfaceCache* self,
                                               GdkWindow* window)
{
	GitgDiffImageSurfaceCacheIface* _iface_;
	g_return_val_if_fail (self != NULL, NULL);
	_iface_ = GITG_DIFF_IMAGE_SURFACE_CACHE_GET_INTERFACE (self);
	if (_iface_->get_new_surface) {
		return _iface_->get_new_surface (self, window);
	}
	return NULL;
}

GdkPixbuf*
gitg_diff_image_surface_cache_get_old_pixbuf (GitgDiffImageSurfaceCache* self)
{
	GitgDiffImageSurfaceCacheIface* _iface_;
	g_return_val_if_fail (self != NULL, NULL);
	_iface_ = GITG_DIFF_IMAGE_SURFACE_CACHE_GET_INTERFACE (self);
	if (_iface_->get_old_pixbuf) {
		return _iface_->get_old_pixbuf (self);
	}
	return NULL;
}

void
gitg_diff_image_surface_cache_set_old_pixbuf (GitgDiffImageSurfaceCache* self,
                                              GdkPixbuf* value)
{
	GitgDiffImageSurfaceCacheIface* _iface_;
	g_return_if_fail (self != NULL);
	_iface_ = GITG_DIFF_IMAGE_SURFACE_CACHE_GET_INTERFACE (self);
	if (_iface_->set_old_pixbuf) {
		_iface_->set_old_pixbuf (self, value);
	}
}

GdkPixbuf*
gitg_diff_image_surface_cache_get_new_pixbuf (GitgDiffImageSurfaceCache* self)
{
	GitgDiffImageSurfaceCacheIface* _iface_;
	g_return_val_if_fail (self != NULL, NULL);
	_iface_ = GITG_DIFF_IMAGE_SURFACE_CACHE_GET_INTERFACE (self);
	if (_iface_->get_new_pixbuf) {
		return _iface_->get_new_pixbuf (self);
	}
	return NULL;
}

void
gitg_diff_image_surface_cache_set_new_pixbuf (GitgDiffImageSurfaceCache* self,
                                              GdkPixbuf* value)
{
	GitgDiffImageSurfaceCacheIface* _iface_;
	g_return_if_fail (self != NULL);
	_iface_ = GITG_DIFF_IMAGE_SURFACE_CACHE_GET_INTERFACE (self);
	if (_iface_->set_new_pixbuf) {
		_iface_->set_new_pixbuf (self, value);
	}
}

GdkWindow*
gitg_diff_image_surface_cache_get_window (GitgDiffImageSurfaceCache* self)
{
	GitgDiffImageSurfaceCacheIface* _iface_;
	g_return_val_if_fail (self != NULL, NULL);
	_iface_ = GITG_DIFF_IMAGE_SURFACE_CACHE_GET_INTERFACE (self);
	if (_iface_->get_window) {
		return _iface_->get_window (self);
	}
	return NULL;
}

void
gitg_diff_image_surface_cache_set_window (GitgDiffImageSurfaceCache* self,
                                          GdkWindow* value)
{
	GitgDiffImageSurfaceCacheIface* _iface_;
	g_return_if_fail (self != NULL);
	_iface_ = GITG_DIFF_IMAGE_SURFACE_CACHE_GET_INTERFACE (self);
	if (_iface_->set_window) {
		_iface_->set_window (self, value);
	}
}

static void
gitg_diff_image_surface_cache_default_init (GitgDiffImageSurfaceCacheIface * iface,
                                            gpointer iface_data)
{
	g_object_interface_install_property (iface, g_param_spec_object ("old-pixbuf", "old-pixbuf", "old-pixbuf", gdk_pixbuf_get_type (), G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE | G_PARAM_CONSTRUCT));
	g_object_interface_install_property (iface, g_param_spec_object ("new-pixbuf", "new-pixbuf", "new-pixbuf", gdk_pixbuf_get_type (), G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE | G_PARAM_CONSTRUCT));
	g_object_interface_install_property (iface, g_param_spec_object ("window", "window", "window", gdk_window_get_type (), G_PARAM_STATIC_STRINGS | G_PARAM_READABLE | G_PARAM_WRITABLE | G_PARAM_CONSTRUCT));
}

 G_GNUC_NO_INLINE static GType
gitg_diff_image_surface_cache_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (GitgDiffImageSurfaceCacheIface), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) gitg_diff_image_surface_cache_default_init, (GClassFinalizeFunc) NULL, NULL, 0, 0, (GInstanceInitFunc) NULL, NULL };
	GType gitg_diff_image_surface_cache_type_id;
	gitg_diff_image_surface_cache_type_id = g_type_register_static (G_TYPE_INTERFACE, "GitgDiffImageSurfaceCache", &g_define_type_info, 0);
	g_type_interface_add_prerequisite (gitg_diff_image_surface_cache_type_id, G_TYPE_OBJECT);
	return gitg_diff_image_surface_cache_type_id;
}

GType
gitg_diff_image_surface_cache_get_type (void)
{
	static gsize gitg_diff_image_surface_cache_type_id__once = 0;
	if (g_once_init_enter (&gitg_diff_image_surface_cache_type_id__once)) {
		GType gitg_diff_image_surface_cache_type_id;
		gitg_diff_image_surface_cache_type_id = gitg_diff_image_surface_cache_get_type_once ();
		g_once_init_leave (&gitg_diff_image_surface_cache_type_id__once, gitg_diff_image_surface_cache_type_id);
	}
	return gitg_diff_image_surface_cache_type_id__once;
}

