summaryrefslogtreecommitdiff
path: root/src/bin/main.c
blob: 3045268ac4947753864bdfd23e66114b7011bd0a (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
#include <emix.h>
#include "common.h"
#include "main_window.h"

#define DEFAULT_HEIGHT 600
#define DEFAULT_WIDTH 800

EAPI int
elm_main(int argc EINA_UNUSED, char *argv[]  EINA_UNUSED)
{
   Evas_Object *win;

   EINA_SAFETY_ON_FALSE_RETURN_VAL(emixer_common_init("emixer"), EXIT_FAILURE);
   EINA_SAFETY_ON_FALSE_RETURN_VAL(emix_init() == EINA_TRUE, EXIT_FAILURE);

   win = main_window_add();
   evas_object_resize(win, DEFAULT_WIDTH, DEFAULT_HEIGHT);
   evas_object_show(win);

   if (emix_backend_set("PULSEAUDIO") == EINA_FALSE)
     {
        ERR("Could not start the backend !");
        goto end;
     }

   elm_run();

end:
   emixer_common_shutdown();
   emix_shutdown();
   return 0;
}

/*
 * Create the default main() that will work with both quicklaunch or
 * regular applications.
 */
ELM_MAIN()