aboutsummaryrefslogtreecommitdiffstats
path: root/ext
diff options
context:
space:
mode:
Diffstat (limited to 'ext')
-rw-r--r--ext/atom.lv2/atom-helpers.h6
-rw-r--r--ext/atom.lv2/atom.h2
-rw-r--r--ext/event.lv2/event-helpers.h7
-rw-r--r--ext/pui-event.lv2/pui-event.h74
-rw-r--r--ext/pui-gtk.lv2/pui-gtk.h74
-rw-r--r--ext/pui.lv2/pui.h13
6 files changed, 89 insertions, 87 deletions
diff --git a/ext/atom.lv2/atom-helpers.h b/ext/atom.lv2/atom-helpers.h
index 71c16e9..ae4bc6f 100644
--- a/ext/atom.lv2/atom-helpers.h
+++ b/ext/atom.lv2/atom-helpers.h
@@ -170,8 +170,8 @@ lv2_atom_is_a(LV2_Atom* object,
/** A single entry in an Object query. */
typedef struct {
- uint32_t key; ///< Key to query (input set by user)
- const LV2_Atom* value; ///< Found value (output set by query function)
+ uint32_t key; /**< Key to query (input set by user) */
+ const LV2_Atom* value; /**< Found value (output set by query function) */
} LV2_Object_Query;
/**
@@ -189,7 +189,7 @@ lv2_object_query(const LV2_Atom* object, LV2_Object_Query* query)
int matches = 0;
int n_queries = 0;
- // Count number of query keys so we can short-circuit when done
+ /* Count number of query keys so we can short-circuit when done */
for (LV2_Object_Query* q = query; q->key; ++q)
++n_queries;
diff --git a/ext/atom.lv2/atom.h b/ext/atom.lv2/atom.h
index ed5ddd8..61482c7 100644
--- a/ext/atom.lv2/atom.h
+++ b/ext/atom.lv2/atom.h
@@ -35,8 +35,6 @@
#include <stdint.h>
#include <stddef.h>
-#define LV2_ATOM_FROM_EVENT(ev) ((LV2_Atom*)&((LV2_Event*)ev)->type)
-
/**
An LV2 Atom.
diff --git a/ext/event.lv2/event-helpers.h b/ext/event.lv2/event-helpers.h
index d97ae73..75ba14b 100644
--- a/ext/event.lv2/event-helpers.h
+++ b/ext/event.lv2/event-helpers.h
@@ -51,7 +51,9 @@ lv2_event_pad_size(uint16_t size)
* The contents of buf are ignored entirely and overwritten, except capacity
* which is unmodified. */
static inline void
-lv2_event_buffer_reset(LV2_Event_Buffer* buf, uint16_t stamp_type, uint8_t *data)
+lv2_event_buffer_reset(LV2_Event_Buffer* buf,
+ uint16_t stamp_type,
+ uint8_t *data)
{
buf->data = data;
buf->header_size = sizeof(LV2_Event_Buffer);
@@ -65,7 +67,8 @@ lv2_event_buffer_reset(LV2_Event_Buffer* buf, uint16_t stamp_type, uint8_t *data
static inline LV2_Event_Buffer*
lv2_event_buffer_new(uint32_t capacity, uint16_t stamp_type)
{
- LV2_Event_Buffer* buf = (LV2_Event_Buffer*)malloc(sizeof(LV2_Event_Buffer) + capacity);
+ const size_t size = sizeof(LV2_Event_Buffer) + capacity;
+ LV2_Event_Buffer* buf = (LV2_Event_Buffer*)malloc(size);
if (buf != NULL) {
buf->capacity = capacity;
lv2_event_buffer_reset(buf, stamp_type, (uint8_t *)(buf + 1));
diff --git a/ext/pui-event.lv2/pui-event.h b/ext/pui-event.lv2/pui-event.h
index 223b5f5..2b8ebae 100644
--- a/ext/pui-event.lv2/pui-event.h
+++ b/ext/pui-event.lv2/pui-event.h
@@ -1,37 +1,37 @@
-/************************************************************************
- *
- * Event port protocol for the LV2 plugin UI extension
- *
- * Copyright (C) 2010-2011 Lars Luthman <mail@larsluthman.net>
- *
- * This header is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as published
- * by the Free Software Foundation; either version 2.1 of the License,
- * or (at your option) any later version.
- *
- * This header is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301
- * USA.
- *
- ***********************************************************************/
-
-/** @file
- This header file just defines a preprocessor macro for the URI prefix
- for this extension.
-*/
-
-#ifndef LV2_PUI_EVENT_H
-#define LV2_PUI_EVENT_H
-
-
-/** The URI prefix for this extension. */
-#define LV2_PUI_EVENT_URI "http://lv2plug.in/ns/ext/pui-event"
-
-
-#endif
+/************************************************************************
+ *
+ * Event port protocol for the LV2 plugin UI extension
+ *
+ * Copyright (C) 2010-2011 Lars Luthman <mail@larsluthman.net>
+ *
+ * This header is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as published
+ * by the Free Software Foundation; either version 2.1 of the License,
+ * or (at your option) any later version.
+ *
+ * This header is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301
+ * USA.
+ *
+ ***********************************************************************/
+
+/** @file
+ This header file just defines a preprocessor macro for the URI prefix
+ for this extension.
+*/
+
+#ifndef LV2_PUI_EVENT_H
+#define LV2_PUI_EVENT_H
+
+
+/** The URI prefix for this extension. */
+#define LV2_PUI_EVENT_URI "http://lv2plug.in/ns/ext/pui-event"
+
+
+#endif
diff --git a/ext/pui-gtk.lv2/pui-gtk.h b/ext/pui-gtk.lv2/pui-gtk.h
index 12c58e1..46ddc79 100644
--- a/ext/pui-gtk.lv2/pui-gtk.h
+++ b/ext/pui-gtk.lv2/pui-gtk.h
@@ -1,37 +1,37 @@
-/************************************************************************
- *
- * Gtk+ 2.0 UI type for the LV2 plugin UI extension
- *
- * Copyright (C) 2010-2011 Lars Luthman <mail@larsluthman.net>
- *
- * This header is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as published
- * by the Free Software Foundation; either version 2.1 of the License,
- * or (at your option) any later version.
- *
- * This header is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301
- * USA.
- *
- ***********************************************************************/
-
-/** @file
- This header file just defines a preprocessor macro for the URI prefix
- for this extension.
-*/
-
-#ifndef LV2_PUI_GTK_H
-#define LV2_PUI_GTK_H
-
-
-/** The URI prefix for this extension. */
-#define LV2_PUI_GTK_URI "http://lv2plug.in/ns/ext/pui-gtk"
-
-
-#endif
+/************************************************************************
+ *
+ * Gtk+ 2.0 UI type for the LV2 plugin UI extension
+ *
+ * Copyright (C) 2010-2011 Lars Luthman <mail@larsluthman.net>
+ *
+ * This header is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as published
+ * by the Free Software Foundation; either version 2.1 of the License,
+ * or (at your option) any later version.
+ *
+ * This header is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301
+ * USA.
+ *
+ ***********************************************************************/
+
+/** @file
+ This header file just defines a preprocessor macro for the URI prefix
+ for this extension.
+*/
+
+#ifndef LV2_PUI_GTK_H
+#define LV2_PUI_GTK_H
+
+
+/** The URI prefix for this extension. */
+#define LV2_PUI_GTK_URI "http://lv2plug.in/ns/ext/pui-gtk"
+
+
+#endif
diff --git a/ext/pui.lv2/pui.h b/ext/pui.lv2/pui.h
index 9286944..caa7deb 100644
--- a/ext/pui.lv2/pui.h
+++ b/ext/pui.lv2/pui.h
@@ -261,12 +261,13 @@ typedef struct _LV2_PUI_Descriptor {
the same; @c features will probably not be the same array as the one the
plugin host passes to a plugin.
*/
- LV2_PUI_Handle (*instantiate)(struct _LV2_PUI_Descriptor const* descriptor,
- char const* plugin_uri,
- char const* bundle_path,
- LV2_PUI_Host_Descriptor const* host_descriptor,
- LV2_PUI_Host_Handle host_handle,
- LV2_Feature const* const* features);
+ LV2_PUI_Handle (*instantiate)(
+ struct _LV2_PUI_Descriptor const* descriptor,
+ char const* plugin_uri,
+ char const* bundle_path,
+ LV2_PUI_Host_Descriptor const* host_descriptor,
+ LV2_PUI_Host_Handle host_handle,
+ LV2_Feature const* const* features);
/**
Return the widget pointer for the UI object.