1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57
|
#include <iostream>
#include <gtk/gtkmain.h>
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
#include "effectlist.h"
#include "effects_dialog.h"
#include "ppeffect_desaturate.h"
#include "ppeffect_temperature.h"
#include "egg-pixbuf-thumbnail.h"
using namespace std;
int main(int argc,char **argv)
{
cerr << "Starting..." << endl;
if(argc==2)
{
gtk_init(&argc,&argv);
PPEffectHeader header;
GError *err=NULL;
char *filename=argv[1];
GdkPixbuf *pb=egg_pixbuf_get_thumbnail_for_file(filename,EGG_PIXBUF_THUMBNAIL_LARGE,&err);
EffectsDialog(header,NULL,pb);
g_object_unref(G_OBJECT(pb));
}
else
{
cerr << "No argument supplied" << endl;
PPEffectHeader header;
EffectListSource fxs;
fxs.CreateEffect(0,header);
fxs.CreateEffect(1,header);
fxs.CreateEffect(2,header);
PPEffect *e=header.Find(fxs.GetID(1));
if(e)
delete e;
else
cerr << "not found" << endl;
fxs.CreateEffect(1,header);
e=header.Find(fxs.GetID(1));
if(e)
delete e;
else
cerr << "not found" << endl;
fxs.CreateEffect(1,header);
e=header.Find(fxs.GetID(1));
if(e)
delete e;
}
return(0);
}
|