diff options
-rw-r--r-- | src/main-window.c | 20 | ||||
-rw-r--r-- | src/main-window.h | 6 | ||||
-rw-r--r-- | src/main.c | 2 |
3 files changed, 20 insertions, 8 deletions
diff --git a/src/main-window.c b/src/main-window.c index 4ecbf6c..ee4dd27 100644 --- a/src/main-window.c +++ b/src/main-window.c @@ -19,16 +19,24 @@ * along with Marquee. If not, see <http://www.gnu.org/licenses/>. */ +#include <stdlib.h> + #include <gtk/gtk.h> #include "main-window.h" -void -mq_main_window_new() +MqWindow * +mq_main_window_new(gint __attribute__((unused)) uri_c, + gchar __attribute__((unused)) *uri_v[]) { - GtkWidget *window; + MqWindow *window; + + window = malloc(sizeof(*window)); + + window->gtk_window = gtk_window_new(GTK_WINDOW_TOPLEVEL); + g_signal_connect(window->gtk_window, "destroy", + G_CALLBACK(gtk_main_quit), NULL); + gtk_widget_show_all(window->gtk_window); - window = gtk_window_new(GTK_WINDOW_TOPLEVEL); - g_signal_connect(window, "destroy", G_CALLBACK(gtk_main_quit), NULL); - gtk_widget_show_all(window); + return window; } diff --git a/src/main-window.h b/src/main-window.h index e5a7de5..fb31ac4 100644 --- a/src/main-window.h +++ b/src/main-window.h @@ -19,4 +19,8 @@ * along with Marquee. If not, see <http://www.gnu.org/licenses/>. */ -void mq_main_window_new(); +typedef struct { + GtkWidget *gtk_window; +} MqWindow; + +MqWindow *mq_main_window_new(gint uri_c, gchar *uri_v[]); @@ -73,7 +73,7 @@ main(int argc, char *argv[]) return EXIT_SUCCESS; } - mq_main_window_new(); + mq_main_window_new(argc, argv); gtk_main(); |