changeset 35429:3a9048421524

Create new header file gui.h. This is for declarations and definitions used throughout the GUI which are internal ones and thus shall not appear in interface.h.
author ib
date Fri, 30 Nov 2012 11:14:30 +0000
parents 0833bccb3c7b
children 2d55540614a9
files gui/gui.h gui/interface.c gui/ui/actions.c gui/ui/actions.h gui/ui/gtk/playlist.c gui/ui/main.c gui/util/list.h
diffstat 7 files changed, 37 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/gui/gui.h	Fri Nov 30 11:14:30 2012 +0000
@@ -0,0 +1,33 @@
+/*
+ * This file is part of MPlayer.
+ *
+ * MPlayer is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * MPlayer is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with MPlayer; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ */
+
+/**
+ * @file
+ * @brief Internal declarations and definitions
+ */
+
+#ifndef MPLAYER_GUI_GUI_H
+#define MPLAYER_GUI_GUI_H
+
+/// a pseudo stream type indicating not to change the current one
+#define SAME_STREAMTYPE (STREAMTYPE_DUMMY - 1)
+
+/// StreamTypes that are permitted in a playlist
+#define isPlaylistStreamtype (guiInfo.StreamType == STREAMTYPE_FILE || guiInfo.StreamType == STREAMTYPE_STREAM)
+
+#endif /* MPLAYER_GUI_GUI_H */
--- a/gui/interface.c	Fri Nov 30 11:01:09 2012 +0000
+++ b/gui/interface.c	Fri Nov 30 11:14:30 2012 +0000
@@ -23,6 +23,7 @@
 
 #include "interface.h"
 #include "app.h"
+#include "gui.h"
 #include "skin/skin.h"
 #include "ui/gmplayer.h"
 #include "ui/widgets.h"
--- a/gui/ui/actions.c	Fri Nov 30 11:01:09 2012 +0000
+++ b/gui/ui/actions.c	Fri Nov 30 11:14:30 2012 +0000
@@ -22,6 +22,7 @@
 #include "actions.h"
 #include "gmplayer.h"
 #include "gui/app.h"
+#include "gui/gui.h"
 #include "gui/interface.h"
 #include "gui/skin/font.h"
 #include "gui/skin/skin.h"
--- a/gui/ui/actions.h	Fri Nov 30 11:01:09 2012 +0000
+++ b/gui/ui/actions.h	Fri Nov 30 11:14:30 2012 +0000
@@ -19,10 +19,6 @@
 #ifndef MPLAYER_GUI_ACTIONS_H
 #define MPLAYER_GUI_ACTIONS_H
 
-#include "stream/stream.h"
-
-#define SAME_STREAMTYPE (STREAMTYPE_DUMMY - 1)
-
 extern int uiProcessNextInPlaylist;
 
 void uiAbsSeek(float sec);
--- a/gui/ui/gtk/playlist.c	Fri Nov 30 11:01:09 2012 +0000
+++ b/gui/ui/gtk/playlist.c	Fri Nov 30 11:14:30 2012 +0000
@@ -32,6 +32,7 @@
 #include "stream/stream.h"
 
 #include "gui/cfg.h"
+#include "gui/gui.h"
 #include "gui/interface.h"
 #include "gui/ui/widgets.h"
 #include "gui/util/list.h"
--- a/gui/ui/main.c	Fri Nov 30 11:01:09 2012 +0000
+++ b/gui/ui/main.c	Fri Nov 30 11:14:30 2012 +0000
@@ -27,6 +27,7 @@
 #include "config.h"
 #include "gmplayer.h"
 #include "gui/app.h"
+#include "gui/gui.h"
 #include "gui/interface.h"
 #include "gui/skin/font.h"
 #include "gui/skin/skin.h"
--- a/gui/util/list.h	Fri Nov 30 11:01:09 2012 +0000
+++ b/gui/util/list.h	Fri Nov 30 11:14:30 2012 +0000
@@ -19,9 +19,6 @@
 #ifndef MPLAYER_GUI_LIST_H
 #define MPLAYER_GUI_LIST_H
 
-/// StreamTypes that are permitted in a playlist
-#define isPlaylistStreamtype (guiInfo.StreamType == STREAMTYPE_FILE || guiInfo.StreamType == STREAMTYPE_STREAM)
-
 /// listMgr() commands
 enum {
     PLAYLIST_GET,