2014-06-20 03:14:59 -07:00
|
|
|
class Colourable (Eo.Base)
|
2014-05-02 15:55:51 -07:00
|
|
|
{
|
|
|
|
/*@ Colourable class. */
|
|
|
|
legacy_prefix: legacy;
|
2014-06-19 15:54:36 -07:00
|
|
|
data: Colourable_Data;
|
2014-05-02 15:55:51 -07:00
|
|
|
constructors {
|
|
|
|
constructor {
|
|
|
|
/*@ Default constructor. */
|
|
|
|
}
|
|
|
|
rgb_composite_constructor {
|
|
|
|
/*@ Composite RGB Constructor. */
|
|
|
|
params {
|
|
|
|
@in int r; /*@ The red component. */
|
|
|
|
@in int g; /*@ The green component. */
|
|
|
|
@in int b; /*@ The blue component. */
|
2014-06-19 15:54:36 -07:00
|
|
|
}
|
|
|
|
}
|
2014-05-02 15:55:51 -07:00
|
|
|
rgb_24bits_constructor {
|
|
|
|
/*@ RGB Constructor. */
|
|
|
|
params {
|
|
|
|
@in int rgb; /*@ 24-bit RGB Component. */
|
2014-06-19 15:54:36 -07:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2014-05-02 15:55:51 -07:00
|
|
|
methods {
|
2014-06-19 15:54:36 -07:00
|
|
|
print_colour { /*@ Print the RGB colour. */ }
|
2014-05-02 15:55:51 -07:00
|
|
|
colour_mask {
|
|
|
|
/*@ The masked RGB value. */
|
|
|
|
params {
|
|
|
|
@in int mask; /*@ The colour mask to be applied to current RGB value. */
|
2014-06-19 15:54:36 -07:00
|
|
|
}
|
|
|
|
return int; /*@ The RGB colour. */
|
|
|
|
}
|
|
|
|
}
|
2014-05-02 15:55:51 -07:00
|
|
|
properties {
|
|
|
|
colour {
|
|
|
|
set {
|
|
|
|
/*@ Sets a 24-bit RGB colour. */
|
2014-06-19 15:54:36 -07:00
|
|
|
}
|
2014-05-02 15:55:51 -07:00
|
|
|
get {
|
|
|
|
/*@ Gets the 24-bit RGB colour. */
|
2014-06-19 15:54:36 -07:00
|
|
|
}
|
2014-05-02 15:55:51 -07:00
|
|
|
values {
|
|
|
|
int rgb; /*@ The RGB colour value. */
|
2014-06-19 15:54:36 -07:00
|
|
|
}
|
|
|
|
}
|
2014-05-02 15:55:51 -07:00
|
|
|
composite_colour {
|
|
|
|
set {
|
|
|
|
/*@ Sets a composite RGB colour. */
|
2014-06-19 15:54:36 -07:00
|
|
|
}
|
2014-05-02 15:55:51 -07:00
|
|
|
get {
|
|
|
|
/*@ Gets the composite RGB colour. */
|
2014-06-19 15:54:36 -07:00
|
|
|
}
|
2014-05-02 15:55:51 -07:00
|
|
|
values {
|
|
|
|
int r; /*@ The red component. */
|
|
|
|
int g; /*@ The green component. */
|
|
|
|
int b; /*@ The blue component. */
|
2014-06-19 15:54:36 -07:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2014-05-02 15:55:51 -07:00
|
|
|
events {
|
|
|
|
colour_changed(int);
|
2014-06-19 15:54:36 -07:00
|
|
|
}
|
|
|
|
}
|