cropper
view main.c @ 7:ec2d11d96fb0
image is now gdk-pixbuff; zoom implemented in a basic way
author | meillo@marmaro.de |
---|---|
date | Wed, 19 Mar 2008 23:01:43 +0100 |
parents | 2f11ab3e6047 |
children | 7e1cf00de1df |
line source
1 #include <gtk/gtk.h>
3 #include "main.h"
4 #include "interface.h"
5 #include "support.h"
8 int main (int argc, char *argv[]) {
10 /* printf("argc: %i\nargv[0]: %s\nargv[1]: %s\nargv[2]: %s\n", argc, argv[0], argv[1], argv[2]); */
12 /* commandline option handling */
13 if (argc == 2) {
14 if (strcmp(argv[1], "--version") == 0) {
15 g_print("cropper - a crop frontend for convert\nversion 0.1\nhttp://prog.marmaro.de\n");
16 return(0);
17 } else {
18 image_filename = argv[1];
19 }
20 } else {
21 g_print("usage: cropper <image>\n cropper --version\n");
22 return(1);
23 }
27 gtk_set_locale ();
28 gtk_init (&argc, &argv);
30 add_pixmap_directory ("/usr/share/pixmaps");
32 cropper_window = create_cropper_window ();
33 gtk_widget_show (cropper_window);
35 gtk_main ();
36 return 0;
37 }