Add pgs color type setting
[xy_vsfilter.git] / include / realmedia / rmawin.h
blob6bbcfb94097fac9220f0602e10a695a218ec5159
1 /****************************************************************************
2 *
3 * $Id: rmawin.h 7 2003-05-30 02:18:02Z gabest $
4 *
5 * Copyright (C) 1995-1999 RealNetworks, Inc. All rights reserved.
7 * http://www.real.com/devzone
9 * This program contains proprietary
10 * information of Progressive Networks, Inc, and is licensed
11 * subject to restrictions on use and distribution.
14 * RealMedia Architecture Simple Window Interfaces.
18 #ifndef _RMAWIN_H_
19 #define _RMAWIN_H_
22 * Forward declarations of some interfaces defined or used here-in.
24 typedef _INTERFACE IRMASite IRMASite;
25 typedef _INTERFACE IRMASiteUser IRMASiteUser;
26 typedef _INTERFACE IRMASiteWindowed IRMASiteWindowed;
27 typedef _INTERFACE IRMASiteEventHandler IRMASiteEventHandler;
28 typedef _INTERFACE IRMASiteWindowless IRMASiteWindowless;
29 typedef _INTERFACE IRMASiteWatcher IRMASiteWatcher;
30 typedef _INTERFACE IRMAValues IRMAValues;
31 typedef _INTERFACE IRMASiteFullScreen IRMASiteFullScreen;
32 typedef _INTERFACE IRMALayoutSiteGroupManager IRMALayoutSiteGroupManager;
33 typedef _INTERFACE IRMAEventHook IRMAEventHook;
35 typedef struct _PNxWindow PNxWindow;
36 typedef struct _PNxSize PNxSize;
37 typedef struct _PNxPoint PNxPoint;
38 typedef struct _PNxRect PNxRect;
39 typedef void* PNxRegion;
42 /****************************************************************************
44 * Interface:
46 * IRMASiteWindowed
48 * Purpose:
50 * Interface for IRMASite objects which are associated with platform
51 * specific window objects on Microsoft Windows and X-Windows.
53 * IID_IRMASiteWindowed:
55 * {00000D01-0901-11d1-8B06-00A024406D59}
58 DEFINE_GUID(IID_IRMASiteWindowed, 0x00000D01, 0x901, 0x11d1, 0x8b, 0x6, 0x0,
59 0xa0, 0x24, 0x40, 0x6d, 0x59);
61 #define CLSID_IRMASiteWindowed IID_IRMASiteWindowed
64 #undef INTERFACE
65 #define INTERFACE IRMASiteWindowed
67 DECLARE_INTERFACE_(IRMASiteWindowed, IUnknown)
70 * IUnknown methods
72 STDMETHOD(QueryInterface) (THIS_
73 REFIID riid,
74 void** ppvObj) PURE;
76 STDMETHOD_(ULONG,AddRef) (THIS) PURE;
78 STDMETHOD_(ULONG,Release) (THIS) PURE;
81 * IRMASiteWindowed methods called by site suppliers
82 * when they want the site associated with a
83 * previously created (and externally managed) window.
84 * This method will "sub-class" that window (Win32).
85 * On Unix, the site supplier must pass events from
86 * the externally managed window to the core via
87 * IRMAClientEngine::EventOccurred(). Please note that
88 * The PNxWindow ptr must remain in scope for the life
89 * of Site.
92 STDMETHOD(AttachWindow) (THIS_
93 PNxWindow* /*IN*/ pWindow) PURE;
95 STDMETHOD(DetachWindow) (THIS) PURE;
98 * IRMASiteWindowed methods called by Owners of the site
99 * in the event that want a default top level window created
100 * for the site.
102 STDMETHOD(Create) (THIS_
103 void* ParentWindow,
104 UINT32 style) PURE;
106 STDMETHOD(Destroy) (THIS) PURE;
109 * IRMASiteWindowed method. Returns actual window of the site.
111 STDMETHOD_(PNxWindow*,GetWindow)(THIS) PURE;
116 /****************************************************************************
118 * Interface:
120 * IRMASiteWindowless
122 * Purpose:
124 * Interface for IRMASite objects which are "windowless" or not
125 * associated with platform specific window objects.
127 * IID_IRMASiteWindowless:
129 * {00000D02-0901-11d1-8B06-00A024406D59}
132 DEFINE_GUID(IID_IRMASiteWindowless, 0x00000D02, 0x901, 0x11d1, 0x8b, 0x6, 0x0,
133 0xa0, 0x24, 0x40, 0x6d, 0x59);
135 #undef INTERFACE
136 #define INTERFACE IRMASiteWindowless
138 #define CLSID_IRMASiteWindowless IID_IRMASiteWindowless
140 DECLARE_INTERFACE_(IRMASiteWindowless, IUnknown)
143 * IUnknown methods
145 STDMETHOD(QueryInterface) (THIS_
146 REFIID riid,
147 void** ppvObj) PURE;
149 STDMETHOD_(ULONG,AddRef) (THIS) PURE;
151 STDMETHOD_(ULONG,Release) (THIS) PURE;
154 * IRMASiteWindowless methods called by owners of the site.
156 STDMETHOD(EventOccurred) (THIS_
157 PNxEvent* /*IN*/ pEvent) PURE;
160 * IRMASiteWindowless method. Returns some parent window that
161 * owns the windowless site. Useful for right-click menus and
162 * dialog box calls.
164 STDMETHOD_(PNxWindow*,GetParentWindow)(THIS) PURE;
168 /****************************************************************************
170 * Interface:
172 * IRMASite
174 * Purpose:
176 * Interface for IRMASite objects.
178 * IID_IRMASite:
180 * {00000D03-0901-11d1-8B06-00A024406D59}
183 DEFINE_GUID(IID_IRMASite, 0x00000D03, 0x901, 0x11d1, 0x8b, 0x6, 0x0,
184 0xa0, 0x24, 0x40, 0x6d, 0x59);
186 #undef INTERFACE
187 #define INTERFACE IRMASite
189 DECLARE_INTERFACE_(IRMASite, IUnknown)
192 * IUnknown methods
194 STDMETHOD(QueryInterface) (THIS_
195 REFIID riid,
196 void** ppvObj) PURE;
198 STDMETHOD_(ULONG,AddRef) (THIS) PURE;
200 STDMETHOD_(ULONG,Release) (THIS) PURE;
203 * IRMASite methods usually called by the "context" to
204 * associate users with the site, and to create child sites
205 * as appropriate.
207 STDMETHOD(AttachUser) (THIS_
208 IRMASiteUser* /*IN*/ pUser) PURE;
210 STDMETHOD(DetachUser) (THIS) PURE;
213 STDMETHOD(GetUser) (THIS_
214 REF(IRMASiteUser*) /*OUT*/ pUser) PURE;
216 STDMETHOD(CreateChild) (THIS_
217 REF(IRMASite*) /*OUT*/ pChildSite) PURE;
219 STDMETHOD(DestroyChild) (THIS_
220 IRMASite* /*IN*/ pChildSite) PURE;
223 * IRMASite methods called by the the "context" in which the site
224 * is displayed in order to manage its position. Site users should
225 * not generally call these methods.
227 STDMETHOD(AttachWatcher) (THIS_
228 IRMASiteWatcher* /*IN*/ pWatcher) PURE;
230 STDMETHOD(DetachWatcher) (THIS) PURE;
232 STDMETHOD(SetPosition) (THIS_
233 PNxPoint position) PURE;
235 STDMETHOD(GetPosition) (THIS_
236 REF(PNxPoint) position) PURE;
239 * IRMASite methods called by the user of the site to get
240 * information about the site, and to manipulate the site.
242 STDMETHOD(SetSize) (THIS_
243 PNxSize size) PURE;
245 STDMETHOD(GetSize) (THIS_
246 REF(PNxSize) size) PURE;
248 STDMETHOD(DamageRect) (THIS_
249 PNxRect rect) PURE;
251 STDMETHOD(DamageRegion) (THIS_
252 PNxRegion region) PURE;
254 STDMETHOD(ForceRedraw) (THIS) PURE;
258 /****************************************************************************
260 * Interface:
262 * IRMASiteUser
264 * Purpose:
266 * Interface for the user of the IRMASite objects.
268 * IID_IRMASiteUser:
270 * {00000D04-0901-11d1-8B06-00A024406D59}
273 DEFINE_GUID(IID_IRMASiteUser, 0x00000D04, 0x901, 0x11d1, 0x8b, 0x6, 0x0,
274 0xa0, 0x24, 0x40, 0x6d, 0x59);
276 #undef INTERFACE
277 #define INTERFACE IRMASiteUser
279 DECLARE_INTERFACE_(IRMASiteUser, IUnknown)
282 * IUnknown methods
284 STDMETHOD(QueryInterface) (THIS_
285 REFIID riid,
286 void** ppvObj) PURE;
288 STDMETHOD_(ULONG,AddRef) (THIS) PURE;
290 STDMETHOD_(ULONG,Release) (THIS) PURE;
293 * IRMASiteUser methods usually called by the "context" to
294 * associate users with the site.
296 STDMETHOD(AttachSite) (THIS_
297 IRMASite* /*IN*/ pSite) PURE;
299 STDMETHOD(DetachSite) (THIS) PURE;
302 * IRMASiteUser methods called to inform user of an event.
304 STDMETHOD(HandleEvent) (THIS_
305 PNxEvent* /*IN*/ pEvent) PURE;
307 STDMETHOD_(BOOL,NeedsWindowedSites) (THIS) PURE;
310 /****************************************************************************
312 * Interface:
314 * IRMASiteWatcher
316 * Purpose:
318 * Interface for IRMASiteWatcher objects.
320 * IID_IRMASite:
322 * {00000D05-0901-11d1-8B06-00A024406D59}
325 DEFINE_GUID(IID_IRMASiteWatcher, 0x00000D05, 0x901, 0x11d1, 0x8b, 0x6, 0x0,
326 0xa0, 0x24, 0x40, 0x6d, 0x59);
328 #undef INTERFACE
329 #define INTERFACE IRMASiteWatcher
331 DECLARE_INTERFACE_(IRMASiteWatcher, IUnknown)
334 * IUnknown methods
336 STDMETHOD(QueryInterface) (THIS_
337 REFIID riid,
338 void** ppvObj) PURE;
340 STDMETHOD_(ULONG,AddRef) (THIS) PURE;
342 STDMETHOD_(ULONG,Release) (THIS) PURE;
345 * IRMASiteWatcher methods called by the site when a watcher
346 * is attached to or detached from it.
348 STDMETHOD(AttachSite) (THIS_
349 IRMASite* /*IN*/ pSite) PURE;
351 STDMETHOD(DetachSite) (THIS) PURE;
354 * IRMASiteWatcher methods called by the site an attempt is
355 * made to change it's position or size. The site watcher must
356 * return PNR_OK for the change to occur. If the site watcher
357 * returns any value other than PNR_OK then the size or position
358 * will not change. The site watcher can also modify the new
359 * size of position.
361 STDMETHOD(ChangingPosition) (THIS_
362 PNxPoint posOld,
363 REF(PNxPoint)/*IN-OUT*/ posNew) PURE;
365 STDMETHOD(ChangingSize) (THIS_
366 PNxSize sizeOld,
367 REF(PNxSize) /*IN-OUT*/ sizeNew) PURE;
370 /****************************************************************************
372 * Interface:
374 * IRMASiteUserSupplier
376 * Purpose:
378 * Interface implemented by renderers and objects with provide layouts to
379 * the client core. This interface is called by the core when it needs a
380 * new IRMASiteUser, or when it is done using an IRMASiteUser.
382 * IID_IRMASiteUserSupplier:
384 * {00000D06-0901-11d1-8B06-00A024406D59}
387 DEFINE_GUID(IID_IRMASiteUserSupplier, 0x00000D06, 0x901, 0x11d1, 0x8b, 0x6, 0x0,
388 0xa0, 0x24, 0x40, 0x6d, 0x59);
390 #undef INTERFACE
391 #define INTERFACE IRMASiteUserSupplier
393 DECLARE_INTERFACE_(IRMASiteUserSupplier, IUnknown)
396 * IUnknown methods
398 STDMETHOD(QueryInterface) (THIS_
399 REFIID riid,
400 void** ppvObj) PURE;
402 STDMETHOD_(ULONG,AddRef) (THIS) PURE;
404 STDMETHOD_(ULONG,Release) (THIS) PURE;
407 * IRMASiteUserSupplier methods usually called by the
408 * "context" to ask for additional or to release previously
409 * created site users.
411 STDMETHOD(CreateSiteUser) (THIS_
412 REF(IRMASiteUser*)/*OUT*/ pSiteUser) PURE;
414 STDMETHOD(DestroySiteUser) (THIS_
415 IRMASiteUser* /*IN*/ pSiteUser) PURE;
417 STDMETHOD_(BOOL,NeedsWindowedSites) (THIS) PURE;
421 /****************************************************************************
423 * Interface:
425 * IRMASiteSupplier
427 * Purpose:
429 * Interface implemented by users of the client core. This interface is
430 * called by the core when it needs a new IRMASite, or when it is done
431 * using an IRMASite.
433 * IID_IRMASiteSupplier:
435 * {00000D07-0901-11d1-8B06-00A024406D59}
438 DEFINE_GUID(IID_IRMASiteSupplier, 0x00000D07, 0x901, 0x11d1, 0x8b, 0x6, 0x0,
439 0xa0, 0x24, 0x40, 0x6d, 0x59);
441 #undef INTERFACE
442 #define INTERFACE IRMASiteSupplier
444 DECLARE_INTERFACE_(IRMASiteSupplier, IUnknown)
447 * IUnknown methods
449 STDMETHOD(QueryInterface) (THIS_
450 REFIID riid,
451 void** ppvObj) PURE;
453 STDMETHOD_(ULONG,AddRef) (THIS) PURE;
455 STDMETHOD_(ULONG,Release) (THIS) PURE;
458 * IRMASiteSupplier methods
461 /************************************************************************
462 * Method:
463 * IRMASiteSupplier::SitesNeeded
464 * Purpose:
465 * Called to inform the site supplier that a site with a particular
466 * set of characteristics is needed. If the site supplier can
467 * fulfill the request it should call the site manager and add one
468 * or more new sites.
469 * Note that the request for sites is associated with a Request ID
470 * the client core will inform the site supplier when this requested
471 * site is no longer needed.
473 STDMETHOD(SitesNeeded) (THIS_
474 UINT32 uReqestID,
475 IRMAValues* pSiteProps) PURE;
477 /************************************************************************
478 * Method:
479 * IRMASiteSupplier::SitesNotNeeded
480 * Purpose:
481 * Called to inform the site supplier that all sites from a previos
482 * site request are no longer needed. If the site supplier had
483 * previously created non-persistant sites (like popup windows)
484 * to fulfill a request for sites it should call the site manager
485 * and remove those sites.
487 STDMETHOD(SitesNotNeeded) (THIS_
488 UINT32 uReqestID) PURE;
491 /************************************************************************
492 * Method:
493 * IRMASiteSupplier::BeginChangeLayout
494 * Purpose:
495 * Called to inform the site supplier a layout change has beginning
496 * it can expect to recieve SitesNeeded() and SitesNotNeeded() calls
497 * while a layout change is in progress,
499 STDMETHOD(BeginChangeLayout) (THIS) PURE;
501 /************************************************************************
502 * Method:
503 * IRMASiteSupplier::DoneChangeLayout
504 * Purpose:
505 * Called to inform the site supplier the layout change has been
506 * completed.
508 STDMETHOD(DoneChangeLayout) (THIS) PURE;
513 /****************************************************************************
515 * Interface:
517 * IRMASiteManager
519 * Purpose:
521 * Interface implemented by the client core. This interface is called
522 * by users of the client core to inform it of IRMASite's which are
523 * available for layout of renderers
525 * IID_IRMASiteManager:
527 * {00000D08-0901-11d1-8B06-00A024406D59}
530 DEFINE_GUID(IID_IRMASiteManager, 0x00000D08, 0x901, 0x11d1, 0x8b, 0x6, 0x0,
531 0xa0, 0x24, 0x40, 0x6d, 0x59);
533 #undef INTERFACE
534 #define INTERFACE IRMASiteManager
536 DECLARE_INTERFACE_(IRMASiteManager, IUnknown)
539 * IUnknown methods
541 STDMETHOD(QueryInterface) (THIS_
542 REFIID riid,
543 void** ppvObj) PURE;
545 STDMETHOD_(ULONG,AddRef) (THIS) PURE;
547 STDMETHOD_(ULONG,Release) (THIS) PURE;
550 * IRMASiteManager methods
553 /************************************************************************
554 * Method:
555 * IRMASiteManager::AddSite
556 * Purpose:
557 * Called to inform the site manager of the existance of a site.
559 STDMETHOD(AddSite) (THIS_
560 IRMASite* pSite) PURE;
562 /************************************************************************
563 * Method:
564 * IRMASiteManager::RemoveSite
565 * Purpose:
566 * Called to inform the site manager that a site is no longer
567 * available.
569 STDMETHOD(RemoveSite) (THIS_
570 IRMASite* pSite) PURE;
574 /****************************************************************************
576 * Interface:
578 * IRMAMultiInstanceSiteUserSupplier
580 * Purpose:
582 * This is the interface for a special default object which is available
583 * from the common class factory. This object will act as a site user
584 * supplier for any renderer (or other site user object) that wants
585 * default support for multiple instances. The site user must work as
586 * a windowless site for this default implementation to work. The
587 * default object also implements the IRMASite interfave to allow
588 * the site user object to control all the sites through a single
589 * interface instance.
591 * IID_IRMAMultiInstanceSiteUserSupplier:
593 * {00000D09-0901-11d1-8B06-00A024406D59}
596 DEFINE_GUID(IID_IRMAMultiInstanceSiteUserSupplier, 0x00000D09, 0x901,
597 0x11d1, 0x8b, 0x6, 0x0, 0xa0, 0x24, 0x40, 0x6d, 0x59);
599 #define CLSID_IRMAMultiInstanceSiteUserSupplier \
600 IID_IRMAMultiInstanceSiteUserSupplier
602 #undef INTERFACE
603 #define INTERFACE IRMAMultiInstanceSiteUserSupplier
605 DECLARE_INTERFACE_(IRMAMultiInstanceSiteUserSupplier, IUnknown)
608 * IUnknown methods
610 STDMETHOD(QueryInterface) (THIS_
611 REFIID riid,
612 void** ppvObj) PURE;
614 STDMETHOD_(ULONG,AddRef) (THIS) PURE;
616 STDMETHOD_(ULONG,Release) (THIS) PURE;
619 * IRMAMultiInstanceSiteUserSupplier methods called by site users.
621 STDMETHOD(SetSingleSiteUser) (THIS_
622 IUnknown* pUnknown) PURE;
624 STDMETHOD(ReleaseSingleSiteUser) (THIS) PURE;
628 /****************************************************************************
630 * Interface:
631 * IRMASiteFullScreen
633 * Purpose:
635 * This is the interface for turning on/off the full screen mode
637 * IID_IRMASiteFullScreen:
639 * {00000D0B-0901-11d1-8B06-00A024406D59}
642 DEFINE_GUID(IID_IRMASiteFullScreen, 0x00000D0B, 0x901,
643 0x11d1, 0x8b, 0x6, 0x0, 0xa0, 0x24, 0x40, 0x6d, 0x59);
645 #undef INTERFACE
646 #define INTERFACE IRMASiteFullScreen
648 DECLARE_INTERFACE_(IRMASiteFullScreen, IUnknown)
651 * IUnknown methods
653 STDMETHOD(QueryInterface) (THIS_
654 REFIID riid,
655 void** ppvObj) PURE;
657 STDMETHOD_(ULONG,AddRef) (THIS) PURE;
659 STDMETHOD_(ULONG,Release) (THIS) PURE;
662 * IRMASiteFullScreen methods
664 STDMETHOD(EnterFullScreen) (THIS) PURE;
666 STDMETHOD(ExitFullScreen) (THIS) PURE;
668 STDMETHOD(TestFullScreen) (THIS_
669 void* hTestBitmap,const char* pszStatusText) PURE;
671 STDMETHOD_(BOOL, IsFullScreen) (THIS) PURE;
677 /****************************************************************************
679 * Interface:
680 * IRMAEventHookMgr
682 * Purpose:
684 * Add ability to hook events from a named region
686 * IID_IRMAEventHookMgr:
688 * {00000D0D-0901-11d1-8B06-00A024406D59}
691 DEFINE_GUID(IID_IRMAEventHookMgr, 0x00000D0D, 0x901,
692 0x11d1, 0x8b, 0x6, 0x0, 0xa0, 0x24, 0x40, 0x6d, 0x59);
694 #undef INTERFACE
695 #define INTERFACE IRMAEventHookMgr
697 DECLARE_INTERFACE_(IRMAEventHookMgr, IUnknown)
700 * IUnknown methods
702 STDMETHOD(QueryInterface) (THIS_
703 REFIID riid,
704 void** ppvObj) PURE;
706 STDMETHOD_(ULONG,AddRef) (THIS) PURE;
708 STDMETHOD_(ULONG,Release) (THIS) PURE;
711 * IRMAEventHookMgr methods
713 STDMETHOD(AddHook) (THIS_
714 IRMAEventHook* pHook,
715 const char* pRegionName,
716 UINT16 uLayer) PURE;
718 STDMETHOD(RemoveHook) (THIS_
719 IRMAEventHook* pHook,
720 const char* pRegionName,
721 UINT16 uLayer) PURE;
724 /****************************************************************************
726 * Interface:
727 * IRMAEventHook
729 * Purpose:
731 * Object that gets hooked events sent by IRMAEventHookMgr
733 * IID_IRMAEventHookMgr:
735 * {00000D0E-0901-11d1-8B06-00A024406D59}
738 DEFINE_GUID(IID_IRMAEventHook, 0x00000D0E, 0x901,
739 0x11d1, 0x8b, 0x6, 0x0, 0xa0, 0x24, 0x40, 0x6d, 0x59);
741 #undef INTERFACE
742 #define INTERFACE IRMAEventHook
744 DECLARE_INTERFACE_(IRMAEventHook, IUnknown)
747 * IUnknown methods
749 STDMETHOD(QueryInterface) (THIS_
750 REFIID riid,
751 void** ppvObj) PURE;
753 STDMETHOD_(ULONG,AddRef) (THIS) PURE;
755 STDMETHOD_(ULONG,Release) (THIS) PURE;
758 * IRMAEventHook methods
760 STDMETHOD(SiteAdded) (THIS_
761 IRMASite* pSite) PURE;
762 STDMETHOD(HandleEvent) (THIS_
763 IRMASite* pSite,
764 PNxEvent* pEvent) PURE;
765 STDMETHOD(SiteRemoved) (THIS_
766 IRMASite* pSite) PURE;
770 /****************************************************************************
772 * Interface:
773 * IRMAStatusMessage
775 * Purpose:
777 * This is the interface for setting the status text.
779 * IID_IRMAStatusMessage:
781 * {00000D10-0901-11d1-8B06-00A024406D59}
784 DEFINE_GUID(IID_IRMAStatusMessage, 0x00000D10, 0x901,
785 0x11d1, 0x8b, 0x6, 0x0, 0xa0, 0x24, 0x40, 0x6d, 0x59);
787 #undef INTERFACE
788 #define INTERFACE IRMAStatusMessage
790 DECLARE_INTERFACE_(IRMAStatusMessage, IUnknown)
793 * IUnknown methods
795 STDMETHOD(QueryInterface) (THIS_
796 REFIID riid,
797 void** ppvObj) PURE;
799 STDMETHOD_(ULONG,AddRef) (THIS) PURE;
801 STDMETHOD_(ULONG,Release) (THIS) PURE;
804 * IRMAStatusMessage methods
807 STDMETHOD(SetStatus) (THIS_ const char* pText) PURE;
811 #endif /* _RMAWIN_H_ */