1 /* xsane -- a graphical (X11, gtk) scanner-oriented SANE frontend 2 3 xsane-front-gtk.h 4 5 Oliver Rauch <Oliver.Rauch@rauch-domain.de> 6 Copyright (C) 1998-2007 Oliver Rauch 7 This file is part of the XSANE package. 8 9 This program is free software; you can redistribute it and/or modify 10 it under the terms of the GNU General Public License as published by 11 the Free Software Foundation; either version 2 of the License, or 12 (at your option) any later version. 13 14 This program is distributed in the hope that it will be useful, 15 but WITHOUT ANY WARRANTY; without even the implied warranty of 16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 17 GNU General Public License for more details. 18 19 You should have received a copy of the GNU General Public License 20 along with this program; if not, write to the Free Software 21 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ 22 23 /* ---------------------------------------------------------------------------------------------------------------------- */ 24 25 #include <sane/sane.h> 26 #include "xsane.h" 27 28 /* ---------------------------------------------------------------------------------------------------------------------- */ 29 30 #ifndef xsane_front_gtk_h 31 #define xsane_front_gtk_h 32 33 /* ---------------------------------------------------------------------------------------------------------------------- */ 34 35 extern int xsane_parse_options(char *options, char *argv[]); 36 extern void xsane_get_bounds(const SANE_Option_Descriptor *opt, double *minp, double *maxp); 37 extern double xsane_find_best_resolution(int well_known_option, double dpi); 38 extern double xsane_set_resolution(int well_known_option, double resolution); 39 extern void xsane_set_all_resolutions(void); 40 extern void xsane_define_maximum_output_size(); 41 extern void xsane_close_dialog_callback(GtkWidget *widget, gpointer data); 42 extern void xsane_authorization_button_callback(GtkWidget *widget, gpointer data); 43 extern gint xsane_authorization_callback(SANE_String_Const resource, 44 SANE_Char username[SANE_MAX_USERNAME_LEN], 45 SANE_Char password[SANE_MAX_PASSWORD_LEN]); 46 extern void xsane_progress_bar_set_fraction(GtkProgressBar *progress_bar, gdouble fraction); 47 extern void xsane_progress_cancel(GtkWidget *widget, gpointer data); 48 extern void xsane_progress_new(char *bar_text, char *info, GtkSignalFunc callback, int *cancel_data_pointer); 49 extern void xsane_progress_update(gfloat newval); 50 extern void xsane_progress_clear(); 51 extern GtkWidget *xsane_vendor_pixmap_new(GdkWindow *window, GtkWidget *parent); 52 extern GtkWidget *xsane_toggle_button_new_with_pixmap(GdkWindow *window, GtkWidget *parent, const char *xpm_d[], const char *desc, 53 int *state, void *xsane_toggle_button_callback); 54 extern GtkWidget *xsane_button_new_with_pixmap(GdkWindow *window, GtkWidget *parent, const char *xpm_d[], const char *desc, 55 void *xsane_button_callback, gpointer data); 56 extern void xsane_pixmap_new(GtkWidget *parent, char *title, int width, int height, XsanePixmap *hist); 57 extern void xsane_option_menu_new(GtkWidget *parent, char *str_list[], const char *val, int option_number, const char *desc, 58 void *option_menu_callback, SANE_Int settable, const gchar *widget_name); 59 extern void xsane_option_menu_new_with_pixmap(GdkWindow *window, GtkBox *parent, const char *xpm_d[], const char *desc, 60 char *str_list[], const char *val, 61 GtkWidget **data, int option, 62 void *option_menu_callback, SANE_Int settable, const gchar *widget_name); 63 extern void xsane_range_new(GtkBox *parent, char *labeltext, const char *desc, 64 float min, float max, float quant, float page_step, 65 int digits, double *val, GtkWidget **data, void *xsane_range_callback, SANE_Int settable); 66 extern void xsane_range_new_with_pixmap(GdkWindow *window, GtkBox *parent, const char *xpm_d[], const char *desc, 67 float min, float max, float quant, float page_step, int digits, 68 double *val, GtkWidget **data, int option, void *xsane_range_callback, SANE_Int settable); 69 extern void xsane_set_filename(gchar *filename); 70 extern void xsane_outputfilename_new(GtkWidget *vbox); 71 extern void xsane_separator_new(GtkWidget *xsane_parent, int dist); 72 extern void xsane_vseparator_new(GtkWidget *xsane_parent, int dist); 73 extern GtkWidget *xsane_info_table_text_new(GtkWidget *table, gchar *text, int row, int colomn); 74 extern GtkWidget *xsane_info_text_new(GtkWidget *parent, gchar *text); 75 extern void xsane_refresh_dialog(void); 76 extern void xsane_update_param(void *arg); 77 extern void xsane_define_output_filename(void); 78 extern int xsane_identify_output_format(char *filename, char *filetype, char **ext); 79 extern void xsane_change_working_directory(void); 80 extern int xsane_display_eula(int ask_for_accept); 81 extern void xsane_display_gpl(void); 82 extern void xsane_window_get_position(GtkWidget *gtk_window, gint *x, gint *y); 83 extern void xsane_widget_test_uposition(GtkWidget *gtk_window); 84 extern int xsane_front_gtk_getname_dialog(const char *dialog_title, const char *desc_text, char *oldname, char **newname); 85 extern void xsane_front_gtk_list_entries_swap(GtkWidget *list_item_1, GtkWidget *list_item_2); 86 extern void xsane_front_gtk_add_process_to_list(pid_t pid); 87 extern int xsane_front_gtk_option_defined(char *string); 88 extern void xsane_front_gtk_email_project_update_lockfile_status(void); 89 extern void xsane_project_dialog_close(void); 90 91 92 /* ---------------------------------------------------------------------------------------------------------------------- */ 93 94 #endif 95 96