📄 vis_spectrum.h
字号:
#if !defined(__VisSpectrum_H_)
#define __VisSpectrum_H_
#define PLUGIN_DESC "Spectrum Analyser"
#define DEFAULT_LATENCY 0
#define DEFAULT_DELAY 25
#define CONFIG_FILE "plugin.ini"
#define IDR_MAINCURSOR 208
#define INIT_FAIL 1
#define INIT_SUCCESS 0
#define PLUGIN_KEY "VS_SAVEDATA_0x1F"
#define PLUGIN_TOGGLE 40192 // the winamp id to toggle the plugin
#define WINAMP_PLAYFILE 0x000003F6
// user messages (for lParam)
#define USR_REDRAWWINDOW 100
#define USR_HIDE 101
#define USR_SHOW 102
#define USR_DOUBLESIZE 103
#define USR_CLOSETHREAD 104
// effects
#define EFFECT_DROP 0
#define EFFECT_WAVE 1
#define STD_WIDTH 275
#define STD_HEIGHT 116
// macro to replace previous function
#define SetDoubleSize(hWnd, wParam) ((SendMessage(((hWnd)),((WM_USER)),((wParam)),((USR_DOUBLESIZE)))))
// can't be bothered with windowsx.h
#ifndef GET_X_LPARAM
#define GET_X_LPARAM(lp) ((int)(short)LOWORD(lp))
#endif
#ifndef GET_Y_LPARAM
#define GET_Y_LPARAM(lp) ((int)(short)HIWORD(lp))
#endif
const char* const g_lpszClassName = "vis_spectrum";
#include "cwin32window.h"
#include "vis.h"
#include "docking.h"
#include "wafuncs.h"
// This structure contains the saved settings for the plugin.
// These are all read/written to the file for options etc.
typedef struct {
unsigned long ulLeft; // left position of window
unsigned long ulTop; // top position of window
unsigned long ulWidth; // width of window (not used)
unsigned long ulHeight; // height of window (not used)
unsigned long ulWindowSnap; // window snap distance (def = 10)
bool bSnapWindow; // want window snap (def = true)
bool bDoubleSize; // want double size (def = false)
bool bDimTitleBar; // dim title bar (def = true)
bool bSaveWndPos; // save window pos (def = true)
// "look" settings
bool bWinampCursor; // use winamp cursor (def = true)
bool bWantPeaks; // want peaks (def = true)
bool bWantBars; // want bars (def = true)
bool bWantGrid; // want the grid (def = true)
unsigned char uchBarWidth; // width of a bar (def = 4)
unsigned char uchBarHorzGap; // horizontal bar gap (def = 1)
unsigned char uchBarVertGap; // vertical gap (def = 1)
unsigned char uchPeakDelay; // delay (in frames) (def = 20)
unsigned char uchPeakDrop; // speed of peak drop (def = 4)
unsigned char uchDefaultDrop; // speed of def drop (def = 2)
unsigned char uchMaxIncrease; // max increase (def = ?)
unsigned char uchMaxDecrease; // max decrease (def = ??)
unsigned char uchGridWidth; // grid vert gap (def = 1)
unsigned char uchGridVertGap; // grid horz gap (def = 4)
unsigned char uchGridHorzGap; // horz grid gap (def = 1)
bool bFilter; // want bar filter (def = false)
bool bRemap; // want to remap bars (def = true)
int nLatency; // latency (def = 25)
int nDelayMS; // delay between frame (def = 25)
unsigned char uchBarStyle; // bar style, 0, 1, 2 (def = 1)
} VS_SAVEDATA;
// This structure is for the global variables.
typedef struct {
CWin32Window Window; // The Window
HWND hWndMain; // Handle to the Window
HWND hWndParent; // Handle to the Parent
HWND hCurDlg; // Handle to the current dialog
HBITMAP hMemBmp; // Handle to memory bitmap
HBITMAP hOldBmp; // Handle to old bitmap
HBITMAP hOldBltBmp; // Handle to old bitmap
HBITMAP hBmpSkin; // Handle to skin
HBITMAP hBmpDIBSection; // Handle to dib section
HDC hMemDC; // Handle to memory dc
HDC hBltDC;
bool bMouseDown; // True if mouse is down
bool bWindowActive; // True if window is active
bool bInConfig; // True if in config mode
RECT rcDrawingRect; // Drawing Rectangle
RECT rcTitleBar; // Title Bar Rectangle
RECT rcQuitButton; // Quit Btn Rectangle
LPVOID lpDIBits; // Pointer to DIB Bits
BITMAP Bit; // Bitmap Structure for DIB info
VS_SAVEDATA Settings; // Settings Data
} VS_PLUGINVARS;
#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -