cropper

changeset 16:88b8856fccf5

merged callbacks.h in main.h
author meillo@marmaro.de
date Thu, 04 Mar 2010 19:20:41 +0100
parents 7dbf3879939a
children 4453456abad1
files Makefile callbacks.c callbacks.h interface.c main.h
diffstat 5 files changed, 10 insertions(+), 50 deletions(-) [+]
line diff
     1.1 --- a/Makefile	Thu Mar 04 19:16:10 2010 +0100
     1.2 +++ b/Makefile	Thu Mar 04 19:20:41 2010 +0100
     1.3 @@ -3,7 +3,7 @@
     1.4  NAME    = cropper
     1.5  
     1.6  SRC = interface.c callbacks.c main.c
     1.7 -DEP = main.h callbacks.h
     1.8 +DEP = main.h
     1.9  OBJ = ${SRC:.c=.o}
    1.10  
    1.11  CC = gcc
    1.12 @@ -21,8 +21,8 @@
    1.13  	${CC} ${CFLAGS} -c $<
    1.14  
    1.15  
    1.16 -interface.o: main.h callbacks.h
    1.17 -callbacks.o: main.h callbacks.h
    1.18 +interface.o: main.h
    1.19 +callbacks.o: main.h
    1.20  main.o: main.h
    1.21  
    1.22  
     2.1 --- a/callbacks.c	Thu Mar 04 19:16:10 2010 +0100
     2.2 +++ b/callbacks.c	Thu Mar 04 19:20:41 2010 +0100
     2.3 @@ -2,7 +2,6 @@
     2.4  #include <gdk-pixbuf/gdk-pixbuf.h>
     2.5  #include <gdk/gdkkeysyms.h>
     2.6  #include "main.h"
     2.7 -#include "callbacks.h"
     2.8  
     2.9  int image_width;
    2.10  int image_height;
     3.1 --- a/callbacks.h	Thu Mar 04 19:16:10 2010 +0100
     3.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
     3.3 @@ -1,41 +0,0 @@
     3.4 -#ifndef _CALLBACKS_H_
     3.5 -#define _CALLBACKS_H_
     3.6 -
     3.7 -#include <gtk/gtk.h>
     3.8 -
     3.9 -double ratio;
    3.10 -
    3.11 -void crop(void);
    3.12 -gboolean on_key_press(GtkWidget* window, GdkEventKey* pKey, gpointer userdata);
    3.13 -void on_cropper_window_create(GtkObject* object, gpointer user_data);
    3.14 -void on_cropper_window_destroy(GtkObject* object, gpointer user_data);
    3.15 -
    3.16 -
    3.17 -
    3.18 -/*
    3.19 -gboolean on_cropper_window_delete_event(GtkWidget* widget, GdkEvent *event, gpointer user_data);
    3.20 -
    3.21 -void on_zoom_in_button_clicked(GtkObject* object, gpointer user_data);
    3.22 -void on_zoom_out_button_clicked(GtkObject* object, gpointer user_data);
    3.23 -void on_zoom_100_button_clicked(GtkObject* object, gpointer user_data);
    3.24 -void on_zoom_fit_button_clicked(GtkObject* object, gpointer user_data);
    3.25 -
    3.26 -void on_ratio_none_activate(GtkMenuItem* menuitem, gpointer user_data);
    3.27 -void on_ratio_square_activate(GtkMenuItem* menuitem, gpointer user_data);
    3.28 -void on_ratio_4x3_activate(GtkMenuItem* menuitem, gpointer user_data);
    3.29 -void on_ratio_3x2_activate(GtkMenuItem* menuitem, gpointer user_data);
    3.30 -void on_ratio_custom_activate(GtkMenuItem* menuitem, gpointer user_data);
    3.31 -
    3.32 -static void ratio_optionmenu_changed_cb(GtkOptionMenu* optionmenu, gpointer unser_data);
    3.33 -static void ratio_value_changed_cb(GtkSpinButton* spin, gpointer unser_data);
    3.34 -static void ratio_swap_button_cb(GtkButton* button, gpointer unser_data);
    3.35 -
    3.36 -void on_ratio_w_spinbutton_value_changed(GtkSpinButton* spinbutton, gpointer user_data);
    3.37 -void on_ratio_w_spinbutton_change_value(GtkSpinButton* spinbutton, GtkScrollType scroll, gpointer user_data);
    3.38 -void on_ratio_h_spinbutton_change_value(GtkSpinButton* spinbutton, GtkScrollType scroll, gpointer user_data);
    3.39 -void on_ratio_h_spinbutton_value_changed(GtkSpinButton* spinbutton, gpointer user_data);
    3.40 -void on_ratio_swap_button_clicked(GtkButton* button, gpointer user_data);
    3.41 -*/
    3.42 -
    3.43 -
    3.44 -#endif
     4.1 --- a/interface.c	Thu Mar 04 19:16:10 2010 +0100
     4.2 +++ b/interface.c	Thu Mar 04 19:20:41 2010 +0100
     4.3 @@ -9,7 +9,6 @@
     4.4  #include <gdk-pixbuf/gdk-pixbuf.h>
     4.5  
     4.6  #include "main.h"
     4.7 -#include "callbacks.h"
     4.8  
     4.9  #define GLADE_HOOKUP_OBJECT(component,widget,name) \
    4.10    g_object_set_data_full(G_OBJECT(component), name, \
     5.1 --- a/main.h	Thu Mar 04 19:16:10 2010 +0100
     5.2 +++ b/main.h	Thu Mar 04 19:20:41 2010 +0100
     5.3 @@ -1,6 +1,3 @@
     5.4 -#ifndef _MAIN_H_
     5.5 -#define _MAIN_H_
     5.6 -
     5.7  #include <gtk/gtk.h>
     5.8  
     5.9  GtkWidget* cropper_window;
    5.10 @@ -13,4 +10,10 @@
    5.11  
    5.12  int w, h, x, y;
    5.13  
    5.14 -#endif
    5.15 +/* from callbacks.h */
    5.16 +double ratio;
    5.17 +
    5.18 +void crop(void);
    5.19 +gboolean on_key_press(GtkWidget* window, GdkEventKey* pKey, gpointer userdata);
    5.20 +void on_cropper_window_create(GtkObject* object, gpointer user_data);
    5.21 +void on_cropper_window_destroy(GtkObject* object, gpointer user_data);