Re: FVWM: Bind functions to pan window frame

From: Dominik Vogt <dominik.vogt_at_gmx.de>
Date: Sun, 31 Mar 2002 14:35:40 +0200

On Thu, Mar 28, 2002 at 10:40:04PM +0100, Uwe Pross wrote:
> Hi there,
>
> Is it possible to use the pan window to call fvwm-functions?
>
> A couple of days ago there was a question about Auto-Raise and
> Auto-Lower certain windows in this mailing list. It would be nice if
> one could use the pan window frame to raise or lower FvwmButtons or
> FvwmTaskBar. For example if the mouse pointer hits the left side of
> the screen FvwmButtons would raise if it hits the bottom of the screen
> FvwmTaskBar would raise and so on.
>
> How difficult would it be to implement such behaviour? I had a look in
> virtual.c where EdgeScrolling is done. It seems not impossible. Any
> suggestions where to start from?

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

(Note: the function ParseDirectionArgument() from libs/gravity.c
can parse the left/right/... bits).

> Can I use constructs like
> sprintf( tmp , .... ) ;
> SendFvwmPipe( Fvwm_fd , tmp , 0 ) ;
>
> in virtual.c as it is done for example in FvwmTaskBar.c or does this
> work in modules only?

That's part of the module interface only. In the fvwm core you
would execute a function like this (from events.c):

  old_execute_function(
    NULL, "Function UrgencyFunc", Fw, &Event, C_WINDOW, -1, 0, NULL);

Bye

Dominik ^_^ ^_^

 --
Dominik Vogt, dominik.vogt_at_gmx.de
Reply-To: dominik.vogt_at_gmx.de
--
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 Sun Mar 31 2002 - 12:07:29 BST

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