annotate audacious/genevent.c @ 1857:2ed05cc57194 trunk

[svn] - add mainwinMinimizeX, mainwinMinimizeY, mainwinShadeX, mainwinShadeY, mainwinCloseX, mainwinCloseY - make Osmosis mainwin 425x100 instead of 425x105 - reposition the minimize, shade and close buttons on the Osmosis skin.
author nenolod
date Wed, 11 Oct 2006 18:23:22 -0700
parents a6e6d3500c13
children bc47a2129067
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
197
ccd034857702 [svn] Split up generic events into audcore_generic_events(), and client-specific stuff remains in mainwin_idle_func().
nenolod
parents:
diff changeset
1 /* Audacious - Cross-platform multimedia platform.
ccd034857702 [svn] Split up generic events into audcore_generic_events(), and client-specific stuff remains in mainwin_idle_func().
nenolod
parents:
diff changeset
2 * Copyright (C) 2005 Audacious development team.
ccd034857702 [svn] Split up generic events into audcore_generic_events(), and client-specific stuff remains in mainwin_idle_func().
nenolod
parents:
diff changeset
3 *
ccd034857702 [svn] Split up generic events into audcore_generic_events(), and client-specific stuff remains in mainwin_idle_func().
nenolod
parents:
diff changeset
4 * Based on BMP:
ccd034857702 [svn] Split up generic events into audcore_generic_events(), and client-specific stuff remains in mainwin_idle_func().
nenolod
parents:
diff changeset
5 * Copyright (C) 2003-2004 BMP development team.
ccd034857702 [svn] Split up generic events into audcore_generic_events(), and client-specific stuff remains in mainwin_idle_func().
nenolod
parents:
diff changeset
6 *
ccd034857702 [svn] Split up generic events into audcore_generic_events(), and client-specific stuff remains in mainwin_idle_func().
nenolod
parents:
diff changeset
7 * Based on XMMS:
ccd034857702 [svn] Split up generic events into audcore_generic_events(), and client-specific stuff remains in mainwin_idle_func().
nenolod
parents:
diff changeset
8 * Copyright (C) 1998-2003 XMMS development team.
ccd034857702 [svn] Split up generic events into audcore_generic_events(), and client-specific stuff remains in mainwin_idle_func().
nenolod
parents:
diff changeset
9 *
ccd034857702 [svn] Split up generic events into audcore_generic_events(), and client-specific stuff remains in mainwin_idle_func().
nenolod
parents:
diff changeset
10 * This program is free software; you can redistribute it and/or modify
ccd034857702 [svn] Split up generic events into audcore_generic_events(), and client-specific stuff remains in mainwin_idle_func().
nenolod
parents:
diff changeset
11 * it under the terms of the GNU General Public License as published by
ccd034857702 [svn] Split up generic events into audcore_generic_events(), and client-specific stuff remains in mainwin_idle_func().
nenolod
parents:
diff changeset
12 * the Free Software Foundation; either version 2 of the License, or
ccd034857702 [svn] Split up generic events into audcore_generic_events(), and client-specific stuff remains in mainwin_idle_func().
nenolod
parents:
diff changeset
13 * (at your option) any later version.
ccd034857702 [svn] Split up generic events into audcore_generic_events(), and client-specific stuff remains in mainwin_idle_func().
nenolod
parents:
diff changeset
14 *
ccd034857702 [svn] Split up generic events into audcore_generic_events(), and client-specific stuff remains in mainwin_idle_func().
nenolod
parents:
diff changeset
15 * This program is distributed in the hope that it will be useful,
ccd034857702 [svn] Split up generic events into audcore_generic_events(), and client-specific stuff remains in mainwin_idle_func().
nenolod
parents:
diff changeset
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
ccd034857702 [svn] Split up generic events into audcore_generic_events(), and client-specific stuff remains in mainwin_idle_func().
nenolod
parents:
diff changeset
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
ccd034857702 [svn] Split up generic events into audcore_generic_events(), and client-specific stuff remains in mainwin_idle_func().
nenolod
parents:
diff changeset
18 * GNU General Public License for more details.
ccd034857702 [svn] Split up generic events into audcore_generic_events(), and client-specific stuff remains in mainwin_idle_func().
nenolod
parents:
diff changeset
19 *
ccd034857702 [svn] Split up generic events into audcore_generic_events(), and client-specific stuff remains in mainwin_idle_func().
nenolod
parents:
diff changeset
20 * You should have received a copy of the GNU General Public License
ccd034857702 [svn] Split up generic events into audcore_generic_events(), and client-specific stuff remains in mainwin_idle_func().
nenolod
parents:
diff changeset
21 * along with this program; if not, write to the Free Software
1459
705d4c089fce [svn] Fix postal code.
chainsaw
parents: 1458
diff changeset
22 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
197
ccd034857702 [svn] Split up generic events into audcore_generic_events(), and client-specific stuff remains in mainwin_idle_func().
nenolod
parents:
diff changeset
23 */
ccd034857702 [svn] Split up generic events into audcore_generic_events(), and client-specific stuff remains in mainwin_idle_func().
nenolod
parents:
diff changeset
24
ccd034857702 [svn] Split up generic events into audcore_generic_events(), and client-specific stuff remains in mainwin_idle_func().
nenolod
parents:
diff changeset
25 #ifdef HAVE_CONFIG_H
ccd034857702 [svn] Split up generic events into audcore_generic_events(), and client-specific stuff remains in mainwin_idle_func().
nenolod
parents:
diff changeset
26 # include "config.h"
ccd034857702 [svn] Split up generic events into audcore_generic_events(), and client-specific stuff remains in mainwin_idle_func().
nenolod
parents:
diff changeset
27 #endif
ccd034857702 [svn] Split up generic events into audcore_generic_events(), and client-specific stuff remains in mainwin_idle_func().
nenolod
parents:
diff changeset
28
ccd034857702 [svn] Split up generic events into audcore_generic_events(), and client-specific stuff remains in mainwin_idle_func().
nenolod
parents:
diff changeset
29 #include "main.h"
ccd034857702 [svn] Split up generic events into audcore_generic_events(), and client-specific stuff remains in mainwin_idle_func().
nenolod
parents:
diff changeset
30
ccd034857702 [svn] Split up generic events into audcore_generic_events(), and client-specific stuff remains in mainwin_idle_func().
nenolod
parents:
diff changeset
31 #include <glib.h>
ccd034857702 [svn] Split up generic events into audcore_generic_events(), and client-specific stuff remains in mainwin_idle_func().
nenolod
parents:
diff changeset
32 #include <glib/gi18n.h>
ccd034857702 [svn] Split up generic events into audcore_generic_events(), and client-specific stuff remains in mainwin_idle_func().
nenolod
parents:
diff changeset
33 #include <glib/gprintf.h>
ccd034857702 [svn] Split up generic events into audcore_generic_events(), and client-specific stuff remains in mainwin_idle_func().
nenolod
parents:
diff changeset
34 #include <gdk/gdk.h>
ccd034857702 [svn] Split up generic events into audcore_generic_events(), and client-specific stuff remains in mainwin_idle_func().
nenolod
parents:
diff changeset
35 #include <stdlib.h>
ccd034857702 [svn] Split up generic events into audcore_generic_events(), and client-specific stuff remains in mainwin_idle_func().
nenolod
parents:
diff changeset
36 #include <string.h>
ccd034857702 [svn] Split up generic events into audcore_generic_events(), and client-specific stuff remains in mainwin_idle_func().
nenolod
parents:
diff changeset
37 #include <getopt.h>
ccd034857702 [svn] Split up generic events into audcore_generic_events(), and client-specific stuff remains in mainwin_idle_func().
nenolod
parents:
diff changeset
38 #include <ctype.h>
ccd034857702 [svn] Split up generic events into audcore_generic_events(), and client-specific stuff remains in mainwin_idle_func().
nenolod
parents:
diff changeset
39 #include <time.h>
ccd034857702 [svn] Split up generic events into audcore_generic_events(), and client-specific stuff remains in mainwin_idle_func().
nenolod
parents:
diff changeset
40
ccd034857702 [svn] Split up generic events into audcore_generic_events(), and client-specific stuff remains in mainwin_idle_func().
nenolod
parents:
diff changeset
41 #include <unistd.h>
ccd034857702 [svn] Split up generic events into audcore_generic_events(), and client-specific stuff remains in mainwin_idle_func().
nenolod
parents:
diff changeset
42 #include <errno.h>
ccd034857702 [svn] Split up generic events into audcore_generic_events(), and client-specific stuff remains in mainwin_idle_func().
nenolod
parents:
diff changeset
43 #include <sys/types.h>
ccd034857702 [svn] Split up generic events into audcore_generic_events(), and client-specific stuff remains in mainwin_idle_func().
nenolod
parents:
diff changeset
44 #include <sys/stat.h>
ccd034857702 [svn] Split up generic events into audcore_generic_events(), and client-specific stuff remains in mainwin_idle_func().
nenolod
parents:
diff changeset
45 #include <signal.h>
ccd034857702 [svn] Split up generic events into audcore_generic_events(), and client-specific stuff remains in mainwin_idle_func().
nenolod
parents:
diff changeset
46
ccd034857702 [svn] Split up generic events into audcore_generic_events(), and client-specific stuff remains in mainwin_idle_func().
nenolod
parents:
diff changeset
47 #include "libaudacious/configdb.h"
ccd034857702 [svn] Split up generic events into audcore_generic_events(), and client-specific stuff remains in mainwin_idle_func().
nenolod
parents:
diff changeset
48 #include "libaudacious/beepctrl.h"
ccd034857702 [svn] Split up generic events into audcore_generic_events(), and client-specific stuff remains in mainwin_idle_func().
nenolod
parents:
diff changeset
49 #include "libaudacious/util.h"
ccd034857702 [svn] Split up generic events into audcore_generic_events(), and client-specific stuff remains in mainwin_idle_func().
nenolod
parents:
diff changeset
50 #include "libaudacious/vfs.h"
ccd034857702 [svn] Split up generic events into audcore_generic_events(), and client-specific stuff remains in mainwin_idle_func().
nenolod
parents:
diff changeset
51
ccd034857702 [svn] Split up generic events into audcore_generic_events(), and client-specific stuff remains in mainwin_idle_func().
nenolod
parents:
diff changeset
52 #include "controlsocket.h"
ccd034857702 [svn] Split up generic events into audcore_generic_events(), and client-specific stuff remains in mainwin_idle_func().
nenolod
parents:
diff changeset
53 #include "dnd.h"
ccd034857702 [svn] Split up generic events into audcore_generic_events(), and client-specific stuff remains in mainwin_idle_func().
nenolod
parents:
diff changeset
54 #include "effect.h"
1653
a6e6d3500c13 [svn] - revert back to r2216
nenolod
parents: 1649
diff changeset
55 #include "equalizer.h"
197
ccd034857702 [svn] Split up generic events into audcore_generic_events(), and client-specific stuff remains in mainwin_idle_func().
nenolod
parents:
diff changeset
56 #include "general.h"
ccd034857702 [svn] Split up generic events into audcore_generic_events(), and client-specific stuff remains in mainwin_idle_func().
nenolod
parents:
diff changeset
57 #include "hints.h"
ccd034857702 [svn] Split up generic events into audcore_generic_events(), and client-specific stuff remains in mainwin_idle_func().
nenolod
parents:
diff changeset
58 #include "input.h"
ccd034857702 [svn] Split up generic events into audcore_generic_events(), and client-specific stuff remains in mainwin_idle_func().
nenolod
parents:
diff changeset
59 #include "logger.h"
1653
a6e6d3500c13 [svn] - revert back to r2216
nenolod
parents: 1649
diff changeset
60 #include "mainwin.h"
197
ccd034857702 [svn] Split up generic events into audcore_generic_events(), and client-specific stuff remains in mainwin_idle_func().
nenolod
parents:
diff changeset
61 #include "output.h"
538
e4e897d20791 [svn] remove libaudcore, we never did anything with it
nenolod
parents: 383
diff changeset
62 #include "playback.h"
197
ccd034857702 [svn] Split up generic events into audcore_generic_events(), and client-specific stuff remains in mainwin_idle_func().
nenolod
parents:
diff changeset
63 #include "playlist.h"
1653
a6e6d3500c13 [svn] - revert back to r2216
nenolod
parents: 1649
diff changeset
64 #include "ui_playlist.h"
197
ccd034857702 [svn] Split up generic events into audcore_generic_events(), and client-specific stuff remains in mainwin_idle_func().
nenolod
parents:
diff changeset
65 #include "pluginenum.h"
ccd034857702 [svn] Split up generic events into audcore_generic_events(), and client-specific stuff remains in mainwin_idle_func().
nenolod
parents:
diff changeset
66 #include "prefswin.h"
ccd034857702 [svn] Split up generic events into audcore_generic_events(), and client-specific stuff remains in mainwin_idle_func().
nenolod
parents:
diff changeset
67 #include "skinwin.h"
ccd034857702 [svn] Split up generic events into audcore_generic_events(), and client-specific stuff remains in mainwin_idle_func().
nenolod
parents:
diff changeset
68 #include "util.h"
ccd034857702 [svn] Split up generic events into audcore_generic_events(), and client-specific stuff remains in mainwin_idle_func().
nenolod
parents:
diff changeset
69 #include "visualization.h"
ccd034857702 [svn] Split up generic events into audcore_generic_events(), and client-specific stuff remains in mainwin_idle_func().
nenolod
parents:
diff changeset
70
ccd034857702 [svn] Split up generic events into audcore_generic_events(), and client-specific stuff remains in mainwin_idle_func().
nenolod
parents:
diff changeset
71 gboolean ev_waiting = FALSE;
ccd034857702 [svn] Split up generic events into audcore_generic_events(), and client-specific stuff remains in mainwin_idle_func().
nenolod
parents:
diff changeset
72
ccd034857702 [svn] Split up generic events into audcore_generic_events(), and client-specific stuff remains in mainwin_idle_func().
nenolod
parents:
diff changeset
73 static gboolean
ccd034857702 [svn] Split up generic events into audcore_generic_events(), and client-specific stuff remains in mainwin_idle_func().
nenolod
parents:
diff changeset
74 idle_func_change_song(gboolean waiting)
ccd034857702 [svn] Split up generic events into audcore_generic_events(), and client-specific stuff remains in mainwin_idle_func().
nenolod
parents:
diff changeset
75 {
ccd034857702 [svn] Split up generic events into audcore_generic_events(), and client-specific stuff remains in mainwin_idle_func().
nenolod
parents:
diff changeset
76 static GTimer *pause_timer = NULL;
ccd034857702 [svn] Split up generic events into audcore_generic_events(), and client-specific stuff remains in mainwin_idle_func().
nenolod
parents:
diff changeset
77
ccd034857702 [svn] Split up generic events into audcore_generic_events(), and client-specific stuff remains in mainwin_idle_func().
nenolod
parents:
diff changeset
78 if (!pause_timer)
ccd034857702 [svn] Split up generic events into audcore_generic_events(), and client-specific stuff remains in mainwin_idle_func().
nenolod
parents:
diff changeset
79 pause_timer = g_timer_new();
ccd034857702 [svn] Split up generic events into audcore_generic_events(), and client-specific stuff remains in mainwin_idle_func().
nenolod
parents:
diff changeset
80
ccd034857702 [svn] Split up generic events into audcore_generic_events(), and client-specific stuff remains in mainwin_idle_func().
nenolod
parents:
diff changeset
81 if (cfg.pause_between_songs) {
ccd034857702 [svn] Split up generic events into audcore_generic_events(), and client-specific stuff remains in mainwin_idle_func().
nenolod
parents:
diff changeset
82 gint timeleft;
ccd034857702 [svn] Split up generic events into audcore_generic_events(), and client-specific stuff remains in mainwin_idle_func().
nenolod
parents:
diff changeset
83
ccd034857702 [svn] Split up generic events into audcore_generic_events(), and client-specific stuff remains in mainwin_idle_func().
nenolod
parents:
diff changeset
84 if (!waiting) {
ccd034857702 [svn] Split up generic events into audcore_generic_events(), and client-specific stuff remains in mainwin_idle_func().
nenolod
parents:
diff changeset
85 g_timer_start(pause_timer);
ccd034857702 [svn] Split up generic events into audcore_generic_events(), and client-specific stuff remains in mainwin_idle_func().
nenolod
parents:
diff changeset
86 waiting = TRUE;
ccd034857702 [svn] Split up generic events into audcore_generic_events(), and client-specific stuff remains in mainwin_idle_func().
nenolod
parents:
diff changeset
87 }
ccd034857702 [svn] Split up generic events into audcore_generic_events(), and client-specific stuff remains in mainwin_idle_func().
nenolod
parents:
diff changeset
88
ccd034857702 [svn] Split up generic events into audcore_generic_events(), and client-specific stuff remains in mainwin_idle_func().
nenolod
parents:
diff changeset
89 timeleft = cfg.pause_between_songs_time -
ccd034857702 [svn] Split up generic events into audcore_generic_events(), and client-specific stuff remains in mainwin_idle_func().
nenolod
parents:
diff changeset
90 (gint) g_timer_elapsed(pause_timer, NULL);
ccd034857702 [svn] Split up generic events into audcore_generic_events(), and client-specific stuff remains in mainwin_idle_func().
nenolod
parents:
diff changeset
91
ccd034857702 [svn] Split up generic events into audcore_generic_events(), and client-specific stuff remains in mainwin_idle_func().
nenolod
parents:
diff changeset
92 if (mainwin_10min_num != NULL) {
ccd034857702 [svn] Split up generic events into audcore_generic_events(), and client-specific stuff remains in mainwin_idle_func().
nenolod
parents:
diff changeset
93 number_set_number(mainwin_10min_num, timeleft / 600);
ccd034857702 [svn] Split up generic events into audcore_generic_events(), and client-specific stuff remains in mainwin_idle_func().
nenolod
parents:
diff changeset
94 number_set_number(mainwin_min_num, (timeleft / 60) % 10);
ccd034857702 [svn] Split up generic events into audcore_generic_events(), and client-specific stuff remains in mainwin_idle_func().
nenolod
parents:
diff changeset
95 number_set_number(mainwin_10sec_num, (timeleft / 10) % 6);
ccd034857702 [svn] Split up generic events into audcore_generic_events(), and client-specific stuff remains in mainwin_idle_func().
nenolod
parents:
diff changeset
96 number_set_number(mainwin_sec_num, timeleft % 10);
ccd034857702 [svn] Split up generic events into audcore_generic_events(), and client-specific stuff remains in mainwin_idle_func().
nenolod
parents:
diff changeset
97 }
ccd034857702 [svn] Split up generic events into audcore_generic_events(), and client-specific stuff remains in mainwin_idle_func().
nenolod
parents:
diff changeset
98
ccd034857702 [svn] Split up generic events into audcore_generic_events(), and client-specific stuff remains in mainwin_idle_func().
nenolod
parents:
diff changeset
99 if (mainwin_sposition != NULL && !mainwin_sposition->hs_pressed) {
ccd034857702 [svn] Split up generic events into audcore_generic_events(), and client-specific stuff remains in mainwin_idle_func().
nenolod
parents:
diff changeset
100 gchar time_str[5];
ccd034857702 [svn] Split up generic events into audcore_generic_events(), and client-specific stuff remains in mainwin_idle_func().
nenolod
parents:
diff changeset
101
ccd034857702 [svn] Split up generic events into audcore_generic_events(), and client-specific stuff remains in mainwin_idle_func().
nenolod
parents:
diff changeset
102 g_snprintf(time_str, sizeof(time_str), "%2.2d", timeleft / 60);
ccd034857702 [svn] Split up generic events into audcore_generic_events(), and client-specific stuff remains in mainwin_idle_func().
nenolod
parents:
diff changeset
103 textbox_set_text(mainwin_stime_min, time_str);
ccd034857702 [svn] Split up generic events into audcore_generic_events(), and client-specific stuff remains in mainwin_idle_func().
nenolod
parents:
diff changeset
104
ccd034857702 [svn] Split up generic events into audcore_generic_events(), and client-specific stuff remains in mainwin_idle_func().
nenolod
parents:
diff changeset
105 g_snprintf(time_str, sizeof(time_str), "%2.2d", timeleft % 60);
ccd034857702 [svn] Split up generic events into audcore_generic_events(), and client-specific stuff remains in mainwin_idle_func().
nenolod
parents:
diff changeset
106 textbox_set_text(mainwin_stime_sec, time_str);
ccd034857702 [svn] Split up generic events into audcore_generic_events(), and client-specific stuff remains in mainwin_idle_func().
nenolod
parents:
diff changeset
107 }
ccd034857702 [svn] Split up generic events into audcore_generic_events(), and client-specific stuff remains in mainwin_idle_func().
nenolod
parents:
diff changeset
108
ccd034857702 [svn] Split up generic events into audcore_generic_events(), and client-specific stuff remains in mainwin_idle_func().
nenolod
parents:
diff changeset
109 playlistwin_set_time(timeleft * 1000, 0, TIMER_ELAPSED);
ccd034857702 [svn] Split up generic events into audcore_generic_events(), and client-specific stuff remains in mainwin_idle_func().
nenolod
parents:
diff changeset
110 }
ccd034857702 [svn] Split up generic events into audcore_generic_events(), and client-specific stuff remains in mainwin_idle_func().
nenolod
parents:
diff changeset
111
ccd034857702 [svn] Split up generic events into audcore_generic_events(), and client-specific stuff remains in mainwin_idle_func().
nenolod
parents:
diff changeset
112 if (!cfg.pause_between_songs ||
ccd034857702 [svn] Split up generic events into audcore_generic_events(), and client-specific stuff remains in mainwin_idle_func().
nenolod
parents:
diff changeset
113 g_timer_elapsed(pause_timer, NULL) >= cfg.pause_between_songs_time) {
ccd034857702 [svn] Split up generic events into audcore_generic_events(), and client-specific stuff remains in mainwin_idle_func().
nenolod
parents:
diff changeset
114
ccd034857702 [svn] Split up generic events into audcore_generic_events(), and client-specific stuff remains in mainwin_idle_func().
nenolod
parents:
diff changeset
115 GDK_THREADS_ENTER();
ccd034857702 [svn] Split up generic events into audcore_generic_events(), and client-specific stuff remains in mainwin_idle_func().
nenolod
parents:
diff changeset
116 playlist_eof_reached();
ccd034857702 [svn] Split up generic events into audcore_generic_events(), and client-specific stuff remains in mainwin_idle_func().
nenolod
parents:
diff changeset
117 GDK_THREADS_LEAVE();
ccd034857702 [svn] Split up generic events into audcore_generic_events(), and client-specific stuff remains in mainwin_idle_func().
nenolod
parents:
diff changeset
118
ccd034857702 [svn] Split up generic events into audcore_generic_events(), and client-specific stuff remains in mainwin_idle_func().
nenolod
parents:
diff changeset
119 waiting = FALSE;
ccd034857702 [svn] Split up generic events into audcore_generic_events(), and client-specific stuff remains in mainwin_idle_func().
nenolod
parents:
diff changeset
120 }
ccd034857702 [svn] Split up generic events into audcore_generic_events(), and client-specific stuff remains in mainwin_idle_func().
nenolod
parents:
diff changeset
121
ccd034857702 [svn] Split up generic events into audcore_generic_events(), and client-specific stuff remains in mainwin_idle_func().
nenolod
parents:
diff changeset
122 return waiting;
ccd034857702 [svn] Split up generic events into audcore_generic_events(), and client-specific stuff remains in mainwin_idle_func().
nenolod
parents:
diff changeset
123 }
ccd034857702 [svn] Split up generic events into audcore_generic_events(), and client-specific stuff remains in mainwin_idle_func().
nenolod
parents:
diff changeset
124
ccd034857702 [svn] Split up generic events into audcore_generic_events(), and client-specific stuff remains in mainwin_idle_func().
nenolod
parents:
diff changeset
125 gint
ccd034857702 [svn] Split up generic events into audcore_generic_events(), and client-specific stuff remains in mainwin_idle_func().
nenolod
parents:
diff changeset
126 audcore_generic_events(void)
ccd034857702 [svn] Split up generic events into audcore_generic_events(), and client-specific stuff remains in mainwin_idle_func().
nenolod
parents:
diff changeset
127 {
ccd034857702 [svn] Split up generic events into audcore_generic_events(), and client-specific stuff remains in mainwin_idle_func().
nenolod
parents:
diff changeset
128 gint time = 0;
ccd034857702 [svn] Split up generic events into audcore_generic_events(), and client-specific stuff remains in mainwin_idle_func().
nenolod
parents:
diff changeset
129
216
f31b2fc0f49d [svn] Add ctrlsocket_check to generic event loop.
nenolod
parents: 197
diff changeset
130 ctrlsocket_check();
f31b2fc0f49d [svn] Add ctrlsocket_check to generic event loop.
nenolod
parents: 197
diff changeset
131
197
ccd034857702 [svn] Split up generic events into audcore_generic_events(), and client-specific stuff remains in mainwin_idle_func().
nenolod
parents:
diff changeset
132 if (bmp_playback_get_playing()) {
ccd034857702 [svn] Split up generic events into audcore_generic_events(), and client-specific stuff remains in mainwin_idle_func().
nenolod
parents:
diff changeset
133 time = bmp_playback_get_time();
ccd034857702 [svn] Split up generic events into audcore_generic_events(), and client-specific stuff remains in mainwin_idle_func().
nenolod
parents:
diff changeset
134
ccd034857702 [svn] Split up generic events into audcore_generic_events(), and client-specific stuff remains in mainwin_idle_func().
nenolod
parents:
diff changeset
135 switch (time) {
ccd034857702 [svn] Split up generic events into audcore_generic_events(), and client-specific stuff remains in mainwin_idle_func().
nenolod
parents:
diff changeset
136 case -1:
ccd034857702 [svn] Split up generic events into audcore_generic_events(), and client-specific stuff remains in mainwin_idle_func().
nenolod
parents:
diff changeset
137 /* no song playing */
ccd034857702 [svn] Split up generic events into audcore_generic_events(), and client-specific stuff remains in mainwin_idle_func().
nenolod
parents:
diff changeset
138 ev_waiting = idle_func_change_song(ev_waiting);
ccd034857702 [svn] Split up generic events into audcore_generic_events(), and client-specific stuff remains in mainwin_idle_func().
nenolod
parents:
diff changeset
139 break;
ccd034857702 [svn] Split up generic events into audcore_generic_events(), and client-specific stuff remains in mainwin_idle_func().
nenolod
parents:
diff changeset
140
ccd034857702 [svn] Split up generic events into audcore_generic_events(), and client-specific stuff remains in mainwin_idle_func().
nenolod
parents:
diff changeset
141 default:
ccd034857702 [svn] Split up generic events into audcore_generic_events(), and client-specific stuff remains in mainwin_idle_func().
nenolod
parents:
diff changeset
142 ev_waiting = FALSE;
ccd034857702 [svn] Split up generic events into audcore_generic_events(), and client-specific stuff remains in mainwin_idle_func().
nenolod
parents:
diff changeset
143 }
ccd034857702 [svn] Split up generic events into audcore_generic_events(), and client-specific stuff remains in mainwin_idle_func().
nenolod
parents:
diff changeset
144 }
ccd034857702 [svn] Split up generic events into audcore_generic_events(), and client-specific stuff remains in mainwin_idle_func().
nenolod
parents:
diff changeset
145
ccd034857702 [svn] Split up generic events into audcore_generic_events(), and client-specific stuff remains in mainwin_idle_func().
nenolod
parents:
diff changeset
146 return time;
ccd034857702 [svn] Split up generic events into audcore_generic_events(), and client-specific stuff remains in mainwin_idle_func().
nenolod
parents:
diff changeset
147 }
ccd034857702 [svn] Split up generic events into audcore_generic_events(), and client-specific stuff remains in mainwin_idle_func().
nenolod
parents:
diff changeset
148