summaryrefslogtreecommitdiff
path: root/src/bin/main.c
blob: b74940b8e4ccb94cd6411d0659227981829b9f4f (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
#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);

   emix_backend_set("PULSEAUDIO");
   elm_run();

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

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