Alexandre Julliard | f752b124 | 2003-08-07 03:10:13 +0000 | [diff] [blame] | 1 | /* |
| 2 | * Regedit definitions |
| 3 | * |
| 4 | * Copyright (C) 2002 Robert Dickenson <robd@reactos.org> |
| 5 | * |
| 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. |
| 10 | * |
| 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. |
| 15 | * |
| 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
| 19 | */ |
| 20 | |
| 21 | #ifndef __MAIN_H__ |
| 22 | #define __MAIN_H__ |
| 23 | |
Alexandre Julliard | f752b124 | 2003-08-07 03:10:13 +0000 | [diff] [blame] | 24 | #include "resource.h" |
| 25 | |
| 26 | |
| 27 | #define STATUS_WINDOW 2001 |
| 28 | #define TREE_WINDOW 2002 |
| 29 | #define LIST_WINDOW 2003 |
| 30 | |
Dimitrie O. Paun | 58c185e | 2003-12-08 22:48:07 +0000 | [diff] [blame] | 31 | #define SPLIT_WIDTH 5 |
Alexandre Julliard | f752b124 | 2003-08-07 03:10:13 +0000 | [diff] [blame] | 32 | |
Dimitrie O. Paun | 9142f77 | 2003-12-03 20:25:24 +0000 | [diff] [blame] | 33 | #define COUNT_OF(a) (sizeof(a)/sizeof(a[0])) |
Alexandre Julliard | f752b124 | 2003-08-07 03:10:13 +0000 | [diff] [blame] | 34 | |
Thomas Weidenmueller | 649643a | 2004-01-16 02:14:19 +0000 | [diff] [blame] | 35 | #define PM_MODIFYVALUE 0 |
| 36 | #define PM_NEW 1 |
| 37 | |
Dimitrie O. Paun | 1661453 | 2003-12-12 04:08:59 +0000 | [diff] [blame] | 38 | extern HINSTANCE hInst; |
| 39 | |
Alexandre Julliard | f752b124 | 2003-08-07 03:10:13 +0000 | [diff] [blame] | 40 | /******************************************************************************/ |
| 41 | |
| 42 | enum OPTION_FLAGS { |
Dimitrie O. Paun | 58c185e | 2003-12-08 22:48:07 +0000 | [diff] [blame] | 43 | OPTIONS_AUTO_REFRESH = 0x01, |
| 44 | OPTIONS_READ_ONLY_MODE = 0x02, |
| 45 | OPTIONS_CONFIRM_ON_DELETE = 0x04, |
| 46 | OPTIONS_SAVE_ON_EXIT = 0x08, |
Alexandre Julliard | f752b124 | 2003-08-07 03:10:13 +0000 | [diff] [blame] | 47 | OPTIONS_DISPLAY_BINARY_DATA = 0x10, |
| 48 | OPTIONS_VIEW_TREE_ONLY = 0x20, |
| 49 | OPTIONS_VIEW_DATA_ONLY = 0x40, |
| 50 | }; |
| 51 | |
| 52 | typedef struct { |
Dimitrie O. Paun | 58c185e | 2003-12-08 22:48:07 +0000 | [diff] [blame] | 53 | HWND hWnd; |
Alexandre Julliard | f752b124 | 2003-08-07 03:10:13 +0000 | [diff] [blame] | 54 | HWND hTreeWnd; |
| 55 | HWND hListWnd; |
| 56 | int nFocusPanel; /* 0: left 1: right */ |
Dimitrie O. Paun | 58c185e | 2003-12-08 22:48:07 +0000 | [diff] [blame] | 57 | int nSplitPos; |
| 58 | WINDOWPLACEMENT pos; |
| 59 | TCHAR szPath[MAX_PATH]; |
Alexandre Julliard | f752b124 | 2003-08-07 03:10:13 +0000 | [diff] [blame] | 60 | } ChildWnd; |
Dimitrie O. Paun | 1661453 | 2003-12-12 04:08:59 +0000 | [diff] [blame] | 61 | extern ChildWnd* g_pChildWnd; |
Alexandre Julliard | f752b124 | 2003-08-07 03:10:13 +0000 | [diff] [blame] | 62 | |
| 63 | /******************************************************************************* |
| 64 | * Global Variables: |
| 65 | */ |
| 66 | extern HINSTANCE hInst; |
| 67 | extern HWND hFrameWnd; |
| 68 | extern HMENU hMenuFrame; |
| 69 | extern HWND hStatusBar; |
Thomas Weidenmueller | 649643a | 2004-01-16 02:14:19 +0000 | [diff] [blame] | 70 | extern HMENU hPopupMenus; |
Alexandre Julliard | f752b124 | 2003-08-07 03:10:13 +0000 | [diff] [blame] | 71 | extern HFONT hFont; |
| 72 | extern enum OPTION_FLAGS Options; |
| 73 | |
| 74 | extern TCHAR szTitle[]; |
| 75 | extern TCHAR szFrameClass[]; |
| 76 | extern TCHAR szChildClass[]; |
| 77 | |
Alexandre Julliard | f752b124 | 2003-08-07 03:10:13 +0000 | [diff] [blame] | 78 | /* about.c */ |
| 79 | extern void ShowAboutBox(HWND hWnd); |
| 80 | |
| 81 | /* childwnd.c */ |
| 82 | extern LRESULT CALLBACK ChildWndProc(HWND, UINT, WPARAM, LPARAM); |
| 83 | |
| 84 | /* framewnd.c */ |
| 85 | extern LRESULT CALLBACK FrameWndProc(HWND, UINT, WPARAM, LPARAM); |
| 86 | extern void SetupStatusBar(HWND hWnd, BOOL bResize); |
| 87 | extern void UpdateStatusBar(void); |
| 88 | |
| 89 | /* listview.c */ |
| 90 | extern HWND CreateListView(HWND hwndParent, int id); |
Dimitrie O. Paun | a38979a | 2004-01-16 23:02:44 +0000 | [diff] [blame^] | 91 | extern BOOL RefreshListView(HWND hwndLV, HKEY hKeyRoot, LPCTSTR keyPath); |
| 92 | extern BOOL StartValueRename(HWND hwndLV); |
Dimitrie O. Paun | 1661453 | 2003-12-12 04:08:59 +0000 | [diff] [blame] | 93 | extern LPCTSTR GetValueName(HWND hwndLV); |
Alexandre Julliard | f752b124 | 2003-08-07 03:10:13 +0000 | [diff] [blame] | 94 | |
| 95 | /* treeview.c */ |
| 96 | extern HWND CreateTreeView(HWND hwndParent, LPTSTR pHostName, int id); |
| 97 | extern BOOL OnTreeExpanding(HWND hWnd, NMTREEVIEW* pnmtv); |
Dimitrie O. Paun | 1661453 | 2003-12-12 04:08:59 +0000 | [diff] [blame] | 98 | extern LPCTSTR GetItemPath(HWND hwndTV, HTREEITEM hItem, HKEY* phRootKey); |
Alexandre Julliard | f752b124 | 2003-08-07 03:10:13 +0000 | [diff] [blame] | 99 | |
Dimitrie O. Paun | 9142f77 | 2003-12-03 20:25:24 +0000 | [diff] [blame] | 100 | /* edit.c */ |
Dimitrie O. Paun | 7a6d6aa | 2004-01-16 02:21:23 +0000 | [diff] [blame] | 101 | extern BOOL CreateKey(HWND hwnd, HKEY hKeyRoot, LPCTSTR keyPath); |
| 102 | extern BOOL CreateValue(HWND hwnd, HKEY hKeyRoot, LPCTSTR keyPath, DWORD valueType); |
| 103 | extern BOOL ModifyValue(HWND hwnd, HKEY hKeyRoot, LPCTSTR keyPath, LPCTSTR valueName); |
| 104 | extern BOOL DeleteValue(HWND hwnd, HKEY hKeyRoot, LPCTSTR keyPath, LPCTSTR valueName); |
Dimitrie O. Paun | d160d46 | 2004-01-13 23:18:12 +0000 | [diff] [blame] | 105 | extern BOOL RenameValue(HWND hwnd, HKEY hRootKey, LPCTSTR keyPath, LPCTSTR oldName, LPCTSTR newName); |
Dimitrie O. Paun | 9142f77 | 2003-12-03 20:25:24 +0000 | [diff] [blame] | 106 | |
Alexandre Julliard | f752b124 | 2003-08-07 03:10:13 +0000 | [diff] [blame] | 107 | #endif /* __MAIN_H__ */ |