Logo Search packages:      
Sourcecode: unity version File versions  Download package

cairo-drawing.c

/* cairo-drawing.c generated by valac, the Vala compiler
 * generated from cairo-drawing.vala, do not modify */

/*
 * Copyright (C) 2009 Canonical Ltd
 *
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License version 3 as
 * published by the Free Software Foundation.
 *
 * This program 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 this program.  If not, see <http://www.gnu.org/licenses/>.
 *
 * Authored by Jay Taoko <jay.taoko@canonical.com>
 *
 */

#include <glib.h>
#include <glib-object.h>
#include <clutk/clutk.h>
#include <clutter/clutter.h>
#include <cairo.h>
#include <float.h>
#include <math.h>
#include <string.h>


#define UNITY_PLACES_CAIRO_DRAWING_TYPE_PLACES_BACKGROUND (unity_places_cairo_drawing_places_background_get_type ())
#define UNITY_PLACES_CAIRO_DRAWING_PLACES_BACKGROUND(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), UNITY_PLACES_CAIRO_DRAWING_TYPE_PLACES_BACKGROUND, UnityPlacesCairoDrawingPlacesBackground))
#define UNITY_PLACES_CAIRO_DRAWING_PLACES_BACKGROUND_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), UNITY_PLACES_CAIRO_DRAWING_TYPE_PLACES_BACKGROUND, UnityPlacesCairoDrawingPlacesBackgroundClass))
#define UNITY_PLACES_CAIRO_DRAWING_IS_PLACES_BACKGROUND(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), UNITY_PLACES_CAIRO_DRAWING_TYPE_PLACES_BACKGROUND))
#define UNITY_PLACES_CAIRO_DRAWING_IS_PLACES_BACKGROUND_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), UNITY_PLACES_CAIRO_DRAWING_TYPE_PLACES_BACKGROUND))
#define UNITY_PLACES_CAIRO_DRAWING_PLACES_BACKGROUND_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), UNITY_PLACES_CAIRO_DRAWING_TYPE_PLACES_BACKGROUND, UnityPlacesCairoDrawingPlacesBackgroundClass))

typedef struct _UnityPlacesCairoDrawingPlacesBackground UnityPlacesCairoDrawingPlacesBackground;
typedef struct _UnityPlacesCairoDrawingPlacesBackgroundClass UnityPlacesCairoDrawingPlacesBackgroundClass;
typedef struct _UnityPlacesCairoDrawingPlacesBackgroundPrivate UnityPlacesCairoDrawingPlacesBackgroundPrivate;
#define _g_object_unref0(var) ((var == NULL) ? NULL : (var = (g_object_unref (var), NULL)))

#define UNITY_PLACES_CAIRO_DRAWING_PLACES_BACKGROUND_TYPE_TAB_RECT (unity_places_cairo_drawing_places_background_tab_rect_get_type ())
typedef struct _UnityPlacesCairoDrawingPlacesBackgroundTabRect UnityPlacesCairoDrawingPlacesBackgroundTabRect;
#define _cairo_surface_destroy0(var) ((var == NULL) ? NULL : (var = (cairo_surface_destroy (var), NULL)))
#define _cairo_pattern_destroy0(var) ((var == NULL) ? NULL : (var = (cairo_pattern_destroy (var), NULL)))
#define _cairo_destroy0(var) ((var == NULL) ? NULL : (var = (cairo_destroy (var), NULL)))

#define UNITY_PLACES_CAIRO_DRAWING_TYPE_PLACES_VSEPARATOR (unity_places_cairo_drawing_places_vseparator_get_type ())
#define UNITY_PLACES_CAIRO_DRAWING_PLACES_VSEPARATOR(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), UNITY_PLACES_CAIRO_DRAWING_TYPE_PLACES_VSEPARATOR, UnityPlacesCairoDrawingPlacesVSeparator))
#define UNITY_PLACES_CAIRO_DRAWING_PLACES_VSEPARATOR_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), UNITY_PLACES_CAIRO_DRAWING_TYPE_PLACES_VSEPARATOR, UnityPlacesCairoDrawingPlacesVSeparatorClass))
#define UNITY_PLACES_CAIRO_DRAWING_IS_PLACES_VSEPARATOR(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), UNITY_PLACES_CAIRO_DRAWING_TYPE_PLACES_VSEPARATOR))
#define UNITY_PLACES_CAIRO_DRAWING_IS_PLACES_VSEPARATOR_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), UNITY_PLACES_CAIRO_DRAWING_TYPE_PLACES_VSEPARATOR))
#define UNITY_PLACES_CAIRO_DRAWING_PLACES_VSEPARATOR_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), UNITY_PLACES_CAIRO_DRAWING_TYPE_PLACES_VSEPARATOR, UnityPlacesCairoDrawingPlacesVSeparatorClass))

typedef struct _UnityPlacesCairoDrawingPlacesVSeparator UnityPlacesCairoDrawingPlacesVSeparator;
typedef struct _UnityPlacesCairoDrawingPlacesVSeparatorClass UnityPlacesCairoDrawingPlacesVSeparatorClass;
typedef struct _UnityPlacesCairoDrawingPlacesVSeparatorPrivate UnityPlacesCairoDrawingPlacesVSeparatorPrivate;

#define UNITY_PLACES_CAIRO_DRAWING_TYPE_PLACES_HSEPARATOR (unity_places_cairo_drawing_places_hseparator_get_type ())
#define UNITY_PLACES_CAIRO_DRAWING_PLACES_HSEPARATOR(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), UNITY_PLACES_CAIRO_DRAWING_TYPE_PLACES_HSEPARATOR, UnityPlacesCairoDrawingPlacesHSeparator))
#define UNITY_PLACES_CAIRO_DRAWING_PLACES_HSEPARATOR_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), UNITY_PLACES_CAIRO_DRAWING_TYPE_PLACES_HSEPARATOR, UnityPlacesCairoDrawingPlacesHSeparatorClass))
#define UNITY_PLACES_CAIRO_DRAWING_IS_PLACES_HSEPARATOR(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), UNITY_PLACES_CAIRO_DRAWING_TYPE_PLACES_HSEPARATOR))
#define UNITY_PLACES_CAIRO_DRAWING_IS_PLACES_HSEPARATOR_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), UNITY_PLACES_CAIRO_DRAWING_TYPE_PLACES_HSEPARATOR))
#define UNITY_PLACES_CAIRO_DRAWING_PLACES_HSEPARATOR_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), UNITY_PLACES_CAIRO_DRAWING_TYPE_PLACES_HSEPARATOR, UnityPlacesCairoDrawingPlacesHSeparatorClass))

typedef struct _UnityPlacesCairoDrawingPlacesHSeparator UnityPlacesCairoDrawingPlacesHSeparator;
typedef struct _UnityPlacesCairoDrawingPlacesHSeparatorClass UnityPlacesCairoDrawingPlacesHSeparatorClass;
typedef struct _UnityPlacesCairoDrawingPlacesHSeparatorPrivate UnityPlacesCairoDrawingPlacesHSeparatorPrivate;

