![]() |
FJMovieEditor Pré-Alpha
A GTK video editor for GNOME. Designed for Artists to do, special effects, compositing and animation.
|
00001 /* 00002 A GTK video editor Designed for Artists to do, special effects, compositing and animation. 00003 Copyright (C) 2011 Fabio J. Gonzalez 00004 00005 This program is free software: you can redistribute it and/or modify 00006 it under the terms of the GNU General Public License as published by 00007 the Free Software Foundation, either version 3 of the License, or 00008 (at your option) any later version. 00009 00010 This program is distributed in the hope that it will be useful, 00011 but WITHOUT ANY WARRANTY; without even the implied warranty of 00012 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00013 GNU General Public License for more details. 00014 00015 You should have received a copy of the GNU General Public License 00016 along with this program. If not, see <http://www.gnu.org/licenses/>. 00017 */ 00018 00019 #ifndef FJME_TOOLS_H 00020 #define FJME_TOOLS_H 1 00021 00022 #include "basic.h" 00023 00024 #define LOCK_HORIZONTAL (1) 00025 #define LOCK_VERTICAL (1 << 1) 00026 #define LOCK_DISTANCE (1 << 2) 00027 #define LOCK_RELATIVE (1 << 3) 00028 00029 struct struct_lock_values; 00030 typedef struct struct_lock_values struct_lock_values; 00031 00032 struct ClickSelectDrag; 00033 typedef struct ClickSelectDrag ClickSelectDrag; 00034 00035 typedef gboolean(*GWFunction)(GtkWidget* widget, gpointer data); 00036 00037 struct struct_lock_values { 00038 GtkWidget* vbox; 00039 GtkWidget* toggle1; 00040 GtkWidget* toggle2; 00041 GtkWidget* toggle3; 00042 GtkWidget* toggle4; 00043 GtkWidget* button; 00044 00045 guchar lock_type; 00046 00047 gdouble lock_ax; 00048 gdouble lock_ay; 00049 00050 gdouble lock_bx; 00051 gdouble lock_by; 00052 00053 gdouble *ax; 00054 gdouble *ay; 00055 00056 gdouble *bx; 00057 gdouble *by; 00058 }; 00059 00060 void lock_values_set_config(GtkWidget* widget, gpointer* data); 00061 00062 void lock_values(gdouble* ax, gdouble* ay, gdouble* bx, gdouble* by, guchar props); 00063 00064 void lock_values_Init(iPlugin* p); 00065 void lock_values_Frame(iPlugin* p); 00066 void lock_values_Config(iPlugin* p); 00067 00068 /* 00069 * Click, select and grab 00070 * graphical plugins. 00071 * 00072 * Ticket: #25 00073 */ 00074 00075 struct ClickSelectDrag { 00076 gdouble x; 00077 gdouble y; 00078 gboolean dragged; 00079 gboolean shift; 00080 GList* selecteds; 00081 }; 00082 00083 gboolean ClickSelectDragMotionEvent(GtkWidget *widget, GdkEventMotion *evt, gpointer data); 00084 gboolean ClickSelectDragButtonEvent(GtkWidget *widget, GdkEventButton *evt, gpointer data); 00085 gboolean ClickSelectDragKeyEvent(GtkWidget *widget, GdkEventKey *evt, gpointer data); 00086 00087 void ClickSelectDrag_Init(iPlugin* p); 00088 void ClickSelectDrag_Frame(iPlugin* p); 00089 00090 /* 00091 * Adjust events for 00092 * keyframe managements. 00093 * Show a graphical menu. 00094 * Allow key i and key d support 00095 */ 00096 00097 struct keyframe_signal { 00098 GtkWidget* widget; 00099 GWFunction frame_insert; 00100 GWFunction frame_delete; 00101 gpointer data; 00102 GtkWidget* menu; 00103 GtkWidget* insert; 00104 GtkWidget * delete; 00105 }; 00106 00107 00108 void keyframe_signal_call_insert(gpointer data); 00109 void keyframe_signal_call_delete(gpointer data); 00110 00111 void keyframe_signal_set(GtkWidget* widget, GWFunction frame_insert, 00112 GWFunction frame_delete, gpointer data); 00113 00114 gboolean keyframe_signal_set_key_event(GtkWidget *widget, 00115 GdkEventKey *evt, gpointer data); 00116 00117 gboolean keyframe_signal_set_button_event(GtkWidget *widget, 00118 GdkEventButton *evt, gpointer data); 00119 00120 00121 void click_select_drag_init( iPlugin* me ); 00122 void click_select_drag_frame( iPlugin* me ); 00123 00132 iPlugin* click_select_drag_new( iPlugin* p ); 00133 00140 void click_select_drag_delete( iPlugin* screen ); 00141 00142 00143 00144 #endif