static void
clutter_behaviour_opacity_class_init (ClutterBehaviourOpacityClass *klass)
{
  GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
  ClutterBehaviourClass *behave_class = CLUTTER_BEHAVIOUR_CLASS (klass);
  GParamSpec *pspec;

  g_type_class_add_private (klass, sizeof (ClutterBehaviourOpacityPrivate));

  gobject_class->set_property = clutter_behaviour_opacity_set_property;
  gobject_class->get_property = clutter_behaviour_opacity_get_property;

  /**
   * ClutterBehaviourOpacity:opacity-start:
   *
   * Initial opacity level of the behaviour.
   *
   * Since: 0.2
   *
   * Deprecated: 1.6
   */
  pspec = g_param_spec_uint ("opacity-start",
                             P_("Opacity Start"),
                             P_("Initial opacity level"),
                             0, 255,
                             0,
                             CLUTTER_PARAM_READWRITE);
  obj_props[PROP_OPACITY_START] = pspec;
  g_object_class_install_property (gobject_class, PROP_OPACITY_START, pspec);

  /**
   * ClutterBehaviourOpacity:opacity-end:
   *
   * Final opacity level of the behaviour.
   *
   * Since: 0.2
   *
   * Deprecated: 1.6
   */
  pspec = g_param_spec_uint ("opacity-end",
                             P_("Opacity End"),
                             P_("Final opacity level"),
                             0, 255,
                             0,
                             CLUTTER_PARAM_READWRITE);
  obj_props[PROP_OPACITY_END] = pspec;
  g_object_class_install_property (gobject_class, PROP_OPACITY_END, pspec);

  behave_class->alpha_notify = clutter_behaviour_alpha_notify;
}
Exemplo n.º 2
0
static void
clutter_behaviour_path_class_init (ClutterBehaviourPathClass *klass)
{
  GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
  ClutterBehaviourClass *behave_class = CLUTTER_BEHAVIOUR_CLASS (klass);
  GParamSpec *pspec;

  gobject_class->get_property = clutter_behaviour_path_get_property;
  gobject_class->set_property = clutter_behaviour_path_set_property;
  gobject_class->dispose = clutter_behaviour_path_dispose;

  pspec = g_param_spec_object ("path",
                               P_("Path"),
                               P_("The ClutterPath object representing the path "
                                  "to animate along"),
                               CLUTTER_TYPE_PATH,
                               CLUTTER_PARAM_READWRITE);
  obj_props[PROP_PATH] = pspec;
  g_object_class_install_property (gobject_class, PROP_PATH, pspec);

  /**
   * ClutterBehaviourPath::knot-reached:
   * @pathb: the object which received the signal
   * @knot_num: the index of the #ClutterKnot reached
   *
   * This signal is emitted each time a node defined inside the path
   * is reached.
   *
   * Since: 0.2
   *
   * Deprecated: 1.6
   */
  path_signals[KNOT_REACHED] =
    g_signal_new ("knot-reached",
                  G_TYPE_FROM_CLASS (gobject_class),
                  G_SIGNAL_RUN_LAST,
                  G_STRUCT_OFFSET (ClutterBehaviourPathClass, knot_reached),
                  NULL, NULL,
                  _clutter_marshal_VOID__UINT,
                  G_TYPE_NONE, 1,
                  G_TYPE_UINT);

  behave_class->alpha_notify = clutter_behaviour_path_alpha_notify;

  g_type_class_add_private (klass, sizeof (ClutterBehaviourPathPrivate));
}
static void
clutter_behaviour_ellipse_class_init (ClutterBehaviourEllipseClass *klass)
{
    GObjectClass          *object_class = G_OBJECT_CLASS (klass);
    ClutterBehaviourClass *behave_class = CLUTTER_BEHAVIOUR_CLASS (klass);
    GParamSpec            *pspec        = NULL;

    g_type_class_add_private (klass, sizeof (ClutterBehaviourEllipsePrivate));

    object_class->set_property = clutter_behaviour_ellipse_set_property;
    object_class->get_property = clutter_behaviour_ellipse_get_property;

    behave_class->alpha_notify = clutter_behaviour_ellipse_alpha_notify;
    behave_class->applied = clutter_behaviour_ellipse_applied;

    /**
     * ClutterBehaviourEllipse:angle-start:
     *
     * The initial angle from where the rotation should start.
     *
     * Since: 0.4
     */
    pspec = g_param_spec_double ("angle-start",
                                 P_("Start Angle"),
                                 P_("Initial angle"),
                                 0.0, 360.0,
                                 0.0,
                                 CLUTTER_PARAM_READWRITE);
    obj_props[PROP_ANGLE_START] = pspec;
    g_object_class_install_property (object_class, PROP_ANGLE_START, pspec);

    /**
     * ClutterBehaviourEllipse:angle-end:
     *
     * The final angle to where the rotation should end.
     *
     * Since: 0.4
     */
    pspec = g_param_spec_double ("angle-end",
                                 P_("End Angle"),
                                 P_("Final angle"),
                                 0.0, 360.0,
                                 0.0,
                                 CLUTTER_PARAM_READWRITE);
    obj_props[PROP_ANGLE_END] = pspec;
    g_object_class_install_property (object_class, PROP_ANGLE_END, pspec);

    /**
     * ClutterBehaviourEllipse:angle-tilt-x:
     *
     * The tilt angle for the rotation around center in X axis
     *
     * Since: 0.4
     */
    pspec = g_param_spec_double ("angle-tilt-x",
                                 P_("Angle x tilt"),
                                 P_("Tilt of the ellipse around x axis"),
                                 0.0, 360.0,
                                 360.0,
                                 CLUTTER_PARAM_READWRITE);
    obj_props[PROP_ANGLE_TILT_X] = pspec;
    g_object_class_install_property (object_class, PROP_ANGLE_TILT_X, pspec);

    /**
     * ClutterBehaviourEllipse:angle-tilt-y:
     *
     * The tilt angle for the rotation around center in Y axis
     *
     * Since: 0.4
     */
    pspec = g_param_spec_double ("angle-tilt-y",
                                 P_("Angle y tilt"),
                                 P_("Tilt of the ellipse around y axis"),
                                 0.0, 360.0,
                                 360.0,
                                 CLUTTER_PARAM_READWRITE);
    obj_props[PROP_ANGLE_TILT_Y] = pspec;
    g_object_class_install_property (object_class, PROP_ANGLE_TILT_Y, pspec);

    /**
     * ClutterBehaviourEllipse:angle-tilt-z:
     *
     * The tilt angle for the rotation on the Z axis
     *
     * Since: 0.4
     */
    pspec = g_param_spec_double ("angle-tilt-z",
                                 P_("Angle z tilt"),
                                 P_("Tilt of the ellipse around z axis"),
                                 0.0, 360.0,
                                 360.0,
                                 CLUTTER_PARAM_READWRITE);
    obj_props[PROP_ANGLE_TILT_Z] = pspec;
    g_object_class_install_property (object_class, PROP_ANGLE_TILT_Z, pspec);

    /**
     * ClutterBehaviourEllipse:width:
     *
     * Width of the ellipse, in pixels
     *
     * Since: 0.4
     */
    pspec = g_param_spec_int ("width",
                              P_("Width"),
                              P_("Width of the ellipse"),
                              0, G_MAXINT,
                              100,
                              CLUTTER_PARAM_READWRITE);
    obj_props[PROP_WIDTH] = pspec;
    g_object_class_install_property (object_class, PROP_WIDTH, pspec);

    /**
     * ClutterBehaviourEllipse:height:
     *
     * Height of the ellipse, in pixels
     *
     * Since: 0.4
     */
    pspec = g_param_spec_int ("height",
                              P_("Height"),
                              P_("Height of ellipse"),
                              0, G_MAXINT,
                              50,
                              CLUTTER_PARAM_READWRITE);
    obj_props[PROP_HEIGHT] = pspec;
    g_object_class_install_property (object_class, PROP_HEIGHT, pspec);

    /**
     * ClutterBehaviourEllipse:center:
     *
     * The center of the ellipse.
     *
     * Since: 0.4
     */
    pspec = g_param_spec_boxed ("center",
                                P_("Center"),
                                P_("Center of ellipse"),
                                CLUTTER_TYPE_KNOT,
                                CLUTTER_PARAM_READWRITE);
    obj_props[PROP_CENTER] = pspec;
    g_object_class_install_property (object_class, PROP_CENTER, pspec);

    /**
     * ClutterBehaviourEllipse:direction:
     *
     * The direction of the rotation.
     *
     * Since: 0.4
     */
    pspec = g_param_spec_enum ("direction",
                               P_("Direction"),
                               P_("Direction of rotation"),
                               CLUTTER_TYPE_ROTATE_DIRECTION,
                               CLUTTER_ROTATE_CW,
                               CLUTTER_PARAM_READWRITE);
    obj_props[PROP_DIRECTION] = pspec;
    g_object_class_install_property (object_class, PROP_DIRECTION, pspec);
}
static void
clutter_behaviour_rotate_class_init (ClutterBehaviourRotateClass *klass)
{
  GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
  ClutterBehaviourClass *behaviour_class = CLUTTER_BEHAVIOUR_CLASS (klass);
  GParamSpec *pspec = NULL;

  g_type_class_add_private (klass, sizeof (ClutterBehaviourRotatePrivate));

  gobject_class->set_property = clutter_behaviour_rotate_set_property;
  gobject_class->get_property = clutter_behaviour_rotate_get_property;

  behaviour_class->alpha_notify = clutter_behaviour_rotate_alpha_notify;

  /**
   * ClutterBehaviourRotate:angle-start:
   *
   * The initial angle from whence the rotation should start.
   *
   * Since: 0.4
   */
  pspec = g_param_spec_double ("angle-start",
                               P_("Angle Begin"),
                               P_("Initial angle"),
                               0.0, 360.0,
                               0.0,
                               CLUTTER_PARAM_READWRITE);
  obj_props[PROP_ANGLE_START] = pspec;
  g_object_class_install_property (gobject_class,
                                   PROP_ANGLE_START,
                                   pspec);

  /**
   * ClutterBehaviourRotate:angle-end:
   *
   * The final angle to where the rotation should end.
   *
   * Since: 0.4
   */
  pspec = g_param_spec_double ("angle-end",
                               P_("Angle End"),
                               P_("Final angle"),
                               0.0, 360.0,
                               0.0,
                               CLUTTER_PARAM_READWRITE);
  obj_props[PROP_ANGLE_END] = pspec;
  g_object_class_install_property (gobject_class,
                                   PROP_ANGLE_END,
                                   pspec);

  /**
   * ClutterBehaviourRotate:axis:
   *
   * The axis of rotation.
   *
   * Since: 0.4
   */
  pspec = g_param_spec_enum ("axis",
                             P_("Axis"),
                             P_("Axis of rotation"),
                             CLUTTER_TYPE_ROTATE_AXIS,
                             CLUTTER_Z_AXIS,
                             CLUTTER_PARAM_READWRITE);
  obj_props[PROP_AXIS] = pspec;
  g_object_class_install_property (gobject_class,
                                   PROP_AXIS,
                                   pspec);

  /**
   * ClutterBehaviourRotate:direction:
   *
   * The direction of the rotation.
   *
   * Since: 0.4
   */
  pspec = g_param_spec_enum ("direction",
                             P_("Direction"),
                             P_("Direction of rotation"),
                             CLUTTER_TYPE_ROTATE_DIRECTION,
                             CLUTTER_ROTATE_CW,
                             CLUTTER_PARAM_READWRITE);
  obj_props[PROP_DIRECTION] = pspec;
  g_object_class_install_property (gobject_class,
                                   PROP_DIRECTION,
                                   pspec);

  /**
   * ClutterBehaviourRotate:center-x:
   *
   * The x center of rotation.
   *
   * Since: 0.4
   */
  pspec = g_param_spec_int ("center-x",
                            P_("Center X"),
                            P_("X coordinate of the center of rotation"),
                            -G_MAXINT, G_MAXINT,
                            0,
                            CLUTTER_PARAM_READWRITE);
  obj_props[PROP_CENTER_X] = pspec;
  g_object_class_install_property (gobject_class,
                                   PROP_CENTER_X,
                                   pspec);

  /**
   * ClutterBehaviourRotate:center-y:
   *
   * The y center of rotation.
   *
   * Since: 0.4
   */
  pspec = g_param_spec_int ("center-y",
                            P_("Center Y"),
                            P_("Y coordinate of the center of rotation"),
                            -G_MAXINT, G_MAXINT,
                            0,
                            CLUTTER_PARAM_READWRITE);
  obj_props[PROP_CENTER_Y] = pspec;
  g_object_class_install_property (gobject_class,
                                   PROP_CENTER_Y,
                                   pspec);

  /**
   * ClutterBehaviourRotate:center-z:
   *
   * The z center of rotation.
   *
   * Since: 0.4
   */
  pspec = g_param_spec_int ("center-z",
                            P_("Center Z"),
                            P_("Z coordinate of the center of rotation"),
                            -G_MAXINT, G_MAXINT,
                            0,
                            CLUTTER_PARAM_READWRITE);
  obj_props[PROP_CENTER_Z] = pspec;
  g_object_class_install_property (gobject_class,
                                   PROP_CENTER_Z,
                                   pspec);
}