#define UNITY_PLACES_CAIRO_DRAWING_TYPE_RECTANGLE_BOX (unity_places_cairo_drawing_rectangle_box_get_type ())
#define UNITY_PLACES_CAIRO_DRAWING_RECTANGLE_BOX(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), UNITY_PLACES_CAIRO_DRAWING_TYPE_RECTANGLE_BOX, UnityPlacesCairoDrawingRectangleBox))
#define UNITY_PLACES_CAIRO_DRAWING_RECTANGLE_BOX_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), UNITY_PLACES_CAIRO_DRAWING_TYPE_RECTANGLE_BOX, UnityPlacesCairoDrawingRectangleBoxClass))
#define UNITY_PLACES_CAIRO_DRAWING_IS_RECTANGLE_BOX(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), UNITY_PLACES_CAIRO_DRAWING_TYPE_RECTANGLE_BOX))
#define UNITY_PLACES_CAIRO_DRAWING_IS_RECTANGLE_BOX_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), UNITY_PLACES_CAIRO_DRAWING_TYPE_RECTANGLE_BOX))
#define UNITY_PLACES_CAIRO_DRAWING_RECTANGLE_BOX_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), UNITY_PLACES_CAIRO_DRAWING_TYPE_RECTANGLE_BOX, UnityPlacesCairoDrawingRectangleBoxClass))

typedef struct _UnityPlacesCairoDrawingRectangleBox UnityPlacesCairoDrawingRectangleBox;
typedef struct _UnityPlacesCairoDrawingRectangleBoxClass UnityPlacesCairoDrawingRectangleBoxClass;
typedef struct _UnityPlacesCairoDrawingRectangleBoxPrivate UnityPlacesCairoDrawingRectangleBoxPrivate;

#define UNITY_PLACES_CAIRO_DRAWING_TYPE_ENTRY_BACKGROUND (unity_places_cairo_drawing_entry_background_get_type ())
#define UNITY_PLACES_CAIRO_DRAWING_ENTRY_BACKGROUND(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), UNITY_PLACES_CAIRO_DRAWING_TYPE_ENTRY_BACKGROUND, UnityPlacesCairoDrawingEntryBackground))
#define UNITY_PLACES_CAIRO_DRAWING_ENTRY_BACKGROUND_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), UNITY_PLACES_CAIRO_DRAWING_TYPE_ENTRY_BACKGROUND, UnityPlacesCairoDrawingEntryBackgroundClass))
#define UNITY_PLACES_CAIRO_DRAWING_IS_ENTRY_BACKGROUND(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), UNITY_PLACES_CAIRO_DRAWING_TYPE_ENTRY_BACKGROUND))
#define UNITY_PLACES_CAIRO_DRAWING_IS_ENTRY_BACKGROUND_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), UNITY_PLACES_CAIRO_DRAWING_TYPE_ENTRY_BACKGROUND))
#define UNITY_PLACES_CAIRO_DRAWING_ENTRY_BACKGROUND_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), UNITY_PLACES_CAIRO_DRAWING_TYPE_ENTRY_BACKGROUND, UnityPlacesCairoDrawingEntryBackgroundClass))

typedef struct _UnityPlacesCairoDrawingEntryBackground UnityPlacesCairoDrawingEntryBackground;
typedef struct _UnityPlacesCairoDrawingEntryBackgroundClass UnityPlacesCairoDrawingEntryBackgroundClass;
typedef struct _UnityPlacesCairoDrawingEntryBackgroundPrivate UnityPlacesCairoDrawingEntryBackgroundPrivate;

struct _UnityPlacesCairoDrawingPlacesBackground {
      CtkBin parent_instance;
      UnityPlacesCairoDrawingPlacesBackgroundPrivate * priv;
      ClutterCairoTexture* cairotxt;
      gint PlaceWidth;
};

struct _UnityPlacesCairoDrawingPlacesBackgroundClass {
      CtkBinClass parent_class;
};

struct _UnityPlacesCairoDrawingPlacesBackgroundPrivate {
      CtkEffectGlow* effect_glow;
      gint PlaceX;
      gint PlaceY;
      gint PlaceW;
      gint PlaceH;
      gint PlaceBottom;
      gint MenuH;
      gint MenuW;
      gint MenuBottom;
      gint TabH;
      gint SquirlW;
};

struct _UnityPlacesCairoDrawingPlacesBackgroundTabRect {
      gint left;
      gint right;
      gint top;
      gint bottom;
};

struct _UnityPlacesCairoDrawingPlacesVSeparator {
      CtkBin parent_instance;
      UnityPlacesCairoDrawingPlacesVSeparatorPrivate * priv;
      gint Width;
      gint Height;
      ClutterCairoTexture* cairotxt;
};

struct _UnityPlacesCairoDrawingPlacesVSeparatorClass {
      CtkBinClass parent_class;
};

struct _UnityPlacesCairoDrawingPlacesHSeparator {
      CtkBin parent_instance;
      UnityPlacesCairoDrawingPlacesHSeparatorPrivate * priv;
      gint Width;
      gint Height;
      ClutterCairoTexture* cairotxt;
};

struct _UnityPlacesCairoDrawingPlacesHSeparatorClass {
      CtkBinClass parent_class;
};

struct _UnityPlacesCairoDrawingRectangleBox {
      CtkBin parent_instance;
      UnityPlacesCairoDrawingRectangleBoxPrivate * priv;
      gint Width;
      gint Height;
      ClutterCairoTexture* cairotxt;
};

struct _UnityPlacesCairoDrawingRectangleBoxClass {
      CtkBinClass parent_class;
};

struct _UnityPlacesCairoDrawingEntryBackground {
      CtkBin parent_instance;
      UnityPlacesCairoDrawingEntryBackgroundPrivate * priv;
      gint Width;
      gint Height;
      ClutterCairoTexture* cairotxt;
};

struct _UnityPlacesCairoDrawingEntryBackgroundClass {
      CtkBinClass parent_class;
};


extern gint unity_places_cairo_drawing_Margin;
gint unity_places_cairo_drawing_Margin = 5;
static gpointer unity_places_cairo_drawing_places_background_parent_class = NULL;
static gpointer unity_places_cairo_drawing_places_vseparator_parent_class = NULL;
static gpointer unity_places_cairo_drawing_places_hseparator_parent_class = NULL;
static gpointer unity_places_cairo_drawing_rectangle_box_parent_class = NULL;
static gpointer unity_places_cairo_drawing_entry_background_parent_class = NULL;

