~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~ [ freetext search ] ~ [ file search ] ~

Linux Cross Reference
Tina4/tinatool/tinatool.c

Version: ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

  1 /*
  2 #include <stdio.h>
  3 #include <tina/sys.h>
  4 #include <tina/sysfuncs.h>
  5 #include <tina/math.h>
  6 */
  7 #include <fcntl.h>
  8 #include <sys/file.h>
  9 #include <tina/all_tina.h>
 10 
 11 tool_proc(void)
 12 {
 13     static int x = 100, y = 200;
 14     static int xr = 0, yr = 0;
 15 
 16     tv_tool(x+xr, y+yr);
 17     xr += 50;
 18     yr += 10;
 19     if (x+xr>700)
 20     {
 21        xr = yr = 0;
 22        y += 50;
 23     }
 24     if (y>400) y = 200;
 25 }
 26 
 27 static void stereo_tool_proc(void)
 28 {
 29    stereo_tool(150,150);
 30 }
 31 
 32 static void mono_tool_proc(void)
 33 {
 34     mono_tool(50, 50);
 35 }
 36 
 37 static void seq_tool_proc(void)
 38 {
 39     seq_tool(75, 75);
 40 }
 41 
 42 static void view_tool_proc(void)
 43 {
 44     view_tool(75,75);
 45 }
 46 
 47 static void terrain_tool_proc(void)
 48 {
 49     terrain_tool(75,75);
 50 }
 51  
 52 static void imcalc_tool_proc(void)
 53 {
 54     imcalc_tool(200,200);
 55 }
 56 
 57 static void calib_tool_proc(void)
 58 {
 59     calib_tool(250,250);
 60 }
 61 
 62 static void edge_tool_proc(void)
 63 {
 64     edge_tool(250,250);
 65 }
 66 
 67 static void corner_tool_proc(void)
 68 {
 69     corner_tool(250,250);
 70 }
 71 
 72 static void skeleton_tool_proc(void)
 73 {
 74     skeleton_tool(250,250);
 75 }
 76 
 77 int main(int argc, char **argv)
 78 {
 79    tw_init(&argc, argv);
 80 
 81    tw_tool("tinatool", 100, 100);
 82 
 83    tw_label("Display");
 84    tw_button("New Tvtool", tool_proc, NULL);
 85    tw_button("View", view_tool_proc, NULL);
 86    tw_button("Terrain", terrain_tool_proc, NULL);
 87 
 88    tw_label("          ");
 89    tw_help_button("tinatool");
 90    tw_newrow();
 91    tw_sglobal("Macro File:", get_macro_file(), 18);
 92    tw_button("append", init_macro_proc,NULL);
 93    tw_button("close", save_macro_proc,NULL);
 94    tw_button("run", process_macro_proc, NULL);
 95 
 96 
 97    tw_newrow();
 98 
 99    tw_label("File i/o");
100    tw_button("Mono", mono_tool_proc, NULL);
101    tw_button("Stereo", stereo_tool_proc, NULL);
102    tw_button("Sequence", seq_tool_proc, NULL);
103    tw_newrow();
104    tw_label("Tools");
105 
106    tw_button("Calib ", calib_tool_proc, NULL);
107    tw_button("Imcalc ", imcalc_tool_proc, NULL);
108    tw_button("Edge ", edge_tool_proc, NULL);
109    tw_button("Corner ", corner_tool_proc, NULL);
110    tw_newrow();
111    tw_button("Skeleton", skeleton_tool_proc, NULL);
112    tw_newrow();
113    tw_textsw(10, 65);
114 
115    tw_end_tool();
116    tw_main_loop();
117 }
118 

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~ [ freetext search ] ~ [ file search ] ~

This page was automatically generated by the LXR engine.
Visit the LXR main site for more information.