/* PantheonShell.c generated by valac 0.56.18-dirty, the Vala compiler
 * generated from PantheonShell.vala, do not modify */

/*
 * Copyright 2023 elementary, Inc. <https://elementary.io>
 * Copyright 2023 Corentin Noël <tintou@noel.tf>
 * SPDX-License-Identifier: GPL-3.0-or-later
 */

#include <meta/meta-context.h>
#include <wayland-server.h>
#include <glib.h>
#include <meta/meta-wayland-compositor.h>
#include "pantheon-desktop-shell-server-protocol.h"
#include <glib-object.h>
#include <wayland-server-protocol.h>
#include <meta/window.h>
#include <meta/display.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
#if !defined(VALA_EXTERN)
#if defined(_MSC_VER)
#define VALA_EXTERN __declspec(dllexport) extern
#elif __GNUC__ >= 4
#define VALA_EXTERN __attribute__((visibility("default"))) extern
#else
#define VALA_EXTERN extern
#endif
#endif

typedef void (*PantheonDesktopGetPanel) (struct wl_client* client, struct wl_resource* resource, guint32 output, struct wl_resource* surface);
typedef void (*PantheonDesktopGetWidget) (struct wl_client* client, struct wl_resource* resource, guint32 output, struct wl_resource* surface);
typedef void (*PantheonDesktopGetExtendedBehavior) (struct wl_client* client, struct wl_resource* resource, guint32 output, struct wl_resource* surface);
typedef void (*PantheonDesktopDestroy) (struct wl_client* client, struct wl_resource* resource);
typedef void (*PantheonDesktopSetAnchor) (struct wl_client* client, struct wl_resource* resource, uint32_t anchor);
typedef void (*PantheonDesktopFocus) (struct wl_client* client, struct wl_resource* resource);
typedef void (*PantheonDesktopSetSize) (struct wl_client* client, struct wl_resource* resource, gint width, gint height);
typedef void (*PantheonDesktopSetHideMode) (struct wl_client* client, struct wl_resource* resource, uint32_t hide_mode);
typedef void (*PantheonDesktopRequestVisibleInMultitaskingView) (struct wl_client* client, struct wl_resource* resource);
typedef void (*PantheonDesktopAddBlur) (struct wl_client* client, struct wl_resource* resource, guint left, guint right, guint top, guint bottom, guint clip_radius);
typedef void (*PantheonDesktopRemoveBlur) (struct wl_client* client, struct wl_resource* resource);
typedef void (*PantheonDesktopSetKeepAbove) (struct wl_client* client, struct wl_resource* resource);
typedef void (*PantheonDesktopMakeCentered) (struct wl_client* client, struct wl_resource* resource);
typedef void (*PantheonDesktopMakeModal) (struct wl_client* client, struct wl_resource* resource, guint dim);
#define _wl_global_destroy0(var) ((var == NULL) ? NULL : (var = (wl_global_destroy (var), NULL)))

#define GALA_TYPE_PANEL_SURFACE (gala_panel_surface_get_type ())
#define GALA_PANEL_SURFACE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GALA_TYPE_PANEL_SURFACE, GalaPanelSurface))
#define GALA_PANEL_SURFACE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GALA_TYPE_PANEL_SURFACE, GalaPanelSurfaceClass))
#define GALA_IS_PANEL_SURFACE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GALA_TYPE_PANEL_SURFACE))
#define GALA_IS_PANEL_SURFACE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GALA_TYPE_PANEL_SURFACE))
#define GALA_PANEL_SURFACE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GALA_TYPE_PANEL_SURFACE, GalaPanelSurfaceClass))

typedef struct _GalaPanelSurface GalaPanelSurface;
typedef struct _GalaPanelSurfaceClass GalaPanelSurfaceClass;
typedef struct _GalaPanelSurfacePrivate GalaPanelSurfacePrivate;
enum  {
	GALA_PANEL_SURFACE_0_PROPERTY,
	GALA_PANEL_SURFACE_NUM_PROPERTIES
};
static GParamSpec* gala_panel_surface_properties[GALA_PANEL_SURFACE_NUM_PROPERTIES];

#define GALA_TYPE_WIDGET_SURFACE (gala_widget_surface_get_type ())
#define GALA_WIDGET_SURFACE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GALA_TYPE_WIDGET_SURFACE, GalaWidgetSurface))
#define GALA_WIDGET_SURFACE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GALA_TYPE_WIDGET_SURFACE, GalaWidgetSurfaceClass))
#define GALA_IS_WIDGET_SURFACE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GALA_TYPE_WIDGET_SURFACE))
#define GALA_IS_WIDGET_SURFACE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GALA_TYPE_WIDGET_SURFACE))
#define GALA_WIDGET_SURFACE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GALA_TYPE_WIDGET_SURFACE, GalaWidgetSurfaceClass))

typedef struct _GalaWidgetSurface GalaWidgetSurface;
typedef struct _GalaWidgetSurfaceClass GalaWidgetSurfaceClass;
typedef struct _GalaWidgetSurfacePrivate GalaWidgetSurfacePrivate;
enum  {
	GALA_WIDGET_SURFACE_0_PROPERTY,
	GALA_WIDGET_SURFACE_NUM_PROPERTIES
};
static GParamSpec* gala_widget_surface_properties[GALA_WIDGET_SURFACE_NUM_PROPERTIES];

#define GALA_TYPE_EXTENDED_BEHAVIOR_SURFACE (gala_extended_behavior_surface_get_type ())
#define GALA_EXTENDED_BEHAVIOR_SURFACE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GALA_TYPE_EXTENDED_BEHAVIOR_SURFACE, GalaExtendedBehaviorSurface))
#define GALA_EXTENDED_BEHAVIOR_SURFACE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GALA_TYPE_EXTENDED_BEHAVIOR_SURFACE, GalaExtendedBehaviorSurfaceClass))
#define GALA_IS_EXTENDED_BEHAVIOR_SURFACE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GALA_TYPE_EXTENDED_BEHAVIOR_SURFACE))
#define GALA_IS_EXTENDED_BEHAVIOR_SURFACE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GALA_TYPE_EXTENDED_BEHAVIOR_SURFACE))
#define GALA_EXTENDED_BEHAVIOR_SURFACE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GALA_TYPE_EXTENDED_BEHAVIOR_SURFACE, GalaExtendedBehaviorSurfaceClass))

typedef struct _GalaExtendedBehaviorSurface GalaExtendedBehaviorSurface;
typedef struct _GalaExtendedBehaviorSurfaceClass GalaExtendedBehaviorSurfaceClass;
typedef struct _GalaExtendedBehaviorSurfacePrivate GalaExtendedBehaviorSurfacePrivate;
enum  {
	GALA_EXTENDED_BEHAVIOR_SURFACE_0_PROPERTY,
	GALA_EXTENDED_BEHAVIOR_SURFACE_NUM_PROPERTIES
};
static GParamSpec* gala_extended_behavior_surface_properties[GALA_EXTENDED_BEHAVIOR_SURFACE_NUM_PROPERTIES];
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))

#define GALA_TYPE_SHELL_CLIENTS_MANAGER (gala_shell_clients_manager_get_type ())
#define GALA_SHELL_CLIENTS_MANAGER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GALA_TYPE_SHELL_CLIENTS_MANAGER, GalaShellClientsManager))
#define GALA_SHELL_CLIENTS_MANAGER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GALA_TYPE_SHELL_CLIENTS_MANAGER, GalaShellClientsManagerClass))
#define GALA_IS_SHELL_CLIENTS_MANAGER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GALA_TYPE_SHELL_CLIENTS_MANAGER))
#define GALA_IS_SHELL_CLIENTS_MANAGER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GALA_TYPE_SHELL_CLIENTS_MANAGER))
#define GALA_SHELL_CLIENTS_MANAGER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GALA_TYPE_SHELL_CLIENTS_MANAGER, GalaShellClientsManagerClass))

typedef struct _GalaShellClientsManager GalaShellClientsManager;
typedef struct _GalaShellClientsManagerClass GalaShellClientsManagerClass;

#define GALA_TYPE_BLUR_MANAGER (gala_blur_manager_get_type ())
#define GALA_BLUR_MANAGER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GALA_TYPE_BLUR_MANAGER, GalaBlurManager))
#define GALA_BLUR_MANAGER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GALA_TYPE_BLUR_MANAGER, GalaBlurManagerClass))
#define GALA_IS_BLUR_MANAGER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GALA_TYPE_BLUR_MANAGER))
#define GALA_IS_BLUR_MANAGER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GALA_TYPE_BLUR_MANAGER))
#define GALA_BLUR_MANAGER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GALA_TYPE_BLUR_MANAGER, GalaBlurManagerClass))

