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 struct 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_IS (  )     (ewl_widget_type_is(EWL_WIDGET(w), EWL_SPECTRUM_TYPE))

Returns TRUE if the widget is an Ewl_Spectrum, FALSE otherwise


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_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.

References DCHECK_PARAM_PTR, DCHECK_TYPE, DENTER_FUNCTION, DLEAVE_FUNCTION, DLEVEL_STABLE, EWL_SPECTRUM_TYPE, h, hsv, s, and v.

Referenced by ewl_colorpicker_cb_spinner_change(), ewl_colorpicker_cb_square_change(), ewl_colorpicker_cb_vertical_change(), ewl_colorpicker_current_rgb_set(), and ewl_colorpicker_init().

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

References DCHECK_PARAM_PTR, DCHECK_TYPE, DENTER_FUNCTION, dirty, DLEAVE_FUNCTION, DLEVEL_STABLE, EWL_SPECTRUM_TYPE, EWL_WIDGET, ewl_widget_configure(), h, hsv, s, and v.

Referenced by ewl_colorpicker_cb_spinner_change(), and ewl_colorpicker_cb_vertical_change().

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

References DCHECK_PARAM_PTR_RET, DCHECK_TYPE_RET, DENTER_FUNCTION, DLEVEL_STABLE, DRETURN_INT, EWL_COLOR_MODE_HSV_HUE, EWL_SPECTRUM_TYPE, and mode.

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.

References DCHECK_PARAM_PTR, DCHECK_TYPE, DENTER_FUNCTION, dirty, DLEAVE_FUNCTION, DLEVEL_STABLE, EWL_SPECTRUM_TYPE, EWL_WIDGET, ewl_widget_configure(), and mode.

Referenced by ewl_colorpicker_cb_radio_change(), and ewl_colorpicker_color_mode_set().

Ewl_Widget* ewl_spectrum_new ( void   ) 

Creates a new Ewl_Spectrum widget.

Returns:
Returns a new Ewl_Spectrum widget or NULL on failure

References DENTER_FUNCTION, DLEVEL_STABLE, DRETURN_PTR, EWL_SPECTRUM, ewl_spectrum_init(), ewl_widget_destroy(), and NEW.

Referenced by ewl_colorpicker_init().

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.

References b, DCHECK_PARAM_PTR, DCHECK_TYPE, DENTER_FUNCTION, DLEAVE_FUNCTION, DLEVEL_STABLE, EWL_SPECTRUM_TYPE, g, r, and rgb.

Referenced by ewl_colorpicker_cb_spinner_change(), ewl_colorpicker_cb_square_change(), ewl_colorpicker_cb_vertical_change(), and ewl_colorpicker_current_rgb_get().

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

References b, DCHECK_PARAM_PTR, DCHECK_TYPE, DENTER_FUNCTION, dirty, DLEAVE_FUNCTION, DLEVEL_STABLE, EWL_SPECTRUM_TYPE, EWL_WIDGET, ewl_widget_configure(), g, r, and rgb.

Referenced by ewl_colorpicker_cb_spinner_change(), ewl_colorpicker_cb_vertical_change(), ewl_colorpicker_current_rgb_set(), ewl_colorpicker_init(), and ewl_spectrum_init().

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

References DCHECK_PARAM_PTR_RET, DCHECK_TYPE_RET, DENTER_FUNCTION, DLEVEL_STABLE, DRETURN_INT, EWL_SPECTRUM_TYPE, EWL_SPECTRUM_TYPE_SQUARE, and 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

References DCHECK_PARAM_PTR, DCHECK_TYPE, DENTER_FUNCTION, DLEAVE_FUNCTION, DLEVEL_STABLE, EWL_SPECTRUM_TYPE, EWL_WIDGET, ewl_widget_configure(), and type.

Referenced by ewl_colorpicker_init().


Copyright © Enlightenment.org

Enlightened Widget Library Documentation Generated: Sat May 17 16:51:11 2008