1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: XEmbeddedObject.idl,v $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
30 #ifndef __com_sun_star_embed_XEmbeddedObject_idl__
31 #define __com_sun_star_embed_XEmbeddedObject_idl__
33 #ifndef __com_sun_star_lang_XComponent_idl__
34 #include
<com
/sun
/star
/lang
/XComponent.idl
>
37 #ifndef __com_sun_star_embed_XEmbeddedClient_idl__
38 #include
<com
/sun
/star
/embed
/XEmbeddedClient.idl
>
41 #ifndef __com_sun_star_embed_XVisualObject_idl__
42 #include
<com
/sun
/star
/embed
/XVisualObject.idl
>
45 #ifndef __com_sun_star_embed_XClassifiedObject_idl__
46 #include
<com
/sun
/star
/embed
/XClassifiedObject.idl
>
49 #ifndef __com_sun_star_embed_XComponentSupplier_idl__
50 #include
<com
/sun
/star
/embed
/XComponentSupplier.idl
>
53 #ifndef __com_sun_star_embed_XStateChangeBroadcaster_idl__
54 #include
<com
/sun
/star
/embed
/XStateChangeBroadcaster.idl
>
57 #ifndef __com_sun_star_datatransfer_XTransferable_idl__
58 #include
<com
/sun
/star
/datatransfer
/XTransferable.idl
>
61 #ifndef __com_sun_star_document_XEventBroadcaster_idl__
62 #include
<com
/sun
/star
/document
/XEventBroadcaster.idl
>
65 #ifndef __com_sun_star_embed_VerbDescriptor_idl__
66 #include
<com
/sun
/star
/embed
/VerbDescriptor.idl
>
69 #ifndef __com_sun_star_embed_UnreachableStateException_idl__
70 #include
<com
/sun
/star
/embed
/UnreachableStateException.idl
>
73 #ifndef __com_sun_star_embed_WrongStateException_idl__
74 #include
<com
/sun
/star
/embed
/WrongStateException.idl
>
77 #ifndef __com_sun_star_embed_NeedsRunningStateException_idl__
78 #include
<com
/sun
/star
/embed
/NeedsRunningStateException.idl
>
81 #ifndef __com_sun_star_lang_IllegalArgumentException_idl__
82 #include
<com
/sun
/star
/lang
/IllegalArgumentException.idl
>
85 #ifndef __com_sun_star_util_XCloseable_idl__
86 #include
<com
/sun
/star
/util
/XCloseable.idl
>
91 //============================================================================
93 module com
{ module sun
{ module star
{ module embed
{
95 //============================================================================
96 /** represents common functionality for embedded objects.
98 interface XEmbeddedObject
102 //------------------------------------------------------------------------
103 /** represents common visualisation functionality for embedded objects.
105 interface XVisualObject
;
107 //------------------------------------------------------------------------
108 /** allows to detect class ID of the object.
110 interface XClassifiedObject
;
112 //------------------------------------------------------------------------
113 /** allows to get access to the component handled by the object.
115 interface XComponentSupplier
;
117 //------------------------------------------------------------------------
118 /** allows to be notified when object changes the state.
120 interface XStateChangeBroadcaster
;
122 //------------------------------------------------------------------------
123 /** allows to be notified about object related events.
125 interface ::com
::sun
::star
::document
::XEventBroadcaster
;
127 //------------------------------------------------------------------------
128 /** allows to control lifetime of the object.
130 interface ::com
::sun
::star
::util
::XCloseable
;
134 //------------------------------------------------------------------------
135 /** changes the state of the object to the requested one.
138 specifies the new state, can take values from the constant set
139 <type scope="com::sun::star::embed">EmbedStates</type>
141 @throws com::sun::star::embed::UnreachableStateException
142 the specified state can not be reached
144 @throws com::sun::star::embed::WrongStateException
145 in case object is in invalid state
147 @throws com::sun::star::uno::Exception
148 in case of other problems
150 void changeState
( [in] long nNewState
)
151 raises
( ::com
::sun
::star
::embed
::UnreachableStateException
,
152 ::com
::sun
::star
::embed
::WrongStateException
,
153 ::com
::sun
::star
::uno
::Exception
);
155 //------------------------------------------------------------------------
156 /** returns supported states for the object.
159 the sequence of states the object can be set to
161 @throws com::sun::star::embed::NeedsRunnignStateException
162 means that the object is in loaded state now and can be switched
163 to running state, other possible states can be detected only when
164 the object is not in loaded state any more
166 @throws com::sun::star::embed::WrongStateException
167 in case object is in invalid state
169 sequence
< long > getReachableStates
()
170 raises
( ::com
::sun
::star
::embed
::NeedsRunningStateException
,
171 ::com
::sun
::star
::embed
::WrongStateException
);
173 //------------------------------------------------------------------------
174 /** returns the current state of the object.
177 the current state of the object
179 @throws com::sun::star::embed::WrongStateException
180 in case object is in invalid state
182 long getCurrentState
()
183 raises
( ::com
::sun
::star
::embed
::WrongStateException
);
185 //------------------------------------------------------------------------
186 /** lets object perform an action referenced by nVerbID.
189 specifies an action to perform, can take values from
190 <type>EmbedVerbs</type>
192 @throws ::com::sun::star::lang::IllegalArgumentException
193 the verb is not supported
195 @throws com::sun::star::embed::WrongStateException
196 the object is in wrong state to call the function
198 @throws com::sun::star::embed::UnreachableStateException
199 the state, required by the verb, can not be reached
201 @throws com::sun::star::uno::Exception
202 in case of other problems
204 void doVerb
( [in] long nVerbID
)
205 raises
( ::com
::sun
::star
::lang
::IllegalArgumentException
,
206 ::com
::sun
::star
::embed
::WrongStateException
,
207 ::com
::sun
::star
::embed
::UnreachableStateException
,
208 ::com
::sun
::star
::uno
::Exception
);
210 //------------------------------------------------------------------------
211 /** returns supported verbs for the object.
214 the sequence of verbs the object supports
216 @throws com::sun::star::embed::NeedsRunnignStateException
217 means that the object is in loaded state now and can be switched
218 to running state, acceptable verbs can be detected only when the
219 object is not in loaded state any more
221 @throws com::sun::star::embed::WrongStateException
222 the object is in wrong state to call the function
224 sequence
< VerbDescriptor
> getSupportedVerbs
()
225 raises
( ::com
::sun
::star
::embed
::NeedsRunningStateException
,
226 ::com
::sun
::star
::embed
::WrongStateException
);
228 //------------------------------------------------------------------------
229 /** sets a connection to the container's client.
232 provides a reference to a client implementation
234 @throws com::sun::star::embed::WrongStateException
235 the object is in wrong state
237 void setClientSite
( [in] XEmbeddedClient xClient
)
238 raises
( ::com
::sun
::star
::embed
::WrongStateException
);
240 //------------------------------------------------------------------------
241 /** provides access to the internal link to the container client.
244 a reference to related container client if any is set
246 @throws com::sun::star::embed::WrongStateException
247 the object is in wrong state
249 XEmbeddedClient getClientSite
()
250 raises
( ::com
::sun
::star
::embed
::WrongStateException
);
252 //------------------------------------------------------------------------
253 /** updates object's representations.
255 @throws com::sun::star::embed::WrongStateException
256 the object is in wrong state to call the function
258 @throws com::sun::star::uno::Exception
259 in case problems detected
262 raises
( ::com
::sun
::star
::embed
::WrongStateException
,
263 ::com
::sun
::star
::uno
::Exception
);
265 //------------------------------------------------------------------------
266 /** specifies how often the object's representation should be updated.
269 the new update mode, can take values from
270 <type>EmbeddedUpdateModes</type>
272 @throws ::com::sun::star::embed::WrongStateException
273 the object is in wrong state
275 void setUpdateMode
( [in] long nMode
)
276 raises
( ::com
::sun
::star
::embed
::WrongStateException
);
278 //------------------------------------------------------------------------
279 /** retrieves the status of the object.
282 the aspect specifying the form of object representation
285 the value specifying the status of the object for specified aspect
286 can take values from <type>EmbedMisc</type> constant set
288 @throws com::sun::star::embed::WrongStateException
289 the object is in wrong state
291 hyper getStatus
( [in] hyper nAspect
)
292 raises
( ::com
::sun
::star
::embed
::WrongStateException
);
294 //-------------------------------------------------------------------------
295 /** provides object with the name of container document.
298 name of the container document
300 void setContainerName
( [in] string sName
);
304 //============================================================================