GType unity_places_cairo_drawing_places_background_get_type (void);
#define UNITY_PLACES_CAIRO_DRAWING_PLACES_BACKGROUND_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), UNITY_PLACES_CAIRO_DRAWING_TYPE_PLACES_BACKGROUND, UnityPlacesCairoDrawingPlacesBackgroundPrivate))
enum  {
      UNITY_PLACES_CAIRO_DRAWING_PLACES_BACKGROUND_DUMMY_PROPERTY
};
static void unity_places_cairo_drawing_places_background_DrawAroundMenu (UnityPlacesCairoDrawingPlacesBackground* self, cairo_t* cairoctx);
GType unity_places_cairo_drawing_places_background_tab_rect_get_type (void);
UnityPlacesCairoDrawingPlacesBackgroundTabRect* unity_places_cairo_drawing_places_background_tab_rect_dup (const UnityPlacesCairoDrawingPlacesBackgroundTabRect* self);
void unity_places_cairo_drawing_places_background_tab_rect_free (UnityPlacesCairoDrawingPlacesBackgroundTabRect* self);
static void unity_places_cairo_drawing_places_background_DrawTab (UnityPlacesCairoDrawingPlacesBackground* self, cairo_t* cairoctx, UnityPlacesCairoDrawingPlacesBackgroundTabRect* tab);
static void unity_places_cairo_drawing_places_background_DrawSquirl (UnityPlacesCairoDrawingPlacesBackground* self, cairo_t* cairoctx);
UnityPlacesCairoDrawingPlacesBackground* unity_places_cairo_drawing_places_background_new (void);
UnityPlacesCairoDrawingPlacesBackground* unity_places_cairo_drawing_places_background_construct (GType object_type);
void unity_places_cairo_drawing_places_background_create_places_background (UnityPlacesCairoDrawingPlacesBackground* self, gint WindowWidth, gint WindowHeight, gint TabPositionX, gint TabWidth, gint menu_width);
static GObject * unity_places_cairo_drawing_places_background_constructor (GType type, guint n_construct_properties, GObjectConstructParam * construct_properties);
static void unity_places_cairo_drawing_places_background_finalize (GObject* obj);
GType unity_places_cairo_drawing_places_vseparator_get_type (void);
enum  {
      UNITY_PLACES_CAIRO_DRAWING_PLACES_VSEPARATOR_DUMMY_PROPERTY
};
UnityPlacesCairoDrawingPlacesVSeparator* unity_places_cairo_drawing_places_vseparator_new (void);
UnityPlacesCairoDrawingPlacesVSeparator* unity_places_cairo_drawing_places_vseparator_construct (GType object_type);
void unity_places_cairo_drawing_places_vseparator_CreateSeparator (UnityPlacesCairoDrawingPlacesVSeparator* self, gint W, gint H);
static GObject * unity_places_cairo_drawing_places_vseparator_constructor (GType type, guint n_construct_properties, GObjectConstructParam * construct_properties);
static void unity_places_cairo_drawing_places_vseparator_finalize (GObject* obj);
GType unity_places_cairo_drawing_places_hseparator_get_type (void);
enum  {
      UNITY_PLACES_CAIRO_DRAWING_PLACES_HSEPARATOR_DUMMY_PROPERTY
};
UnityPlacesCairoDrawingPlacesHSeparator* unity_places_cairo_drawing_places_hseparator_new (void);
UnityPlacesCairoDrawingPlacesHSeparator* unity_places_cairo_drawing_places_hseparator_construct (GType object_type);
void unity_places_cairo_drawing_places_hseparator_CreateSeparator (UnityPlacesCairoDrawingPlacesHSeparator* self, gint W, gint H);
static GObject * unity_places_cairo_drawing_places_hseparator_constructor (GType type, guint n_construct_properties, GObjectConstructParam * construct_properties);
static void unity_places_cairo_drawing_places_hseparator_finalize (GObject* obj);
GType unity_places_cairo_drawing_rectangle_box_get_type (void);
enum  {
      UNITY_PLACES_CAIRO_DRAWING_RECTANGLE_BOX_DUMMY_PROPERTY
};
UnityPlacesCairoDrawingRectangleBox* unity_places_cairo_drawing_rectangle_box_new (void);
UnityPlacesCairoDrawingRectangleBox* unity_places_cairo_drawing_rectangle_box_construct (GType object_type);
void unity_places_cairo_drawing_rectangle_box_CreateRectangleBox (UnityPlacesCairoDrawingRectangleBox* self, gint W, gint H);
static GObject * unity_places_cairo_drawing_rectangle_box_constructor (GType type, guint n_construct_properties, GObjectConstructParam * construct_properties);
static void unity_places_cairo_drawing_rectangle_box_finalize (GObject* obj);
GType unity_places_cairo_drawing_entry_background_get_type (void);
enum  {
      UNITY_PLACES_CAIRO_DRAWING_ENTRY_BACKGROUND_DUMMY_PROPERTY
};
UnityPlacesCairoDrawingEntryBackground* unity_places_cairo_drawing_entry_background_new (void);
UnityPlacesCairoDrawingEntryBackground* unity_places_cairo_drawing_entry_background_construct (GType object_type);
void unity_places_cairo_drawing_entry_background_create_search_entry_background (UnityPlacesCairoDrawingEntryBackground* self, gint W, gint H);
static GObject * unity_places_cairo_drawing_entry_background_constructor (GType type, guint n_construct_properties, GObjectConstructParam * construct_properties);
static void unity_places_cairo_drawing_entry_background_finalize (GObject* obj);



static void unity_places_cairo_drawing_places_background_DrawAroundMenu (UnityPlacesCairoDrawingPlacesBackground* self, cairo_t* cairoctx) {
      gint radius;
      gint arc_center_x;
      gint arc_center_y;
      g_return_if_fail (self != NULL);
      g_return_if_fail (cairoctx != NULL);
      radius = 8;
      cairo_line_to (cairoctx, (double) ((self->priv->PlaceX + self->priv->PlaceW) + unity_places_cairo_drawing_Margin), (double) (self->priv->PlaceY + self->priv->MenuH));
      cairo_line_to (cairoctx, (double) (((self->priv->PlaceX + self->priv->PlaceW) - self->priv->MenuW) + radius), (double) (self->priv->PlaceY + self->priv->MenuH));
      arc_center_x = ((self->priv->PlaceX + self->priv->PlaceW) - self->priv->MenuW) + radius;
      arc_center_y = (self->priv->PlaceY + self->priv->MenuH) + radius;
      cairo_arc_negative (cairoctx, (double) arc_center_x, (double) arc_center_y, (double) radius, (3.0 * G_PI) / 2.0, G_PI);
      cairo_line_to (cairoctx, (double) ((self->priv->PlaceX + self->priv->PlaceW) - self->priv->MenuW), (double) ((self->priv->PlaceY + self->priv->PlaceH) - radius));
      arc_center_x = ((self->priv->PlaceX + self->priv->PlaceW) - self->priv->MenuW) - radius;
      arc_center_y = (self->priv->PlaceY + self->priv->PlaceH) - radius;
      cairo_arc (cairoctx, (double) arc_center_x, (double) arc_center_y, (double) radius, 0.0, G_PI / 2.0);
}


static void unity_places_cairo_drawing_places_background_DrawTab (UnityPlacesCairoDrawingPlacesBackground* self, cairo_t* cairoctx, UnityPlacesCairoDrawingPlacesBackgroundTabRect* tab) {
      gint radius;
      gint radius_small;
      gint arc_center_x = 0;
      gint arc_center_y = 0;
      g_return_if_fail (self != NULL);
      g_return_if_fail (cairoctx != NULL);
      radius = 5;
      radius_small = 5;
      cairo_line_to (cairoctx, (double) ((*tab).right + radius_small), (double) self->priv->PlaceBottom);
      arc_center_x = (*tab).right + radius_small;
      arc_center_y = self->priv->PlaceBottom - radius_small;
      cairo_arc (cairoctx, (double) arc_center_x, (double) arc_center_y, (double) radius_small, G_PI / 2.0, G_PI);
      cairo_line_to (cairoctx, (double) (*tab).right, (double) ((*tab).top + radius));
      arc_center_x = (*tab).right - radius;
      arc_center_y = (*tab).top + radius;
      cairo_arc_negative (cairoctx, (double) arc_center_x, (double) arc_center_y, (double) radius, 0.0, (3.0 * G_PI) / 2.0);
      cairo_line_to (cairoctx, (double) ((*tab).left + radius), (double) (*tab).top);
      arc_center_x = (*tab).left + radius;
      arc_center_y = (*tab).top + radius;
      cairo_arc_negative (cairoctx, (double) arc_center_x, (double) arc_center_y, (double) radius, (3.0 * G_PI) / 2.0, G_PI);
      cairo_line_to (cairoctx, (double) (*tab).left, (double) (self->priv->PlaceBottom - radius_small));
      arc_center_x = (*tab).left - radius_small;
      arc_center_y = self->priv->PlaceBottom - radius_small;
      cairo_arc (cairoctx, (double) arc_center_x, (double) arc_center_y, (double) radius_small, 0.0, G_PI / 2.0);
}


