gdiplus: Fix an overzealous optimization.
[wine/wine-gecko.git] / programs / oleview / main.h
blob66bf70efd4cde17cc7ea259aa2b28603f5efe5a1
1 /*
2 * OleView (main.h)
4 * Copyright 2006 Piotr Caban
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 #define COBJMACROS
23 #include <windows.h>
24 #include <winreg.h>
25 #include <commctrl.h>
26 #include <commdlg.h>
27 #include <unknwn.h>
29 #ifdef NONAMELESSUNION
30 # define U(x) (x).u
31 #else
32 # define U(x) (x)
33 #endif
35 #include "resource.h"
37 #define MAX_LOAD_STRING 256
38 #define MAX_WINDOW_WIDTH 30000
39 #define MIN_FUNC_ID 0x60000000
40 #define MIN_VAR_ID 0x40000000
41 #define TAB_SIZE 4
43 #define STATUS_WINDOW 2000
44 #define TREE_WINDOW 2001
45 #define TAB_WINDOW 2002
46 #define TYPELIB_TREE 2003
48 /*ItemInfo flags */
49 #define REGTOP 1
50 #define REGPATH 2
51 #define SHOWALL 4
52 #define INTERFACE 8
54 typedef struct
56 HWND hMainWnd;
57 HWND hPaneWnd;
58 HWND hStatusBar;
59 HWND hToolBar;
60 HWND hTree;
61 HWND hDetails;
62 HWND hTypeLibWnd;
63 HINSTANCE hMainInst;
64 BOOL bExpert;
65 DWORD dwClsCtx;
66 WCHAR wszMachineName[MAX_LOAD_STRING];
67 }GLOBALS;
69 typedef struct
71 HWND left;
72 HWND right;
73 INT pos;
74 INT size;
75 INT width;
76 INT height;
77 INT last;
78 }PANE;
80 typedef struct
82 /* Main TreeView entries: */
83 HTREEITEM hOC; /* Object Classes */
84 HTREEITEM hGBCC; /* Grouped by Component Category */
85 HTREEITEM hO1O; /* OLE 1.0 Objects */
86 HTREEITEM hCLO; /* COM Library Objects */
87 HTREEITEM hAO; /* All Objects */
88 HTREEITEM hAID; /* Application IDs */
89 HTREEITEM hTL; /* Type Libraries */
90 HTREEITEM hI; /* Interfaces */
91 }TREE;
93 typedef struct
95 CHAR cFlag;
96 WCHAR info[MAX_LOAD_STRING];
97 WCHAR clsid[MAX_LOAD_STRING];
98 WCHAR path[MAX_LOAD_STRING];
99 BOOL loaded;
100 IUnknown *pU;
101 }ITEM_INFO;
103 typedef struct
105 HWND hStatic;
106 HWND hTab;
107 HWND hReg;
108 }DETAILS;
110 typedef struct
112 HWND hPaneWnd;
113 HWND hTree;
114 HWND hEdit;
115 HWND hStatusBar;
116 WCHAR wszFileName[MAX_LOAD_STRING];
117 }TYPELIB;
119 typedef struct
121 WCHAR *idl;
122 WCHAR wszInsertAfter[MAX_LOAD_STRING];
123 INT idlLen;
124 BOOL bPredefine;
125 BOOL bHide;
126 }TYPELIB_DATA;
128 extern GLOBALS globals;
129 extern TREE tree;
130 extern TYPELIB typelib;
132 /* Predefinitions: */
133 /* details.c */
134 HWND CreateDetailsWindow(HINSTANCE hInst);
135 void RefreshDetails(HTREEITEM item);
137 /* oleview.c */
138 void RefreshMenu(HTREEITEM item);
140 /* pane.c */
141 BOOL CreatePanedWindow(HWND hWnd, HWND *hWndCreated, HINSTANCE hInst);
142 BOOL PaneRegisterClassW(void);
143 void SetLeft(HWND hParent, HWND hWnd);
144 void SetRight(HWND hParent, HWND hWnd);
146 /* tree.c */
147 void EmptyTree(void);
148 void AddTreeEx(void);
149 void AddTree(void);
150 HWND CreateTreeWindow(HINSTANCE hInst);
151 BOOL CreateRegPath(HTREEITEM item, WCHAR *buffer, int bufSize);
152 void CreateInst(HTREEITEM item, WCHAR *wszMachineName);
153 void ReleaseInst(HTREEITEM item);
155 /* typelib.c */
156 BOOL CreateTypeLibWindow(HINSTANCE hInst, WCHAR *wszFileName);
157 BOOL TypeLibRegisterClassW(void);
158 void UpdateData(HTREEITEM item);
160 /* interface.c */
161 BOOL IsInterface(HTREEITEM item);
162 void InterfaceViewer(HTREEITEM item);