The OpenD Programming Language

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