typedef struct _GalaBlurManager GalaBlurManager;
typedef struct _GalaBlurManagerClass GalaBlurManagerClass;

struct _GalaPanelSurface {
	GObject parent_instance;
	GalaPanelSurfacePrivate * priv;
	GObject* wayland_surface;
};

struct _GalaPanelSurfaceClass {
	GObjectClass parent_class;
};

struct _GalaWidgetSurface {
	GObject parent_instance;
	GalaWidgetSurfacePrivate * priv;
	GObject* wayland_surface;
};

struct _GalaWidgetSurfaceClass {
	GObjectClass parent_class;
};

struct _GalaExtendedBehaviorSurface {
	GObject parent_instance;
	GalaExtendedBehaviorSurfacePrivate * priv;
	GObject* wayland_surface;
};

struct _GalaExtendedBehaviorSurfaceClass {
	GObjectClass parent_class;
};

VALA_EXTERN struct io_elementary_pantheon_shell_v1_interface gala_wayland_pantheon_shell_interface;
struct io_elementary_pantheon_shell_v1_interface gala_wayland_pantheon_shell_interface = {0};
VALA_EXTERN struct io_elementary_pantheon_panel_v1_interface gala_wayland_pantheon_panel_interface;
struct io_elementary_pantheon_panel_v1_interface gala_wayland_pantheon_panel_interface = {0};
VALA_EXTERN struct io_elementary_pantheon_widget_v1_interface gala_wayland_pantheon_widget_interface;
struct io_elementary_pantheon_widget_v1_interface gala_wayland_pantheon_widget_interface = {0};
VALA_EXTERN struct io_elementary_pantheon_extended_behavior_v1_interface gala_wayland_pantheon_extended_behavior_interface;
struct io_elementary_pantheon_extended_behavior_v1_interface gala_wayland_pantheon_extended_behavior_interface = {0};
VALA_EXTERN struct wl_global* gala_shell_global;
struct wl_global* gala_shell_global = NULL;
VALA_EXTERN GQuark gala_panel_surface_quark;
VALA_EXTERN GQuark gala_widget_surface_quark;
VALA_EXTERN GQuark gala_extended_behavior_surface_quark;
static gpointer gala_panel_surface_parent_class = NULL;
GQuark gala_panel_surface_quark = (GQuark) 0;
static gpointer gala_widget_surface_parent_class = NULL;
GQuark gala_widget_surface_quark = (GQuark) 0;
static gpointer gala_extended_behavior_surface_parent_class = NULL;
GQuark gala_extended_behavior_surface_quark = (GQuark) 0;

VALA_EXTERN struct wl_display* gala_get_display_from_context (MetaContext* context);
VALA_EXTERN void gala_init_pantheon_shell (MetaContext* context);
 G_GNUC_INTERNAL void gala_get_panel (struct wl_client* client,
                     struct wl_resource* resource,
                     guint32 output,
                     struct wl_resource* surface_resource);
static void _gala_get_panel_pantheon_desktop_get_panel (struct wl_client* client,
                                                 struct wl_resource* resource,
                                                 guint32 output,
                                                 struct wl_resource* surface);
 G_GNUC_INTERNAL void gala_get_widget (struct wl_client* client,
                      struct wl_resource* resource,
                      guint32 output,
                      struct wl_resource* surface_resource);
static void _gala_get_widget_pantheon_desktop_get_widget (struct wl_client* client,
                                                   struct wl_resource* resource,
                                                   guint32 output,
                                                   struct wl_resource* surface);
 G_GNUC_INTERNAL void gala_get_extended_behavior (struct wl_client* client,
                                 struct wl_resource* resource,
                                 guint32 output,
                                 struct wl_resource* surface_resource);
static void _gala_get_extended_behavior_pantheon_desktop_get_extended_behavior (struct wl_client* client,
                                                                         struct wl_resource* resource,
                                                                         guint32 output,
                                                                         struct wl_resource* surface);
 G_GNUC_INTERNAL void gala_destroy_panel_surface (struct wl_client* client,
                                 struct wl_resource* resource);
static void _gala_destroy_panel_surface_pantheon_desktop_destroy (struct wl_client* client,
                                                           struct wl_resource* resource);
 G_GNUC_INTERNAL void gala_set_anchor (struct wl_client* client,
                      struct wl_resource* resource,
                      uint32_t anchor);
static void _gala_set_anchor_pantheon_desktop_set_anchor (struct wl_client* client,
                                                   struct wl_resource* resource,
                                                   uint32_t anchor);
 G_GNUC_INTERNAL void gala_focus_panel (struct wl_client* client,
                       struct wl_resource* resource);
static void _gala_focus_panel_pantheon_desktop_focus (struct wl_client* client,
                                               struct wl_resource* resource);
 G_GNUC_INTERNAL void gala_set_size (struct wl_client* client,
                    struct wl_resource* resource,
                    gint width,
                    gint height);
static void _gala_set_size_pantheon_desktop_set_size (struct wl_client* client,
                                               struct wl_resource* resource,
                                               gint width,
                                               gint height);
 G_GNUC_INTERNAL void gala_set_hide_mode (struct wl_client* client,
                         struct wl_resource* resource,
                         uint32_t hide_mode);
static void _gala_set_hide_mode_pantheon_desktop_set_hide_mode (struct wl_client* client,
                                                         struct wl_resource* resource,
                                                         uint32_t hide_mode);
 G_GNUC_INTERNAL void gala_request_visible_in_multitasking_view (struct wl_client* client,
                                                struct wl_resource* resource);
static void _gala_request_visible_in_multitasking_view_pantheon_desktop_request_visible_in_multitasking_view (struct wl_client* client,
                                                                                                       struct wl_resource* resource);
 G_GNUC_INTERNAL void gala_add_blur (struct wl_client* client,
                    struct wl_resource* resource,
                    guint left,
                    guint right,
                    guint top,
                    guint bottom,
                    guint clip_radius);
static void _gala_add_blur_pantheon_desktop_add_blur (struct wl_client* client,
                                               struct wl_resource* resource,
                                               guint left,
                                               guint right,
                                               guint top,
                                               guint bottom,
                                               guint clip_radius);
 G_GNUC_INTERNAL void gala_remove_blur (struct wl_client* client,
                       struct wl_resource* resource);
static void _gala_remove_blur_pantheon_desktop_remove_blur (struct wl_client* client,
                                                     struct wl_resource* resource);
 G_GNUC_INTERNAL void gala_destroy_widget_surface (struct wl_client* client,
                                  struct wl_resource* resource);
static void _gala_destroy_widget_surface_pantheon_desktop_destroy (struct wl_client* client,
                                                            struct wl_resource* resource);
 G_GNUC_INTERNAL void gala_destroy_extended_behavior_surface (struct wl_client* client,
                                             struct wl_resource* resource);
static void _gala_destroy_extended_behavior_surface_pantheon_desktop_destroy (struct wl_client* client,
                                                                       struct wl_resource* resource);
 G_GNUC_INTERNAL void gala_set_keep_above (struct wl_client* client,
                          struct wl_resource* resource);
static void _gala_set_keep_above_pantheon_desktop_set_keep_above (struct wl_client* client,
                                                           struct wl_resource* resource);
 G_GNUC_INTERNAL void gala_make_centered (struct wl_client* client,
                         struct wl_resource* resource);
static void _gala_make_centered_pantheon_desktop_make_centered (struct wl_client* client,
                                                         struct wl_resource* resource);
 G_GNUC_INTERNAL void gala_focus_extended_behavior (struct wl_client* client,
                                   struct wl_resource* resource);
static void _gala_focus_extended_behavior_pantheon_desktop_focus (struct wl_client* client,
                                                           struct wl_resource* resource);
 G_GNUC_INTERNAL void gala_make_modal (struct wl_client* client,
                      struct wl_resource* resource,
                      guint dim);
static void _gala_make_modal_pantheon_desktop_make_modal (struct wl_client* client,
                                                   struct wl_resource* resource,
                                                   guint dim);
static void __lambda176_ (struct wl_client* client,
                   guint32 version,
                   guint32 id);
