forked from rururutan/ckw-mod
/
ckw.h
61 lines (53 loc) · 1.6 KB
/
ckw.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
#pragma once
#ifndef CKW_H
#define CKW_H 1
#define _WIN32_WINNT _WIN32_WINNT_WINXP
#define _WIN32_IE 0x0600
#define _UNICODE 1
#define UNICODE 1
#include <windows.h>
#include <windowsx.h>
#include <wchar.h>
#ifndef _MSC_VER
#include "compat.h"
#endif
#ifdef _MSC_VER
#define strcasecmp _stricmp
#endif
#ifndef COMMON_LVB_LEADING_BYTE
#define COMMON_LVB_LEADING_BYTE 0x0100
#endif
#ifndef COMMON_LVB_TRAILING_BYTE
#define COMMON_LVB_TRAILING_BYTE 0x0200
#endif
#define CSI_WndCols(csi) ((csi)->srWindow.Right - (csi)->srWindow.Left +1)
#define CSI_WndRows(csi) ((csi)->srWindow.Bottom - (csi)->srWindow.Top +1)
/* main.cpp */
extern HANDLE gStdIn;
extern HANDLE gStdOut;
extern DWORD gFontW;
extern DWORD gFontH;
extern DWORD gBorderSize;
extern CONSOLE_SCREEN_BUFFER_INFO* gCSI;
extern CHAR_INFO* gScreen;
void makeNewWindow();
/* selection.cpp */
bool selectionGetArea(SMALL_RECT& sr);
void selectionClear(HWND hWnd);
void onLBtnDown(HWND hWnd, int x, int y);
void onLBtnUp(HWND hWnd, int x, int y);
void onMouseMove(HWND hWnd, int x, int y);
/* misc.cpp */
void copyChar(wchar_t*& p, CHAR_INFO* src, SHORT start, SHORT end, bool ret = true);
void copyStringToClipboard(HWND hWnd, const wchar_t * str);
void copyAllStringToClipboard(HWND hWnd);
void onPasteFromClipboard(HWND hWnd);
void onDropFile(HDROP hDrop);
void sysmenu_init(HWND hWnd);
BOOL onSysCommand(HWND hWnd, DWORD id);
void sysicon_init(HWND hWnd, HICON icon, const wchar_t* title, bool alwaysTray);
void sysicon_destroy(HWND hWnd);
void updateTrayTip(HWND hWnd, const wchar_t* title);
void desktopToTray(HWND hWnd);
void trayToDesktop(HWND hWnd);
#endif /* CKW_H */