1 /***********************************************************************\ 2 * oleacc.d * 3 * * 4 * Windows API header module * 5 * * 6 * Translated from MinGW Windows headers * 7 * * 8 * Placed into public domain * 9 \***********************************************************************/ 10 module win32.oleacc; 11 pragma(lib, "oleacc.lib"); 12 13 private import win32.basetyps, win32.oaidl, win32.unknwn, win32.wtypes, 14 win32.windef; 15 16 enum { 17 DISPID_ACC_PARENT = -5000, 18 DISPID_ACC_CHILDCOUNT = -5001, 19 DISPID_ACC_CHILD = -5002, 20 DISPID_ACC_NAME = -5003, 21 DISPID_ACC_VALUE = -5004, 22 DISPID_ACC_DESCRIPTION = -5005, 23 DISPID_ACC_ROLE = -5006, 24 DISPID_ACC_STATE = -5007, 25 DISPID_ACC_HELP = -5008, 26 DISPID_ACC_HELPTOPIC = -5009, 27 DISPID_ACC_KEYBOARDSHORTCUT = -5010, 28 DISPID_ACC_FOCUS = -5011, 29 DISPID_ACC_SELECTION = -5012, 30 DISPID_ACC_DEFAULTACTION = -5013, 31 DISPID_ACC_SELECT = -5014, 32 DISPID_ACC_LOCATION = -5015, 33 DISPID_ACC_NAVIGATE = -5016, 34 DISPID_ACC_HITTEST = -5017, 35 DISPID_ACC_DODEFAULTACTION = -5018 36 } 37 38 enum { 39 NAVDIR_UP = 1, 40 NAVDIR_DOWN, 41 NAVDIR_LEFT, 42 NAVDIR_RIGHT, 43 NAVDIR_NEXT, 44 NAVDIR_PREVIOUS, 45 NAVDIR_FIRSTCHILD, 46 NAVDIR_LASTCHILD // = 8 47 } 48 49 enum { 50 ROLE_SYSTEM_TITLEBAR = 1, 51 ROLE_SYSTEM_MENUBAR, 52 ROLE_SYSTEM_SCROLLBAR, 53 ROLE_SYSTEM_GRIP, 54 ROLE_SYSTEM_SOUND, 55 ROLE_SYSTEM_CURSOR, 56 ROLE_SYSTEM_CARET, 57 ROLE_SYSTEM_ALERT, 58 ROLE_SYSTEM_WINDOW, 59 ROLE_SYSTEM_CLIENT, 60 ROLE_SYSTEM_MENUPOPUP, 61 ROLE_SYSTEM_MENUITEM, 62 ROLE_SYSTEM_TOOLTIP, 63 ROLE_SYSTEM_APPLICATION, 64 ROLE_SYSTEM_DOCUMENT, 65 ROLE_SYSTEM_PANE, 66 ROLE_SYSTEM_CHART, 67 ROLE_SYSTEM_DIALOG, 68 ROLE_SYSTEM_BORDER, 69 ROLE_SYSTEM_GROUPING, 70 ROLE_SYSTEM_SEPARATOR, 71 ROLE_SYSTEM_TOOLBAR, 72 ROLE_SYSTEM_STATUSBAR, 73 ROLE_SYSTEM_TABLE, 74 ROLE_SYSTEM_COLUMNHEADER, 75 ROLE_SYSTEM_ROWHEADER, 76 ROLE_SYSTEM_COLUMN, 77 ROLE_SYSTEM_ROW, 78 ROLE_SYSTEM_CELL, 79 ROLE_SYSTEM_LINK, 80 ROLE_SYSTEM_HELPBALLOON, 81 ROLE_SYSTEM_CHARACTER, 82 ROLE_SYSTEM_LIST, 83 ROLE_SYSTEM_LISTITEM, 84 ROLE_SYSTEM_OUTLINE, 85 ROLE_SYSTEM_OUTLINEITEM, 86 ROLE_SYSTEM_PAGETAB, 87 ROLE_SYSTEM_PROPERTYPAGE, 88 ROLE_SYSTEM_INDICATOR, 89 ROLE_SYSTEM_GRAPHIC, 90 ROLE_SYSTEM_STATICTEXT, 91 ROLE_SYSTEM_TEXT, 92 ROLE_SYSTEM_PUSHBUTTON, 93 ROLE_SYSTEM_CHECKBUTTON, 94 ROLE_SYSTEM_RADIOBUTTON, 95 ROLE_SYSTEM_COMBOBOX, 96 ROLE_SYSTEM_DROPLIST, 97 ROLE_SYSTEM_PROGRESSBAR, 98 ROLE_SYSTEM_DIAL, 99 ROLE_SYSTEM_HOTKEYFIELD, 100 ROLE_SYSTEM_SLIDER, 101 ROLE_SYSTEM_SPINBUTTON, 102 ROLE_SYSTEM_DIAGRAM, 103 ROLE_SYSTEM_ANIMATION, 104 ROLE_SYSTEM_EQUATION, 105 ROLE_SYSTEM_BUTTONDROPDOWN, 106 ROLE_SYSTEM_BUTTONMENU, 107 ROLE_SYSTEM_BUTTONDROPDOWNGRID, 108 ROLE_SYSTEM_WHITESPACE, 109 ROLE_SYSTEM_PAGETABLIST, 110 ROLE_SYSTEM_CLOCK // = 61 111 } 112 113 enum { 114 STATE_SYSTEM_UNAVAILABLE = 0x00000001, 115 STATE_SYSTEM_SELECTED = 0x00000002, 116 STATE_SYSTEM_FOCUSED = 0x00000004, 117 STATE_SYSTEM_PRESSED = 0x00000008, 118 STATE_SYSTEM_CHECKED = 0x00000010, 119 STATE_SYSTEM_MIXED = 0x00000020, 120 STATE_SYSTEM_READONLY = 0x00000040, 121 STATE_SYSTEM_HOTTRACKED = 0x00000080, 122 STATE_SYSTEM_DEFAULT = 0x00000100, 123 STATE_SYSTEM_EXPANDED = 0x00000200, 124 STATE_SYSTEM_COLLAPSED = 0x00000400, 125 STATE_SYSTEM_BUSY = 0x00000800, 126 STATE_SYSTEM_FLOATING = 0x00001000, 127 STATE_SYSTEM_MARQUEED = 0x00002000, 128 STATE_SYSTEM_ANIMATED = 0x00004000, 129 STATE_SYSTEM_INVISIBLE = 0x00008000, 130 STATE_SYSTEM_OFFSCREEN = 0x00010000, 131 STATE_SYSTEM_SIZEABLE = 0x00020000, 132 STATE_SYSTEM_MOVEABLE = 0x00040000, 133 STATE_SYSTEM_SELFVOICING = 0x00080000, 134 STATE_SYSTEM_FOCUSABLE = 0x00100000, 135 STATE_SYSTEM_SELECTABLE = 0x00200000, 136 STATE_SYSTEM_LINKED = 0x00400000, 137 STATE_SYSTEM_TRAVERSED = 0x00800000, 138 STATE_SYSTEM_MULTISELECTABLE = 0x01000000, 139 STATE_SYSTEM_EXTSELECTABLE = 0x02000000, 140 STATE_SYSTEM_ALERT_LOW = 0x04000000, 141 STATE_SYSTEM_ALERT_MEDIUM = 0x08000000, 142 STATE_SYSTEM_ALERT_HIGH = 0x10000000, 143 STATE_SYSTEM_VALID = 0x1fffffff 144 } 145 146 enum SELFLAG 147 { 148 SELFLAG_NONE = 0, 149 SELFLAG_TAKEFOCUS = 1, 150 SELFLAG_TAKESELECTION = 2, 151 SELFLAG_EXTENDSELECTION = 4, 152 SELFLAG_ADDSELECTION = 8, 153 SELFLAG_REMOVESELECTION = 16 154 } 155 156 const SELFLAG_VALID = 0x0000001F; 157 158 159 interface IAccessible : IDispatch { 160 HRESULT get_accParent(IDispatch**); 161 HRESULT get_accChildCount(int*); 162 HRESULT get_accChild(VARIANT, IDispatch **); 163 HRESULT get_accName(VARIANT, BSTR*); 164 HRESULT get_accValue(VARIANT, BSTR*); 165 HRESULT get_accDescription(VARIANT, BSTR*); 166 HRESULT get_accRole(VARIANT, VARIANT*); 167 HRESULT get_accState(VARIANT, VARIANT*); 168 HRESULT get_accHelp(VARIANT, BSTR*); 169 HRESULT get_accHelpTopic(BSTR*, VARIANT, int*); 170 HRESULT get_accKeyboardShortcut(VARIANT, BSTR*); 171 HRESULT get_accFocus(VARIANT*); 172 HRESULT get_accSelection(VARIANT*); 173 HRESULT get_accDefaultAction(VARIANT, BSTR*); 174 175 HRESULT accSelect(int, VARIANT); 176 HRESULT accLocation(int*, int*, int*, int*, VARIANT); 177 HRESULT accNavigate(int, VARIANT, VARIANT*); 178 HRESULT accHitTest(int, int, VARIANT*); 179 HRESULT accDoDefaultAction(VARIANT); 180 181 HRESULT put_accName(VARIANT, BSTR); 182 HRESULT put_accValue(VARIANT, BSTR); 183 } 184 185 alias IAccessible* LPACCESSIBLE; 186 187 extern (Windows) { 188 HRESULT AccessibleChildren(IAccessible*, LONG, LONG, VARIANT*, LONG*); 189 HRESULT AccessibleObjectFromEvent(HWND, DWORD, DWORD, IAccessible*, VARIANT*); 190 HRESULT AccessibleObjectFromPoint(POINT, IAccessible**, VARIANT*); 191 HRESULT AccessibleObjectFromWindow(HWND, DWORD, REFIID, void**); 192 HRESULT CreateStdAccessibleObject(HWND, LONG, REFIID, void**); 193 HRESULT CreateStdAccessibleProxyA(HWND, LPCSTR, LONG, REFIID, void**); 194 HRESULT CreateStdAccessibleProxyW(HWND, LPCWSTR, LONG, REFIID, void**); 195 196 void GetOleaccVersionInfo(DWORD*, DWORD*); 197 UINT GetRoleTextA(DWORD, LPSTR, UINT); 198 UINT GetRoleTextW(DWORD, LPWSTR, UINT); 199 UINT GetStateTextA(DWORD, LPSTR, UINT); 200 UINT GetStateTextW(DWORD, LPWSTR, UINT); 201 LRESULT LresultFromObject(REFIID, WPARAM, LPUNKNOWN); 202 HRESULT ObjectFromLresult(LRESULT, REFIID, WPARAM, void**); 203 HRESULT WindowFromAccessibleObject(IAccessible*, HWND*); 204 } 205 206 version(Unicode) { 207 alias CreateStdAccessibleProxyW CreateStdAccessibleProxy; 208 alias GetRoleTextW GetRoleText; 209 alias GetStateTextW GetStateText; 210 } else { 211 alias CreateStdAccessibleProxyA CreateStdAccessibleProxy; 212 alias GetRoleTextA GetRoleText; 213 alias GetStateTextA GetStateText; 214 }