static void __lambda177_ (struct wl_resource* res);
static void ___lambda177__wl_resource_destroy_func_t (struct wl_resource* resource);
static void ___lambda176__wl_global_bind_func_t (struct wl_client* client,
                                          gpointer self,
                                          guint32 version,
                                          guint32 id);
VALA_EXTERN GType gala_panel_surface_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (GalaPanelSurface, g_object_unref)
VALA_EXTERN GalaPanelSurface* gala_panel_surface_new (GObject* wayland_surface);
VALA_EXTERN GalaPanelSurface* gala_panel_surface_construct (GType object_type,
                                                GObject* wayland_surface);
VALA_EXTERN void gala_panel_surface_on_wayland_surface_disposed (GalaPanelSurface* self);
static void gala_panel_surface_finalize (GObject * obj);
static GType gala_panel_surface_get_type_once (void);
VALA_EXTERN GType gala_widget_surface_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (GalaWidgetSurface, g_object_unref)
VALA_EXTERN GalaWidgetSurface* gala_widget_surface_new (GObject* wayland_surface);
VALA_EXTERN GalaWidgetSurface* gala_widget_surface_construct (GType object_type,
                                                  GObject* wayland_surface);
VALA_EXTERN void gala_widget_surface_on_wayland_surface_disposed (GalaWidgetSurface* self);
static void gala_widget_surface_finalize (GObject * obj);
static GType gala_widget_surface_get_type_once (void);
VALA_EXTERN GType gala_extended_behavior_surface_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (GalaExtendedBehaviorSurface, g_object_unref)
VALA_EXTERN GalaExtendedBehaviorSurface* gala_extended_behavior_surface_new (GObject* wayland_surface);
VALA_EXTERN GalaExtendedBehaviorSurface* gala_extended_behavior_surface_construct (GType object_type,
                                                                       GObject* wayland_surface);
VALA_EXTERN void gala_extended_behavior_surface_on_wayland_surface_disposed (GalaExtendedBehaviorSurface* self);
static void gala_extended_behavior_surface_finalize (GObject * obj);
static GType gala_extended_behavior_surface_get_type_once (void);
 G_GNUC_INTERNAL void gala_unref_obj_on_destroy (struct wl_resource* resource);
static void _gala_unref_obj_on_destroy_wl_resource_destroy_func_t (struct wl_resource* resource);
VALA_EXTERN GType gala_shell_clients_manager_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (GalaShellClientsManager, g_object_unref)
VALA_EXTERN GalaShellClientsManager* gala_shell_clients_manager_get_instance (void);
VALA_EXTERN void gala_shell_clients_manager_set_anchor (GalaShellClientsManager* self,
                                            MetaWindow* window,
                                            enum io_elementary_pantheon_panel_v1_anchor anchor);
 G_GNUC_INTERNAL void gala_focus (GObject* wayland_surface);
VALA_EXTERN void gala_shell_clients_manager_set_size (GalaShellClientsManager* self,
                                          MetaWindow* window,
                                          gint width,
                                          gint height);
VALA_EXTERN void gala_shell_clients_manager_set_hide_mode (GalaShellClientsManager* self,
                                               MetaWindow* window,
                                               enum io_elementary_pantheon_panel_v1_hide_mode hide_mode);
VALA_EXTERN void gala_shell_clients_manager_request_visible_in_multitasking_view (GalaShellClientsManager* self,
                                                                      MetaWindow* window);
VALA_EXTERN GType gala_blur_manager_get_type (void) G_GNUC_CONST ;
G_DEFINE_AUTOPTR_CLEANUP_FUNC (GalaBlurManager, g_object_unref)
VALA_EXTERN GalaBlurManager* gala_blur_manager_get_instance (void);
VALA_EXTERN void gala_blur_manager_add_blur (GalaBlurManager* self,
                                 MetaWindow* window,
                                 guint left,
                                 guint right,
                                 guint top,
                                 guint bottom,
                                 guint clip_radius);
VALA_EXTERN void gala_blur_manager_remove_blur (GalaBlurManager* self,
                                    MetaWindow* window);
VALA_EXTERN void gala_shell_clients_manager_make_centered (GalaShellClientsManager* self,
                                               MetaWindow* window);
VALA_EXTERN void gala_shell_clients_manager_make_modal (GalaShellClientsManager* self,
                                            MetaWindow* window,
                                            gboolean dim);

inline struct wl_display*
gala_get_display_from_context (MetaContext* context)
{
	MetaWaylandCompositor* compositor = NULL;
	MetaWaylandCompositor* _tmp0_;
	MetaWaylandCompositor* _tmp1_;
	MetaWaylandCompositor* _tmp2_;
	void* _tmp3_;
	struct wl_display* result;
	g_return_val_if_fail (context != NULL, NULL);
	_tmp0_ = meta_context_get_wayland_compositor (context);
	compositor = _tmp0_;
	_tmp1_ = compositor;
	if (_tmp1_ == NULL) {
		result = NULL;
		return result;
	}
	_tmp2_ = compositor;
	_tmp3_ = meta_wayland_compositor_get_wayland_display (_tmp2_);
	result = (struct wl_display*) _tmp3_;
	return result;
}

static void
_gala_get_panel_pantheon_desktop_get_panel (struct wl_client* client,
                                            struct wl_resource* resource,
                                            guint32 output,
                                            struct wl_resource* surface)
{
	gala_get_panel (client, resource, output, surface);
}

static void
_gala_get_widget_pantheon_desktop_get_widget (struct wl_client* client,
                                              struct wl_resource* resource,
                                              guint32 output,
                                              struct wl_resource* surface)
{
	gala_get_widget (client, resource, output, surface);
}

static void
_gala_get_extended_behavior_pantheon_desktop_get_extended_behavior (struct wl_client* client,
                                                                    struct wl_resource* resource,
                                                                    guint32 output,
                                                                    struct wl_resource* surface)
{
	gala_get_extended_behavior (client, resource, output, surface);
}

static void
_gala_destroy_panel_surface_pantheon_desktop_destroy (struct wl_client* client,
                                                      struct wl_resource* resource)
{
	gala_destroy_panel_surface (client, resource);
}

static void
_gala_set_anchor_pantheon_desktop_set_anchor (struct wl_client* client,
                                              struct wl_resource* resource,
                                              uint32_t anchor)
{
	gala_set_anchor (client, resource, anchor);
}

static void
_gala_focus_panel_pantheon_desktop_focus (struct wl_client* client,
                                          struct wl_resource* resource)
{
	gala_focus_panel (client, resource);
}

static void
_gala_set_size_pantheon_desktop_set_size (struct wl_client* client,
                                          struct wl_resource* resource,
                                          gint width,
                                          gint height)
{
	gala_set_size (client, resource, width, height);
}

static void
_gala_set_hide_mode_pantheon_desktop_set_hide_mode (struct wl_client* client,
                                                    struct wl_resource* resource,
                                                    uint32_t hide_mode)
{
	gala_set_hide_mode (client, resource, hide_mode);
}

static void
_gala_request_visible_in_multitasking_view_pantheon_desktop_request_visible_in_multitasking_view (struct wl_client* client,
                                                                                                  struct wl_resource* resource)
{
	gala_request_visible_in_multitasking_view (client, resource);
}

static void
_gala_add_blur_pantheon_desktop_add_blur (struct wl_client* client,
                                          struct wl_resource* resource,
                                          guint left,
                                          guint right,
                                          guint top,
                                          guint bottom,
                                          guint clip_radius)
{
	gala_add_blur (client, resource, left, right, top, bottom, clip_radius);
}

static void
_gala_remove_blur_pantheon_desktop_remove_blur (struct wl_client* client,
                                                struct wl_resource* resource)
{
	gala_remove_blur (client, resource);
}

static void
_gala_destroy_widget_surface_pantheon_desktop_destroy (struct wl_client* client,
                                                       struct wl_resource* resource)
{
	gala_destroy_widget_surface (client, resource);
}

static void
_gala_destroy_extended_behavior_surface_pantheon_desktop_destroy (struct wl_client* client,
                                                                  struct wl_resource* resource)
{
	gala_destroy_extended_behavior_surface (client, resource);
}

static void
_gala_set_keep_above_pantheon_desktop_set_keep_above (struct wl_client* client,
                                                      struct wl_resource* resource)
{
	gala_set_keep_above (client, resource);
}

static void
_gala_make_centered_pantheon_desktop_make_centered (struct wl_client* client,
                                                    struct wl_resource* resource)
{
	gala_make_centered (client, resource);
}

