1 /* 2 DeaDBeeF -- the music player 3 Copyright (C) 2009-2015 Alexey Yakovenko and other contributors 4 5 This software is provided 'as-is', without any express or implied 6 warranty. In no event will the authors be held liable for any damages 7 arising from the use of this software. 8 9 Permission is granted to anyone to use this software for any purpose, 10 including commercial applications, and to alter it and redistribute it 11 freely, subject to the following restrictions: 12 13 1. The origin of this software must not be misrepresented; you must not 14 claim that you wrote the original software. If you use this software 15 in a product, an acknowledgment in the product documentation would be 16 appreciated but is not required. 17 18 2. Altered source versions must be plainly marked as such, and must not be 19 misrepresented as being the original software. 20 21 3. This notice may not be removed or altered from any source distribution. 22 */ 23 24 #ifndef __DDBTABSTRIP_H 25 #define __DDBTABSTRIP_H 26 27 #include <gtk/gtk.h> 28 #include "drawing.h" 29 30 G_BEGIN_DECLS 31 32 #define DDB_TYPE_TABSTRIP (ddb_tabstrip_get_type ()) 33 #define DDB_TABSTRIP(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), DDB_TYPE_TABSTRIP, DdbTabStrip)) 34 #define DDB_TABSTRIP_CLASS(obj) (G_TYPE_CHECK_CLASS_CAST((obj), DDB_TYPE_TABSTRIP, DdbTabStripClass)) 35 #define DDB_IS_TABSTRIP(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), DDB_TYPE_TABSTRIP)) 36 #define DDB_IS_TABSTRIP_CLASS(obj) (G_TYPE_CHECK_CLASS_TYPE ((obj), DDB_TYPE_TABSTRIP)) 37 #define DDB_TABSTRIP_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), DDB_TYPE_TABSTRIP, DdbTabStripClass)) 38 39 typedef struct _DdbTabStrip DdbTabStrip; 40 typedef struct _DdbTabStripClass DdbTabStripClass; 41 42 typedef void * DdbTabStripIter; 43 typedef void * DdbTabStripColIter; 44 45 struct _DdbTabStrip { 46 GtkWidget parent; 47 int hscrollpos; 48 int dragging; 49 int prepare; 50 int dragpt[2]; 51 int prev_x; 52 int movepos; 53 guint scroll_timer; 54 int scroll_direction; 55 drawctx_t drawctx; 56 int calculated_height; 57 }; 58 59 struct _DdbTabStripClass { 60 GtkWidgetClass parent_class; 61 }; 62 63 GType ddb_tabstrip_get_type(void) G_GNUC_CONST; 64 GtkWidget * ddb_tabstrip_new(void); 65 void ddb_tabstrip_refresh (DdbTabStrip *ts); 66 67 G_END_DECLS 68 69 #endif // __DDBTABSTRIP_H 70