sync oleacc with wine 1.1.11

svn path=/trunk/; revision=38378
This commit is contained in:
Christoph von Wittich 2008-12-27 11:08:40 +00:00
parent 22610b8493
commit 6a5c426679
8 changed files with 466 additions and 2 deletions

View file

@ -24,10 +24,13 @@
#include "winuser.h"
#include "ole2.h"
#include "wine/unicode.h"
#include "wine/debug.h"
WINE_DEFAULT_DEBUG_CHANNEL(oleacc);
static HINSTANCE oleacc_handle = 0;
HRESULT WINAPI CreateStdAccessibleObject( HWND hwnd, LONG idObject,
REFIID riidInterface, void** ppvObject )
{
@ -50,6 +53,21 @@ HRESULT WINAPI AccessibleObjectFromWindow( HWND hwnd, DWORD dwObjectID,
return E_NOTIMPL;
}
BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason,
LPVOID lpvReserved)
{
TRACE("%p, %d, %p\n", hinstDLL, fdwReason, lpvReserved);
switch (fdwReason)
{
case DLL_PROCESS_ATTACH:
oleacc_handle = hinstDLL;
DisableThreadLibraryCalls(hinstDLL);
break;
}
return TRUE;
}
HRESULT WINAPI DllRegisterServer(void)
{
FIXME("\n");
@ -67,3 +85,59 @@ void WINAPI GetOleaccVersionInfo(DWORD* pVersion, DWORD* pBuild)
*pVersion = MAKELONG(2,4); /* Windows XP version of oleacc: 4.2.5406.0 */
*pBuild = MAKELONG(0,5406);
}
UINT WINAPI GetRoleTextW(DWORD role, LPWSTR lpRole, UINT rolemax)
{
INT ret;
WCHAR *resptr;
TRACE("%u %p %u\n", role, lpRole, rolemax);
/* return role text length */
if(!lpRole)
return LoadStringW(oleacc_handle, role, (LPWSTR)&resptr, 0);
ret = LoadStringW(oleacc_handle, role, lpRole, rolemax);
if(!(ret > 0)){
if(rolemax > 0) lpRole[0] = '\0';
return 0;
}
return ret;
}
UINT WINAPI GetRoleTextA(DWORD role, LPSTR lpRole, UINT rolemax)
{
UINT length;
WCHAR *roletextW;
TRACE("%u %p %u\n", role, lpRole, rolemax);
length = GetRoleTextW(role, NULL, 0);
if((length == 0) || (lpRole && !rolemax))
return 0;
roletextW = HeapAlloc(GetProcessHeap(), 0, (length + 1)*sizeof(WCHAR));
if(!roletextW)
return 0;
GetRoleTextW(role, roletextW, length + 1);
length = WideCharToMultiByte( CP_ACP, 0, roletextW, -1, NULL, 0, NULL, NULL );
if(!lpRole){
HeapFree(GetProcessHeap(), 0, roletextW);
return length - 1;
}
WideCharToMultiByte( CP_ACP, 0, roletextW, -1, lpRole, rolemax, NULL, NULL );
if(rolemax < length){
lpRole[rolemax-1] = '\0';
length = rolemax;
}
HeapFree(GetProcessHeap(), 0, roletextW);
return length - 1;
}

View file

@ -8,8 +8,10 @@
<include base="ReactOS">include/reactos/wine</include>
<define name="__WINESRC__" />
<file>main.c</file>
<file>oleacc.rc</file>
<library>wine</library>
<library>kernel32</library>
<library>user32</library>
<library>ntdll</library>
</module>
</group>

View file