static void
_gala_focus_extended_behavior_pantheon_desktop_focus (struct wl_client* client,
                                                      struct wl_resource* resource)
{
	gala_focus_extended_behavior (client, resource);
}

static void
_gala_make_modal_pantheon_desktop_make_modal (struct wl_client* client,
                                              struct wl_resource* resource,
                                              guint dim)
{
	gala_make_modal (client, resource, dim);
}

static void
__lambda177_ (struct wl_resource* res)
{
	g_return_if_fail (res != NULL);
}

static void
___lambda177__wl_resource_destroy_func_t (struct wl_resource* resource)
{
	__lambda177_ (resource);
}

static void
__lambda176_ (struct wl_client* client,
              guint32 version,
              guint32 id)
{
	struct wl_resource* resource = NULL;
	struct wl_resource* _tmp0_;
	g_return_if_fail (client != NULL);
	_tmp0_ = wl_resource_create (client, &io_elementary_pantheon_shell_v1_interface, (gint) version, id);
	resource = _tmp0_;
	wl_resource_set_implementation (resource, &gala_wayland_pantheon_shell_interface, NULL, ___lambda177__wl_resource_destroy_func_t);
}

static void
___lambda176__wl_global_bind_func_t (struct wl_client* client,
                                     gpointer self,
                                     guint32 version,
                                     guint32 id)
{
	__lambda176_ (client, version, id);
}

void
gala_init_pantheon_shell (MetaContext* context)
{
	struct wl_display* wl_disp = NULL;
	struct wl_display* _tmp0_;
	struct wl_display* _tmp1_;
	struct io_elementary_pantheon_shell_v1_interface _tmp2_ = {0};
	struct io_elementary_pantheon_panel_v1_interface _tmp3_ = {0};
	struct io_elementary_pantheon_widget_v1_interface _tmp4_ = {0};
	struct io_elementary_pantheon_extended_behavior_v1_interface _tmp5_ = {0};
	struct wl_display* _tmp6_;
	struct wl_global* _tmp7_;
	g_return_if_fail (context != NULL);
	_tmp0_ = gala_get_display_from_context (context);
	wl_disp = _tmp0_;
	_tmp1_ = wl_disp;
	if (_tmp1_ == NULL) {
		g_debug ("PantheonShell.vala:26: Not running under Wayland, no Pantheon Shell pr" \
"otocol");
		return;
	}
	_tmp2_.get_panel = _gala_get_panel_pantheon_desktop_get_panel;
	_tmp2_.get_widget = _gala_get_widget_pantheon_desktop_get_widget;
	_tmp2_.get_extended_behavior = _gala_get_extended_behavior_pantheon_desktop_get_extended_behavior;
	gala_wayland_pantheon_shell_interface = _tmp2_;
	_tmp3_.destroy = _gala_destroy_panel_surface_pantheon_desktop_destroy;
	_tmp3_.set_anchor = _gala_set_anchor_pantheon_desktop_set_anchor;
	_tmp3_.focus = _gala_focus_panel_pantheon_desktop_focus;
	_tmp3_.set_size = _gala_set_size_pantheon_desktop_set_size;
	_tmp3_.set_hide_mode = _gala_set_hide_mode_pantheon_desktop_set_hide_mode;
	_tmp3_.request_visible_in_multitasking_view = _gala_request_visible_in_multitasking_view_pantheon_desktop_request_visible_in_multitasking_view;
	_tmp3_.add_blur = _gala_add_blur_pantheon_desktop_add_blur;
	_tmp3_.remove_blur = _gala_remove_blur_pantheon_desktop_remove_blur;
	gala_wayland_pantheon_panel_interface = _tmp3_;
	_tmp4_.destroy = _gala_destroy_widget_surface_pantheon_desktop_destroy;
	gala_wayland_pantheon_widget_interface = _tmp4_;
	_tmp5_.destroy = _gala_destroy_extended_behavior_surface_pantheon_desktop_destroy;
	_tmp5_.set_keep_above = _gala_set_keep_above_pantheon_desktop_set_keep_above;
	_tmp5_.make_centered = _gala_make_centered_pantheon_desktop_make_centered;
	_tmp5_.focus = _gala_focus_extended_behavior_pantheon_desktop_focus;
	_tmp5_.make_modal = _gala_make_modal_pantheon_desktop_make_modal;
	gala_wayland_pantheon_extended_behavior_interface = _tmp5_;
	gala_panel_surface_quark = g_quark_from_string ("-gala-wayland-panel-surface-data");
	gala_widget_surface_quark = g_quark_from_string ("-gala-wayland-widget-surface-data");
	gala_extended_behavior_surface_quark = g_quark_from_string ("-gala-wayland-extended-behavior-surface-data");
	_tmp6_ = wl_disp;
	_tmp7_ = wl_global_create (_tmp6_, &io_elementary_pantheon_shell_v1_interface, 1, NULL, ___lambda176__wl_global_bind_func_t);
	_wl_global_destroy0 (gala_shell_global);
	gala_shell_global = _tmp7_;
}

GalaPanelSurface*
gala_panel_surface_construct (GType object_type,
                              GObject* wayland_surface)
{
	GalaPanelSurface * self = NULL;
	g_return_val_if_fail (wayland_surface != NULL, NULL);
	self = (GalaPanelSurface*) g_object_new (object_type, NULL);
	self->wayland_surface = wayland_surface;
	return self;
}

GalaPanelSurface*
gala_panel_surface_new (GObject* wayland_surface)
{
	return gala_panel_surface_construct (GALA_TYPE_PANEL_SURFACE, wayland_surface);
}

void
gala_panel_surface_on_wayland_surface_disposed (GalaPanelSurface* self)
{
	g_return_if_fail (self != NULL);
	self->wayland_surface = NULL;
}

static void
gala_panel_surface_class_init (GalaPanelSurfaceClass * klass,
                               gpointer klass_data)
{
	gala_panel_surface_parent_class = g_type_class_peek_parent (klass);
	G_OBJECT_CLASS (klass)->finalize = gala_panel_surface_finalize;
}

static void
gala_panel_surface_instance_init (GalaPanelSurface * self,
                                  gpointer klass)
{
}

static void
gala_panel_surface_finalize (GObject * obj)
{
	GalaPanelSurface * self;
	GObject* _tmp0_;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, GALA_TYPE_PANEL_SURFACE, GalaPanelSurface);
	_tmp0_ = self->wayland_surface;
	if (_tmp0_ != NULL) {
		GObject* _tmp1_;
		_tmp1_ = self->wayland_surface;
		g_object_steal_qdata (_tmp1_, gala_panel_surface_quark);
	}
	G_OBJECT_CLASS (gala_panel_surface_parent_class)->finalize (obj);
}

 G_GNUC_NO_INLINE static GType
gala_panel_surface_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (GalaPanelSurfaceClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) gala_panel_surface_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (GalaPanelSurface), 0, (GInstanceInitFunc) gala_panel_surface_instance_init, NULL };
	GType gala_panel_surface_type_id;
	gala_panel_surface_type_id = g_type_register_static (G_TYPE_OBJECT, "GalaPanelSurface", &g_define_type_info, 0);
	return gala_panel_surface_type_id;
}

GType
gala_panel_surface_get_type (void)
{
	static gsize gala_panel_surface_type_id__once = 0;
	if (g_once_init_enter (&gala_panel_surface_type_id__once)) {
		GType gala_panel_surface_type_id;
		gala_panel_surface_type_id = gala_panel_surface_get_type_once ();
		g_once_init_leave (&gala_panel_surface_type_id__once, gala_panel_surface_type_id);
	}
	return gala_panel_surface_type_id__once;
}

GalaWidgetSurface*
gala_widget_surface_construct (GType object_type,
                               GObject* wayland_surface)
{
	GalaWidgetSurface * self = NULL;
	g_return_val_if_fail (wayland_surface != NULL, NULL);
	self = (GalaWidgetSurface*) g_object_new (object_type, NULL);
	self->wayland_surface = wayland_surface;
	return self;
}

GalaWidgetSurface*
gala_widget_surface_new (GObject* wayland_surface)
{
	return gala_widget_surface_construct (GALA_TYPE_WIDGET_SURFACE, wayland_surface);
}

void
gala_widget_surface_on_wayland_surface_disposed (GalaWidgetSurface* self)
{
	g_return_if_fail (self != NULL);
	self->wayland_surface = NULL;
}

