summaryrefslogtreecommitdiff
path: root/src/bin/main.c
blob: 56f752413ed98b7b28ba6dc66b268c16fcc51513 (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
#include <common.h>
#include <epulse.h>
#include <emix.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(epulse_common_init("epulse"), EXIT_FAILURE);
   EINA_SAFETY_ON_FALSE_RETURN_VAL(epulse_init() > 0, 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();

   epulse_common_shutdown();
   epulse_shutdown();
   emix_shutdown();
   return 0;
}

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