Mercurial > audlegacy
annotate audacious/genevent.c @ 1408:8accd819fa5e trunk
[svn] - bump to version 1.1.1
author | nenolod |
---|---|
date | Sat, 15 Jul 2006 16:47:58 -0700 |
parents | de6e77a1ef79 |
children | f12d7e208b43 |
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 |
ccd034857702
[svn] Split up generic events into audcore_generic_events(), and client-specific stuff remains in mainwin_idle_func().
nenolod
parents:
diff
changeset
|
22 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. |
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 #include <gdk/gdkx.h> |
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 <X11/Xlib.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 <X11/Xatom.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 |
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/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
|
51 #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
|
52 #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
|
53 #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
|
54 |
ccd034857702
[svn] Split up generic events into audcore_generic_events(), and client-specific stuff remains in mainwin_idle_func().
nenolod
parents:
diff
changeset
|
55 #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
|
56 #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
|
57 #include "effect.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 "equalizer.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 "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
|
60 #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
|
61 #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
|
62 #include "logger.h" |
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 "mainwin.h" |
ccd034857702
[svn] Split up generic events into audcore_generic_events(), and client-specific stuff remains in mainwin_idle_func().
nenolod
parents:
diff
changeset
|
64 #include "output.h" |
538
e4e897d20791
[svn] remove libaudcore, we never did anything with it
nenolod
parents:
383
diff
changeset
|
65 #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
|
66 #include "playlist.h" |
383 | 67 #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
|
68 #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
|
69 #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
|
70 #include "skin.h" |
ccd034857702
[svn] Split up generic events into audcore_generic_events(), and client-specific stuff remains in mainwin_idle_func().
nenolod
parents:
diff
changeset
|
71 #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
|
72 #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
|
73 #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
|
74 |
ccd034857702
[svn] Split up generic events into audcore_generic_events(), and client-specific stuff remains in mainwin_idle_func().
nenolod
parents:
diff
changeset
|
75 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
|
76 |
ccd034857702
[svn] Split up generic events into audcore_generic_events(), and client-specific stuff remains in mainwin_idle_func().
nenolod
parents:
diff
changeset
|
77 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
|
78 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
|
79 { |
ccd034857702
[svn] Split up generic events into audcore_generic_events(), and client-specific stuff remains in mainwin_idle_func().
nenolod
parents:
diff
changeset
|
80 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
|
81 |
ccd034857702
[svn] Split up generic events into audcore_generic_events(), and client-specific stuff remains in mainwin_idle_func().
nenolod
parents:
diff
changeset
|
82 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
|
83 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
|
84 |
ccd034857702
[svn] Split up generic events into audcore_generic_events(), and client-specific stuff remains in mainwin_idle_func().
nenolod
parents:
diff
changeset
|
85 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
|
86 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
|
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 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
|
89 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
|
90 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
|
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 |
ccd034857702
[svn] Split up generic events into audcore_generic_events(), and client-specific stuff remains in mainwin_idle_func().
nenolod
parents:
diff
changeset
|
93 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
|
94 (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
|
95 |
ccd034857702
[svn] Split up generic events into audcore_generic_events(), and client-specific stuff remains in mainwin_idle_func().
nenolod
parents:
diff
changeset
|
96 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
|
97 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
|
98 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
|
99 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
|
100 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
|
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 |
ccd034857702
[svn] Split up generic events into audcore_generic_events(), and client-specific stuff remains in mainwin_idle_func().
nenolod
parents:
diff
changeset
|
103 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
|
104 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
|
105 |
ccd034857702
[svn] Split up generic events into audcore_generic_events(), and client-specific stuff remains in mainwin_idle_func().
nenolod
parents:
diff
changeset
|
106 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
|
107 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
|
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 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
|
110 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
|
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 |
ccd034857702
[svn] Split up generic events into audcore_generic_events(), and client-specific stuff remains in mainwin_idle_func().
nenolod
parents:
diff
changeset
|
113 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
|
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 |
ccd034857702
[svn] Split up generic events into audcore_generic_events(), and client-specific stuff remains in mainwin_idle_func().
nenolod
parents:
diff
changeset
|
116 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
|
117 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
|
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 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
|
120 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
|
121 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
|
122 |
ccd034857702
[svn] Split up generic events into audcore_generic_events(), and client-specific stuff remains in mainwin_idle_func().
nenolod
parents:
diff
changeset
|
123 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
|
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 |
ccd034857702
[svn] Split up generic events into audcore_generic_events(), and client-specific stuff remains in mainwin_idle_func().
nenolod
parents:
diff
changeset
|
126 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
|
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 |
ccd034857702
[svn] Split up generic events into audcore_generic_events(), and client-specific stuff remains in mainwin_idle_func().
nenolod
parents:
diff
changeset
|
129 gint |
ccd034857702
[svn] Split up generic events into audcore_generic_events(), and client-specific stuff remains in mainwin_idle_func().
nenolod
parents:
diff
changeset
|
130 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
|
131 { |
ccd034857702
[svn] Split up generic events into audcore_generic_events(), and client-specific stuff remains in mainwin_idle_func().
nenolod
parents:
diff
changeset
|
132 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
|
133 |
216 | 134 ctrlsocket_check(); |
135 | |
197
ccd034857702
[svn] Split up generic events into audcore_generic_events(), and client-specific stuff remains in mainwin_idle_func().
nenolod
parents:
diff
changeset
|
136 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
|
137 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
|
138 |
ccd034857702
[svn] Split up generic events into audcore_generic_events(), and client-specific stuff remains in mainwin_idle_func().
nenolod
parents:
diff
changeset
|
139 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
|
140 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
|
141 /* 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
|
142 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
|
143 break; |
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 default: |
ccd034857702
[svn] Split up generic events into audcore_generic_events(), and client-specific stuff remains in mainwin_idle_func().
nenolod
parents:
diff
changeset
|
146 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
|
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 } |
ccd034857702
[svn] Split up generic events into audcore_generic_events(), and client-specific stuff remains in mainwin_idle_func().
nenolod
parents:
diff
changeset
|
149 |
ccd034857702
[svn] Split up generic events into audcore_generic_events(), and client-specific stuff remains in mainwin_idle_func().
nenolod
parents:
diff
changeset
|
150 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
|
151 } |
ccd034857702
[svn] Split up generic events into audcore_generic_events(), and client-specific stuff remains in mainwin_idle_func().
nenolod
parents:
diff
changeset
|
152 |