spek

Acoustic spectrum analyser
git clone http://git.hanabi.in/repos/spek.git
Log | Files | Refs | README

commit 4a92c987cf59d32abd2d627ec8b96bb396a3078e
parent ae09c51be8dad6d568829eec5d4663e17fd4df74
Author: Alexander Kojevnikov <alexander@kojevnikov.com>
Date:   Wed, 30 Mar 2011 16:47:56 +0800

osx: Init GtkOSXApplication

Diffstat:
Msrc/spek-platform.c | 7+++++++
Msrc/spek-platform.h | 3+++
Msrc/spek.vala | 1+
Mvapi/spek-platform.vapi | 1+
4 files changed, 12 insertions(+), 0 deletions(-)

diff --git a/src/spek-platform.c b/src/spek-platform.c @@ -25,12 +25,19 @@ #endif #ifdef G_OS_DARWIN +#include <gtkosxapplication.h> #include <CoreFoundation/CoreFoundation.h> #include <ApplicationServices/ApplicationServices.h> #endif #include "spek-platform.h" +void spek_platform_init () { +#ifdef G_OS_DARWIN + GtkOSXApplication *app = g_object_new (GTK_TYPE_OSX_APPLICATION, NULL); +#endif +} + void spek_platform_fix_args (gchar **argv, gint argc) { #ifdef G_OS_WIN32 /* Because MinGW does not support Unicode arguments we are going to diff --git a/src/spek-platform.h b/src/spek-platform.h @@ -21,6 +21,9 @@ #include <glib.h> +/* Platform-specific initialisation */ +void spek_platform_init (); + /* Convert from UTF-16 to UTF-8 when running on Windows */ void spek_platform_fix_args (gchar **argv, gint argc); diff --git a/src/spek.vala b/src/spek.vala @@ -59,6 +59,7 @@ namespace Spek { return 1; } + Platform.init (); Audio.init (); var file_name = files == null ? null : files[0]; if (file_name != null && file_name.has_prefix ("file://")) { diff --git a/vapi/spek-platform.vapi b/vapi/spek-platform.vapi @@ -1,5 +1,6 @@ [CCode (cprefix = "SpekPlatform", lower_case_cprefix = "spek_platform_", cheader_filename = "spek-platform.h")] namespace Spek.Platform { + public static void init (); public static void fix_args (string[] args); public static void show_uri (string uri); public static string read_line (string uri);