aboutsummaryrefslogtreecommitdiff
path: root/gtk/oscilloview.c
diff options
context:
space:
mode:
authorTakamichi Horikawa <takamichiho@gmail.com>2017-04-04 23:57:39 +0900
committerTakamichi Horikawa <takamichiho@gmail.com>2017-04-04 23:57:39 +0900
commitc6c96944ae1bb1d7363349ec21be9dca76ee9ec4 (patch)
tree287881e3661707b1a5185ef8dd1e24c866db0636 /gtk/oscilloview.c
parent4c68a0d48bf2fa49c7a20e728ebf8c0dde073b5c (diff)
gtk: add Oscilloscope view OpenGL renderer
Diffstat (limited to 'gtk/oscilloview.c')
-rw-r--r--gtk/oscilloview.c11
1 files changed, 4 insertions, 7 deletions
diff --git a/gtk/oscilloview.c b/gtk/oscilloview.c
index bf56140..e2893c6 100644
--- a/gtk/oscilloview.c
+++ b/gtk/oscilloview.c
@@ -10,8 +10,6 @@ struct oscilloview oscilloview_g = {
enum {
VIEW_SAMPLES = 1024,
VIEW_SKIP = 2,
- WIDTH = 600,
- HEIGHT = 300,
};
static struct {
@@ -75,11 +73,10 @@ void show_oscilloview(void) {
g.win = gtk_window_new(GTK_WINDOW_TOPLEVEL);
gtk_window_set_title(GTK_WINDOW(g.win), "Oscilloscope view");
g_signal_connect(g.win, "destroy", G_CALLBACK(on_destroy), 0);
+ GtkWidget *drawarea = gtk_drawing_area_new();
+ gtk_container_add(GTK_CONTAINER(g.win), drawarea);
+ g_signal_connect(drawarea, "draw", G_CALLBACK(draw_cb), 0);
+ gtk_widget_add_tick_callback(drawarea, tick_cb, 0, 0);
}
- GtkWidget *drawarea = gtk_drawing_area_new();
- gtk_container_add(GTK_CONTAINER(g.win), drawarea);
- //gtk_widget_set_size_request(drawarea, WIDTH*3, HEIGHT*3);
- g_signal_connect(drawarea, "draw", G_CALLBACK(draw_cb), 0);
- gtk_widget_add_tick_callback(drawarea, tick_cb, 0, 0);
gtk_widget_show_all(g.win);
}