Code

mpdclient: try IP connect if default local socket path fails
[ncmpc.git] / src / list_window.h
index 10e79edd5e022ba5f39ec5db4f9be9177cacc091..697e1e0e163af938e337bf1773111bde68b79523 100644 (file)
@@ -1,5 +1,5 @@
 /* ncmpc (Ncurses MPD Client)
- * (c) 2004-2010 The Music Player Daemon Project
+ * (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
@@ -35,7 +35,7 @@ typedef void
 (*list_window_paint_callback_t)(WINDOW *w, unsigned i,
                                unsigned y, unsigned width,
                                bool selected,
-                               void *data);
+                               const void *data);
 
 struct list_window {
        WINDOW *w;
@@ -48,8 +48,16 @@ struct list_window {
 
        unsigned start;
        unsigned selected;
-       unsigned range_base;        /* represents the base item. */
-       bool range_selection;       /* range selection activated */
+
+       /**
+        * Represents the base item.
+        */
+       unsigned range_base;
+
+       /**
+        * Range selection activated?
+        */
+       bool range_selection;
 
        bool hide_cursor;
 };
@@ -74,7 +82,7 @@ struct list_window_range {
 struct list_window *list_window_init(WINDOW *w,
                                     unsigned width, unsigned height);
 
-/* destroy a list window (returns NULL) */
+/* destroy a list window */
 void list_window_free(struct list_window *lw);
 
 /* reset a list window (selected=0, start=0) */
@@ -94,7 +102,7 @@ void list_window_paint(const struct list_window *lw,
 void
 list_window_paint2(const struct list_window *lw,
                   list_window_paint_callback_t paint_callback,
-                  void *callback_data);
+                  const void *callback_data);
 
 /* perform basic list window commands (movement) */
 bool