1 #ifndef OPTIONS_H 2 #define OPTIONS_H 3 4 #include "gliv.h" 5 6 /* Links between the option dialog buttons and the options values. */ 7 #define OPTION_FULLSCREEN (&new_options->fullscreen) 8 #define OPTION_MENU_BAR (&new_options->menu_bar) 9 #define OPTION_SCROLLBARS (&new_options->scrollbars) 10 #define OPTION_STATUS_BAR (&new_options->status_bar) 11 #define OPTION_DELAY_CURSOR (&new_options->delay) 12 #define OPTION_DITHERING (&new_options->dither) 13 #define OPTION_SCALE_DOWN (&new_options->scaledown) 14 #define OPTION_ALPHA_CHECKS (&new_options->alpha_checks) 15 #define OPTION_ONE_IMAGE (&new_options->one_image) 16 #define OPTION_MIPMAPS (&new_options->mipmap) 17 #define OPTION_MAXIMIZE (&new_options->maximize) 18 #define OPTION_RESIZE_WIN (&new_options->resize_win) 19 #define OPTION_IMAGES_MENUS_STARTUP (&new_options->build_menus) 20 #define OPTION_IMAGES_MENUS_MNEMONICS (&new_options->mnemonics) 21 #define OPTION_THUMBNAILS (&new_options->thumbnails) 22 #define OPTION_THUMBNAILS_WIDTH (&new_options->thumb_width) 23 #define OPTION_THUMBNAILS_HEIGHT (&new_options->thumb_height) 24 #define OPTION_ZOOM_POINTER (&new_options->zoom_pointer) 25 #define OPTION_MAX_FPS (&new_options->fps) 26 #define OPTION_HISTORY_LENGTH (&new_options->history_size) 27 #define OPTION_START_SLIDE_SHOW (&new_options->start_show) 28 #define OPTION_SLIDE_SHOW_LOOP (&new_options->loop) 29 #define OPTION_SLIDE_SHOW_DELAY (&new_options->duration) 30 #define OPTION_BACKGROUND (&new_options->bg_col) 31 #define OPTION_ALPHA1 (&new_options->alpha1) 32 #define OPTION_ALPHA2 (&new_options->alpha2) 33 #define OPTION_NOTICE_TIME (&new_options->notice_time) 34 #define OPTION_CONFIRM_QUIT (&new_options->confirm_quit) 35 #define OPTION_TRANS_DURATION (&new_options->trans_time) 36 #define OPTION_SAVE_QUIT (&new_options->save_quit) 37 #define OPTION_TRANSITIONS (&new_options->transitions) 38 #define OPTION_KEEP_TRANSFO (&new_options->keep_transfo) 39 #define OPTION_OPENGL_ERRORS (&new_options->opengl_errors) 40 #define OPTION_FILTERING (&new_options->filtering) 41 42 /* Must be kept in sync with 'enum transfo' */ 43 enum image_position { 44 POSITION_CENTER = 0, 45 POSITION_TOP_LEFT, 46 POSITION_TOP_RIGHT, 47 POSITION_BOTTOM_LEFT, 48 POSITION_BOTTOM_RIGHT, 49 POSITION_KEEP 50 }; 51 52 /* Options controlled by the user. */ 53 typedef struct { 54 gboolean fullscreen; 55 gboolean maximize; 56 gboolean scaledown; 57 gboolean menu_bar; 58 gboolean status_bar; 59 gboolean scrollbars; 60 gboolean zoom_pointer; 61 gboolean alpha_checks; 62 gboolean dither; 63 gboolean force; 64 gboolean build_menus; 65 gboolean mipmap; 66 gboolean mnemonics; 67 gboolean loop; 68 gboolean one_image; 69 gboolean start_show; 70 gboolean thumbnails; 71 gboolean resize_win; 72 gboolean confirm_quit; 73 gboolean save_quit; 74 gboolean transitions; 75 gboolean recursive; 76 gboolean keep_transfo; 77 gboolean opengl_errors; 78 gboolean filtering; 79 gint thumb_width; 80 gint thumb_height; 81 gint delay; 82 gint duration; 83 gint history_size; 84 gint fps; 85 gint notice_time; 86 gint trans_time; 87 enum image_position initial_pos; 88 gchar *initial_geometry; 89 GdkColor bg_col; 90 GdkColor alpha1; 91 GdkColor alpha2; 92 } options_struct; 93 94 /* Some global flags and variables. */ 95 typedef struct { 96 gboolean cursor_hidden; 97 gboolean help; 98 gboolean alpha_checks_changed; 99 gint max_texture_size; 100 GtkAllocation *wid_size; 101 gint scr_width; 102 gint scr_height; 103 } rt_struct; 104 105 gboolean show_options(void); 106 107 #endif 108