Code

screen_interface: add method mouse(), replacing CMD_MOUSE_EVENT
[ncmpc.git] / src / ncmpc.h
index 4d3b840a524e89df6066c4caeba8e3235c70d021..2cc778f416890ccd0778e0167ab30d7954a87feb 100644 (file)
@@ -1,77 +1,45 @@
+/* ncmpc (Ncurses MPD Client)
+ * (c) 2004-2017 The Music Player Daemon Project
+ * Project homepage: http://musicpd.org
+ *
+ * This program 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.
+ *
+ * This program 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 this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ */
+
 #ifndef NCMPC_H
 #define NCMPC_H
 
-#ifndef PACKAGE
-#include "config.h"
-#endif
-
-#ifndef DISABLE_ARTIST_SCREEN
-#define ENABLE_ARTIST_SCREEN 1
-#endif
-#ifndef DISABLE_SEARCH_SCREEN
-#define ENABLE_SEARCH_SCREEN 1
-#endif
-#ifndef DISABLE_KEYDEF_SCREEN
-#define ENABLE_KEYDEF_SCREEN 1
-#endif
-#ifndef DISABLE_CLOCK_SCREEN
-#define ENABLE_CLOCK_SCREEN 1
-#endif
-
-#ifdef DEBUG
-void D(char *format, ...);
-#else
-#define D(...)
-#endif
+#include "command.h"
 
-/* i18n */
-#ifdef HAVE_LOCALE_H
-#include <locale.h>
+#ifdef HAVE_GETMOUSE
+#include "ncmpc_curses.h"
 #endif
-#ifdef ENABLE_NLS
-#include <libintl.h>
-#include <glib/gi18n.h>
-#else
-#define  _(x) x
-#define N_(x) x
-#endif
-
-#define YES   _("y")
-#define NO    _("n")
-
-/* mpd crossfade time [s] */
-#define DEFAULT_CROSSFADE_TIME 10
-
-/* welcome message time [s] */
-#define SCREEN_WELCOME_TIME 10
-
-/* screen list */
-#define DEFAULT_SCREEN_LIST "playlist browse"
 
-/* status message time [s] */
-#define SCREEN_STATUS_MESSAGE_TIME 3
+#include <stdbool.h>
 
-/* getch() timeout for non blocking read [ms] */
-#define SCREEN_TIMEOUT 500
+void begin_input_event(void);
+void end_input_event(void);
 
-/* minumum window size */
-#define SCREEN_MIN_COLS 14
-#define SCREEN_MIN_ROWS  5
+/**
+ * @return false if the application shall quit
+ */
+bool
+do_input_event(command_t cmd);
 
-/* time between mpd updates [s] */
-#define MPD_UPDATE_TIME 0.5
-
-/* time before trying to reconnect [ms] */
-#define MPD_RECONNECT_TIME  1500
-
-/* song format - list window */
-#define DEFAULT_LIST_FORMAT "%name%|[%artist% - ]%title%|%shortfile%"
-#define LIST_FORMAT (options.list_format ? options.list_format : \
-                                           DEFAULT_LIST_FORMAT)
-
-/* song format - status window */
-#define DEFAULT_STATUS_FORMAT "[%artist% - ]%title%|%shortfile%"
-#define STATUS_FORMAT (options.status_format ? options.status_format : \
-                                               DEFAULT_STATUS_FORMAT)
+#ifdef HAVE_GETMOUSE
+void
+do_mouse_event(int x, int y, mmask_t bstate);
+#endif
 
 #endif /* NCMPC_H */