X-Git-Url: https://vcs.maemo.org/git/?a=blobdiff_plain;f=apps%2Fvmdemotk%2FVMDemoTkInit.cpp;fp=apps%2Fvmdemotk%2FVMDemoTkInit.cpp;h=0000000000000000000000000000000000000000;hb=e4c14cdbdf2fe805e79cd96ded236f57e7b89060;hp=f88d85c3970ed142a1c9742ceb4d3877ef80b346;hpb=454138ff8a20f6edb9b65a910101403d8b520643;p=opencv diff --git a/apps/vmdemotk/VMDemoTkInit.cpp b/apps/vmdemotk/VMDemoTkInit.cpp deleted file mode 100644 index f88d85c..0000000 --- a/apps/vmdemotk/VMDemoTkInit.cpp +++ /dev/null @@ -1,73 +0,0 @@ -#include "VMDemoTkInit.h" -#include "VMDemoTk.h" -#include "NewTclCommands.h" -#include - -int VMDemoTkInit ( Tcl_Interp *interp, int argc, char **argv) -{ - // creating the interpreter for tcl application - if(!interp) - interp = Tcl_CreateInterp(); - if(!interp) - { - printf("No interpretator\n"); - return 1; - } - - // finding out application location - Tcl_FindExecutable(argv[0]); - - // Here begins the first step on C and TCL - // integration: The Tcl/Tk initialization. - if (Tcl_Init(interp) == TCL_ERROR) - { - fprintf(stderr, "Tcl_Init failed: %s\n", - interp->result); - return 1; - } - - if (Tk_Init(interp) == TCL_ERROR) - { - fprintf(stderr, "Tk_Init failed: %s\n", - interp->result); - return 1; - } - - - //The second step, creating new Tcl commands for user interface widgets. - - // procedure for "set original windows position" button - Tcl_CreateCommand (interp, "CSetpos", TKVMDemo_Setposition, - (ClientData *) NULL, (Tcl_CmdDeleteProc *) NULL); - - // fileopen dialog and procedure - Tcl_CreateCommand (interp, "Cfileopen", TKVMDemo_fileopen, - (ClientData *) NULL, (Tcl_CmdDeleteProc *) NULL); - - // Command for slider - Tcl_CreateCommand( interp, "Cscale", TKVMDemo_scale, - (ClientData *) NULL, (Tcl_CmdDeleteProc *) NULL); - - // Command for showscanlines checkbutton - Tcl_CreateCommand( interp, "CShowScanlines", TKVMDemo_ShowScanlines, - (ClientData *) NULL, (Tcl_CmdDeleteProc *) NULL); - - Tcl_CreateThreadExitHandler(OnExit, (ClientData *) NULL); - - //Now we evaluate the user interface script - if(Tcl_EvalFile(interp, "interface.tcl") == TCL_ERROR) - { - printf("%s\nline %d\n", interp->result, interp->errorLine); - return 1; - } - - //Setting windows to the original position - Tcl_Eval(interp, "CSetpos"); - - cvvInitSystem(argc, argv); - cvvNamedWindow( "left", 0 ); - cvvNamedWindow( "right", 0 ); - cvvNamedWindow( "result", 0 ); - - return 0; -}