aboutsummaryrefslogtreecommitdiff
path: root/src/main.c
blob: 9b67bf214d9561fc29638aa54153ec904f30b50f (plain)
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
#include <gtk-3.0/gtk/gtk.h>
#include <stdio.h>
#include <stdlib.h>

#include "file.h"
#include "image.h"
#include "option.h"
#include "window.h"

int main(int argc, char **argv)
{
    gtk_init(&argc, &argv);

    parse_options(argc, argv);

    // load the specified image
    if (load_image(options->file_name)) {
        exit(EXIT_FAILURE);
    }

    // scan other supported image file in the same dir
    scan(options->file_name);

    create_main_window();
    gtk_main();

    return EXIT_SUCCESS;
}