/* ZoomView.c generated by valac 0.56.17, the Vala compiler
 * generated from ZoomView.vala, do not modify */

/*
Copyright (C) 2012 Johan Mattsson

This library is free software; you can redistribute it and/or modify 
it under the terms of the GNU Lesser General Public License as 
published by the Free Software Foundation; either version 3 of the 
License, or (at your option) any later version.

This library 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 
Lesser General Public License for more details.
*/

#include <glib-object.h>
#include <glib.h>
#include <float.h>
#include <math.h>
#include "birdfont.h"
#include <string.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 BIRD_FONT_TYPE_ZOOM_VIEW (bird_font_zoom_view_get_type ())
#define BIRD_FONT_ZOOM_VIEW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), BIRD_FONT_TYPE_ZOOM_VIEW, BirdFontZoomView))
#define BIRD_FONT_ZOOM_VIEW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), BIRD_FONT_TYPE_ZOOM_VIEW, BirdFontZoomViewClass))
#define BIRD_FONT_IS_ZOOM_VIEW(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), BIRD_FONT_TYPE_ZOOM_VIEW))
#define BIRD_FONT_IS_ZOOM_VIEW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), BIRD_FONT_TYPE_ZOOM_VIEW))
#define BIRD_FONT_ZOOM_VIEW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), BIRD_FONT_TYPE_ZOOM_VIEW, BirdFontZoomViewClass))

typedef struct _BirdFontZoomView BirdFontZoomView;
typedef struct _BirdFontZoomViewClass BirdFontZoomViewClass;
typedef struct _BirdFontZoomViewPrivate BirdFontZoomViewPrivate;
enum  {
	BIRD_FONT_ZOOM_VIEW_0_PROPERTY,
	BIRD_FONT_ZOOM_VIEW_NUM_PROPERTIES
};
static GParamSpec* bird_font_zoom_view_properties[BIRD_FONT_ZOOM_VIEW_NUM_PROPERTIES];
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))

struct _BirdFontZoomView {
	GObject parent_instance;
	BirdFontZoomViewPrivate * priv;
	gdouble x;
	gdouble y;
	gdouble zoom;
	BirdFontWidgetAllocation* allocation;
};

struct _BirdFontZoomViewClass {
	GObjectClass parent_class;
};

static gpointer bird_font_zoom_view_parent_class = NULL;

VALA_EXTERN GType bird_font_zoom_view_get_type (void) G_GNUC_CONST ;
VALA_EXTERN BirdFontZoomView* bird_font_zoom_view_new (gdouble x,
                                           gdouble y,
                                           gdouble zoom,
                                           BirdFontWidgetAllocation* allocation);
VALA_EXTERN BirdFontZoomView* bird_font_zoom_view_construct (GType object_type,
                                                 gdouble x,
                                                 gdouble y,
                                                 gdouble zoom,
                                                 BirdFontWidgetAllocation* allocation);
static void bird_font_zoom_view_finalize (GObject * obj);
static GType bird_font_zoom_view_get_type_once (void);
static inline gpointer _vala_memdup2 (gconstpointer mem,
                        gsize byte_size);

static gpointer
_g_object_ref0 (gpointer self)
{
	return self ? g_object_ref (self) : NULL;
}

BirdFontZoomView*
bird_font_zoom_view_construct (GType object_type,
                               gdouble x,
                               gdouble y,
                               gdouble zoom,
                               BirdFontWidgetAllocation* allocation)
{
	BirdFontZoomView * self = NULL;
	BirdFontWidgetAllocation* _tmp0_;
	g_return_val_if_fail (allocation != NULL, NULL);
	self = (BirdFontZoomView*) g_object_new (object_type, NULL);
	self->x = x;
	self->y = y;
	self->zoom = zoom;
	_tmp0_ = _g_object_ref0 (allocation);
	_g_object_unref0 (self->allocation);
	self->allocation = _tmp0_;
	return self;
}

BirdFontZoomView*
bird_font_zoom_view_new (gdouble x,
                         gdouble y,
                         gdouble zoom,
                         BirdFontWidgetAllocation* allocation)
{
	return bird_font_zoom_view_construct (BIRD_FONT_TYPE_ZOOM_VIEW, x, y, zoom, allocation);
}

static void
bird_font_zoom_view_class_init (BirdFontZoomViewClass * klass,
                                gpointer klass_data)
{
	bird_font_zoom_view_parent_class = g_type_class_peek_parent (klass);
	G_OBJECT_CLASS (klass)->finalize = bird_font_zoom_view_finalize;
}

static void
bird_font_zoom_view_instance_init (BirdFontZoomView * self,
                                   gpointer klass)
{
}

static void
bird_font_zoom_view_finalize (GObject * obj)
{
	BirdFontZoomView * self;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, BIRD_FONT_TYPE_ZOOM_VIEW, BirdFontZoomView);
	_g_object_unref0 (self->allocation);
	G_OBJECT_CLASS (bird_font_zoom_view_parent_class)->finalize (obj);
}

static GType
bird_font_zoom_view_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (BirdFontZoomViewClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) bird_font_zoom_view_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (BirdFontZoomView), 0, (GInstanceInitFunc) bird_font_zoom_view_instance_init, NULL };
	GType bird_font_zoom_view_type_id;
	bird_font_zoom_view_type_id = g_type_register_static (G_TYPE_OBJECT, "BirdFontZoomView", &g_define_type_info, 0);
	return bird_font_zoom_view_type_id;
}

GType
bird_font_zoom_view_get_type (void)
{
	static volatile gsize bird_font_zoom_view_type_id__once = 0;
	if (g_once_init_enter (&bird_font_zoom_view_type_id__once)) {
		GType bird_font_zoom_view_type_id;
		bird_font_zoom_view_type_id = bird_font_zoom_view_get_type_once ();
		g_once_init_leave (&bird_font_zoom_view_type_id__once, bird_font_zoom_view_type_id);
	}
	return bird_font_zoom_view_type_id__once;
}

static inline gpointer
_vala_memdup2 (gconstpointer mem,
               gsize byte_size)
{
	gpointer new_mem;
	if (mem && byte_size != 0) {
		new_mem = g_malloc (byte_size);
		memcpy (new_mem, mem, byte_size);
	} else {
		new_mem = NULL;
	}
	return new_mem;
}

