/* * enfle.h -- graphic loader Enfle main header * (C)Copyright 1998, 99, 2000 by Hiroshi Takekawa * This file is part of Enfle. * * Last Modified: Sat Apr 1 04:10:11 2000. * $Id: enfle.h,v 1.26 2000/04/04 09:24:52 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 _ENFLE_H #define _ENFLE_H #ifdef HAVE_CONFIG_H #ifndef _CONFIG_H #define _CONFIG_H # include "config.h" #endif #endif #ifdef PLUGIN_DEFAULT_SEARCH_PATH # define PLUGIN_SEARCH_PATH PLUGINDIR #endif #include #include #include #include #ifdef SHAPE # include #endif #include #include #if STDC_HEADERS # include #else # ifndef HAVE_MEMCPY # define memcpy(d, s, n) bcopy ((s), (d), (n)) # define memmove(d, s, n) bcopy ((s), (d), (n)) # endif #endif #ifndef SEEK_SET # define SEEK_SET 0 # define SEEK_CUR 1 # define SEEK_END 2 #endif #if HAVE_DIRENT_H # include #else # define dirent direct # if HAVE_SYS_NDIR_H # include # endif # if HAVE_SYS_DIR_H # include # endif # if HAVE_NDIR_H # include # endif #endif typedef struct _info Info; #include "archive.h" #include "image.h" #include "dlist.h" #ifdef WITH_DMALLOC # include #endif /* ローダが返す値 */ #define PROC_OK 1 #define PROC_ERROR 0 #define PROC_NOT (-1) #define METHOD(type, name, args) type (*name)args typedef struct _handler { METHOD(void , destroy , (Info *)); METHOD(void , alarmset, (Info *)); METHOD(void * , alarm , (int)); METHOD(void , alarmoff, (void)); } Handler; typedef enum { RERENDER_NONE = 0, RERENDER_NEXT, RERENDER_FIRST, RERENDER_REDRAW, RERENDER_ERROR = 255 } Rerender_method; struct _info { char *filename; Archive *ar; Dlist *pluginlist; char *format; Handler handler; Display *disp; Visual *visual; Window root, win, win_save; GC gc; Cursor normal_cursor, wait_cursor; unsigned char *comment; Image *image, *top_image, *shown_image; unsigned char *xdata; int xdata_size; int if_animated, if_quantize; int xwidth, xheight; /* xdata's width, height */ int mswidth, msheight; /* magnified screen's width, height */ int swidth, sheight; /* screen's width, height */ int depth; int npics; int index; Transparent transparent_disposal; Rerender_method rerender; double delay_factor; }; #endif