@ -0,0 +1,27 @@
/*
* Top level resource file for oleacc
*
* Copyright 2008 Nikolay Sivov
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#include "windef.h"
#include "oleacc.h"
#include "oleacc_En.rc"
#include "oleacc_Fr.rc"
#include "oleacc_Ko.rc"
#include "oleacc_Nl.rc"

View file

@ -8,8 +8,8 @@
@ stdcall -private DllRegisterServer()
@ stdcall -private DllUnregisterServer()
@ stdcall GetOleaccVersionInfo(ptr ptr)
@ stub GetRoleTextA
@ stub GetRoleTextW
@ stdcall GetRoleTextA(long ptr long)
@ stdcall GetRoleTextW(long ptr long)
@ stub GetStateTextA
@ stub GetStateTextW
@ stub IID_IAccessible

View file

@ -0,0 +1,90 @@
/*
* English resources for oleacc
*
* Copyright 2008 Nikolay Sivov
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
LANGUAGE LANG_ENGLISH, SUBLANG_DEFAULT
STRINGTABLE DISCARDABLE
{
0 "unknown object" /* undocumented */
ROLE_SYSTEM_TITLEBAR "title bar"
ROLE_SYSTEM_MENUBAR "menu bar"
ROLE_SYSTEM_SCROLLBAR "scroll bar"
ROLE_SYSTEM_GRIP "grip"
ROLE_SYSTEM_SOUND "sound"
ROLE_SYSTEM_CURSOR "cursor"
ROLE_SYSTEM_CARET "caret"
ROLE_SYSTEM_ALERT "alert"
ROLE_SYSTEM_WINDOW "window"
ROLE_SYSTEM_CLIENT "client"
ROLE_SYSTEM_MENUPOPUP "popup menu"
ROLE_SYSTEM_MENUITEM "menu item"
ROLE_SYSTEM_TOOLTIP "tool tip"
ROLE_SYSTEM_APPLICATION "application"
ROLE_SYSTEM_DOCUMENT "document"
ROLE_SYSTEM_PANE "pane"
ROLE_SYSTEM_CHART "chart"
ROLE_SYSTEM_DIALOG "dialog"
ROLE_SYSTEM_BORDER "border"
ROLE_SYSTEM_GROUPING "grouping"
ROLE_SYSTEM_SEPARATOR "separator"
ROLE_SYSTEM_TOOLBAR "tool bar"
ROLE_SYSTEM_STATUSBAR "status bar"
ROLE_SYSTEM_TABLE "table"
ROLE_SYSTEM_COLUMNHEADER "column header"
ROLE_SYSTEM_ROWHEADER "row header"
ROLE_SYSTEM_COLUMN "column"
ROLE_SYSTEM_ROW "row"
ROLE_SYSTEM_CELL "cell"
ROLE_SYSTEM_LINK "link"
ROLE_SYSTEM_HELPBALLOON "help balloon"
ROLE_SYSTEM_CHARACTER "character"
ROLE_SYSTEM_LIST "list"
ROLE_SYSTEM_LISTITEM "list item"
ROLE_SYSTEM_OUTLINE "outline"
ROLE_SYSTEM_OUTLINEITEM "outline item"
ROLE_SYSTEM_PAGETAB "page tab"
ROLE_SYSTEM_PROPERTYPAGE "property page"
ROLE_SYSTEM_INDICATOR "indicator"
ROLE_SYSTEM_GRAPHIC "graphic"
ROLE_SYSTEM_STATICTEXT "static text"
ROLE_SYSTEM_TEXT "text"
ROLE_SYSTEM_PUSHBUTTON "push button"
ROLE_SYSTEM_CHECKBUTTON "check button"
ROLE_SYSTEM_RADIOBUTTON "radio button"
ROLE_SYSTEM_COMBOBOX "combo box"
ROLE_SYSTEM_DROPLIST "drop down"
ROLE_SYSTEM_PROGRESSBAR "progress bar"
ROLE_SYSTEM_DIAL "dial"
ROLE_SYSTEM_HOTKEYFIELD "hot key field"
ROLE_SYSTEM_SLIDER "slider"
ROLE_SYSTEM_SPINBUTTON "spin box"
ROLE_SYSTEM_DIAGRAM "diagram"
ROLE_SYSTEM_ANIMATION "animation"
ROLE_SYSTEM_EQUATION "equation"
ROLE_SYSTEM_BUTTONDROPDOWN "drop down button"
ROLE_SYSTEM_BUTTONMENU "menu button"
ROLE_SYSTEM_BUTTONDROPDOWNGRID "grid drop down button"
ROLE_SYSTEM_WHITESPACE "white space"
ROLE_SYSTEM_PAGETABLIST "page tab list"
ROLE_SYSTEM_CLOCK "clock"
ROLE_SYSTEM_SPLITBUTTON "split button"
ROLE_SYSTEM_IPADDRESS "IP address"
ROLE_SYSTEM_OUTLINEBUTTON "outline button"
}

View file

