mirror of
https://github.com/gryf/wmaker.git
synced 2025-12-19 20:38:08 +01:00
Applied patch from Largo to update sound related stuff and documentation
This commit is contained in:
23
INSTALL
23
INSTALL
@@ -334,15 +334,6 @@ apply.
|
|||||||
INSTALLATION:
|
INSTALLATION:
|
||||||
=============
|
=============
|
||||||
|
|
||||||
Unpack WindowMaker-extra-<version-number>.tar.gz in /usr/local/share
|
|
||||||
|
|
||||||
You can get the file at ftp://ftp.windowmaker.org. This file is optional
|
|
||||||
and only have a few icons, and themes. Look for the latest <version-number>
|
|
||||||
available.
|
|
||||||
Also there is a WindowMaker-extra.readme to instruct you where that package
|
|
||||||
should go.
|
|
||||||
|
|
||||||
|
|
||||||
Build Window Maker
|
Build Window Maker
|
||||||
------------------
|
------------------
|
||||||
For a quick start, type the following in your shell prompt:
|
For a quick start, type the following in your shell prompt:
|
||||||
@@ -417,6 +408,20 @@ Read the User Guide for a more in-depth explanation of Window Maker.
|
|||||||
You might want to take a look at the FAQ too.
|
You might want to take a look at the FAQ too.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Installing the extras package
|
||||||
|
-----------------------------
|
||||||
|
|
||||||
|
Unpack WindowMaker-extra-<version-number>.tar.gz in /usr/local/share
|
||||||
|
|
||||||
|
You can get the file at ftp://ftp.windowmaker.org. This file is optional
|
||||||
|
and only have a few icons, and themes. Look for the latest <version-number>
|
||||||
|
available.
|
||||||
|
Also there is a WindowMaker-extra.readme to instruct you where that package
|
||||||
|
should go.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
I don't have the root password :(
|
I don't have the root password :(
|
||||||
---------------------------------
|
---------------------------------
|
||||||
|
|
||||||
|
|||||||
@@ -1921,7 +1921,7 @@ createPanel(Panel *p)
|
|||||||
|
|
||||||
|
|
||||||
WMMapSubwidgets(panel->bgF);
|
WMMapSubwidgets(panel->bgF);
|
||||||
#endif
|
#endif /* unfinished */
|
||||||
/*** options ***/
|
/*** options ***/
|
||||||
panel->optF = WMCreateFrame(panel->frame);
|
panel->optF = WMCreateFrame(panel->frame);
|
||||||
WMSetFrameRelief(panel->optF, WRFlat);
|
WMSetFrameRelief(panel->optF, WRFlat);
|
||||||
|
|||||||
@@ -386,8 +386,8 @@ createPanel(Panel *p)
|
|||||||
}
|
}
|
||||||
WMSetBalloonTextForView(_("Disable/enable `superfluous' features and\n"
|
WMSetBalloonTextForView(_("Disable/enable `superfluous' features and\n"
|
||||||
"animations. These include the `ghosting' of the\n"
|
"animations. These include the `ghosting' of the\n"
|
||||||
"dock when it's being moved to the another side\n"
|
"dock when it's being moved to another side and\n"
|
||||||
"and the explosion animation for undocked icons."),
|
"the explosion animation when undocking icons."),
|
||||||
WMWidgetView(panel->supB));
|
WMWidgetView(panel->supB));
|
||||||
|
|
||||||
panel->sfxB = WMCreateButton(panel->animF, WBTToggle);
|
panel->sfxB = WMCreateButton(panel->animF, WBTToggle);
|
||||||
@@ -409,7 +409,7 @@ createPanel(Panel *p)
|
|||||||
"for actions like shading and closing a window.\n"
|
"for actions like shading and closing a window.\n"
|
||||||
"You will need a module distributed separately\n"
|
"You will need a module distributed separately\n"
|
||||||
"for this. You can get it at:\n"
|
"for this. You can get it at:\n"
|
||||||
"http://www.frontiernet.net/~southgat/wmsound"),
|
"http://shadowmere.student.utwente.nl/"),
|
||||||
WMWidgetView(panel->sfxB));
|
WMWidgetView(panel->sfxB));
|
||||||
|
|
||||||
panel->noteL = WMCreateLabel(panel->animF);
|
panel->noteL = WMCreateLabel(panel->animF);
|
||||||
@@ -522,7 +522,7 @@ InitConfigurations(WMScreen *scr, WMWindow *win)
|
|||||||
|
|
||||||
panel->description = _("Animation speeds, titlebar styles, various option\n"
|
panel->description = _("Animation speeds, titlebar styles, various option\n"
|
||||||
"toggling and number of colors to reserve for\n"
|
"toggling and number of colors to reserve for\n"
|
||||||
"Window Maker in 8bit displays.");
|
"Window Maker on 8bit displays.");
|
||||||
|
|
||||||
panel->win = win;
|
panel->win = win;
|
||||||
|
|
||||||
|
|||||||
@@ -38,7 +38,6 @@
|
|||||||
|
|
||||||
#include "TexturePanel.h"
|
#include "TexturePanel.h"
|
||||||
|
|
||||||
|
|
||||||
#define MAX_SECTION_PARTS 5
|
#define MAX_SECTION_PARTS 5
|
||||||
|
|
||||||
typedef struct _TexturePanel {
|
typedef struct _TexturePanel {
|
||||||
|
|||||||
@@ -45,7 +45,6 @@
|
|||||||
#define WVERSION "0.43"
|
#define WVERSION "0.43"
|
||||||
#define WMVERSION "0.62.x"
|
#define WMVERSION "0.62.x"
|
||||||
|
|
||||||
|
|
||||||
extern char *NOptionValueChanged;
|
extern char *NOptionValueChanged;
|
||||||
|
|
||||||
typedef struct _Panel Panel;
|
typedef struct _Panel Panel;
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
Logo.WMClip = {Icon = clip.#extension#;};
|
Logo.WMClip = {Icon = clip.#extension#;};
|
||||||
Dockit = {Icon = GNUstep3D.#extension#;};
|
Dockit = {Icon = GNUstep3D.#extension#;};
|
||||||
DockApp = {NoAppIcon = NO;};
|
DockApp = {NoAppIcon = NO;};
|
||||||
WMSoundServer = {Icon = sound.#extension#;};
|
WSoundServer = {Icon = sound.#extension#;};
|
||||||
panel.Panel = {NoAppIcon = YES;};
|
panel.Panel = {NoAppIcon = YES;};
|
||||||
gmc.Gmc = {NoAppIcon = YES;};
|
gmc.Gmc = {NoAppIcon = YES;};
|
||||||
XTerm = {Icon = Terminal.#extension#;};
|
XTerm = {Icon = Terminal.#extension#;};
|
||||||
|
|||||||
@@ -55,7 +55,7 @@
|
|||||||
#undef I18N
|
#undef I18N
|
||||||
|
|
||||||
/* define if you want sound support */
|
/* define if you want sound support */
|
||||||
#undef WMSOUND
|
#undef WSOUND
|
||||||
|
|
||||||
/* define if you want the 'lite' version */
|
/* define if you want the 'lite' version */
|
||||||
#undef LITE
|
#undef LITE
|
||||||
|
|||||||
@@ -758,7 +758,7 @@ AC_ARG_ENABLE(sound,
|
|||||||
[ --disable-sound disable sound support ],
|
[ --disable-sound disable sound support ],
|
||||||
sound=$enableval, sound=yes)
|
sound=$enableval, sound=yes)
|
||||||
if test "$sound" = yes; then
|
if test "$sound" = yes; then
|
||||||
AC_DEFINE(WMSOUND)
|
AC_DEFINE(WSOUND)
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -98,8 +98,8 @@ wmaker_SOURCES = \
|
|||||||
winspector.c \
|
winspector.c \
|
||||||
workspace.c \
|
workspace.c \
|
||||||
workspace.h \
|
workspace.h \
|
||||||
wmsound.c \
|
wsound.c \
|
||||||
wmsound.h \
|
wsound.h \
|
||||||
text.c \
|
text.c \
|
||||||
text.h
|
text.h
|
||||||
|
|
||||||
|
|||||||
@@ -55,8 +55,8 @@
|
|||||||
# include "kwm.h"
|
# include "kwm.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef WMSOUND
|
#ifdef WSOUND
|
||||||
#include "wmsound.h"
|
#include "wsound.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
@@ -273,8 +273,8 @@ wShadeWindow(WWindow *wwin)
|
|||||||
|
|
||||||
XLowerWindow(dpy, wwin->client_win);
|
XLowerWindow(dpy, wwin->client_win);
|
||||||
|
|
||||||
#ifdef WMSOUND
|
#ifdef WSOUND
|
||||||
wSoundPlay(WMSOUND_SHADE);
|
wSoundPlay(WSOUND_SHADE);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef ANIMATIONS
|
#ifdef ANIMATIONS
|
||||||
@@ -360,8 +360,8 @@ wUnshadeWindow(WWindow *wwin)
|
|||||||
wwin->flags.mapped = 1;
|
wwin->flags.mapped = 1;
|
||||||
XMapWindow(dpy, wwin->client_win);
|
XMapWindow(dpy, wwin->client_win);
|
||||||
|
|
||||||
#ifdef WMSOUND
|
#ifdef WSOUND
|
||||||
wSoundPlay(WMSOUND_UNSHADE);
|
wSoundPlay(WSOUND_UNSHADE);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef ANIMATIONS
|
#ifdef ANIMATIONS
|
||||||
@@ -515,8 +515,8 @@ wMaximizeWindow(WWindow *wwin, int directions)
|
|||||||
wKWMSendEventMessage(wwin, WKWMChangedClient);
|
wKWMSendEventMessage(wwin, WKWMChangedClient);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef WMSOUND
|
#ifdef WSOUND
|
||||||
wSoundPlay(WMSOUND_MAXIMIZE);
|
wSoundPlay(WSOUND_MAXIMIZE);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -549,8 +549,8 @@ wUnmaximizeWindow(WWindow *wwin)
|
|||||||
wKWMSendEventMessage(wwin, WKWMChangedClient);
|
wKWMSendEventMessage(wwin, WKWMChangedClient);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef WMSOUND
|
#ifdef WSOUND
|
||||||
wSoundPlay(WMSOUND_UNMAXIMIZE);
|
wSoundPlay(WSOUND_UNMAXIMIZE);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -970,8 +970,8 @@ wIconifyWindow(WWindow *wwin)
|
|||||||
unmapTransientsFor(wwin);
|
unmapTransientsFor(wwin);
|
||||||
|
|
||||||
if (present) {
|
if (present) {
|
||||||
#ifdef WMSOUND
|
#ifdef WSOUND
|
||||||
wSoundPlay(WMSOUND_ICONIFY);
|
wSoundPlay(WSOUND_ICONIFY);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
XUngrabPointer(dpy, CurrentTime);
|
XUngrabPointer(dpy, CurrentTime);
|
||||||
@@ -1124,8 +1124,8 @@ wDeiconifyWindow(WWindow *wwin)
|
|||||||
XUnmapWindow(dpy, wwin->icon->core->window);
|
XUnmapWindow(dpy, wwin->icon->core->window);
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef WMSOUND
|
#ifdef WSOUND
|
||||||
wSoundPlay(WMSOUND_DEICONIFY);
|
wSoundPlay(WSOUND_DEICONIFY);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* if the window is in another workspace, do it silently */
|
/* if the window is in another workspace, do it silently */
|
||||||
@@ -1242,8 +1242,8 @@ hideWindow(WIcon *icon, int icon_x, int icon_y, WWindow *wwin, int animate)
|
|||||||
|
|
||||||
wClientSetState(wwin, IconicState, icon->icon_win);
|
wClientSetState(wwin, IconicState, icon->icon_win);
|
||||||
flushExpose();
|
flushExpose();
|
||||||
#ifdef WMSOUND
|
#ifdef WSOUND
|
||||||
wSoundPlay(WMSOUND_HIDE);
|
wSoundPlay(WSOUND_HIDE);
|
||||||
#endif
|
#endif
|
||||||
#ifdef ANIMATIONS
|
#ifdef ANIMATIONS
|
||||||
if (!wwin->screen_ptr->flags.startup && !wPreferences.no_animations &&
|
if (!wwin->screen_ptr->flags.startup && !wPreferences.no_animations &&
|
||||||
@@ -1457,8 +1457,8 @@ unhideWindow(WIcon *icon, int icon_x, int icon_y, WWindow *wwin, int animate,
|
|||||||
wwin->flags.hidden=0;
|
wwin->flags.hidden=0;
|
||||||
wwin->flags.mapped=1;
|
wwin->flags.mapped=1;
|
||||||
|
|
||||||
#ifdef WMSOUND
|
#ifdef WSOUND
|
||||||
wSoundPlay(WMSOUND_UNHIDE);
|
wSoundPlay(WSOUND_UNHIDE);
|
||||||
#endif
|
#endif
|
||||||
#ifdef ANIMATIONS
|
#ifdef ANIMATIONS
|
||||||
if (!wwin->screen_ptr->flags.startup && !wPreferences.no_animations
|
if (!wwin->screen_ptr->flags.startup && !wPreferences.no_animations
|
||||||
|
|||||||
@@ -47,7 +47,7 @@
|
|||||||
#ifdef XDND
|
#ifdef XDND
|
||||||
#include "xdnd.h"
|
#include "xdnd.h"
|
||||||
#endif
|
#endif
|
||||||
#include "wmsound.h"
|
#include "wsound.h"
|
||||||
#include "WINGsP.h"
|
#include "WINGsP.h"
|
||||||
|
|
||||||
|
|
||||||
@@ -900,8 +900,8 @@ appIconMouseDown(WObjDescriptor *desc, XEvent *event)
|
|||||||
aicon->y_pos);
|
aicon->y_pos);
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef WMSOUND
|
#ifdef WSOUND
|
||||||
wSoundPlay(WMSOUND_DOCK);
|
wSoundPlay(WSOUND_DOCK);
|
||||||
#endif
|
#endif
|
||||||
} else {
|
} else {
|
||||||
XMoveWindow(dpy, icon->core->window, x, y);
|
XMoveWindow(dpy, icon->core->window, x, y);
|
||||||
|
|||||||
@@ -46,8 +46,8 @@
|
|||||||
|
|
||||||
#include "dock.h"
|
#include "dock.h"
|
||||||
|
|
||||||
#ifdef WMSOUND
|
#ifdef WSOUND
|
||||||
#include "wmsound.h"
|
#include "wsound.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
@@ -414,8 +414,8 @@ wApplicationCreate(WScreen *scr, Window main_window)
|
|||||||
scr->wapp_list = wapp;
|
scr->wapp_list = wapp;
|
||||||
|
|
||||||
|
|
||||||
#ifdef WMSOUND
|
#ifdef WSOUND
|
||||||
wSoundPlay(WMSOUND_APPSTART);
|
wSoundPlay(WSOUND_APPSTART);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
@@ -517,8 +517,8 @@ wApplicationDestroy(WApplication *wapp)
|
|||||||
wArrangeIcons(scr, True);
|
wArrangeIcons(scr, True);
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef WMSOUND
|
#ifdef WSOUND
|
||||||
wSoundPlay(WMSOUND_APPEXIT);
|
wSoundPlay(WSOUND_APPEXIT);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1220,7 +1220,7 @@ wShowInfoPanel(WScreen *scr)
|
|||||||
#ifdef OLWM_HINTS
|
#ifdef OLWM_HINTS
|
||||||
list[j++] = "OLWM";
|
list[j++] = "OLWM";
|
||||||
#endif
|
#endif
|
||||||
#ifdef WMSOUND
|
#ifdef WSOUND
|
||||||
list[j++] = "Sound";
|
list[j++] = "Sound";
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|||||||
14
src/dock.c
14
src/dock.c
@@ -53,7 +53,7 @@
|
|||||||
#include "workspace.h"
|
#include "workspace.h"
|
||||||
#include "framewin.h"
|
#include "framewin.h"
|
||||||
#include "superfluous.h"
|
#include "superfluous.h"
|
||||||
#include "wmsound.h"
|
#include "wsound.h"
|
||||||
|
|
||||||
|
|
||||||
#include <proplist.h>
|
#include <proplist.h>
|
||||||
@@ -3937,18 +3937,18 @@ handleIconMove(WDock *dock, WAppIcon *aicon, XEvent *event)
|
|||||||
if (aicon->icon->selected)
|
if (aicon->icon->selected)
|
||||||
wIconSelect(aicon->icon);
|
wIconSelect(aicon->icon);
|
||||||
|
|
||||||
#ifdef WMSOUND
|
#ifdef WSOUND
|
||||||
wSoundPlay(WMSOUND_KABOOM);
|
wSoundPlay(WSOUND_KABOOM);
|
||||||
#endif
|
#endif
|
||||||
DoKaboom(scr,aicon->icon->core->window, x, y);
|
DoKaboom(scr,aicon->icon->core->window, x, y);
|
||||||
#ifdef WMSOUND
|
#ifdef WSOUND
|
||||||
} else {
|
} else {
|
||||||
wSoundPlay(WMSOUND_UNDOCK);
|
wSoundPlay(WSOUND_UNDOCK);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
#ifdef WMSOUND
|
#ifdef WSOUND
|
||||||
} else {
|
} else {
|
||||||
wSoundPlay(WMSOUND_UNDOCK);
|
wSoundPlay(WSOUND_UNDOCK);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
if (clip && clip->auto_raise_lower)
|
if (clip && clip->auto_raise_lower)
|
||||||
|
|||||||
@@ -637,13 +637,9 @@ handleButtonPress(XEvent *event)
|
|||||||
}
|
}
|
||||||
#ifdef MOUSE_WS_SWITCH
|
#ifdef MOUSE_WS_SWITCH
|
||||||
else if (event->xbutton.button==Button5) {
|
else if (event->xbutton.button==Button5) {
|
||||||
|
|
||||||
wWorkspaceRelativeChange(scr, -1);
|
wWorkspaceRelativeChange(scr, -1);
|
||||||
|
|
||||||
} else if (event->xbutton.button==Button4) {
|
} else if (event->xbutton.button==Button4) {
|
||||||
|
|
||||||
wWorkspaceRelativeChange(scr, 1);
|
wWorkspaceRelativeChange(scr, 1);
|
||||||
|
|
||||||
}
|
}
|
||||||
#endif /* MOUSE_WS_SWITCH */
|
#endif /* MOUSE_WS_SWITCH */
|
||||||
#ifdef GNOME_STUFF
|
#ifdef GNOME_STUFF
|
||||||
|
|||||||
@@ -1,89 +0,0 @@
|
|||||||
#include "wconfig.h"
|
|
||||||
|
|
||||||
#include <stdio.h>
|
|
||||||
#include <stdlib.h>
|
|
||||||
#include <X11/X.h>
|
|
||||||
#include <X11/Xlib.h>
|
|
||||||
#include <X11/Xutil.h>
|
|
||||||
#include <X11/Xproto.h>
|
|
||||||
|
|
||||||
#include "WindowMaker.h"
|
|
||||||
#include "funcs.h"
|
|
||||||
#include "wmsound.h"
|
|
||||||
|
|
||||||
#ifdef WMSOUND
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
extern WPreferences wPreferences;
|
|
||||||
|
|
||||||
#if 0
|
|
||||||
void
|
|
||||||
wSoundServerGrab(Window wm_win)
|
|
||||||
{
|
|
||||||
Window *lstChildren;
|
|
||||||
Window retRoot;
|
|
||||||
Window retParent;
|
|
||||||
int indexCount;
|
|
||||||
u_int numChildren;
|
|
||||||
XClassHint *retHint;
|
|
||||||
|
|
||||||
if (XQueryTree(dpy, wm_win, &retRoot, &retParent, &lstChildren, &numChildren)) {
|
|
||||||
for (indexCount = 1; indexCount < numChildren; indexCount++) {
|
|
||||||
retHint = XAllocClassHint();
|
|
||||||
if (!retHint) {
|
|
||||||
XFree(lstChildren);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
XGetClassHint (dpy, lstChildren[indexCount], retHint);
|
|
||||||
|
|
||||||
if (retHint->res_class) {
|
|
||||||
if (strcmp("WMSoundServer", retHint->res_class)==0 ||
|
|
||||||
/*strcmp("WSoundServer", retHint->res_class)==0 ||*/
|
|
||||||
(retHint->res_name &&
|
|
||||||
strcmp("wsoundserver", retHint->res_name)==0 &&
|
|
||||||
strcmp("DockApp", retHint->res_class)==0)) {
|
|
||||||
|
|
||||||
soundServer = lstChildren[indexCount];
|
|
||||||
XFree(lstChildren);
|
|
||||||
if(retHint) {
|
|
||||||
XFree(retHint);
|
|
||||||
}
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
XFree(retHint);
|
|
||||||
retHint = 0;
|
|
||||||
}
|
|
||||||
XFree(lstChildren);
|
|
||||||
}
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
void
|
|
||||||
wSoundPlay(long event_sound)
|
|
||||||
{
|
|
||||||
static Atom atom = 0;
|
|
||||||
XEvent sound_event;
|
|
||||||
|
|
||||||
if (!atom) {
|
|
||||||
atom = XInternAtom(dpy, "_WINDOWMAKER_EVENT", False);
|
|
||||||
}
|
|
||||||
|
|
||||||
if(!wPreferences.no_sound) {
|
|
||||||
Window win = wScreenWithNumber(0)->info_window;
|
|
||||||
|
|
||||||
sound_event.xclient.type = ClientMessage;
|
|
||||||
sound_event.xclient.message_type = atom;
|
|
||||||
sound_event.xclient.format = 32;
|
|
||||||
sound_event.xclient.display = dpy;
|
|
||||||
sound_event.xclient.window = win;
|
|
||||||
sound_event.xclient.data.l[0] = event_sound;
|
|
||||||
XSendEvent(dpy, win, False, StructureNotifyMask, &sound_event);
|
|
||||||
XFlush(dpy);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
#endif /* WMSOUND */
|
|
||||||
44
src/wsound.c
Normal file
44
src/wsound.c
Normal file
@@ -0,0 +1,44 @@
|
|||||||
|
#include "wconfig.h"
|
||||||
|
|
||||||
|
#include <stdio.h>
|
||||||
|
#include <stdlib.h>
|
||||||
|
#include <X11/X.h>
|
||||||
|
#include <X11/Xlib.h>
|
||||||
|
#include <X11/Xutil.h>
|
||||||
|
#include <X11/Xproto.h>
|
||||||
|
|
||||||
|
#include "WindowMaker.h"
|
||||||
|
#include "funcs.h"
|
||||||
|
#include "wsound.h"
|
||||||
|
|
||||||
|
#ifdef WSOUND
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
extern WPreferences wPreferences;
|
||||||
|
|
||||||
|
void
|
||||||
|
wSoundPlay(long event_sound)
|
||||||
|
{
|
||||||
|
static Atom atom = 0;
|
||||||
|
XEvent sound_event;
|
||||||
|
|
||||||
|
if (!atom) {
|
||||||
|
atom = XInternAtom(dpy, "_WINDOWMAKER_EVENT", False);
|
||||||
|
}
|
||||||
|
|
||||||
|
if(!wPreferences.no_sound) {
|
||||||
|
Window win = wScreenWithNumber(0)->info_window;
|
||||||
|
|
||||||
|
sound_event.xclient.type = ClientMessage;
|
||||||
|
sound_event.xclient.message_type = atom;
|
||||||
|
sound_event.xclient.format = 32;
|
||||||
|
sound_event.xclient.display = dpy;
|
||||||
|
sound_event.xclient.window = win;
|
||||||
|
sound_event.xclient.data.l[0] = event_sound;
|
||||||
|
XSendEvent(dpy, win, False, StructureNotifyMask, &sound_event);
|
||||||
|
XFlush(dpy);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif /* WSOUND */
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* WMSound Server
|
* Window Maker Sound Server
|
||||||
*
|
*
|
||||||
* Copyright (c) 1997 Anthony P. Quinn
|
* Copyright (c) 1997 Anthony P. Quinn
|
||||||
*
|
*
|
||||||
@@ -19,34 +19,25 @@
|
|||||||
* USA.
|
* USA.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef WMSOUND_H_
|
#ifndef WSOUND_H_
|
||||||
#define WMSOUND_H_
|
#define WSOUND_H_
|
||||||
|
|
||||||
#define WMSOUND_SHADE 1001
|
#define WSOUND_SHADE 1001
|
||||||
#define WMSOUND_UNSHADE 1002
|
#define WSOUND_UNSHADE 1002
|
||||||
#define WMSOUND_MAXIMIZE 1003
|
#define WSOUND_MAXIMIZE 1003
|
||||||
#define WMSOUND_UNMAXIMIZE 1004
|
#define WSOUND_UNMAXIMIZE 1004
|
||||||
#define WMSOUND_ICONIFY 1005
|
#define WSOUND_ICONIFY 1005
|
||||||
#define WMSOUND_DEICONIFY 1006
|
#define WSOUND_DEICONIFY 1006
|
||||||
#define WMSOUND_HIDE 1007
|
#define WSOUND_HIDE 1007
|
||||||
#define WMSOUND_UNHIDE 1008
|
#define WSOUND_UNHIDE 1008
|
||||||
#define WMSOUND_APPSTART 1009
|
#define WSOUND_APPSTART 1009
|
||||||
#define WMSOUND_APPEXIT 1010
|
#define WSOUND_APPEXIT 1010
|
||||||
#define WMSOUND_DOCK 1011
|
#define WSOUND_DOCK 1011
|
||||||
#define WMSOUND_UNDOCK 1012
|
#define WSOUND_UNDOCK 1012
|
||||||
#define WMSOUND_KABOOM 1013
|
#define WSOUND_KABOOM 1013
|
||||||
|
|
||||||
#if 0
|
|
||||||
/* don't delete this */
|
|
||||||
extern WWindow *wSoundServer;
|
|
||||||
extern Atom WSStartup, WSShade, WSUnshade, WSShutdown;
|
|
||||||
extern Atom WSMaximize, WSUnmaximize, WSIconify, WSUniconify, WSAppStart;
|
|
||||||
extern Atom WSHide, WSUnhide, WSAppExit, WSDock, WSUnDock, WSKaboom;
|
|
||||||
extern WApplication *wSoundApp;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
void wSoundPlay(long event_sound);
|
void wSoundPlay(long event_sound);
|
||||||
void wSoundServerGrab(Window wm_win);
|
void wSoundServerGrab(Window wm_win);
|
||||||
|
|
||||||
#endif /*WMSOUND_H_*/
|
#endif /*WSOUND_H_*/
|
||||||
Reference in New Issue
Block a user