Mercurial > audlegacy
annotate src/audacious/ui_main.h @ 4557:2eee464379dc
Clean up header multiple inclusion guards (e.g. #ifndef FOO_H/#define FOO_H)
| author | Matti Hamalainen <ccr@tnsp.org> |
|---|---|
| date | Mon, 19 May 2008 01:29:46 +0300 |
| parents | 2638175099e0 |
| children | ab8bc8a89a52 |
| rev | line source |
|---|---|
| 2313 | 1 /* BMP - Cross-platform multimedia player |
| 2 * Copyright (C) 2003-2004 BMP development team. | |
| 3 * | |
| 4 * Based on XMMS: | |
| 5 * Copyright (C) 1998-2003 XMMS development team. | |
| 6 * | |
| 7 * This program is free software; you can redistribute it and/or modify | |
| 8 * it under the terms of the GNU General Public License as published by | |
|
3121
3b6d316f8b09
GPL3 relicensing.
William Pitcock <nenolod@atheme-project.org>
parents:
3072
diff
changeset
|
9 * the Free Software Foundation; under version 3 of the License. |
| 2313 | 10 * |
| 11 * This program is distributed in the hope that it will be useful, | |
| 12 * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
| 13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
| 14 * GNU General Public License for more details. | |
| 15 * | |
| 16 * You should have received a copy of the GNU General Public License | |
|
3121
3b6d316f8b09
GPL3 relicensing.
William Pitcock <nenolod@atheme-project.org>
parents:
3072
diff
changeset
|
17 * along with this program. If not, see <http://www.gnu.org/licenses>. |
|
3123
f1c756f39e6c
Invoke "Plugins are not derived work" clause provided by GPL3.
William Pitcock <nenolod@atheme-project.org>
parents:
3121
diff
changeset
|
18 * |
|
f1c756f39e6c
Invoke "Plugins are not derived work" clause provided by GPL3.
William Pitcock <nenolod@atheme-project.org>
parents:
3121
diff
changeset
|
19 * The Audacious team does not consider modular code linking to |
|
f1c756f39e6c
Invoke "Plugins are not derived work" clause provided by GPL3.
William Pitcock <nenolod@atheme-project.org>
parents:
3121
diff
changeset
|
20 * Audacious or using our public API to be a derived work. |
| 2313 | 21 */ |
| 22 | |
|
4557
2eee464379dc
Clean up header multiple inclusion guards (e.g. #ifndef FOO_H/#define FOO_H)
Matti Hamalainen <ccr@tnsp.org>
parents:
4528
diff
changeset
|
23 #ifndef AUDACIOUS_UI_MAIN_H |
|
2eee464379dc
Clean up header multiple inclusion guards (e.g. #ifndef FOO_H/#define FOO_H)
Matti Hamalainen <ccr@tnsp.org>
parents:
4528
diff
changeset
|
24 #define AUDACIOUS_UI_MAIN_H |
| 2313 | 25 |
| 26 #include <gtk/gtk.h> | |
| 27 | |
| 3020 | 28 #include "ui_vis.h" |
| 3054 | 29 #include "ui_svis.h" |
| 2313 | 30 |
| 31 /* yes, main window size is fixed */ | |
| 32 #define MAINWIN_WIDTH (gint)275 | |
| 33 #define MAINWIN_HEIGHT (gint)116 | |
| 34 #define MAINWIN_TITLEBAR_HEIGHT (gint)14 | |
| 35 #define MAINWIN_SHADED_WIDTH MAINWIN_WIDTH | |
| 36 #define MAINWIN_SHADED_HEIGHT MAINWIN_TITLEBAR_HEIGHT | |
|
4216
75d99359357b
doublesize -> custom scale:
Cristi Magherusan <majeru@atheme.org>
parents:
4120
diff
changeset
|
37 #define MAINWIN_SCALE_FACTOR (cfg.scaled ? cfg.scale_factor : 1) |
| 2313 | 38 |
|
3677
30ef1287da19
Seperate the 10hz loop dependent code from the rest of the remaining polling loop.
William Pitcock <nenolod@atheme.org>
parents:
3664
diff
changeset
|
39 #define MAINWIN_UPDATE_INTERVAL 100 |
| 2313 | 40 |
| 41 #define MAINWIN_DEFAULT_POS_X 20 | |
| 42 #define MAINWIN_DEFAULT_POS_Y 20 | |
| 43 | |
| 44 #define MAINWIN_DEFAULT_FONT "Sans Bold 9" | |
| 45 | |
| 46 | |
| 47 typedef enum { | |
| 48 TIMER_ELAPSED, | |
| 49 TIMER_REMAINING | |
| 50 } TimerMode; | |
| 51 | |
| 52 enum { | |
| 53 MAINWIN_GENERAL_ABOUT, | |
| 54 | |
| 55 MAINWIN_GENERAL_PLAYFILE, | |
| 56 MAINWIN_GENERAL_PLAYLOCATION, | |
| 57 | |
| 58 MAINWIN_GENERAL_FILEINFO, | |
| 59 MAINWIN_GENERAL_PREFS, | |
| 60 | |
| 61 MAINWIN_GENERAL_SHOWMWIN, | |
| 62 MAINWIN_GENERAL_SHOWPLWIN, | |
| 63 | |
| 64 MAINWIN_GENERAL_FOCUSMWIN, | |
| 65 MAINWIN_GENERAL_FOCUSPLWIN, | |
| 66 | |
| 67 MAINWIN_GENERAL_SHOWEQWIN, | |
| 68 MAINWIN_GENERAL_EXIT, | |
| 69 | |
| 70 MAINWIN_GENERAL_PREV, | |
| 71 MAINWIN_GENERAL_PLAY, | |
| 72 MAINWIN_GENERAL_PAUSE, | |
| 73 MAINWIN_GENERAL_STOP, | |
| 74 MAINWIN_GENERAL_NEXT, | |
| 75 MAINWIN_GENERAL_STOPFADE, | |
| 76 MAINWIN_GENERAL_BACK5SEC, | |
| 77 MAINWIN_GENERAL_FWD5SEC, | |
| 78 MAINWIN_GENERAL_START, | |
| 79 MAINWIN_GENERAL_BACK10, | |
| 80 MAINWIN_GENERAL_FWD10, | |
| 81 MAINWIN_GENERAL_JTT, | |
| 82 MAINWIN_GENERAL_JTF, | |
| 83 MAINWIN_GENERAL_QUEUE, | |
| 84 MAINWIN_GENERAL_CQUEUE, | |
| 85 MAINWIN_GENERAL_VOLUP, | |
| 86 MAINWIN_GENERAL_VOLDOWN, | |
| 87 MAINWIN_GENERAL_SETAB, | |
| 88 MAINWIN_GENERAL_CLEARAB, | |
| 89 | |
| 90 MAINWIN_GENERAL_NEXT_PL, | |
| 91 MAINWIN_GENERAL_PREV_PL, | |
|
2520
b210d1ea2084
[svn] ui_main.h:92: warning: comma at end of enumerator list
nenolod
parents:
2313
diff
changeset
|
92 MAINWIN_GENERAL_NEW_PL |
| 2313 | 93 }; |
| 94 | |
| 95 extern GtkWidget *mainwin; | |
| 96 extern GtkWidget *err; | |
| 97 | |
| 98 extern gboolean mainwin_moving; | |
| 99 extern gboolean mainwin_focus; | |
| 100 | |
| 101 extern GtkWidget *mainwin_jtf; | |
|
2853
bec320cfcc12
use UiSkinnedButton instead of PButton in equalizerwin
Tomasz Mon <desowin@gmail.com>
parents:
2843
diff
changeset
|
102 extern GtkWidget *mainwin_eq, *mainwin_pl; |
|
3664
9e4edc01a0e3
I don't quite have idea how to make everyone happy with this - reverting 23824a113182 as for now
Tomasz Mon <desowin@gmail.com>
parents:
3599
diff
changeset
|
103 extern GtkWidget *mainwin_info; |
| 2313 | 104 |
|
2942
1a59a0ced6a8
make scrolling stop for second when it reaches end, replace remaining mainwin TextBox with UiSkinnedTextbox
Tomasz Mon <desowin@gmail.com>
parents:
2911
diff
changeset
|
105 extern GtkWidget *mainwin_stime_min, *mainwin_stime_sec; |
| 2313 | 106 |
| 3020 | 107 extern GtkWidget *mainwin_vis; |
| 3054 | 108 extern GtkWidget *mainwin_svis; |
| 2313 | 109 |
|
3072
84de3244aeaa
replace Playstatus with UiSkinnedPlaystatus
Tomasz Mon <desowin@gmail.com>
parents:
3054
diff
changeset
|
110 extern GtkWidget *mainwin_playstatus; |
| 2313 | 111 |
|
3001
6d4b7b739232
fully implement UiSkinnedNumber, number.c no longer needed
Tomasz Mon <desowin@gmail.com>
parents:
2947
diff
changeset
|
112 extern GtkWidget *mainwin_minus_num, *mainwin_10min_num, *mainwin_min_num; |
|
6d4b7b739232
fully implement UiSkinnedNumber, number.c no longer needed
Tomasz Mon <desowin@gmail.com>
parents:
2947
diff
changeset
|
113 extern GtkWidget *mainwin_10sec_num, *mainwin_sec_num; |
| 2313 | 114 |
|
3042
01ae56759d15
mainwin_sposition is now UiSkinnedHorizontalSlider
Tomasz Mon <desowin@gmail.com>
parents:
3040
diff
changeset
|
115 extern GtkWidget *mainwin_position, *mainwin_sposition; |
| 2313 | 116 |
| 117 void mainwin_create(void); | |
|
3678
e82ad057d1db
Get rid of read_volume() craq. Add ui_main_set_initial_volume() to replace the only necessary remaining code.
William Pitcock <nenolod@atheme.org>
parents:
3677
diff
changeset
|
118 void ui_main_set_initial_volume(void); |
| 2313 | 119 |
| 120 void mainwin_lock_info_text(const gchar * text); | |
| 121 void mainwin_release_info_text(void); | |
| 122 void mainwin_play_pushed(void); | |
| 123 void mainwin_stop_pushed(void); | |
| 124 void mainwin_eject_pushed(void); | |
| 125 | |
| 126 void mainwin_rev_pushed(void); | |
| 127 void mainwin_rev_release(void); | |
| 128 void mainwin_fwd_pushed(void); | |
| 129 void mainwin_fwd_release(void); | |
| 130 | |
| 131 void mainwin_adjust_volume_motion(gint v); | |
| 132 void mainwin_adjust_volume_release(void); | |
| 133 void mainwin_adjust_balance_motion(gint b); | |
| 134 void mainwin_adjust_balance_release(void); | |
| 135 void mainwin_set_volume_slider(gint percent); | |
| 136 void mainwin_set_balance_slider(gint percent); | |
| 137 | |
| 138 void mainwin_vis_set_type(VisType mode); | |
| 139 | |
|
3221
9583cd62231f
implement ui_skinned_window_expose
Tomasz Mon <desowin@gmail.com>
parents:
3169
diff
changeset
|
140 void mainwin_refresh_hints(void); |
| 2313 | 141 void mainwin_set_info_text(void); |
| 142 void mainwin_set_song_info(gint rate, gint freq, gint nch); | |
| 143 void mainwin_clear_song_info(void); | |
| 144 void mainwin_set_stopaftersong(gboolean stop); | |
|
2769
bf2d80abf76e
[svn] Implemented CMD_IS_ADVANCE and CMD_TOGGLE_ADVANCE. Added partial MPRIS support. Root is complete, Player is partially implemented, and TrackList has not been started.
magma
parents:
2651
diff
changeset
|
145 void mainwin_set_noplaylistadvance(gboolean no_advance); |
| 2313 | 146 |
| 147 void mainwin_set_always_on_top(gboolean always); | |
| 148 void mainwin_set_volume_diff(gint diff); | |
| 149 void mainwin_set_balance_diff(gint diff); | |
| 150 | |
| 151 void mainwin_show(gboolean); | |
| 152 void mainwin_real_show(void); | |
| 153 void mainwin_real_hide(void); | |
| 154 void mainwin_move(gint x, gint y); | |
| 155 void mainwin_shuffle_pushed(gboolean toggled); | |
| 156 void mainwin_repeat_pushed(gboolean toggled); | |
| 157 void mainwin_disable_seekbar(void); | |
| 158 void mainwin_set_title(const gchar * text); | |
| 159 void mainwin_show_add_url_window(void); | |
| 160 void mainwin_minimize_cb(void); | |
| 161 void mainwin_general_menu_callback(gpointer cb_data, | |
| 162 guint action, | |
| 163 GtkWidget * widget); | |
| 164 | |
|
3018
6a9fdd5aee3a
Move timer updates out of the 100hz giant loop.
Daniel Drake <dsd@gentoo.org>
parents:
3001
diff
changeset
|
165 gboolean mainwin_update_song_info(void); |
| 2313 | 166 void mainwin_drag_data_received(GtkWidget * widget, |
| 167 GdkDragContext * context, | |
| 168 gint x, | |
| 169 gint y, | |
| 170 GtkSelectionData * selection_data, | |
| 171 guint info, | |
| 172 guint time, | |
| 173 gpointer user_data); | |
| 174 | |
| 175 void mainwin_setup_menus(void); | |
|
3366
ac752b5db631
introduce change_timer_mode_cb
Tomasz Mon <desowin@gmail.com>
parents:
3351
diff
changeset
|
176 gboolean change_timer_mode_cb(GtkWidget *widget, GdkEventButton *event); |
| 2313 | 177 |
| 178 void mainwin_jump_to_file(void); | |
| 179 void mainwin_jump_to_time(void); | |
| 180 | |
| 181 void mainwin_ewmh_activate(void); | |
| 182 | |
|
2651
4d5e6a8717dd
[svn] - allow the player to start with all of its windows hidden (but give a warning to the user, whose display can be disabled); also, try to remember player windows positions when they stay hidden between sessions
giacomo
parents:
2525
diff
changeset
|
183 void mainwin_show_visibility_warning(void); |
|
4d5e6a8717dd
[svn] - allow the player to start with all of its windows hidden (but give a warning to the user, whose display can be disabled); also, try to remember player windows positions when they stay hidden between sessions
giacomo
parents:
2525
diff
changeset
|
184 |
| 2313 | 185 /* FIXME: placed here for now */ |
| 186 void playback_get_sample_params(gint * bitrate, | |
| 187 gint * frequency, | |
| 188 gint * numchannels); | |
| 189 | |
|
3965
aea8b763b134
Work around the issues with broken Gtk-Qt-Engine and Modern skins with inline GTK.
William Pitcock <nenolod@atheme.org>
parents:
3679
diff
changeset
|
190 void ui_main_check_theme_engine(void); |
|
aea8b763b134
Work around the issues with broken Gtk-Qt-Engine and Modern skins with inline GTK.
William Pitcock <nenolod@atheme.org>
parents:
3679
diff
changeset
|
191 |
|
4528
2638175099e0
Restore util_menu_main_show() for plugins - thanks go to ccr for the first
mf0102 <0102@gmx.at>
parents:
4449
diff
changeset
|
192 void util_menu_main_show( gint x , gint y , guint button , guint time ); |
|
2638175099e0
Restore util_menu_main_show() for plugins - thanks go to ccr for the first
mf0102 <0102@gmx.at>
parents:
4449
diff
changeset
|
193 |
|
4557
2eee464379dc
Clean up header multiple inclusion guards (e.g. #ifndef FOO_H/#define FOO_H)
Matti Hamalainen <ccr@tnsp.org>
parents:
4528
diff
changeset
|
194 #endif /* AUDACIOUS_UI_MAIN_H */ |
