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
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
|
#ifndef __LINUX_UI__
#define __LINUX_UI__
/// includes
#include <gtk/gtk.h>
#include <linux/limits.h>
#include <stdio.h>
#include <inttypes.h>
#include <string.h>
#include <stdlib.h>
#include "linuxLD.h"
// 4000 ICON "ldmicro.ico"
/// version control
#define LDMicro_VERSION_MAJOR 1
#define LDMicro_VERSION_MINOR 0
/// Flags
/// message box
#define MB_OK 0x00000001L
#define MB_OKCANCEL 0x00000002L
#define MB_YESNO 0x00000004L
#define MB_YESNOCANCEL 0x00000008L
#define IDOK 1
#define IDCANCEL 2
#define IDYES 3
#define IDNO 4
#define MB_ICONERROR 0x00000010L
#define MB_ICONQUESTION 0x00000020L
#define MB_ICONWARNING 0x00000040L
#define MB_ICONINFORMATION 0x00000080L
/// open/save file
#define OFN_PATHMUSTEXIST 0x00000100L
#define OFN_HIDEREADONLY 0x00000200L
#define OFN_OVERWRITEPROMPT 0x00000400L
/// window brushes
#define BS_SOLID 0x00000001L
#define BS_HOLLOW 0x00000002L
#define BLACK_BRUSH 0x00000004L
#define WHITE_BRUSH 0x00000008L
#define GREY_BRUSH 0x00000010L
/// Font flags
#define FW_REGULAR 0x00000001L
#define FW_BOLD 0x00000002L
/// EnableMenuItem variables
extern const UINT MF_ENABLED;
extern const UINT MF_GRAYED;
extern const UINT MF_CHECKED;
extern const UINT MF_UNCHECKED;
/// ListStore
extern GtkWidget *view;
extern GtkTreeViewColumn *column;
/// Structures
typedef struct OpenFileInfoData {
DWORD lStructSize;
HWID parentWindow;
LPTSTR lpstrFile;
LPCTSTR lpstrFilter;
DWORD nMaxFile;
LPCTSTR lpstrTitle;
DWORD Flags;
LPCTSTR lpstrDefExt;
} OPENFILENAME;
/// Variables
extern COLORREF HdcCurrentTextColor;
/// functions
BOOL isFocus(HWID window);
COLORREF RGB(int red,
int green,
int blue);
int MessageBox(HWID pWindow,
char* message,
char* title,
UINT mFlags);
BOOL GetSaveFileName(OPENFILENAME *ofn);
void EnableMenuItem(HMENU MenuName,
HMENU MenuItem,
UINT CheckEnabledItem);
void CheckMenuItem(HMENU MenuName,
HMENU MenuItem,
UINT Check);
HANDLE GetStockObject(int fnObject);
void SelectObject(HCRDC hcr,
HFONT hfont);
HBRUSH CreateBrushIndirect(PLOGBRUSH plb);
HFONT CreateFont(int nHeight,
int nWidth,
int nOrientation,
int fnWeight,
DWORD fdwItalic,
LPCTSTR lpszFace);
void SetBkColor(HWID widget,
HCRDC hcr,
COLORREF bkCol);
void SetTextColor(HCRDC hcr,
COLORREF color);
void TextOut(HCRDC hcr,
int nXStart,
int nYStart,
LPCTSTR lpString,
int cchString);
COLORREF GetTextColor(HCRDC Hdc);
BOOL InvalidateRect(
HWID hWId,
const RECT *lpRect,
BOOL bErase);
#endif
|