X-Git-Url: http://research.m1stereo.tv/gitweb?a=blobdiff_plain;f=src%2Fomnplay.h;h=de4e94202df1193d36f09ae892c195539a4069a3;hb=d9d86d1a5d860fbfd2213c2c3286011d4f1b3fad;hp=e36e8620c13943f24517102857b621d73f9b9e68;hpb=499664bbfa646b6280553d1dc2dfb71db8c2e4d9;p=melted_gui diff --git a/src/omnplay.h b/src/omnplay.h index e36e862..de4e942 100644 --- a/src/omnplay.h +++ b/src/omnplay.h @@ -20,6 +20,8 @@ #ifndef OMNPLAY_H #define OMNPLAY_H +#include + #ifdef __cplusplus extern "C" { @@ -48,6 +50,9 @@ typedef enum control_buttons BUTTON_LIBRARY_ADD, BUTTON_LIBRARY_REFRESH, + BUTTON_LIBRARY_FIND, + BUTTON_LIBRARY_FIND_NEXT, + BUTTON_LAST } control_buttons_t; @@ -86,6 +91,8 @@ typedef enum playlist_item_type #define MAX_PLAYLIST_ITEMS 1024 #define MAX_LIBRARY_ITEMS 10240 +#define PLAYLIST_ITEM_ERROR_LIB 1 +#define PLAYLIST_ITEM_ERROR_CUE 2 typedef struct playlist_item { @@ -97,6 +104,7 @@ typedef struct playlist_item playlist_item_type_t type; int omn_idx; int omn_offset; + int error; } playlist_item_t; #define MAX_PLAYERS 4 @@ -109,7 +117,7 @@ typedef struct omnplay_player char name[PATH_MAX]; char host[PATH_MAX]; void* handle; - pthread_t thread; + GThread* thread; GtkWidget *label_status, *label_state, *label_tc_cur, *label_tc_rem, *label_clip; struct omnplay_instance *app; int playlist_start; @@ -147,7 +155,14 @@ typedef struct omnplay_instance char filename[PATH_MAX]; char whois[PATH_MAX]; pthread_mutex_t lock; + GThread* refresh_thread; + GtkWidget *search; } library; + struct + { + playlist_item_t item[MAX_LIBRARY_ITEMS]; + int count; + } clipboard; } omnplay_instance_t; omnplay_instance_t* omnplay_create(int argc, char** argv); @@ -166,7 +181,13 @@ void omnplay_library_draw(omnplay_instance_t* app); typedef void (*omnplay_get_content_cb_proc)(omnplay_instance_t* app, playlist_item_t *items, void* data); int omnplay_get_content(omnplay_instance_t* app, playlist_item_t *items, int limit, omnplay_get_content_cb_proc proc, void* data); - +int omnplay_whois_list(omnplay_instance_t* app, playlist_item_t *items, int* plimit); +int omnplay_library_load_file(playlist_item_t* items, int *pcount, char* filename); +playlist_item_t* omnplay_library_find(omnplay_instance_t* app, char* id); +int omnplay_library_normalize_item(omnplay_instance_t* app, playlist_item_t* item); +playlist_item_t* omnplay_library_get_selected(omnplay_instance_t* app, int *count); +void omnplay_playlist_normalize(omnplay_instance_t* app); +void omnplay_library_search(omnplay_instance_t* app, int next); #ifdef __cplusplus };