static void unity_places_cairo_drawing_places_background_DrawSquirl (UnityPlacesCairoDrawingPlacesBackground* self, cairo_t* cairoctx) {
      gint radius_small;
      gint arc_center_x = 0;
      gint arc_center_y = 0;
      g_return_if_fail (self != NULL);
      g_return_if_fail (cairoctx != NULL);
      radius_small = 5;
      cairo_line_to (cairoctx, (double) ((self->priv->PlaceX + self->priv->SquirlW) + radius_small), (double) self->priv->PlaceBottom);
      arc_center_x = (self->priv->PlaceX + self->priv->SquirlW) + radius_small;
      arc_center_y = self->priv->PlaceBottom - radius_small;
      cairo_arc (cairoctx, (double) arc_center_x, (double) arc_center_y, (double) radius_small, G_PI / 2.0, G_PI);
      cairo_line_to (cairoctx, (double) (self->priv->PlaceX + self->priv->SquirlW), (double) (self->priv->MenuBottom + radius_small));
      arc_center_x = (self->priv->PlaceX + self->priv->SquirlW) - radius_small;
      arc_center_y = self->priv->MenuBottom + radius_small;
      cairo_arc_negative (cairoctx, (double) arc_center_x, (double) arc_center_y, (double) radius_small, (double) 0, (3.0 * G_PI) / 2.0);
      cairo_line_to (cairoctx, (double) (self->priv->PlaceX - unity_places_cairo_drawing_Margin), (double) self->priv->MenuBottom);
}


UnityPlacesCairoDrawingPlacesBackground* unity_places_cairo_drawing_places_background_construct (GType object_type) {
      UnityPlacesCairoDrawingPlacesBackground * self;
      self = g_object_newv (object_type, 0, NULL);
      self->PlaceWidth = 0;
      return self;
}


UnityPlacesCairoDrawingPlacesBackground* unity_places_cairo_drawing_places_background_new (void) {
      return unity_places_cairo_drawing_places_background_construct (UNITY_PLACES_CAIRO_DRAWING_TYPE_PLACES_BACKGROUND);
}


void unity_places_cairo_drawing_places_background_create_places_background (UnityPlacesCairoDrawingPlacesBackground* self, gint WindowWidth, gint WindowHeight, gint TabPositionX, gint TabWidth, gint menu_width) {
      ClutterCairoTexture* _tmp0_;
      cairo_t* cairoctx;
      CtkEffectGlow* _tmp1_;
      ClutterColor _tmp2_ = {0};
      ClutterColor c;
      g_return_if_fail (self != NULL);
      self->PlaceWidth = WindowWidth;
      self->priv->PlaceW = WindowWidth;
      self->priv->PlaceBottom = self->priv->PlaceY + self->priv->PlaceH;
      self->priv->MenuBottom = self->priv->PlaceY + self->priv->MenuH;
      self->priv->MenuW = menu_width;
      if (CLUTTER_IS_ACTOR (ctk_bin_get_child ((CtkBin*) self))) {
            clutter_container_remove_actor ((ClutterContainer*) self, ctk_bin_get_child ((CtkBin*) self));
      }
      self->cairotxt = (_tmp0_ = g_object_ref_sink ((ClutterCairoTexture*) clutter_cairo_texture_new ((guint) self->priv->PlaceW, (guint) (self->priv->PlaceH + unity_places_cairo_drawing_Margin))), _g_object_unref0 (self->cairotxt), _tmp0_);
      cairoctx = clutter_cairo_texture_create (self->cairotxt);
      {
            UnityPlacesCairoDrawingPlacesBackgroundTabRect tab = {0};
            cairo_surface_t* surface;
            cairo_pattern_t* pattern;
            cairo_set_operator (cairoctx, CAIRO_OPERATOR_CLEAR);
            cairo_paint (cairoctx);
            cairo_set_operator (cairoctx, CAIRO_OPERATOR_OVER);
            cairo_translate (cairoctx, (double) 0.5f, (double) 0.5f);
            cairo_set_source_rgba (cairoctx, (double) 1, (double) 1, (double) 1, 1.0);
            cairo_set_line_width (cairoctx, 1.0);
            cairo_move_to (cairoctx, (double) (self->priv->PlaceX - unity_places_cairo_drawing_Margin), (double) (self->priv->PlaceY - unity_places_cairo_drawing_Margin));
            cairo_line_to (cairoctx, (double) ((self->priv->PlaceX + self->priv->PlaceW) + unity_places_cairo_drawing_Margin), (double) (self->priv->PlaceY - unity_places_cairo_drawing_Margin));
            unity_places_cairo_drawing_places_background_DrawAroundMenu (self, cairoctx);
            memset (&tab, 0, sizeof (UnityPlacesCairoDrawingPlacesBackgroundTabRect));
            tab.left = TabPositionX;
            tab.right = tab.left + TabWidth;
            tab.top = (self->priv->PlaceY + self->priv->PlaceH) - self->priv->TabH;
            tab.bottom = self->priv->PlaceY + self->priv->PlaceH;
            unity_places_cairo_drawing_places_background_DrawTab (self, cairoctx, &tab);
            unity_places_cairo_drawing_places_background_DrawSquirl (self, cairoctx);
            cairo_line_to (cairoctx, (double) (self->priv->PlaceX - unity_places_cairo_drawing_Margin), (double) (self->priv->PlaceY - unity_places_cairo_drawing_Margin));
            cairo_stroke_preserve (cairoctx);
            cairo_clip (cairoctx);
            surface = cairo_image_surface_create_from_png (PKGDATADIR "/dash_background.png");
            pattern = cairo_pattern_create_for_surface (surface);
            cairo_pattern_set_extend (pattern, CAIRO_EXTEND_REPEAT);
            cairo_set_source (cairoctx, pattern);
            cairo_paint_with_alpha (cairoctx, 0.1);
            _cairo_surface_destroy0 (surface);
            _cairo_pattern_destroy0 (pattern);
      }
      clutter_actor_set_opacity ((ClutterActor*) self->cairotxt, (guint8) 0xFF);
      clutter_container_add_actor ((ClutterContainer*) self, (ClutterActor*) self->cairotxt);
      ctk_actor_remove_all_effects ((CtkActor*) self);
      self->priv->effect_glow = (_tmp1_ = g_object_ref_sink ((CtkEffectGlow*) ctk_effect_glow_new ()), _g_object_unref0 (self->priv->effect_glow), _tmp1_);
      c = (memset (&_tmp2_, 0, sizeof (ClutterColor)), _tmp2_.red = (guint8) 255, _tmp2_.green = (guint8) 255, _tmp2_.blue = (guint8) 255, _tmp2_.alpha = (guint8) 255, _tmp2_);
      ctk_effect_glow_set_color (self->priv->effect_glow, &c);
      ctk_effect_glow_set_factor (self->priv->effect_glow, 1.0f);
      ctk_effect_set_margin ((CtkEffect*) self->priv->effect_glow, 5);
      ctk_actor_add_effect ((CtkActor*) self, (CtkEffect*) self->priv->effect_glow);
      _cairo_destroy0 (cairoctx);
}