static void
gala_widget_surface_class_init (GalaWidgetSurfaceClass * klass,
                                gpointer klass_data)
{
	gala_widget_surface_parent_class = g_type_class_peek_parent (klass);
	G_OBJECT_CLASS (klass)->finalize = gala_widget_surface_finalize;
}

static void
gala_widget_surface_instance_init (GalaWidgetSurface * self,
                                   gpointer klass)
{
}

static void
gala_widget_surface_finalize (GObject * obj)
{
	GalaWidgetSurface * self;
	GObject* _tmp0_;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, GALA_TYPE_WIDGET_SURFACE, GalaWidgetSurface);
	_tmp0_ = self->wayland_surface;
	if (_tmp0_ != NULL) {
		GObject* _tmp1_;
		_tmp1_ = self->wayland_surface;
		g_object_steal_qdata (_tmp1_, gala_widget_surface_quark);
	}
	G_OBJECT_CLASS (gala_widget_surface_parent_class)->finalize (obj);
}

 G_GNUC_NO_INLINE static GType
gala_widget_surface_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (GalaWidgetSurfaceClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) gala_widget_surface_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (GalaWidgetSurface), 0, (GInstanceInitFunc) gala_widget_surface_instance_init, NULL };
	GType gala_widget_surface_type_id;
	gala_widget_surface_type_id = g_type_register_static (G_TYPE_OBJECT, "GalaWidgetSurface", &g_define_type_info, 0);
	return gala_widget_surface_type_id;
}

GType
gala_widget_surface_get_type (void)
{
	static gsize gala_widget_surface_type_id__once = 0;
	if (g_once_init_enter (&gala_widget_surface_type_id__once)) {
		GType gala_widget_surface_type_id;
		gala_widget_surface_type_id = gala_widget_surface_get_type_once ();
		g_once_init_leave (&gala_widget_surface_type_id__once, gala_widget_surface_type_id);
	}
	return gala_widget_surface_type_id__once;
}

GalaExtendedBehaviorSurface*
gala_extended_behavior_surface_construct (GType object_type,
                                          GObject* wayland_surface)
{
	GalaExtendedBehaviorSurface * self = NULL;
	g_return_val_if_fail (wayland_surface != NULL, NULL);
	self = (GalaExtendedBehaviorSurface*) g_object_new (object_type, NULL);
	self->wayland_surface = wayland_surface;
	return self;
}

GalaExtendedBehaviorSurface*
gala_extended_behavior_surface_new (GObject* wayland_surface)
{
	return gala_extended_behavior_surface_construct (GALA_TYPE_EXTENDED_BEHAVIOR_SURFACE, wayland_surface);
}

void
gala_extended_behavior_surface_on_wayland_surface_disposed (GalaExtendedBehaviorSurface* self)
{
	g_return_if_fail (self != NULL);
	self->wayland_surface = NULL;
}

static void
gala_extended_behavior_surface_class_init (GalaExtendedBehaviorSurfaceClass * klass,
                                           gpointer klass_data)
{
	gala_extended_behavior_surface_parent_class = g_type_class_peek_parent (klass);
	G_OBJECT_CLASS (klass)->finalize = gala_extended_behavior_surface_finalize;
}

static void
gala_extended_behavior_surface_instance_init (GalaExtendedBehaviorSurface * self,
                                              gpointer klass)
{
}

static void
gala_extended_behavior_surface_finalize (GObject * obj)
{
	GalaExtendedBehaviorSurface * self;
	GObject* _tmp0_;
	self = G_TYPE_CHECK_INSTANCE_CAST (obj, GALA_TYPE_EXTENDED_BEHAVIOR_SURFACE, GalaExtendedBehaviorSurface);
	_tmp0_ = self->wayland_surface;
	if (_tmp0_ != NULL) {
		GObject* _tmp1_;
		_tmp1_ = self->wayland_surface;
		g_object_steal_qdata (_tmp1_, gala_extended_behavior_surface_quark);
	}
	G_OBJECT_CLASS (gala_extended_behavior_surface_parent_class)->finalize (obj);
}

 G_GNUC_NO_INLINE static GType
gala_extended_behavior_surface_get_type_once (void)
{
	static const GTypeInfo g_define_type_info = { sizeof (GalaExtendedBehaviorSurfaceClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) gala_extended_behavior_surface_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (GalaExtendedBehaviorSurface), 0, (GInstanceInitFunc) gala_extended_behavior_surface_instance_init, NULL };
	GType gala_extended_behavior_surface_type_id;
	gala_extended_behavior_surface_type_id = g_type_register_static (G_TYPE_OBJECT, "GalaExtendedBehaviorSurface", &g_define_type_info, 0);
	return gala_extended_behavior_surface_type_id;
}

GType
gala_extended_behavior_surface_get_type (void)
{
	static gsize gala_extended_behavior_surface_type_id__once = 0;
	if (g_once_init_enter (&gala_extended_behavior_surface_type_id__once)) {
		GType gala_extended_behavior_surface_type_id;
		gala_extended_behavior_surface_type_id = gala_extended_behavior_surface_get_type_once ();
		g_once_init_leave (&gala_extended_behavior_surface_type_id__once, gala_extended_behavior_surface_type_id);
	}
	return gala_extended_behavior_surface_type_id__once;
}

 G_GNUC_INTERNAL void
gala_unref_obj_on_destroy (struct wl_resource* resource)
{
	gconstpointer _tmp0_;
	g_return_if_fail (resource != NULL);
	_tmp0_ = wl_resource_get_user_data (resource);
	g_object_unref ((GObject*) _tmp0_);
}

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

static void
_gala_unref_obj_on_destroy_wl_resource_destroy_func_t (struct wl_resource* resource)
{
	gala_unref_obj_on_destroy (resource);
}

 G_GNUC_INTERNAL void
gala_get_panel (struct wl_client* client,
                struct wl_resource* resource,
                guint32 output,
                struct wl_resource* surface_resource)
{
	GObject* wayland_surface = NULL;
	gconstpointer _tmp0_;
	GalaPanelSurface* panel_surface = NULL;
	GObject* _tmp1_;
	gconstpointer _tmp2_;
	GalaPanelSurface* _tmp3_;
	GalaPanelSurface* _tmp4_;
	GObject* _tmp5_;
	GalaPanelSurface* _tmp6_;
	struct wl_resource* panel_resource = NULL;
	struct wl_resource* _tmp7_;
	struct wl_resource* _tmp8_;
	GalaPanelSurface* _tmp9_;
	GObject* _tmp10_;
	GObject* _tmp11_;
	GalaPanelSurface* _tmp12_;
	g_return_if_fail (client != NULL);
	g_return_if_fail (resource != NULL);
	g_return_if_fail (surface_resource != NULL);
	_tmp0_ = wl_resource_get_user_data (surface_resource);
	wayland_surface = (GObject*) _tmp0_;
	_tmp1_ = wayland_surface;
	_tmp2_ = g_object_get_qdata (_tmp1_, gala_panel_surface_quark);
	_tmp3_ = _g_object_ref0 ((GalaPanelSurface*) _tmp2_);
	panel_surface = _tmp3_;
	_tmp4_ = panel_surface;
	if (_tmp4_ != NULL) {
		wl_resource_post_error (surface_resource, (guint32) WL_DISPLAY_ERROR_INVALID_OBJECT, "io_elementary_pantheon_shell_v1_interface::get_panel already requested");
		_g_object_unref0 (panel_surface);
		return;
	}
	_tmp5_ = wayland_surface;
	_tmp6_ = gala_panel_surface_new (_tmp5_);
	_g_object_unref0 (panel_surface);
	panel_surface = _tmp6_;
	_tmp7_ = wl_resource_create (client, &io_elementary_pantheon_panel_v1_interface, wl_resource_get_version (resource), output);
	panel_resource = _tmp7_;
	_tmp8_ = panel_resource;
	_tmp9_ = panel_surface;
	_tmp10_ = g_object_ref ((GObject*) _tmp9_);
	wl_resource_set_implementation (_tmp8_, &gala_wayland_pantheon_panel_interface, _tmp10_, _gala_unref_obj_on_destroy_wl_resource_destroy_func_t);
	_tmp11_ = wayland_surface;
	_tmp12_ = panel_surface;
	g_object_set_qdata_full (_tmp11_, gala_panel_surface_quark, _tmp12_, (GDestroyNotify) gala_panel_surface_on_wayland_surface_disposed);
	_g_object_unref0 (panel_surface);
}

 G_GNUC_INTERNAL void
