[r8410]: ooDialog / trunk / ooDialog / oodMessaging.hpp Maximize Restore History

Download this file

oodMessaging.hpp    87 lines (78 with data), 6.5 kB

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
/*----------------------------------------------------------------------------*/;
/* */;
/* Copyright (c) 2009-2012 Rexx Language Association. All rights reserved. */;
/* */;
/* This program and the accompanying materials are made available under */;
/* the terms of the Common Public License v1.0 which accompanies this */;
/* distribution. A copy is also available at the following address: */;
/* http://www.oorexx.org/license.html */;
/* */;
/* Redistribution and use in source and binary forms, with or */;
/* without modification, are permitted provided that the following */;
/* conditions are met: */;
/* */;
/* Redistributions of source code must retain the above copyright */;
/* notice, this list of conditions and the following disclaimer. */;
/* Redistributions in binary form must reproduce the above copyright */;
/* notice, this list of conditions and the following disclaimer in */;
/* the documentation and/or other materials provided with the distribution. */;
/* */;
/* Neither the name of Rexx Language Association nor the names */;
/* of its contributors may be used to endorse or promote products */;
/* derived from this software without specific prior written permission. */;
/* */;
/* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS */;
/* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT */;
/* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS */;
/* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT */;
/* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, */;
/* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED */;
/* TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, */;
/* OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY */;
/* OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING */;
/* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS */;
/* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */;
/* */;
/*----------------------------------------------------------------------------*/;
#ifndef oodMessaging_Included
#define oodMessaging_Included
// Enum for errors during key press processing
typedef enum
{
noErr = 0,
nameErr = 1, // The method name was too long, or the empty string.
winAPIErr = 2, // A Windows API failure.
memoryErr = 5, // Memory allocation error.
maxMethodsErr = 6, // No room left in the method table.
dupMethodErr = 7, // The method name provided already exists in the table, so nothing was done.
badFilterErr = 8, // The filter provided was not a filter, so it was ignored.
keyMapErr = 9 // Some or all of the keys did not get mapped.
} keyPressErr_t;
extern BOOL APIENTRY RexxSetProcessMessages(BOOL onoff);
extern LRESULT CALLBACK RexxDlgProc(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam);
extern LRESULT CALLBACK RexxTabOwnerDlgProc(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam);
extern LRESULT CALLBACK RexxChildDlgProc(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam);
extern bool parseWinMessageFilter(RexxMethodContext *context, pWinMessageFilter pwmf);
extern BOOL endDialogPremature(pCPlainBaseDialog, HWND, DlgProcErrType);
extern LRESULT paletteMessage(pCPlainBaseDialog, HWND, UINT, WPARAM, LPARAM);
extern LRESULT handleWmCommand(pCPlainBaseDialog pcpbd, HWND hDlg, WPARAM wParam, LPARAM lParam, bool isNestedDlg);
extern LRESULT handleWmUser(pCPlainBaseDialog pcpbd, HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam, bool isNestedDlg);
extern MsgReplyType searchMessageTables(ULONG message, WPARAM param, LPARAM lparam, pCPlainBaseDialog);
extern bool initCommandMessagesTable(RexxMethodContext *c, pCEventNotification pcen, pCPlainBaseDialog pcpbd);
extern bool initEventNotification(RexxMethodContext *, pCPlainBaseDialog, RexxObjectPtr, pCEventNotification *);
extern bool addCommandMessage(pCEventNotification, RexxMethodContext *, WPARAM, ULONG_PTR, LPARAM, ULONG_PTR, CSTRING, uint32_t);
extern bool addNotifyMessage(pCEventNotification, RexxMethodContext *, WPARAM, ULONG_PTR, LPARAM, ULONG_PTR, CSTRING, uint32_t);
extern bool addMiscMessage(pCEventNotification, RexxMethodContext *, uint32_t, uint32_t, WPARAM, ULONG_PTR, LPARAM, ULONG_PTR, CSTRING, uint32_t);
// Shared functions for keyboard hooks, key press and key event subclassing.
extern void removeKBHook(pCEventNotification);
extern keyPressErr_t setKeyPressData(KEYPRESSDATA *, CSTRING, CSTRING, CSTRING);
extern void processKeyPress(pSubClassData, WPARAM, LPARAM);
extern void freeKeyPressData(pSubClassData);
extern uint32_t seekKeyPressMethod(KEYPRESSDATA *, CSTRING);
extern void removeKeyPressMethod(KEYPRESSDATA *, uint32_t);
extern RexxArrayObject getKeyEventRexxArgs(RexxThreadContext *c, WPARAM wParam, bool isExtended, RexxObjectPtr rexxControl);
extern bool invokeDirect(RexxThreadContext *c, pCPlainBaseDialog pcpbd, CSTRING methodName, RexxArrayObject args);
extern MsgReplyType invokeDispatch(RexxThreadContext *c, RexxObjectPtr obj, RexxStringObject method, RexxArrayObject args);
extern bool msgReplyIsGood(RexxThreadContext *c, pCPlainBaseDialog pcpbd, RexxObjectPtr reply, CSTRING methodName, bool clear);
extern RexxObjectPtr requiredBooleanReply(RexxThreadContext *c, pCPlainBaseDialog pcpbd, RexxObjectPtr reply, CSTRING method, bool clear);
#endif