AgsConversion

AgsConversion — abstract conversion

Stability Level

Stable, unless otherwise indicated

Functions

Properties

char * description Read / Write
char * name Read / Write

Signals

double convert Run Last

Object Hierarchy

    GObject
    ╰── AgsConversion

Includes

#include <ags/lib/ags_conversion.h>

Description

AgsConversion does a zero conversion it returns during ::convert() the very same value.

Functions

AGS_CONVERSION_GET_OBJ_MUTEX()

#define AGS_CONVERSION_GET_OBJ_MUTEX(obj) (&(((AgsConversion *) obj)->obj_mutex))

ags_conversion_convert ()

gdouble
ags_conversion_convert (AgsConversion *conversion,
                        gdouble x,
                        gboolean reverse);

Convert a value if reverse is FALSE then use the target format otherwise if TRUE convert back to original format.

Parameters

conversion

the AgsConversion

 

x

the value to convert

 

reverse

the direction to convert

 

Returns

the converted value as gdouble

Since: 3.0.0


ags_conversion_new ()

AgsConversion *
ags_conversion_new ();

Instantiate a new AgsConversion.

Returns

the new instance

Since: 3.0.0

Property Details

The “description” property

  “description”              char *

The description of the conversion.

Owner: AgsConversion

Flags: Read / Write

Default value: NULL

Since: 3.0.0


The “name” property

  “name”                     char *

The name of the conversion.

Owner: AgsConversion

Flags: Read / Write

Default value: NULL

Since: 3.0.0

Signal Details

The “convert” signal

double
user_function (AgsConversion *conversion,
               double         x,
               gboolean       reverse,
               gpointer       user_data)

The ::convert signal notifies about converted value.

Parameters

conversion

the AgsConversion to modify

 

x

the value to convert

 

reverse

the direction to translate

 

user_data

user data set when the signal handler was connected.

 

Returns

the converted value

Flags: Run Last

Since: 3.0.0