summaryrefslogblamecommitdiffstatshomepage
path: root/src/frontend/mame/ui/slider.h
blob: 7cd4b580831c8b0f5722e826173c17be96183a6c (plain) (tree)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16















                                                                            

                     
                
                                  


                                      
                                                                                              



                                                                        
                                                                      








                                                                     
                       
// 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 "emu.h"
#include "sliderchangednotifier.h"

#define SLIDER_NOCHANGE     0x12345678

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

struct slider_state
{
	slider_state *  next;               /* pointer to next slider */
	slider_update 	update;				/* callback */
	void *          arg;                /* argument */
	INT32           minval;             /* minimum value */
	INT32           defval;             /* default value */
	INT32           maxval;             /* maximum value */
	INT32           incval;             /* increment value */
	int             id;
	char            description[1];     /* textual description */
};

#endif // __UI_SLIDER__