static GObject * unity_places_cairo_drawing_places_background_constructor (GType type, guint n_construct_properties, GObjectConstructParam * construct_properties) {
      GObject * obj;
      GObjectClass * parent_class;
      UnityPlacesCairoDrawingPlacesBackground * self;
      parent_class = G_OBJECT_CLASS (unity_places_cairo_drawing_places_background_parent_class);
      obj = parent_class->constructor (type, n_construct_properties, construct_properties);
      self = UNITY_PLACES_CAIRO_DRAWING_PLACES_BACKGROUND (obj);
      {
      }
      return obj;
}


UnityPlacesCairoDrawingPlacesBackgroundTabRect* unity_places_cairo_drawing_places_background_tab_rect_dup (const UnityPlacesCairoDrawingPlacesBackgroundTabRect* self) {
      UnityPlacesCairoDrawingPlacesBackgroundTabRect* dup;
      dup = g_new0 (UnityPlacesCairoDrawingPlacesBackgroundTabRect, 1);
      memcpy (dup, self, sizeof (UnityPlacesCairoDrawingPlacesBackgroundTabRect));
      return dup;
}


void unity_places_cairo_drawing_places_background_tab_rect_free (UnityPlacesCairoDrawingPlacesBackgroundTabRect* self) {
      g_free (self);
}


GType unity_places_cairo_drawing_places_background_tab_rect_get_type (void) {
      static volatile gsize unity_places_cairo_drawing_places_background_tab_rect_type_id__volatile = 0;
      if (g_once_init_enter (&unity_places_cairo_drawing_places_background_tab_rect_type_id__volatile)) {
            GType unity_places_cairo_drawing_places_background_tab_rect_type_id;
            unity_places_cairo_drawing_places_background_tab_rect_type_id = g_boxed_type_register_static ("UnityPlacesCairoDrawingPlacesBackgroundTabRect", (GBoxedCopyFunc) unity_places_cairo_drawing_places_background_tab_rect_dup, (GBoxedFreeFunc) unity_places_cairo_drawing_places_background_tab_rect_free);
            g_once_init_leave (&unity_places_cairo_drawing_places_background_tab_rect_type_id__volatile, unity_places_cairo_drawing_places_background_tab_rect_type_id);
      }
      return unity_places_cairo_drawing_places_background_tab_rect_type_id__volatile;
}


static void unity_places_cairo_drawing_places_background_class_init (UnityPlacesCairoDrawingPlacesBackgroundClass * klass) {
      unity_places_cairo_drawing_places_background_parent_class = g_type_class_peek_parent (klass);
      g_type_class_add_private (klass, sizeof (UnityPlacesCairoDrawingPlacesBackgroundPrivate));
      G_OBJECT_CLASS (klass)->constructor = unity_places_cairo_drawing_places_background_constructor;
      G_OBJECT_CLASS (klass)->finalize = unity_places_cairo_drawing_places_background_finalize;
}


static void unity_places_cairo_drawing_places_background_instance_init (UnityPlacesCairoDrawingPlacesBackground * self) {
      self->priv = UNITY_PLACES_CAIRO_DRAWING_PLACES_BACKGROUND_GET_PRIVATE (self);
      self->priv->PlaceX = 0;
      self->priv->PlaceY = 0;
      self->priv->PlaceW = 760;
      self->priv->PlaceH = 55;
      self->priv->MenuH = 22;
      self->priv->MenuW = 100;
      self->priv->TabH = 50;
      self->priv->SquirlW = 66;
}


static void unity_places_cairo_drawing_places_background_finalize (GObject* obj) {
      UnityPlacesCairoDrawingPlacesBackground * self;
      self = UNITY_PLACES_CAIRO_DRAWING_PLACES_BACKGROUND (obj);
      _g_object_unref0 (self->cairotxt);
      _g_object_unref0 (self->priv->effect_glow);
      G_OBJECT_CLASS (unity_places_cairo_drawing_places_background_parent_class)->finalize (obj);
}


GType unity_places_cairo_drawing_places_background_get_type (void) {
      static volatile gsize unity_places_cairo_drawing_places_background_type_id__volatile = 0;
      if (g_once_init_enter (&unity_places_cairo_drawing_places_background_type_id__volatile)) {
            static const GTypeInfo g_define_type_info = { sizeof (UnityPlacesCairoDrawingPlacesBackgroundClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) unity_places_cairo_drawing_places_background_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (UnityPlacesCairoDrawingPlacesBackground), 0, (GInstanceInitFunc) unity_places_cairo_drawing_places_background_instance_init, NULL };
            GType unity_places_cairo_drawing_places_background_type_id;
            unity_places_cairo_drawing_places_background_type_id = g_type_register_static (CTK_TYPE_BIN, "UnityPlacesCairoDrawingPlacesBackground", &g_define_type_info, 0);
            g_once_init_leave (&unity_places_cairo_drawing_places_background_type_id__volatile, unity_places_cairo_drawing_places_background_type_id);
      }
      return unity_places_cairo_drawing_places_background_type_id__volatile;
}


UnityPlacesCairoDrawingPlacesVSeparator* unity_places_cairo_drawing_places_vseparator_construct (GType object_type) {
      UnityPlacesCairoDrawingPlacesVSeparator * self;
      self = g_object_newv (object_type, 0, NULL);
      return self;
}


UnityPlacesCairoDrawingPlacesVSeparator* unity_places_cairo_drawing_places_vseparator_new (void) {
      return unity_places_cairo_drawing_places_vseparator_construct (UNITY_PLACES_CAIRO_DRAWING_TYPE_PLACES_VSEPARATOR);
}


void unity_places_cairo_drawing_places_vseparator_CreateSeparator (UnityPlacesCairoDrawingPlacesVSeparator* self, gint W, gint H) {
      ClutterCairoTexture* _tmp0_;
      cairo_t* cairoctx;
      CtkEffectGlow* effect_glow;
      ClutterColor _tmp1_ = {0};
      ClutterColor c;
      g_return_if_fail (self != NULL);
      self->Width = W;
      self->Height = H;
      if (CLUTTER_IS_ACTOR (ctk_bin_get_child ((CtkBin*) self))) {
            clutter_container_remove_actor ((ClutterContainer*) self, ctk_bin_get_child ((CtkBin*) self));
      }
      self->cairotxt = (_tmp0_ = g_object_ref_sink ((ClutterCairoTexture*) clutter_cairo_texture_new ((guint) self->Width, (guint) self->Height)), _g_object_unref0 (self->cairotxt), _tmp0_);
      cairoctx = clutter_cairo_texture_create (self->cairotxt);
      {
            cairo_set_source_rgba (cairoctx, (double) 1, (double) 1, (double) 1, 1.0);
            cairo_set_line_width (cairoctx, 1.0);
            cairo_move_to (cairoctx, self->Width / 2.0, (double) 0);
            cairo_line_to (cairoctx, self->Width / 2.0, (double) self->Height);
            cairo_stroke (cairoctx);
            cairo_set_source_rgba (cairoctx, (double) 1, (double) 1, (double) 1, 0.15);
      }
      clutter_actor_set_opacity ((ClutterActor*) self->cairotxt, (guint8) 0xFF);
      clutter_container_add_actor ((ClutterContainer*) self, (ClutterActor*) self->cairotxt);
      ctk_actor_remove_all_effects ((CtkActor*) self);
      effect_glow = g_object_ref_sink ((CtkEffectGlow*) ctk_effect_glow_new ());
      c = (memset (&_tmp1_, 0, sizeof (ClutterColor)), _tmp1_.red = (guint8) 255, _tmp1_.green = (guint8) 255, _tmp1_.blue = (guint8) 255, _tmp1_.alpha = (guint8) 255, _tmp1_);
      ctk_effect_glow_set_color (effect_glow, &c);
      ctk_effect_glow_set_factor (effect_glow, 1.0f);
      ctk_effect_set_margin ((CtkEffect*) effect_glow, 5);
      ctk_actor_add_effect ((CtkActor*) self, (CtkEffect*) effect_glow);
      _cairo_destroy0 (cairoctx);
      _g_object_unref0 (effect_glow);
}


