📄 hxwin.h
字号:
/* ***** BEGIN LICENSE BLOCK ***** * Source last modified: $Id: hxwin.h,v 1.1.1.1.50.3 2004/07/09 01:45:13 hubbe Exp $ * * Portions Copyright (c) 1995-2004 RealNetworks, Inc. All Rights Reserved. * * The contents of this file, and the files included with this file, * are subject to the current version of the RealNetworks Public * Source License (the "RPSL") available at * http://www.helixcommunity.org/content/rpsl unless you have licensed * the file under the current version of the RealNetworks Community * Source License (the "RCSL") available at * http://www.helixcommunity.org/content/rcsl, in which case the RCSL * will apply. You may also obtain the license terms directly from * RealNetworks. You may not use this file except in compliance with * the RPSL or, if you have a valid RCSL with RealNetworks applicable * to this file, the RCSL. Please see the applicable RPSL or RCSL for * the rights, obligations and limitations governing use of the * contents of the file. * * Alternatively, the contents of this file may be used under the * terms of the GNU General Public License Version 2 or later (the * "GPL") in which case the provisions of the GPL are applicable * instead of those above. If you wish to allow use of your version of * this file only under the terms of the GPL, and not to allow others * to use your version of this file under the terms of either the RPSL * or RCSL, indicate your decision by deleting the provisions above * and replace them with the notice and other provisions required by * the GPL. If you do not delete the provisions above, a recipient may * use your version of this file under the terms of any one of the * RPSL, the RCSL or the GPL. * * This file is part of the Helix DNA Technology. RealNetworks is the * developer of the Original Code and owns the copyrights in the * portions it created. * * This file, and the files included with this file, is distributed * and made available on an 'AS IS' basis, WITHOUT WARRANTY OF ANY * KIND, EITHER EXPRESS OR IMPLIED, AND REALNETWORKS HEREBY DISCLAIMS * ALL SUCH WARRANTIES, INCLUDING WITHOUT LIMITATION, ANY WARRANTIES * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, QUIET * ENJOYMENT OR NON-INFRINGEMENT. * * Technology Compatibility Kit Test Suite(s) Location: * http://www.helixcommunity.org/content/tck * * Contributor(s): * * ***** END LICENSE BLOCK ***** */#ifndef _HXWIN_H_#define _HXWIN_H_/* * Forward declarations of some interfaces defined or used here-in. */typedef _INTERFACE IHXSite IHXSite;typedef _INTERFACE IHXSiteUser IHXSiteUser;typedef _INTERFACE IHXSiteWindowed IHXSiteWindowed;typedef _INTERFACE IHXSiteEventHandler IHXSiteEventHandler;typedef _INTERFACE IHXSiteWindowless IHXSiteWindowless;typedef _INTERFACE IHXSiteWatcher IHXSiteWatcher;typedef _INTERFACE IHXValues IHXValues;typedef _INTERFACE IHXSiteFullScreen IHXSiteFullScreen;typedef _INTERFACE IHXLayoutSiteGroupManager IHXLayoutSiteGroupManager;typedef _INTERFACE IHXEventHook IHXEventHook;typedef _INTERFACE IHXColorConverter IHXColorConverter;typedef _INTERFACE IHXSubRectVideoSurface IHXSubRectVideoSurface;typedef struct _HXBitmapInfoHeader HXBitmapInfoHeader;typedef struct _HXxWindow HXxWindow;typedef struct _HXxRegion HXxBoxRegion;typedef struct _HXxSize HXxSize;typedef struct _HXxPoint HXxPoint;typedef struct _HXxRect HXxRect;typedef void* HXxRegion;/* * Styles for IHXDrawFocus */#define HX_SOLID_LINE 1#define HX_DASHED_LINE HX_SOLID_LINE<<1#define HX_DOTTED_LINE HX_SOLID_LINE<<2#define HX_CUSTOM_LINE HX_SOLID_LINE<<3/* * Focus Navigation */typedef enum _HXFocusContext{ HXFirstFocus, HXUpFocus, HXDownFocus, HXLeftFocus, HXRightFocus, HXNextFocus, HXPrevFocus, HXLastFocus} HXFocusContext;typedef enum _HXFocusState{ HXNoFocus, HXFocused} HXFocusState;/**************************************************************************** * * Interface: * * IHXSiteWindowed * * Purpose: * * Interface for IHXSite objects which are associated with platform * specific window objects on Microsoft Windows and X-Windows. * * IID_IHXSiteWindowed: * * {00000D01-0901-11d1-8B06-00A024406D59} * */DEFINE_GUID(IID_IHXSiteWindowed, 0x00000D01, 0x901, 0x11d1, 0x8b, 0x6, 0x0, 0xa0, 0x24, 0x40, 0x6d, 0x59);#define CLSID_IHXSiteWindowed IID_IHXSiteWindowed// $Private:DEFINE_GUID(IID_IHXGetImplementation, 0x00000D11, 0x901, 0x11d1, 0x8b, 0x6, 0x0, 0xa0, 0x24, 0x40, 0x6d, 0x59);// $EndPrivate.#undef INTERFACE#define INTERFACE IHXSiteWindowedDECLARE_INTERFACE_(IHXSiteWindowed, IUnknown){ /* * IUnknown methods */ STDMETHOD(QueryInterface) (THIS_ REFIID riid, void** ppvObj) PURE; STDMETHOD_(ULONG32,AddRef) (THIS) PURE; STDMETHOD_(ULONG32,Release) (THIS) PURE; /* * IHXSiteWindowed methods called by site suppliers * when they want the site associated with a * previously created (and externally managed) window. * This method will "sub-class" that window (Win32). * On Unix, the site supplier must pass events from * the externally managed window to the core via * IHXClientEngine::EventOccurred(). Please note that * The HXxWindow ptr must remain in scope for the life * of Site. * */ STDMETHOD(AttachWindow) (THIS_ HXxWindow* /*IN*/ pWindow) PURE; STDMETHOD(DetachWindow) (THIS) PURE; /* * IHXSiteWindowed methods called by Owners of the site * in the event that want a default top level window created * for the site. */ STDMETHOD(Create) (THIS_ void* ParentWindow, UINT32 style) PURE; STDMETHOD(Destroy) (THIS) PURE; /* * IHXSiteWindowed method. Returns actual window of the site. */ STDMETHOD_(HXxWindow*,GetWindow)(THIS) PURE;};// $Private:/**************************************************************************** * * Interface: * * IHXSiteEventHandler * * Purpose: * * Interface for allowing client core engine to pass events to a site imeplementor * which it implemented as a factory plugin. * * IID_IHXSiteEventHandler * * {00000D12-0901-11d1-8B-6-00A024406D59} * */DEFINE_GUID(IID_IHXSiteEventHandler, 0x00000D12, 0x901, 0x11d1, 0x8b, 0x6, 0x0, 0xa0, 0x24, 0x40, 0x6d, 0x59);#define CLSID_IHXSiteEventHandler IID_IHXSiteEventHandler#undef INTERFACE#define INTERFACE IHXSiteEventHandlerDECLARE_INTERFACE_(IHXSiteEventHandler, IUnknown){ /* * IUnknown methods */ STDMETHOD(QueryInterface) (THIS_ REFIID riid, void** ppvObj) PURE; STDMETHOD_(ULONG32,AddRef) (THIS) PURE; STDMETHOD_(ULONG32,Release) (THIS) PURE; /* * This method is called from Site Manager EventOccured(). * The imeplementation of this interface must pass the events * on to the individual CHXSiteWindowed sites. */ STDMETHOD(EventOccurred) (THIS_ HXxEvent* pEvent) PURE;};// $EndPrivate./**************************************************************************** * * Interface: * * IHXSiteWindowless * * Purpose: * * Interface for IHXSite objects which are "windowless" or not * associated with platform specific window objects. * * IID_IHXSiteWindowless: * * {00000D02-0901-11d1-8B06-00A024406D59} * */DEFINE_GUID(IID_IHXSiteWindowless, 0x00000D02, 0x901, 0x11d1, 0x8b, 0x6, 0x0, 0xa0, 0x24, 0x40, 0x6d, 0x59);#undef INTERFACE#define INTERFACE IHXSiteWindowless#define CLSID_IHXSiteWindowless IID_IHXSiteWindowlessDECLARE_INTERFACE_(IHXSiteWindowless, IUnknown){ /* * IUnknown methods */ STDMETHOD(QueryInterface) (THIS_ REFIID riid, void** ppvObj) PURE; STDMETHOD_(ULONG32,AddRef) (THIS) PURE; STDMETHOD_(ULONG32,Release) (THIS) PURE; /* * IHXSiteWindowless methods called by owners of the site. */ STDMETHOD(EventOccurred) (THIS_ HXxEvent* /*IN*/ pEvent) PURE; /* * IHXSiteWindowless method. Returns some parent window that * owns the windowless site. Useful for right-click menus and * dialog box calls. */ STDMETHOD_(HXxWindow*,GetParentWindow)(THIS) PURE;};/**************************************************************************** * * Interface: * * IHXSite * * Purpose: * * Interface for IHXSite objects. * * IID_IHXSite: * * {00000D03-0901-11d1-8B06-00A024406D59} * */DEFINE_GUID(IID_IHXSite, 0x00000D03, 0x901, 0x11d1, 0x8b, 0x6, 0x0, 0xa0, 0x24, 0x40, 0x6d, 0x59);#undef INTERFACE#define INTERFACE IHXSiteDECLARE_INTERFACE_(IHXSite, IUnknown){ /* * IUnknown methods */ STDMETHOD(QueryInterface) (THIS_ REFIID riid, void** ppvObj) PURE; STDMETHOD_(ULONG32,AddRef) (THIS) PURE; STDMETHOD_(ULONG32,Release) (THIS) PURE; /* * IHXSite methods usually called by the "context" to * associate users with the site, and to create child sites * as appropriate. */ STDMETHOD(AttachUser) (THIS_ IHXSiteUser* /*IN*/ pUser) PURE; STDMETHOD(DetachUser) (THIS) PURE; STDMETHOD(GetUser) (THIS_ REF(IHXSiteUser*) /*OUT*/ pUser) PURE; STDMETHOD(CreateChild) (THIS_ REF(IHXSite*) /*OUT*/ pChildSite) PURE; STDMETHOD(DestroyChild) (THIS_ IHXSite* /*IN*/ pChildSite) PURE; /* * IHXSite methods called by the the "context" in which the site * is displayed in order to manage its position. Site users should * not generally call these methods. */ STDMETHOD(AttachWatcher) (THIS_ IHXSiteWatcher* /*IN*/ pWatcher) PURE; STDMETHOD(DetachWatcher) (THIS) PURE; STDMETHOD(SetPosition) (THIS_ HXxPoint position) PURE; STDMETHOD(GetPosition) (THIS_ REF(HXxPoint) position) PURE; /* * IHXSite methods called by the user of the site to get * information about the site, and to manipulate the site. */ STDMETHOD(SetSize) (THIS_ HXxSize size) PURE; STDMETHOD(GetSize) (THIS_ REF(HXxSize) size) PURE; STDMETHOD(DamageRect) (THIS_ HXxRect rect) PURE; STDMETHOD(DamageRegion) (THIS_ HXxRegion region) PURE; STDMETHOD(ForceRedraw) (THIS) PURE;};// $Private/**************************************************************************** * * Interface: * * IHXSiteComposition * * Purpose: * * Interface for IHXSite objects to let them compose composition * frames and display them on a regular basis rather than many * discrete blts. * * IID_IHXSiteComposition: * * {00000D03-0901-11d1-8B06-00A024406D59} * */DEFINE_GUID(IID_IHXSiteComposition, 0x00000D19, 0x901, 0x11d1, 0x8b, 0x6, 0x0, 0xa0, 0x24, 0x40, 0x6d, 0x59);#undef INTERFACE#define INTERFACE IHXSiteCompositionDECLARE_INTERFACE_(IHXSiteComposition, IUnknown){ /* IUnknown methods */ STDMETHOD(QueryInterface) (THIS_ REFIID riid, void** ppvObj) PURE; STDMETHOD_(ULONG32,AddRef) (THIS) PURE; STDMETHOD_(ULONG32,Release) (THIS) PURE; /* IHXSiteComposition methods. */ STDMETHOD(LockComposition) (THIS) PURE; STDMETHOD(UnlockComposition) (THIS) PURE; STDMETHOD(BltComposition) (THIS) PURE; STDMETHOD(SetCompositionMode) (THIS_ BOOL OnOrOff) PURE; STDMETHOD_(BOOL, IsCompositionLocked) (THIS) PURE; STDMETHOD_(BOOL, IsCompositionMode) (THIS) PURE;};// $EndPrivate./**************************************************************************** * * Interface: * * IHXSiteUser * * Purpose: * * Interface for the user of the IHXSite objects. * * IID_IHXSiteUser: * * {00000D04-0901-11d1-8B06-00A024406D59} * */DEFINE_GUID(IID_IHXSiteUser, 0x00000D04, 0x901, 0x11d1, 0x8b, 0x6, 0x0, 0xa0, 0x24, 0x40, 0x6d, 0x59);#undef INTERFACE#define INTERFACE IHXSiteUserDECLARE_INTERFACE_(IHXSiteUser, IUnknown){ /* * IUnknown methods */ STDMETHOD(QueryInterface) (THIS_ REFIID riid, void** ppvObj) PURE; STDMETHOD_(ULONG32,AddRef) (THIS) PURE; STDMETHOD_(ULONG32,Release) (THIS) PURE; /* * IHXSiteUser methods usually called by the "context" to * associate users with the site. */ STDMETHOD(AttachSite) (THIS_ IHXSite* /*IN*/ pSite) PURE; STDMETHOD(DetachSite) (THIS) PURE; /* * IHXSiteUser methods called to inform user of an event. */ STDMETHOD(HandleEvent) (THIS_ HXxEvent* /*IN*/ pEvent) PURE; STDMETHOD_(BOOL,NeedsWindowedSites) (THIS) PURE;};/**************************************************************************** * * Interface: * * IHXSiteWatcher * * Purpose: * * Interface for IHXSiteWatcher objects. * * IID_IHXSite: * * {00000D05-0901-11d1-8B06-00A024406D59} * */DEFINE_GUID(IID_IHXSiteWatcher, 0x00000D05, 0x901, 0x11d1, 0x8b, 0x6, 0x0, 0xa0, 0x24, 0x40, 0x6d, 0x59);#undef INTERFACE#define INTERFACE IHXSiteWatcherDECLARE_INTERFACE_(IHXSiteWatcher, IUnknown){ /* * IUnknown methods */ STDMETHOD(QueryInterface) (THIS_ REFIID riid, void** ppvObj) PURE; STDMETHOD_(ULONG32,AddRef) (THIS) PURE; STDMETHOD_(ULONG32,Release) (THIS) PURE; /* * IHXSiteWatcher methods called by the site when a watcher * is attached to or detached from it. */ STDMETHOD(AttachSite) (THIS_ IHXSite* /*IN*/ pSite) PURE; STDMETHOD(DetachSite) (THIS) PURE; /* * IHXSiteWatcher methods called by the site an attempt is * made to change it's position or size. The site watcher must * return HXR_OK for the change to occur. If the site watcher * returns any value other than HXR_OK then the size or position * will not change. The site watcher can also modify the new * size of position. */ STDMETHOD(ChangingPosition) (THIS_ HXxPoint posOld, REF(HXxPoint)/*IN-OUT*/ posNew) PURE; STDMETHOD(ChangingSize) (THIS_ HXxSize sizeOld, REF(HXxSize) /*IN-OUT*/ sizeNew) PURE;};/**************************************************************************** * * Interface: * * IHXSiteUserSupplier * * Purpose: * * Interface implemented by renderers and objects with provide layouts to * the client core. This interface is called by the core when it needs a * new IHXSiteUser, or when it is done using an IHXSiteUser. * * IID_IHXSiteUserSupplier: * * {00000D06-0901-11d1-8B06-00A024406D59} * */DEFINE_GUID(IID_IHXSiteUserSupplier, 0x00000D06, 0x901, 0x11d1, 0x8b, 0x6, 0x0, 0xa0, 0x24, 0x40, 0x6d, 0x59);#undef INTERFACE#define INTERFACE IHXSiteUserSupplierDECLARE_INTERFACE_(IHXSiteUserSupplier, IUnknown){ /* * IUnknown methods */ STDMETHOD(QueryInterface) (THIS_ REFIID riid, void** ppvObj) PURE; STDMETHOD_(ULONG32,AddRef) (THIS) PURE; STDMETHOD_(ULONG32,Release) (THIS) PURE; /* * IHXSiteUserSupplier methods usually called by the * "context" to ask for additional or to release previously * created site users. */ STDMETHOD(CreateSiteUser) (THIS_ REF(IHXSiteUser*)/*OUT*/ pSiteUser) PURE; STDMETHOD(DestroySiteUser) (THIS_ IHXSiteUser* /*IN*/ pSiteUser) PURE; STDMETHOD_(BOOL,NeedsWindowedSites) (THIS) PURE;};/**************************************************************************** *
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -