Ejemplo n.º 1
0
static void
mx_fade_effect_set_property (GObject      *object,
                             guint         property_id,
                             const GValue *value,
                             GParamSpec   *pspec)
{
  MxFadeEffect *effect = MX_FADE_EFFECT (object);
  MxFadeEffectPrivate *priv = effect->priv;

  switch (property_id)
    {
    case PROP_BOUNDS_X:
      priv->x = g_value_get_int (value);
      break;

    case PROP_BOUNDS_Y:
      priv->y = g_value_get_int (value);
      break;

    case PROP_BOUNDS_WIDTH:
      priv->bounds_width = g_value_get_uint (value);
      break;

    case PROP_BOUNDS_HEIGHT:
      priv->bounds_height = g_value_get_uint (value);
      break;

    case PROP_BORDER_TOP:
      priv->border[0] = g_value_get_uint (value);
      break;

    case PROP_BORDER_RIGHT:
      priv->border[1] = g_value_get_uint (value);
      break;

    case PROP_BORDER_BOTTOM:
      priv->border[2] = g_value_get_uint (value);
      break;

    case PROP_BORDER_LEFT:
      priv->border[3] = g_value_get_uint (value);
      break;

    case PROP_COLOR:
      priv->color = *(clutter_value_get_color (value));
      break;

    case PROP_FREEZE_UPDATE:
      priv->freeze_update = g_value_get_boolean (value);
      return;

    default:
      G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
      return;
    }

  priv->update_vbo = TRUE;
}
Ejemplo n.º 2
0
static void
clutter_colorize_effect_set_property (GObject      *gobject,
                                      guint         prop_id,
                                      const GValue *value,
                                      GParamSpec   *pspec)
{
  ClutterColorizeEffect *effect = CLUTTER_COLORIZE_EFFECT (gobject);

  switch (prop_id)
    {
    case PROP_TINT:
      clutter_colorize_effect_set_tint (effect,
                                        clutter_value_get_color (value));
      break;

    default:
      G_OBJECT_WARN_INVALID_PROPERTY_ID (gobject, prop_id, pspec);
      break;
    }
}
Ejemplo n.º 3
0
static void
clutter_box_set_property (GObject      *gobject,
                          guint         prop_id,
                          const GValue *value,
                          GParamSpec   *pspec)
{
  ClutterBox *self = CLUTTER_BOX (gobject);

  switch (prop_id)
    {
    case PROP_LAYOUT_MANAGER:
      set_layout_manager (self, g_value_get_object (value));
      break;

    case PROP_COLOR:
      clutter_box_set_color (self, clutter_value_get_color (value));
      break;

    default:
      G_OBJECT_WARN_INVALID_PROPERTY_ID (gobject, prop_id, pspec);
      break;
    }
}
Ejemplo n.º 4
0
/* Set/get properties */
static void _xfdashboard_text_box_set_property(GObject *inObject,
												guint inPropID,
												const GValue *inValue,
												GParamSpec *inSpec)
{
	XfdashboardTextBox			*self=XFDASHBOARD_TEXT_BOX(inObject);

	switch(inPropID)
	{
		case PROP_PADDING:
			xfdashboard_text_box_set_padding(self, g_value_get_float(inValue));
			break;

		case PROP_SPACING:
			xfdashboard_text_box_set_spacing(self, g_value_get_float(inValue));
			break;

		case PROP_EDITABLE:
			xfdashboard_text_box_set_editable(self, g_value_get_boolean(inValue));
			break;

		case PROP_PRIMARY_ICON_NAME:
			xfdashboard_text_box_set_primary_icon(self, g_value_get_string(inValue));
			break;

		case PROP_SECONDARY_ICON_NAME:
			xfdashboard_text_box_set_secondary_icon(self, g_value_get_string(inValue));
			break;

		case PROP_TEXT:
			xfdashboard_text_box_set_text(self, g_value_get_string(inValue));
			break;

		case PROP_TEXT_FONT:
			xfdashboard_text_box_set_text_font(self, g_value_get_string(inValue));
			break;

		case PROP_TEXT_COLOR:
			xfdashboard_text_box_set_text_color(self, clutter_value_get_color(inValue));
			break;

		case PROP_SELECTION_TEXT_COLOR:
			xfdashboard_text_box_set_selection_text_color(self, clutter_value_get_color(inValue));
			break;

		case PROP_SELECTION_BACKGROUND_COLOR:
			xfdashboard_text_box_set_selection_background_color(self, clutter_value_get_color(inValue));
			break;

		case PROP_HINT_TEXT:
			xfdashboard_text_box_set_hint_text(self, g_value_get_string(inValue));
			break;

		case PROP_HINT_TEXT_FONT:
			xfdashboard_text_box_set_hint_text_font(self, g_value_get_string(inValue));
			break;

		case PROP_HINT_TEXT_COLOR:
			xfdashboard_text_box_set_hint_text_color(self, clutter_value_get_color(inValue));
			break;

		default:
			G_OBJECT_WARN_INVALID_PROPERTY_ID(inObject, inPropID, inSpec);
			break;
	}
}