RBRating

RBRating — widget for displaying song ratings

Functions

Properties

gdouble rating Read / Write

Types and Values

struct RBRating
struct RBRatingClass

Object Hierarchy

    GObject
    ╰── GInitiallyUnowned
        ╰── GtkWidget
            ╰── RBRating

Implemented Interfaces

RBRating implements AtkImplementorIface and GtkBuildable.

Description

This widget displays a rating (0-5 stars) and allows the user to alter the rating by clicking.

Functions

rb_rating_new ()

RBRating *
rb_rating_new (void);

Creates a new rating widget

Returns

a new RBRating widget.

Types and Values

struct RBRating

struct RBRating;

struct RBRatingClass

struct RBRatingClass {
	GtkWidgetClass parent;

	void (*rated) (RBRating *rating, double score);
	gboolean (*set_rating) (RBRating *rating, double score);
	gboolean (*adjust_rating) (RBRating *rating, double adjust);
};

Property Details

The “rating” property

  “rating”                   gdouble

The rating displayed in the widget, as a floating point value between 0.0 and 5.0.

Flags: Read / Write

Allowed values: [0,5]

Default value: 2.5

Signal Details

The “adjust-rating” signal

void
user_function (RBRating *rating,
               gdouble   adjust,
               gpointer  user_data)

Action signal used to make a relative adjustment to the rating.

Parameters

rating

the RBRating

 

adjust

value to add to the rating

 

user_data

user data set when the signal handler was connected.

 

Flags: Action


The “rated” signal

void
user_function (RBRating *rating,
               gdouble   score,
               gpointer  user_data)

Emitted when the user changes the rating.

Parameters

rating

the RBRating

 

score

the new rating

 

user_data

user data set when the signal handler was connected.

 

Flags: Run Last


The “set-rating” signal

void
user_function (RBRating *rating,
               gdouble   score,
               gpointer  user_data)

Action signal used to change the rating.

Parameters

rating

the RBRating

 

score

the new rating

 

user_data

user data set when the signal handler was connected.

 

Flags: Action