Re: FVWM: Bind functions to pan window frame

From: Uwe Pross <uwe.pross_at_gmx.net>
Date: Mon, 1 Apr 2002 20:51:40 +0200

On Sun, Mar 31, 2002 at 02:35:40PM +0200, Dominik Vogt wrote:
>
> Rewrite the code that calls HandlePaging() in events.c. One could
> write another command "EdgeCommand" that defines the command to
> execute when the pointer hits the screen edge. Normally, this
> would be something like
>
> EdgeCommand left Scroll -10 0
> EdgeCommand right Scroll +10 0
> EdgeCommand top Scroll 0 -10
> EdgeCommand bottom Scroll 0 +10
>

I am going to implement such a command. My fvwm does already
understand the EdgeCommand ;-)
                                   
I have still a question. How is the parsing of fvwm commands usally
done? My function void CMD_EdgeCommand(F_CMD_ARGS) gots a variable
char * action which contains the arguments of the EdgeCommand call. I
looked at some CMD_* functions. Some use functions like
GetIntegerArguments(..) other do thier own parsing of the action
string. I need just function which extracts/cuts the first token of
the action string and converts it to lower cases:

       getFirstToken( action , border ) ;
       if ( !strcmp( "left" , border ) )
          strcpy( edgeCommandLeft , action ) ;
       ....

Are there any suggestion how the parsing should be done? Maybe the
function I need is already imlemented. I could write a short parsing
function but if this would be done for every CMD_* it would be quite
an overhead.
                                   
Uwe
-- 
+----------------------------------------------
| Uwe Pross
| mail : mailto:uwe.pross_at_gmx.net
| www  : http://www.tu-chemnitz.de/~uwp
+----------------------------------------------
Have a nice day ;-).
-----------------------------------------------
--
Visit the official FVWM web page at <URL: http://www.fvwm.org/>.
To unsubscribe from the list, send "unsubscribe fvwm" in the body of a
message to majordomo_at_fvwm.org.
To report problems, send mail to fvwm-owner_at_fvwm.org.
Received on Mon Apr 01 2002 - 12:52:04 BST

This archive was generated by hypermail 2.3.0 : Mon Aug 29 2016 - 19:37:52 BST