wine/programs/oleview/main.h

162 lines
3.6 KiB
C
Raw Normal View History

2006-06-14 17:50:28 +00:00
/*
* OleView (main.h)
*
* Copyright 2006 Piotr Caban
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#define COBJMACROS
#include <windows.h>
#include <winreg.h>
#include <commctrl.h>
#include <unknwn.h>
#ifdef NONAMELESSUNION
# define U(x) (x).u
#else
# define U(x) (x)
#endif
2006-06-14 17:50:28 +00:00
#include "resource.h"
#define MAX_LOAD_STRING 256
2006-06-14 17:51:27 +00:00
#define MAX_WINDOW_WIDTH 30000
#define MIN_FUNC_ID 0x60000000
#define MIN_VAR_ID 0x40000000
#define TAB_SIZE 4
2006-06-14 17:50:28 +00:00
#define STATUS_WINDOW 2000
2006-06-14 17:52:26 +00:00
#define TREE_WINDOW 2001
2006-06-14 17:55:46 +00:00
#define TAB_WINDOW 2002
#define TYPELIB_TREE 2003
2006-06-14 17:52:26 +00:00
/*ItemInfo flags */
#define REGTOP 1
#define REGPATH 2
#define SHOWALL 4
#define INTERFACE 8
2006-06-14 17:50:28 +00:00
typedef struct
{
HWND hMainWnd;
2006-06-14 17:51:27 +00:00
HWND hPaneWnd;
2006-06-14 17:50:28 +00:00
HWND hStatusBar;
HWND hToolBar;
2006-06-14 17:55:46 +00:00
HWND hTree;
HWND hDetails;
HWND hTypeLibWnd;
2006-06-14 17:50:28 +00:00
HINSTANCE hMainInst;
2006-06-14 17:55:08 +00:00
BOOL bExpert;
2006-06-14 17:53:47 +00:00
DWORD dwClsCtx;
WCHAR wszMachineName[MAX_LOAD_STRING];
2006-06-14 17:50:28 +00:00
}GLOBALS;
2006-06-14 17:51:27 +00:00
typedef struct
{
HWND left;
HWND right;
INT pos;
INT size;
INT width;
INT height;
INT last;
}PANE;
2006-06-14 17:52:26 +00:00
typedef struct
{
/* Main TreeView entries: */
HTREEITEM hOC; /* Object Classes */
HTREEITEM hGBCC; /* Grouped by Component Category */
HTREEITEM hO1O; /* OLE 1.0 Objects */
HTREEITEM hCLO; /* COM Library Objects */
HTREEITEM hAO; /* All Objects */
HTREEITEM hAID; /* Application IDs */
HTREEITEM hTL; /* Type Libraries */
HTREEITEM hI; /* Interfaces */
}TREE;
typedef struct
{
CHAR cFlag;
WCHAR info[MAX_LOAD_STRING];
WCHAR clsid[MAX_LOAD_STRING];
WCHAR path[MAX_LOAD_STRING];
2006-06-14 17:52:26 +00:00
BOOL loaded;
IUnknown *pU;
}ITEM_INFO;
2006-06-14 17:55:46 +00:00
typedef struct
{
HWND hStatic;
HWND hTab;
HWND hReg;
}DETAILS;
typedef struct
{
HWND hPaneWnd;
HWND hTree;
HWND hEdit;
HWND hStatusBar;
WCHAR wszFileName[MAX_LOAD_STRING];
}TYPELIB;
typedef struct
{
WCHAR *idl;
WCHAR wszInsertAfter[MAX_LOAD_STRING];
INT idlLen;
BOOL bPredefine;
BOOL bHide;
}TYPELIB_DATA;
2006-06-14 17:50:28 +00:00
extern GLOBALS globals;
2006-06-14 17:52:26 +00:00
extern TREE tree;
extern TYPELIB typelib;
2006-06-14 17:51:27 +00:00
/* Predefinitions: */
2006-06-14 17:55:46 +00:00
/* details.c */
HWND CreateDetailsWindow(HINSTANCE hInst);
void RefreshDetails(HTREEITEM item);
2006-06-14 17:55:08 +00:00
/* oleview.c */
void RefreshMenu(HTREEITEM item);
2006-06-14 17:51:27 +00:00
/* pane.c */
BOOL CreatePanedWindow(HWND hWnd, HWND *hWndCreated, HINSTANCE hInst);
BOOL PaneRegisterClass(void);
2006-06-14 17:52:26 +00:00
void SetLeft(HWND hParent, HWND hWnd);
void SetRight(HWND hParent, HWND hWnd);
/* tree.c */
2006-06-14 17:52:26 +00:00
void EmptyTree(void);
2006-06-14 17:55:08 +00:00
void AddTreeEx(void);
void AddTree(void);
2006-06-14 17:52:26 +00:00
HWND CreateTreeWindow(HINSTANCE hInst);
2006-06-14 17:55:46 +00:00
BOOL CreateRegPath(HTREEITEM item, WCHAR *buffer, int bufSize);
void CreateInst(HTREEITEM item, WCHAR *wszMachineName);
2006-06-14 17:55:08 +00:00
void ReleaseInst(HTREEITEM item);
2006-06-24 08:33:29 +00:00
/* typelib.c */
BOOL CreateTypeLibWindow(HINSTANCE hInst, WCHAR *wszFileName);
BOOL TypeLibRegisterClass(void);
void UpdateData(HTREEITEM item);
/* interface.c */
2006-06-24 08:33:29 +00:00
BOOL IsInterface(HTREEITEM item);
void InterfaceViewer(HTREEITEM item);