static GObject * unity_places_cairo_drawing_places_vseparator_constructor (GType type, guint n_construct_properties, GObjectConstructParam * construct_properties) {
      GObject * obj;
      GObjectClass * parent_class;
      UnityPlacesCairoDrawingPlacesVSeparator * self;
      parent_class = G_OBJECT_CLASS (unity_places_cairo_drawing_places_vseparator_parent_class);
      obj = parent_class->constructor (type, n_construct_properties, construct_properties);
      self = UNITY_PLACES_CAIRO_DRAWING_PLACES_VSEPARATOR (obj);
      {
      }
      return obj;
}


static void unity_places_cairo_drawing_places_vseparator_class_init (UnityPlacesCairoDrawingPlacesVSeparatorClass * klass) {
      unity_places_cairo_drawing_places_vseparator_parent_class = g_type_class_peek_parent (klass);
      G_OBJECT_CLASS (klass)->constructor = unity_places_cairo_drawing_places_vseparator_constructor;
      G_OBJECT_CLASS (klass)->finalize = unity_places_cairo_drawing_places_vseparator_finalize;
}


static void unity_places_cairo_drawing_places_vseparator_instance_init (UnityPlacesCairoDrawingPlacesVSeparator * self) {
      self->Width = 0;
      self->Height = 0;
}


static void unity_places_cairo_drawing_places_vseparator_finalize (GObject* obj) {
      UnityPlacesCairoDrawingPlacesVSeparator * self;
      self = UNITY_PLACES_CAIRO_DRAWING_PLACES_VSEPARATOR (obj);
      _g_object_unref0 (self->cairotxt);
      G_OBJECT_CLASS (unity_places_cairo_drawing_places_vseparator_parent_class)->finalize (obj);
}


GType unity_places_cairo_drawing_places_vseparator_get_type (void) {
      static volatile gsize unity_places_cairo_drawing_places_vseparator_type_id__volatile = 0;
      if (g_once_init_enter (&unity_places_cairo_drawing_places_vseparator_type_id__volatile)) {
            static const GTypeInfo g_define_type_info = { sizeof (UnityPlacesCairoDrawingPlacesVSeparatorClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) unity_places_cairo_drawing_places_vseparator_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (UnityPlacesCairoDrawingPlacesVSeparator), 0, (GInstanceInitFunc) unity_places_cairo_drawing_places_vseparator_instance_init, NULL };
            GType unity_places_cairo_drawing_places_vseparator_type_id;
            unity_places_cairo_drawing_places_vseparator_type_id = g_type_register_static (CTK_TYPE_BIN, "UnityPlacesCairoDrawingPlacesVSeparator", &g_define_type_info, 0);
            g_once_init_leave (&unity_places_cairo_drawing_places_vseparator_type_id__volatile, unity_places_cairo_drawing_places_vseparator_type_id);
      }
      return unity_places_cairo_drawing_places_vseparator_type_id__volatile;
}


UnityPlacesCairoDrawingPlacesHSeparator* unity_places_cairo_drawing_places_hseparator_construct (GType object_type) {
      UnityPlacesCairoDrawingPlacesHSeparator * self;
      self = g_object_newv (object_type, 0, NULL);
      return self;
}


UnityPlacesCairoDrawingPlacesHSeparator* unity_places_cairo_drawing_places_hseparator_new (void) {
      return unity_places_cairo_drawing_places_hseparator_construct (UNITY_PLACES_CAIRO_DRAWING_TYPE_PLACES_HSEPARATOR);
}


void unity_places_cairo_drawing_places_hseparator_CreateSeparator (UnityPlacesCairoDrawingPlacesHSeparator* self, gint W, gint H) {
      ClutterCairoTexture* _tmp0_;
      cairo_t* cairoctx;
      CtkEffectGlow* effect_glow;
      ClutterColor _tmp1_ = {0};
      ClutterColor c;
      g_return_if_fail (self != NULL);
      self->Width = W;
      self->Height = H;
      if (CLUTTER_IS_ACTOR (ctk_bin_get_child ((CtkBin*) self))) {
            clutter_container_remove_actor ((ClutterContainer*) self, ctk_bin_get_child ((CtkBin*) self));
      }
      self->cairotxt = (_tmp0_ = g_object_ref_sink ((ClutterCairoTexture*) clutter_cairo_texture_new ((guint) self->Width, (guint) self->Height)), _g_object_unref0 (self->cairotxt), _tmp0_);
      cairoctx = clutter_cairo_texture_create (self->cairotxt);
      {
            cairo_set_source_rgba (cairoctx, (double) 1, (double) 1, (double) 1, 1.0);
            cairo_set_line_width (cairoctx, 1.0);
            cairo_move_to (cairoctx, (double) 0, self->Height / 2.0);
            cairo_line_to (cairoctx, (double) self->Width, self->Height / 2.0);
            cairo_stroke (cairoctx);
            cairo_set_source_rgba (cairoctx, (double) 1, (double) 1, (double) 1, 0.15);
      }
      clutter_actor_set_opacity ((ClutterActor*) self->cairotxt, (guint8) 0xFF);
      clutter_container_add_actor ((ClutterContainer*) self, (ClutterActor*) self->cairotxt);
      ctk_actor_remove_all_effects ((CtkActor*) self);
      effect_glow = g_object_ref_sink ((CtkEffectGlow*) ctk_effect_glow_new ());
      c = (memset (&_tmp1_, 0, sizeof (ClutterColor)), _tmp1_.red = (guint8) 255, _tmp1_.green = (guint8) 255, _tmp1_.blue = (guint8) 255, _tmp1_.alpha = (guint8) 255, _tmp1_);
      ctk_effect_glow_set_color (effect_glow, &c);
      ctk_effect_glow_set_factor (effect_glow, 1.0f);
      ctk_effect_set_margin ((CtkEffect*) effect_glow, 5);
      ctk_actor_add_effect ((CtkActor*) self, (CtkEffect*) effect_glow);
      _cairo_destroy0 (cairoctx);
      _g_object_unref0 (effect_glow);
}


static GObject * unity_places_cairo_drawing_places_hseparator_constructor (GType type, guint n_construct_properties, GObjectConstructParam * construct_properties) {
      GObject * obj;
      GObjectClass * parent_class;
      UnityPlacesCairoDrawingPlacesHSeparator * self;
      parent_class = G_OBJECT_CLASS (unity_places_cairo_drawing_places_hseparator_parent_class);
      obj = parent_class->constructor (type, n_construct_properties, construct_properties);
      self = UNITY_PLACES_CAIRO_DRAWING_PLACES_HSEPARATOR (obj);
      {
      }
      return obj;
}