@ -0,0 +1,90 @@
/*
* French resources for oleacc
*
* Copyright 2008 Jonathan Ernst
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
LANGUAGE LANG_FRENCH, SUBLANG_NEUTRAL
STRINGTABLE DISCARDABLE
{
0 "objet inconnu" /* undocumented */
ROLE_SYSTEM_TITLEBAR "barre de titre"
ROLE_SYSTEM_MENUBAR "barre de menu"
ROLE_SYSTEM_SCROLLBAR "barre de défilement"
ROLE_SYSTEM_GRIP "grip"
ROLE_SYSTEM_SOUND "son"
ROLE_SYSTEM_CURSOR "curseur"
ROLE_SYSTEM_CARET "caret"
ROLE_SYSTEM_ALERT "alerte"
ROLE_SYSTEM_WINDOW "fenêtre"
ROLE_SYSTEM_CLIENT "client"
ROLE_SYSTEM_MENUPOPUP "menu popup"
ROLE_SYSTEM_MENUITEM "élément de menu"
ROLE_SYSTEM_TOOLTIP "infobulle"
ROLE_SYSTEM_APPLICATION "application"
ROLE_SYSTEM_DOCUMENT "document"
ROLE_SYSTEM_PANE "pane"
ROLE_SYSTEM_CHART "chart"
ROLE_SYSTEM_DIALOG "boîte de dialogue"
ROLE_SYSTEM_BORDER "bordure"
ROLE_SYSTEM_GROUPING "grouping"
ROLE_SYSTEM_SEPARATOR "separateur"
ROLE_SYSTEM_TOOLBAR "barre d'outils"
ROLE_SYSTEM_STATUSBAR "barre d'état"
ROLE_SYSTEM_TABLE "table"
ROLE_SYSTEM_COLUMNHEADER "en-tête de colonne"
ROLE_SYSTEM_ROWHEADER "en-tête de ligne"
ROLE_SYSTEM_COLUMN "colonne"
ROLE_SYSTEM_ROW "ligne"
ROLE_SYSTEM_CELL "cellule"
ROLE_SYSTEM_LINK "lien"
ROLE_SYSTEM_HELPBALLOON "bulle d'aide"
ROLE_SYSTEM_CHARACTER "caractère"
ROLE_SYSTEM_LIST "liste"
ROLE_SYSTEM_LISTITEM "élément de liste"
ROLE_SYSTEM_OUTLINE "outline"
ROLE_SYSTEM_OUTLINEITEM "outline item"
ROLE_SYSTEM_PAGETAB "onglet de page"
ROLE_SYSTEM_PROPERTYPAGE "page de propriétés"
ROLE_SYSTEM_INDICATOR "indicateur"
ROLE_SYSTEM_GRAPHIC "image"
ROLE_SYSTEM_STATICTEXT "texte statique"
ROLE_SYSTEM_TEXT "texte"
ROLE_SYSTEM_PUSHBUTTON "bouton pressoir"
ROLE_SYSTEM_CHECKBUTTON "case à cocher"
ROLE_SYSTEM_RADIOBUTTON "bouton radio"
ROLE_SYSTEM_COMBOBOX "combo box"
ROLE_SYSTEM_DROPLIST "drop down"
ROLE_SYSTEM_PROGRESSBAR "barre de progression"
ROLE_SYSTEM_DIAL "dial"
ROLE_SYSTEM_HOTKEYFIELD "hot key field"
ROLE_SYSTEM_SLIDER "slider"
ROLE_SYSTEM_SPINBUTTON "spin box"
ROLE_SYSTEM_DIAGRAM "diagramme"
ROLE_SYSTEM_ANIMATION "animation"
ROLE_SYSTEM_EQUATION "équation"
ROLE_SYSTEM_BUTTONDROPDOWN "drop down button"
ROLE_SYSTEM_BUTTONMENU "bouton de menu"
ROLE_SYSTEM_BUTTONDROPDOWNGRID "grid drop down button"
ROLE_SYSTEM_WHITESPACE "espace blanc"
ROLE_SYSTEM_PAGETABLIST "page tab list"
ROLE_SYSTEM_CLOCK "horloge"
ROLE_SYSTEM_SPLITBUTTON "split button"
ROLE_SYSTEM_IPADDRESS "Adresse IP"
ROLE_SYSTEM_OUTLINEBUTTON "outline button"
}

View file

