summaryrefslogtreecommitdiff
path: root/gtkplaylist.h
diff options
context:
space:
mode:
authorGravatar waker <wakeroid@gmail.com>2009-08-08 21:25:28 +0200
committerGravatar waker <wakeroid@gmail.com>2009-08-08 21:25:28 +0200
commit84527d3b733052108f0e6c49eae091d0b98712cf (patch)
treef2c0571039f77e6087d80e5f5099e5dbc5236a3e /gtkplaylist.h
parent0b9915275456dfee33bbce8eb31b2a0b80fb4e53 (diff)
started refactoring of gtkplaylist to share code between playlist and search windows
Diffstat (limited to 'gtkplaylist.h')
-rw-r--r--gtkplaylist.h28
1 files changed, 26 insertions, 2 deletions
diff --git a/gtkplaylist.h b/gtkplaylist.h
index fabc03b7..feab283f 100644
--- a/gtkplaylist.h
+++ b/gtkplaylist.h
@@ -27,8 +27,32 @@ enum {
TARGET_SAMEWIDGET,
};
-void
-gtkps_nextsong (void);
+#define ps_ncolumns 5
+#define ps_colname_max 100
+
+// structure of this kind must be set as user data for playlist, header and scrollbar widgets
+// pointer to this structure must be passed too all functions that
+// implement playlist functionality (like this pointer)
+typedef struct {
+ // cached gtk/gdk object pointers
+ GtkWidget *playlist;
+ GtkWidget *header;
+ GtkWidget *scrollbar;
+ GdkPixmap *backbuf;
+ // parameters
+ playItem_t **phead; // pointer to head of list to display
+ int update_statusbar; // whether it needs to update status bar in certain cases
+ int has_dragndrop; // whether it has drag and drop capability
+ // current state
+ int scrollpos;
+ int row;
+ double clicktime; // for doubleclick detection
+ int nvisiblerows;
+ int16_t *fmtcache; // cached text formatting
+ int header_fitted[ps_ncolumns];
+ char colnames_fitted[ps_ncolumns][ps_colname_max]; // cached formatted names of columns
+ int colwidths[ps_ncolumns]; // current column widths
+} gtkplaylist_t;
void
redraw_ps_row (GtkWidget *widget, int row);