The name of EventDataTick is a bit redundant.
Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
#include <alsatimer-enum-types.h>
#include <alsatimer-enums.h>
-#include <event-data-tick.h>
+#include <tick-event.h>
#include <event-data-tstamp.h>
#include <device-id.h>
"alsatimer_instance_status_new";
"alsatimer_instance_status_get_tstamp";
- "alsatimer_event_data_tick_get_type";
- "alsatimer_event_data_tick_get_resolution";
- "alsatimer_event_data_tick_get_ticks";
-
"alsatimer_event_data_tstamp_get_type";
"alsatimer_event_data_tstamp_get_event";
"alsatimer_event_data_tstamp_get_tstamp";
"alsatimer_tstamp_event_type_get_type";
"alsatimer_event_type_get_type";
+
+ "alsatimer_tick_event_get_type";
+ "alsatimer_tick_event_get_resolution";
+ "alsatimer_tick_event_get_ticks";
} ALSA_GOBJECT_0_2_0;
+++ /dev/null
-// SPDX-License-Identifier: LGPL-3.0-or-later
-#ifndef __ALSA_GOBJECT_ALSATIMER_EVENT_DATA_TICK_H__
-#define __ALSA_GOBJECT_ALSATIMER_EVENT_DATA_TICK_H__
-
-#include <alsatimer.h>
-
-G_BEGIN_DECLS
-
-#define ALSATIMER_TYPE_EVENT_DATA_TICK (alsatimer_event_data_tick_get_type())
-
-typedef struct snd_timer_read ALSATimerEventDataTick;
-
-GType alsatimer_event_data_tick_get_type() G_GNUC_CONST;
-
-void alsatimer_event_data_tick_get_resolution(const ALSATimerEventDataTick *self,
- guint *resolution);
-
-void alsatimer_event_data_tick_get_ticks(const ALSATimerEventDataTick *self,
- guint *ticks);
-
-G_END_DECLS
-
-#endif
'instance-info.c',
'instance-params.c',
'instance-status.c',
- 'event-data-tick.c',
+ 'tick-event.c',
'event-data-tstamp.c',
)
'instance-info.h',
'instance-params.h',
'instance-status.h',
- 'event-data-tick.h',
+ 'tick-event.h',
'event-data-tstamp.h',
)
#include "privates.h"
/**
- * ALSATimerEventDataTick:
+ * ALSATimerTickEvent:
* A boxed object to represent event of timer with tick count.
*
- * A [struct@EventDataTick] is a boxed object to represent event of timer with tick count.
+ * A [struct@TickEvent] is a boxed object to represent event of timer with tick count.
*
* The object wraps `struct snd_timer_read` in UAPI of Linux sound subsystem.
*/
-ALSATimerEventDataTick *timer_event_data_tick_copy(const ALSATimerEventDataTick *self)
+ALSATimerTickEvent *timer_tick_event_copy(const ALSATimerTickEvent *self)
{
#ifdef g_memdup2
return g_memdup2(self, sizeof(*self));
#endif
}
-G_DEFINE_BOXED_TYPE(ALSATimerEventDataTick, alsatimer_event_data_tick, timer_event_data_tick_copy, g_free)
+G_DEFINE_BOXED_TYPE(ALSATimerTickEvent, alsatimer_tick_event, timer_tick_event_copy, g_free)
/**
- * alsatimer_event_data_tick_get_resolution:
- * @self: A [struct@EventDataTick].
+ * alsatimer_tick_event_get_resolution:
+ * @self: A [struct@TickEvent].
* @resolution: (out): The resolution of tick event.
*
* Get the resolution of tick event.
*/
-void alsatimer_event_data_tick_get_resolution(const ALSATimerEventDataTick *self,
+void alsatimer_tick_event_get_resolution(const ALSATimerTickEvent *self,
guint *resolution)
{
*resolution = self->resolution;
}
/**
- * alsatimer_event_data_tick_get_ticks:
- * @self: A [struct@EventDataTick].
+ * alsatimer_tick_event_get_ticks:
+ * @self: A [struct@TickEvent].
* @ticks: (out): The tick count since the last event.
*
* Get the tick count since the last event.
*/
-void alsatimer_event_data_tick_get_ticks(const ALSATimerEventDataTick *self,
+void alsatimer_tick_event_get_ticks(const ALSATimerTickEvent *self,
guint *ticks)
{
*ticks = self->ticks;
--- /dev/null
+// SPDX-License-Identifier: LGPL-3.0-or-later
+#ifndef __ALSA_GOBJECT_ALSATIMER_TICK_EVENT_H__
+#define __ALSA_GOBJECT_ALSATIMER_TICK_EVENT_H__
+
+#include <alsatimer.h>
+
+G_BEGIN_DECLS
+
+#define ALSATIMER_TYPE_TICK_EVENT (alsatimer_tick_event_get_type())
+
+typedef struct snd_timer_read ALSATimerTickEvent;
+
+GType alsatimer_tick_event_get_type() G_GNUC_CONST;
+
+void alsatimer_tick_event_get_resolution(const ALSATimerTickEvent *self,
+ guint *resolution);
+
+void alsatimer_tick_event_get_ticks(const ALSATimerTickEvent *self,
+ guint *ticks);
+
+G_END_DECLS
+
+#endif
/**
* ALSATimerUserInstance::handle-tick-event:
* @self: A [class@UserInstance].
- * @event: (transfer none): The instance of [struct@EventDataTick].
+ * @event: (transfer none): The instance of [struct@TickEvent].
*
* Emitted when tick event occurs.
*/
G_STRUCT_OFFSET(ALSATimerUserInstanceClass, handle_tick_event),
NULL, NULL,
g_cclosure_marshal_VOID__BOXED,
- G_TYPE_NONE, 1, ALSATIMER_TYPE_EVENT_DATA_TICK);
+ G_TYPE_NONE, 1, ALSATIMER_TYPE_TICK_EVENT);
/**
* ALSATimerUserInstance::handle-tstamp-event:
/**
* ALSATimerUserInstanceClass::handle_tick_event:
* @self: A [class@UserInstance].
- * @event: (transfer none): An object derived from [struct@EventDataTick].
+ * @event: (transfer none): An object derived from [struct@TickEvent].
*
* Class closure for the [signal@UserInstance::handle-tick-event] signal.
*/
- void (*handle_tick_event)(ALSATimerUserInstance *self, const ALSATimerEventDataTick *event);
+ void (*handle_tick_event)(ALSATimerUserInstance *self, const ALSATimerTickEvent *event);
/**
* ALSATimerUserInstanceClass::handle_tstamp_event: