examples/eolian_cxx/colourable.eo

71 lines
1.9 KiB
Plaintext

class Colourable (Eo.Base)
{
/*@ Colourable class. */
legacy_prefix: legacy;
data: Colourable_Data;
methods {
constructor {
/*@ Default constructor. */
legacy: null;
}
rgb_composite_constructor {
/*@ Composite RGB Constructor. */
legacy: null;
params {
@in int r; /*@ The red component. */
@in int g; /*@ The green component. */
@in int b; /*@ The blue component. */
}
}
rgb_24bits_constructor {
/*@ RGB Constructor. */
legacy: null;
params {
@in int rgb; /*@ 24-bit RGB Component. */
}
}
print_colour { /*@ Print the RGB colour. */ }
colour_mask {
/*@ The masked RGB value. */
params {
@in int mask; /*@ The colour mask to be applied to current RGB value. */
}
return: int; /*@ The RGB colour. */
}
}
properties {
colour {
set {
/*@ Sets a 24-bit RGB colour. */
}
get {
/*@ Gets the 24-bit RGB colour. */
}
values {
int rgb; /*@ The RGB colour value. */
}
}
composite_colour {
set {
/*@ Sets a composite RGB colour. */
}
get {
/*@ Gets the composite RGB colour. */
}
values {
int r; /*@ The red component. */
int g; /*@ The green component. */
int b; /*@ The blue component. */
}
}
}
constructors {
.constructor;
.rgb_composite_constructor;
.rgb_24bits_constructor;
}
events {
colour_changed: int;
}
}