1 /****************************************************************************
3 * $Id: rmacmenu.h 7 2003-05-30 02:18:02Z gabest $
5 * Copyright (C) 1995-1999 RealNetworks, Inc. All rights reserved.
7 * http://www.real.com/devzone
9 * This program contains proprietary information of RealNetworks, Inc,
10 * and is licensed subject to restrictions on use and distribution.
13 * RealMedia Architecture Context Menu Interfaces.
21 * Forward declarations of some interfaces defined or used here-in.
23 typedef _INTERFACE IRMAContextMenu IRMAContextMenu
;
24 typedef _INTERFACE IRMAContextMenuResponse IRMAContextMenuResponse
;
27 /****************************************************************************
35 * Interface implemented by top level clients and provided to renderers.
36 * Allows the renderer to show a context menu and the top level client
37 * to add client specitic commands unknown to the renderer to that menu.
39 * IID_IRMAContextMenu:
41 * {00001f00-0901-11d1-8B06-00A024406D59}
44 DEFINE_GUID(IID_IRMAContextMenu
, 0x00001f00, 0x901, 0x11d1, 0x8b, 0x6, 0x0,
45 0xa0, 0x24, 0x40, 0x6d, 0x59);
48 #define INTERFACE IRMAContextMenu
50 DECLARE_INTERFACE_(IRMAContextMenu
, IUnknown
)
55 STDMETHOD(QueryInterface
) (THIS_
59 STDMETHOD_(ULONG
,AddRef
) (THIS
) PURE
;
61 STDMETHOD_(ULONG
,Release
) (THIS
) PURE
;
64 * IRMAContextMenu methods
67 /************************************************************************
69 * IRMAContextMenu::InitContextMenu
71 * Initializes the context menu to a blank menu, and sets the name
72 * of the "sub menu" for the renderer if appropriate. This will
73 * clear any previously added menu items and sub menus.
75 STDMETHOD(InitContextMenu
) (THIS_
79 /************************************************************************
81 * IRMAContextMenu::AddMenuItem
83 * Returns information vital to the instantiation of rendering
86 STDMETHOD(AddMenuItem
) (THIS_
88 const char* pMenuItemText
,
94 /************************************************************************
96 * IRMAContextMenu::AddMenuItem
98 * Returns information vital to the instantiation of rendering
101 STDMETHOD(AddSeparator
) (THIS
) PURE
;
103 /************************************************************************
105 * IRMAContextMenu::AddChildMenu
107 * Returns information vital to the instantiation of rendering
110 STDMETHOD(AddChildMenu
) (THIS_
111 const char* pMenuText
114 /************************************************************************
116 * IRMAContextMenu::EndChildMenu
118 * Returns information vital to the instantiation of rendering
121 STDMETHOD(EndChildMenu
) (THIS
) PURE
;
123 /************************************************************************
125 * IRMAContextMenu::ChangeMenuItem
127 * Returns information vital to the instantiation of rendering
130 STDMETHOD(ChangeMenuItem
) (THIS_
132 const char* pMenuItemText
,
138 /************************************************************************
140 * IRMAContextMenu::ShowMenu
142 * Shows the setup context menu at the specified point.
144 STDMETHOD(ShowMenu
) (THIS_
145 IRMAContextMenuResponse
* pResonse
,
151 /****************************************************************************
155 * IRMAContextMenuResponse
159 * Interface implemented by renderers that use the context menut.
160 * Is called to inform the renderer that a particular menu item was
163 * IRMAContextMenuResponse:
165 * {00001f01-0901-11d1-8B06-00A024406D59}
168 DEFINE_GUID(IID_IRMAContextMenuResponse
, 0x00001f01, 0x901, 0x11d1, 0x8b, 0x6, 0x0,
169 0xa0, 0x24, 0x40, 0x6d, 0x59);
173 #define INTERFACE IRMAContextMenuResponse
175 DECLARE_INTERFACE_(IRMAContextMenuResponse
, IUnknown
)
180 STDMETHOD(QueryInterface
) (THIS_
184 STDMETHOD_(ULONG
,AddRef
) (THIS
) PURE
;
186 STDMETHOD_(ULONG
,Release
) (THIS
) PURE
;
189 * IRMAContextMenuResponse methods
192 /************************************************************************
194 * IRMAContextMenuResponse::OnCommand
196 * Called to inform the renderer that a command was chosen from
199 STDMETHOD(OnCommand
) (THIS_
204 /************************************************************************
206 * IRMAContextMenuResponse::OnCanceled
208 * Called to inform the renderer that the context menu was closed
209 * without a command being chosen from the renders set of commands.
211 STDMETHOD(OnCanceled
) (THIS
) PURE
;
215 #endif /* _RMACMENU_H_ */