winegstreamer: Check for failure from gst_element_set_state() instead of counting...
[wine.git] / programs / regedit / main.h
blob788de1a509896e4b15ef12fdd7c43805462bca27
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 "resource.h"
27 #define STATUS_WINDOW 2001
28 #define TREE_WINDOW 2002
29 #define LIST_WINDOW 2003
31 #define SPLIT_WIDTH 5
33 #define COUNT_OF(a) (sizeof(a)/sizeof(a[0]))
35 #define MAX_NEW_KEY_LEN 128
37 /* Pop-Up Menus */
38 #define PM_COMPUTER 0
39 #define PM_TREEVIEW 1
40 #define PM_NEW_VALUE 2
41 #define PM_MODIFY_VALUE 3
43 /* HexEdit Class */
44 #define HEM_SETDATA (WM_USER+0)
45 #define HEM_GETDATA (WM_USER+1)
47 /******************************************************************************/
49 enum OPTION_FLAGS {
50 OPTIONS_AUTO_REFRESH = 0x01,
51 OPTIONS_READ_ONLY_MODE = 0x02,
52 OPTIONS_CONFIRM_ON_DELETE = 0x04,
53 OPTIONS_SAVE_ON_EXIT = 0x08,
54 OPTIONS_DISPLAY_BINARY_DATA = 0x10,
55 OPTIONS_VIEW_TREE_ONLY = 0x20,
56 OPTIONS_VIEW_DATA_ONLY = 0x40,
59 enum SEARCH_FLAGS {
60 SEARCH_WHOLE = 0x01,
61 SEARCH_KEYS = 0x02,
62 SEARCH_VALUES = 0x04,
63 SEARCH_CONTENT = 0x08,
66 typedef struct {
67 HWND hWnd;
68 HWND hTreeWnd;
69 HWND hListWnd;
70 int nFocusPanel; /* 0: left 1: right */
71 int nSplitPos;
72 WINDOWPLACEMENT pos;
73 WCHAR szPath[MAX_PATH];
74 } ChildWnd;
75 extern ChildWnd* g_pChildWnd;
77 typedef struct tagLINE_INFO
79 WCHAR *name;
80 DWORD dwValType;
81 void *val;
82 size_t val_len;
83 } LINE_INFO;
85 /*******************************************************************************
86 * Global Variables:
88 extern HINSTANCE hInst;
89 extern HWND hFrameWnd;
90 extern HMENU hMenuFrame;
91 extern HWND hStatusBar;
92 extern HMENU hPopupMenus;
93 extern HFONT hFont;
94 extern enum OPTION_FLAGS Options;
96 extern WCHAR szTitle[];
97 extern const WCHAR szFrameClass[];
98 extern const WCHAR szChildClass[];
99 extern const WCHAR szHexEditClass[];
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
118 /* about.c */
119 extern void ShowAboutBox(HWND hWnd);
121 /* childwnd.c */
122 extern LPWSTR GetItemFullPath(HWND hwndTV, HTREEITEM hItem, BOOL bFull);
123 extern LRESULT CALLBACK ChildWndProc(HWND, UINT, WPARAM, LPARAM);
125 /* framewnd.c */
126 extern LRESULT CALLBACK FrameWndProc(HWND, UINT, WPARAM, LPARAM);
127 extern void SetupStatusBar(HWND hWnd, BOOL bResize);
128 extern void UpdateStatusBar(void);
130 /* listview.c */
131 extern BOOL update_listview_path(const WCHAR *path);
132 extern void format_value_data(HWND hwndLV, int index, DWORD type, void *data, DWORD size);
133 extern int AddEntryToList(HWND hwndLV, WCHAR *Name, DWORD dwValType, void *ValBuf, DWORD dwCount, int pos);
134 extern void OnGetDispInfo(NMLVDISPINFOW *plvdi);
135 extern HWND CreateListView(HWND hwndParent, UINT id);
136 extern int CALLBACK CompareFunc(LPARAM lParam1, LPARAM lParam2, LPARAM lParamSort);
137 extern BOOL RefreshListView(HWND hwndLV, HKEY hKeyRoot, LPCWSTR keyPath, LPCWSTR highlightValue);
138 extern HWND StartValueRename(HWND hwndLV);
139 extern LPWSTR GetItemText(HWND hwndLV, UINT item);
140 extern LPCWSTR GetValueName(HWND hwndLV);
141 extern BOOL ListWndNotifyProc(HWND hWnd, WPARAM wParam, LPARAM lParam, BOOL *Result);
142 extern BOOL IsDefaultValue(HWND hwndLV, int i);
144 /* treeview.c */
145 extern HWND CreateTreeView(HWND hwndParent, LPWSTR pHostName, UINT id);
146 extern BOOL RefreshTreeView(HWND hWndTV);
147 extern BOOL OnTreeExpanding(HWND hWnd, NMTREEVIEWW* pnmtv);
148 extern LPWSTR GetItemPath(HWND hwndTV, HTREEITEM hItem, HKEY* phRootKey);
149 extern BOOL DeleteNode(HWND hwndTV, HTREEITEM hItem);
150 extern HTREEITEM InsertNode(HWND hwndTV, HTREEITEM hItem, LPWSTR name);
151 extern HWND StartKeyRename(HWND hwndTV);
152 extern HTREEITEM FindPathInTree(HWND hwndTV, LPCWSTR lpKeyName);
153 extern HTREEITEM FindNext(HWND hwndTV, HTREEITEM hItem, LPCWSTR sstring, int mode, int *row);
155 /* edit.c */
156 extern BOOL CreateKey(HWND hwnd, HKEY hKeyRoot, LPCWSTR keyPath, LPWSTR newKeyName);
157 extern BOOL CreateValue(HWND hwnd, HKEY hKeyRoot, LPCWSTR keyPath, DWORD valueType, LPWSTR valueName);
158 extern BOOL ModifyValue(HWND hwnd, HKEY hKeyRoot, LPCWSTR keyPath, LPCWSTR valueName);
159 extern BOOL DeleteKey(HWND hwnd, HKEY hKeyRoot, LPCWSTR keyPath);
160 extern BOOL DeleteValue(HWND hwnd, HKEY hKeyRoot, LPCWSTR keyPath, LPCWSTR valueName, BOOL showMessageBox);
161 extern BOOL RenameValue(HWND hwnd, HKEY hRootKey, LPCWSTR keyPath, LPCWSTR oldName, LPCWSTR newName);
162 extern BOOL RenameKey(HWND hwnd, HKEY hRootKey, LPCWSTR keyPath, LPCWSTR newName);
163 extern int WINAPIV messagebox(HWND hwnd, int buttons, int titleId, int resId, ...);
165 /* hexedit.c */
166 extern void HexEdit_Register(void);
168 #endif /* __MAIN_H__ */