⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 minilyricsplugin.h

📁 这是一个用于歌词下载、上传、匹配的源代码
💻 H
字号:

#ifndef _MINILYRICS_PLUGIN_HEADER_
#define _MINILYRICS_PLUGIN_HEADER_

#define ML_IF_VERSION			0x10	// minilyrics's interface version 1.0
#define ML_PLAYER_IF_VERSION	0x10	// player's interface version 1.0

typedef long MLPARAM;

//
// Minilyrics.dll supported interface
typedef long (*FUNMLService)(int nCommand, MLPARAM Param1, MLPARAM Param2);

// Minilyrics service struct definition
typedef struct 
{
	UINT			uSize;
	UINT			uVersion;
	FUNMLService	funMLService;
}MLServiceEntry;


//
// Your player should supported interface
typedef long (*FUNPlayerService)(int nCommand, MLPARAM Param1, MLPARAM Param2);

// player service struct definition
typedef struct
{
	UINT			uSize;
	UINT			uVersion;
	FUNPlayerService	funPlayerService;
}PlayerServiceEntry;

typedef MLServiceEntry *(*FUNMiniLyricsInitEntryPoint)(PlayerServiceEntry *IfPlayer);

enum MLCommand
{
	MLInit				= 0,		// param1: HINSTANCE, param2: unused
	MLQuit				= 1,		// param1: unused, param2: unused
	MLConfig			= 2,		// param1: window handle of config parent, param2: unused
	MLAbout				= 3,		// param1: window handle of about parent, param2: unused
	MLTitleChanged		= 4,	// param1: const char * media title: artist - title, param2, unused
	MLPlayerStateChanged= 5,// param1: player state, 1-stop, 2-play, 3-pause
	MLPlayPosChanged	= 6,// param1: media playing pos, ms.
	MLLog				= 7,	// write log, param1: log message;
	MLAddWndCloseToHWND			= 8,	// Add the wnd minilyrics auto close to when move.param1, hWnd
	MLAddWndCloseToName			= 9,	// Add the wnd minilyrics auto close to when move.param1, Classname, param2, wnd name

	MLGetMainWnd				= 10,	// return the main window of minilyrics
	MLNotifyPlayerActive		= 11,	// Notify to minilyrics the player window is activate, param1, true=activate, false = deactivate
	MLNotifyPlayerMinRestore	= 12,	// Notify to minilyrics the player is minmize or restore,param1: SIZE_MINIMIZED, SIZE_RESTORED

	// messages notify to minilyrics that player window is moving, so minilyrics window can "track" moving.
	MLNotifyBeforeTrackMove		= 13,	// Notify to minilyrics that the player main window is about to move, usually is WM_LBUTTONDOWN messge.
	MLNotifyTrackMove			= 14,	// WM_MOVE notify to minilyrics, Param1 = x, Param2 = y

	MLNotifySkinChanged			= 15,	// when the player's skin changed, notify to minilyrics.

	MLWndProc					= 16,	// send window message to player, param1 = MSG struct, only message, lParam, wParam is valid.

	MLGetCodePage				= 17,	// get the code page

	MLGetSkinMode				= 18,	// return the minilyrics skin mode. 1: player's skin, 2, MiniLyrics' skin

	MLSetWa5Bmp					= 19,	// set the winamp5's bitmaps, param1: 1, winamp5's scrollbar, param2: BITMAP HANDLE.
};

#define MY_WM_WINAMP3		(WM_USER + 1)
#define WP_PAINT			1			// lParam, HDC
#define WP_ONCREATE			2			// lParam, HWND of minilyrics for winamp3
#define WP_SETLYRICSHOWRECT		3		// lParam, RECT *, new rect of lyrics show object


enum PLAYER_STATE
{
	PS_STOPED				= 1,
	PS_PLAYING				= 2,
	PS_PAUSED				= 3
};

enum PlayerIFCommand
{
	cmdPlay				= 1,
	cmdPause			= 2,
	cmdPlayPause		= 3,
	cmdStop				= 4,
	cmdPrev				= 5,
	cmdNext				= 6,
	cmdSeek				= 7,	// param1, seek pos, ms
	cmdOpen				= 8,

	cmdGetPos			= 10,	// param1, long * pos, ms
	cmdGetMediaLength	= 11,	// param1, long * length, ms
	cmdGetSourceMedia	= 12,	// param1, const char *buffer, param2, buffer length
	cmdGetArtist		= 13,	// param1, const char *buffer, param2, buffer length
	cmdGetFullTitle		= 14,	// param1, const char *buffer, param2, buffer length
	cmdGetTitle			= 15,	// param1, const char *buffer, param2, buffer length
	cmdGetAlbum			= 16,	// param1, const char *buffer, param2, buffer length
	cmdGetPlayerState	= 17,	// return player state,1-stop, 2-play, 3-pause
	cmdGetPlayerName	= 18,	// param1, const char *buffer, param2, buffer length
	cmdInit				= 19,	// init the player interface
	cmdQuit				= 20,	// quit the player interface

	// for special player(winamp2?)
	cmdGetCurSkinPath	= 30,	// param1, const char *buffer, param2, buffer length
	cmdGetProxy			= 31,	// param1, const char *buffer, param2, buffer length

	cmdGetMainWnd		= 32,	// return the player's main window
	cmdWinamp3Resize	= 33,	// resize command for _winamp3 special, param1, RECT*
	cmdHasVideo			= 34,	// if has video, return 1, if has not return 0, if not implemented, return -1

	cmdGetPlayerPlugInstance	= 35, // return the install of player plugin

	cmdCodePageChanged	= 36,	// notify to the player that the code has been changed., param1; DWORD dwCodePage

	cmdGetPluginParentWnd	= 37,	// for winamp5, return the plugin(minilyrics)'s parent window.
									// Param1: (RECT*) the rect of the plugin.

	notifySkinCreated		= 38,	// for winamp5, MiniLyrics Loaded the skin, 
									// notify to player to do something.

	cmdSetTimeUpdateFreq	= 39,	// set play time postion's update frequency
									// 0: slow, 1 : normal: 2: fast
};

//
// Player plugin should call minilyrics entry point init function 
// "MiniLyricsInitEntryPoint" to load minilyrics.
//

#endif	// _MINILYRICS_PLUGIN_HEADER_

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -