aboutsummaryrefslogtreecommitdiff
path: root/src/main.c
blob: fbd3c061fcaec05ce24e493566b1416169e1feb8 (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
#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;
}