[PD-cvs] externals/miXed/shared/hammer gui.c,1.1.1.1,1.2

Krzysztof Czaja krzyszcz at users.sourceforge.net
Mon Mar 29 19:09:54 CEST 2004


Update of /cvsroot/pure-data/externals/miXed/shared/hammer
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv597/shared/hammer

Modified Files:
	gui.c 
Log Message:
toxy alpha10

Index: gui.c
===================================================================
RCS file: /cvsroot/pure-data/externals/miXed/shared/hammer/gui.c,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -C2 -d -r1.1.1.1 -r1.2
*** gui.c	23 May 2003 12:29:52 -0000	1.1.1.1
--- gui.c	29 Mar 2004 17:09:52 -0000	1.2
***************
*** 1,3 ****
! /* Copyright (c) 2003 krzYszcz and others.
   * For information on usage and redistribution, and for a DISCLAIMER OF ALL
   * WARRANTIES, see the file, "LICENSE.txt," in this distribution.  */
--- 1,3 ----
! /* Copyright (c) 2003-2004 krzYszcz and others.
   * For information on usage and redistribution, and for a DISCLAIMER OF ALL
   * WARRANTIES, see the file, "LICENSE.txt," in this distribution.  */
***************
*** 132,138 ****
  {
      sys_vgui("bind Canvas <<hammerfocusin>> \
!  {pd [concat %s _focus %%W 1 \\;]}\n", snk->g_gui->s_name);
      sys_vgui("bind Canvas <<hammerfocusout>> \
!  {pd [concat %s _focus %%W 0 \\;]}\n", snk->g_gui->s_name);
  }
  
--- 132,140 ----
  {
      sys_vgui("bind Canvas <<hammerfocusin>> \
!  {if {[hammergui_ispatcher %%W]} \
!   {pd [concat %s _focus %%W 1 \\;]}}\n", snk->g_gui->s_name);
      sys_vgui("bind Canvas <<hammerfocusout>> \
!  {if {[hammergui_ispatcher %%W]} \
!   {pd [concat %s _focus %%W 0 \\;]}}\n", snk->g_gui->s_name);
  }
  
***************
*** 153,159 ****
  {
      sys_vgui("bind Canvas <<hammervised>> \
!  {pd [concat %s _vised %%W 1 \\;]}\n", snk->g_gui->s_name);
      sys_vgui("bind Canvas <<hammerunvised>> \
!  {pd [concat %s _vised %%W 0 \\;]}\n", snk->g_gui->s_name);
  }
  
--- 155,163 ----
  {
      sys_vgui("bind Canvas <<hammervised>> \
!  {if {[hammergui_ispatcher %%W]} \
!   {pd [concat %s _vised %%W 1 \\;]}}\n", snk->g_gui->s_name);
      sys_vgui("bind Canvas <<hammerunvised>> \
!  {if {[hammergui_ispatcher %%W]} \
!   {pd [concat %s _vised %%W 0 \\;]}}\n", snk->g_gui->s_name);
  }
  
***************
*** 193,196 ****
--- 197,211 ----
  		    ps__vised, A_SYMBOL, A_FLOAT, 0);
  
+     /* Protect against pdCmd being called (via "Canvas <Destroy>" binding)
+        during Tcl_Finalize().  FIXME this should be a standard exit handler. */
+     sys_gui("proc hammergui_exithook {cmd op} {proc pd {} {}}\n");
+     sys_gui("trace add execution exit enter hammergui_exithook\n");
+ 
+     sys_gui("proc hammergui_ispatcher {cv} {\n");
+     sys_gui(" if {[string range $cv 0 1] == \".x\"");
+     sys_gui("  && [string range $cv end-1 end] == \".c\"} {\n");
+     sys_gui("  return 1} else {return 0}\n");
+     sys_gui("}\n");
+ 
      sys_gui("proc hammergui_remouse {} {\n");
      sys_gui(" bind all <<hammerdown>> {}\n");





More information about the Pd-cvs mailing list