From 64329c612f3bed08b0b0851b8cd6cbaaa8b362cd Mon Sep 17 00:00:00 2001 From: ishmal Date: Sun, 18 Mar 2007 23:50:32 +0000 Subject: [PATCH] Update pedrogui stuff and makefile. Add placeholder for alternate test framework. --- src/pedro/Makefile.mingw | 40 ++++++++++++++---------- src/pedro/geckoembed.cpp | 59 ++++++++++++++++++++++++++++++++++++ src/pedro/geckoembed.h | 64 +++++++++++++++++++++++++++++++++++++++ src/pedro/pedroconfig.cpp | 2 +- src/pedro/pedroconfig.h | 2 +- src/pedro/pedrodom.cpp | 2 +- src/pedro/pedrodom.h | 2 +- src/pedro/pedrogui.cpp | 2 +- src/pedro/pedrogui.h | 2 +- src/pedro/pedromain.cpp | 64 ++++++++++++++++++++++++++++++++++++++- src/pedro/pedroutil.cpp | 2 +- src/pedro/pedroutil.h | 2 +- src/pedro/pedroxmpp.cpp | 2 +- src/pedro/pedroxmpp.h | 2 +- 14 files changed, 220 insertions(+), 27 deletions(-) create mode 100644 src/pedro/geckoembed.cpp create mode 100644 src/pedro/geckoembed.h diff --git a/src/pedro/Makefile.mingw b/src/pedro/Makefile.mingw index f108c2c2f..81c3d6ef6 100644 --- a/src/pedro/Makefile.mingw +++ b/src/pedro/Makefile.mingw @@ -6,7 +6,7 @@ # Authors: # Bob Jamison # -# Copyright (C) 2005-2006 Bob Jamison +# Copyright (C) 2005-2007 Bob Jamison # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public @@ -45,15 +45,19 @@ endif ifeq ($(ARCH),win32) ####### Where is your GTK directory? -GTK=c:/gtk28 +GTK=c:/gtk210 ####### Same thing, DOS style -GTKDOS=c:\gtk28 +GTKDOS=c:\gtk210 #SSL=openssl-0.9.8a SSL=$(GTK) -CFLAGS = -g -Wall -DHAVE_SSL + + +CFLAGS = -g -Wall -DHAVE_SSL \ +-DRELAYTOOL_SSL="static const int libssl_is_present=1; static int __attribute__((unused)) libssl_symbol_is_present(char *s){ return 1; }" + INC = -I. -I$(GTK)/include -I$(SSL)/include @@ -68,19 +72,19 @@ S = $(BSLASH) all: test.exe pedro.exe GTKINC = -DGLIBMM_DLL \ --I$(GTK)/include/glibmm-2.4 -I$(GTK)/lib/glibmm-2.4/include \ --I$(GTK)/include/gtkmm-2.4 -I$(GTK)/lib/gtkmm-2.4/include \ --I$(GTK)/include/gdkmm-2.4 -I$(GTK)/lib/gdkmm-2.4/include \ --I$(GTK)/include/pangomm-1.4 \ --I$(GTK)/include/atkmm-1.6 -I$(GTK)/include/cairo \ --I$(GTK)/include/sigc++-2.0 -I$(GTK)/lib/sigc++-2.0/include \ --I$(GTK)/include/gtk-2.0 -I$(GTK)/lib/gtk-2.0/include \ --I$(GTK)/include/atk-1.0 -I$(GTK)/include/pango-1.0 \ --I$(GTK)/include/glib-2.0 -I$(GTK)/lib/glib-2.0/include - +-I$(GTK)/include/glibmm-2.4 -I$(GTK)/lib/glibmm-2.4/include \ +-I$(GTK)/include/gtkmm-2.4 -I$(GTK)/lib/gtkmm-2.4/include \ +-I$(GTK)/include/gdkmm-2.4 -I$(GTK)/lib/gdkmm-2.4/include \ +-I$(GTK)/include/pangomm-1.4 -I$(GTK)/include/pangomm-1.4 \ +-I$(GTK)/include/atkmm-1.6 -I$(GTK)/include/cairomm-1.0 \ +-I$(GTK)/include/sigc++-2.0 -I$(GTK)/lib/sigc++-2.0/include \ +-I$(GTK)/include/gtk-2.0 -I$(GTK)/lib/gtk-2.0/include \ +-I$(GTK)/include/atk-1.0 -I$(GTK)/include/pango-1.0 \ +-I$(GTK)/include/glib-2.0 -I$(GTK)/lib/glib-2.0/include \ +-I$(GTK)/include/cairo ####### Our Gtk libs -GTKLIBS = -L$(GTK)/lib -lloudmouth-1 \ +GTKLIBS = -L$(GTK)/lib \ -lgtkmm-2.4 -lgdkmm-2.4 -lglibmm-2.4 \ -latkmm-1.6 -lpangomm-1.4 -lsigc-2.0 \ -lgtk-win32-2.0 -lgdk-win32-2.0 -latk-1.0 \ @@ -121,6 +125,7 @@ pedroutil.o GUIOBJ = \ pedrogui.o \ +geckoembed.o \ pedromain.o @@ -150,7 +155,7 @@ groupchat.exe: libpedro.a work/groupchat.o groupchat: libpedro.a work/groupchat.o $(CXX) -o $@ work/groupchat.o libpedro.a $(LIBSC) -pedro.exe: libpedro.a pedromain.o pedrogui.o +pedro.exe: libpedro.a $(GUIOBJ) $(CXX) -o $@ pedromain.o pedrogui.o libpedro.a $(GTKLIBS) $(LIBS) pedro: libpedro.a pedromain.o pedrogui.o $(CXX) -o $@ pedromain.o pedrogui.o libpedro.a $(GTKLIBS) $(LIBS) @@ -165,6 +170,9 @@ pedromain.o: pedromain.cpp pedrogui.o: pedrogui.cpp pedrogui.h $(CXX) $(CFLAGS) $(INC) $(GTKINC) -c -o $@ $< +geckoembed.o: geckoembed.cpp geckoembed.h + $(CXX) $(CFLAGS) $(INC) $(GTKINC) -c -o $@ $< + .cpp.o: $(CXX) $(CFLAGS) $(INC) -c -o $@ $< diff --git a/src/pedro/geckoembed.cpp b/src/pedro/geckoembed.cpp new file mode 100644 index 000000000..8f979ad88 --- /dev/null +++ b/src/pedro/geckoembed.cpp @@ -0,0 +1,59 @@ +/* + * Implementation the Pedro mini-XMPP client + * + * Authors: + * Bob Jamison + * + * Copyright (C) 2007 Bob Jamison + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library 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 + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#include +#include + +#ifdef GECKO_EMBED + +#include "geckoembed.h" + + +namespace Pedro +{ + + + + + + + + + + + + + + + + + + + +} //namespace Pedro + +#endif /* GECKO_EMBED */ +//######################################################################## +//# E N D O F F I L E +//######################################################################## + diff --git a/src/pedro/geckoembed.h b/src/pedro/geckoembed.h new file mode 100644 index 000000000..af3970006 --- /dev/null +++ b/src/pedro/geckoembed.h @@ -0,0 +1,64 @@ +#ifndef __GECKOEMBED_H__ +#define __GECKOEMBED_H__ +/* + * Implementation the Pedro mini-XMPP client + * + * Authors: + * Bob Jamison + * + * Copyright (C) 2005-2007 Bob Jamison + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library 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 + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#include +#include + + +namespace Pedro +{ + + +class GeckoEmbed +{ +public: + + GeckoEmbed() + { + init(); + } + + virtual ~GeckoEmbed() + { + } + + + +private: + + void init() + { + } + + +}; + + +} //namespace Pedro +#define __GECKOEMBED_H__ +//######################################################################## +//# E N D O F F I L E +//######################################################################## + diff --git a/src/pedro/pedroconfig.cpp b/src/pedro/pedroconfig.cpp index f6de670cd..fdade21d7 100644 --- a/src/pedro/pedroconfig.cpp +++ b/src/pedro/pedroconfig.cpp @@ -4,7 +4,7 @@ * Authors: * Bob Jamison * - * Copyright (C) 2005-2006 Bob Jamison + * Copyright (C) 2005-2007 Bob Jamison * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public diff --git a/src/pedro/pedroconfig.h b/src/pedro/pedroconfig.h index 554c47ba9..f3fb96e72 100644 --- a/src/pedro/pedroconfig.h +++ b/src/pedro/pedroconfig.h @@ -6,7 +6,7 @@ * Authors: * Bob Jamison * - * Copyright (C) 2005-2006 Bob Jamison + * Copyright (C) 2005-2007 Bob Jamison * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public diff --git a/src/pedro/pedrodom.cpp b/src/pedro/pedrodom.cpp index de6b99cf4..a15d74251 100644 --- a/src/pedro/pedrodom.cpp +++ b/src/pedro/pedrodom.cpp @@ -4,7 +4,7 @@ * Authors: * Bob Jamison * - * Copyright (C) 2005 Bob Jamison + * Copyright (C) 2005-2007 Bob Jamison * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public diff --git a/src/pedro/pedrodom.h b/src/pedro/pedrodom.h index cc9a322f9..0d418ac20 100644 --- a/src/pedro/pedrodom.h +++ b/src/pedro/pedrodom.h @@ -6,7 +6,7 @@ * Authors: * Bob Jamison * - * Copyright (C) 2005-2006 Bob Jamison + * Copyright (C) 2005-2007 Bob Jamison * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public diff --git a/src/pedro/pedrogui.cpp b/src/pedro/pedrogui.cpp index 4b4bccbaa..6bdbe3422 100644 --- a/src/pedro/pedrogui.cpp +++ b/src/pedro/pedrogui.cpp @@ -4,7 +4,7 @@ * Authors: * Bob Jamison * - * Copyright (C) 2005 Bob Jamison + * Copyright (C) 2005-2007 Bob Jamison * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public diff --git a/src/pedro/pedrogui.h b/src/pedro/pedrogui.h index a8b8964ba..dfafc0edf 100644 --- a/src/pedro/pedrogui.h +++ b/src/pedro/pedrogui.h @@ -6,7 +6,7 @@ * Authors: * Bob Jamison * - * Copyright (C) 2005 Bob Jamison + * Copyright (C) 2005-2007 Bob Jamison * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public diff --git a/src/pedro/pedromain.cpp b/src/pedro/pedromain.cpp index 9cee6d992..60322f718 100644 --- a/src/pedro/pedromain.cpp +++ b/src/pedro/pedromain.cpp @@ -1,5 +1,57 @@ +/* + * Implementation the Pedro mini-XMPP client + * + * Authors: + * Bob Jamison + * + * Copyright (C) 2005-2007 Bob Jamison + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library 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 + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + */ + #include + + + +//####################################################################### +//# G E C K O (xulrunner) +//####################################################################### + +#ifdef GECKO_EMBED + + +#include "geckoembed.h" + +int main(int argc, char *argv[]) +{ + GeckoEmbed embedder; + + embedder.run(); + + return 0; +} + + +//####################################################################### +//# G T K M M (pedrogui) +//####################################################################### +#else /* NOT GECKO_EMBED */ + + + #include "pedrogui.h" int main(int argc, char *argv[]) @@ -15,11 +67,15 @@ int main(int argc, char *argv[]) +#endif /* GECKO_EMBED */ + + + + #ifdef __WIN32__ #include - extern "C" int __export WINAPI WinMain (HINSTANCE hInstance, HINSTANCE hPrevInstance, char *lpszCmdLine, int nCmdShow) @@ -30,3 +86,9 @@ WinMain (HINSTANCE hInstance, HINSTANCE hPrevInstance, #endif + + +//######################################################################## +//# E N D O F F I L E +//######################################################################## + diff --git a/src/pedro/pedroutil.cpp b/src/pedro/pedroutil.cpp index 13577bf8f..d1fb15edc 100644 --- a/src/pedro/pedroutil.cpp +++ b/src/pedro/pedroutil.cpp @@ -4,7 +4,7 @@ * Authors: * Bob Jamison * - * Copyright (C) 2005-2006 Bob Jamison + * Copyright (C) 2005-2007 Bob Jamison * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public diff --git a/src/pedro/pedroutil.h b/src/pedro/pedroutil.h index 8f1d14cc7..aba9e4715 100644 --- a/src/pedro/pedroutil.h +++ b/src/pedro/pedroutil.h @@ -6,7 +6,7 @@ * Authors: * Bob Jamison * - * Copyright (C) 2006 Bob Jamison + * Copyright (C) 2005-2007 Bob Jamison * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public diff --git a/src/pedro/pedroxmpp.cpp b/src/pedro/pedroxmpp.cpp index 2dc20deba..efe51d277 100644 --- a/src/pedro/pedroxmpp.cpp +++ b/src/pedro/pedroxmpp.cpp @@ -4,7 +4,7 @@ * Authors: * Bob Jamison * - * Copyright (C) 2005-2006 Bob Jamison + * Copyright (C) 2005-2007 Bob Jamison * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public diff --git a/src/pedro/pedroxmpp.h b/src/pedro/pedroxmpp.h index 34b6d0390..1ad849b99 100644 --- a/src/pedro/pedroxmpp.h +++ b/src/pedro/pedroxmpp.h @@ -6,7 +6,7 @@ * Authors: * Bob Jamison * - * Copyright (C) 2005-2006 Bob Jamison + * Copyright (C) 2005-2007 Bob Jamison * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public -- 2.30.2