123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915 |
- #ifndef _ML_H_
- #define _ML_H_
- #define MLHDR_VER 0x17
- #define MLHDR_VER_U 0x16
- #define MLHDR_VER_OLD 0x15
- #include <windows.h>
- #include <commctrl.h>
- #include <stddef.h>
- #include <api/service/api_service.h>
- typedef struct
- {
- int version;
-
-
-
-
- const char *description;
- int (__cdecl *init)();
- void (__cdecl *quit)();
-
- INT_PTR (__cdecl *MessageProc)(int message_type, INT_PTR param1, INT_PTR param2, INT_PTR param3);
-
-
-
- HWND hwndWinampParent;
- HWND hwndLibraryParent;
- HINSTANCE hDllInstance;
-
- #ifdef __cplusplus
- api_service *service;
- #else
- void * service;
- #endif
- } winampMediaLibraryPlugin;
- #define ML_INIT_SUCCESS 0
- #define ML_INIT_FAILURE 1
- #define ML_PLUGIN_UNINSTALL_NOW 0x1
- #define ML_PLUGIN_UNINSTALL_REBOOT 0x0
- #define ML_MSG_TREE_BEGIN 0x100
- #define ML_MSG_TREE_ONCREATEVIEW 0x100
- #define ML_MSG_TREE_ONCLICK 0x101
- #define ML_ACTION_RCLICK 0
- #define ML_ACTION_DBLCLICK 1
- #define ML_ACTION_ENTER 2
- #define ML_ACTION_LCLICK 3
- #define ML_MSG_TREE_ONDROPTARGET 0x102
-
- #define ML_MSG_TREE_ONDRAG 0x103
-
- #define ML_MSG_TREE_ONDROP 0x104
-
- #define ML_MSG_TREE_ONKEYDOWN 0x105
-
-
-
-
- #define ML_MSG_TREE_END 0x1FF
- #define ML_MSG_ONSENDTOBUILD 0x300
- #define ML_MSG_ONSENDTOSELECT 0x301
- #define ML_MSG_WRITE_CONFIG 0x397
- #define ML_MSG_PLAYING_FILE 0x398
- #define ML_MSG_NOTOKTOQUIT 0x399
- #define ML_MSG_CONFIG 0x400
- #define ML_MSG_NO_CONFIG 0x401
- #define ML_MSG_CLOUD_MIN 0x402
- #define ML_MSG_CLOUD_MAX 0x410
- #define ML_MSG_VIEW_BUTTON_HOOK 0x420
- #define ML_MSG_VIEW_BUTTON_HOOK_IN_USE 0x421
- #define ML_MSG_VIEW_PLAY_ENQUEUE_CHANGE 0x422
-
-
- typedef struct
- {
- wchar_t* play;
- wchar_t* enqueue;
- } viewButtons;
- #define ML_IPC_GET_VIEW_BUTTON_TEXT 0x423
- #define ML_MSG_DOWNLOADS_VIEW_LOADED 0x424
- #define ML_MSG_DOWNLOADS_VIEW_POSITION 0x425
- #define ML_TYPE_UNKNOWN -1
- #define ML_TYPE_ITEMRECORDLIST 0
- #define ML_TYPE_FILENAMES 1
- #define ML_TYPE_STREAMNAMES 2
- #define ML_TYPE_CDTRACKS 3
- #define ML_TYPE_QUERYSTRING 4
- #define ML_TYPE_PLAYLIST 5
- #define ML_TYPE_ITEMRECORDLISTW 6
- #define ML_TYPE_FILENAMESW 7
- #define ML_TYPE_STREAMNAMESW 8
- #define ML_TYPE_PLAYLISTS 9
- #define ML_TYPE_TREEITEM 69
- typedef struct
- {
- const wchar_t *filename;
- const wchar_t *title;
-
-
- int numItems;
- int length;
- } mlPlaylist;
- #define ML_TREEVIEW_ID_DEVICES 10000
- #define WM_ML_IPC WM_USER+0x1000
- #define ML_IPC_GETCURRENTVIEW 0x090
- #define ML_IPC_ADDTREEITEM 0x0101
- #define ML_IPC_SETTREEITEM 0x0102
- #define ML_IPC_DELTREEITEM 0x0103
- #define ML_IPC_GETCURTREEITEM 0x0104
- #define ML_IPC_SETCURTREEITEM 0x0105
- #define ML_IPC_GETTREE 0x0106
- typedef struct
- {
- INT_PTR parent_id;
- char *title;
- int has_children;
- INT_PTR this_id;
- } mlAddTreeItemStruct;
- #define TREE_LOCALMEDIA 1000
- #define TREE_PLAYLISTS 3001
- #define TREE_QUERIES 1000
- typedef struct
- {
- int item_start;
- int cmd_offset;
- int max_numitems;
- } mlGetTreeStruct;
- #define ML_IPC_ADDTREEITEM_EX 0x0111
- #define ML_IPC_SETTREEITEM_EX 0x0112
- typedef struct {
- INT_PTR parent_id;
- char *title;
- int has_children;
- INT_PTR this_id;
- int imageIndex;
- } mlAddTreeItemStructEx;
- #define ML_IPC_ADDTREEIMAGE 0x110
- #define ML_IPC_TREEITEM_GETHANDLE 0x120
- #define ML_IPC_TREEITEM_GETCHILD 0x121
- #define ML_IPC_TREEITEM_GETNEXT 0x122
- #define ML_IPC_TREEITEM_GETSELECTED 0x123
- #define ML_IPC_TREEITEM_GETINFO 0x124
- #define ML_IPC_TREEITEM_SETINFO 0x125
- #define ML_IPC_TREEITEM_ADD 0x126
- #define ML_IPC_TREEITEM_DELETE 0x127
- #define ML_IPC_TREEITEM_SELECT 0x128
- #define ML_IPC_TREEITEM_GETROOT 0x129
- #define ML_IPC_TREEITEM_INSERT 0x130
- #define ML_IPC_TREEITEM_GETCHILD_ID 0x131
- #define ML_IPC_TREEITEM_GETNEXT_ID 0x132
- #define ML_IPC_TREEITEM_ADDW 0x133
- #define ML_IPC_TREEITEM_INSERTW 0x134
- #define ML_IPC_TREEITEM_SETINFOW 0x135
- #define ML_IPC_TREEITEM_GETINFOW 0x136
- #define MLTI_ROOT (INT_PTR)TVI_ROOT
- typedef struct {
- size_t size;
- UINT_PTR id;
- UINT_PTR parentId;
- char *title;
- size_t titleLen;
- BOOL hasChildren;
- int imageIndex;
- } MLTREEITEM;
- typedef struct {
- MLTREEITEM item;
- UINT mask;
- UINT_PTR handle;
- } MLTREEITEMINFO;
- typedef struct {
- size_t size;
- UINT_PTR id;
- UINT_PTR parentId;
- wchar_t *title;
- size_t titleLen;
- BOOL hasChildren;
- int imageIndex;
- } MLTREEITEMW;
- typedef struct {
- MLTREEITEMW item;
- UINT mask;
- UINT_PTR handle;
- } MLTREEITEMINFOW;
- #define MLTI_CHILDREN TVIF_CHILDREN
- #define MLTI_IMAGE TVIF_IMAGE
- #define MLTI_TEXT TVIF_TEXT
- #define MLTI_ID TVIF_PARAM
- #define ML_IPC_TREEIMAGE_ADD 0x140
- typedef struct _COLOR24
- {
- unsigned char rgbBlue;
- unsigned char rgbGreen;
- unsigned char rgbRed;
- }COLOR24;
- typedef void (*BMPFILTERPROC)(const COLOR24*, const COLOR24*, COLOR24*);
- #define FILTER_NO ((BMPFILTERPROC)NULL)
- #define FILTER_DEFAULT1 ((BMPFILTERPROC)1)
- #define FILTER_DEFAULT2 ((BMPFILTERPROC)2)
- #define MLTREEIMAGE_NONE 0
- #define MLTREEIMAGE_DEFAULT 1
- #define MLTREEIMAGE_BRANCH 2
- #define MLTREEIMAGE_BRANCH_EXPANDED 3
- #define MLTREEIMAGE_BRANCH_COLLAPSED 4
- #define MLTREEIMAGE_BRANCH_NOCHILD 5
- typedef struct {
- HINSTANCE hinst;
- int resourceId;
- int imageIndex;
- BMPFILTERPROC filterProc;
- int width;
- int height;
- } MLTREEIMAGE;
- #define ML_IPC_NEWPLAYLIST 0x107
- #define ML_IPC_IMPORTPLAYLIST 0x108
- #define ML_IPC_IMPORTCURRENTPLAYLIST 0x109
- #define ML_IPC_GETPLAYLISTWND 0x10A
- #define ML_IPC_SAVEPLAYLIST 0x10B
- #define ML_IPC_OPENPREFS 0x10C
- #define ML_IPC_PLAY_PLAYLIST 0x010D
- #define ML_IPC_LOAD_PLAYLIST 0x010E
- #define ML_IPC_REFRESH_PREFS 0x10F
- #define PL_FLAG_SHOW 1
- #define PL_FLAG_SWITCH 2
- #define PL_FLAGS_IMPORT 4
- #define PL_FLAG_FILL_FILENAME 8
- typedef struct
- {
- size_t size;
- const wchar_t *playlistName;
- const wchar_t *filename;
- int flags;
-
-
-
- int numItems;
- int length;
- } mlAddPlaylist;
- #define ML_IPC_PLAYLIST_ADD 0x180
- typedef struct
- {
- size_t size;
- const wchar_t *playlistName;
- int type;
- void *data;
- int flags;
- wchar_t filename[MAX_PATH];
- } mlMakePlaylistV2;
- typedef struct
- {
- size_t size;
- const wchar_t *playlistName;
- int type;
- void *data;
- int flags;
- } mlMakePlaylist;
- #define ML_IPC_PLAYLIST_MAKE 0x181
- #define ML_IPC_PLAYLIST_COUNT 0x182
- #define ML_IPC_PLAYLIST_INFO 0x183
- typedef struct
- {
-
- size_t size;
- size_t playlistNum;
-
- wchar_t playlistName[128];
- wchar_t filename[MAX_PATH];
- int numItems;
- int length;
- } mlPlaylistInfo;
- #define ML_IPC_GETFILEINFO 0x0200
- #define ML_IPC_FREEFILEINFO 0x0201
- #define ML_IPC_GETFILEINFOW 0x0202
- #define ML_IPC_FREEFILEINFOW 0x0203
- #define ML_IPC_HANDLEDRAG 0x0300
- #define ML_IPC_HANDLEDROP 0x0301
- #define ML_IPC_SENDTOWINAMP 0x0302
- typedef struct {
- int type;
- void *data;
- int enqueue;
-
-
- } mlSendToWinampStruct;
- typedef struct {
- char *desc;
- intptr_t context;
- intptr_t user32;
- } mlAddToSendToStruct;
- #define ML_IPC_ADDTOSENDTO 0x0400
- typedef struct {
- wchar_t *desc;
- intptr_t context;
- intptr_t user32;
- } mlAddToSendToStructW;
- #define ML_IPC_ADDTOSENDTOW 0x0401
- #define ML_IPC_BRANCHSENDTO 0x0402
- #define ML_IPC_ADDTOBRANCH 0x0403
- #define ML_IPC_HOOKTITLE 0x0440
- #define ML_IPC_HOOKEXTINFO 0x0441
- #define ML_IPC_HOOKEXTINFOW 0x0442
- #define ML_IPC_HOOKTITLEW 0x0443
- #define ML_HANDLEDRAG_FLAG_NOCURSOR 1
- #define ML_HANDLEDRAG_FLAG_NAME 2
- typedef struct {
- int type;
- void *data;
- int result;
- POINT p;
- int flags;
- char *name;
- } mlDropItemStruct;
- #define ML_IPC_SKIN_LISTVIEW 0x0500
- #define ML_IPC_UNSKIN_LISTVIEW 0x0501
- #define ML_IPC_LISTVIEW_UPDATE 0x0502
- #define ML_IPC_LISTVIEW_DISABLEHSCROLL 0x0503
- #define ML_IPC_LISTVIEW_DISABLEVSCROLL 0x050A
- #define ML_IPC_LISTVIEW_SHOWSORT 0x0504
- #define ML_IPC_LISTVIEW_SORT 0x0505
- typedef struct
- {
- INT_PTR listView;
- BOOL showSort;
- } LV_SKIN_SHOWSORT;
- typedef struct
- {
- INT_PTR listView;
- int columnIndex;
- BOOL ascending;
- } LV_SKIN_SORT;
- #define ML_IPC_SKIN_COMBOBOX 0x0508
- #define ML_IPC_UNSKIN_COMBOBOX 0x0509
- #define ML_IPC_SKIN_WADLG_GETFUNC 0x0600
-
-
-
-
-
-
-
-
- typedef struct
- {
- char *filename;
- char *title;
- char *ext;
- char *album;
- char *artist;
- char *comment;
- char *genre;
- int year;
- int track;
- int length;
- char **extended_info;
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- } itemRecord;
- typedef struct
- {
- itemRecord *Items;
- int Size;
- int Alloc;
- } itemRecordList;
- #include <time.h>
- typedef struct
- {
- wchar_t *key;
- wchar_t *value;
- } extendedInfoW;
- typedef struct
- {
- wchar_t *filename;
- wchar_t *title;
- wchar_t *ext;
- wchar_t *album;
- wchar_t *artist;
- wchar_t *comment;
- wchar_t *genre;
- wchar_t *albumartist;
- wchar_t *replaygain_album_gain;
- wchar_t *replaygain_track_gain;
- wchar_t *publisher;
- wchar_t *composer;
- int year;
- int track;
- int tracks;
- int length;
- int rating;
- int playcount;
- __time64_t lastplay;
- __time64_t lastupd;
- __time64_t filetime;
- int filesize;
- int bitrate;
- int type;
- int disc;
- int discs;
- int bpm;
- extendedInfoW *extended_info;
-
-
-
-
-
-
-
- wchar_t *category;
- } itemRecordW;
- typedef struct
- {
- itemRecordW *Items;
- int Size;
- int Alloc;
- } itemRecordListW;
- #define ML_IPC_DB_RUNQUERY 0x0700
- #define ML_IPC_DB_RUNQUERY_SEARCH 0x0701
- #define ML_IPC_DB_RUNQUERY_FILENAME 0x0702
- #define ML_IPC_DB_RUNQUERY_INDEX 0x0703
- #define ML_IPC_DB_FREEQUERYRESULTS 0x0705
- typedef struct
- {
- char *query;
- int max_results;
- itemRecordList results;
- } mlQueryStruct;
- #define ML_IPC_DB_RUNQUERYW 0x1700
- #define ML_IPC_DB_RUNQUERY_SEARCHW 0x1701
- #define ML_IPC_DB_RUNQUERY_FILENAMEW 0x1702
- #define ML_IPC_DB_RUNQUERY_INDEXW 0x1703
- #define ML_IPC_DB_FREEQUERYRESULTSW 0x1705
- typedef struct
- {
- wchar_t *query;
- int max_results;
- itemRecordListW results;
- } mlQueryStructW;
- #define ML_IPC_DB_UPDATEITEM 0x0706
- #define ML_IPC_DB_ADDORUPDATEITEM 0x0707
- #define ML_IPC_DB_REMOVEITEM 0x0708
- #define ML_IPC_DB_REMOVEITEMW 0x1708
- typedef struct
- {
- char* fileName;
- int meta_mode;
- int gues_mode;
- } LMDB_FILE_ADD_INFO;
- #define ML_IPC_DB_UPDATEFILE 0x0710
- #define ML_IPC_DB_ADDORUPDATEFILE 0x0711
- #define ML_IPC_DB_UPDATEITEMW 0x1706
- #define ML_IPC_DB_ADDORUPDATEITEMW 0x1707
- typedef struct
- {
- wchar_t* fileName;
- int meta_mode;
- int gues_mode;
- } LMDB_FILE_ADD_INFOW;
- #define ML_IPC_DB_UPDATEFILEW 0x1710
- #define ML_IPC_DB_ADDORUPDATEFILEW 0x1711
- #define ML_IPC_DB_SYNCDB 0x0709
- #define ML_IPC_ADD_PLUGIN 0x0750
- #define ML_IPC_REMOVE_PLUGIN 0x0751
- #define ML_IPC_SEND_PLUGIN_MESSAGE 0x0752
- typedef struct {
- int messageType;
- INT_PTR param1;
- INT_PTR param2;
- INT_PTR param3;
- } pluginMessage;
- #define ML_IPC_ENSURE_VISIBLE 0x0753
- #define ML_IPC_IS_VISIBLE 0x0754
- #define ML_IPC_GET_PARENTAL_RATING 0x0755
- #define ML_IPC_TOGGLE_VISIBLE 0x0756
- #define ML_IPC_FOCUS_TREE 0x0757
- #define WM_ML_CHILDIPC WM_APP+ 0x800
- #define ML_CHILDIPC_DROPITEM 0x100
- #define ML_CHILDIPC_GO_TO_SEARCHBAR 0x200
- #define ML_CHILDIPC_REFRESH_SEARCH 0x300
- #define ML_IPC_SETRATING 0x0900
- #define ML_IPC_GETRATING 0x0901
- typedef struct {
- int plentry;
- int rating;
- } pl_set_rating;
- #define ML_IPC_PL_SETRATING 0x0902
- #define ML_IPC_PL_GETRATING 0x0903
- typedef struct {
- HWND dialog_parent;
- const char *query;
- } ml_editquery;
- #define ML_IPC_EDITQUERY 0x0904
-
-
-
- typedef struct {
- HWND dialog_parent;
- const char *query;
- const char *name;
- int mode;
- } ml_editview;
- #define ML_IPC_EDITVIEW 0x0905
-
-
-
- #define ML_IPC_SET_FILE_RATING 0x0906
- #define ML_IPC_GET_FILE_RATING 0x0907
- typedef struct {
- const char* fileName;
- int newRating;
- } file_set_rating;
- #define ML_IPC_SMARTVIEW_COUNT 0x0908
- #define ML_IPC_SMARTVIEW_INFO 0x0909
- #define ML_IPC_SMARTVIEW_ADD 0x0910
- typedef struct
- {
-
- size_t size;
- size_t smartViewNum;
-
- wchar_t smartViewName[128];
- wchar_t smartViewQuery[512];
- int mode;
- int iconImgIndex;
- int treeItemId;
- } mlSmartViewInfo;
- #define ML_IPC_SET_FILE_RATINGW 0x0911
- #define ML_IPC_GET_FILE_RATINGW 0x0912
- typedef struct {
- const wchar_t *fileName;
- int newRating;
- } file_set_ratingW;
- void freeRecordList(itemRecordList *obj);
- void emptyRecordList(itemRecordList *obj);
- void freeRecord(itemRecord *p);
- void copyRecordList(itemRecordList *out, const itemRecordList *in);
- void copyRecord(itemRecord *out, const itemRecord *in);
- void allocRecordList(itemRecordList *obj, int newsize, int granularity
- #ifdef __cplusplus
- =1024
- #endif
- );
- char *getRecordExtendedItem(const itemRecord *item, const char *name);
- void setRecordExtendedItem(itemRecord *item, const char *name, char *value);
- #ifdef __cplusplus
- void freeRecordList(itemRecordListW *obj);
- void emptyRecordList(itemRecordListW *obj);
- void freeRecord(itemRecordW *p);
- wchar_t *getRecordExtendedItem(const itemRecordW *item, const wchar_t *name);
- void setRecordExtendedItem(itemRecordW *item, const wchar_t *name, const wchar_t *value);
- void copyRecordList(itemRecordListW *out, const itemRecordListW *in);
- void copyRecord(itemRecordW *out, const itemRecordW *in);
- void allocRecordList(itemRecordListW *obj, int newsize, int granularity=1024);
- void convertRecord(itemRecord *output, const itemRecordW *input);
- void convertRecord(itemRecordW *output, const itemRecord *input);
- void convertRecordList(itemRecordList *output, const itemRecordListW *input);
- void convertRecordList(itemRecordListW *output, const itemRecordList *input);
- #endif
- #define ML_IPC_GRACENOTE 0x1000
- #define GRACENOTE_TUID 1
- #define GRACENOTE_IS_WORKING 2
- #define GRACENOTE_DO_TIMER_STUFF 3
- #define GRACENOTE_CANCEL_REQUEST 4
- #define ML_IPC_FLICKERFIX 0x1002
- #define FFM_ERASE 0x00000000
- #define FFM_FORCEERASE 0x01000000
- #define FFM_NOERASE 0x02000000
- #define FFM_ERASEINPAINT 0x04000000
- typedef struct _FLICKERFIX
- {
- HWND hwnd;
- DWORD mode;
- }FLICKERFIX, *PFLICKERFIX;
- #define ML_IDC_DRAGDROP 107
- #endif
|