#ifndef BUTTON_H
#define BUTTON_H
#include "../ui/toolkit.h"
#include "../ui/button.h"
#include "toolkit.h"
#ifdef __cplusplus
extern "C" {
#endif
void ui_button_set_icon_name(GtkWidget *button,
const char *icon_name);
typedef void (*ui_toggled_func)(
void*,
void*);
GtkWidget* ui_create_button(
UiObject *obj,
const char *label,
const char *icon,
ui_callback onclick,
void *userdata,
int event_value,
bool activate_event);
void ui_setup_togglebutton(
UiObject *obj,
GtkWidget *togglebutton,
const char *label,
const char *icon,
const char *varname,
UiInteger *value,
ui_callback onchange,
void *onchangedata,
int enable_state);
void ui_bind_togglebutton(
UiObject *obj,
GtkWidget *widget,
int64_t (*getfunc)(UiInteger*),
void (*setfunc)(UiInteger*,
int64_t),
const char *varname,
UiInteger *value,
void (*toggled_callback)(
void*,
void*),
ui_callback onchange,
void *onchangedata,
void (*enable_state_func)(
void*,
void*),
int enable_state);
void ui_button_clicked(GtkWidget *widget, UiEventData *event);
void ui_toggled_obs(
void *widget, UiVarEventData *event);
UIWIDGET ui_checkbox_var(UiObject *obj,
char *label, UiVar *var);
UIWIDGET ui_radiobutton_var(UiObject *obj,
char *label, UiVar *var);
void ui_radio_obs(GtkToggleButton *widget, UiVarEventData *event);
int64_t ui_radiobutton_get(UiInteger *value);
void ui_radiobutton_set(UiInteger *value,
int64_t i);
#ifdef __cplusplus
}
#endif
#endif