/* * browse.h -- Enfle main browsing loop header * (C)Copyright 1999, 2000 by Hiroshi Takekawa * This file is part of Enfle. * * Last Modified: Mon May 8 22:26:14 2000. * $Id: browse.h,v 1.16 2000/05/12 18:48:46 sian Exp $ * * Enfle is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * Enfle is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA */ #ifndef BROWSE_H #define BROWSE_H #ifdef HAVE_CONFIG_H #ifndef _CONFIG_H #define _CONFIG_H # include "config.h" #endif #endif /* 拡大率 */ #define MAGNIFICATION 2.0 /* 画像のサイズが画面より大きい場合に、どこまで表示するか */ #define WIDTH_CUT 0 #define HEIGHT_CUT 32 /* 画像サイズがこれらより小さい場合は表示しない 0(全部表示)にしてもよい */ #ifndef X_THRESHOLD # define X_THRESHOLD 32 #endif #ifndef Y_THRESHOLD # define Y_THRESHOLD 32 #endif /* thumbnailに関する設定 */ #define THUMB_WIDTH 800 #define THUMB_HEIGHT 600 #define THUMB_SIZE 190 #define THUMB_INTERVAL 10 #define THUMB_MAXFILES 12 /* カーソルの形 */ #define WAIT_CURSOR XC_watch #define NORMAL_CURSOR XC_arrow /* act_hashのサイズ */ #define ACT_HASH_SIZE 4034 /* -Cのdefault */ #define DEFAULT_CONVERT_FORMAT "PNG" #define INFO_STRING_LENGTH 256 /* Please don't change this unless you know what you're doing. */ #define MAIN_WIN_MASK \ ExposureMask |\ ButtonMotionMask |\ ButtonPressMask |\ ButtonReleaseMask |\ KeyPressMask |\ StructureNotifyMask |\ VisibilityChangeMask typedef enum { _NOTHING, _LOAD, _NEXT, _NEXTDIR, _PREV, _TOP, _DELETE, _CHANGE, _END } Event; typedef enum { _FORWARD, _BACKWARD } Direction; typedef struct _binfo Binfo; #include "enfle.h" #include "hash.h" struct _binfo { Hash *act_hash; Dlist *pixmap_list; Dlist_data *pixmap_list_current; Pixmap pix; Direction direction; Interpolate_method interpolate_method; char *conv_format; char info_string[INFO_STRING_LENGTH]; Font info_string_font; int x_threshold, y_threshold; int x_offset, y_offset; int x_prev, y_prev; int swidth, sheight; /* screen width, height */ int vwidth, vheight; /* view width, height */ int w_scroll, h_scroll; int w_offset, h_offset; int nfiles; int current_file; int pressed; int if_convert, if_magnify, if_fullscreen; int if_comment, if_warning, if_wallpaper; }; void main_loop(Dlist *, Info *, Binfo *); int save_image(char *, Info *, Image *, char *); int load_image(Info *, Image *); int browse_load_image(Info *, Binfo *, Image *); int browse_save_image(Info *, Binfo *, Image *, char *, char *); void browse_show_image(Info *, Binfo *); void browse_refresh(Info *, Binfo *, Image *, int); void browse_create_thumbnail(Info *, Binfo *, Image *, Dlist_data *); void browse_set_wallpaper(Info *, Binfo *, Image *); int browse_magnify(Info *, Binfo *, Image *); void browse_calculate_view_window(Binfo *, Image *); void browse_resize_window(Info *, Binfo *, Image *); #endif