zathura/main.c

37 lines
714 B
C
Raw Normal View History

2012-01-28 19:54:10 +01:00
/* See LICENSE file for license and copyright information */
#include <stdio.h>
#include <glib/gstdio.h>
2012-03-04 18:35:16 +01:00
#include <glib/gi18n.h>
2012-03-04 23:51:43 +01:00
#include <locale.h>
2012-01-28 19:54:10 +01:00
#include "zathura.h"
/* main function */
int main(int argc, char* argv[])
{
2012-03-04 18:35:16 +01:00
setlocale(LC_ALL, "");
bindtextdomain(GETTEXT_PACKAGE, LOCALEDIR);
bind_textdomain_codeset(GETTEXT_PACKAGE, "UTF-8");
textdomain(GETTEXT_PACKAGE);
2012-01-28 19:54:10 +01:00
g_thread_init(NULL);
gdk_threads_init();
gtk_init(&argc, &argv);
zathura_t* zathura = zathura_init(argc, argv);
if (zathura == NULL) {
fprintf(stderr, "error: could not initialize zathura\n");
return -1;
}
gdk_threads_enter();
gtk_main();
gdk_threads_leave();
zathura_free(zathura);
return 0;
}