aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/ecore_audio/ecore_audio_obj.c
blob: 3607cd9fca697aef1ef541ddf164d3ee29e93867 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif

#include <stdlib.h>
#include <stdio.h>
#include <string.h>

#ifdef HAVE_FEATURES_H
#include <features.h>
#endif
#include <ctype.h>
#include <errno.h>

#include <Eo.h>
#include "ecore_audio_private.h"

#define MY_CLASS ECORE_AUDIO_CLASS
#define MY_CLASS_NAME "Ecore_Audio"

EOLIAN static void
_ecore_audio_name_set(Eo *eo_obj EINA_UNUSED, Ecore_Audio_Object *obj, const char *name)
{
  eina_stringshare_replace(&obj->name, name);
}

EOLIAN static const char*
_ecore_audio_name_get(Eo *eo_obj EINA_UNUSED, Ecore_Audio_Object *obj)
{
  return obj->name;
}

EOLIAN static void
_ecore_audio_paused_set(Eo *eo_obj EINA_UNUSED, Ecore_Audio_Object *obj, Eina_Bool paused)
{
  obj->paused = paused;
}

EOLIAN static Eina_Bool
_ecore_audio_paused_get(Eo *eo_obj EINA_UNUSED, Ecore_Audio_Object *obj)
{
  return obj->paused;
}

EOLIAN static void
_ecore_audio_volume_set(Eo *eo_obj EINA_UNUSED, Ecore_Audio_Object *obj, double volume)
{
  obj->volume = volume;
}

EOLIAN static double
_ecore_audio_volume_get(Eo *eo_obj EINA_UNUSED, Ecore_Audio_Object *obj)
{
  return obj->volume;
}

EOLIAN static Eo *
_ecore_audio_eo_base_constructor(Eo *eo_obj, Ecore_Audio_Object *obj)
{
  obj->volume = 1.0;
  return eo_do_super_ret(eo_obj, MY_CLASS, eo_obj, eo_constructor());
}

#include "ecore_audio.eo.c"