X-Git-Url: http://research.m1stereo.tv/gitweb?a=blobdiff_plain;f=src%2Fomnplay.h;h=aad4adef421d3bf6bda463ab9cddba11af1e7759;hb=3b734bdf296b2d0888924661c6bffeeb62088996;hp=f967b87b02537163a7bb1254271854b573a2bfec;hpb=c1096d59584b83708cc8b89e2a8d677c85d4c56e;p=melted_gui diff --git a/src/omnplay.h b/src/omnplay.h index f967b87..aad4ade 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,8 @@ typedef struct playlist_item playlist_item_type_t type; int omn_idx; int omn_offset; + int error; + int del; } playlist_item_t; #define MAX_PLAYERS 4 @@ -109,7 +118,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; @@ -122,6 +131,7 @@ typedef struct omnplay_instance GtkWidget *playlist_grid; GtkWidget *library_grid; GtkWidget *buttons[BUTTON_LAST + 1]; + GtkWidget *status_label; struct { omnplay_player_t item[MAX_PLAYERS]; @@ -147,7 +157,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); @@ -168,6 +185,13 @@ int omnplay_get_content(omnplay_instance_t* app, playlist_item_t *items, int lim 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); +void omnplay_set_status(omnplay_instance_t* app, char* str); +int* omnplay_selected_idxs_playlist(omnplay_instance_t* app); #ifdef __cplusplus };