2
* Copyright (c) 2009 Giuseppe Torelli <colossus73@gmail.com>
3
* Copyright (c) 2009 Tadej Borovšak <tadeboro@gmail.com>
5
* This program is free software; you can redistribute it and/or modify
6
* it under the terms of the GNU General Public License as published by
7
* the Free Software Foundation; either version 2 of the License,or
8
* (at your option) any later version.
10
* This program is distributed in the hope that it will be useful,
11
* but WITHOUT ANY WARRANTY; without even the implied warranty of
12
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
* GNU Library General Public License for more details.
15
* You should have received a copy of the GNU General Public License
16
* along with this program; if not,write to the Free Software
17
* Foundation,Inc.,59 Temple Place - Suite 330,Boston,MA 02111-1307,USA.
21
#ifndef __IMAGINATION_H__
22
#define __IMAGINATION_H__
25
#include <gdk/gdkkeysyms.h>
28
/* Transition preview frame rate. I decided to use 25 fps, which
29
* should be handled on time by most machines. */
30
#define PREVIEW_FPS 25
32
/* The transition speed is defined as a duration in seconds. */
37
/* Export frame rate is currently set to 29.97. The intent of this
38
* macro is to ease grepping through the sources if we decide to
39
* implement different frame rates for different export formats.
40
* Second macro is string representation of frame rate to be used
41
* when constructing encoder command line. */
42
#define EXPORT_FPS 29.97
43
#define EXPORT_FPS_STRING "29.97"
45
#define comment_string "Imagination 1.0 Slideshow Project - http://imagination.sf.net"
47
typedef struct _plugin plugin;
51
const gchar *name; /* The name of the transition */
52
gpointer address; /* The mem address of the routine */
55
typedef struct _slide_struct slide_struct;
64
void (*render) (GdkDrawable*, GdkPixbuf*, GdkPixbuf*, gdouble, gint);
65
gint combo_transition_type_index;
68
typedef struct _img_window_struct img_window_struct;
70
struct _img_window_struct
72
/* Main GUI related variables */
73
GtkWidget *imagination_window; // Main window
76
GtkWidget *save_as_menu;
77
GtkWidget *properties_menu;
78
GtkWidget *close_menu;
79
GtkWidget *open_button;
80
GtkWidget *save_button;
81
GtkWidget *import_menu;
82
GtkWidget *remove_menu;
83
GtkWidget *import_button;
84
GtkWidget *remove_button;
85
GtkWidget *preview_menu;
86
GtkWidget *preview_button;
87
GtkWidget *export_menu;
88
GtkWidget *export_button;
89
GtkWidget *transition_type;
90
GtkWidget *duration; // Duration spin button
91
GtkWidget *trans_duration;
92
GtkWidget *slide_selected_data;
94
GtkWidget *total_time_data;
95
GtkWidget *filename_data;
96
GtkWidget *resolution_data;
97
GtkWidget *thumb_scrolledwindow;
98
GtkWidget *thumbnail_iconview;
100
GtkWidget *progress_bar;
102
GtkWidget *image_area;
104
GtkListStore *thumbnail_model;
107
/* Import slides dialog variables */
108
GtkWidget *dim_label;
109
GtkWidget *size_label;
110
GtkWidget *preview_image;
112
/* Renderers and module stuff */
113
gint nr_transitions_loaded;
116
/* Project related variables */
117
gchar *project_filename; // project name for saving
118
gchar *slideshow_filename; // exported file name
120
gboolean distort_images;
121
gboolean project_is_modified;
122
gint slideshow_format_index;
123
guint32 background_color;
127
/* Variables common to export and preview functions */
128
slide_struct *current_slide;
129
GdkPixbuf *slide_pixbuf;
132
GtkTreeIter *cur_ss_iter;
136
/* Preview related variables */
137
gboolean preview_is_running;
138
GtkWidget *import_slide_chooser;
139
GtkWidget *slide_number_entry;
141
/* Export dialog related stuff */
142
gboolean export_is_running;
145
GtkWidget *export_pbar1;
146
GtkWidget *export_pbar2;
147
GtkWidget *export_label;
148
GtkWidget *export_dialog;
149
guint export_frame_nr; // Total number of frames
150
guint export_frame_cur; // Current frame
151
guint export_slide_nr; // Number of frames fo current slide
152
guint export_slide_cur; // Current slide frame
153
guint export_slide; // Number of slide being exported
154
GSourceFunc export_idle_func; /* If TRUE, connect transition export,
155
else still export function. */