FJMovieEditor Pré-Alpha
A GTK video editor for GNOME. Designed for Artists to do, special effects, compositing and animation.

trunk/libfjme/plug-ins.h

Go to the documentation of this file.
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 
00039 #include "video.h"
00040 #include "gtk/gtk.h"
00041 
00042 #ifndef FJME_PLUG_INS_H
00043 #define FJME_PLUG_INS_H 1
00044 
00058 #define findPluginByName(x) \
00059   findPlugin( (x), NULL, NULL, NULL, NULL )
00060 
00074 #define findPluginByIName(x) \
00075   findPlugin( NULL, (x), NULL, NULL, NULL )
00076 
00090 #define findPluginByPath(x) \
00091   findPlugin( NULL, NULL, (x), NULL, NULL )
00092 
00106 #define findPluginByLayer(x) \
00107   findPlugin( NULL, NULL, NULL, (x), NULL )
00108 
00122 #define findPluginByType(x) \
00123   findPlugin( NULL, NULL, NULL, NULL, (x) )
00124 
00134 #define PLUGIN(x) ((iPlugin*)(x))
00135 
00136 struct iPlugin;
00137 typedef struct iPlugin iPlugin;
00138 
00144 typedef void (* PluginCallFunc) (iPlugin* p);
00145 
00146 /*
00147 Prepare to call dynamically, the functions
00148 of the plugins and returns a new "Plugin".
00149  */
00150 
00165 iPlugin* LoadPlugin(const gchar* file_name, gpointer data);
00166 
00185 iPlugin* addPlugin(PluginCallFunc init, PluginCallFunc frame, PluginCallFunc end, gpointer data);
00186 
00209 iPlugin* addEffect(iPlugin* p, Layer* l);
00210 
00211 void setupEffect( iPlugin* p, Layer* l );
00212 
00225 GList* findPlugin(gchar* name, gchar* iname, gchar* path, gchar* layer_name, gchar* type);
00226 
00227 /*
00228  * The plugins have an identification
00229  * name used internally only.
00230  * Per example: Layers Window,
00231  * Tools Window
00232  */
00233 
00256 iPlugin* findInternalPlugin(gchar* iname);
00257 
00271 iPlugin* findPluginByWidget(GtkWidget*);
00272 
00282 void delPlugin(iPlugin* p);
00283 
00284 /* 
00285 Invokes the function "config". It provides
00286   the user the option to allocate space
00287 for the plugin. Adds the plugin list.
00288  */
00289 
00310 iPlugin* addConfig(PluginCallFunc config, PluginCallFunc init,
00311         PluginCallFunc frame, PluginCallFunc end, iPlugin* p);
00312 
00313 
00314 /*
00315 This "struct" identifies the plugin while it is passed to the plugin.
00316 It has all the information that the plugin requires.
00317  */
00318 
00335 struct iPlugin {
00342     gchar *name;
00343 
00350     gchar *iname;
00351 
00357     gchar *path;
00358 
00366     gchar *type;
00367 
00373     gchar *description;
00374 
00380     union {
00387         gboolean call_me;
00388 
00399         gboolean active;
00400     };
00407     GModule *module;
00408 
00415     gboolean selected;
00416 
00426     gboolean central;
00427 
00434     Main *m;
00435 
00446     GdkPixbuf* pixels;
00447 
00456     gdouble* x;
00457 
00466     gdouble* y;
00467 
00474     gdouble* width;
00475 
00482     gdouble* height;
00483 
00498     gdouble *opacity;
00499 
00506     GtkWidget *widget;
00507 
00516     Layer *layer;
00517 
00526     PluginCallFunc Init;
00527 
00534     PluginCallFunc Frame;
00535 
00541     PluginCallFunc End;
00542 
00552     PluginCallFunc Config;
00553 
00561     gpointer data;
00562 
00570     gpointer data2;
00571 
00579     gpointer data3;
00580 
00588     gpointer data4;
00589 
00597     gpointer data5;
00598 
00606     gpointer data6;
00607     
00608     iPlugin* parent;
00609     GList* child;
00610 };
00611 
00612 #endif
All Data Structures Files Functions Variables Typedefs Defines