@ -0,0 +1,91 @@
/*
* English resources for oleacc
*
* Copyright 2008 Nikolay Sivov
* Copyright 2008 YunSong Hwang
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
LANGUAGE LANG_KOREAN, SUBLANG_DEFAULT
STRINGTABLE DISCARDABLE
{
0 "알 수 없는 객체" /* undocumented */
ROLE_SYSTEM_TITLEBAR "제목바"
ROLE_SYSTEM_MENUBAR "메뉴바"
ROLE_SYSTEM_SCROLLBAR "스크롤바"
ROLE_SYSTEM_GRIP "그립"
ROLE_SYSTEM_SOUND "사운드"
ROLE_SYSTEM_CURSOR "커서"
ROLE_SYSTEM_CARET "삽입기호"
ROLE_SYSTEM_ALERT "경고"
ROLE_SYSTEM_WINDOW "창"
ROLE_SYSTEM_CLIENT "클라이언트"
ROLE_SYSTEM_MENUPOPUP "팝업 메뉴"
ROLE_SYSTEM_MENUITEM "메뉴 아이템"
ROLE_SYSTEM_TOOLTIP "도구 팁"
ROLE_SYSTEM_APPLICATION "프로그램"
ROLE_SYSTEM_DOCUMENT "문서"
ROLE_SYSTEM_PANE "틀(pane)"
ROLE_SYSTEM_CHART "차트"
ROLE_SYSTEM_DIALOG "대화상자"
ROLE_SYSTEM_BORDER "가장자리"
ROLE_SYSTEM_GROUPING "집단화"
ROLE_SYSTEM_SEPARATOR "분리자"
ROLE_SYSTEM_TOOLBAR "도구바"
ROLE_SYSTEM_STATUSBAR "상태바"
ROLE_SYSTEM_TABLE "테이블"
ROLE_SYSTEM_COLUMNHEADER "세로줄 헤더"
ROLE_SYSTEM_ROWHEADER "가로줄 헤더"
ROLE_SYSTEM_COLUMN "열"
ROLE_SYSTEM_ROW "가로줄"
ROLE_SYSTEM_CELL "셀"
ROLE_SYSTEM_LINK "링크"
ROLE_SYSTEM_HELPBALLOON "풍선 도움말"
ROLE_SYSTEM_CHARACTER "문자"
ROLE_SYSTEM_LIST "목록"
ROLE_SYSTEM_LISTITEM "목록 아이템"
ROLE_SYSTEM_OUTLINE "외곽선"
ROLE_SYSTEM_OUTLINEITEM "외곽선 아이템"
ROLE_SYSTEM_PAGETAB "페이지 탭"
ROLE_SYSTEM_PROPERTYPAGE "속성 페이지"
ROLE_SYSTEM_INDICATOR "지시자"
ROLE_SYSTEM_GRAPHIC "그림"
ROLE_SYSTEM_STATICTEXT "정적 문자"
ROLE_SYSTEM_TEXT "문자"
ROLE_SYSTEM_PUSHBUTTON "누르기 버튼"
ROLE_SYSTEM_CHECKBUTTON "체크 버튼"
ROLE_SYSTEM_RADIOBUTTON "라디오 버튼"
ROLE_SYSTEM_COMBOBOX "콤보 상자"
ROLE_SYSTEM_DROPLIST "드룹 다운"
ROLE_SYSTEM_PROGRESSBAR "진행바"
ROLE_SYSTEM_DIAL "다이얼"
ROLE_SYSTEM_HOTKEYFIELD "단축키 모음"
ROLE_SYSTEM_SLIDER "슬라이더"
ROLE_SYSTEM_SPINBUTTON "스핀 상자"
ROLE_SYSTEM_DIAGRAM "도형"
ROLE_SYSTEM_ANIMATION "애니매이션"
ROLE_SYSTEM_EQUATION "수식"
ROLE_SYSTEM_BUTTONDROPDOWN "드룹 다운 버튼"
ROLE_SYSTEM_BUTTONMENU "메뉴 버튼"
ROLE_SYSTEM_BUTTONDROPDOWNGRID "그립 드룹 다운 단추"
ROLE_SYSTEM_WHITESPACE "빈 공간"
ROLE_SYSTEM_PAGETABLIST "페이지 탭 목록"
ROLE_SYSTEM_CLOCK "시계"
ROLE_SYSTEM_SPLITBUTTON "나누기 단추"
ROLE_SYSTEM_IPADDRESS "IP 주소"
ROLE_SYSTEM_OUTLINEBUTTON "외곽선 단추"
}

View file

