libui/redo/unix/datetimepicker.c

54 lines
1.1 KiB
C
Raw Normal View History

2015-06-11 18:07:06 -05:00
// 11 june 2015
#include "uipriv_unix.h"
struct datetimepicker {
uiDateTimePicker d;
GtkWidget *widget;
};
uiDefineControlType(uiDateTimePicker, uiTypeDateTimePicker, struct datetimepicker)
static uintptr_t datetimepickerHandle(uiControl *c)
{
struct datetimepicker *d = (struct datetimepicker *) c;
return (uintptr_t) (d->widget);
}
// TODO
typedef int OSTHING;
enum {
OSARGDATETIME,
OSARGDATEONLY,
OSARGTIMEONLY,
};
2015-06-11 18:07:06 -05:00
uiDateTimePicker *finishNewDateTimePicker(OSTHING OSARG)
{
struct datetimepicker *d;
d = (struct datetimepicker *) uiNewControl(uiTypeDateTimePicker());
2015-06-11 18:07:06 -05:00
d->widget = gtk_label_new("TODO uiDateTimePicker not implemented");
uiUnixMakeSingleWidgetControl(uiControl(d), d->widget);
2015-06-11 18:07:06 -05:00
uiControl(d)->Handle = datetimepickerHandle;
return uiDateTimePicker(d);
}
uiDateTimePicker *uiNewDateTimePicker(void)
{
return finishNewDateTimePicker(OSARGDATETIME);
}
uiDateTimePicker *uiNewDatePicker(void)
{
return finishNewDateTimePicker(OSARGDATEONLY);
}
uiDateTimePicker *uiNewTimePicker(void)
{
return finishNewDateTimePicker(OSARGTIMEONLY);
}