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

/*
 * Alm.vala
 * Copyright (C) 2012 Seif Lotfy <seif@lotfy.com>
 * Copyright (C) 2012 Intel Corp.
 *               Authored by: Seif Lotfy <seif.lotfy@collabora.co.uk>
 * 
alm 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 2 of the License, or
 * (at your option) any later version.
 * 
 * alm 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.
 * 
 * You should have received a copy of the GNU Lesser General Public License
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.";
 */

#include <glib.h>
#include <glib-object.h>
#include <gtk/gtk.h>
#include <glib/gi18n-lib.h>
#include <gio/gio.h>
#include <stdlib.h>
#include <string.h>
#include "config.h"


#define ALM_TYPE_ALM_WINDOW (alm_alm_window_get_type ())
#define ALM_ALM_WINDOW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), ALM_TYPE_ALM_WINDOW, AlmAlmWindow))
#define ALM_ALM_WINDOW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), ALM_TYPE_ALM_WINDOW, AlmAlmWindowClass))
#define ALM_IS_ALM_WINDOW(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), ALM_TYPE_ALM_WINDOW))
#define ALM_IS_ALM_WINDOW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), ALM_TYPE_ALM_WINDOW))
#define ALM_ALM_WINDOW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), ALM_TYPE_ALM_WINDOW, AlmAlmWindowClass))

typedef struct _AlmAlmWindow AlmAlmWindow;
typedef struct _AlmAlmWindowClass AlmAlmWindowClass;
typedef struct _AlmAlmWindowPrivate AlmAlmWindowPrivate;

#define ALM_TYPE_APPLICATION (alm_application_get_type ())
#define ALM_APPLICATION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), ALM_TYPE_APPLICATION, AlmApplication))
#define ALM_APPLICATION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), ALM_TYPE_APPLICATION, AlmApplicationClass))
#define ALM_IS_APPLICATION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), ALM_TYPE_APPLICATION))
#define ALM_IS_APPLICATION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), ALM_TYPE_APPLICATION))
#define ALM_APPLICATION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), ALM_TYPE_APPLICATION, AlmApplicationClass))

typedef struct _AlmApplication AlmApplication;
typedef struct _AlmApplicationClass AlmApplicationClass;

#define ALM_TYPE_ACTIVITY_LOG_MANAGER (alm_activity_log_manager_get_type ())
#define ALM_ACTIVITY_LOG_MANAGER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), ALM_TYPE_ACTIVITY_LOG_MANAGER, AlmActivityLogManager))
#define ALM_ACTIVITY_LOG_MANAGER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), ALM_TYPE_ACTIVITY_LOG_MANAGER, AlmActivityLogManagerClass))
#define ALM_IS_ACTIVITY_LOG_MANAGER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), ALM_TYPE_ACTIVITY_LOG_MANAGER))
#define ALM_IS_ACTIVITY_LOG_MANAGER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), ALM_TYPE_ACTIVITY_LOG_MANAGER))
#define ALM_ACTIVITY_LOG_MANAGER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), ALM_TYPE_ACTIVITY_LOG_MANAGER, AlmActivityLogManagerClass))

typedef struct _AlmActivityLogManager AlmActivityLogManager;
typedef struct _AlmActivityLogManagerClass AlmActivityLogManagerClass;
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))
typedef struct _AlmApplicationPrivate AlmApplicationPrivate;

struct _AlmAlmWindow {
	GtkApplicationWindow parent_instance;
	AlmAlmWindowPrivate * priv;
};

struct _AlmAlmWindowClass {
	GtkApplicationWindowClass parent_class;
};

struct _AlmApplication {
	GtkApplication parent_instance;
	AlmApplicationPrivate * priv;
};

struct _AlmApplicationClass {
	GtkApplicationClass parent_class;
};


static gpointer alm_alm_window_parent_class = NULL;
static gpointer alm_application_parent_class = NULL;

GType alm_alm_window_get_type (void) G_GNUC_CONST;
enum  {
	ALM_ALM_WINDOW_DUMMY_PROPERTY
};
GType alm_application_get_type (void) G_GNUC_CONST;
AlmAlmWindow* alm_alm_window_new (AlmApplication* app);
AlmAlmWindow* alm_alm_window_construct (GType object_type, AlmApplication* app);
AlmActivityLogManager* alm_activity_log_manager_new (void);
AlmActivityLogManager* alm_activity_log_manager_construct (GType object_type);
GType alm_activity_log_manager_get_type (void) G_GNUC_CONST;
void alm_alm_window_on_destroy (GtkWidget* window, AlmAlmWindow* self);
static void _alm_alm_window_on_destroy_gtk_widget_destroy (GtkWidget* _sender, gpointer self);
enum  {
	ALM_APPLICATION_DUMMY_PROPERTY
};
static void alm_application_real_activate (GApplication* base);
static void alm_application_real_startup (GApplication* base);
AlmApplication* alm_application_new (void);
AlmApplication* alm_application_construct (GType object_type);
static void alm_application_real_shutdown (GApplication* base);
static void alm_application_on_quit_activate (AlmApplication* self);
gint _vala_main (gchar** args, int args_length1);


AlmAlmWindow* alm_alm_window_construct (GType object_type, AlmApplication* app) {
	AlmAlmWindow * self = NULL;
	AlmApplication* _tmp0_;
	const gchar* _tmp1_ = NULL;
	AlmActivityLogManager* _tmp2_;
	AlmActivityLogManager* widget;
	g_return_val_if_fail (app != NULL, NULL);
	_tmp0_ = app;
	self = (AlmAlmWindow*) g_object_new (object_type, "application", _tmp0_, NULL);
	_tmp1_ = _ ("Privacy");
	gtk_window_set_title ((GtkWindow*) self, _tmp1_);
	_tmp2_ = alm_activity_log_manager_new ();
	g_object_ref_sink (_tmp2_);
	widget = _tmp2_;
	gtk_container_add ((GtkContainer*) self, (GtkWidget*) widget);
	gtk_widget_show ((GtkWidget*) self);
	_g_object_unref0 (widget);
	return self;
}


