nsDialogs: the next InstallOptions

git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@5199 212acab6-be3b-0410-9dea-997c60f758d6
This commit is contained in:
kichik 2007-07-14 09:40:06 +00:00
parent edd3c299f7
commit 74bf17be17
15 changed files with 1832 additions and 0 deletions

64
Contrib/nsDialogs/defs.h Normal file
View file

@ -0,0 +1,64 @@
#ifndef __NS_DIALOGS__DEFS_H__
#define __NS_DIALOGS__DEFS_H__
#include <windows.h>
#define NSDFUNC __stdcall
typedef int nsFunction;
enum nsControlType
{
NSCTL_UNKNOWN,
NSCTL_BUTTON,
NSCTL_EDIT,
NSCTL_COMBOBOX,
NSCTL_LISTBOX,
NSCTL_RICHEDIT,
NSCTL_RICHEDIT2,
NSCTL_STATIC
};
struct nsDialogCallbacks
{
nsFunction onBack;
};
#define DLG_CALLBACK_IDX(x) (FIELD_OFFSET(struct nsDialogCallbacks, x)/sizeof(nsFunction))
struct nsControlCallbacks
{
nsFunction onClick;
nsFunction onChange;
nsFunction onNotify;
};
#define CTL_CALLBACK_IDX(x) (FIELD_OFFSET(struct nsControlCallbacks, x)/sizeof(nsFunction))
#define USERDATA_SIZE 1024
struct nsControl
{
HWND window;
enum nsControlType type;
char userData[USERDATA_SIZE];
struct nsControlCallbacks callbacks;
};
struct nsDialog
{
HWND hwDialog;
HWND hwParent;
WNDPROC parentOriginalWndproc;
struct nsDialogCallbacks callbacks;
unsigned controlCount;
struct nsControl* controls;
};
#define NSCONTROL_ID_PROP "NSIS: nsControl pointer property"
#endif//__NS_DIALOGS__DEFS_H__