mirror of
https://github.com/alexkay/spek.git
synced 2025-04-21 02:47:37 +03:00
osx: Init GtkOSXApplication
This commit is contained in:
parent
ae09c51be8
commit
4a92c987cf
@ -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
|
||||
|
@ -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);
|
||||
|
||||
|
@ -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://")) {
|
||||
|
@ -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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user