summaryrefslogtreecommitdiffstatshomepage
path: root/src/frontend/mame/ui/slider.h
blob: 5e0613743aa58b9ff064427b5c282caffd4e1fa8 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
// license:BSD-3-Clause
// copyright-holders:Nicola Salmoria, Aaron Giles, Nathan Woods

/***************************************************************************

    ui/slider.h

    Internal data representation for an adjustment slider.

***************************************************************************/

#pragma once

#ifndef __UI_SLIDER__
#define __UI_SLIDER__

#include <functional>

#include "sliderchangednotifier.h"

#define SLIDER_NOCHANGE     0x12345678

typedef std::function<int32_t(running_machine&, void*, int, std::string*, int32_t)> slider_update;

struct slider_state
{
	slider_state *  next;               /* pointer to next slider */
	slider_update   update;             /* callback */
	void *          arg;                /* argument */
	int32_t           minval;             /* minimum value */
	int32_t           defval;             /* default value */
	int32_t           maxval;             /* maximum value */
	int32_t           incval;             /* increment value */
	int             id;
	std::string     description;        /* textual description */
};

#endif // __UI_SLIDER__