zathura.c 592 Bytes
Newer Older
1
2
/* See LICENSE file for license and copyright information */

Moritz Lipp's avatar
Moritz Lipp committed
3
#include "zathura.h"
Moritz Lipp's avatar
Moritz Lipp committed
4

Moritz Lipp's avatar
Moritz Lipp committed
5
6
7
/* function implementation */
bool
init_zathura()
8
{
Moritz Lipp's avatar
Moritz Lipp committed
9
10
  if(!(Zathura.UI.session = girara_session_create()))
    return false;
11

Moritz Lipp's avatar
Moritz Lipp committed
12
13
  if(!girara_session_init(Zathura.UI.session))
    return false;
14

Moritz Lipp's avatar
Moritz Lipp committed
15
  return true;
16
17
}

Moritz Lipp's avatar
Moritz Lipp committed
18
/* main function */
19
int main(int argc, char* argv[])
Moritz Lipp's avatar
Moritz Lipp committed
20
{
21
22
  g_thread_init(NULL);
  gdk_threads_init();
Moritz Lipp's avatar
Moritz Lipp committed
23
24
  gtk_init(&argc, &argv);

Moritz Lipp's avatar
Moritz Lipp committed
25
26
27
  if(!init_zathura()) {
    printf("error: coult not initialize zathura\n");
    return -1;
28
  }
Moritz Lipp's avatar
Moritz Lipp committed
29

30
  gdk_threads_enter();
Moritz Lipp's avatar
Moritz Lipp committed
31
  gtk_main();
32
  gdk_threads_leave();
33

Moritz Lipp's avatar
Moritz Lipp committed
34
35
  return 0;
}