kwin/events.cpp
Matthias Ettrich 6a36c54a7f Kwin raises the following sound events via KNotifyClient:
"Window Close"
	 "Window Iconify"
                  "Window DeIconify"
                  "Window Maximize"
                  "Window UnMaximize"
                  "Window Sticky"
                  "Window UnSticky"
                  "Window New"
                  "Window Delete"
                  "Window Trans New"
                  "Window Trans Delete"
                  "Window Shade Up"
                  "Window Shade Down"
                  "Window Move Start"
                  "Window Move End"
                  "Window Resize Start"
                  "Window Resize End"

svn path=/trunk/kdebase/kwin/; revision=48752
2000-05-07 20:38:11 +00:00

75 lines
1.5 KiB
C++

/*****************************************************************
kwin - the KDE window manager
Copyright (C) 1999, 2000 Matthias Ettrich <ettrich@kde.org>
******************************************************************/
#include "events.h"
#include <knotifyclient.h>
void Events::raise( Event e )
{
static bool forgetIt = FALSE;
if ( forgetIt )
return; // no connection was possible, don't try each time
QString event;
switch ( e ) {
case Close:
event = "Window Close";
break;
case Iconify:
event = "Window Iconify";
break;
case DeIconify:
event = "Window DeIconify";
break;
case Maximize:
event = "Window Maximize";
break;
case UnMaximize:
event = "Window UnMaximize";
break;
case Sticky:
event = "Window Sticky";
break;
case UnSticky:
event = "Window UnSticky";
break;
case New:
event = "Window New";
break;
case Delete:
event = "Window Delete";
break;
case TransNew:
event = "Window TransNew";
break;
case TransDelete:
event = "Window TransDelete";
break;
case ShadeUp:
event = "Window ShadeUp";
break;
case ShadeDown:
event = "Window ShadeDown";
break;
case MoveStart:
event = "Window Move Start";
break;
case MoveEnd:
event = "Window Move End";
break;
case ResizeStart:
event = "Window Resize Start";
break;
case ResizeEnd:
event = "Window Resize End";
break;
}
if ( !event )
return;
if ( !KNotifyClient::event( event ) )
forgetIt = TRUE;
}