slider doc fix
This commit is contained in:
parent
4719e96beb
commit
c86cd58275
3 changed files with 13 additions and 13 deletions
|
@ -64,7 +64,7 @@ typedef struct GSliderDrawStyle_t {
|
||||||
|
|
||||||
typedef void (*GSliderDrawFunction)(GHandle gh, bool_t isVertical, coord_t thumbpos, const GSliderDrawStyle *pstyle, void *param);
|
typedef void (*GSliderDrawFunction)(GHandle gh, bool_t isVertical, coord_t thumbpos, const GSliderDrawStyle *pstyle, void *param);
|
||||||
|
|
||||||
// A button window
|
// A slider window
|
||||||
typedef struct GSliderObject_t {
|
typedef struct GSliderObject_t {
|
||||||
GWindowObject gwin;
|
GWindowObject gwin;
|
||||||
|
|
||||||
|
@ -154,11 +154,11 @@ void gwinSetSliderStyle(GHandle gh, const GSliderDrawStyle *pStyle);
|
||||||
void gwinSliderDraw(GHandle gh);
|
void gwinSliderDraw(GHandle gh);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Set the callback routine to perform a custom button drawing.
|
* @brief Set the callback routine to perform a custom slider drawing.
|
||||||
*
|
*
|
||||||
* @param[in] gh The window handle (must be a button window)
|
* @param[in] gh The window handle (must be a slider window)
|
||||||
* @param[in] fn The function to use to draw the button
|
* @param[in] fn The function to use to draw the slider
|
||||||
* @param[in] param A parameter to pass to the button drawing function
|
* @param[in] param A parameter to pass to the slider drawing function
|
||||||
*
|
*
|
||||||
* @api
|
* @api
|
||||||
*/
|
*/
|
||||||
|
@ -168,7 +168,7 @@ void gwinSetSliderCustom(GHandle gh, GSliderDrawFunction fn, void *param);
|
||||||
* @brief Get the current slider position.
|
* @brief Get the current slider position.
|
||||||
* @return The slider position
|
* @return The slider position
|
||||||
*
|
*
|
||||||
* @param[in] gh The window handle (must be a button window)
|
* @param[in] gh The window handle (must be a slider window)
|
||||||
*
|
*
|
||||||
* @note The use of a listener to get the slider position is recommended if you
|
* @note The use of a listener to get the slider position is recommended if you
|
||||||
* want continuous updates on the slider position.
|
* want continuous updates on the slider position.
|
||||||
|
@ -192,7 +192,7 @@ void gwinSetSliderCustom(GHandle gh, GSliderDrawFunction fn, void *param);
|
||||||
* @brief Attach a mouse source
|
* @brief Attach a mouse source
|
||||||
* @details Attach a mouse source to a slider
|
* @details Attach a mouse source to a slider
|
||||||
*
|
*
|
||||||
* @param[in] gh The button handle
|
* @param[in] gh The slider handle
|
||||||
* @param[in] gsh The source handle
|
* @param[in] gsh The source handle
|
||||||
*
|
*
|
||||||
* @api
|
* @api
|
||||||
|
@ -204,7 +204,7 @@ void gwinSetSliderCustom(GHandle gh, GSliderDrawFunction fn, void *param);
|
||||||
* @brief Standard slider drawing routines
|
* @brief Standard slider drawing routines
|
||||||
* @details This routine is called to draw the standard slider.
|
* @details This routine is called to draw the standard slider.
|
||||||
*
|
*
|
||||||
* @param[in] gh The button handle
|
* @param[in] gh The slider handle
|
||||||
* @param[in] isVertical The slider is vertically oriented instead of horizontal
|
* @param[in] isVertical The slider is vertically oriented instead of horizontal
|
||||||
* @param[in] thumbpos The position of the slider (0..cx-1 or cy-1..0)
|
* @param[in] thumbpos The position of the slider (0..cx-1 or cy-1..0)
|
||||||
* @param[in] pstyle The current drawing style
|
* @param[in] pstyle The current drawing style
|
||||||
|
|
|
@ -339,7 +339,7 @@ GSourceHandle ginputGetMouse(uint16_t instance) {
|
||||||
ginput_lld_mouse_init();
|
ginput_lld_mouse_init();
|
||||||
|
|
||||||
#if GINPUT_MOUSE_NEED_CALIBRATION
|
#if GINPUT_MOUSE_NEED_CALIBRATION
|
||||||
#if GINPUT_MOUSE_LLD_CALIBRATION_LOADSAVE
|
#if 0
|
||||||
if (!MouseConfig.fnloadcal) {
|
if (!MouseConfig.fnloadcal) {
|
||||||
MouseConfig.fnloadcal = ginput_lld_mouse_calibration_load;
|
MouseConfig.fnloadcal = ginput_lld_mouse_calibration_load;
|
||||||
MouseConfig.flags &= ~FLG_CAL_FREE;
|
MouseConfig.flags &= ~FLG_CAL_FREE;
|
||||||
|
@ -548,11 +548,11 @@ void ginputSetMouseCalibrationRoutines(uint16_t instance, GMouseCalibrationSaveR
|
||||||
MouseConfig.flags &= ~FLG_CAL_FREE;
|
MouseConfig.flags &= ~FLG_CAL_FREE;
|
||||||
#if GINPUT_MOUSE_LLD_CALIBRATION_LOADSAVE
|
#if GINPUT_MOUSE_LLD_CALIBRATION_LOADSAVE
|
||||||
if (!MouseConfig.fnloadcal) {
|
if (!MouseConfig.fnloadcal) {
|
||||||
MouseConfig.fnloadcal = ginput_lld_mouse_calibration_load;
|
MouseConfig.fnloadcal = fnload;
|
||||||
MouseConfig.flags &= ~FLG_CAL_FREE;
|
MouseConfig.flags &= ~FLG_CAL_FREE;
|
||||||
}
|
}
|
||||||
if (!MouseConfig.fnsavecal)
|
if (!MouseConfig.fnsavecal)
|
||||||
MouseConfig.fnsavecal = ginput_lld_mouse_calibration_save;
|
MouseConfig.fnsavecal = fnsave;
|
||||||
#endif
|
#endif
|
||||||
if (MouseConfig.fnsavecal && (MouseConfig.flags & (FLG_CAL_OK|FLG_CAL_SAVED)) == FLG_CAL_OK) {
|
if (MouseConfig.fnsavecal && (MouseConfig.flags & (FLG_CAL_OK|FLG_CAL_SAVED)) == FLG_CAL_OK) {
|
||||||
MouseConfig.fnsavecal(instance, (const uint8_t *)&MouseConfig.caldata, sizeof(MouseConfig.caldata));
|
MouseConfig.fnsavecal(instance, (const uint8_t *)&MouseConfig.caldata, sizeof(MouseConfig.caldata));
|
||||||
|
|
|
@ -74,7 +74,7 @@ static void gwinSliderCallback(void *param, GEvent *pe) {
|
||||||
|
|
||||||
// We are tracking the mouse
|
// We are tracking the mouse
|
||||||
|
|
||||||
// Test for button up
|
// Test for slider up
|
||||||
if ((pme->meta & GMETA_MOUSE_UP)) {
|
if ((pme->meta & GMETA_MOUSE_UP)) {
|
||||||
gsw->tracking = FALSE;
|
gsw->tracking = FALSE;
|
||||||
|
|
||||||
|
@ -104,7 +104,7 @@ static void gwinSliderCallback(void *param, GEvent *pe) {
|
||||||
}
|
}
|
||||||
|
|
||||||
// If mouse down - track movement
|
// If mouse down - track movement
|
||||||
if ((pme->current_buttons & GINPUT_MOUSE_BTN_LEFT))
|
if ((pme->current_sliders & GINPUT_MOUSE_BTN_LEFT))
|
||||||
trackSliderDraw(gh, pme->x-gh->x, pme->y-gh->y);
|
trackSliderDraw(gh, pme->x-gh->x, pme->y-gh->y);
|
||||||
|
|
||||||
return;
|
return;
|
||||||
|
|
Loading…
Add table
Reference in a new issue