static void unity_places_cairo_drawing_places_hseparator_class_init (UnityPlacesCairoDrawingPlacesHSeparatorClass * klass) {
      unity_places_cairo_drawing_places_hseparator_parent_class = g_type_class_peek_parent (klass);
      G_OBJECT_CLASS (klass)->constructor = unity_places_cairo_drawing_places_hseparator_constructor;
      G_OBJECT_CLASS (klass)->finalize = unity_places_cairo_drawing_places_hseparator_finalize;
}


static void unity_places_cairo_drawing_places_hseparator_instance_init (UnityPlacesCairoDrawingPlacesHSeparator * self) {
      self->Width = 0;
      self->Height = 0;
}


static void unity_places_cairo_drawing_places_hseparator_finalize (GObject* obj) {
      UnityPlacesCairoDrawingPlacesHSeparator * self;
      self = UNITY_PLACES_CAIRO_DRAWING_PLACES_HSEPARATOR (obj);
      _g_object_unref0 (self->cairotxt);
      G_OBJECT_CLASS (unity_places_cairo_drawing_places_hseparator_parent_class)->finalize (obj);
}


GType unity_places_cairo_drawing_places_hseparator_get_type (void) {
      static volatile gsize unity_places_cairo_drawing_places_hseparator_type_id__volatile = 0;
      if (g_once_init_enter (&unity_places_cairo_drawing_places_hseparator_type_id__volatile)) {
            static const GTypeInfo g_define_type_info = { sizeof (UnityPlacesCairoDrawingPlacesHSeparatorClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) unity_places_cairo_drawing_places_hseparator_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (UnityPlacesCairoDrawingPlacesHSeparator), 0, (GInstanceInitFunc) unity_places_cairo_drawing_places_hseparator_instance_init, NULL };
            GType unity_places_cairo_drawing_places_hseparator_type_id;
            unity_places_cairo_drawing_places_hseparator_type_id = g_type_register_static (CTK_TYPE_BIN, "UnityPlacesCairoDrawingPlacesHSeparator", &g_define_type_info, 0);
            g_once_init_leave (&unity_places_cairo_drawing_places_hseparator_type_id__volatile, unity_places_cairo_drawing_places_hseparator_type_id);
      }
      return unity_places_cairo_drawing_places_hseparator_type_id__volatile;
}


UnityPlacesCairoDrawingRectangleBox* unity_places_cairo_drawing_rectangle_box_construct (GType object_type) {
      UnityPlacesCairoDrawingRectangleBox * self;
      self = g_object_newv (object_type, 0, NULL);
      return self;
}


UnityPlacesCairoDrawingRectangleBox* unity_places_cairo_drawing_rectangle_box_new (void) {
      return unity_places_cairo_drawing_rectangle_box_construct (UNITY_PLACES_CAIRO_DRAWING_TYPE_RECTANGLE_BOX);
}


void unity_places_cairo_drawing_rectangle_box_CreateRectangleBox (UnityPlacesCairoDrawingRectangleBox* self, gint W, gint H) {
      ClutterCairoTexture* _tmp0_;
      cairo_t* cairoctx;
      CtkEffectGlow* effect_glow;
      ClutterColor _tmp1_ = {0};
      ClutterColor c;
      g_return_if_fail (self != NULL);
      self->Width = W;
      self->Height = H;
      if (CLUTTER_IS_ACTOR (ctk_bin_get_child ((CtkBin*) self))) {
            clutter_container_remove_actor ((ClutterContainer*) self, ctk_bin_get_child ((CtkBin*) self));
      }
      self->cairotxt = (_tmp0_ = g_object_ref_sink ((ClutterCairoTexture*) clutter_cairo_texture_new ((guint) self->Width, (guint) self->Height)), _g_object_unref0 (self->cairotxt), _tmp0_);
      cairoctx = clutter_cairo_texture_create (self->cairotxt);
      {
            cairo_set_operator (cairoctx, CAIRO_OPERATOR_CLEAR);
            cairo_paint (cairoctx);
            cairo_set_operator (cairoctx, CAIRO_OPERATOR_OVER);
            cairo_translate (cairoctx, (double) 0.5f, (double) 0.5f);
            cairo_set_source_rgba (cairoctx, (double) 1, (double) 1, (double) 1, 1.0);
            cairo_set_line_width (cairoctx, 1.0);
            cairo_move_to (cairoctx, (double) 1, (double) 1);
            cairo_line_to (cairoctx, (double) (self->Width - 1), (double) 1);
            cairo_line_to (cairoctx, (double) (self->Width - 1), (double) (self->Height - 1));
            cairo_line_to (cairoctx, (double) 1, (double) (self->Height - 1));
            cairo_line_to (cairoctx, (double) 1, (double) 1);
            cairo_stroke (cairoctx);
      }
      clutter_actor_set_opacity ((ClutterActor*) self->cairotxt, (guint8) 0xFF);
      clutter_container_add_actor ((ClutterContainer*) self, (ClutterActor*) self->cairotxt);
      ctk_actor_remove_all_effects ((CtkActor*) self);
      effect_glow = g_object_ref_sink ((CtkEffectGlow*) ctk_effect_glow_new ());
      c = (memset (&_tmp1_, 0, sizeof (ClutterColor)), _tmp1_.red = (guint8) 255, _tmp1_.green = (guint8) 255, _tmp1_.blue = (guint8) 255, _tmp1_.alpha = (guint8) 255, _tmp1_);
      ctk_effect_glow_set_color (effect_glow, &c);
      ctk_effect_glow_set_factor (effect_glow, 1.0f);
      ctk_effect_set_margin ((CtkEffect*) effect_glow, 5);
      ctk_actor_add_effect ((CtkActor*) self, (CtkEffect*) effect_glow);
      _cairo_destroy0 (cairoctx);
      _g_object_unref0 (effect_glow);
}


static GObject * unity_places_cairo_drawing_rectangle_box_constructor (GType type, guint n_construct_properties, GObjectConstructParam * construct_properties) {
      GObject * obj;
      GObjectClass * parent_class;
      UnityPlacesCairoDrawingRectangleBox * self;
      parent_class = G_OBJECT_CLASS (unity_places_cairo_drawing_rectangle_box_parent_class);
      obj = parent_class->constructor (type, n_construct_properties, construct_properties);
      self = UNITY_PLACES_CAIRO_DRAWING_RECTANGLE_BOX (obj);
      {
      }
      return obj;
}


static void unity_places_cairo_drawing_rectangle_box_class_init (UnityPlacesCairoDrawingRectangleBoxClass * klass) {
      unity_places_cairo_drawing_rectangle_box_parent_class = g_type_class_peek_parent (klass);
      G_OBJECT_CLASS (klass)->constructor = unity_places_cairo_drawing_rectangle_box_constructor;
      G_OBJECT_CLASS (klass)->finalize = unity_places_cairo_drawing_rectangle_box_finalize;
}


static void unity_places_cairo_drawing_rectangle_box_instance_init (UnityPlacesCairoDrawingRectangleBox * self) {
      self->Width = 0;
      self->Height = 0;
}


