From: <mie...@us...> - 2012-01-21 16:59:13
|
Revision: 7449 http://oorexx.svn.sourceforge.net/oorexx/?rev=7449&view=rev Author: miesfeld Date: 2012-01-21 16:59:05 +0000 (Sat, 21 Jan 2012) Log Message: ----------- Sync ooDialog 4.2.0 in sandbox with main through r7449 Revision Links: -------------- http://oorexx.svn.sourceforge.net/oorexx/?rev=7449&view=rev Modified Paths: -------------- sandbox/mark/ooDialog.beta/extensions/platform/windows/oodialog.4.2.0/APICommon.cpp sandbox/mark/ooDialog.beta/extensions/platform/windows/oodialog.4.2.0/APICommon.hpp sandbox/mark/ooDialog.beta/extensions/platform/windows/oodialog.4.2.0/PlainBaseDialog.cls sandbox/mark/ooDialog.beta/extensions/platform/windows/oodialog.4.2.0/UtilityClasses.cls sandbox/mark/ooDialog.beta/extensions/platform/windows/oodialog.4.2.0/ooDialog.cpp sandbox/mark/ooDialog.beta/extensions/platform/windows/oodialog.4.2.0/ooDialog.hpp sandbox/mark/ooDialog.beta/extensions/platform/windows/oodialog.4.2.0/oodMessaging.cpp sandbox/mark/ooDialog.beta/extensions/platform/windows/oodialog.4.2.0/oodMouse.cpp sandbox/mark/ooDialog.beta/extensions/platform/windows/oodialog.4.2.0/oodPackageEntry.cpp sandbox/mark/ooDialog.beta/extensions/platform/windows/oodialog.4.2.0/oodUtilities.cpp sandbox/mark/ooDialog.beta/extensions/platform/windows/oodialog.4.2.0/oodViewControls.cpp Modified: sandbox/mark/ooDialog.beta/extensions/platform/windows/oodialog.4.2.0/APICommon.cpp =================================================================== --- sandbox/mark/ooDialog.beta/extensions/platform/windows/oodialog.4.2.0/APICommon.cpp 2012-01-21 04:56:45 UTC (rev 7448) +++ sandbox/mark/ooDialog.beta/extensions/platform/windows/oodialog.4.2.0/APICommon.cpp 2012-01-21 16:59:05 UTC (rev 7449) @@ -544,6 +544,36 @@ } /** + * Similar to 93.914 + * + * Method argument <pos>, must contain one or more of <list>; found "<actual>" + * + * Method argument 2 must contain one or more of SKIPINVISIBLE, SKIPDISABLED, + * SKIPTRANSPARENT, or ALL; found "BOGUS NOTVISIBLE" + * + * @param c Thread context + * @param pos + * @param list + * @param actual + * + * @return RexxObjectPtr + */ +RexxObjectPtr wrongArgKeywordsException(RexxThreadContext *c, size_t pos, CSTRING list, CSTRING actual) +{ + + TCHAR buffer[512]; + _snprintf(buffer, sizeof(buffer), "Method argument %d, must contain one or more of %s; found \"%s\"", + pos, list, actual); + userDefinedMsgException(c, buffer); + return NULLOBJECT; +} + +RexxObjectPtr wrongArgKeywordsException(RexxThreadContext *c, size_t pos, CSTRING list, RexxObjectPtr actual) +{ + return wrongArgOptionException(c, pos, list, c->ObjectToStringValue(actual)); +} + +/** * Similar to 93.915 and 93.914 (actually a combination of the two.) * * Method argument <pos>, option must be one of <list>; found "<actual>" Modified: sandbox/mark/ooDialog.beta/extensions/platform/windows/oodialog.4.2.0/APICommon.hpp =================================================================== --- sandbox/mark/ooDialog.beta/extensions/platform/windows/oodialog.4.2.0/APICommon.hpp 2012-01-21 04:56:45 UTC (rev 7448) +++ sandbox/mark/ooDialog.beta/extensions/platform/windows/oodialog.4.2.0/APICommon.hpp 2012-01-21 16:59:05 UTC (rev 7449) @@ -88,6 +88,8 @@ extern RexxObjectPtr wrongClassException(RexxThreadContext *c, size_t pos, const char *n); extern RexxObjectPtr wrongArgValueException(RexxThreadContext *c, size_t pos, const char *list, RexxObjectPtr actual); extern RexxObjectPtr wrongArgValueException(RexxThreadContext *c, size_t pos, const char *list, const char *actual); +extern RexxObjectPtr wrongArgKeywordsException(RexxThreadContext *c, size_t pos, CSTRING list, CSTRING actual); +extern RexxObjectPtr wrongArgKeywordsException(RexxThreadContext *c, size_t pos, CSTRING list, RexxObjectPtr actual); extern RexxObjectPtr wrongRangeException(RexxThreadContext *c, size_t pos, int min, int max, RexxObjectPtr actual); extern RexxObjectPtr wrongRangeException(RexxThreadContext *c, size_t pos, int min, int max, int actual); extern RexxObjectPtr notBooleanException(RexxThreadContext *c, size_t pos, RexxObjectPtr actual); Modified: sandbox/mark/ooDialog.beta/extensions/platform/windows/oodialog.4.2.0/PlainBaseDialog.cls =================================================================== --- sandbox/mark/ooDialog.beta/extensions/platform/windows/oodialog.4.2.0/PlainBaseDialog.cls 2012-01-21 04:56:45 UTC (rev 7448) +++ sandbox/mark/ooDialog.beta/extensions/platform/windows/oodialog.4.2.0/PlainBaseDialog.cls 2012-01-21 16:59:05 UTC (rev 7449) @@ -75,77 +75,60 @@ ::attribute pixelCX get external "LIBRARY oodialog wb_getPixelCX" ::attribute pixelCY get external "LIBRARY oodialog wb_getPixelCY" -::method sendMessage unguarded external "LIBRARY oodialog wb_sendMessage" -::method sendMessageHandle unguarded external "LIBRARY oodialog wb_sendMessage" - --- These shortcut methods are for internal use, do not document. -::method sendWinIntMsg unguarded external "LIBRARY oodialog wb_sendWinIntMsg" -- Internal use do not document -::method sendWinIntMsgH unguarded external "LIBRARY oodialog wb_sendWinIntMsg" -- Internal use do not document -::method sendWinUintMsg unguarded external "LIBRARY oodialog wb_sendWinUintMsg" -- Internal use do not document -::method sendWinHandleMsg unguarded external "LIBRARY oodialog wb_sendWinHandleMsg" -- Internal use do not document -::method sendWinHandleMsgH unguarded external "LIBRARY oodialog wb_sendWinHandleMsg" -- Internal use do not document -::method sendWinHandle2Msg unguarded external "LIBRARY oodialog wb_sendWinHandle2Msg" -- Internal use do not document -::method sendWinHandle2MsgH unguarded external "LIBRARY oodialog wb_sendWinHandle2Msg" -- Internal use do not document - -::method enable unguarded external "LIBRARY oodialog wb_enable" +::method childWindowFromPoint unguarded external "LIBRARY oodialog wb_childWindowFromPoint" +::method clear unguarded external "LIBRARY oodialog wb_clear" +::method client2screen unguarded external "LIBRARY oodialog wb_screenClient" +::method clientRect unguarded external "LIBRARY oodialog wb_clientRect" ::method disable unguarded external "LIBRARY oodialog wb_enable" -::method isVisible unguarded external "LIBRARY oodialog wb_isVisible" -::method isEnabled unguarded external "LIBRARY oodialog wb_isEnabled" - -::method show unguarded external "LIBRARY oodialog wb_show" -::method hide unguarded external "LIBRARY oodialog wb_show" -::method showFast unguarded external "LIBRARY oodialog wb_showFast" -::method hideFast unguarded external "LIBRARY oodialog wb_showFast" ::method display unguarded external "LIBRARY oodialog wb_display" - -::method update unguarded external "LIBRARY oodialog wb_redrawClient" ::method draw unguarded external "LIBRARY oodialog wb_redrawClient" -::method redrawClient unguarded external "LIBRARY oodialog wb_redrawClient" -::method redraw unguarded external "LIBRARY oodialog wb_redraw" +::method enable unguarded external "LIBRARY oodialog wb_enable" +::method foregroundWindow unguarded external "LIBRARY oodialog wb_foreGroundWindow" +::method hide unguarded external "LIBRARY oodialog wb_show" +::method getExStyleRaw unguarded + return self~getWindowLong(-20) -::method getWindowLong private unguarded external "LIBRARY oodialog wb_getWindowLong_pvt" -- Not intending to document getWindowLong, at this point ::method getID unguarded return self~getWindowLong(-12) +::method getRealPos unguarded external "LIBRARY oodialog wb_getSizePos" +::method getRealSize unguarded external "LIBRARY oodialog wb_getSizePos" ::method getStyleRaw unguarded return self~getWindowLong(-16) -::method getExStyleRaw unguarded - return self~getWindowLong(-20) - -::method setText unguarded external "LIBRARY oodialog wb_setText" ::method getText unguarded external "LIBRARY oodialog wb_getText" -::method "title=" unguarded external "LIBRARY oodialog wb_setText" -::method setTitle unguarded external "LIBRARY oodialog wb_setText" -::method title unguarded external "LIBRARY oodialog wb_getText" ::method getTextSizePx unguarded external "LIBRARY oodialog wb_getTextSizePx" ::method getTextSizeScreen unguarded external "LIBRARY oodialog wb_getTextSizeScreen" - -::method setRect unguarded external "LIBRARY oodialog wb_setRect" -::method resizeTo unguarded external "LIBRARY oodialog wb_resizeMove" +::method hideFast unguarded external "LIBRARY oodialog wb_showFast" +::method isEnabled unguarded external "LIBRARY oodialog wb_isEnabled" +::method isVisible unguarded external "LIBRARY oodialog wb_isVisible" +::method mapWindowPoints unguarded external "LIBRARY oodialog wb_mapWindowPoints" ::method moveTo unguarded external "LIBRARY oodialog wb_resizeMove" -::method setWindowPos unguarded external "LIBRARY oodialog wb_setWindowPos" ::method moveWindow unguarded external "LIBRARY oodialog wb_moveSizeWindow" +::method redraw unguarded external "LIBRARY oodialog wb_redraw" +::method redrawClient unguarded external "LIBRARY oodialog wb_redrawClient" +::method resizeTo unguarded external "LIBRARY oodialog wb_resizeMove" +::method screen2client unguarded external "LIBRARY oodialog wb_screenClient" +::method sendMessage unguarded external "LIBRARY oodialog wb_sendMessage" +::method sendMessageHandle unguarded external "LIBRARY oodialog wb_sendMessage" +::method setRect unguarded external "LIBRARY oodialog wb_setRect" +::method setText unguarded external "LIBRARY oodialog wb_setText" +::method setTitle unguarded external "LIBRARY oodialog wb_setText" +::method setWindowPos unguarded external "LIBRARY oodialog wb_setWindowPos" +::method show unguarded external "LIBRARY oodialog wb_show" +::method showFast unguarded external "LIBRARY oodialog wb_showFast" ::method sizeWindow unguarded external "LIBRARY oodialog wb_moveSizeWindow" -::method getRealSize unguarded external "LIBRARY oodialog wb_getSizePos" -::method getRealPos unguarded external "LIBRARY oodialog wb_getSizePos" +::method title unguarded external "LIBRARY oodialog wb_getText" +::method "title=" unguarded external "LIBRARY oodialog wb_setText" +::method update unguarded external "LIBRARY oodialog wb_redrawClient" ::method windowRect unguarded external "LIBRARY oodialog wb_windowRect" -::method clientRect unguarded external "LIBRARY oodialog wb_clientRect" -::method clear unguarded external "LIBRARY oodialog wb_clear" -::method resize unguarded -- old method, this is not accurate. - use strict arg width, height, showOptions = "" - p = .Point~new(0, 0) - s = .Size~new(trunc(width * self~factorX), trunc(height * self~factorY)) - if self~setRect(p, s, "NOMOVE " || showOptions) then return 0 - else return 1 -::method move unguarded -- old method, this is not accurate. - use strict arg xPos, yPos, showOptions = "" - p = .Point~new(trunc(xPos * self~factorX), trunc(yPos * self~factorY)) - s = .Size~new(0, 0) - if self~setRect(p, s, "NOSIZE " || showOptions) then return 0 - else return 1 +::method clientToScreen unguarded -- old method returns coordinates as a string + use strict arg x, y + p = .Point~new(x, y) + if self~client2screen(p) then return p~x p~y + else return 0 0 ::method getSize unguarded -- old method, this is not accurate. forward message "getRealSize" continue @@ -167,35 +150,48 @@ rect = result return rect~left rect~top rect~right rect~bottom -::method foregroundWindow unguarded external "LIBRARY oodialog wb_foreGroundWindow" -::method mapWindowPoints unguarded external "LIBRARY oodialog wb_mapWindowPoints" -::method screen2client unguarded external "LIBRARY oodialog wb_screenClient" -::method client2screen unguarded external "LIBRARY oodialog wb_screenClient" +::method move unguarded -- old method, this is not accurate. + use strict arg xPos, yPos, showOptions = "" + p = .Point~new(trunc(xPos * self~factorX), trunc(yPos * self~factorY)) + s = .Size~new(0, 0) + if self~setRect(p, s, "NOSIZE " || showOptions) then return 0 + else return 1 +::method resize unguarded -- old method, this is not accurate. + use strict arg width, height, showOptions = "" + p = .Point~new(0, 0) + s = .Size~new(trunc(width * self~factorX), trunc(height * self~factorY)) + if self~setRect(p, s, "NOMOVE " || showOptions) then return 0 + else return 1 + ::method screenToClient unguarded -- old method returns coordinates as a string use strict arg x, y p = .Point~new(x, y) if self~screen2client(p) then return p~x p~y else return 0 0 -::method clientToScreen unguarded -- old method returns coordinates as a string - use strict arg x, y - p = .Point~new(x, y) - if self~client2screen(p) then return p~x p~y - else return 0 0 +-- These shortcut methods are for internal use, do not document. +::method getWindowLong private unguarded external "LIBRARY oodialog wb_getWindowLong_pvt" -- Not intending to document getWindowLong, at this point +::method sendWinHandle2Msg unguarded external "LIBRARY oodialog wb_sendWinHandle2Msg" -- Internal use do not document +::method sendWinHandle2MsgH unguarded external "LIBRARY oodialog wb_sendWinHandle2Msg" -- Internal use do not document +::method sendWinHandleMsg unguarded external "LIBRARY oodialog wb_sendWinHandleMsg" -- Internal use do not document +::method sendWinHandleMsgH unguarded external "LIBRARY oodialog wb_sendWinHandleMsg" -- Internal use do not document +::method sendWinIntMsg unguarded external "LIBRARY oodialog wb_sendWinIntMsg" -- Internal use do not document +::method sendWinIntMsgH unguarded external "LIBRARY oodialog wb_sendWinIntMsg" -- Internal use do not document +::method sendWinUintMsg unguarded external "LIBRARY oodialog wb_sendWinUintMsg" -- Internal use do not document ::method unknown unguarded use arg msgname call errorDialog msgname || " is not a method of " || self +::method assignWindow -- DEPRECATED + return 0 + ::method getSystemMetrics unguarded -- DEPRECATED use strict arg index return .DlgUtil~getSystemMetrics(index) -::method assignWindow -- DEPRECATED - return 0 - ::class 'Window' public inherit WindowBase ::method init external "LIBRARY oodialog window_init" ::method unInit external "LIBRARY oodialog window_unInit" Modified: sandbox/mark/ooDialog.beta/extensions/platform/windows/oodialog.4.2.0/UtilityClasses.cls =================================================================== --- sandbox/mark/ooDialog.beta/extensions/platform/windows/oodialog.4.2.0/UtilityClasses.cls 2012-01-21 04:56:45 UTC (rev 7448) +++ sandbox/mark/ooDialog.beta/extensions/platform/windows/oodialog.4.2.0/UtilityClasses.cls 2012-01-21 16:59:05 UTC (rev 7449) @@ -184,35 +184,38 @@ ::class 'DlgUtil' public ::method init class external "LIBRARY oodialog dlgutil_init_cls" -::method version class external "LIBRARY oodialog dlgutil_version_cls" +::method and class external "LIBRARY oodialog dlgutil_and_cls" ::method comctl32Version class external "LIBRARY oodialog dlgutil_comctl32Version_cls" +::method getSystemMetrics class external "LIBRARY oodialog dlgutil_getSystemMetrics_cls" +::method handleToPointer class external "LIBRARY oodialog dlgutil_handleToPointer_cls" ::method hiWord class external "LIBRARY oodialog dlgutil_hiWord_cls" ::method loWord class external "LIBRARY oodialog dlgutil_loWord_cls" -::method sHiWord class external "LIBRARY oodialog dlgutil_shiWord_cls" -::method sLoWord class external "LIBRARY oodialog dlgutil_sloWord_cls" +::method makeLParam class external "LIBRARY oodialog dlgutil_makeLPARAM_cls" ::method makeWParam class external "LIBRARY oodialog dlgutil_makeWPARAM_cls" -::method makeLParam class external "LIBRARY oodialog dlgutil_makeLPARAM_cls" -::method unsigned class external "LIBRARY oodialog dlgutil_unsigned_cls" -::method signed class external "LIBRARY oodialog dlgutil_signed_cls" -::method and class external "LIBRARY oodialog dlgutil_and_cls" ::method or class external "LIBRARY oodialog dlgutil_or_cls" +::method screenArea class external "LIBRARY oodialog dlgutil_screenArea_cls" +::method screenSize class external "LIBRARY oodialog dlgutil_screenSize_cls" ::method shiftLeft class external "LIBRARY oodialog dlgutil_shiftLeft_cls" ::method shiftRight class external "LIBRARY oodialog dlgutil_shiftRight_cls" +::method sHiWord class external "LIBRARY oodialog dlgutil_shiWord_cls" +::method signed class external "LIBRARY oodialog dlgutil_signed_cls" +::method sLoWord class external "LIBRARY oodialog dlgutil_sloWord_cls" ::method sShiftLeft class external "LIBRARY oodialog dlgutil_sShiftLeft_cls" ::method sShiftRight class external "LIBRARY oodialog dlgutil_sShiftRight_cls" -::method screenSize class external "LIBRARY oodialog dlgutil_screenSize_cls" -::method screenArea class external "LIBRARY oodialog dlgutil_screenArea_cls" -::method getSystemMetrics class external "LIBRARY oodialog dlgutil_getSystemMetrics_cls" -::method handleToPointer class external "LIBRARY oodialog dlgutil_handleToPointer_cls" ::method threadID class external "LIBRARY oodialog dlgutil_threadID_cls" +::method unsigned class external "LIBRARY oodialog dlgutil_unsigned_cls" +::method version class external "LIBRARY oodialog dlgutil_version_cls" +::method windowFromPoint class external "LIBRARY oodialog dlgutil_windowFromPoint_cls" + ::method test class external "LIBRARY oodialog dlgutil_test_cls" ::class 'SPI' public ::constant WHEEL_PAGESCROLL 4294267295 ::method init class external "LIBRARY oodialog spi_init_cls" --- Note, no 'get' for drag height and width, use SM class cxDrag and cyDrag +::attribute dragHeight get class external "LIBRARY oodialog spi_getDragHeight_cls" ::attribute dragHeight set class external "LIBRARY oodialog spi_setDragHeight_cls" +::attribute dragWidth get class external "LIBRARY oodialog spi_getDragWidth_cls" ::attribute dragWidth set class external "LIBRARY oodialog spi_setDragWidth_cls" ::attribute updateFlag get class external "LIBRARY oodialog spi_getUpdateFlag_cls" @@ -277,6 +280,7 @@ ::attribute x set external "LIBRARY oodialog point_setX" ::attribute y get external "LIBRARY oodialog point_y" ::attribute y set external "LIBRARY oodialog point_setY" +::method copy external "LIBRARY oodialog point_copy" ::method '+' external "LIBRARY oodialog point_add" ::method '-' external "LIBRARY oodialog point_subtract" ::method incr external "LIBRARY oodialog point_incr" @@ -312,7 +316,7 @@ ::method new class external "LIBRARY oodialog mouse_new_cls" ::method init external "LIBRARY oodialog mouse_init" -::method getDoubleClickTime class external "LIBRARY oodialog mouse_getDoubleClickTime_cls" +::method doubleClickTime class external "LIBRARY oodialog mouse_doubleClickTime_cls" ::method loadCursor class external "LIBRARY oodialog mouse_loadCursor_cls" ::method loadCursorFromFile class external "LIBRARY oodialog mouse_loadCursorFromFile_cls" ::method setDoubleClickTime class external "LIBRARY oodialog mouse_setDoubleClickTime_cls" @@ -331,6 +335,7 @@ ::method isButtonDown external "LIBRARY oodialog mouse_isButtonDown" ::method no external "LIBRARY oodialog mouse_setCursor" ::method releaseCapture external "LIBRARY oodialog mouse_get_release_capture" +::method releaseClipCursor external "LIBRARY oodialog mouse_releaseClipCursor" ::method restoreCursor external "LIBRARY oodialog mouse_restoreCursor" ::method setCursor external "LIBRARY oodialog mouse_setCursor" ::method setCursorPos external "LIBRARY oodialog mouse_setCursorPos" Modified: sandbox/mark/ooDialog.beta/extensions/platform/windows/oodialog.4.2.0/ooDialog.cpp =================================================================== --- sandbox/mark/ooDialog.beta/extensions/platform/windows/oodialog.4.2.0/ooDialog.cpp 2012-01-21 04:56:45 UTC (rev 7448) +++ sandbox/mark/ooDialog.beta/extensions/platform/windows/oodialog.4.2.0/ooDialog.cpp 2012-01-21 16:59:05 UTC (rev 7449) @@ -741,6 +741,27 @@ } +#define CWP_KEYWORDS "SKIPDISABLED, SKIPINVISIBLE, SKIPTRANSPARENT, or ALL" + +uint32_t flags2cwp(CSTRING flags) +{ + uint32_t opts = 0xFFFFFFFF; + + if ( StrStrI(flags, "ALL") ) + { + opts = CWP_ALL; + } + else + { + opts = 0; + if ( StrStrI(flags, "SKIPDISABLED" ) ) opts |= CWP_SKIPDISABLED; + if ( StrStrI(flags, "SKIPINVISIBLE" ) ) opts |= CWP_SKIPINVISIBLE; + if ( StrStrI(flags, "SKIPTRANSPARENT") ) opts |= CWP_SKIPTRANSPARENT; + } + return opts; +} + + /** * Interface to the Windows API: SendMessage(). * @@ -1842,6 +1863,41 @@ } +/** WindowBse::childWindowFromPoint() + * + * + */ +RexxMethod3(RexxStringObject, wb_childWindowFromPoint, RexxObjectPtr, pt, OPTIONAL_CSTRING, _flags, CSELF, pCSelf) +{ + HWND hwnd = wbSetUp(context, pCSelf); + if ( hwnd == NULL ) + { + goto err_out; + } + + PPOINT p = rxGetPoint(context, pt, 1); + if ( p == NULL ) + { + goto err_out; + } + + uint32_t flags = CWP_SKIPINVISIBLE | CWP_SKIPDISABLED | CWP_SKIPTRANSPARENT; + if ( argumentExists(2) ) + { + flags = flags2cwp(_flags); + if ( flags == 0xFFFFFFFF ) + { + wrongArgKeywordsException(context->threadContext, 2, CWP_KEYWORDS, _flags); + goto err_out; + } + } + + return pointer2string(context, ChildWindowFromPointEx(hwnd, *p, flags)); + +err_out: + return NULLOBJECT; +} + /** WindowBase::clientRect() * * Retrieves the coordinates of a window's client area. The coordinates are in Modified: sandbox/mark/ooDialog.beta/extensions/platform/windows/oodialog.4.2.0/ooDialog.hpp =================================================================== --- sandbox/mark/ooDialog.beta/extensions/platform/windows/oodialog.4.2.0/ooDialog.hpp 2012-01-21 04:56:45 UTC (rev 7448) +++ sandbox/mark/ooDialog.beta/extensions/platform/windows/oodialog.4.2.0/ooDialog.hpp 2012-01-21 16:59:05 UTC (rev 7449) @@ -193,7 +193,7 @@ } MsgReplyType; -// Identifies an error, that should never happen, discovered in RexxDlgProc(). +// Identifies an error, that should never happen, discovered in RexxDlgProc(), // or some other place trying to do a therad attach. Used in // endDialogPremature() to determine what message to display. typedef enum Modified: sandbox/mark/ooDialog.beta/extensions/platform/windows/oodialog.4.2.0/oodMessaging.cpp =================================================================== --- sandbox/mark/ooDialog.beta/extensions/platform/windows/oodialog.4.2.0/oodMessaging.cpp 2012-01-21 04:56:45 UTC (rev 7448) +++ sandbox/mark/ooDialog.beta/extensions/platform/windows/oodialog.4.2.0/oodMessaging.cpp 2012-01-21 16:59:05 UTC (rev 7449) @@ -1646,6 +1646,29 @@ break; } + case LVN_KEYDOWN : + { + RexxObjectPtr rxLV = createControlFromHwnd(c, pcpbd, ((NMHDR *)lParam)->hwndFrom, winListView, true); + uint16_t vKey = ((NMLVKEYDOWN *)lParam)->wVKey; + + // The third argument is whether it is an extended key or not. That + // is the only way to tell between ... + RexxArrayObject args = getKeyEventRexxArgs(c, (WPARAM)vKey, false, rxLV); + + if ( expectReply ) + { + invokeDirect(c, pcpbd, methodName, args); + } + else + { + invokeDispatch(c, pcpbd->rexxSelf, c->String(methodName), args); + } + + msgReply = ReplyTrue; + + break; + } + default : break; } @@ -2892,15 +2915,20 @@ lvn = LVN_COLUMNCLICK; *tag = TAG_LISTVIEW; } - else if ( StrCmpI(keyword, "SELECTCHANGED") == 0 ) + else if ( StrCmpI(keyword, "FOCUSCHANGED") == 0 ) { lvn = LVN_ITEMCHANGED; - *tag = TAG_LISTVIEW | TAG_STATECHANGED | TAG_SELECTCHANGED; + *tag = TAG_LISTVIEW | TAG_STATECHANGED | TAG_FOCUSCHANGED; } - else if ( StrCmpI(keyword, "FOCUSCHANGED") == 0 ) + else if ( StrCmpI(keyword, "KEYDOWNEX") == 0 ) { + lvn = LVN_KEYDOWN; + *tag = TAG_LISTVIEW; + } + else if ( StrCmpI(keyword, "SELECTCHANGED") == 0 ) + { lvn = LVN_ITEMCHANGED; - *tag = TAG_LISTVIEW | TAG_STATECHANGED | TAG_FOCUSCHANGED; + *tag = TAG_LISTVIEW | TAG_STATECHANGED | TAG_SELECTCHANGED; } else if ( StrCmpI(keyword, "SELECTFOCUS") == 0 ) { @@ -2927,8 +2955,6 @@ */ inline CSTRING lvn2name(uint32_t lvn, uint32_t tag) { - tag &= ~(TAG_REPLYFROMREXX | TAG_LISTVIEW | TAG_STATECHANGED); - switch ( lvn ) { case LVN_ITEMCHANGING : return "onChanging"; @@ -2941,10 +2967,20 @@ case LVN_BEGINDRAG : return "onBegindrag"; case LVN_BEGINRDRAG : return "onBeginrdrag"; case LVN_ITEMACTIVATE : return "onActivate"; - case LVN_KEYDOWN : return "onKeydown"; case NM_CLICK : return "onClick"; + case LVN_KEYDOWN : + if ( tag & TAG_LISTVIEW ) + { + return "onKeyDownEx"; + } + else + { + return "onKeydown"; + } case LVN_ITEMCHANGED : + tag &= ~(TAG_REPLYFROMREXX | TAG_LISTVIEW | TAG_STATECHANGED); + switch ( tag ) { case TAG_NOTHING : @@ -4490,24 +4526,24 @@ * @param event Keyword specifying which event to connect. Keywords at * this time: * + * ACTIVATE + * BEGINDRAG + * BEGINRDRAG + * BEGINEDIT + * CHANGED * CHANGING - * CHANGED - * INSERTED + * COLUMNCLICK + * DEFAULTEDIT * DELETE * DELETEALL - * BEGINEDIT * ENDEDIT - * DEFAULTEDIT - * COLUMNCLICK - * BEGINDRAG - * BEGINRDRAG - * ACTIVATE + * INSERTED * KEYDOWN * + * CHECKBOXCHANGED * CLICK - * CHECKBOXCHANGED + * FOCUSCHANGED * SELECTCHANGED - * FOCUSCHANGED * SELECTFOCUS * * @param methodName [OPTIONAL] The name of the method to be invoked in the Modified: sandbox/mark/ooDialog.beta/extensions/platform/windows/oodialog.4.2.0/oodMouse.cpp =================================================================== --- sandbox/mark/ooDialog.beta/extensions/platform/windows/oodialog.4.2.0/oodMouse.cpp 2012-01-21 04:56:45 UTC (rev 7448) +++ sandbox/mark/ooDialog.beta/extensions/platform/windows/oodialog.4.2.0/oodMouse.cpp 2012-01-21 16:59:05 UTC (rev 7449) @@ -681,7 +681,7 @@ return mouse; } -/** Mouse::getDoubleClickTime() [Class method] +/** Mouse::doubleClickTime() [Class method] * * Gets the current double-click time for the mouse. A double-click is a * series of two clicks of the mouse button, the second occurring within a @@ -694,7 +694,7 @@ * @remarks We do not even need the CSelf struct for this method, so we do not * use. */ -RexxMethod0(uint32_t, mouse_getDoubleClickTime_cls) +RexxMethod0(uint32_t, mouse_doubleClickTime_cls) { return GetDoubleClickTime(); } @@ -719,8 +719,12 @@ * * @remarks We do not even need the CSelf struct for this method, so we do not * use. + * + * Note that if interval is omitted, the value of interval will be 0. + * Since this is the default for interval, we do not need to check if + * the argument was omitted or not. */ -RexxMethod1(RexxObjectPtr, mouse_setDoubleClickTime_cls, uint32_t, interval) +RexxMethod1(RexxObjectPtr, mouse_setDoubleClickTime_cls, OPTIONAL_uint32_t, interval) { oodResetSysErrCode(context->threadContext); @@ -762,7 +766,7 @@ * @remarks We do not even need the CSelf struct for this method, so we do not * use. */ -RexxMethod1(logical_t, mouse_swapButton_cls, logical_t, swap) +RexxMethod1(logical_t, mouse_swapButton_cls, OPTIONAL_logical_t, swap) { oodResetSysErrCode(context->threadContext); @@ -1452,6 +1456,10 @@ } result = mouseSetCursor(context, pcm, hCursor); + if ( result == NULL ) + { + result = TheZeroObj; + } done_out: return result; @@ -1596,8 +1604,8 @@ * * The cursor is a shared resource. If an application confines the * cursor, it must release the cursor at some point by using - * clipCursor(.nil) before the user can move to another application - * using the mouse. + * releaseClipCursor() before the user can move to another + * application using the mouse. * * Although the MSDN documentation does not explicity state this, * experimentation shows that if the user brings up the Alt-Tab @@ -1605,14 +1613,19 @@ * the cursor is no lnoger confined. If the user closes the dialog, * the mouse is no longer confined. * - * TODO need to test this with a regular user account on Vista an + * @remarks TODO need to test this with a regular user account on Vista an * Win7. MDSN says: The calling process must have * WINSTA_WRITEATTRIBUTES access to the window station. * * TODO using ARGLIST, if all arguments are omitted, there is a syntax * error raised saying arg 1 is required. This seems an interpreter - * bug, or mis-design. Using .nil is just a work around, need to - * check why the syntax condition is raised. + * bug, or mis-design. To work around this, releaseClipCursor() is + * implemented. There is no ReleaseClipCursor in the Windows API, but + * releaseClipCursor() in the Mouse class follows the same pattern as + * capture() / getCapture() / releaseCapture for the mouse. We now + * have clipCursor() / getClipCursor() / releaseClipCursor(), which + * may actually be preferable. Still need to check why the syntax + * condition is raised. */ RexxMethod2(logical_t, mouse_clipCursor, ARGLIST, args, CSELF, pCSelf) { @@ -1622,34 +1635,58 @@ return 0; } - RECT r = {0}; - PRECT clipArea; + RECT r = {0}; + size_t arraySize; + size_t argsUsed; - RexxObjectPtr arg1 = context->GetArgument(1); - - if ( arg1 == TheNilObj ) + if ( ! getRectFromArglist(context, args, &r, true, 1, 4, &arraySize, &argsUsed) ) { - clipArea = NULL; + return FALSE; } - else + if ( argsUsed < arraySize ) { - size_t arraySize; - size_t argsUsed; + tooManyArgsException(context->threadContext, argsUsed); + return FALSE; + } - if ( ! getRectFromArglist(context, args, &r, true, 1, 4, &arraySize, &argsUsed) ) - { - return FALSE; - } - if ( argsUsed < arraySize ) - { - tooManyArgsException(context->threadContext, argsUsed); - return FALSE; - } - clipArea = &r; + if ( ClipCursor(&r) == 0 ) + { + oodSetSysErrCode(context->threadContext); + return FALSE; } + return TRUE; +} - if ( ClipCursor(clipArea) == 0 ) + +/** Mouse::releaseClipCursor + * + * Releases the cursor so that it is free to move anywhere on the screen. + * + * @return True on success, false on error. + * + * @notes Sets the .SystemErrorCode. + * + * The cursor is a shared resource. If an application confines the + * cursor, it must release the cursor at some point by using + * releaseClipCursor() before the user can move to another + * application using the mouse. + * + * Although the MSDN documentation does not explicity state this, + * experimentation shows that if the user brings up the Alt-Tab + * switching dialog and moves to another application in that manner, + * the cursor is no lnoger confined. If the user closes the dialog, + * the mouse is no longer confined. + */ +RexxMethod1(logical_t, mouse_releaseClipCursor, CSELF, pCSelf) +{ + pCMouse pcm = getMouseCSelf(context, pCSelf); + if ( pcm == NULL ) { + return 0; + } + + if ( ClipCursor(NULL) == 0 ) + { oodSetSysErrCode(context->threadContext); return FALSE; } Modified: sandbox/mark/ooDialog.beta/extensions/platform/windows/oodialog.4.2.0/oodPackageEntry.cpp =================================================================== --- sandbox/mark/ooDialog.beta/extensions/platform/windows/oodialog.4.2.0/oodPackageEntry.cpp 2012-01-21 04:56:45 UTC (rev 7448) +++ sandbox/mark/ooDialog.beta/extensions/platform/windows/oodialog.4.2.0/oodPackageEntry.cpp 2012-01-21 16:59:05 UTC (rev 7449) @@ -408,6 +408,7 @@ REXX_METHOD_PROTOTYPE(dlgutil_screenArea_cls); REXX_METHOD_PROTOTYPE(dlgutil_handleToPointer_cls); REXX_METHOD_PROTOTYPE(dlgutil_threadID_cls); +REXX_METHOD_PROTOTYPE(dlgutil_windowFromPoint_cls); REXX_METHOD_PROTOTYPE(dlgutil_test_cls); // ApplicationManager @@ -426,7 +427,9 @@ // SPI REXX_METHOD_PROTOTYPE(spi_init_cls); +REXX_METHOD_PROTOTYPE(spi_getDragHeight_cls); REXX_METHOD_PROTOTYPE(spi_setDragHeight_cls); +REXX_METHOD_PROTOTYPE(spi_getDragWidth_cls); REXX_METHOD_PROTOTYPE(spi_setDragWidth_cls); REXX_METHOD_PROTOTYPE(spi_getUpdateFlag_cls); REXX_METHOD_PROTOTYPE(spi_setUpdateFlag_cls); @@ -493,6 +496,7 @@ REXX_METHOD_PROTOTYPE(wb_moveSizeWindow); REXX_METHOD_PROTOTYPE(wb_getSizePos); REXX_METHOD_PROTOTYPE(wb_windowRect); +REXX_METHOD_PROTOTYPE(wb_childWindowFromPoint); REXX_METHOD_PROTOTYPE(wb_clientRect); REXX_METHOD_PROTOTYPE(wb_clear); REXX_METHOD_PROTOTYPE(wb_foreGroundWindow); @@ -1145,6 +1149,7 @@ REXX_METHOD_PROTOTYPE(point_setX); REXX_METHOD_PROTOTYPE(point_y); REXX_METHOD_PROTOTYPE(point_setY); +REXX_METHOD_PROTOTYPE(point_copy); REXX_METHOD_PROTOTYPE(point_add); REXX_METHOD_PROTOTYPE(point_subtract); REXX_METHOD_PROTOTYPE(point_incr); @@ -1248,25 +1253,26 @@ // Mouse REXX_METHOD_PROTOTYPE(mouse_new_cls); +REXX_METHOD_PROTOTYPE(mouse_doubleClickTime_cls); REXX_METHOD_PROTOTYPE(mouse_loadCursor_cls); REXX_METHOD_PROTOTYPE(mouse_loadCursorFromFile_cls); -REXX_METHOD_PROTOTYPE(mouse_getDoubleClickTime_cls); REXX_METHOD_PROTOTYPE(mouse_setDoubleClickTime_cls); REXX_METHOD_PROTOTYPE(mouse_swapButton_cls); REXX_METHOD_PROTOTYPE(mouse_init); -REXX_METHOD_PROTOTYPE(mouse_trackEvent); +REXX_METHOD_PROTOTYPE(mouse_capture); +REXX_METHOD_PROTOTYPE(mouse_clipCursor); +REXX_METHOD_PROTOTYPE(mouse_connectEvent); REXX_METHOD_PROTOTYPE(mouse_dragDetect); +REXX_METHOD_PROTOTYPE(mouse_getClipCursor); +REXX_METHOD_PROTOTYPE(mouse_getCursorPos); REXX_METHOD_PROTOTYPE(mouse_get_release_capture); -REXX_METHOD_PROTOTYPE(mouse_capture); REXX_METHOD_PROTOTYPE(mouse_isButtonDown); -REXX_METHOD_PROTOTYPE(mouse_getCursorPos); +REXX_METHOD_PROTOTYPE(mouse_releaseClipCursor); REXX_METHOD_PROTOTYPE(mouse_restoreCursor); REXX_METHOD_PROTOTYPE(mouse_setCursor); REXX_METHOD_PROTOTYPE(mouse_setCursorPos); REXX_METHOD_PROTOTYPE(mouse_showCursor); -REXX_METHOD_PROTOTYPE(mouse_clipCursor); -REXX_METHOD_PROTOTYPE(mouse_getClipCursor); -REXX_METHOD_PROTOTYPE(mouse_connectEvent); +REXX_METHOD_PROTOTYPE(mouse_trackEvent); REXX_METHOD_PROTOTYPE(mouse_test); RexxMethodEntry oodialog_methods[] = { @@ -1292,6 +1298,7 @@ REXX_METHOD(dlgutil_getSystemMetrics_cls, dlgutil_getSystemMetrics_cls), REXX_METHOD(dlgutil_handleToPointer_cls, dlgutil_handleToPointer_cls), REXX_METHOD(dlgutil_threadID_cls, dlgutil_threadID_cls), + REXX_METHOD(dlgutil_windowFromPoint_cls, dlgutil_windowFromPoint_cls), REXX_METHOD(dlgutil_test_cls, dlgutil_test_cls), REXX_METHOD(app_init, app_init), @@ -1309,7 +1316,9 @@ // SPI REXX_METHOD(spi_init_cls, spi_init_cls), + REXX_METHOD(spi_getDragHeight_cls, spi_getDragHeight_cls), REXX_METHOD(spi_setDragHeight_cls, spi_setDragHeight_cls), + REXX_METHOD(spi_getDragWidth_cls, spi_getDragWidth_cls), REXX_METHOD(spi_setDragWidth_cls, spi_setDragWidth_cls), REXX_METHOD(spi_getUpdateFlag_cls, spi_getUpdateFlag_cls), REXX_METHOD(spi_setUpdateFlag_cls, spi_setUpdateFlag_cls), @@ -1351,35 +1360,36 @@ REXX_METHOD(wb_setSizeY, wb_setSizeY), REXX_METHOD(wb_getPixelCX, wb_getPixelCX), REXX_METHOD(wb_getPixelCY, wb_getPixelCY), + REXX_METHOD(wb_childWindowFromPoint, wb_childWindowFromPoint), + REXX_METHOD(wb_clientRect, wb_clientRect), + REXX_METHOD(wb_clear, wb_clear), + REXX_METHOD(wb_display, wb_display), + REXX_METHOD(wb_enable, wb_enable), + REXX_METHOD(wb_foreGroundWindow, wb_foreGroundWindow), + REXX_METHOD(wb_getSizePos, wb_getSizePos), + REXX_METHOD(wb_getText, wb_getText), + REXX_METHOD(wb_getTextSizePx, wb_getTextSizePx), + REXX_METHOD(wb_getTextSizeScreen, wb_getTextSizeScreen), + REXX_METHOD(wb_getWindowLong_pvt, wb_getWindowLong_pvt), + REXX_METHOD(wb_isEnabled, wb_isEnabled), + REXX_METHOD(wb_isVisible, wb_isVisible), + REXX_METHOD(wb_mapWindowPoints, wb_mapWindowPoints), + REXX_METHOD(wb_moveSizeWindow, wb_moveSizeWindow), + REXX_METHOD(wb_redraw, wb_redraw), + REXX_METHOD(wb_redrawClient, wb_redrawClient), + REXX_METHOD(wb_resizeMove, wb_resizeMove), + REXX_METHOD(wb_screenClient, wb_screenClient), + REXX_METHOD(wb_setRect, wb_setRect), + REXX_METHOD(wb_setText, wb_setText), REXX_METHOD(wb_sendMessage, wb_sendMessage), REXX_METHOD(wb_sendWinIntMsg, wb_sendWinIntMsg), - REXX_METHOD(wb_sendWinUintMsg, wb_sendWinUintMsg), REXX_METHOD(wb_sendWinHandleMsg, wb_sendWinHandleMsg), REXX_METHOD(wb_sendWinHandle2Msg, wb_sendWinHandle2Msg), - REXX_METHOD(wb_enable, wb_enable), - REXX_METHOD(wb_isEnabled, wb_isEnabled), - REXX_METHOD(wb_isVisible, wb_isVisible), + REXX_METHOD(wb_sendWinUintMsg, wb_sendWinUintMsg), + REXX_METHOD(wb_setWindowPos, wb_setWindowPos), REXX_METHOD(wb_show, wb_show), REXX_METHOD(wb_showFast, wb_showFast), - REXX_METHOD(wb_display, wb_display), - REXX_METHOD(wb_redrawClient, wb_redrawClient), - REXX_METHOD(wb_redraw, wb_redraw), - REXX_METHOD(wb_getText, wb_getText), - REXX_METHOD(wb_setText, wb_setText), - REXX_METHOD(wb_getTextSizePx, wb_getTextSizePx), - REXX_METHOD(wb_getTextSizeScreen, wb_getTextSizeScreen), - REXX_METHOD(wb_setRect, wb_setRect), - REXX_METHOD(wb_resizeMove, wb_resizeMove), - REXX_METHOD(wb_setWindowPos, wb_setWindowPos), - REXX_METHOD(wb_moveSizeWindow, wb_moveSizeWindow), - REXX_METHOD(wb_getSizePos, wb_getSizePos), REXX_METHOD(wb_windowRect, wb_windowRect), - REXX_METHOD(wb_clientRect, wb_clientRect), - REXX_METHOD(wb_clear, wb_clear), - REXX_METHOD(wb_foreGroundWindow, wb_foreGroundWindow), - REXX_METHOD(wb_mapWindowPoints, wb_mapWindowPoints), - REXX_METHOD(wb_screenClient, wb_screenClient), - REXX_METHOD(wb_getWindowLong_pvt, wb_getWindowLong_pvt), REXX_METHOD(en_init_eventNotification, en_init_eventNotification), REXX_METHOD(en_connectKeyPress, en_connectKeyPress), @@ -2005,6 +2015,7 @@ REXX_METHOD(point_setX, point_setX), REXX_METHOD(point_y, point_y), REXX_METHOD(point_setY, point_setY), + REXX_METHOD(point_copy, point_copy), REXX_METHOD(point_add, point_add), REXX_METHOD(point_subtract, point_subtract), REXX_METHOD(point_incr, point_incr), @@ -2104,25 +2115,26 @@ // Mouse REXX_METHOD(mouse_new_cls, mouse_new_cls), + REXX_METHOD(mouse_doubleClickTime_cls, mouse_doubleClickTime_cls), REXX_METHOD(mouse_loadCursor_cls, mouse_loadCursor_cls), REXX_METHOD(mouse_loadCursorFromFile_cls, mouse_loadCursorFromFile_cls), - REXX_METHOD(mouse_getDoubleClickTime_cls, mouse_getDoubleClickTime_cls), REXX_METHOD(mouse_setDoubleClickTime_cls, mouse_setDoubleClickTime_cls), REXX_METHOD(mouse_swapButton_cls, mouse_swapButton_cls), REXX_METHOD(mouse_init, mouse_init), - REXX_METHOD(mouse_trackEvent, mouse_trackEvent), + REXX_METHOD(mouse_capture, mouse_capture), + REXX_METHOD(mouse_clipCursor, mouse_clipCursor), + REXX_METHOD(mouse_connectEvent, mouse_connectEvent), REXX_METHOD(mouse_dragDetect, mouse_dragDetect), + REXX_METHOD(mouse_getClipCursor, mouse_getClipCursor), + REXX_METHOD(mouse_getCursorPos, mouse_getCursorPos), REXX_METHOD(mouse_get_release_capture, mouse_get_release_capture), - REXX_METHOD(mouse_capture, mouse_capture), REXX_METHOD(mouse_isButtonDown, mouse_isButtonDown), - REXX_METHOD(mouse_getCursorPos, mouse_getCursorPos), + REXX_METHOD(mouse_releaseClipCursor, mouse_releaseClipCursor), REXX_METHOD(mouse_restoreCursor, mouse_restoreCursor), REXX_METHOD(mouse_setCursor, mouse_setCursor), REXX_METHOD(mouse_setCursorPos, mouse_setCursorPos), REXX_METHOD(mouse_showCursor, mouse_showCursor), - REXX_METHOD(mouse_clipCursor, mouse_clipCursor), - REXX_METHOD(mouse_getClipCursor, mouse_getClipCursor), - REXX_METHOD(mouse_connectEvent, mouse_connectEvent), + REXX_METHOD(mouse_trackEvent, mouse_trackEvent), REXX_METHOD(mouse_test, mouse_test), REXX_LAST_METHOD() Modified: sandbox/mark/ooDialog.beta/extensions/platform/windows/oodialog.4.2.0/oodUtilities.cpp =================================================================== --- sandbox/mark/ooDialog.beta/extensions/platform/windows/oodialog.4.2.0/oodUtilities.cpp 2012-01-21 04:56:45 UTC (rev 7448) +++ sandbox/mark/ooDialog.beta/extensions/platform/windows/oodialog.4.2.0/oodUtilities.cpp 2012-01-21 16:59:05 UTC (rev 7449) @@ -706,6 +706,21 @@ */ #define DLGUTIL_CLASS "DlgUtil" + +RexxObjectPtr SPI_getWorkArea(RexxMethodContext *c) +{ + oodResetSysErrCode(c->threadContext); + + RECT r = {0}; + if ( ! SystemParametersInfo(SPI_GETWORKAREA, 0, &r, 0) ) + { + oodSetSysErrCode(c->threadContext); + } + + return rxNewRect(c, &r); +} + + /** DlgUtil::init() [class method] * * The .DlgUtil class init() method. It executes when the .DlgUtil class is @@ -1053,19 +1068,6 @@ return result; } -RexxObjectPtr SPI_getWorkArea(RexxMethodContext *c) -{ - oodResetSysErrCode(c->threadContext); - - RECT r = {0}; - if ( ! SystemParametersInfo(SPI_GETWORKAREA, 0, &r, 0) ) - { - oodSetSysErrCode(c->threadContext); - } - - return rxNewRect(c, &r); -} - /** DlgUtil::screenArea() [class method] * * Gets the usable screen area (work area.) on the primary display monitor. The @@ -1103,6 +1105,21 @@ return GetCurrentThreadId(); } + +/** DlgUtil::windowFromPoint() [class method] + * + * + */ +RexxMethod1(RexxStringObject, dlgutil_windowFromPoint_cls, RexxObjectPtr, pt) +{ + PPOINT p = rxGetPoint(context, pt, 1); + if ( p != NULL ) + { + return pointer2string(context, WindowFromPoint(*p)); + } + return NULLOBJECT; +} + /** DlgUtil::test() [class method] * * Simple method to use for testing. @@ -1134,6 +1151,22 @@ return NULLOBJECT; } +/** SPI::dragHeight [class attribute get] + * + * @remarks SystemParametersInfo() can not be used to get the drag height or + * width. So originally the attribute was going to be a set only + * attribute. But, on reflection this seems silly, there is no + * reason the SPI class has to *only* use SystemParametersInfo(). We + * can just use GetSystemMetrics(). + */ +RexxMethod0(uint32_t, spi_getDragHeight_cls) +{ + oodResetSysErrCode(context->threadContext); + return (uint32_t)GetSystemMetrics(SM_CYDRAG); +} + +/** SPI::dragHeight [class attribute set] + */ RexxMethod2(RexxObjectPtr, spi_setDragHeight_cls, uint32_t, pixels, CSELF, pCSelf) { oodResetSysErrCode(context->threadContext); @@ -1145,6 +1178,22 @@ return NULLOBJECT; } +/** SPI::dragWidth [class attribute get] + * + * @remarks SystemParametersInfo() can not be used to get the drag height or + * width. So originally the attribute was going to be a set only + * attribute. But, on reflection this seems silly, there is no + * reason the SPI class has to *only* use SystemParametersInfo(). We + * can just use GetSystemMetrics(). + */ +RexxMethod0(uint32_t, spi_getDragWidth_cls) +{ + oodResetSysErrCode(context->threadContext); + return (uint32_t)GetSystemMetrics(SM_CXDRAG); +} + +/** SPI::dragWidth [class attribute set] + */ RexxMethod2(RexxObjectPtr, spi_setDragWidth_cls, uint32_t, pixels, CSELF, pCSelf) { oodResetSysErrCode(context->threadContext); @@ -1554,6 +1603,17 @@ RexxMethod2(RexxObjectPtr, point_setX, CSELF, p, int32_t, x) { ((POINT *)p)->x = x; return NULLOBJECT; } RexxMethod2(RexxObjectPtr, point_setY, CSELF, p, int32_t, y) { ((POINT *)p)->y = y; return NULLOBJECT; } +/** Point::copy() + * + * Returns a new point object that is a copy of this point. + * + */ +RexxMethod1(RexxObjectPtr, point_copy, CSELF, p) +{ + POINT *_p = (POINT *)p; + return rxNewPoint(context, _p->x, _p->y); +} + /** Point::+ * * Returns a new point object that is the result of "adding" two points. Modified: sandbox/mark/ooDialog.beta/extensions/platform/windows/oodialog.4.2.0/oodViewControls.cpp =================================================================== --- sandbox/mark/ooDialog.beta/extensions/platform/windows/oodialog.4.2.0/oodViewControls.cpp 2012-01-21 04:56:45 UTC (rev 7448) +++ sandbox/mark/ooDialog.beta/extensions/platform/windows/oodialog.4.2.0/oodViewControls.cpp 2012-01-21 16:59:05 UTC (rev 7449) @@ -4021,10 +4021,17 @@ * image determines the number of images. The image list is created * using the ILC_COLOR8 flag, only. No mask can be used. No room is * reserved for adding more images to the image list, etc.. + * + * @remarks It is possible for this method to fail, without an exception + * raised. Therefore returning NULLOBJECT on all errors is not + * viable. The question is whether to return .nil on error, or 0. + * For now, 0 is returned for an error. */ RexxMethod5(RexxObjectPtr, lv_setImageList, RexxObjectPtr, ilSrc, OPTIONAL_int32_t, width, OPTIONAL_int32_t, height, OPTIONAL_int32_t, ilType, CSELF, pCSelf) { + RexxObjectPtr result = TheNilObj; + HWND hwnd = getDChCtrl(pCSelf); oodResetSysErrCode(context->threadContext); @@ -4059,6 +4066,7 @@ imageList = oodILFromBMP(context, &himl, ilSrc, width, height, hwnd); if ( imageList == NULLOBJECT ) { + result = TheZeroObj; goto err_out; } @@ -4078,7 +4086,7 @@ return rxSetObjVar(context, getLVAttributeName(type), imageList); err_out: - return NULLOBJECT; + return result; } /** ListView::getImageList() This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |