50 lines
1.6 KiB
C
50 lines
1.6 KiB
C
#include "TimerMiniWindow.h"
|
|
|
|
struct _TimerMiniWindow {
|
|
GtkWindow parent;
|
|
|
|
GtkWidget *startStopButton;
|
|
GtkWidget *resetButton;
|
|
GtkWidget *expandButton;
|
|
GtkWidget *timerLabel;
|
|
};
|
|
|
|
G_DEFINE_TYPE(TimerMiniWindow, timer_mini_window, GTK_TYPE_WINDOW);
|
|
|
|
TimerMiniWindow *timer_mini_window_new() {
|
|
return g_object_new(TIMER_TYPE_MINI_WINDOW, NULL);
|
|
}
|
|
|
|
GtkLabel *timer_mini_window_get_timer_label(TimerMiniWindow *self) {
|
|
return GTK_LABEL(self->timerLabel);
|
|
}
|
|
|
|
GtkButton *timer_mini_window_get_start_stop_button(TimerMiniWindow *self) {
|
|
return GTK_BUTTON(self->startStopButton);
|
|
}
|
|
|
|
GtkButton *timer_mini_window_get_reset_button(TimerMiniWindow *self) {
|
|
return GTK_BUTTON(self->resetButton);
|
|
}
|
|
|
|
GtkButton *timer_mini_window_get_expand_button(TimerMiniWindow *self) {
|
|
return GTK_BUTTON(self->expandButton);
|
|
}
|
|
|
|
void timer_mini_window_class_init(TimerMiniWindowClass *class) {
|
|
gtk_widget_class_set_template_from_resource(
|
|
GTK_WIDGET_CLASS(class), "/zander/practicetimer/ui/mini-window.glade");
|
|
gtk_widget_class_bind_template_child_internal(GTK_WIDGET_CLASS(class),
|
|
TimerMiniWindow, startStopButton);
|
|
gtk_widget_class_bind_template_child_internal(GTK_WIDGET_CLASS(class),
|
|
TimerMiniWindow, resetButton);
|
|
gtk_widget_class_bind_template_child_internal(GTK_WIDGET_CLASS(class),
|
|
TimerMiniWindow, expandButton);
|
|
gtk_widget_class_bind_template_child_internal(GTK_WIDGET_CLASS(class),
|
|
TimerMiniWindow, timerLabel);
|
|
}
|
|
|
|
void timer_mini_window_init(TimerMiniWindow *self) {
|
|
gtk_widget_init_template(GTK_WIDGET(self));
|
|
}
|