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