mirror of
https://github.com/wiiu-env/WiiUPluginSystem.git
synced 2024-12-26 01:51:56 +01:00
33 lines
1.1 KiB
C
33 lines
1.1 KiB
C
#include <wups.h>
|
|
|
|
#ifdef __cplusplus
|
|
extern "C" {
|
|
#endif
|
|
|
|
typedef struct ConfigItemIntegerRange {
|
|
WUPSConfigItemHandle handle;
|
|
int defaultValue;
|
|
int value;
|
|
int minValue;
|
|
int maxValue;
|
|
void *callback;
|
|
} ConfigItemIntegerRange;
|
|
|
|
typedef void (*IntegerRangeValueChangedCallback)(ConfigItemIntegerRange *, int32_t);
|
|
|
|
bool
|
|
WUPSConfigItemIntegerRange_AddToCategory(WUPSConfigCategoryHandle cat, const char *configID, const char *displayName,
|
|
int32_t defaultValue, int32_t minValue, int32_t maxValue,
|
|
IntegerRangeValueChangedCallback callback);
|
|
|
|
#define WUPSConfigItemIntegerRange_AddToCategoryHandled(__config__, __cat__, __configID__, __displayName__, __defaultValue__, __minValue__, __maxValue__, __callback__) \
|
|
do { \
|
|
if (!WUPSConfigItemIntegerRange_AddToCategory(__cat__, __configID__, __displayName__, __defaultValue__, __minValue__, __maxValue__, __callback__)) { \
|
|
WUPSConfig_Destroy(__config__); \
|
|
return 0; \
|
|
} \
|
|
} while(0)
|
|
|
|
#ifdef __cplusplus
|
|
}
|
|
#endif |