static void unity_places_cairo_drawing_rectangle_box_finalize (GObject* obj) {
      UnityPlacesCairoDrawingRectangleBox * self;
      self = UNITY_PLACES_CAIRO_DRAWING_RECTANGLE_BOX (obj);
      _g_object_unref0 (self->cairotxt);
      G_OBJECT_CLASS (unity_places_cairo_drawing_rectangle_box_parent_class)->finalize (obj);
}


GType unity_places_cairo_drawing_rectangle_box_get_type (void) {
      static volatile gsize unity_places_cairo_drawing_rectangle_box_type_id__volatile = 0;
      if (g_once_init_enter (&unity_places_cairo_drawing_rectangle_box_type_id__volatile)) {
            static const GTypeInfo g_define_type_info = { sizeof (UnityPlacesCairoDrawingRectangleBoxClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) unity_places_cairo_drawing_rectangle_box_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (UnityPlacesCairoDrawingRectangleBox), 0, (GInstanceInitFunc) unity_places_cairo_drawing_rectangle_box_instance_init, NULL };
            GType unity_places_cairo_drawing_rectangle_box_type_id;
            unity_places_cairo_drawing_rectangle_box_type_id = g_type_register_static (CTK_TYPE_BIN, "UnityPlacesCairoDrawingRectangleBox", &g_define_type_info, 0);
            g_once_init_leave (&unity_places_cairo_drawing_rectangle_box_type_id__volatile, unity_places_cairo_drawing_rectangle_box_type_id);
      }
      return unity_places_cairo_drawing_rectangle_box_type_id__volatile;
}


UnityPlacesCairoDrawingEntryBackground* unity_places_cairo_drawing_entry_background_construct (GType object_type) {
      UnityPlacesCairoDrawingEntryBackground * self;
      ClutterCairoTexture* _tmp0_;
      self = g_object_newv (object_type, 0, NULL);
      self->cairotxt = (_tmp0_ = g_object_ref_sink ((ClutterCairoTexture*) clutter_cairo_texture_new ((guint) 120, (guint) 24)), _g_object_unref0 (self->cairotxt), _tmp0_);
      clutter_container_add_actor ((ClutterContainer*) self, (ClutterActor*) self->cairotxt);
      return self;
}


UnityPlacesCairoDrawingEntryBackground* unity_places_cairo_drawing_entry_background_new (void) {
      return unity_places_cairo_drawing_entry_background_construct (UNITY_PLACES_CAIRO_DRAWING_TYPE_ENTRY_BACKGROUND);
}


void unity_places_cairo_drawing_entry_background_create_search_entry_background (UnityPlacesCairoDrawingEntryBackground* self, gint W, gint H) {
      cairo_t* cairoctx;
      g_return_if_fail (self != NULL);
      self->Width = W;
      self->Height = H;
      cairoctx = clutter_cairo_texture_create (self->cairotxt);
      {
            cairo_set_operator (cairoctx, CAIRO_OPERATOR_CLEAR);
            cairo_paint (cairoctx);
            cairo_set_operator (cairoctx, CAIRO_OPERATOR_OVER);
            cairo_translate (cairoctx, (double) (-0.5f), (double) (-0.5f));
            cairo_set_source_rgba (cairoctx, 1.0, 1.0, 1.0, 0.9);
            cairo_set_line_width (cairoctx, 1.0);
            cairo_move_to (cairoctx, (double) 10, (double) 1);
            cairo_line_to (cairoctx, (double) (self->Width - 10), (double) 1);
            cairo_curve_to (cairoctx, (double) (self->Width - 5), 1.0, (double) (self->Width - 1), 5.0, (double) (self->Width - 1), (double) (self->Height / 2.0));
            cairo_curve_to (cairoctx, (double) (self->Width - 1), (double) ((self->Height / 2.0) + 5.0), (double) (self->Width - 5), (double) (self->Height - 2), (double) (self->Width - 10), (double) (self->Height - 2));
            cairo_line_to (cairoctx, (double) 10, (double) (self->Height - 2));
            cairo_curve_to (cairoctx, 5.0, (double) (self->Height - 2), 1.0, (double) ((self->Height / 2.0) + 5.0), 1.0, (double) (self->Height / 2.0));
            cairo_curve_to (cairoctx, 1.0, 5.0, 5.0, 1.0, 10.0, 1.0);
            cairo_fill (cairoctx);
      }
      clutter_actor_set_opacity ((ClutterActor*) self->cairotxt, (guint8) 0xFF);
      _cairo_destroy0 (cairoctx);
}


static GObject * unity_places_cairo_drawing_entry_background_constructor (GType type, guint n_construct_properties, GObjectConstructParam * construct_properties) {
      GObject * obj;
      GObjectClass * parent_class;
      UnityPlacesCairoDrawingEntryBackground * self;
      parent_class = G_OBJECT_CLASS (unity_places_cairo_drawing_entry_background_parent_class);
      obj = parent_class->constructor (type, n_construct_properties, construct_properties);
      self = UNITY_PLACES_CAIRO_DRAWING_ENTRY_BACKGROUND (obj);
      {
      }
      return obj;
}


static void unity_places_cairo_drawing_entry_background_class_init (UnityPlacesCairoDrawingEntryBackgroundClass * klass) {
      unity_places_cairo_drawing_entry_background_parent_class = g_type_class_peek_parent (klass);
      G_OBJECT_CLASS (klass)->constructor = unity_places_cairo_drawing_entry_background_constructor;
      G_OBJECT_CLASS (klass)->finalize = unity_places_cairo_drawing_entry_background_finalize;
}


static void unity_places_cairo_drawing_entry_background_instance_init (UnityPlacesCairoDrawingEntryBackground * self) {
      self->Width = 0;
      self->Height = 0;
}


static void unity_places_cairo_drawing_entry_background_finalize (GObject* obj) {
      UnityPlacesCairoDrawingEntryBackground * self;
      self = UNITY_PLACES_CAIRO_DRAWING_ENTRY_BACKGROUND (obj);
      _g_object_unref0 (self->cairotxt);
      G_OBJECT_CLASS (unity_places_cairo_drawing_entry_background_parent_class)->finalize (obj);
}


GType unity_places_cairo_drawing_entry_background_get_type (void) {
      static volatile gsize unity_places_cairo_drawing_entry_background_type_id__volatile = 0;
      if (g_once_init_enter (&unity_places_cairo_drawing_entry_background_type_id__volatile)) {
            static const GTypeInfo g_define_type_info = { sizeof (UnityPlacesCairoDrawingEntryBackgroundClass), (GBaseInitFunc) NULL, (GBaseFinalizeFunc) NULL, (GClassInitFunc) unity_places_cairo_drawing_entry_background_class_init, (GClassFinalizeFunc) NULL, NULL, sizeof (UnityPlacesCairoDrawingEntryBackground), 0, (GInstanceInitFunc) unity_places_cairo_drawing_entry_background_instance_init, NULL };
            GType unity_places_cairo_drawing_entry_background_type_id;
            unity_places_cairo_drawing_entry_background_type_id = g_type_register_static (CTK_TYPE_BIN, "UnityPlacesCairoDrawingEntryBackground", &g_define_type_info, 0);
            g_once_init_leave (&unity_places_cairo_drawing_entry_background_type_id__volatile, unity_places_cairo_drawing_entry_background_type_id);
      }
      return unity_places_cairo_drawing_entry_background_type_id__volatile;
}





Generated by  Doxygen 1.6.0   Back to index