Download

Support

Ewl_Spectrum: The colour spectrum widget


Detailed Description

Defines a colour spectrum widget

Remarks:
Inherits from Ewl_Container.


Data Structures

struct  Ewl_Spectrum
 Inherits from Ewl_Container and extends to provide a colour spectrum. More...

Defines

#define EWL_SPECTRUM(sp)   ((Ewl_Spectrum *)sp)
#define EWL_SPECTRUM_IS(w)   (ewl_widget_type_is(EWL_WIDGET(w), EWL_SPECTRUM_TYPE))
#define EWL_SPECTRUM_TYPE   "spectrum"

Typedefs

typedef Ewl_Spectrum Ewl_Spectrum

Functions

void ewl_spectrum_canvas_cb_reveal (Ewl_Widget *w, void *ev, void *data)
void ewl_spectrum_cb_configure (Ewl_Widget *w, void *ev, void *data)
void ewl_spectrum_cb_mouse_down (Ewl_Widget *w, void *ev, void *data)
void ewl_spectrum_cb_mouse_move (Ewl_Widget *w, void *ev, void *data)
void ewl_spectrum_cb_mouse_up (Ewl_Widget *w, void *ev, void *data)
void ewl_spectrum_hsv_get (Ewl_Spectrum *sp, double *h, double *s, double *v)
 Get the HSV value from the spectrum.
void ewl_spectrum_hsv_set (Ewl_Spectrum *sp, double h, double s, double v)
 Set the HSV values for the spectrum.
int ewl_spectrum_init (Ewl_Spectrum *sp)
 Initializes an Ewl_Specturm widget to default values.
Ewl_Color_Mode ewl_spectrum_mode_get (Ewl_Spectrum *sp)
 Get the mode of the spectrum.
void ewl_spectrum_mode_set (Ewl_Spectrum *sp, Ewl_Color_Mode mode)
 Set the mode of the spectrum.
Ewl_Widgetewl_spectrum_new (void)
 Creates a new Ewl_Spectrum widget.
void ewl_spectrum_rgb_get (Ewl_Spectrum *sp, unsigned int *r, unsigned int *g, unsigned int *b)
 Get the RGB values for the spectrum.
void ewl_spectrum_rgb_set (Ewl_Spectrum *sp, unsigned int r, unsigned int g, unsigned int b)
 Set the RGB values for the spectrum.
Ewl_Spectrum_Type ewl_spectrum_type_get (Ewl_Spectrum *sp)
 Get the type of the spectrum.
void ewl_spectrum_type_set (Ewl_Spectrum *sp, Ewl_Spectrum_Type type)
 Set the type of the spectrum.

Define Documentation

#define EWL_SPECTRUM ( sp   )     ((Ewl_Spectrum *)sp)

Typecasts a pointer to an Ewl_Spectrum pointer.

#define EWL_SPECTRUM_IS (  )     (ewl_widget_type_is(EWL_WIDGET(w), EWL_SPECTRUM_TYPE))

Returns TRUE if the widget is an Ewl_Spectrum, FALSE otherwise

#define EWL_SPECTRUM_TYPE   "spectrum"

The type name for the Ewl_Spectrum widget


Typedef Documentation

typedef struct Ewl_Spectrum Ewl_Spectrum

Provides a colour spectrum.


Function Documentation

void ewl_spectrum_canvas_cb_reveal ( Ewl_Widget w,
void *  ev,
void *  data 
)

void ewl_spectrum_cb_configure ( Ewl_Widget w,
void *  ev,
void *  data 
)

void ewl_spectrum_cb_mouse_down ( Ewl_Widget w,
void *  ev,
void *  data 
)

void ewl_spectrum_cb_mouse_move ( Ewl_Widget w,
void *  ev,
void *  data 
)

void ewl_spectrum_cb_mouse_up ( Ewl_Widget w,
void *  ev,
void *  data 
)

void ewl_spectrum_hsv_get ( Ewl_Spectrum sp,
double *  h,
double *  s,
double *  v 
)

Get the HSV value from the spectrum.

Parameters:
sp,: The Ewl_Spectrum to get the hsv values from
h,: Where to place the hue
s,: Where to place the saturation
v,: Where to place the value
Returns:
Returns no value.

void ewl_spectrum_hsv_set ( Ewl_Spectrum sp,
double  h,
double  s,
double  v 
)

Set the HSV values for the spectrum.

Parameters:
sp,: The Ewl_Spectrum to set the hsv value into
h,: The hue to set
s,: The saturation to set
v,: The value to set
Returns:
Returns no value

int ewl_spectrum_init ( Ewl_Spectrum sp  ) 

Initializes an Ewl_Specturm widget to default values.

Parameters:
sp,: The Ewl_Spectrum to init
Returns:
Returns TRUE on success or FALSE on failure

Ewl_Color_Mode ewl_spectrum_mode_get ( Ewl_Spectrum sp  ) 

Get the mode of the spectrum.

Parameters:
sp,: The Ewl_Spectrum to get the mode from
Returns:
Returns the mode of the spectrum

void ewl_spectrum_mode_set ( Ewl_Spectrum sp,
Ewl_Color_Mode  mode 
)

Set the mode of the spectrum.

Parameters:
sp,: The Ewl_Spectrum to set the mode on
mode,: The mode to set the spectrum too
Returns:
Returns no value.

Ewl_Widget* ewl_spectrum_new ( void   ) 

Creates a new Ewl_Spectrum widget.

Returns:
Returns a new Ewl_Spectrum widget or NULL on failure

void ewl_spectrum_rgb_get ( Ewl_Spectrum sp,
unsigned int *  r,
unsigned int *  g,
unsigned int *  b 
)

Get the RGB values for the spectrum.

Parameters:
sp,: The Ewl_Spectrum to get the rgb values from
r,: Where to store the red value
g,: Where to store the green value
b,: Where to store the blue value
Returns:
Returns no value.

void ewl_spectrum_rgb_set ( Ewl_Spectrum sp,
unsigned int  r,
unsigned int  g,
unsigned int  b 
)

Set the RGB values for the spectrum.

Parameters:
sp,: The Ewl_Spectrum to set the colour into
r,: The red value to set
g,: The green value to set
b,: The blue value to set
Returns:
Returns no value

Ewl_Spectrum_Type ewl_spectrum_type_get ( Ewl_Spectrum sp  ) 

Get the type of the spectrum.

Parameters:
sp,: The Ewl_Spectrum to get the type from
Returns:
Returns the spectrum type

void ewl_spectrum_type_set ( Ewl_Spectrum sp,
Ewl_Spectrum_Type  type 
)

Set the type of the spectrum.

Parameters:
sp,: The Ewl_Spectrum to set the type on
type,: The type to set the spectrum too
Returns:
Returns no value


Copyright © Enlightenment.org

Enlightened Widget Library Documentation Generated: Sun Sep 27 01:49:47 2009