forked from nulled666/nppqcp
-
Notifications
You must be signed in to change notification settings - Fork 0
/
NppQCP.h
73 lines (47 loc) · 2 KB
/
NppQCP.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
#ifndef PLUGINDEFINITION_H
#define PLUGINDEFINITION_H
#include "PluginInterface.h"
#include "csscolorparser.hpp"
const TCHAR NPP_PLUGIN_NAME[] = TEXT("Quick Color Picker +");
const TCHAR NPP_PLUGIN_VER[] = TEXT("1.0");
const int COMMNAD_COUNT = 7;
void AttachDll(HANDLE module);
void PluginInit();
void PluginCleanUp();
void LoadConfig();
void SaveConfig();
void InitCommandMenu();
void commandMenuCleanUp();
bool setCommand(size_t index, TCHAR *cmdName, PFUNCPLUGINCMD pFunc, ShortcutKey *sk = NULL, bool check0nInit = false);
////////////////////////////////////////////
void InvokeColorPicker(bool use_screen_picker = false);
void InsertByPalette();
void PickFromScreen();
void ToggleQCP();
void ToggleColorHighlight();
void VisitWebsite();
HWND GetScintilla();
void CreateMessageWindow();
void DestroyMessageWindow();
LRESULT CALLBACK MessageWindowWinproc(HWND hwnd, UINT message, WPARAM wparam, LPARAM lparam);
void AddNppSubclass();
void RemoveNppSubclass();
LRESULT CALLBACK NppSubclassProc(HWND hwnd, UINT message, WPARAM wparam, LPARAM lparam, UINT_PTR uIdSubclass, DWORD_PTR dwRefData);
void CreateColorPicker();
bool ShowColorPicker();
void HideColorPicker();
bool HasSelection();
void PlaceColorPickerAt(HWND h_scintilla, int pos);
bool CheckSelectionForHexColor(const HWND h_scintilla, const int start, const int end);
bool CheckSelectionForBracketColor(const HWND h_scintilla, const int start, const int end);
void WriteColor(COLORREF color);
void LoadRecentColor();
void SaveRecentColor();
void HighlightColorCode();
void EmptyColorMarker();
bool SaveColorMarker(CSSColorParser::Color color, int marker_start, int marker_end);
void FindHexColor(const HWND h_scintilla, const int start_position, const int end_position);
void FindBracketColor(const HWND h_scintilla, const int start_position, const int end_position, char* suff);
void DrawColorMarkers(const HWND h_scintilla);
void ClearColorMarkers();
#endif //PLUGINDEFINITION_H