@ -0,0 +1,90 @@
/*
* Dutch resources for oleacc
*
* Copyright 2008 Frans Kool
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
LANGUAGE LANG_DUTCH, SUBLANG_NEUTRAL
STRINGTABLE DISCARDABLE
{
0 "onbekend object" /* undocumented */
ROLE_SYSTEM_TITLEBAR "titel balk"
ROLE_SYSTEM_MENUBAR "menu balk"
ROLE_SYSTEM_SCROLLBAR "scroll balk"
ROLE_SYSTEM_GRIP "handvat"
ROLE_SYSTEM_SOUND "geluid"
ROLE_SYSTEM_CURSOR "cursor"
ROLE_SYSTEM_CARET "tekst cursor"
ROLE_SYSTEM_ALERT "alarm"
ROLE_SYSTEM_WINDOW "venster"
ROLE_SYSTEM_CLIENT "client"
ROLE_SYSTEM_MENUPOPUP "popup menu"
ROLE_SYSTEM_MENUITEM "menu item"
ROLE_SYSTEM_TOOLTIP "tool tip"
ROLE_SYSTEM_APPLICATION "programma"
ROLE_SYSTEM_DOCUMENT "document"
ROLE_SYSTEM_PANE "sectie"
ROLE_SYSTEM_CHART "diagram"
ROLE_SYSTEM_DIALOG "keuze"
ROLE_SYSTEM_BORDER "randen"
ROLE_SYSTEM_GROUPING "groepering"
ROLE_SYSTEM_SEPARATOR "separator"
ROLE_SYSTEM_TOOLBAR "knoppen balk"
ROLE_SYSTEM_STATUSBAR "status balk"
ROLE_SYSTEM_TABLE "tabel"
ROLE_SYSTEM_COLUMNHEADER "kolom hoofd"
ROLE_SYSTEM_ROWHEADER "rij hoofd"
ROLE_SYSTEM_COLUMN "kolom"
ROLE_SYSTEM_ROW "rij"
ROLE_SYSTEM_CELL "cel"
ROLE_SYSTEM_LINK "link"
ROLE_SYSTEM_HELPBALLOON "help ballon"
ROLE_SYSTEM_CHARACTER "karakter"
ROLE_SYSTEM_LIST "lijst"
ROLE_SYSTEM_LISTITEM "lijst onderdeel"
ROLE_SYSTEM_OUTLINE "outline"
ROLE_SYSTEM_OUTLINEITEM "outline onderdeel"
ROLE_SYSTEM_PAGETAB "pagina tab"
ROLE_SYSTEM_PROPERTYPAGE "eigenschappen pagina"
ROLE_SYSTEM_INDICATOR "indicator"
ROLE_SYSTEM_GRAPHIC "grafisch"
ROLE_SYSTEM_STATICTEXT "vaste tekst"
ROLE_SYSTEM_TEXT "tekst"
ROLE_SYSTEM_PUSHBUTTON "drukknop"
ROLE_SYSTEM_CHECKBUTTON "aankruisvakje"
ROLE_SYSTEM_RADIOBUTTON "radioknop"
ROLE_SYSTEM_COMBOBOX "combo box"
ROLE_SYSTEM_DROPLIST "selectie box"
ROLE_SYSTEM_PROGRESSBAR "voortgangsbalk"
ROLE_SYSTEM_DIAL "draaiknop"
ROLE_SYSTEM_HOTKEYFIELD "hotkey veld"
ROLE_SYSTEM_SLIDER "schuifknop"
ROLE_SYSTEM_SPINBUTTON "spin box"
ROLE_SYSTEM_DIAGRAM "diagram"
ROLE_SYSTEM_ANIMATION "animation"
ROLE_SYSTEM_EQUATION "formula"
ROLE_SYSTEM_BUTTONDROPDOWN "dropdown knop"
ROLE_SYSTEM_BUTTONMENU "menu knop"
ROLE_SYSTEM_BUTTONDROPDOWNGRID "dropdown grid knop"
ROLE_SYSTEM_WHITESPACE "lege ruimte"
ROLE_SYSTEM_PAGETABLIST "pagina tab lijst"
ROLE_SYSTEM_CLOCK "klok"
ROLE_SYSTEM_SPLITBUTTON "splits knop"
ROLE_SYSTEM_IPADDRESS "IP adres"
ROLE_SYSTEM_OUTLINEBUTTON "outline knop"
}