diff options
author | George Hazan <ghazan@miranda.im> | 2017-03-28 14:21:33 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2017-03-28 14:21:33 +0300 |
commit | eccbb5307a048e70ac4adb0d3fd333be28245fa8 (patch) | |
tree | a9a2c92c13391a5cf288c9e0d841833c54f3cd5e /include | |
parent | 6a9e3738066370dac38f5f6768b8a6f61fe709e0 (diff) |
massive cleanup of useless cbSize fields
Diffstat (limited to 'include')
-rw-r--r-- | include/delphi/m_message.inc | 23 | ||||
-rw-r--r-- | include/m_message.h | 46 |
2 files changed, 22 insertions, 47 deletions
diff --git a/include/delphi/m_message.inc b/include/delphi/m_message.inc index 1a50da7c6f..f8b51e8bea 100644 --- a/include/delphi/m_message.inc +++ b/include/delphi/m_message.inc @@ -53,22 +53,6 @@ const MSG_WINDOW_UFLAG_MSG_TO = $00000002;
MSG_WINDOW_UFLAG_MSG_BOTH = $00000004;
-type
- PMessageWindowEventData = ^TMessageWindowEventData;
- TMessageWindowEventData = record
- cbSize : int;
- hContact : TMCONTACT;
- hwndWindow: HWND; // top level window for the contact
- szModule : PAnsiChar; // used to get plugin type (which means you could use
- // local if needed)
- uType : uint; // see event types above
- uFlags : uint; // used to indicate message direction for all event
- // types except custom
- local : pointer; // used to store pointer to custom data
- hwndInput : HWND; // input area window for the contact (or NULL if there is none)
- hwndLog : HWND; // log area window for the contact (or NULL if there is none)
- end;
-
const
{ wparam=0
lparam=0
@@ -86,7 +70,6 @@ const type
PMessageWindowInputData = ^TMessageWindowInputData;
TMessageWindowInputData = record
- cbSize : int;
hContact: TMCONTACT;
uFlags : int; // see uflags above
end;
@@ -101,7 +84,6 @@ const type
PMessageWindowOutputData = ^TMessageWindowOutputData;
TMessageWindowOutputData = record
- cbSize : int;
hContact : TMCONTACT;
uFlags : int; // should be same as input data unless 0, then it
// will be the actual type
@@ -123,7 +105,6 @@ const type
PStatusTextData = ^TStatusTextData;
TStatusTextData = record
- cbSize :int;
hIcon :HICON;
tszText:array [0..99] of WideChar;
end;
@@ -138,7 +119,6 @@ const type
pMessageWindowEvent = ^tMessageWindowEvent;
tMessageWindowEvent = record
- cbSize :int;
seq :int; // number returned by PSS_MESSAGE
hContact :TMCONTACT;
dbei :PDBEVENTINFO; // database event written on the basis of message sent
@@ -167,7 +147,6 @@ const type
tMessageWindowPopupData = record
- cbSize :int;
uType :uint; // see popup types above
uFlags :uint; // used to indicate in which window the popup was requested
hContact :TMCONTACT;
@@ -186,7 +165,6 @@ const type
pStatusIconData = ^tStatusIconData;
tStatusIconData = record
- cbSize :int; // must be equal to sizeof(StatusIconData)
szModule :PAnsiChar; // used in combo with the dwId below to create a unique identifier
dwId :dword; // uniquely defines a button inside a module
hIcon,
@@ -202,7 +180,6 @@ const type
pStatusIconClickData = ^tStatusIconClickData;
tStatusIconClickData = record
- cbSize :int;
clickLocation:TPOINT; // click location, in screen coordinates
szModule :PAnsiChar;
dwId :dword;
diff --git a/include/m_message.h b/include/m_message.h index a3cfee132e..43c7612cda 100644 --- a/include/m_message.h +++ b/include/m_message.h @@ -43,59 +43,58 @@ extern int hLangpack; #define ME_MSG_WINDOWEVENT "MessageAPI/WindowEvent"
// wparam = 0
// lparam = (WPARAM)(MessageWindowEventData*)hWindowEvent;
+
// Event types
#define MSG_WINDOW_EVT_OPENING 1 //window is about to be opened
#define MSG_WINDOW_EVT_OPEN 2 //window has been opened
#define MSG_WINDOW_EVT_CLOSING 3 //window is about to be closed
#define MSG_WINDOW_EVT_CLOSE 4 //window has been closed
-#define MSG_WINDOW_EVT_CUSTOM 5 //custom event for message plugins to use (custom uFlags may be used)
#define MSG_WINDOW_UFLAG_MSG_FROM 0x00000001
#define MSG_WINDOW_UFLAG_MSG_TO 0x00000002
#define MSG_WINDOW_UFLAG_MSG_BOTH 0x00000004
-typedef struct {
- int cbSize;
+struct MessageWindowEventData
+{
MCONTACT hContact;
HWND hwndWindow; // top level window for the contact
- const char* szModule; // used to get plugin type (which means you could use local if needed)
unsigned int uType; // see event types above
unsigned int uFlags; // used to indicate message direction for all event types except custom
void *local; // used to store pointer to custom data
HWND hwndInput; // input area window for the contact (or NULL if there is none)
HWND hwndLog; // log area window for the contact (or NULL if there is none)
-} MessageWindowEventData;
+};
-typedef struct {
- int cbSize;
+struct StatusTextData
+{
HICON hIcon;
wchar_t tszText[100];
-} StatusTextData;
+};
// wparam = (MCONTACT)hContact
// lparam = (StatusTextData*) or NULL to clear statusbar
// Sets a statusbar line text for the appropriate contact
#define MS_MSG_SETSTATUSTEXT "MessageAPI/SetStatusText"
-typedef struct {
- int cbSize;
+struct MessageWindowInputData
+{
MCONTACT hContact;
int uFlags; // see uflags above
-} MessageWindowInputData;
+};
#define MSG_WINDOW_STATE_EXISTS 0x00000001 // Window exists should always be true if hwndWindow exists
#define MSG_WINDOW_STATE_VISIBLE 0x00000002
#define MSG_WINDOW_STATE_FOCUS 0x00000004
#define MSG_WINDOW_STATE_ICONIC 0x00000008
-typedef struct {
- int cbSize;
+struct MessageWindowData
+{
MCONTACT hContact;
int uFlags; // should be same as input data unless 0, then it will be the actual type
HWND hwndWindow; //top level window for the contact or NULL if no window exists
int uState; // see window states
void *local; // used to store pointer to custom data
-} MessageWindowData;
+};
// wparam = (MessageWindowInputData*)
// lparam = (MessageWindowData*)
@@ -107,12 +106,12 @@ typedef struct { // fired before SRMM writes an entered message into the database
#define ME_MSG_PRECREATEEVENT "MessageAPI/PreCreateEvent"
-typedef struct {
- int cbSize;
+struct MessageWindowEvent
+{
int seq; // number returned by PSS_MESSAGE
MCONTACT hContact;
DBEVENTINFO *dbei; // database event written on the basis of message sent
-} MessageWindowEvent;
+};
/////////////////////////////////////////////////////////////////////////////////////////
// SRMM popup menu
@@ -131,8 +130,8 @@ typedef struct { #define MSG_WINDOWPOPUP_INPUT 1
#define MSG_WINDOWPOPUP_LOG 2
-typedef struct {
- int cbSize;
+struct MessageWindowPopupData
+{
unsigned int uType; // see popup types above
unsigned int uFlags; // used to indicate in which window the popup was requested
MCONTACT hContact;
@@ -140,7 +139,7 @@ typedef struct { HMENU hMenu; // The handle to the menu
POINT pt; // The point, in screen coords
int selection; // The menu control id or 0 if no one was selected
-} MessageWindowPopupData;
+};
/////////////////////////////////////////////////////////////////////////////////////////
// status icons
@@ -149,8 +148,8 @@ typedef struct { #define MBF_HIDDEN 0x02
#define MBF_UNICODE 0x04
-typedef struct {
- int cbSize; // must be equal to sizeof(StatusIconData)
+struct StatusIconData
+{
char *szModule; // used in combo with the dwId below to create a unique identifier
DWORD dwId; // uniquely defines a button inside a module
HICON hIcon, hIconDisabled; // hIconDisabled is optional - if null, will use hIcon in the disabled state
@@ -160,7 +159,7 @@ typedef struct { wchar_t *tszTooltip;
wchar_t *wszTooltip;
};
-} StatusIconData;
+};
#define MBCF_RIGHTBUTTON 0x01 // if this flag is specified, the click was a right button - otherwize it was a left click
@@ -186,7 +185,6 @@ EXTERN_C MIR_APP_DLL(StatusIconData*) Srmm_GetNthIcon(MCONTACT hContact, int ind struct StatusIconClickData
{
- int cbSize;
POINT clickLocation; // click location, in screen coordinates
char *szModule;
DWORD dwId;
|