From 43a25ed63a9144afe32a4fea520412770394822c Mon Sep 17 00:00:00 2001 From: David Robillard Date: Sat, 18 Mar 2017 12:02:05 +0100 Subject: 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. --- suil/suil.h | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) (limited to 'suil') 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 + Copyright 2011-2017 David Robillard 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. -- cgit v1.2.1