comparison dwt/accessibility/Accessible.d @ 212:ab60f3309436

reverted the char[] to String and use the an alias.
author Frank Benoit <benoit@tionex.de>
date Mon, 05 May 2008 00:12:38 +0200
parents fa7d7d66b9ed
children 36f5cb12e1a2
comparison
equal deleted inserted replaced
211:ff59aeb96cac 212:ab60f3309436
629 VARIANT* v = &variant; 629 VARIANT* v = &variant;
630 //COM.MoveMemory(v, variant, VARIANT.sizeof); 630 //COM.MoveMemory(v, variant, VARIANT.sizeof);
631 if ((v.vt & 0xFFFF) !is COM.VT_I4) return COM.E_INVALIDARG; 631 if ((v.vt & 0xFFFF) !is COM.VT_I4) return COM.E_INVALIDARG;
632 632
633 /* Get the default defaultAction from the OS. */ 633 /* Get the default defaultAction from the OS. */
634 char[] osDefaultAction = null; 634 String osDefaultAction = null;
635 int code = iaccessible.get_accDefaultAction(variant, pszDefaultAction); 635 int code = iaccessible.get_accDefaultAction(variant, pszDefaultAction);
636 if (code is COM.E_INVALIDARG) code = COM.S_FALSE; // proxy doesn't know about app childID 636 if (code is COM.E_INVALIDARG) code = COM.S_FALSE; // proxy doesn't know about app childID
637 if (accessibleControlListeners.length is 0) return code; 637 if (accessibleControlListeners.length is 0) return code;
638 if (code is COM.S_OK) { 638 if (code is COM.S_OK) {
639 osDefaultAction = BSTRToStr( *pszDefaultAction, true ); 639 osDefaultAction = BSTRToStr( *pszDefaultAction, true );
657 VARIANT* v = &variant; 657 VARIANT* v = &variant;
658 //COM.MoveMemory(v, variant, VARIANT.sizeof); 658 //COM.MoveMemory(v, variant, VARIANT.sizeof);
659 if ((v.vt & 0xFFFF) !is COM.VT_I4) return COM.E_INVALIDARG; 659 if ((v.vt & 0xFFFF) !is COM.VT_I4) return COM.E_INVALIDARG;
660 660
661 /* Get the default description from the OS. */ 661 /* Get the default description from the OS. */
662 char[] osDescription = null; 662 String osDescription = null;
663 int code = iaccessible.get_accDescription(variant, pszDescription); 663 int code = iaccessible.get_accDescription(variant, pszDescription);
664 if (code is COM.E_INVALIDARG) code = COM.S_FALSE; // proxy doesn't know about app childID 664 if (code is COM.E_INVALIDARG) code = COM.S_FALSE; // proxy doesn't know about app childID
665 // TEMPORARY CODE - process tree even if there are no apps listening 665 // TEMPORARY CODE - process tree even if there are no apps listening
666 if (accessibleListeners.length is 0 && !( null is cast(Tree)control )) return code; 666 if (accessibleListeners.length is 0 && !( null is cast(Tree)control )) return code;
667 if (code is COM.S_OK) { 667 if (code is COM.S_OK) {
767 VARIANT* v = &variant; 767 VARIANT* v = &variant;
768 //COM.MoveMemory(v, variant, VARIANT.sizeof); 768 //COM.MoveMemory(v, variant, VARIANT.sizeof);
769 if ((v.vt & 0xFFFF) !is COM.VT_I4) return COM.E_INVALIDARG; 769 if ((v.vt & 0xFFFF) !is COM.VT_I4) return COM.E_INVALIDARG;
770 770
771 /* Get the default help string from the OS. */ 771 /* Get the default help string from the OS. */
772 char[] osHelp = null; 772 String osHelp = null;
773 int code = iaccessible.get_accHelp(variant, pszHelp); 773 int code = iaccessible.get_accHelp(variant, pszHelp);
774 if (code is COM.E_INVALIDARG) code = COM.S_FALSE; // proxy doesn't know about app childID 774 if (code is COM.E_INVALIDARG) code = COM.S_FALSE; // proxy doesn't know about app childID
775 if (accessibleListeners.length is 0) return code; 775 if (accessibleListeners.length is 0) return code;
776 if (code is COM.S_OK) { 776 if (code is COM.S_OK) {
777 // the original SysString is clearuped and bstr set to null 777 // the original SysString is clearuped and bstr set to null
804 VARIANT* v = &variant; 804 VARIANT* v = &variant;
805 //COM.MoveMemory(v, variant, VARIANT.sizeof); 805 //COM.MoveMemory(v, variant, VARIANT.sizeof);
806 if ((v.vt & 0xFFFF) !is COM.VT_I4) return COM.E_INVALIDARG; 806 if ((v.vt & 0xFFFF) !is COM.VT_I4) return COM.E_INVALIDARG;
807 807
808 /* Get the default keyboard shortcut from the OS. */ 808 /* Get the default keyboard shortcut from the OS. */
809 char[] osKeyboardShortcut = null; 809 String osKeyboardShortcut = null;
810 int code = iaccessible.get_accKeyboardShortcut(variant, pszKeyboardShortcut); 810 int code = iaccessible.get_accKeyboardShortcut(variant, pszKeyboardShortcut);
811 if (code is COM.E_INVALIDARG) code = COM.S_FALSE; // proxy doesn't know about app childID 811 if (code is COM.E_INVALIDARG) code = COM.S_FALSE; // proxy doesn't know about app childID
812 if (accessibleListeners.length is 0) return code; 812 if (accessibleListeners.length is 0) return code;
813 if (code is COM.S_OK) { 813 if (code is COM.S_OK) {
814 // the original SysString is clearuped and bstr set to null 814 // the original SysString is clearuped and bstr set to null
833 VARIANT* v = &variant; 833 VARIANT* v = &variant;
834 //COM.MoveMemory(v, variant, VARIANT.sizeof); 834 //COM.MoveMemory(v, variant, VARIANT.sizeof);
835 if ((v.vt & 0xFFFF) !is COM.VT_I4) return COM.E_INVALIDARG; 835 if ((v.vt & 0xFFFF) !is COM.VT_I4) return COM.E_INVALIDARG;
836 836
837 /* Get the default name from the OS. */ 837 /* Get the default name from the OS. */
838 char[] osName = null; 838 String osName = null;
839 int code = iaccessible.get_accName(variant, pszName); 839 int code = iaccessible.get_accName(variant, pszName);
840 if (code is COM.E_INVALIDARG) code = COM.S_FALSE; // proxy doesn't know about app childID 840 if (code is COM.E_INVALIDARG) code = COM.S_FALSE; // proxy doesn't know about app childID
841 if (accessibleListeners.length is 0) return code; 841 if (accessibleListeners.length is 0) return code;
842 if (code is COM.S_OK) { 842 if (code is COM.S_OK) {
843 // the original SysString is clearuped and bstr set to null 843 // the original SysString is clearuped and bstr set to null
1034 VARIANT* v = &variant; 1034 VARIANT* v = &variant;
1035 //COM.MoveMemory(v, variant, VARIANT.sizeof); 1035 //COM.MoveMemory(v, variant, VARIANT.sizeof);
1036 if ((v.vt & 0xFFFF) !is COM.VT_I4) return COM.E_INVALIDARG; 1036 if ((v.vt & 0xFFFF) !is COM.VT_I4) return COM.E_INVALIDARG;
1037 1037
1038 /* Get the default value string from the OS. */ 1038 /* Get the default value string from the OS. */
1039 char[] osValue = null; 1039 String osValue = null;
1040 int code = iaccessible.get_accValue(variant, pszValue); 1040 int code = iaccessible.get_accValue(variant, pszValue);
1041 if (code is COM.E_INVALIDARG) code = COM.S_FALSE; // proxy doesn't know about app childID 1041 if (code is COM.E_INVALIDARG) code = COM.S_FALSE; // proxy doesn't know about app childID
1042 if (accessibleControlListeners.length is 0) return code; 1042 if (accessibleControlListeners.length is 0) return code;
1043 if (code is COM.S_OK) { 1043 if (code is COM.S_OK) {
1044 int size = COM.SysStringByteLen(*pszValue); 1044 int size = COM.SysStringByteLen(*pszValue);