mf/tests: Test IMediaObject_GetOutputSizeInfo.
[wine.git] / programs / regedit / main.h
blob310469f83f6fdad4fb18858ee5c275f8f5152b42
1 /*
2 * Regedit definitions
4 * Copyright (C) 2002 Robert Dickenson <robd@reactos.org>
6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Lesser General Public
8 * License as published by the Free Software Foundation; either
9 * version 2.1 of the License, or (at your option) any later version.
11 * This library is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * Lesser General Public License for more details.
16 * You should have received a copy of the GNU Lesser General Public
17 * License along with this library; if not, write to the Free Software
18 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
21 #ifndef __MAIN_H__
22 #define __MAIN_H__
24 #include <stdio.h>
25 #include <stdlib.h>
26 #include "resource.h"
28 #define STATUS_WINDOW 2001
29 #define TREE_WINDOW 2002
30 #define LIST_WINDOW 2003
32 #define SPLIT_WIDTH 5
34 #define MAX_NEW_KEY_LEN 128
35 #define KEY_MAX_LEN 1024
37 #define REG_FORMAT_5 1
38 #define REG_FORMAT_4 2
40 /* Pop-Up Menus */
41 #define PM_COMPUTER 0
42 #define PM_TREEVIEW 1
43 #define PM_NEW_VALUE 2
44 #define PM_MODIFY_VALUE 3
46 /* HexEdit Class */
47 #define HEM_SETDATA (WM_USER+0)
48 #define HEM_GETDATA (WM_USER+1)
50 /******************************************************************************/
52 enum OPTION_FLAGS {
53 OPTIONS_AUTO_REFRESH = 0x01,
54 OPTIONS_READ_ONLY_MODE = 0x02,
55 OPTIONS_CONFIRM_ON_DELETE = 0x04,
56 OPTIONS_SAVE_ON_EXIT = 0x08,
57 OPTIONS_DISPLAY_BINARY_DATA = 0x10,
58 OPTIONS_VIEW_TREE_ONLY = 0x20,
59 OPTIONS_VIEW_DATA_ONLY = 0x40,
62 enum SEARCH_FLAGS {
63 SEARCH_WHOLE = 0x01,
64 SEARCH_KEYS = 0x02,
65 SEARCH_VALUES = 0x04,
66 SEARCH_CONTENT = 0x08,
69 typedef struct {
70 HWND hWnd;
71 HWND hTreeWnd;
72 HWND hListWnd;
73 int nFocusPanel; /* 0: left 1: right */
74 int nSplitPos;
75 WINDOWPLACEMENT pos;
76 WCHAR szPath[MAX_PATH];
77 } ChildWnd;
78 extern ChildWnd* g_pChildWnd;
80 typedef struct tagLINE_INFO
82 WCHAR *name;
83 DWORD dwValType;
84 void *val;
85 size_t val_len;
86 } LINE_INFO;
88 /*******************************************************************************
89 * Global Variables:
91 extern HINSTANCE hInst;
92 extern HWND hFrameWnd;
93 extern HMENU hMenuFrame;
94 extern HWND hStatusBar;
95 extern HMENU hPopupMenus;
96 extern HFONT hFont;
97 extern enum OPTION_FLAGS Options;
99 extern const WCHAR szChildClass[];
100 extern WCHAR g_pszDefaultValueName[];
102 extern DWORD g_columnToSort;
103 extern BOOL g_invertSort;
104 extern WCHAR *g_currentPath;
105 extern HKEY g_currentRootKey;
107 /* Registry class names and their indexes */
108 extern const WCHAR* reg_class_namesW[];
109 #define INDEX_HKEY_LOCAL_MACHINE 0
110 #define INDEX_HKEY_USERS 1
111 #define INDEX_HKEY_CLASSES_ROOT 2
112 #define INDEX_HKEY_CURRENT_CONFIG 3
113 #define INDEX_HKEY_CURRENT_USER 4
114 #define INDEX_HKEY_DYN_DATA 5
116 /* about.c */
117 void ShowAboutBox(HWND hWnd);
119 /* childwnd.c */
120 LPWSTR GetItemFullPath(HWND hwndTV, HTREEITEM hItem, BOOL bFull);
121 LRESULT CALLBACK ChildWndProc(HWND, UINT, WPARAM, LPARAM);
123 /* edit.c */
124 BOOL CreateKey(HWND hwnd, HKEY hKeyRoot, LPCWSTR keyPath, LPWSTR newKeyName);
125 BOOL CreateValue(HWND hwnd, HKEY hKeyRoot, LPCWSTR keyPath, DWORD valueType, LPWSTR valueName);
126 BOOL ModifyValue(HWND hwnd, HKEY hKeyRoot, LPCWSTR keyPath, LPCWSTR valueName);
127 BOOL DeleteKey(HWND hwnd, HKEY hKeyRoot, LPCWSTR keyPath);
128 BOOL DeleteValue(HWND hwnd, HKEY hKeyRoot, LPCWSTR keyPath, LPCWSTR valueName);
129 BOOL RenameValue(HWND hwnd, HKEY hRootKey, LPCWSTR keyPath, LPCWSTR oldName, LPCWSTR newName);
130 BOOL RenameKey(HWND hwnd, HKEY hRootKey, LPCWSTR keyPath, LPCWSTR newName);
131 int WINAPIV messagebox(HWND hwnd, int buttons, int titleId, int resId, ...);
133 /* framewnd.c */
134 LRESULT CALLBACK FrameWndProc(HWND, UINT, WPARAM, LPARAM);
135 void SetupStatusBar(HWND hWnd, BOOL bResize);
136 void UpdateStatusBar(void);
138 /* hexedit.c */
139 void HexEdit_Register(void);
141 /* listview.c */
142 BOOL update_listview_path(const WCHAR *path);
143 void format_value_data(HWND hwndLV, int index, DWORD type, void *data, DWORD size);
144 int AddEntryToList(HWND hwndLV, WCHAR *Name, DWORD dwValType, void *ValBuf, DWORD dwCount, int pos);
145 void OnGetDispInfo(NMLVDISPINFOW *plvdi);
146 HWND CreateListView(HWND hwndParent, UINT id);
147 int CALLBACK CompareFunc(LPARAM lParam1, LPARAM lParam2, LPARAM lParamSort);
148 BOOL RefreshListView(HWND hwndLV, HKEY hKeyRoot, LPCWSTR keyPath, LPCWSTR highlightValue);
149 HWND StartValueRename(HWND hwndLV);
150 LPWSTR GetItemText(HWND hwndLV, UINT item);
151 WCHAR *GetValueName(HWND hwndLV);
152 BOOL ListWndNotifyProc(HWND hWnd, WPARAM wParam, LPARAM lParam, BOOL *Result);
153 BOOL IsDefaultValue(HWND hwndLV, int i);
155 /* regedit.c */
156 void WINAPIV output_message(unsigned int id, ...);
157 void WINAPIV error_exit(unsigned int id, ...);
159 /* regproc.c */
160 char *GetMultiByteString(const WCHAR *strW);
161 BOOL import_registry_file(FILE *reg_file);
162 void delete_registry_key(WCHAR *reg_key_name);
163 BOOL export_registry_key(WCHAR *file_name, WCHAR *path, DWORD format);
165 /* treeview.c */
166 HWND CreateTreeView(HWND hwndParent, LPWSTR pHostName, UINT id);
167 BOOL RefreshTreeView(HWND hWndTV);
168 BOOL OnTreeExpanding(HWND hWnd, NMTREEVIEWW* pnmtv);
169 LPWSTR GetItemPath(HWND hwndTV, HTREEITEM hItem, HKEY* phRootKey);
170 BOOL DeleteNode(HWND hwndTV, HTREEITEM hItem);
171 HTREEITEM InsertNode(HWND hwndTV, HTREEITEM hItem, LPWSTR name);
172 HWND StartKeyRename(HWND hwndTV);
173 HTREEITEM FindPathInTree(HWND hwndTV, LPCWSTR lpKeyName);
174 HTREEITEM FindNext(HWND hwndTV, HTREEITEM hItem, LPCWSTR sstring, int mode, int *row);
176 #endif /* __MAIN_H__ */