gala_get_widget (struct wl_client* client,
                 struct wl_resource* resource,
                 guint32 output,
                 struct wl_resource* surface_resource)
{
	GObject* wayland_surface = NULL;
	gconstpointer _tmp0_;
	GalaWidgetSurface* widget_surface = NULL;
	GObject* _tmp1_;
	gconstpointer _tmp2_;
	GalaWidgetSurface* _tmp3_;
	GalaWidgetSurface* _tmp4_;
	GObject* _tmp5_;
	GalaWidgetSurface* _tmp6_;
	struct wl_resource* widget_resource = NULL;
	struct wl_resource* _tmp7_;
	struct wl_resource* _tmp8_;
	GalaWidgetSurface* _tmp9_;
	GObject* _tmp10_;
	GObject* _tmp11_;
	GalaWidgetSurface* _tmp12_;
	g_return_if_fail (client != NULL);
	g_return_if_fail (resource != NULL);
	g_return_if_fail (surface_resource != NULL);
	_tmp0_ = wl_resource_get_user_data (surface_resource);
	wayland_surface = (GObject*) _tmp0_;
	_tmp1_ = wayland_surface;
	_tmp2_ = g_object_get_qdata (_tmp1_, gala_widget_surface_quark);
	_tmp3_ = _g_object_ref0 ((GalaWidgetSurface*) _tmp2_);
	widget_surface = _tmp3_;
	_tmp4_ = widget_surface;
	if (_tmp4_ != NULL) {
		wl_resource_post_error (surface_resource, (guint32) WL_DISPLAY_ERROR_INVALID_OBJECT, "io_elementary_pantheon_shell_v1_interface::get_widget already requeste" \
"d");
		_g_object_unref0 (widget_surface);
		return;
	}
	_tmp5_ = wayland_surface;
	_tmp6_ = gala_widget_surface_new (_tmp5_);
	_g_object_unref0 (widget_surface);
	widget_surface = _tmp6_;
	_tmp7_ = wl_resource_create (client, &io_elementary_pantheon_widget_v1_interface, wl_resource_get_version (resource), output);
	widget_resource = _tmp7_;
	_tmp8_ = widget_resource;
	_tmp9_ = widget_surface;
	_tmp10_ = g_object_ref ((GObject*) _tmp9_);
	wl_resource_set_implementation (_tmp8_, &gala_wayland_pantheon_widget_interface, _tmp10_, _gala_unref_obj_on_destroy_wl_resource_destroy_func_t);
	_tmp11_ = wayland_surface;
	_tmp12_ = widget_surface;
	g_object_set_qdata_full (_tmp11_, gala_widget_surface_quark, _tmp12_, (GDestroyNotify) gala_widget_surface_on_wayland_surface_disposed);
	_g_object_unref0 (widget_surface);
}

 G_GNUC_INTERNAL void
gala_get_extended_behavior (struct wl_client* client,
                            struct wl_resource* resource,
                            guint32 output,
                            struct wl_resource* surface_resource)
{
	GObject* wayland_surface = NULL;
	gconstpointer _tmp0_;
	GalaExtendedBehaviorSurface* eb_surface = NULL;
	GObject* _tmp1_;
	gconstpointer _tmp2_;
	GalaExtendedBehaviorSurface* _tmp3_;
	GalaExtendedBehaviorSurface* _tmp4_;
	GObject* _tmp5_;
	GalaExtendedBehaviorSurface* _tmp6_;
	struct wl_resource* eb_resource = NULL;
	struct wl_resource* _tmp7_;
	struct wl_resource* _tmp8_;
	GalaExtendedBehaviorSurface* _tmp9_;
	GObject* _tmp10_;
	GObject* _tmp11_;
	GalaExtendedBehaviorSurface* _tmp12_;
	g_return_if_fail (client != NULL);
	g_return_if_fail (resource != NULL);
	g_return_if_fail (surface_resource != NULL);
	_tmp0_ = wl_resource_get_user_data (surface_resource);
	wayland_surface = (GObject*) _tmp0_;
	_tmp1_ = wayland_surface;
	_tmp2_ = g_object_get_qdata (_tmp1_, gala_extended_behavior_surface_quark);
	_tmp3_ = _g_object_ref0 ((GalaExtendedBehaviorSurface*) _tmp2_);
	eb_surface = _tmp3_;
	_tmp4_ = eb_surface;
	if (_tmp4_ != NULL) {
		wl_resource_post_error (surface_resource, (guint32) WL_DISPLAY_ERROR_INVALID_OBJECT, "io_elementary_pantheon_shell_v1_interface::get_extended_behavior alrea" \
"dy requested");
		_g_object_unref0 (eb_surface);
		return;
	}
	_tmp5_ = wayland_surface;
	_tmp6_ = gala_extended_behavior_surface_new (_tmp5_);
	_g_object_unref0 (eb_surface);
	eb_surface = _tmp6_;
	_tmp7_ = wl_resource_create (client, &io_elementary_pantheon_extended_behavior_v1_interface, wl_resource_get_version (resource), output);
	eb_resource = _tmp7_;
	_tmp8_ = eb_resource;
	_tmp9_ = eb_surface;
	_tmp10_ = g_object_ref ((GObject*) _tmp9_);
	wl_resource_set_implementation (_tmp8_, &gala_wayland_pantheon_extended_behavior_interface, _tmp10_, _gala_unref_obj_on_destroy_wl_resource_destroy_func_t);
	_tmp11_ = wayland_surface;
	_tmp12_ = eb_surface;
	g_object_set_qdata_full (_tmp11_, gala_extended_behavior_surface_quark, _tmp12_, (GDestroyNotify) gala_extended_behavior_surface_on_wayland_surface_disposed);
	_g_object_unref0 (eb_surface);
}

 G_GNUC_INTERNAL void
gala_set_anchor (struct wl_client* client,
                 struct wl_resource* resource,
                 uint32_t anchor)
{
	GalaPanelSurface* panel_surface = NULL;
	gconstpointer _tmp0_;
	GalaPanelSurface* _tmp1_;
	GObject* _tmp2_;
	MetaWindow* window = NULL;
	GalaPanelSurface* _tmp3_;
	GObject* _tmp4_;
	MetaWindow* _tmp5_ = NULL;
	MetaWindow* _tmp6_;
	GalaShellClientsManager* _tmp7_;
	MetaWindow* _tmp8_;
	g_return_if_fail (client != NULL);
	g_return_if_fail (resource != NULL);
	_tmp0_ = wl_resource_get_user_data (resource);
	panel_surface = (GalaPanelSurface*) _tmp0_;
	_tmp1_ = panel_surface;
	_tmp2_ = _tmp1_->wayland_surface;
	if (_tmp2_ == NULL) {
		g_warning ("PantheonShell.vala:220: Window tried to set anchor but wayland surface" \
" is null.");
		return;
	}
	_tmp3_ = panel_surface;
	_tmp4_ = _tmp3_->wayland_surface;
	g_object_get (_tmp4_, "window", &_tmp5_, NULL, NULL);
	_g_object_unref0 (window);
	window = _tmp5_;
	_tmp6_ = window;
	if (_tmp6_ == NULL) {
		g_warning ("PantheonShell.vala:227: Window tried to set anchor but wayland surface" \
" had no associated window.");
		_g_object_unref0 (window);
		return;
	}
	_tmp7_ = gala_shell_clients_manager_get_instance ();
	_tmp8_ = window;
	gala_shell_clients_manager_set_anchor (_tmp7_, _tmp8_, anchor);
	_g_object_unref0 (window);
}

 G_GNUC_INTERNAL void
gala_focus_panel (struct wl_client* client,
                  struct wl_resource* resource)
{
	GalaPanelSurface* panel_surface = NULL;
	gconstpointer _tmp0_;
	GalaPanelSurface* _tmp1_;
	GObject* _tmp2_;
	GalaPanelSurface* _tmp3_;
	GObject* _tmp4_;
	g_return_if_fail (client != NULL);
	g_return_if_fail (resource != NULL);
	_tmp0_ = wl_resource_get_user_data (resource);
	panel_surface = (GalaPanelSurface*) _tmp0_;
	_tmp1_ = panel_surface;
	_tmp2_ = _tmp1_->wayland_surface;
	if (_tmp2_ == NULL) {
		g_warning ("PantheonShell.vala:237: Window tried to focus but wayland surface is n" \
"ull.");
		return;
	}
	_tmp3_ = panel_surface;
	_tmp4_ = _tmp3_->wayland_surface;
	gala_focus (_tmp4_);
}

 G_GNUC_INTERNAL void