AlmAlmWindow* alm_alm_window_new (AlmApplication* app) {
	return alm_alm_window_construct (ALM_TYPE_ALM_WINDOW, app);
}


static void _alm_alm_window_on_destroy_gtk_widget_destroy (GtkWidget* _sender, gpointer self) {
	alm_alm_window_on_destroy (_sender, self);
}


void alm_alm_window_on_destroy (GtkWidget* window, AlmAlmWindow* self) {
	g_return_if_fail (self != NULL);
	g_return_if_fail (window != NULL);
	gtk_main_quit ();
	g_signal_connect_object ((GtkWidget*) self, "destroy", (GCallback) _alm_alm_window_on_destroy_gtk_widget_destroy, self, 0);
}


static void alm_alm_window_class_init (AlmAlmWindowClass * klass) {
	alm_alm_window_parent_class = g_type_class_peek_parent (klass);
}


static void alm_alm_window_instance_init (AlmAlmWindow * self) {
}


GType alm_alm_window_get_type (void) {
	static volatile gsize alm_alm_window_type_id__volatile = 0;
	if (g_once_init_enter (&alm_alm_window_type_id__volatile)) {
		static const GTypeInfo g_define_type_info = { sizeof (AlmAlmWindowClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) alm_alm_window_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (AlmAlmWindow), 0, (GInstanceInitFunc) alm_alm_window_instance_init, NULL };
		GType alm_alm_window_type_id;
		alm_alm_window_type_id = g_type_register_static (GTK_TYPE_APPLICATION_WINDOW, "AlmAlmWindow", &g_define_type_info, 0);
		g_once_init_leave (&alm_alm_window_type_id__volatile, alm_alm_window_type_id);
	}
	return alm_alm_window_type_id__volatile;
}


static void alm_application_real_activate (GApplication* base) {
	AlmApplication * self;
	AlmAlmWindow* _tmp0_;
	AlmAlmWindow* _tmp1_;
	self = (AlmApplication*) base;
	_tmp0_ = alm_alm_window_new (self);
	g_object_ref_sink (_tmp0_);
	_tmp1_ = _tmp0_;
	_g_object_unref0 (_tmp1_);
}


static void alm_application_real_startup (GApplication* base) {
	AlmApplication * self;
	self = (AlmApplication*) base;
	G_APPLICATION_CLASS (alm_application_parent_class)->startup ((GApplication*) G_TYPE_CHECK_INSTANCE_CAST (self, GTK_TYPE_APPLICATION, GtkApplication));
}


AlmApplication* alm_application_construct (GType object_type) {
	AlmApplication * self = NULL;
	self = (AlmApplication*) g_object_new (object_type, "application-id", "org.zeitgeist.Alm", "flags", G_APPLICATION_FLAGS_NONE, NULL);
	return self;
}


AlmApplication* alm_application_new (void) {
	return alm_application_construct (ALM_TYPE_APPLICATION);
}


static void alm_application_real_shutdown (GApplication* base) {
	AlmApplication * self;
	self = (AlmApplication*) base;
	G_APPLICATION_CLASS (alm_application_parent_class)->shutdown ((GApplication*) G_TYPE_CHECK_INSTANCE_CAST (self, GTK_TYPE_APPLICATION, GtkApplication));
}


static void alm_application_on_quit_activate (AlmApplication* self) {
	g_return_if_fail (self != NULL);
	g_application_quit ((GApplication*) self);
}


static void alm_application_class_init (AlmApplicationClass * klass) {
	alm_application_parent_class = g_type_class_peek_parent (klass);
	G_APPLICATION_CLASS (klass)->activate = alm_application_real_activate;
	G_APPLICATION_CLASS (klass)->startup = alm_application_real_startup;
	G_APPLICATION_CLASS (klass)->shutdown = alm_application_real_shutdown;
}


static void alm_application_instance_init (AlmApplication * self) {
}


GType alm_application_get_type (void) {
	static volatile gsize alm_application_type_id__volatile = 0;
	if (g_once_init_enter (&alm_application_type_id__volatile)) {
		static const GTypeInfo g_define_type_info = { sizeof (AlmApplicationClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) alm_application_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (AlmApplication), 0, (GInstanceInitFunc) alm_application_instance_init, NULL };
		GType alm_application_type_id;
		alm_application_type_id = g_type_register_static (GTK_TYPE_APPLICATION, "AlmApplication", &g_define_type_info, 0);
		g_once_init_leave (&alm_application_type_id__volatile, alm_application_type_id);
	}
	return alm_application_type_id__volatile;
}


gint _vala_main (gchar** args, int args_length1) {
	gint result = 0;
	AlmApplication* _tmp0_;
	AlmApplication* alm;
	gchar** _tmp1_;
	gint _tmp1__length1;
	gint _tmp2_ = 0;
	bindtextdomain (GETTEXT_PACKAGE, GNOMELOCALEDIR);
	bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
	textdomain (GETTEXT_PACKAGE);
	_tmp0_ = alm_application_new ();
	alm = _tmp0_;
	_tmp1_ = args;
	_tmp1__length1 = args_length1;
	_tmp2_ = g_application_run ((GApplication*) alm, _tmp1__length1, _tmp1_);
	result = _tmp2_;
	_g_object_unref0 (alm);
	return result;
}


int main (int argc, char ** argv) {
	g_type_init ();
	return _vala_main (argv, argc);
}



