diff options
author | 2009-10-03 20:27:55 +0200 | |
---|---|---|
committer | 2009-10-03 20:27:55 +0200 | |
commit | b13342fe99b83bf37d420a827b5f55e2b770cd5e (patch) | |
tree | 8effc14d3c5ee98cbf4214a9c045dcd958c70655 /deadbeef.h | |
parent | f86fc192b0dbe26d39406c7b9f508142b6e0c9be (diff) |
moved message ids to deadbeef.h
added message sending to plugin API
added M_TRACKCHANGED message
Diffstat (limited to 'deadbeef.h')
-rw-r--r-- | deadbeef.h | 25 |
1 files changed, 25 insertions, 0 deletions
@@ -112,6 +112,28 @@ enum { DB_EV_MAX }; +// message ids for communicating with player +enum { + M_SONGFINISHED, + M_NEXTSONG, + M_PREVSONG, + M_PLAYSONG, + M_PLAYSONGNUM, + M_STOPSONG, + M_PAUSESONG, + M_PLAYRANDOM, + M_SONGCHANGED, // p1=from, p2=to + M_ADDDIR, // ctx = pointer to string, which must be freed by g_free + M_ADDFILES, // ctx = GSList pointer, must be freed with g_slist_free + M_ADDDIRS, // ctx = GSList pointer, must be freed with g_slist_free + M_OPENFILES, // ctx = GSList pointer, must be freed with g_slist_free + M_FMDRAGDROP, // ctx = char* ptr, must be freed with standard free, p1 is length of data, p2 is drop_y + M_TERMINATE, // must be sent to player thread to terminate + M_PLAYLISTREFRESH, + M_REINIT_SOUND, + M_TRACKCHANGED, // p1=tracknumber +}; + // typecasting macros #define DB_PLUGIN(x) ((DB_plugin_t *)(x)) #define DB_CALLBACK(x) ((DB_callback_t)(x)) @@ -167,6 +189,7 @@ typedef struct { void (*pl_item_free) (DB_playItem_t *it); void (*pl_item_copy) (DB_playItem_t *out, DB_playItem_t *in); DB_playItem_t *(*pl_insert_item) (DB_playItem_t *after, DB_playItem_t *it); + int (*pl_get_idx_of) (DB_playItem_t *it); // metainfo void (*pl_add_meta) (DB_playItem_t *it, const char *key, const char *value); const char *(*pl_find_meta) (DB_playItem_t *song, const char *meta); @@ -192,6 +215,8 @@ typedef struct { int64_t (*ftell) (DB_FILE *stream); void (*rewind) (DB_FILE *stream); int64_t (*fgetlength) (DB_FILE *stream); + // message passing + int (*sendmessage) (uint32_t id, uintptr_t ctx, uint32_t p1, uint32_t p2); } DB_functions_t; // base plugin interface |