gala_focus_extended_behavior (struct wl_client* client,
                              struct wl_resource* resource)
{
	GalaExtendedBehaviorSurface* extended_behavior_surface = NULL;
	gconstpointer _tmp0_;
	GalaExtendedBehaviorSurface* _tmp1_;
	GObject* _tmp2_;
	GalaExtendedBehaviorSurface* _tmp3_;
	GObject* _tmp4_;
	g_return_if_fail (client != NULL);
	g_return_if_fail (resource != NULL);
	_tmp0_ = wl_resource_get_user_data (resource);
	extended_behavior_surface = (GalaExtendedBehaviorSurface*) _tmp0_;
	_tmp1_ = extended_behavior_surface;
	_tmp2_ = _tmp1_->wayland_surface;
	if (_tmp2_ == NULL) {
		g_warning ("PantheonShell.vala:247: Window tried to focus but wayland surface is n" \
"ull.");
		return;
	}
	_tmp3_ = extended_behavior_surface;
	_tmp4_ = _tmp3_->wayland_surface;
	gala_focus (_tmp4_);
}

 G_GNUC_INTERNAL void
gala_focus (GObject* wayland_surface)
{
	MetaWindow* window = NULL;
	MetaWindow* _tmp0_ = NULL;
	MetaWindow* _tmp1_;
	MetaWindow* _tmp2_;
	MetaWindow* _tmp3_;
	MetaDisplay* _tmp4_;
	g_return_if_fail (wayland_surface != NULL);
	g_object_get (wayland_surface, "window", &_tmp0_, NULL, NULL);
	_g_object_unref0 (window);
	window = _tmp0_;
	_tmp1_ = window;
	if (_tmp1_ == NULL) {
		g_warning ("PantheonShell.vala:258: Window tried to focus but wayland surface had " \
"no associated window.");
		_g_object_unref0 (window);
		return;
	}
	_tmp2_ = window;
	_tmp3_ = window;
	_tmp4_ = meta_window_get_display (_tmp3_);
	meta_window_focus (_tmp2_, meta_display_get_current_time (_tmp4_));
	_g_object_unref0 (window);
}

 G_GNUC_INTERNAL void
gala_set_size (struct wl_client* client,
               struct wl_resource* resource,
               gint width,
               gint height)
{
	GalaPanelSurface* panel_surface = NULL;
	gconstpointer _tmp0_;
	GalaPanelSurface* _tmp1_;
	GObject* _tmp2_;
	MetaWindow* window = NULL;
	GalaPanelSurface* _tmp3_;
	GObject* _tmp4_;
	MetaWindow* _tmp5_ = NULL;
	MetaWindow* _tmp6_;
	GalaShellClientsManager* _tmp7_;
	MetaWindow* _tmp8_;
	g_return_if_fail (client != NULL);
	g_return_if_fail (resource != NULL);
	_tmp0_ = wl_resource_get_user_data (resource);
	panel_surface = (GalaPanelSurface*) _tmp0_;
	_tmp1_ = panel_surface;
	_tmp2_ = _tmp1_->wayland_surface;
	if (_tmp2_ == NULL) {
		g_warning ("PantheonShell.vala:268: Window tried to set size but wayland surface i" \
"s null.");
		return;
	}
	_tmp3_ = panel_surface;
	_tmp4_ = _tmp3_->wayland_surface;
	g_object_get (_tmp4_, "window", &_tmp5_, NULL, NULL);
	_g_object_unref0 (window);
	window = _tmp5_;
	_tmp6_ = window;
	if (_tmp6_ == NULL) {
		g_warning ("PantheonShell.vala:275: Window tried to set size but wayland surface h" \
"ad no associated window.");
		_g_object_unref0 (window);
		return;
	}
	_tmp7_ = gala_shell_clients_manager_get_instance ();
	_tmp8_ = window;
	gala_shell_clients_manager_set_size (_tmp7_, _tmp8_, width, height);
	_g_object_unref0 (window);
}

 G_GNUC_INTERNAL void
gala_set_hide_mode (struct wl_client* client,
                    struct wl_resource* resource,
                    uint32_t hide_mode)
{
	GalaPanelSurface* panel_surface = NULL;
	gconstpointer _tmp0_;
	GalaPanelSurface* _tmp1_;
	GObject* _tmp2_;
	MetaWindow* window = NULL;
	GalaPanelSurface* _tmp3_;
	GObject* _tmp4_;
	MetaWindow* _tmp5_ = NULL;
	MetaWindow* _tmp6_;
	GalaShellClientsManager* _tmp7_;
	MetaWindow* _tmp8_;
	g_return_if_fail (client != NULL);
	g_return_if_fail (resource != NULL);
	_tmp0_ = wl_resource_get_user_data (resource);
	panel_surface = (GalaPanelSurface*) _tmp0_;
	_tmp1_ = panel_surface;
	_tmp2_ = _tmp1_->wayland_surface;
	if (_tmp2_ == NULL) {
		g_warning ("PantheonShell.vala:285: Window tried to set hide mode but wayland surf" \
"ace is null.");
		return;
	}
	_tmp3_ = panel_surface;
	_tmp4_ = _tmp3_->wayland_surface;
	g_object_get (_tmp4_, "window", &_tmp5_, NULL, NULL);
	_g_object_unref0 (window);
	window = _tmp5_;
	_tmp6_ = window;
	if (_tmp6_ == NULL) {
		g_warning ("PantheonShell.vala:292: Window tried to set hide mode but wayland surf" \
"ace had no associated window.");
		_g_object_unref0 (window);
		return;
	}
	_tmp7_ = gala_shell_clients_manager_get_instance ();
	_tmp8_ = window;
	gala_shell_clients_manager_set_hide_mode (_tmp7_, _tmp8_, hide_mode);
	_g_object_unref0 (window);
}

 G_GNUC_INTERNAL void
gala_request_visible_in_multitasking_view (struct wl_client* client,
                                           struct wl_resource* resource)
{
	GalaPanelSurface* panel_surface = NULL;
	gconstpointer _tmp0_;
	GalaPanelSurface* _tmp1_;
	GObject* _tmp2_;
	MetaWindow* window = NULL;
	GalaPanelSurface* _tmp3_;
	GObject* _tmp4_;
	MetaWindow* _tmp5_ = NULL;
	MetaWindow* _tmp6_;
	GalaShellClientsManager* _tmp7_;
	MetaWindow* _tmp8_;
	g_return_if_fail (client != NULL);
	g_return_if_fail (resource != NULL);
	_tmp0_ = wl_resource_get_user_data (resource);
	panel_surface = (GalaPanelSurface*) _tmp0_;
	_tmp1_ = panel_surface;
	_tmp2_ = _tmp1_->wayland_surface;
	if (_tmp2_ == NULL) {
		g_warning ("PantheonShell.vala:302: Window tried to set visible in multitasking vi" \
"ew but wayland surface is null.");
		return;
	}
	_tmp3_ = panel_surface;
	_tmp4_ = _tmp3_->wayland_surface;
	g_object_get (_tmp4_, "window", &_tmp5_, NULL, NULL);
	_g_object_unref0 (window);
	window = _tmp5_;
	_tmp6_ = window;
	if (_tmp6_ == NULL) {
		g_warning ("PantheonShell.vala:309: Window tried to set visible in multitasking vi" \
"ew but wayland surface had no associated window.");
		_g_object_unref0 (window);
		return;
	}
	_tmp7_ = gala_shell_clients_manager_get_instance ();
	_tmp8_ = window;
	gala_shell_clients_manager_request_visible_in_multitasking_view (_tmp7_, _tmp8_);
	_g_object_unref0 (window);
}

 G_GNUC_INTERNAL void
