1 #ifndef INCLUDED_BADGE2013_MOCKUP_LCD_WINDOW_HH
2 #define INCLUDED_BADGE2013_MOCKUP_LCD_WINDOW_HH
4 #include "badge_worker.hh"
5 #include <ui/display.h>
7 #include <glibmm/dispatcher.h>
8 #include <glibmm/thread.h>
10 #include <gtkmm/builder.h>
11 #include <gtkmm/dialog.h>
12 #include <gtkmm/drawingarea.h>
13 #include <gtkmm/window.h>
19 class lcd_drawingarea : public Gtk::DrawingArea {
21 lcd_drawingarea(BaseObjectType *cobject,
22 Glib::RefPtr<Gtk::Builder> const &glade);
23 virtual ~lcd_drawingarea();
25 void push_framebuffer(badge_framebuffer const &fb);
28 virtual bool on_draw(Cairo::RefPtr<Cairo::Context> const &cr);
33 Glib::Dispatcher sig_redraw_;
34 badge_framebuffer framebuffer_;
38 class lcd_window : public Gtk::Window {
40 lcd_window(BaseObjectType *cobject, Glib::RefPtr<Gtk::Builder> const &glade);
41 virtual ~lcd_window();
43 void push_framebuffer(badge_framebuffer const &fb);
47 virtual void on_show();
48 virtual bool on_key_press_event (GdkEventKey* event);
49 virtual bool on_key_release_event(GdkEventKey* event);
55 Glib::Dispatcher sig_close_;
57 lcd_drawingarea *canvas_;
58 std::uint8_t key_state_;