groovx.cc

Go to the documentation of this file.
00001 
00004 
00005 //
00006 // Copyright (c) 1998-2004 California Institute of Technology
00007 // Copyright (c) 2004-2007 University of Southern California
00008 // Rob Peters <rjpeters at usc dot edu>
00009 //
00010 // created: Mon Nov  2 08:00:00 1998
00011 // commit: $Id: groovx.cc 10066 2007-04-12 17:49:13Z rjpeters $
00012 // $HeadURL: file:///lab/rjpeters/svnrepo/code/trunk/groovx/src/groovx/groovx.cc $
00013 //
00014 // This is the main application file for a Tcl/Tk application that
00015 // runs visual experiments.
00016 //
00017 // --------------------------------------------------------------------
00018 //
00019 // This file is part of GroovX.
00020 //   [http://ilab.usc.edu/rjpeters/groovx/]
00021 //
00022 // GroovX is free software; you can redistribute it and/or modify it
00023 // under the terms of the GNU General Public License as published by
00024 // the Free Software Foundation; either version 2 of the License, or
00025 // (at your option) any later version.
00026 //
00027 // GroovX is distributed in the hope that it will be useful, but
00028 // WITHOUT ANY WARRANTY; without even the implied warranty of
00029 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00030 // General Public License for more details.
00031 //
00032 // You should have received a copy of the GNU General Public License
00033 // along with GroovX; if not, write to the Free Software Foundation,
00034 // Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
00035 //
00037 
00038 #include "rutz/prof.h"
00039 #include "tcl/scriptapp.h"
00040 
00041 // #include's for forward decls of all the *_Init() procedures
00042 
00043 #include "tcl-gfx/tclpkg-canvas.h"               // for Canvas_Init(), Glcanvas_Init(),
00044 #include "tcl-gfx/tclpkg-gx.h"                   // for Gx_Init(), Gxnode_Init(), Gxseparator_Init(), Gxcolor_Init(), Gxdrawstyle_Init(), Gxline_Init(), Gxcylinder_Init(), Gxsphere_Init(), Gxlighting_Init(), Gxmaterial_Init(), Gxpointset_Init(), Gxscaler_Init(), Gxemptynode_Init(), Gxtransform_Init(), Gxshapekit_Init(), Gxpixmap_Init(), Gxtext_Init(), Gxfixedscalecamera_Init(), Gxpsyphycamera_Init(), Gxperspectivecamera_Init(), Gxdisk_Init(),
00045 #include "tcl-gfx/tclpkg-toglet.h"               // for Toglet_Init(),
00046 #include "tcl-io/tclpkg-io.h"                    // for Io_Init(), Outputfile_Init(),
00047 #include "tcl/tclpkg-dlist.h"                    // for Dlist_Init(),
00048 #include "tcl/tclpkg-gtrace.h"                   // for Gtrace_Init(), Prof_Init(),
00049 #include "tcl/tclpkg-log.h"                      // for Log_Init(),
00050 #include "tcl/tclpkg-misc.h"                     // for Misc_Init(),
00051 #include "tcl/tclpkg-obj.h"                      // for Objectdb_Init(), Obj_Init()
00052 #include "tk/tclpkg-widget.h"                    // for Tkwidget_Init(),
00053 #include "visx/tclpkg-block.h"                   // for Block_Init(),
00054 #include "visx/tclpkg-element.h"                 // for Element_Init(),
00055 #include "visx/tclpkg-elementcontainer.h"        // for Elementcontainer_Init(),
00056 #include "visx/tclpkg-expt.h"                    // for Exptdriver_Init(),
00057 #include "visx/tclpkg-face.h"                    // for Face_Init(), Cloneface_Init(),
00058 #include "visx/tclpkg-fish.h"                    // for Fish_Init(),
00059 #include "visx/tclpkg-fixpt.h"                   // for Fixpt_Init(),
00060 #include "visx/tclpkg-gabor.h"                   // for Gabor_Init(), Gaborarray_Init(),
00061 #include "visx/tclpkg-gl.h"                      // for Gl_Init(),
00062 #include "visx/tclpkg-hook.h"                    // for Hook_Init(),
00063 #include "visx/tclpkg-house.h"                   // for House_Init(),
00064 #include "visx/tclpkg-jitter.h"                  // for Jitter_Init(),
00065 #include "visx/tclpkg-mask.h"                    // for Maskhatch_Init(),
00066 #include "visx/tclpkg-morphyface.h"              // for Morphyface_Init(),
00067 #include "visx/tclpkg-rh.h"                      // for Responsehandler_Init(), Eventresponsehdlr_Init(), Kbdresponsehdlr_Init(), Nullresponsehdlr_Init(), Serialrh_Init(),
00068 #include "visx/tclpkg-sound.h"                   // for Sound_Init(),
00069 #include "visx/tclpkg-th.h"                      // for Timinghdlr_Init(), Timinghandler_Init(),
00070 #include "visx/tclpkg-tlist.h"                   // for Tlist_Init(),
00071 #include "visx/tclpkg-trial.h"                   // for Trial_Init(),
00072 #include "visx/tclpkg-trialevent.h"              // for Trialevent_Init(), Nulltrialevent_Init(), Filewriteevent_Init(), Genericevent_Init(), Multievent_Init(),
00073 
00074 //
00075 // Info about the packages to be loaded
00076 //
00077 
00078 static tcl::package_info GROOVX_PKGS[] =
00079   {
00080     { "Block",               Block_Init,               "4.0", false },
00081     { "Canvas",              Canvas_Init,              "4.0", false },
00082     { "Cloneface",           Cloneface_Init,           "4.0", false },
00083     { "Dlist",               Dlist_Init,               "4.0", false },
00084     { "Element",             Element_Init,             "4.0", false },
00085     { "Elementcontainer",    Elementcontainer_Init,    "4.0", false },
00086     { "Eventresponsehdlr",   Eventresponsehdlr_Init,   "4.0", false },
00087     { "Exptdriver",          Exptdriver_Init,          "4.0", false },
00088     { "Face",                Face_Init,                "4.0", false },
00089     { "Filewriteevent",      Filewriteevent_Init,      "4.0", false },
00090     { "Fish",                Fish_Init,                "4.0", false },
00091     { "Fixpt",               Fixpt_Init,               "4.0", false },
00092     { "Gabor",               Gabor_Init,               "4.0", false },
00093     { "Gaborarray",          Gaborarray_Init,          "4.0", false },
00094     { "Genericevent",        Genericevent_Init,        "4.0", false },
00095     { "Gl",                  Gl_Init,                  "4.0", false },
00096     { "Glcanvas",            Glcanvas_Init,            "4.0", false },
00097     { "Gtrace",              Gtrace_Init,              "4.0", false },
00098     { "Gx",                  Gx_Init,                  "4.0", false },
00099     { "Gxcolor",             Gxcolor_Init,             "4.0", false },
00100     { "Gxcylinder",          Gxcylinder_Init,          "4.0", false },
00101     { "Gxdisk",              Gxdisk_Init,              "4.0", false },
00102     { "Gxdrawstyle",         Gxdrawstyle_Init,         "4.0", false },
00103     { "Gxemptynode",         Gxemptynode_Init,         "4.0", false },
00104     { "Gxfixedscalecamera",  Gxfixedscalecamera_Init,  "4.0", false },
00105     { "Gxlighting",          Gxlighting_Init,          "4.0", false },
00106     { "Gxline",              Gxline_Init,              "4.0", false },
00107     { "Gxmaterial",          Gxmaterial_Init,          "4.0", false },
00108     { "Gxnode",              Gxnode_Init,              "4.0", false },
00109     { "Gxperspectivecamera", Gxperspectivecamera_Init, "4.0", false },
00110     { "Gxpixmap",            Gxpixmap_Init,            "4.0", false },
00111     { "Gxpointset",          Gxpointset_Init,          "4.0", false },
00112     { "Gxpsyphycamera",      Gxpsyphycamera_Init,      "4.0", false },
00113     { "Gxscaler",            Gxscaler_Init,            "4.0", false },
00114     { "Gxseparator",         Gxseparator_Init,         "4.0", false },
00115     { "Gxshapekit",          Gxshapekit_Init,          "4.0", false },
00116     { "Gxsphere",            Gxsphere_Init,            "4.0", false },
00117     { "Gxtext",              Gxtext_Init,              "4.0", false },
00118     { "Gxtransform",         Gxtransform_Init,         "4.0", false },
00119     { "Hook",                Hook_Init,                "4.0", false },
00120     { "House",               House_Init,               "4.0", false },
00121     { "Io",                  Io_Init,                  "4.0", false },
00122     { "Jitter",              Jitter_Init,              "4.0", false },
00123     { "Log",                 Log_Init,                 "4.0", false },
00124     { "Kbdresponsehdlr",     Kbdresponsehdlr_Init,     "4.0", false },
00125     { "Maskhatch",           Maskhatch_Init,           "4.0", false },
00126     { "Misc",                Misc_Init,                "4.0", false },
00127     { "Morphyface",          Morphyface_Init,          "4.0", false },
00128     { "Multievent",          Multievent_Init,          "4.0", false },
00129     { "Nullresponsehdlr",    Nullresponsehdlr_Init,    "4.0", false },
00130     { "Nulltrialevent",      Nulltrialevent_Init,      "4.0", false },
00131     { "Obj",                 Obj_Init,                 "4.0", false },
00132     { "Objectdb",            Objectdb_Init,            "4.0", false },
00133     { "Outputfile",          Outputfile_Init,          "4.0", false },
00134     { "Prof",                Prof_Init,                "4.0", false },
00135     { "Responsehandler",     Responsehandler_Init,     "4.0", false },
00136     { "Serialrh",            Serialrh_Init,            "4.0", false },
00137     { "Sound",               Sound_Init,               "4.0", false },
00138     { "Timinghandler",       Timinghandler_Init,       "4.0", false },
00139     { "Timinghdlr",          Timinghdlr_Init,          "4.0", false },
00140     { "Tkwidget",            Tkwidget_Init,            "4.0", false },
00141     { "Tlist",               Tlist_Init,               "4.0", false },
00142     { "Toglet",              Toglet_Init,              "4.0", true },
00143     { "Trial",               Trial_Init,               "4.0", false },
00144     { "Trialevent",          Trialevent_Init,          "4.0", false },
00145     // WARNING! Keep this entry last
00146     { 0, 0, 0, 0 }
00147   };
00148 
00150 //
00151 // main()
00152 //
00154 
00155 int main(int argc, char** argv)
00156 {
00157   GVX_SCRIPT_PROG_BEGIN(app, "GroovX", argc, argv);
00158 
00159   rutz::prof::print_at_exit(true);
00160 
00161   app.pkg_dir(GVX_PKG_LIB_DIR);
00162 
00163   app.splash(PACKAGE_STRING " (" __DATE__ ")\n"
00164              "\n"
00165              "Copyright (c) 1998-2004 California Institute of Technology\n"
00166              "Copyright (c) 2004-2007 University of Southern California\n"
00167              "<http://ilab.usc.edu/rjpeters/groovx/>\n"
00168              PACKAGE_NAME " is free software, covered by "
00169              "the GNU General Public License, and you are "
00170              "welcome to change it and/or distribute copies "
00171              "of it under certain conditions.\n");
00172 
00173   app.packages(GROOVX_PKGS);
00174 
00175   app.run();
00176 
00177   GVX_SCRIPT_PROG_END(app);
00178 }
00179 
00180 static const char __attribute__((used)) vcid_groovx_groovx_groovx_cc_utc20050626084019[] = "$Id: groovx.cc 10066 2007-04-12 17:49:13Z rjpeters $ $HeadURL: file:

The software described here is Copyright (c) 1998-2005, Rob Peters.
This page was generated Wed Dec 3 06:49:39 2008 by Doxygen version 1.5.5.