msctf/tests: Test TextService requesting an EditSession.
[wine] / include / axcore.idl
1 /*
2  * Copyright (C) 2002 Robert Shearman
3  *
4  * This library is free software; you can redistribute it and/or
5  * modify it under the terms of the GNU Lesser General Public
6  * License as published by the Free Software Foundation; either
7  * version 2.1 of the License, or (at your option) any later version.
8  *
9  * This library is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
12  * Lesser General Public License for more details.
13  *
14  * You should have received a copy of the GNU Lesser General Public
15  * License along with this library; if not, write to the Free Software
16  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
17  */
18
19 #define CHARS_IN_GUID 39
20 cpp_quote("#define CHARS_IN_GUID 39")
21
22 /* GetTimeFormat is defined in winnls.h as
23  * either the W or A suffixed version */
24 cpp_quote("#undef GetTimeFormat")
25
26 typedef struct _AMMediaType
27 {
28     GUID       majortype;
29     GUID       subtype;
30     BOOL       bFixedSizeSamples;
31     BOOL       bTemporalCompression;
32     ULONG      lSampleSize;
33     GUID       formattype;
34     IUnknown * pUnk;
35     ULONG      cbFormat;
36     [size_is(cbFormat)] BYTE * pbFormat;
37 } AM_MEDIA_TYPE;
38
39 typedef enum _PinDirection
40 {
41     PINDIR_INPUT,
42     PINDIR_OUTPUT
43 } PIN_DIRECTION;
44
45 #define MAX_PIN_NAME    128
46 #define MAX_FILTER_NAME 128
47 cpp_quote("#define MAX_PIN_NAME    128")
48 cpp_quote("#define MAX_FILTER_NAME 128")
49
50 typedef LONGLONG REFERENCE_TIME;
51
52 cpp_quote("#ifndef REFTIME_DEFINED")
53 cpp_quote("#define REFTIME_DEFINED")
54 typedef DOUBLE REFTIME;
55 cpp_quote("#endif")
56
57 typedef DWORD_PTR HSEMAPHORE;
58 typedef DWORD_PTR HEVENT;
59
60 typedef struct _AllocatorProperties
61 {
62     long cBuffers;
63     long cbBuffer;
64     long cbAlign;
65     long cbPrefix;
66 } ALLOCATOR_PROPERTIES;
67
68 interface IAMovieSetup;
69 interface IEnumFilters;
70 interface IEnumMediaTypes;
71 interface IEnumPins;
72 interface IBaseFilter;
73 interface IFilterGraph;
74 interface IMediaFilter;
75 interface IMediaSample;
76 interface IMemAllocator;
77 interface IMemAllocatorCallbackTemp;
78 interface IMemAllocatorNotifyCallbackTemp;
79 interface IMemInputPin;
80 interface IPin;
81 interface IReferenceClock;
82
83 [
84 object,
85 uuid(56a86891-0ad4-11ce-b03a-0020af0ba770),
86 pointer_default(unique)
87 ]
88 interface IPin : IUnknown
89 {
90     typedef struct _PinInfo
91     {
92         IBaseFilter *pFilter;
93         PIN_DIRECTION dir;
94         WCHAR achName[MAX_PIN_NAME];
95     } PIN_INFO;
96
97     HRESULT Connect(
98         [in] IPin * pReceivePin,
99         [in] const AM_MEDIA_TYPE * pmt);
100
101     HRESULT ReceiveConnection(
102         [in] IPin * pConnector,
103         [in] const AM_MEDIA_TYPE *pmt);
104
105     HRESULT Disconnect(void);
106
107     HRESULT ConnectedTo(
108         [out] IPin **pPin);
109
110     HRESULT ConnectionMediaType(
111         [out] AM_MEDIA_TYPE *pmt);
112
113     HRESULT QueryPinInfo(
114         [out] PIN_INFO * pInfo);
115
116     HRESULT QueryDirection(
117         [out] PIN_DIRECTION *pPinDir);
118
119     HRESULT QueryId(
120         [out] LPWSTR * Id);
121
122     HRESULT QueryAccept(
123         [in] const AM_MEDIA_TYPE *pmt);
124
125     HRESULT EnumMediaTypes(
126         [out] IEnumMediaTypes **ppEnum);
127
128     HRESULT QueryInternalConnections(
129         [out] IPin* *apPin,
130         [in, out] ULONG *nPin);
131
132     HRESULT EndOfStream(void);
133
134     HRESULT BeginFlush(void);
135
136     HRESULT EndFlush(void);
137     HRESULT NewSegment(
138         [in] REFERENCE_TIME tStart,
139         [in] REFERENCE_TIME tStop,
140         [in] double dRate);
141 }
142
143 typedef IPin *PPIN;
144
145 [
146 object,
147 uuid(56a86892-0ad4-11ce-b03a-0020af0ba770),
148 pointer_default(unique)
149 ]
150 interface IEnumPins : IUnknown
151 {
152
153     HRESULT Next(
154         [in] ULONG cPins,
155         [out, size_is(cPins)] IPin ** ppPins,
156         [out] ULONG * pcFetched);
157
158     HRESULT Skip(
159         [in] ULONG cPins);
160
161     HRESULT Reset(void);
162
163     HRESULT Clone(
164         [out] IEnumPins **ppEnum);
165 }
166
167 typedef IEnumPins *PENUMPINS;
168
169 [
170 object,
171 uuid(89c31040-846b-11ce-97d3-00aa0055595a),
172 pointer_default(unique)
173 ]
174 interface IEnumMediaTypes : IUnknown
175 {
176     HRESULT Next(
177         [in] ULONG cMediaTypes,
178         [out, size_is(cMediaTypes)]
179              AM_MEDIA_TYPE ** ppMediaTypes,
180         [out] ULONG * pcFetched
181     );
182
183     HRESULT Skip(
184         [in] ULONG cMediaTypes);
185
186     HRESULT Reset(void);
187
188     HRESULT Clone(
189         [out] IEnumMediaTypes **ppEnum
190     );
191 }
192
193 typedef IEnumMediaTypes *PENUMMEDIATYPES;
194
195 [
196 object,
197 uuid(56a8689f-0ad4-11ce-b03a-0020af0ba770),
198 pointer_default(unique)
199 ]
200 interface IFilterGraph : IUnknown
201 {
202     HRESULT AddFilter(
203         [in] IBaseFilter * pFilter,
204         [in, string] LPCWSTR pName);
205
206     HRESULT RemoveFilter(
207         [in] IBaseFilter * pFilter);
208
209     HRESULT EnumFilters(
210         [out] IEnumFilters **ppEnum);
211
212     HRESULT FindFilterByName(
213         [in, string] LPCWSTR pName,
214         [out] IBaseFilter ** ppFilter);
215
216     HRESULT ConnectDirect(
217         [in] IPin * ppinOut,
218         [in] IPin * ppinIn,
219         [in, unique] const AM_MEDIA_TYPE* pmt);
220
221     HRESULT Reconnect(
222         [in] IPin * ppin);
223
224     HRESULT Disconnect(
225         [in] IPin * ppin);
226
227     HRESULT SetDefaultSyncSource(void);
228 }
229
230 typedef IFilterGraph *PFILTERGRAPH;
231
232 [
233 object,
234 uuid(56a86893-0ad4-11ce-b03a-0020af0ba770),
235 pointer_default(unique)
236 ]
237 interface IEnumFilters : IUnknown
238 {
239     HRESULT Next(
240         [in]  ULONG cFilters,
241         [out] IBaseFilter ** ppFilter,
242         [out] ULONG * pcFetched);
243
244
245     HRESULT Skip(
246         [in] ULONG cFilters);
247
248
249     HRESULT Reset(void);
250
251
252     HRESULT Clone(
253         [out] IEnumFilters **ppEnum);
254 }
255
256 typedef IEnumFilters *PENUMFILTERS;
257
258 [
259 object,
260 uuid(56a86899-0ad4-11ce-b03a-0020af0ba770),
261 pointer_default(unique)
262 ]
263 interface IMediaFilter : IPersist
264 {
265     typedef enum _FilterState
266     {
267         State_Stopped,
268         State_Paused,
269         State_Running
270     } FILTER_STATE;
271
272     HRESULT Stop(void);
273     HRESULT Pause(void);
274
275     HRESULT Run(REFERENCE_TIME tStart);
276
277     HRESULT GetState(
278         [in] DWORD dwMilliSecsTimeout,
279         [out] FILTER_STATE *State);
280
281     HRESULT SetSyncSource(
282         [in] IReferenceClock * pClock);
283
284     HRESULT GetSyncSource(
285         [out] IReferenceClock ** pClock);
286 }
287
288 typedef IMediaFilter *PMEDIAFILTER;
289
290 [
291 object,
292 uuid(56a86895-0ad4-11ce-b03a-0020af0ba770),
293 pointer_default(unique)
294 ]
295 interface IBaseFilter : IMediaFilter
296 {
297     typedef struct _FilterInfo
298     {
299         WCHAR achName[MAX_FILTER_NAME];
300         IFilterGraph * pGraph;
301     } FILTER_INFO;
302
303     HRESULT EnumPins(
304         [out] IEnumPins ** ppEnum);
305
306     HRESULT FindPin(
307         [in, string] LPCWSTR Id,
308         [out] IPin ** ppPin);
309
310     HRESULT QueryFilterInfo(
311         [out] FILTER_INFO * pInfo);
312
313     HRESULT JoinFilterGraph(
314         [in] IFilterGraph * pGraph,
315         [in, string] LPCWSTR pName);
316
317     HRESULT QueryVendorInfo(
318         [out, string] LPWSTR* pVendorInfo);
319 }
320
321 typedef IBaseFilter *PFILTER;
322
323 [
324 object,
325 uuid(56a86897-0ad4-11ce-b03a-0020af0ba770),
326 pointer_default(unique)
327 ]
328 interface IReferenceClock : IUnknown
329 {
330     HRESULT GetTime(
331         [out] REFERENCE_TIME *pTime);
332
333     HRESULT AdviseTime(
334         [in] REFERENCE_TIME baseTime,
335         [in] REFERENCE_TIME streamTime,
336         [in] HEVENT hEvent,
337         [out] DWORD_PTR * pdwAdviseCookie);
338
339     HRESULT AdvisePeriodic(
340         [in] REFERENCE_TIME startTime,
341         [in] REFERENCE_TIME periodTime,
342         [in] HSEMAPHORE hSemaphore,
343         [out] DWORD_PTR * pdwAdviseCookie);
344
345     HRESULT Unadvise(
346         [in] DWORD_PTR dwAdviseCookie);
347 }
348
349 typedef IReferenceClock *PREFERENCECLOCK;
350
351 /*
352 [
353 object,
354 uuid(36b73885-c2c8-11cf-8b46-00805f6cef60),
355 pointer_default(unique)
356 ]
357 interface IReferenceClock2 : IReferenceClock
358 {
359 }
360
361 typedef IReferenceClock2 *PREFERENCECLOCK2;
362
363 */
364
365 [
366 local,
367 object,
368 uuid(56a8689a-0ad4-11ce-b03a-0020af0ba770),
369 pointer_default(unique)
370 ]
371 interface IMediaSample : IUnknown
372 {
373     HRESULT GetPointer([out] BYTE ** ppBuffer);
374
375     long GetSize(void);
376
377     HRESULT GetTime(
378         [out] REFERENCE_TIME * pTimeStart,
379         [out] REFERENCE_TIME * pTimeEnd);
380
381     HRESULT SetTime(
382         [in] REFERENCE_TIME * pTimeStart,
383         [in] REFERENCE_TIME * pTimeEnd);
384
385     HRESULT IsSyncPoint(void);
386
387     HRESULT SetSyncPoint(BOOL bIsSyncPoint);
388
389     HRESULT IsPreroll(void);
390
391     HRESULT SetPreroll(BOOL bIsPreroll);
392
393     LONG GetActualDataLength(void);
394
395     HRESULT SetActualDataLength(LONG length);
396
397     HRESULT GetMediaType(AM_MEDIA_TYPE **ppMediaType);
398
399     HRESULT SetMediaType(AM_MEDIA_TYPE *pMediaType);
400
401     HRESULT IsDiscontinuity(void);
402
403     HRESULT SetDiscontinuity(BOOL bDiscontinuity);
404
405     HRESULT GetMediaTime(
406         [out] LONGLONG * pTimeStart,
407         [out] LONGLONG * pTimeEnd);
408
409     HRESULT SetMediaTime(
410         [in] LONGLONG * pTimeStart,
411         [in] LONGLONG * pTimeEnd);
412 }
413
414 typedef IMediaSample *PMEDIASAMPLE;
415
416 enum tagAM_SAMPLE_PROPERTY_FLAGS
417 {
418        AM_SAMPLE_SPLICEPOINT        = 0x01,
419        AM_SAMPLE_PREROLL            = 0x02,
420        AM_SAMPLE_DATADISCONTINUITY  = 0x04,
421        AM_SAMPLE_TYPECHANGED        = 0x08,
422        AM_SAMPLE_TIMEVALID          = 0x10,
423        AM_SAMPLE_TIMEDISCONTINUITY  = 0x40,
424        AM_SAMPLE_FLUSH_ON_PAUSE     = 0x80,
425        AM_SAMPLE_STOPVALID          = 0x100,
426        AM_SAMPLE_ENDOFSTREAM        = 0x200,
427        AM_STREAM_MEDIA              = 0,
428        AM_STREAM_CONTROL            = 1
429 };
430
431 typedef struct tagAM_SAMPLE2_PROPERTIES
432 {
433     DWORD    cbData;
434     DWORD    dwTypeSpecificFlags;
435     DWORD    dwSampleFlags;
436     LONG     lActual;
437     REFERENCE_TIME tStart;
438     REFERENCE_TIME tStop;
439     DWORD    dwStreamId;
440     AM_MEDIA_TYPE *pMediaType;
441     BYTE    *pbBuffer;
442     LONG     cbBuffer;
443 } AM_SAMPLE2_PROPERTIES;
444
445 [
446         local,
447         object,
448         uuid(36b73884-c2c8-11cf-8b46-00805f6cef60),
449         pointer_default(unique)
450 ]
451 interface IMediaSample2 : IMediaSample
452 {
453     HRESULT GetProperties(
454         [in] DWORD cbProperties,
455         [out, size_is(cbProperties)] BYTE * pbProperties
456     );
457
458     HRESULT SetProperties(
459         [in] DWORD cbProperties,
460         [in, size_is(cbProperties)] const BYTE * pbProperties
461     );
462 }
463
464 typedef IMediaSample2 *PMEDIASAMPLE2;
465
466 #define AM_GBF_PREVFRAMESKIPPED 1
467 #define AM_GBF_NOTASYNCPOINT    2
468 cpp_quote("#define AM_GBF_PREVFRAMESKIPPED 1")
469 cpp_quote("#define AM_GBF_NOTASYNCPOINT 2")
470
471 cpp_quote("#define AM_GBF_NOWAIT 4")
472
473 [
474 object,
475 uuid(56a8689c-0ad4-11ce-b03a-0020af0ba770),
476 pointer_default(unique)
477 ]
478 interface IMemAllocator : IUnknown
479 {
480     HRESULT SetProperties(
481         [in] ALLOCATOR_PROPERTIES* pRequest,
482         [out] ALLOCATOR_PROPERTIES* pActual);
483
484     HRESULT GetProperties(
485         [out] ALLOCATOR_PROPERTIES* pProps);
486
487     HRESULT Commit(void);
488
489     HRESULT Decommit(void);
490
491     HRESULT GetBuffer(
492         [out] IMediaSample **ppBuffer,
493         [in] REFERENCE_TIME * pStartTime,
494         [in] REFERENCE_TIME * pEndTime,
495         [in] DWORD dwFlags);
496
497     HRESULT ReleaseBuffer(
498         [in] IMediaSample *pBuffer);
499 }
500
501 typedef IMemAllocator *PMEMALLOCATOR;
502
503 [
504 object,
505 uuid(379a0cf0-c1de-11d2-abf5-00a0c905f375),
506 pointer_default(unique)
507 ]
508 interface IMemAllocatorCallbackTemp : IMemAllocator
509 {
510     HRESULT SetNotify(
511         [in] IMemAllocatorNotifyCallbackTemp *pNotify);
512
513     HRESULT GetFreeCount(
514         [out] LONG *plBuffersFree);
515 }
516
517 [
518 object,
519 uuid(92980b30-c1de-11d2-abf5-00a0c905f375),
520 pointer_default(unique)
521 ]
522 interface IMemAllocatorNotifyCallbackTemp : IUnknown
523 {
524     HRESULT NotifyRelease();
525 }
526
527 [
528 object,
529 uuid(56a8689d-0ad4-11ce-b03a-0020af0ba770),
530 pointer_default(unique)
531 ]
532 interface IMemInputPin : IUnknown
533 {
534     HRESULT GetAllocator(
535         [out] IMemAllocator ** ppAllocator);
536
537     HRESULT NotifyAllocator(
538         [in] IMemAllocator * pAllocator,
539         [in] BOOL bReadOnly);
540
541     HRESULT GetAllocatorRequirements( [out] ALLOCATOR_PROPERTIES*pProps );
542
543     HRESULT Receive(
544         [in] IMediaSample * pSample);
545
546     HRESULT ReceiveMultiple(
547         [in, size_is(nSamples)] IMediaSample **pSamples,
548         [in] long nSamples,
549         [out] long *nSamplesProcessed);
550
551     HRESULT ReceiveCanBlock();
552 }
553
554 typedef IMemInputPin *PMEMINPUTPIN;
555
556 [
557 object,
558 uuid(a3d8cec0-7e5a-11cf-bbc5-00805f6cef20),
559 pointer_default(unique)
560 ]
561 interface IAMovieSetup : IUnknown
562 {
563     HRESULT Register( );
564     HRESULT Unregister( );
565 }
566
567 typedef IAMovieSetup *PAMOVIESETUP;
568
569 typedef enum AM_SEEKING_SeekingFlags
570 {
571     AM_SEEKING_NoPositioning            = 0x00,
572     AM_SEEKING_AbsolutePositioning      = 0x01,
573     AM_SEEKING_RelativePositioning      = 0x02,
574     AM_SEEKING_IncrementalPositioning   = 0x03,
575     AM_SEEKING_PositioningBitsMask      = 0x03,
576     AM_SEEKING_SeekToKeyFrame           = 0x04,
577     AM_SEEKING_ReturnTime               = 0x08,
578     AM_SEEKING_Segment                  = 0x10,
579     AM_SEEKING_NoFlush                  = 0x20
580 } AM_SEEKING_SEEKING_FLAGS;
581
582 typedef enum AM_SEEKING_SeekingCapabilities
583 {
584     AM_SEEKING_CanSeekAbsolute     = 0x001,
585     AM_SEEKING_CanSeekForwards     = 0x002,
586     AM_SEEKING_CanSeekBackwards    = 0x004,
587     AM_SEEKING_CanGetCurrentPos    = 0x008,
588     AM_SEEKING_CanGetStopPos       = 0x010,
589     AM_SEEKING_CanGetDuration      = 0x020,
590     AM_SEEKING_CanPlayBackwards    = 0x040,
591     AM_SEEKING_CanDoSegments       = 0x080,
592     AM_SEEKING_Source              = 0x100
593 } AM_SEEKING_SEEKING_CAPABILITIES;
594
595 [
596 object,
597 uuid(36b73880-c2c8-11cf-8b46-00805f6cef60),
598 pointer_default(unique)
599 ]
600 interface IMediaSeeking : IUnknown
601 {
602     HRESULT GetCapabilities( [out] DWORD * pCapabilities );
603
604     HRESULT CheckCapabilities( [in,out] DWORD * pCapabilities );
605
606     HRESULT IsFormatSupported([in] const GUID * pFormat);
607
608     HRESULT QueryPreferredFormat([out] GUID * pFormat);
609
610     HRESULT GetTimeFormat([out] GUID *pFormat);
611
612     HRESULT IsUsingTimeFormat([in] const GUID * pFormat);
613
614     HRESULT SetTimeFormat([in] const GUID * pFormat);
615
616     HRESULT GetDuration([out] LONGLONG *pDuration);
617
618     HRESULT GetStopPosition([out] LONGLONG *pStop);
619
620     HRESULT GetCurrentPosition([out] LONGLONG *pCurrent);
621
622     HRESULT ConvertTimeFormat([out] LONGLONG * pTarget, [in] const GUID * pTargetFormat,
623                               [in]  LONGLONG    Source, [in] const GUID * pSourceFormat );
624
625     HRESULT SetPositions(
626         [in,out] LONGLONG * pCurrent,
627         [in] DWORD dwCurrentFlags,
628         [in,out] LONGLONG * pStop,
629         [in] DWORD dwStopFlags);
630
631     HRESULT GetPositions(
632         [out] LONGLONG * pCurrent,
633         [out] LONGLONG * pStop);
634
635     HRESULT GetAvailable(
636         [out] LONGLONG * pEarliest,
637         [out] LONGLONG * pLatest);
638
639     HRESULT SetRate([in]  double dRate);
640
641     HRESULT GetRate([out] double * pdRate);
642
643     HRESULT GetPreroll([out] LONGLONG * pllPreroll);
644 }
645
646 typedef IMediaSeeking *PMEDIASEEKING;
647
648 enum tagAM_MEDIAEVENT_FLAGS
649 {
650     AM_MEDIAEVENT_NONOTIFY = 0x01
651 };