gala_add_blur (struct wl_client* client,
               struct wl_resource* resource,
               guint left,
               guint right,
               guint top,
               guint bottom,
               guint clip_radius)
{
	GalaPanelSurface* panel_surface = NULL;
	gconstpointer _tmp0_;
	GalaPanelSurface* _tmp1_;
	GObject* _tmp2_;
	MetaWindow* window = NULL;
	GalaPanelSurface* _tmp3_;
	GObject* _tmp4_;
	MetaWindow* _tmp5_ = NULL;
	MetaWindow* _tmp6_;
	GalaBlurManager* _tmp7_;
	MetaWindow* _tmp8_;
	g_return_if_fail (client != NULL);
	g_return_if_fail (resource != NULL);
	_tmp0_ = wl_resource_get_user_data (resource);
	panel_surface = (GalaPanelSurface*) _tmp0_;
	_tmp1_ = panel_surface;
	_tmp2_ = _tmp1_->wayland_surface;
	if (_tmp2_ == NULL) {
		g_warning ("PantheonShell.vala:319: Window tried to set blur region but wayland su" \
"rface is null.");
		return;
	}
	_tmp3_ = panel_surface;
	_tmp4_ = _tmp3_->wayland_surface;
	g_object_get (_tmp4_, "window", &_tmp5_, NULL, NULL);
	_g_object_unref0 (window);
	window = _tmp5_;
	_tmp6_ = window;
	if (_tmp6_ == NULL) {
		g_warning ("PantheonShell.vala:326: Window tried to set blur region but wayland su" \
"rface had no associated window.");
		_g_object_unref0 (window);
		return;
	}
	_tmp7_ = gala_blur_manager_get_instance ();
	_tmp8_ = window;
	gala_blur_manager_add_blur (_tmp7_, _tmp8_, left, right, top, bottom, clip_radius);
	_g_object_unref0 (window);
}

 G_GNUC_INTERNAL void
gala_remove_blur (struct wl_client* client,
                  struct wl_resource* resource)
{
	GalaPanelSurface* panel_surface = NULL;
	gconstpointer _tmp0_;
	GalaPanelSurface* _tmp1_;
	GObject* _tmp2_;
	MetaWindow* window = NULL;
	GalaPanelSurface* _tmp3_;
	GObject* _tmp4_;
	MetaWindow* _tmp5_ = NULL;
	MetaWindow* _tmp6_;
	GalaBlurManager* _tmp7_;
	MetaWindow* _tmp8_;
	g_return_if_fail (client != NULL);
	g_return_if_fail (resource != NULL);
	_tmp0_ = wl_resource_get_user_data (resource);
	panel_surface = (GalaPanelSurface*) _tmp0_;
	_tmp1_ = panel_surface;
	_tmp2_ = _tmp1_->wayland_surface;
	if (_tmp2_ == NULL) {
		g_warning ("PantheonShell.vala:336: Window tried to remove blur but wayland surfac" \
"e is null.");
		return;
	}
	_tmp3_ = panel_surface;
	_tmp4_ = _tmp3_->wayland_surface;
	g_object_get (_tmp4_, "window", &_tmp5_, NULL, NULL);
	_g_object_unref0 (window);
	window = _tmp5_;
	_tmp6_ = window;
	if (_tmp6_ == NULL) {
		g_warning ("PantheonShell.vala:343: Window tried to remove blur but wayland surfac" \
"e had no associated window.");
		_g_object_unref0 (window);
		return;
	}
	_tmp7_ = gala_blur_manager_get_instance ();
	_tmp8_ = window;
	gala_blur_manager_remove_blur (_tmp7_, _tmp8_);
	_g_object_unref0 (window);
}

 G_GNUC_INTERNAL void
gala_set_keep_above (struct wl_client* client,
                     struct wl_resource* resource)
{
	GalaExtendedBehaviorSurface* eb_surface = NULL;
	gconstpointer _tmp0_;
	GalaExtendedBehaviorSurface* _tmp1_;
	GObject* _tmp2_;
	MetaWindow* window = NULL;
	GalaExtendedBehaviorSurface* _tmp3_;
	GObject* _tmp4_;
	MetaWindow* _tmp5_ = NULL;
	MetaWindow* _tmp6_;
	MetaWindow* _tmp7_;
	g_return_if_fail (client != NULL);
	g_return_if_fail (resource != NULL);
	_tmp0_ = wl_resource_get_user_data (resource);
	eb_surface = (GalaExtendedBehaviorSurface*) _tmp0_;
	_tmp1_ = eb_surface;
	_tmp2_ = _tmp1_->wayland_surface;
	if (_tmp2_ == NULL) {
		return;
	}
	_tmp3_ = eb_surface;
	_tmp4_ = _tmp3_->wayland_surface;
	g_object_get (_tmp4_, "window", &_tmp5_, NULL, NULL);
	_g_object_unref0 (window);
	window = _tmp5_;
	_tmp6_ = window;
	if (_tmp6_ == NULL) {
		_g_object_unref0 (window);
		return;
	}
	_tmp7_ = window;
	meta_window_make_above (_tmp7_);
	_g_object_unref0 (window);
}

 G_GNUC_INTERNAL void
gala_make_centered (struct wl_client* client,
                    struct wl_resource* resource)
{
	GalaExtendedBehaviorSurface* eb_surface = NULL;
	gconstpointer _tmp0_;
	GalaExtendedBehaviorSurface* _tmp1_;
	GObject* _tmp2_;
	MetaWindow* window = NULL;
	GalaExtendedBehaviorSurface* _tmp3_;
	GObject* _tmp4_;
	MetaWindow* _tmp5_ = NULL;
	MetaWindow* _tmp6_;
	GalaShellClientsManager* _tmp7_;
	MetaWindow* _tmp8_;
	g_return_if_fail (client != NULL);
	g_return_if_fail (resource != NULL);
	_tmp0_ = wl_resource_get_user_data (resource);
	eb_surface = (GalaExtendedBehaviorSurface*) _tmp0_;
	_tmp1_ = eb_surface;
	_tmp2_ = _tmp1_->wayland_surface;
	if (_tmp2_ == NULL) {
		return;
	}
	_tmp3_ = eb_surface;
	_tmp4_ = _tmp3_->wayland_surface;
	g_object_get (_tmp4_, "window", &_tmp5_, NULL, NULL);
	_g_object_unref0 (window);
	window = _tmp5_;
	_tmp6_ = window;
	if (_tmp6_ == NULL) {
		_g_object_unref0 (window);
		return;
	}
	_tmp7_ = gala_shell_clients_manager_get_instance ();
	_tmp8_ = window;
	gala_shell_clients_manager_make_centered (_tmp7_, _tmp8_);
	_g_object_unref0 (window);
}

 G_GNUC_INTERNAL void
gala_make_modal (struct wl_client* client,
                 struct wl_resource* resource,
                 guint dim)
{
	GalaExtendedBehaviorSurface* eb_surface = NULL;
	gconstpointer _tmp0_;
	GalaExtendedBehaviorSurface* _tmp1_;
	GObject* _tmp2_;
	MetaWindow* window = NULL;
	GalaExtendedBehaviorSurface* _tmp3_;
	GObject* _tmp4_;
	MetaWindow* _tmp5_ = NULL;
	MetaWindow* _tmp6_;
	GalaShellClientsManager* _tmp7_;
	MetaWindow* _tmp8_;
	g_return_if_fail (client != NULL);
	g_return_if_fail (resource != NULL);
	_tmp0_ = wl_resource_get_user_data (resource);
	eb_surface = (GalaExtendedBehaviorSurface*) _tmp0_;
	_tmp1_ = eb_surface;
	_tmp2_ = _tmp1_->wayland_surface;
	if (_tmp2_ == NULL) {
		return;
	}
	_tmp3_ = eb_surface;
	_tmp4_ = _tmp3_->wayland_surface;
	g_object_get (_tmp4_, "window", &_tmp5_, NULL, NULL);
	_g_object_unref0 (window);
	window = _tmp5_;
	_tmp6_ = window;
	if (_tmp6_ == NULL) {
		_g_object_unref0 (window);
		return;
	}
	_tmp7_ = gala_shell_clients_manager_get_instance ();
	_tmp8_ = window;
	gala_shell_clients_manager_make_modal (_tmp7_, _tmp8_, dim == ((guint) 1));
	_g_object_unref0 (window);
}

 G_GNUC_INTERNAL void
gala_destroy_panel_surface (struct wl_client* client,
                            struct wl_resource* resource)
{
	g_return_if_fail (client != NULL);
	g_return_if_fail (resource != NULL);
	wl_resource_destroy (resource);
}

 G_GNUC_INTERNAL void
gala_destroy_widget_surface (struct wl_client* client,
                             struct wl_resource* resource)
{
	g_return_if_fail (client != NULL);
	g_return_if_fail (resource != NULL);
	wl_resource_destroy (resource);
}

 G_GNUC_INTERNAL void
gala_destroy_extended_behavior_surface (struct wl_client* client,
                                        struct wl_resource* resource)
{
	g_return_if_fail (client != NULL);
	g_return_if_fail (resource != NULL);
	wl_resource_destroy (resource);
}

