summaryrefslogtreecommitdiffstats
path: root/suil
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2017-03-18 12:02:05 +0100
committerDavid Robillard <d@drobilla.net>2017-03-18 12:05:15 +0100
commit43a25ed63a9144afe32a4fea520412770394822c (patch)
tree67c7aa044726304b71794f64316ad68d29758325 /suil
parent64a2647d8d81b5c23d22b52cc9e0dd2595270b67 (diff)
downloadsuil-43a25ed63a9144afe32a4fea520412770394822c.tar.gz
suil-43a25ed63a9144afe32a4fea520412770394822c.tar.bz2
suil-43a25ed63a9144afe32a4fea520412770394822c.zip
Add suil_init()
This allows the actual host argc and argv to be passed to QApplication if it is created by Suil (for Qt in non-Qt cases), and initializes X11 threads to fix Qt5 in Gtk2.
Diffstat (limited to 'suil')
-rw-r--r--suil/suil.h19
1 files changed, 18 insertions, 1 deletions
diff --git a/suil/suil.h b/suil/suil.h
index 16df9bd..5f1b7fe 100644
--- a/suil/suil.h
+++ b/suil/suil.h
@@ -1,5 +1,5 @@
/*
- Copyright 2011-2014 David Robillard <http://drobilla.net>
+ Copyright 2011-2017 David Robillard <http://drobilla.net>
Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted, provided that the above
@@ -124,6 +124,23 @@ typedef void (*SuilTouchFunc)(
uint32_t port_index,
bool grabbed);
+/** Initialization argument. */
+typedef enum {
+ SUIL_ARG_NONE
+} SuilArg;
+
+/**
+ Initialize suil.
+
+ This function should be called as early as possible, before any other GUI
+ toolkit functions. The variable argument list is a sequence of SuilArg keys
+ and corresponding value pairs for passing any necessary platform-specific
+ information. It must be terminated with SUIL_ARG_NONE.
+*/
+SUIL_API
+void
+suil_init(int* argc, char*** argv, SuilArg key, ...);
+
/**
Create a new UI host descriptor.
@param write_func Function to send a value to a plugin port.