From 5879b1591d192d4a9d86b7c1d2b4027c5e9bcb98 Mon Sep 17 00:00:00 2001 From: Thomas Adam Date: Sat, 5 Dec 2020 22:25:05 +0000 Subject: [PATCH] FvwmEvent: remove support for Rplay librplay support in FvwmEvent stems from when it was originally known as FvwmAudio to play sounds on specific events. This was a popular trend in the 90s, but has become rather annoying in recent years for most users. Indeed, even librplay itself is not maintained and the cost of some Linux distributions carrying it around just to have the feature enabled in fvwm, can be annoying, despite it being an optional dependency. Therefore, remove librplay support. Fixes #316 --- bin/fvwm-config.in | 3 - configure.ac | 14 -- doc/fvwm3/fvwm3.adoc | 2 +- doc/modules/FvwmEvent.adoc | 193 +++++----------- fvwm/fvwm3.c | 3 - libs/Fplay.h | 375 -------------------------------- libs/Makefile.am | 2 +- modules/FvwmAnimate/Makefile.am | 4 +- modules/FvwmEvent/FvwmEvent.c | 138 +----------- modules/FvwmEvent/Makefile.am | 16 +- 10 files changed, 61 insertions(+), 689 deletions(-) delete mode 100644 libs/Fplay.h diff --git a/bin/fvwm-config.in b/bin/fvwm-config.in index 48216fbd1..77ea48a33 100644 --- a/bin/fvwm-config.in +++ b/bin/fvwm-config.in @@ -85,7 +85,6 @@ with_iconv=@with_iconv@ with_perllib=@with_perllib@ with_png=@with_png@ with_readline=@with_readline@ -with_rplay=@with_rplay@ with_rsvg=@with_rsvg@ with_shape=@with_shape@ with_shm=@with_shm@ @@ -158,7 +157,6 @@ while test $# -gt 0; do test "$with_perllib" = "yes" && echo "perllib" test "$with_png" = "yes" && echo "png" test "$with_readline" = "yes" && echo "readline" - test "$with_rplay" = "yes" && echo "rplay" test "$with_rsvg" = "yes" && echo "rsvg" test "$with_shape" = "yes" && echo "shape" test "$with_shm" = "yes" && echo "shm" @@ -207,7 +205,6 @@ while test $# -gt 0; do echo " iconv (i18n conversions): $with_iconv" echo " png: $with_png" echo " readline: $with_readline" - echo " rplay: $with_rplay" echo " shape (shaped windows): $with_shape" echo " shm (shared memory): $with_shm" echo " sm (session management): $with_sm" diff --git a/configure.ac b/configure.ac index 03a3c8a0a..5d32876da 100644 --- a/configure.ac +++ b/configure.ac @@ -866,18 +866,6 @@ fi AC_SUBST(rsvg_CFLAGS) AC_SUBST(rsvg_LIBS) -# ********* rplay -$UNSET ac_cv_header_rplay_h -$UNSET ac_cv_lib_rplay_rplay_create -# Add in X_EXTRA_LIBS here to get things like connect(). -smr_CHECK_LIB(rplay, , adds audio capability, rplay_create, rplay.h, - $X_EXTRA_LIBS) -AH_TEMPLATE([HAVE_RPLAY],[Define if rplay library is used.]) -test ! x"$rplay_LIBS" = x && AC_DEFINE(HAVE_RPLAY) -AC_SUBST(rplay_LIBS) -AC_SUBST(rplay_CFLAGS) - - # ********* readline with_readline=no problem_readline=": Both termcap and ncurses disabled" @@ -1472,7 +1460,6 @@ AC_SUBST(with_perllib) AC_SUBST(with_png) AC_SUBST(with_rsvg) AC_SUBST(with_readline) -AC_SUBST(with_rplay) AC_SUBST(with_shape) AC_SUBST(with_shm) AC_SUBST(with_sm) @@ -1588,7 +1575,6 @@ Fvwm3 Configuration: With Gettext Native Lang support? $with_gettext$problem_gettext With Iconv support? $with_iconv_type$problem_iconv With ReadLine sup. in FvwmConsole? $with_readline$problem_readline - With RPlay support in FvwmEvent? $with_rplay$problem_rplay With Shaped window support? $with_shape$problem_shape With Shared memory for XImage? $with_shm$problem_shm With Session Management support? $with_sm$problem_sm diff --git a/doc/fvwm3/fvwm3.adoc b/doc/fvwm3/fvwm3.adoc index 658a32fd4..f13d5e887 100644 --- a/doc/fvwm3/fvwm3.adoc +++ b/doc/fvwm3/fvwm3.adoc @@ -125,7 +125,7 @@ a multi-screen display. *-V* | *--version*:: Prints the version of fvwm to _stderr_. Also prints an information about -the compiled in support for readline, rplay, xpm, png, svg, GNOME hints, +the compiled in support for readline, xpm, png, svg, GNOME hints, EWMH hints, session management, bidirectional text, multibyte characters, RandR and Xft aa font rendering. diff --git a/doc/modules/FvwmEvent.adoc b/doc/modules/FvwmEvent.adoc index 7e890284f..cbdd3cfa0 100644 --- a/doc/modules/FvwmEvent.adoc +++ b/doc/modules/FvwmEvent.adoc @@ -51,23 +51,11 @@ _FvwmEvent_ can be used to bind sound files to events like _FvwmAudio_ (RiP) did. It can be used for logging event traces to a log file, while debugging _fvwm_. -_FvwmEvent_ can also have builtin support for the rplay library. -(heritage of FvwmAudio) - == INVOCATION The invocation method was shown in the synopsis section. No command line invocation is possible. _FvwmEvent_ must be invoked by the _fvwm_ window -manager. _FvwmEvent_ accepts a single argument: - -[horizontal] --audio:: Enables FvwmAudio compatibility mode. -alias:: Makes FvwmEvent use _alias_ as its name. This affects which lines from -+ -the user's configuration file are used. -+ -Invoking FvwmEvent as _FvwmAudio_ (either by using an alias or creating -a symlink) enables FvwmAudio compatibility mode. +manager. == CONFIGURATION OPTIONS @@ -81,9 +69,6 @@ configuration options: below): + .... - # play sounds - *FvwmEvent: Cmd builtin-rplay - # execute distinct fvwm functions *FvwmEvent: Cmd @@ -91,27 +76,7 @@ configuration options: *FvwmEvent: Cmd exec .... + -This version of _FvwmEvent_ has builtin _rplay_ support which does not -need to invoke an external audio player to play sounds. The rplay -support is enabled when _FvwmEvent_ is compiled with _HAVE_RPLAY_ -defined and when _FvwmEvent: Cmd_ is set to _builtin-rplay_. See remarks -below if _FvwmEvent_ is invoked in FvwmAudio compatibility mode. -+ -For example: -+ -.... - *FvwmEvent: Cmd builtin-rplay - *FvwmEvent: add_window drip.au -.... -+ -rplay can be obtained via anonymous ftp at -+ -.... - or - -.... -+ -_FvwmEvent_ also has support for any other external program. e.g: the +_FvwmEvent_ has support for any other external program. e.g: the rsynth 'say' command: + .... @@ -147,62 +112,56 @@ setting *FvwmEvent: window-manager-event action-or-filename:: Binds particular actions to window manager events. + -e.g. for audio-events: -+ -.... - *FvwmEvent: startup TaDa.au - *FvwmEvent: shutdown Elvis_Left.au - *FvwmEvent: unknown doh.au - - *FvwmEvent: new_page beam_trek.au - *FvwmEvent: new_desk beam_trek.au - *FvwmEvent: old_add_window drip.au - *FvwmEvent: raise_window swoosh.au - *FvwmEvent: lower_window swoosh.au - *FvwmEvent: old_configure_window hammer.au - *FvwmEvent: focus_change boing.au - *FvwmEvent: enter_window boing.au - *FvwmEvent: leave_window boing.au - *FvwmEvent: destroy_window explosion.au - *FvwmEvent: iconify ploop.au - *FvwmEvent: deiconify ploop.au - *FvwmEvent: window_name huh.au - *FvwmEvent: icon_name beep.au - *FvwmEvent: visible_icon_name beep.au - *FvwmEvent: res_class beep.au - *FvwmEvent: res_name beep.au - *FvwmEvent: end_windowlist twang.au - - *FvwmEvent: icon_location beep.au - *FvwmEvent: map beep.au - *FvwmEvent: error beep.au - *FvwmEvent: config_info beep.au - *FvwmEvent: end_config_info beep.au - *FvwmEvent: icon_file beep.au - *FvwmEvent: default_icon beep.au - *FvwmEvent: string plapper.au - *FvwmEvent: mini_icon beep.au - *FvwmEvent: windowshade beep.au - *FvwmEvent: dewindowshade beep.au - - *FvwmEvent: visible_name beep.au - *FvwmEvent: sendconfig beep.au - *FvwmEvent: restack beep.au - *FvwmEvent: add_window beep.au - *FvwmEvent: configure_window beep.au +The following events are valid: ++ +[cols="<,<",] +|=== +|_Event_ |_Description_ +|add_window | Occurs when a new window is mapped and visible +|config_info | Occurs when a module asks for configuration +|configure_window | Occurs when a ConfigureNotify event happens +|default_icon | Occurs when a window's DefaultIcon changes +|deiconify | Occurs when a window id deiconified +|destroy_window | Occurs when a window is destroyed +|dewindowshade | Occurs when a window is unshaded +|echo | Occurs when an Echo command is run +|end_config_info | Occurs when there's no more module config to send +|end_windowlist | Occurs when the windowlist has finished sending +|enter_window | Occurs when a window receives a EnterNotify event +|error | DEPRECATED +|focus_change | Occurs when a window gains or loses focus +|icon_file | DEPRECATED +|icon_location | DEPRECATED +|icon_name | DEPRECATED +|iconify | Occurs when a window is iconified +|leave_window | Occurs when a window receives a LeaveNotify event +|lower_window | Occurs when a window is lowered +|map | Occurs when a window is Mapped +|mini_icon | Occurs when a window's mini icon changes +|monitor_changed | Occurs when a monitor's resolution changes +|monitor_disabled | Occurs when a monitor is disabled (via RandR) +|monitor_enabled | Occurs when a monitor is enabled (via RandR) +|monitor_focus | Occurs when a monitor gains focus +|new_desk | Occurs when a new desk is switched to +|new_page | Occurs when a new page is switched to +|old_add_window | DEPRECATED +|old_configure_window | DEPRECATED +|property_change | Occurs when a window recieves a PropertNotify event +|raise_window | Occurs when a windowis raised +|res_class | Occurs when a window's Class is set +|res_name | Occurs when a window's Resource is set +|restack | Occurs when windows are restacked +|sendconfig | Occurs when FvwmEvent asks for its config +|shutdown | DEPRECATED +|startup | DEPRECATED +|string | Occurs when the SendToModule command is used +|unknown | DEPRECATED +|visible_icon_name | Occurs when a window's visible icon name changes +|visible_name | Occurs when a window's visible name changes +|window_name | Occurs when a window's name (WM_NAME) is set +|windowshade | Occurs when a window is shaded +|=== - *FvwmEvent: visible_icon_name beep.au - *FvwmEvent: enter_window beep.au - *FvwmEvent: leave_window beep.au - *FvwmEvent: property_change beep.au - - *FvwmEvent: monitor_enabled beep.au - *FvwmEvent: monitor_disabled beep.au - *FvwmEvent: monitor_changed beep.au - *FvwmEvent: monitor_focus beep.au - - *FvwmEvent: echo beep.au -.... + The window related event handlers are executed within a window context. Previously PassId was used for this purpose, but now using PassId is not @@ -232,20 +191,11 @@ moves into the root window. In this case, the id passed is 0. + Note: When the shutdown event arrives, FvwmEvent may be killed before it can trigger the associated action. -+ -Provided _fvwm_ supports it (not yet), there's an additional event to -replace all _fvwm_ beeps with a sound: -+ -.... - *FvwmEvent: beep beep.au -.... *FvwmEvent: Delay 5:: Specifies that an event-action will only be executed if it occurs at least 5 seconds after the previous event. Events that occur during the - delay period are ignored. This option is useful if you don't want - several sounds playing at the same time. The default delay is 0 which - disables the Event delay. + delay period are ignored. The default delay is 0 which disables the Event. *FvwmEvent: StartDelay delay:: Specifies that an event-action will only be executed if it occurs at @@ -253,45 +203,6 @@ replace all _fvwm_ beeps with a sound: during the delay period are ignored. This option is useful when _fvwm_ starts and restarts using an audio player. The default delay is 0. -== RPLAY OPTIONS - -The following options are only valid with builtin rplay support. i.e: -when _FvwmEvent_ was compiled with _HAVE_RPLAY_ defined. They are used -only if _FvwmEvent: Cmd_ is set to _builtin-rplay_. - -*FvwmEvent: RplayHost hostname:: - Specifies what host the rplay sounds will play on. The _hostname_ can - also be an environment variable such as $HOSTDISPLAY. - -*FvwmEvent: RplayPriority 0:: - Specifies what priority will be assigned to the rplay sounds when they - are played. - -*FvwmEvent: RplayVolume 127:: - Specifies what volume will be assigned to the sounds when they are - played. - -== FvwmAudio Compatibility Mode - -When invoked in FvwmAudio compatibility mode (see above), FvwmEvent -accepts the following options to provide backwards compatibility for -FvwmAudio: - -*FvwmEvent: PlayCmd command:: - This is equivalent to using *FvwmEvent: Cmd to Exec commands. This - determines the independent audio player program that will actually - play the sounds. If the play command is set to _builtin-rplay_ then - the builtin rplay support will be used. - -*FvwmAudio: Dir directory:: - Specifies the directory to look for the audio files. This option is - ignored when rplay is used. - -== BUGS - -It's REALLY noisy when _fvwm_ starts and restarts using an audio player. -You can use FvwmEvent: StartDelay to fix this problem. - == COPYRIGHTS This module has evolved of _FvwmAudio_, which in term is heavily based diff --git a/fvwm/fvwm3.c b/fvwm/fvwm3.c index 6fbd511dc..3ec26b312 100644 --- a/fvwm/fvwm3.c +++ b/fvwm/fvwm3.c @@ -1282,9 +1282,6 @@ static void setVersionInfo(void) #ifdef HAVE_READLINE strcat(support_str, " ReadLine,"); #endif -#ifdef HAVE_RPLAY - strcat(support_str, " RPlay,"); -#endif #ifdef XPM strcat(support_str, " XPM,"); #endif diff --git a/libs/Fplay.h b/libs/Fplay.h deleted file mode 100644 index ac9e5db48..000000000 --- a/libs/Fplay.h +++ /dev/null @@ -1,375 +0,0 @@ -#ifndef FVWMLIB_FPLAY_H -#define FVWMLIB_FPLAY_H - -#ifdef HAVE_RPLAY -#define USE_FPLAY 1 -#else -#define USE_FPLAY 0 -#endif - -#if USE_FPLAY -# include -# undef M_ERROR /* Solaris fix */ - typedef RPLAY FPLAY; - typedef RPLAY_ATTRS FPLAY_ATTRS; - -# define FPLAY_DEFAULT_VALUE RPLAY_DEFAULT_VOLUME -# define FPLAY_DEFAULT_PRIORITY RPLAY_DEFAULT_PRIORITY -# define FPLAY_NULL RPLAY_NULL -# define FPLAY_PLAY RPLAY_PLAY -# define FPLAY_STOP RPLAY_STOP -# define FPLAY_PAUSE RPLAY_PAUSE -# define FPLAY_CONTINUE RPLAY_CONTINUE -# define FPLAY_SOUND RPLAY_SOUND -# define FPLAY_VOLUME RPLAY_VOLUME -# define FPLAY_NSOUNDS RPLAY_NSOUNDS -# define FPLAY_COMMAND RPLAY_COMMAND -# define FPLAY_APPEND RPLAY_APPEND -# define FPLAY_INSERT RPLAY_INSERT -# define FPLAY_DELETE RPLAY_DELETE -# define FPLAY_CHANGE RPLAY_CHANGE -# define FPLAY_COUNT RPLAY_COUNT -# define FPLAY_LIST_COUNT RPLAY_LIST_COUNT -# define FPLAY_PRIORITY RPLAY_PRIORITY -# define FPLAY_RANDOM_SOUND RPLAY_RANDOM_SOUND -# define FPLAY_PING RPLAY_PING -# define FPLAY_RPTP_SERVER RPLAY_RPTP_SERVER -# define FPLAY_RPTP_SERVER_PORT RPLAY_RPTP_SERVER_PORT -# define FPLAY_RPTP_SEARCH RPLAY_RPTP_SEARCH -# define FPLAY_RPTP_FROM_SENDER RPLAY_RPTP_FROM_SENDER -# define FPLAY_SAMPLE_RATE RPLAY_SAMPLE_RATE -# define FPLAY_RESET RPLAY_RESET -# define FPLAY_DONE RPLAY_DONE -# define FPLAY_CLIENT_DATA RPLAY_CLIENT_DATA -# define FPLAY_LIST_NAME RPLAY_LIST_NAME -# define FPLAY_PUT RPLAY_PUT -# define FPLAY_ID RPLAY_ID -# define FPLAY_SEQUENCE RPLAY_SEQUENCE -# define FPLAY_DATA RPLAY_DATA -# define FPLAY_DATA_SIZE RPLAY_DATA_SIZE -# define FPLAY_FORMAT_NONE RPLAY_FORMAT_NONE -# define FPLAY_FORMAT_LINEAR_8 RPLAY_FORMAT_LINEAR_8 -# define FPLAY_FORMAT_ULINEAR_8 RPLAY_FORMAT_ULINEAR_8 -# define FPLAY_FORMAT_LINEAR_16 RPLAY_FORMAT_LINEAR_16 -# define FPLAY_FORMAT_ULINEAR_16 RPLAY_FORMAT_ULINEAR_16 -# define FPLAY_FORMAT_ULAW RPLAY_FORMAT_ULAW -# define FPLAY_FORMAT_G721 RPLAY_FORMAT_G721 -# define FPLAY_FORMAT_G723_3 RPLAY_FORMAT_G723_3 -# define FPLAY_FORMAT_G723_5 RPLAY_FORMAT_G723_5 -# define FPLAY_FORMAT_GSM RPLAY_FORMAT_GSM -# define FPLAY_BIG_ENDIAN RPLAY_BIG_ENDIAN -# define FPLAY_LITTLE_ENDIAN RPLAY_LITTLE_ENDIAN -# define FPLAY_AUDIO_PORT_NONE RPLAY_AUDIO_PORT_NONE -# define FPLAY_AUDIO_PORT_SPEAKER RPLAY_AUDIO_PORT_SPEAKER -# define FPLAY_AUDIO_PORT_HEADPHONE RPLAY_AUDIO_PORT_HEADPHONE -# define FPLAY_AUDIO_PORT_LINEOUT RPLAY_AUDIO_PORT_LINEOUT -# define FPLAY_MIN_VOLUME RPLAY_MIN_VOLUME -# define FPLAY_MAX_VOLUME RPLAY_MAX_VOLUME -# define FPLAY_MIN_PRIORITY RPLAY_MIN_PRIORITY -# define FPLAY_MAX_PRIORITY RPLAY_MAX_PRIORITY -# define FPLAY_DEFAULT_VOLUME RPLAY_DEFAULT_VOLUME -# define FPLAY_DEFAULT_PRIORITY RPLAY_DEFAULT_PRIORITY -# define FPLAY_DEFAULT_COUNT RPLAY_DEFAULT_COUNT -# define FPLAY_DEFAULT_LIST_COUNT RPLAY_DEFAULT_LIST_COUNT -# define FPLAY_DEFAULT_RANDOM_SOUND RPLAY_DEFAULT_RANDOM_SOUND -# define FPLAY_DEFAULT_SAMPLE_RATE RPLAY_DEFAULT_SAMPLE_RATE -# define FPLAY_DEFAULT_OFFSET RPLAY_DEFAULT_OFFSET -# define FPLAY_DEFAULT_BYTE_ORDER RPLAY_DEFAULT_BYTE_ORDER -# define FPLAY_DEFAULT_CHANNELS RPLAY_DEFAULT_CHANNELS -# define FPLAY_DEFAULT_BITS RPLAY_DEFAULT_BITS -# define FPLAY_ERROR_NONE RPLAY_ERROR_NONE -# define FPLAY_ERROR_MEMORY RPLAY_ERROR_MEMORY -# define FPLAY_ERROR_HOST RPLAY_ERROR_HOST -# define FPLAY_ERROR_CONNECT RPLAY_ERROR_CONNECT -# define FPLAY_ERROR_SOCKET RPLAY_ERROR_SOCKET -# define FPLAY_ERROR_WRITE RPLAY_ERROR_WRITE -# define FPLAY_ERROR_CLOSE RPLAY_ERROR_CLOSE -# define FPLAY_ERROR_PACKET_SIZE RPLAY_ERROR_PACKET_SIZE -# define FPLAY_ERROR_BROADCAST RPLAY_ERROR_BROADCAST -# define FPLAY_ERROR_ATTRIBUTE RPLAY_ERROR_ATTRIBUTE -# define FPLAY_ERROR_COMMAND RPLAY_ERROR_COMMAND -# define FPLAY_ERROR_INDEX RPLAY_ERROR_INDEX -# define FPLAY_ERROR_MODIFIER RPLAY_ERROR_MODIFIER -# define FRPTP_ERROR_NONE RPTP_ERROR_NONE -# define FRPTP_ERROR_MEMORY RPTP_ERROR_MEMORY -# define FRPTP_ERROR_HOST RPTP_ERROR_HOST -# define FRPTP_ERROR_CONNECT RPTP_ERROR_CONNECT -# define FRPTP_ERROR_SOCKET RPTP_ERROR_SOCKET -# define FRPTP_ERROR_OPEN RPTP_ERROR_OPEN -# define FRPTP_ERROR_READ RPTP_ERROR_READ -# define FRPTP_ERROR_WRITE RPTP_ERROR_WRITE -# define FRPTP_ERROR_PING RPTP_ERROR_PING -# define FRPTP_ERROR_TIMEOUT RPTP_ERROR_TIMEOUT -# define FRPTP_ERROR_PROTOCOL RPTP_ERROR_PROTOCOL -# define FRPTP_ERROR RPTP_ERROR -# define FRPTP_OK RPTP_OK -# define FRPTP_TIMEOUT RPTP_TIMEOUT -# define FRPTP_NOTIFY RPTP_NOTIFY -# define FOLD_RPLAY_PLAY OLD_RPLAY_PLAY -# define FOLD_RPLAY_STOP OLD_RPLAY_STOP -# define FOLD_RPLAY_PAUSE OLD_RPLAY_PAUSE -# define FOLD_RPLAY_CONTINUE OLD_RPLAY_CONTINUE -# define FRPTP_ASYNC_READ RPTP_ASYNC_READ -# define FRPTP_ASYNC_WRITE RPTP_ASYNC_WRITE -# define FRPTP_ASYNC_RAW RPTP_ASYNC_RAW -# define FRPTP_ASYNC_ENABLE RPTP_ASYNC_ENABLE -# define FRPTP_ASYNC_DISABLE RPTP_ASYNC_DISABLE -# define FRPTP_EVENT_OK RPTP_EVENT_OK -# define FRPTP_EVENT_ERROR RPTP_EVENT_ERROR -# define FRPTP_EVENT_TIMEOUT RPTP_EVENT_TIMEOUT -# define FRPTP_EVENT_OTHER RPTP_EVENT_OTHER -# define FRPTP_EVENT_CONTINUE RPTP_EVENT_CONTINUE -# define FRPTP_EVENT_DONE RPTP_EVENT_DONE -# define FRPTP_EVENT_PAUSE RPTP_EVENT_PAUSE -# define FRPTP_EVENT_PLAY RPTP_EVENT_PLAY -# define FRPTP_EVENT_SKIP RPTP_EVENT_SKIP -# define FRPTP_EVENT_STATE RPTP_EVENT_STATE -# define FRPTP_EVENT_STOP RPTP_EVENT_STOP -# define FRPTP_EVENT_VOLUME RPTP_EVENT_VOLUME -# define FRPTP_EVENT_CLOSE RPTP_EVENT_CLOSE -# define FRPTP_EVENT_FLOW RPTP_EVENT_FLOW -# define FRPTP_EVENT_MODIFY RPTP_EVENT_MODIFY -# define FRPTP_EVENT_LEVEL RPTP_EVENT_LEVEL -# define FRPTP_EVENT_POSITION RPTP_EVENT_POSITION -# define FRPTP_EVENT_ALL RPTP_EVENT_ALL -# define FRPTP_MAX_ARGS RPTP_MAX_ARGS -# define FRPTP_MAX_LINE RPTP_MAX_LINE -# define FPLAY_PORT RPLAY_PORT -# define FRPTP_PORT RPTP_PORT -# define FOLD_RPLAY_PORT OLD_RPLAY_PORT -# define FOLD_RPTP_PORT OLD_RPTP_PORT -# define FPLAY_PACKET_ID RPLAY_PACKET_ID - -# define Fplay_errno rplay_errno -# define Frptp_errno rptp_errno - -# define Fplay(a,b) rplay(a,b) -# define Fplay_create(a) rplay_create(a) -# define Fplay_perror(a) rplay_perror(a) -/* variadict macros appeared in C99, so we can't use them */ -# define Fplay_set rplay_set -# define Fplay_get rplay_get -# define Frptp_putline rptp_putline -# define Frptp_async_putline rptp_async_putline -# define Fplay_destroy(a) rplay_destroy(a) -# define Fplay_default_host() rplay_default_host() -# define Fplay_display(a) rplay_display(a) -# define Fplay_host(a,b) rplay_host(a,b) -# define Fplay_host_volume(a,b,c) rplay_host_volume(a,b,c) -# define Fplay_local(a) rplay_local(a) -# define Fplay_open(a) rplay_open(a) -# define Fplay_open_default() rplay_open_default() -# define Fplay_open_display() rplay_open_display() -# define Fplay_open_port(a,b) rplay_open_port(a,b) -# define Fplay_open_sockaddr_in(a) rplay_open_sockaddr(a) -# define Fplay_ping(a) rplay_ping(a) -# define Fplay_ping_sockaddr_in(a) rplay_ping_sockaddr_in(a) -# define Fplay_ping_sockfd(a) rplay_ping_sockfd(a) -# define Fplay_close(a) rplay_close(a) -# define Fplay_sound(a,b) rplay_sound(a,b) -# define Fplay_default(a) rplay_default(a) -# define Fplay_convert(a) rplay_convert(a) -# define Fplay_pack(a) rplay_pack(a) -# define Fplay_unpack(a) rplay_unpack(a) -# define Frptp_open(a,b,c,d) rptp_open(a,b,c,d) -# define Frptp_read(a,b,c) rptp_read(a,b,c) -# define Frptp_write(a,b,c) rptp_write(a,b,c) -# define Frptp_close(a) rptp_close(a) -# define Frptp_perror(a) rptp_perror(a) -# define Frptp_getline(a,b,c) rptp_getline(a,b,c) -# define Frptp_command(a,b,c,d) rptp_command(a,b,c,d) -# define Frptp_parse(a,b) rptp_parse(a,b) -# define Frptp_async_write(a,b,c,d) rptp_async_write(a,b,c,d) -# define Frptp_async_register(a,b,c) rptp_async_register(a,b,c) -# define Frptp_async_notify(a,b,c) rptp_async_notify(a,b,c) -# define Frptp_async_process(a,b) rptp_async_process(a,b) -# define Frptp_main_loop() rptp_main_loop() -# define Frptp_stop_main_loop(a) rptp_stop_main_loop(a) -#else - typedef void FPLAY; - typedef void FPLAY_ATTRS; -# define FPLAY_DEFAULT_VALUE 0 -# define FPLAY_DEFAULT_PRIORITY 0 -# define FPLAY_NULL 0 -# define FPLAY_PLAY 0 -# define FPLAY_STOP 0 -# define FPLAY_PAUSE 0 -# define FPLAY_CONTINUE 0 -# define FPLAY_SOUND 0 -# define FPLAY_VOLUME 0 -# define FPLAY_NSOUNDS 0 -# define FPLAY_COMMAND 0 -# define FPLAY_APPEND 0 -# define FPLAY_INSERT 0 -# define FPLAY_DELETE 0 -# define FPLAY_CHANGE 0 -# define FPLAY_COUNT 0 -# define FPLAY_LIST_COUNT 0 -# define FPLAY_PRIORITY 0 -# define FPLAY_RANDOM_SOUND 0 -# define FPLAY_PING 0 -# define FPLAY_RPTP_SERVER 0 -# define FPLAY_RPTP_SERVER_PORT 0 -# define FPLAY_RPTP_SEARCH 0 -# define FPLAY_RPTP_FROM_SENDER 0 -# define FPLAY_SAMPLE_RATE 0 -# define FPLAY_RESET 0 -# define FPLAY_DONE 0 -# define FPLAY_CLIENT_DATA 0 -# define FPLAY_LIST_NAME 0 -# define FPLAY_PUT 0 -# define FPLAY_ID 0 -# define FPLAY_SEQUENCE 0 -# define FPLAY_DATA 0 -# define FPLAY_DATA_SIZE 0 -# define FPLAY_FORMAT_NONE 0 -# define FPLAY_FORMAT_LINEAR_8 0 -# define FPLAY_FORMAT_ULINEAR_8 0 -# define FPLAY_FORMAT_LINEAR_16 0 -# define FPLAY_FORMAT_ULINEAR_16 0 -# define FPLAY_FORMAT_ULAW 0 -# define FPLAY_FORMAT_G721 0 -# define FPLAY_FORMAT_G723_3 0 -# define FPLAY_FORMAT_G723_5 0 -# define FPLAY_FORMAT_GSM 0 -# define FPLAY_BIG_ENDIAN 0 -# define FPLAY_LITTLE_ENDIAN 0 -# define FPLAY_AUDIO_PORT_NONE 0 -# define FPLAY_AUDIO_PORT_SPEAKER 0 -# define FPLAY_AUDIO_PORT_HEADPHONE 0 -# define FPLAY_AUDIO_PORT_LINEOUT 0 -# define FPLAY_MIN_VOLUME 0 -# define FPLAY_MAX_VOLUME 0 -# define FPLAY_MIN_PRIORITY 0 -# define FPLAY_MAX_PRIORITY 0 -# define FPLAY_DEFAULT_VOLUME 0 -# define FPLAY_DEFAULT_PRIORITY 0 -# define FPLAY_DEFAULT_COUNT 0 -# define FPLAY_DEFAULT_LIST_COUNT 0 -# define FPLAY_DEFAULT_RANDOM_SOUND 0 -# define FPLAY_DEFAULT_SAMPLE_RATE 0 -# define FPLAY_DEFAULT_OFFSET 0 -# define FPLAY_DEFAULT_BYTE_ORDER 0 -# define FPLAY_DEFAULT_CHANNELS 0 -# define FPLAY_DEFAULT_BITS 0 -# define FPLAY_ERROR_NONE 0 -# define FPLAY_ERROR_MEMORY 0 -# define FPLAY_ERROR_HOST 0 -# define FPLAY_ERROR_CONNECT 0 -# define FPLAY_ERROR_SOCKET 0 -# define FPLAY_ERROR_WRITE 0 -# define FPLAY_ERROR_CLOSE 0 -# define FPLAY_ERROR_PACKET_SIZE 0 -# define FPLAY_ERROR_BROADCAST 0 -# define FPLAY_ERROR_ATTRIBUTE 0 -# define FPLAY_ERROR_COMMAND 0 -# define FPLAY_ERROR_INDEX 0 -# define FPLAY_ERROR_MODIFIER 0 -# define FRPTP_ERROR_NONE 0 -# define FRPTP_ERROR_MEMORY 0 -# define FRPTP_ERROR_HOST 0 -# define FRPTP_ERROR_CONNECT 0 -# define FRPTP_ERROR_SOCKET 0 -# define FRPTP_ERROR_OPEN 0 -# define FRPTP_ERROR_READ 0 -# define FRPTP_ERROR_WRITE 0 -# define FRPTP_ERROR_PING 0 -# define FRPTP_ERROR_TIMEOUT 0 -# define FRPTP_ERROR_PROTOCOL 0 -# define FRPTP_ERROR 0 -# define FRPTP_OK 0 -# define FRPTP_TIMEOUT 0 -# define FRPTP_NOTIFY 0 -# define FOLD_RPLAY_PLAY 0 -# define FOLD_RPLAY_STOP 0 -# define FOLD_RPLAY_PAUSE 0 -# define FOLD_RPLAY_CONTINUE 0 -# define FRPTP_ASYNC_READ 0 -# define FRPTP_ASYNC_WRITE 0 -# define FRPTP_ASYNC_RAW 0 -# define FRPTP_ASYNC_ENABLE 0 -# define FRPTP_ASYNC_DISABLE 0 -# define FRPTP_EVENT_OK 0 -# define FRPTP_EVENT_ERROR 0 -# define FRPTP_EVENT_TIMEOUT 0 -# define FRPTP_EVENT_OTHER 0 -# define FRPTP_EVENT_CONTINUE 0 -# define FRPTP_EVENT_DONE 0 -# define FRPTP_EVENT_PAUSE 0 -# define FRPTP_EVENT_PLAY 0 -# define FRPTP_EVENT_SKIP 0 -# define FRPTP_EVENT_STATE 0 -# define FRPTP_EVENT_STOP 0 -# define FRPTP_EVENT_VOLUME 0 -# define FRPTP_EVENT_CLOSE 0 -# define FRPTP_EVENT_FLOW 0 -# define FRPTP_EVENT_MODIFY 0 -# define FRPTP_EVENT_LEVEL 0 -# define FRPTP_EVENT_POSITION 0 -# define FRPTP_EVENT_ALL 0 -# define FRPTP_MAX_ARGS 0 -# define FRPTP_MAX_LINE 0 -# define FPLAY_PORT 0 -# define FRPTP_PORT 0 -# define FOLD_RPLAY_PORT 0 -# define FOLD_RPTP_PORT 0 -# define FPLAY_PACKET_ID 0 - -# define Fplay_errno 0 -# define Frptp_errno 0 - - -# define Fplay(a,b) 0 -# define Fplay_create(a) 0 -# define Fplay_perror(a) -/* variadict macros appeared in C99, so we can't use them. */ - static void Fplay_set(FPLAY *a, ...) {} - -/* TA: 20100403: These aren't being used anymore. */ -/* static int Fplay_get(FPLAY *a, ...) {return 0;} - static int Frptp_putline(int a, ...) {return 0;} -*/ -# define Frptp_async_putline Frptp_putline -/* -# define Fplay_set(...) -# define Fplay_get(...) 0 -# define Frptp_putline(...) 0 -# define Frptp_async_putline(...) 0 -*/ -# define Fplay_destroy(a) -# define Fplay_default_host() "" -# define Fplay_display(a) 0 -# define Fplay_host(a,b) 0 -# define Fplay_host_volume(a,b,c) 0 -# define Fplay_local(a) 0 -# define Fplay_open(a) -1 -# define Fplay_open_default() -1 -# define Fplay_open_display() -1 -# define Fplay_open_port(a,b) -1 -# define Fplay_open_sockaddr_in(a) -1 -# define Fplay_close(a) 0 -# define Fplay_ping(a) 0 -# define Fplay_ping_sockaddr_in(a) 0 -# define Fplay_ping_sockfd(a) 0 -# define Fplay_sound(a,b) 0 -# define Fplay_default(a) 0 -# define Fplay_convert(a) NULL -# define Fplay_pack(a) 0 -# define Fplay_unpack(a) 0 -# define Frptp_open(a,b,c,d) -1 -# define Frptp_read(a,b,c) 0 -# define Frptp_write(a,b,c) 0 -# define Frptp_close(a) 0 -# define Frptp_perror(a) -# define Frptp_getline(a,b,c) 0 -# define Frptp_command(a,b,c,d) 0 -# define Frptp_parse(a,b) NULL -# define Frptp_async_write(a,b,c,d) 0 -# define Frptp_async_register(a,b,c) -# define Frptp_async_notify(a,b,c) -# define Frptp_async_process(a,b) -# define Frptp_main_loop() 0 -# define Frptp_stop_main_loop(a) -#endif - -#endif diff --git a/libs/Makefile.am b/libs/Makefile.am index 0f4514284..a1fef392e 100644 --- a/libs/Makefile.am +++ b/libs/Makefile.am @@ -8,7 +8,7 @@ libfvwm3_a_SOURCES = \ CombineChars.h Cursor.h Event.h FBidi.h FEvent.h FGettext.h FImage.h \ FRender.h FRenderInit.h FRenderInterface.h FSMlib.h FScreen.h \ FShape.h FShm.h FTips.h Fcursor.h Fft.h FftInterface.h Ficonv.h \ - Flocale.h FlocaleCharset.h Fplay.h Fpng.h Fsvg.h Fxpm.h Grab.h \ + Flocale.h FlocaleCharset.h Fpng.h Fsvg.h Fxpm.h Grab.h \ Graphics.h Module.h Parse.h Picture.h PictureBase.h \ PictureDitherMatrice.h PictureGraphics.h PictureImageLoader.h \ PictureUtils.h Rectangles.h Strings.h System.h Target.h WinMagic.h \ diff --git a/modules/FvwmAnimate/Makefile.am b/modules/FvwmAnimate/Makefile.am index bd7529bb0..3466873b9 100644 --- a/modules/FvwmAnimate/Makefile.am +++ b/modules/FvwmAnimate/Makefile.am @@ -11,9 +11,9 @@ FvwmAnimate_DEPENDENCIES = $(top_builddir)/libs/libfvwm3.a ## Xpm note: while this module may not depend on Xpm explicitly, ## there are sometimes dependencies through functions in libfvwm ## so we might as well link against libXpm, if present. -LDADD = -L$(top_builddir)/libs $(X_LIBS) -lfvwm3 $(xpm_LIBS) $(rplay_LIBS) \ +LDADD = -L$(top_builddir)/libs $(X_LIBS) -lfvwm3 $(xpm_LIBS) \ $(X_PRE_LIBS) -lXext -lX11 $(X_EXTRA_LIBS) -lm $(png_LIBS) \ $(rsvg_LIBS) $(Xrender_LIBS) $(Xcursor_LIBS) -AM_CPPFLAGS = -I$(top_srcdir) $(xpm_CFLAGS) $(rplay_CFLAGS) $(X_CFLAGS) \ +AM_CPPFLAGS = -I$(top_srcdir) $(xpm_CFLAGS) $(X_CFLAGS) \ $(png_CFLAGS) $(Xrender_CFLAGS) diff --git a/modules/FvwmEvent/FvwmEvent.c b/modules/FvwmEvent/FvwmEvent.c index 7bce02abe..068713993 100644 --- a/modules/FvwmEvent/FvwmEvent.c +++ b/modules/FvwmEvent/FvwmEvent.c @@ -34,10 +34,6 @@ #include "config.h" #include -/* - * rplay includes: - */ -#include "libs/Fplay.h" #include "libs/Module.h" #include "libs/fvwmlib.h" @@ -59,7 +55,6 @@ #define BUILTIN_SHUTDOWN 1 #define BUILTIN_UNKNOWN 2 #define MAX_BUILTIN 3 -#define MAX_RPLAY_HOSTNAME_LEN MAX_MODULE_INPUT_TEXT_LEN #define SYNC_MASK_M (M_DESTROY_WINDOW | M_LOWER_WINDOW | \ M_RESTACK | M_CONFIGURE_WINDOW) #define SYNC_MASK_MX (M_EXTENDED_MSG) @@ -79,7 +74,6 @@ typedef struct union { char *action; - FPLAY *rplay; } action; } event_entry; @@ -190,7 +184,6 @@ static event_entry* event_tables[] = #undef EVENT_ENTRY -static int rplay_fd = -1; static unsigned int m_selected = 0; static unsigned int mx_selected = 0; static unsigned int m_sync = 0; @@ -427,20 +420,6 @@ int main(int argc, char **argv) */ void execute_event(event_entry *event_table, short event, unsigned long *body) { - /* this is the sign that rplay is used */ - if (rplay_fd != -1 && event_table[event].action.rplay != NULL) - { - if (Fplay(rplay_fd, event_table[event].action.rplay) >= 0) - { - last_time = now; - } - else - { - Fplay_perror("rplay"); - } - return; - } - if (event_table[event].action.action != NULL) { char *buf = NULL; @@ -526,9 +505,7 @@ void execute_event(event_entry *event_table, short event, unsigned long *body) * */ -static int volume = FPLAY_DEFAULT_VOLUME; -static int priority = FPLAY_DEFAULT_PRIORITY; -void handle_config_line(char *buf, char **phost) +void handle_config_line(char *buf) { char *event; char *action; @@ -544,10 +521,6 @@ void handle_config_line(char *buf, char **phost) "Delay", "Dir", "PassID", - "PlayCmd", - "RplayHost", - "RplayPriority", - "RplayVolume", "StartDelay" }; /* define entries here, if this list becomes unsorted, use FindToken */ @@ -561,18 +534,6 @@ void handle_config_line(char *buf, char **phost) token = PeekToken(p, &p); switch (e - (char**)table) { - case 4: - /* PlayCmd */ - if (!audio_compat) - { - /* PlayCmd */ - fvwm_debug(__func__, - "%s: PlayCmd supported only when" - " invoked as FvwmAudio\n", - MyName+1); - break; - } - /* fall through */ case 0: /* Cmd */ if (cmd_line) @@ -620,53 +581,7 @@ void handle_config_line(char *buf, char **phost) /* PassID */ PassID = True; break; - - case 5: - /* RPlayHost */ - if (*phost) - { - free(*phost); - *phost = NULL; - } - if (token && (*token == '$')) - { - /* Check for $HOSTDISPLAY */ - char *c1 = (char *)getenv(token + 1); - char *c2; - if (c1 != NULL) - { - *phost = fxstrdup(c1); - c2 = *phost; - while (c1 && *c1 != ':') - { - *c2++ = *c1++; - } - *c2 = '\0'; - } - } - else if (token) - { - *phost = fxstrdup(token); - } - break; - - case 6: - /* RplayPriority */ - if (token) - { - priority = atoi(token); - } - break; - - case 7: - /* RplayVolume */ - if (token) - { - volume = atoi(token); - } - break; - - case 8: + case 4: /* StartDelay */ if (token) { @@ -750,12 +665,6 @@ void handle_config_line(char *buf, char **phost) void config(void) { char *buf; - char *host = NULL; - - if (USE_FPLAY) - { - host = fxstrdup(Fplay_default_host()); - } /* get config lines with my name */ InitGetConfigLine(fd,MyName); @@ -770,50 +679,9 @@ void config(void) /* Search for MyName (normally *FvwmEvent) */ if (strncasecmp(buf, MyName, MyNameLen) == 0) { - handle_config_line(buf, &host); + handle_config_line(buf); } } - - /* Builtin rplay support is enabled when - * FvwmAudioPlayCmd == builtin-rplay. */ - if (USE_FPLAY && StrEquals(cmd_line, "builtin-rplay")) - { - event_entry **event_table; - - if ((rplay_fd = Fplay_open(host)) < 0) - { - Fplay_perror("rplay_open"); - exit(1); - } - /* change actions to rplay objects */ - event_table = event_tables; - while(*event_table != NULL) - { - event_entry *loop_event; - for (loop_event = *event_table; - loop_event->name != NULL; loop_event++) - { - if (loop_event->action.action != NULL) - { - char *tmp_action; - tmp_action = loop_event->action.action; - loop_event->action.rplay = - Fplay_create( - FPLAY_PLAY); - Fplay_set( - loop_event->action.rplay, - FPLAY_APPEND, - FPLAY_SOUND, tmp_action, - FPLAY_PRIORITY, priority, - FPLAY_VOLUME, volume, NULL); - free(tmp_action); - } - } - event_table++; - } - } - - return; } /* diff --git a/modules/FvwmEvent/Makefile.am b/modules/FvwmEvent/Makefile.am index 0c055e1a3..1a42f20f4 100644 --- a/modules/FvwmEvent/Makefile.am +++ b/modules/FvwmEvent/Makefile.am @@ -8,19 +8,7 @@ moduleexec_PROGRAMS = FvwmEvent FvwmEvent_SOURCES = FvwmEvent.c FvwmEvent_DEPENDENCIES = $(top_builddir)/libs/libfvwm3.a -# This module behaves like the old FvwmAudio when invoked with that name. -install-exec-local: ../../config.h Makefile - $(mkinstalldirs) $(DESTDIR)$(moduleexecdir) - rm -f $(DESTDIR)$(moduleexecdir)/FvwmAudio - @_fe=`echo FvwmEvent|sed 's/$(EXEEXT)$$//'|sed '$(transform)'|sed 's/$$/$(EXEEXT)/'`; \ - _fa=`echo FvwmAudio|sed 's/$(EXEEXT)$$//'|sed '$(transform)'|sed 's/$$/$(EXEEXT)/'`; \ - echo " $(LN_S) $$_fe $(DESTDIR)$(moduleexecdir)/$$_fa"; \ - $(LN_S) "$$_fe" $(DESTDIR)$(moduleexecdir)/"$$_fa" || true - -uninstall-local: - @rm -f $(DESTDIR)$(moduleexecdir)/FvwmAudio - -LDADD = -L$(top_builddir)/libs $(X_LIBS) -lfvwm3 $(rplay_LIBS) \ +LDADD = -L$(top_builddir)/libs $(X_LIBS) -lfvwm3 \ $(X_PRE_LIBS) -lXext -lX11 $(X_EXTRA_LIBS) -AM_CPPFLAGS = -I$(top_srcdir) $(rplay_CFLAGS) $(X_CFLAGS) +AM_CPPFLAGS = -I$(top_srcdir) $(X_CFLAGS)