📄 qcdmoddefs.h
字号:
//-----------------------------------------------------------------------------
//
// File: QCDModDefs.h
//
// About: Module definitions file. Miscellanious definitions used by different
// module types. This file is published with the plugin SDKs.
//
// Authors: Written by Paul Quinn and Richard Carlson.
//
// Copyright:
//
// QCD multimedia player application Software Development Kit Release 1.0.
//
// Copyright (C) 1997-2002 Quinnware
//
// This code is free. If you redistribute it in any form, leave this notice
// here.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
//
//-----------------------------------------------------------------------------
#ifndef QCDMODDEFS_H
#define QCDMODDEFS_H
#include <mmreg.h>
#include <windows.h>
#ifdef __cplusplus
#define PLUGIN_API extern "C" __declspec(dllexport)
#else
#define PLUGIN_API __declspec(dllexport)
#endif
// Current plugin version
// use this version for old style API calls (all returned text in native encoding)
#define PLUGIN_API_VERSION 250
// use this version for new style API calls (all returned text in UTF8 encoding on WinNT/2K/XP (native encoding on Win9x))
#define PLUGIN_API_VERSION_WANTUTF8 ((PLUGIN_API_WANTUTF8<<16)|PLUGIN_API_VERSION)
#define PLUGIN_API_WANTUTF8 100
//-----------------------------------------------------------------------------
typedef struct
{
char *moduleString;
char *moduleExtensions;
} QCDModInfo;
//-----------------------------------------------------------------------------
// Services (ops) provided by the Player
//-----------------------------------------------------------------------------
typedef enum
{ //*** below returns numeric info (*buffer not used)
opGetPlayerVersion = 0, // high-order word = major version (eg 3.01 is 3), low-order word = minor (eg 3.01 = 1)
opGetParentWnd = 1, // handle to player window
opGetPlayerInstance = 2, // HINSTANCE to player executable
opGetPlayerState = 9, // get current state of the player (returns: 1 = stopped, 2 = playing, 3 = paused, 0 = failed)
opGetNumTracks = 10, // number of tracks in playlist
opGetCurrentIndex = 11, // index of current track in playlist (0 based)
opGetNextIndex = 12, // get index of next track to play (0 based), param1 = index start index. -1 for after current
opGetTrackNum = 13, // get track number of index, param1 = index of track in playlist, -1 for current
// - 'track number' is the number of the track in it's respective album, as opposed to playlist number
// - the 'track number' for digital files will be 1 if the tag is not set or the file is not identified
opGetTrackLength = 14, // get track length, param1 = index of track in playlist, -1 for current
// param2 = 0 for seconds, 1 for milliseconds
opGetTime = 15, // get time on player, param1 = 0 for time displayed, 1 for track time, 2 for playlist time
// param2 = 0 for elapsed, 1 for remaining
opGetTrackState = 16, // get whether track is marked, param1 = index of track, -1 for current
opGetPlaylistNum = 17, // get playlist number of index, param1 = index of track in playlist, -1 for current
opGetMediaType = 18, // get media type of track, param1 = index if track in playlist, -1 for current
// - see MediaTypes below for return values
opGetAudioInfo = 19, // get format info about currently playing track
// - param1 = 0 for samplerate, 1 for bitrate, 2 for num channels
opGetOffline = 20, // true if client is in Offline Mode
opGetVisTarget = 21, // where is vis being drawn > 0 - internal to skin, 1 - external window, 2 - full screen
opGetAlwaysOnTop = 22, // true if player is set to 'Always on Top'
opGetRepeatState = 23, // returns: 0 - repeat off, 1 - repeat track, 2 - repeat all
opGetShuffleState = 27, // returns: 0 - shuffle off, 1 - shuffle enabled
opGetTimerState = 24, // low-order word: 0 - track ascend, 1 - playlist ascend, 2 - track descend, 3 - playlist descend
// hi-order word: 1 if 'show hours' is set, else 0
opGetVolume = 25, // get master volume level (0 - 100), param1: 0 = combined, 1 = left, 2 = right
opSetVolume = 26, // set master volume level, param1: vol level 0 - 100, param2: balance (-100 left, 0 center, 100 right)
opGetIndexFromPLNum = 28, // get index from playlist number, param1 = playlist number
opGetExtensionWnd = 30, // handle to the draggable window extension (only available on some skins), param1 = extension number (0 - 9)
opGetExtVisWnd = 31, // handle to the external visual window
opGetMusicBrowserWnd = 32, // handle to the music browser window
opGetSkinPreviewWnd = 33, // handle to the skin preview window
opGetPropertiesWnd = 34, // handle to the player properties window
opGetExtInfoWnd = 35, // handle to the extended information window
opGetAboutWnd = 36, // handle to the about window
opGetSegmentsWnd = 37, // handle to the segments window
opGetEQPresetsWnd = 38, // handle to the EQ presets window
opGetVideoWnd = 39, // handle to the video window
opGetVisDimensions = 50, // gets the width and height of visual window (param1 = -1 current vis window, 0 internal vis, 1 external vis, 2 full screen)
// returns: HEIGHT in high word, WIDTH in low word
opShowVideoWindow = 55, // Show or Close video window (param1 = 1 for create, 2 for create and show, 0 for close)
opGetQueriesComplete = 60, // get status on whether all tracks in playlist have been queryied for their info
// playlist manipulation
opDeleteIndex = 90, // delete index from playlist (param1 = index)
opSelectIndex = 91, // mark index as selected (param1 = index, param2 = 1 - set, 0 - unset)
opBlockIndex = 92, // mark index as blocked (param1 = index, param2 = 1 - set, 0 - unset)
opGetMediaInfo = 99, // get the ICddbDisc object for the index specified, param1 = index of track, -1 for current
// param2 = pointer to integer that receives track value
// returns: pointer to ICddbDisc object. Do not release or deallocate this pointer
//*** below returns string info in buffer, param1 = size of buffer
//*** returns 1 on success, 0 on failure
opGetTrackName = 100, // get track name, param2 = index of track in playlist, -1 for current
opGetArtistName = 101, // get artist name, param2 = index of track in playlist, -1 for current
opGetDiscName = 102, // get disc name, param2 = index of track in playlist, -1 for current
opGetTrackFile = 103, // file name of track in playlist, param2 = index of track in playlist, -1 for current
opGetSkinName = 104, // get current skin name
opGetPluginFolder = 105, // get current plugin folder
opGetPluginSettingsFile = 106, // get settings file (plugins.ini) that plugin should save settings to
opGetPluginCacheFile = 107, // get file that describes plugin validity, functions and names
opGetPlayerSettingsFile = 108, // get settings file (qcd.ini) that player saves it settings to (should use for read-only)
opGetMusicFolder = 110, // get current music folder
opGetPlaylistFolder = 111, // get current playlist folder
opGetSkinFolder = 112, // get current skin folder
opGetCDDBCacheFolder = 113, // get current folder for CDDB cached info
opGetCurrentPlaylist = 114, // get full pathname of playlist currently loaded
opGetMediaID = 115, // get media identifier, param2 = index of track in playlist, -1 for current
// - for CD's it's the TOC - for anything else, right now it's 0
opGetSupportedExtensions = 116, // get file extensions supported by the player, param2 = 0 - get all extensions, 1 - get registered extensions
// - returned extensions will be colon delimited
opGetPlaylistString = 117, // get string for index as it appears in playlist, param2 = index
//*** below buffer points to struct or other object
//*** returns 1 on success, 0 on failure
opShowMainMenu = 120, // Display Main QCD Menu (buffer = POINT* - location to display menu)
opGetMainMenu = 121, // Returns copy of HMENU handle to QCD Menu (must use DestroyMenu on handle when complete)
opShowQuickTrack = 125, // Display QuickTrack Menu (buffer = POINT* - location to display menu)
opGetQuickTrack = 126, // Returns copy of HMENU handle to QuickTrack menu (must use DestroyMenu on handle when complete)
// To use if QuickTrack item selected: PostMessage(hwndPlayer, WM_COMMAND, menu_id, 0);
opGetEQVals = 200, // get current EQ levels/on/off (buffer = EQInfo*)
opSetEQVals = 201, // set EQ levels/on/off (buffer = EQInfo*)
opGetProxyInfo = 202, // get proxy info (buffer = ProxyInfo*), returns 0 if proxy not in use
//*** below returns numeric info, buffer used
opGetIndexFromFilename = 210, // get the index of a file that exists in current playlist (buffer = full path of file),
// param1 = startindex (index to start searching on)
// returns -1 if file not in playlist
//*** below send information to player
//*** returns 1 on success, 0 on failure
opSetStatusMessage = 1000, // display message in status area (buffer = msg buffer (null term), param1 = text flags (see below))
opSetBrowserUrl = 1001, // set music browser URL (buffer = url (null term))
// null url buffer - closes browser
// param1 = 0 - normal, 1 - force open
opSetAudioInfo = 1002, // set the current music bitrate/khz (buffer = AudioInfo*, param1 = size of AudioInfo)
opSetTrackAlbum = 1003, // update track ablum name (buffer = album (null term), param1 = (string ptr)file name), param2 = MediaTypes
opSetTrackTitle = 1004, // update track title (buffer = title (null term), param1 = (string ptr)file name), param2 = MediaTypes
opSetTrackArtist = 1005, // update track artist name (buffer = artist (null term), param1 = (string ptr)file name), param2 = MediaTypes
opSetTrackExtents = 1007, // update track TrackExtents info (buffer = &TrackExtents), param1 = (string ptr)file name)
opSetTrackSeekable = 1008, // update track seekable flag (buffer = (string ptr)file name), param1 = TRUE/FALSE
opSetPlayNext = 1009, // set the next index to be played (buffer = NULL, param1 = index, index = -1 unsets playnext)
opSetIndexFilename = 1010, // updates the filename (or stream) that an index in the current playlist refers to, buffer = new filename, param1 = index
opSetPlaylist = 1006, // clear playlist, add files to playlist or reset playlist with new files
// buffer = file list (each file in quotes, string null terminated) Eg; buffer="\"file1.mp3\" \"file2.mp3\"\0" - NULL to clear playlist
// param1 = (string ptr)originating path (can be NULL if paths included with files)
// param2 = 1 - clear playlist flag, 2 - enqueue to top
opInsertPlaylist = 1011, // insert tracks into playlist
// buffer = file list (each file in quotes, string null terminated) Eg; buffer="\"file1.mp3\" \"file2.mp3\"\0"
// param1 = (string ptr)originating path (can be NULL if paths included with files)
// param2 = index location to insert tracks (-1 to insert at end)
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -