lib/ewl_colorpicker.c File Reference
#include "ewl_base.h"
#include "ewl_colorpicker.h"
#include "ewl_grid.h"
#include "ewl_label.h"
#include "ewl_radiobutton.h"
#include "ewl_spectrum.h"
#include "ewl_spinner.h"
#include "ewl_macros.h"
#include "ewl_private.h"
#include "ewl_debug.h"

Data Structures | |
| struct | Ewl_Colorpicker_Radiobutton |
| Inherits from Ewl_Radiobutton and extends to provide colorpicker information. More... | |
| struct | Ewl_Colorpicker_Spinner |
| Inerits from Ewl_Spinner and extneds to provide colorpicker information. More... | |
Defines | |
| #define | EWL_COLORPICKER_RADIOBUTTON(button) ((Ewl_Colorpicker_Radiobutton *)button) |
| #define | EWL_COLORPICKER_RADIOBUTTON_TYPE "colorpicker_radiobutton" |
| #define | EWL_COLORPICKER_SPINNER(spinner) ((Ewl_Colorpicker_Spinner *)spinner) |
| #define | EWL_COLORPICKER_SPINNER_TYPE "colorpicker_spinner" |
Typedefs | |
| typedef struct Ewl_Colorpicker_Radiobutton | Ewl_Colorpicker_Radiobutton |
| typedef struct Ewl_Colorpicker_Spinner | Ewl_Colorpicker_Spinner |
Functions | |
| unsigned int | ewl_colorpicker_alpha_get (Ewl_Colorpicker *cp) |
| Retrive the alpha value from the color picker. | |
| void | ewl_colorpicker_alpha_set (Ewl_Colorpicker *cp, unsigned int alpha) |
| Set the alpha value into the color picker. | |
| void | ewl_colorpicker_cb_alpha_change (Ewl_Widget *w, void *ev __UNUSED__, void *data) |
| void | ewl_colorpicker_cb_dnd_data (Ewl_Widget *w, void *ev, void *data __UNUSED__) |
| void | ewl_colorpicker_cb_previous_clicked (Ewl_Widget *w __UNUSED__, void *ev __UNUSED__, void *data) |
| void | ewl_colorpicker_cb_radio_change (Ewl_Widget *w, void *ev __UNUSED__, void *data) |
| void | ewl_colorpicker_cb_spinner_change (Ewl_Widget *w, void *ev __UNUSED__, void *data) |
| void | ewl_colorpicker_cb_square_change (Ewl_Widget *w __UNUSED__, void *ev __UNUSED__, void *data) |
| void | ewl_colorpicker_cb_vertical_change (Ewl_Widget *w __UNUSED__, void *ev __UNUSED__, void *data) |
| Ewl_Color_Mode | ewl_colorpicker_color_mode_get (Ewl_Colorpicker *cp) |
| Get the color mode of the color picker. | |
| void | ewl_colorpicker_color_mode_set (Ewl_Colorpicker *cp, Ewl_Color_Mode mode) |
| Set the color mode of the color picker. | |
| void | ewl_colorpicker_current_rgb_get (Ewl_Colorpicker *cp, unsigned int *r, unsigned int *g, unsigned int *b) |
| Retrieve the current RGB values from the color picker. | |
| void | ewl_colorpicker_current_rgb_set (Ewl_Colorpicker *cp, unsigned int r, unsigned int g, unsigned int b) |
| Set the current RGB values into the color picker. | |
| unsigned int | ewl_colorpicker_has_alpha_get (Ewl_Colorpicker *cp) |
| Retrieves if the color picker displays alpha information. | |
| void | ewl_colorpicker_has_alpha_set (Ewl_Colorpicker *cp, unsigned int alpha) |
| Set if the color picker displays alpha information. | |
| int | ewl_colorpicker_init (Ewl_Colorpicker *cp) |
Initializes the cp color picker widget. | |
| Ewl_Widget * | ewl_colorpicker_new (void) |
| Creates a new Ewl_Colorpicker widget. | |
| void | ewl_colorpicker_previous_rgba_get (Ewl_Colorpicker *cp, unsigned int *r, unsigned int *g, unsigned int *b, unsigned int *a) |
| Retrieve the previous RGBA values from the color picker. | |
| void | ewl_colorpicker_previous_rgba_set (Ewl_Colorpicker *cp, unsigned int r, unsigned int g, unsigned int b, unsigned int a) |
| Set the previous RBGA values into the color picker. | |
Define Documentation
| #define EWL_COLORPICKER_RADIOBUTTON | ( | button | ) | ((Ewl_Colorpicker_Radiobutton *)button) |
Referenced by ewl_colorpicker_cb_radio_change(), and ewl_colorpicker_init().
| #define EWL_COLORPICKER_RADIOBUTTON_TYPE "colorpicker_radiobutton" |
Referenced by ewl_colorpicker_cb_radio_change().
| #define EWL_COLORPICKER_SPINNER | ( | spinner | ) | ((Ewl_Colorpicker_Spinner *)spinner) |
Referenced by ewl_colorpicker_cb_spinner_change(), and ewl_colorpicker_init().
| #define EWL_COLORPICKER_SPINNER_TYPE "colorpicker_spinner" |
Referenced by ewl_colorpicker_cb_spinner_change().
Typedef Documentation
Function Documentation
| void ewl_colorpicker_cb_alpha_change | ( | Ewl_Widget * | w, | |
| void *ev | __UNUSED__, | |||
| void * | data | |||
| ) |
References Ewl_Colorpicker::current, DCHECK_PARAM_PTR, DCHECK_TYPE, DENTER_FUNCTION, DLEAVE_FUNCTION, DLEVEL_STABLE, EWL_COLORPICKER_TYPE, EWL_RANGE, ewl_range_value_get(), EWL_SPINNER_TYPE, ewl_widget_color_set(), Ewl_Colorpicker::preview, Ewl_Colorpicker::rgb, and Ewl_Colorpicker::spinners.
Referenced by ewl_colorpicker_init().
| void ewl_colorpicker_cb_dnd_data | ( | Ewl_Widget * | w, | |
| void * | ev, | |||
| void *data | __UNUSED__ | |||
| ) |
| void ewl_colorpicker_cb_previous_clicked | ( | Ewl_Widget *w | __UNUSED__, | |
| void *ev | __UNUSED__, | |||
| void * | data | |||
| ) |
References DCHECK_PARAM_PTR, DCHECK_TYPE, DENTER_FUNCTION, DLEAVE_FUNCTION, DLEVEL_STABLE, ewl_colorpicker_current_rgb_set(), EWL_COLORPICKER_TYPE, and Ewl_Colorpicker::previous.
Referenced by ewl_colorpicker_init().
| void ewl_colorpicker_cb_radio_change | ( | Ewl_Widget * | w, | |
| void *ev | __UNUSED__, | |||
| void * | data | |||
| ) |
References DCHECK_PARAM_PTR, DCHECK_TYPE, DENTER_FUNCTION, DLEAVE_FUNCTION, DLEVEL_STABLE, EWL_COLORPICKER_RADIOBUTTON, EWL_COLORPICKER_RADIOBUTTON_TYPE, EWL_COLORPICKER_TYPE, EWL_SPECTRUM, ewl_spectrum_mode_set(), Ewl_Colorpicker::mode, Ewl_Colorpicker::picker, Ewl_Colorpicker::square, and Ewl_Colorpicker::vertical.
Referenced by ewl_colorpicker_init().
| void ewl_colorpicker_cb_spinner_change | ( | Ewl_Widget * | w, | |
| void *ev | __UNUSED__, | |||
| void * | data | |||
| ) |
References DCHECK_PARAM_PTR, DCHECK_TYPE, DENTER_FUNCTION, DLEAVE_FUNCTION, DLEVEL_STABLE, EWL_COLOR_MODE_HSV_HUE, EWL_COLOR_MODE_HSV_SATURATION, EWL_COLOR_MODE_HSV_VALUE, EWL_COLOR_MODE_RGB_BLUE, EWL_COLOR_MODE_RGB_GREEN, EWL_COLOR_MODE_RGB_RED, EWL_COLORPICKER_SPINNER, EWL_COLORPICKER_SPINNER_TYPE, EWL_COLORPICKER_TYPE, EWL_RANGE, ewl_range_value_get(), EWL_SPECTRUM, ewl_spectrum_hsv_get(), ewl_spectrum_hsv_set(), ewl_spectrum_rgb_get(), ewl_spectrum_rgb_set(), Ewl_Colorpicker::hsv, Ewl_Colorpicker::picker, Ewl_Colorpicker::rgb, Ewl_Colorpicker::spinners, Ewl_Colorpicker::square, and Ewl_Colorpicker::vertical.
Referenced by ewl_colorpicker_init().
| void ewl_colorpicker_cb_square_change | ( | Ewl_Widget *w | __UNUSED__, | |
| void *ev | __UNUSED__, | |||
| void * | data | |||
| ) |
| void ewl_colorpicker_cb_vertical_change | ( | Ewl_Widget *w | __UNUSED__, | |
| void *ev | __UNUSED__, | |||
| void * | data | |||
| ) |
References DCHECK_PARAM_PTR, DCHECK_TYPE, DENTER_FUNCTION, DLEAVE_FUNCTION, DLEVEL_STABLE, EWL_COLOR_MODE_HSV_HUE, EWL_COLOR_MODE_HSV_SATURATION, EWL_COLOR_MODE_HSV_VALUE, EWL_COLOR_MODE_RGB_BLUE, EWL_COLOR_MODE_RGB_GREEN, EWL_COLOR_MODE_RGB_RED, EWL_COLORPICKER_TYPE, EWL_SPECTRUM, ewl_spectrum_hsv_get(), ewl_spectrum_hsv_set(), ewl_spectrum_rgb_get(), ewl_spectrum_rgb_set(), Ewl_Colorpicker::mode, Ewl_Colorpicker::picker, Ewl_Colorpicker::square, and Ewl_Colorpicker::vertical.
Referenced by ewl_colorpicker_init().