Re: BREAKing into Euphoria

new topic     » goto parent     » topic index » view thread      » older message » newer message

The above example is text.ex so it gets a console.

Also above code uses a modified iup.e that can work with more recent iup dll's idle check API. Ie if IupSetGlobalFunction() doesnt exist (original euip bin release ver) then use IupSetFunction(). Otherwise just sub the code above to use IupSetFunction() instead with eiup release.

Posting iup.e context diff so you can patch it yourself (ok Greg diff's are the right thing to do), includes extra consts for key codes in cb_key callback ;

*** iup.e.old	Wed Dec 30 14:03:50 2015 
--- iup.e	Sat Feb 12 19:04:01 2022 
*************** 
*** 53,56 **** 
--- 53,57 ---- 
   
  public constant -- function delcarations 
+ 	xIupSetGlobalFunction     = define_c_proc( iup, "+IupSetGlobalFunction", {C_POINTER,C_POINTER}), 
  	xIupOpen                          = define_c_func( iup, "+IupOpen", {C_POINTER,C_POINTER}, C_INT ), 
  	xIupClose                         = define_c_proc( iup, "+IupClose", {} ), 
*************** 
*** 255,258 **** 
--- 256,269 ---- 
  /*                        Main API                                      */ 
  /************************************************************************/ 
+ --void IupSetGlobalFunction(string name, cbfunc func) 
+ public procedure IupSetGlobalFunction(object name = NULL, atom func) 
+ 	if sequence(name) then name = allocate_string(name,1) end if 
+ 	if xIupSetGlobalFunction = -1 then	--old iup ver 
+ 		if c_func( xIupSetFunction, {name,func} ) then end if 
+ 		return 
+ 	end if 
+ 	c_proc( xIupSetGlobalFunction, {name,func} ) 
+ end procedure 
+  
  --int IupOpen(int *argc, char ***argv); 
  public function IupOpen(atom argc, sequence argv = {}) 
*************** 
*** 1676,1677 **** 
--- 1687,1718 ---- 
  /************************************************************************/ 
   
+ public function iup_isshift(atom _s) 
+ 	return peek(_s) = 'S' 
+ end function 
+ public function iup_iscontrol(atom _s) 
+ 	return peek(_s+1) = 'C' 
+ end function 
+ public function iup_isbutton1(atom _s) 
+ 	return peek(_s+2) = '1' 
+ end function 
+ public function iup_isbutton2(atom _s) 
+ 	return peek(_s+3) = '2' 
+ end function 
+ public function iup_isbutton3(atom _s) 
+ 	return peek(_s+4) = '3' 
+ end function 
+ public function iup_isdouble(atom _s) 
+ 	return peek(_s+5) = 'D' 
+ end function 
+ public function iup_isalt(atom _s) 
+ 	return peek(_s+6) = 'A' 
+ end function 
+ public function iup_issys(atom _s) 
+ 	return peek(_s+7) = 'Y' 
+ end function 
+ public function iup_isbutton4(atom _s) 
+ 	return peek(_s+8) = '4' 
+ end function 
+ public function iup_isbutton5(atom _s) 
+ 	return peek(_s+9) = '5' 
+ end function 
 

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu