Use util_clip_triangle() in pan_item_tri_new()
[geeqie.git] / src / slideshow.h
index 4216ecb..2ad8f10 100644 (file)
@@ -1,29 +1,70 @@
 /*
- * Geeqie
- * (C) 2004 John Ellis
- * Copyright (C) 2008 - 2012 The Geeqie Team
+ * Copyright (C) 2004 John Ellis
+ * Copyright (C) 2008 - 2016 The Geeqie Team
  *
  * Author: John Ellis
  *
- * This software is released under the GNU General Public License (GNU GPL).
- * Please read the included file COPYING for more information.
- * This software comes with no warranty of any kind, use at your own risk!
+ * This program 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.
+ *
+ * This program 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.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
  */
 
-
 #ifndef SLIDESHOW_H
 #define SLIDESHOW_H
 
+#include <glib.h>
+
+struct CollectInfo;
+struct CollectionData;
+struct FileData;
+struct ImageWindow;
+struct LayoutWindow;
 
 #define SLIDESHOW_SUBSECOND_PRECISION 10
 #define SLIDESHOW_MIN_SECONDS    0.1
-#define SLIDESHOW_MAX_SECONDS 3600.0
+#define SLIDESHOW_MAX_SECONDS 86399.0 /* 24 hours - 1 sec */
 
 /*
  * It works like this, it uses path_list, if that does not exist, it uses
  * CollectionData, then finally falls back to the layout listing.
  */
 
+struct SlideShowData
+{
+       LayoutWindow *lw;        /**< use this window to display the slideshow */
+       ImageWindow *imd;        /**< use this window only if lw is not available,
+                                   @FIXME it is probably required only by img-view.cc and should be dropped with it */
+
+       GList *filelist;
+       CollectionData *cd;
+       FileData *dir_fd;
+
+       GList *list;
+       GList *list_done;
+
+       FileData *slide_fd;
+
+       guint slide_count;
+       guint timeout_id; /**< event source id */
+
+       gboolean from_selection;
+
+       void (*stop_func)(SlideShowData *, gpointer);
+       gpointer stop_data;
+
+       gboolean paused;
+};
+
 void slideshow_free(SlideShowData *ss);
 
 gboolean slideshow_should_continue(SlideShowData *ss);