1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 * Copyright 2000, 2010 Oracle and/or its affiliates.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * This file is part of OpenOffice.org.
11 * OpenOffice.org is free software: you can redistribute it and/or modify
12 * it under the terms of the GNU Lesser General Public License version 3
13 * only, as published by the Free Software Foundation.
15 * OpenOffice.org is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 * GNU Lesser General Public License version 3 for more details
19 * (a copy is included in the LICENSE file that accompanied this code).
21 * You should have received a copy of the GNU Lesser General Public License
22 * version 3 along with OpenOffice.org. If not, see
23 * <http://www.openoffice.org/license.html>
24 * for a copy of the LGPLv3 License.
26 ************************************************************************/
27 #ifndef __com_sun_star_embed_XEmbeddedObject_idl__
28 #define __com_sun_star_embed_XEmbeddedObject_idl__
30 #ifndef __com_sun_star_lang_XComponent_idl__
31 #include
<com
/sun
/star
/lang
/XComponent.idl
>
34 #ifndef __com_sun_star_embed_XEmbeddedClient_idl__
35 #include
<com
/sun
/star
/embed
/XEmbeddedClient.idl
>
38 #ifndef __com_sun_star_embed_XVisualObject_idl__
39 #include
<com
/sun
/star
/embed
/XVisualObject.idl
>
42 #ifndef __com_sun_star_embed_XClassifiedObject_idl__
43 #include
<com
/sun
/star
/embed
/XClassifiedObject.idl
>
46 #ifndef __com_sun_star_embed_XComponentSupplier_idl__
47 #include
<com
/sun
/star
/embed
/XComponentSupplier.idl
>
50 #ifndef __com_sun_star_embed_XStateChangeBroadcaster_idl__
51 #include
<com
/sun
/star
/embed
/XStateChangeBroadcaster.idl
>
54 #ifndef __com_sun_star_datatransfer_XTransferable_idl__
55 #include
<com
/sun
/star
/datatransfer
/XTransferable.idl
>
58 #ifndef __com_sun_star_document_XEventBroadcaster_idl__
59 #include
<com
/sun
/star
/document
/XEventBroadcaster.idl
>
62 #ifndef __com_sun_star_embed_VerbDescriptor_idl__
63 #include
<com
/sun
/star
/embed
/VerbDescriptor.idl
>
66 #ifndef __com_sun_star_embed_UnreachableStateException_idl__
67 #include
<com
/sun
/star
/embed
/UnreachableStateException.idl
>
70 #ifndef __com_sun_star_embed_WrongStateException_idl__
71 #include
<com
/sun
/star
/embed
/WrongStateException.idl
>
74 #ifndef __com_sun_star_embed_NeedsRunningStateException_idl__
75 #include
<com
/sun
/star
/embed
/NeedsRunningStateException.idl
>
78 #ifndef __com_sun_star_lang_IllegalArgumentException_idl__
79 #include
<com
/sun
/star
/lang
/IllegalArgumentException.idl
>
82 #ifndef __com_sun_star_util_XCloseable_idl__
83 #include
<com
/sun
/star
/util
/XCloseable.idl
>
88 //============================================================================
90 module com
{ module sun
{ module star
{ module embed
{
92 //============================================================================
93 /** represents common functionality for embedded objects.
95 published
interface XEmbeddedObject
99 //------------------------------------------------------------------------
100 /** represents common visualisation functionality for embedded objects.
102 interface XVisualObject
;
104 //------------------------------------------------------------------------
105 /** allows to detect class ID of the object.
107 interface XClassifiedObject
;
109 //------------------------------------------------------------------------
110 /** allows to get access to the component handled by the object.
112 interface XComponentSupplier
;
114 //------------------------------------------------------------------------
115 /** allows to be notified when object changes the state.
117 interface XStateChangeBroadcaster
;
119 //------------------------------------------------------------------------
120 /** allows to be notified about object related events.
122 interface ::com
::sun
::star
::document
::XEventBroadcaster
;
124 //------------------------------------------------------------------------
125 /** allows to control lifetime of the object.
127 interface ::com
::sun
::star
::util
::XCloseable
;
131 //------------------------------------------------------------------------
132 /** changes the state of the object to the requested one.
135 specifies the new state, can take values from the constant set
136 <type scope="com::sun::star::embed">EmbedStates</type>
138 @throws com::sun::star::embed::UnreachableStateException
139 the specified state can not be reached
141 @throws com::sun::star::embed::WrongStateException
142 in case object is in invalid state
144 @throws com::sun::star::uno::Exception
145 in case of other problems
147 void changeState
( [in] long nNewState
)
148 raises
( ::com
::sun
::star
::embed
::UnreachableStateException
,
149 ::com
::sun
::star
::embed
::WrongStateException
,
150 ::com
::sun
::star
::uno
::Exception
);
152 //------------------------------------------------------------------------
153 /** returns supported states for the object.
156 the sequence of states the object can be set to
158 @throws com::sun::star::embed::NeedsRunnignStateException
159 means that the object is in loaded state now and can be switched
160 to running state, other possible states can be detected only when
161 the object is not in loaded state any more
163 @throws com::sun::star::embed::WrongStateException
164 in case object is in invalid state
166 sequence
< long > getReachableStates
()
167 raises
( ::com
::sun
::star
::embed
::NeedsRunningStateException
,
168 ::com
::sun
::star
::embed
::WrongStateException
);
170 //------------------------------------------------------------------------
171 /** returns the current state of the object.
174 the current state of the object
176 @throws com::sun::star::embed::WrongStateException
177 in case object is in invalid state
179 long getCurrentState
()
180 raises
( ::com
::sun
::star
::embed
::WrongStateException
);
182 //------------------------------------------------------------------------
183 /** lets object perform an action referenced by nVerbID.
186 specifies an action to perform, can take values from
187 <type>EmbedVerbs</type>
189 @throws ::com::sun::star::lang::IllegalArgumentException
190 the verb is not supported
192 @throws com::sun::star::embed::WrongStateException
193 the object is in wrong state to call the function
195 @throws com::sun::star::embed::UnreachableStateException
196 the state, required by the verb, can not be reached
198 @throws com::sun::star::uno::Exception
199 in case of other problems
201 void doVerb
( [in] long nVerbID
)
202 raises
( ::com
::sun
::star
::lang
::IllegalArgumentException
,
203 ::com
::sun
::star
::embed
::WrongStateException
,
204 ::com
::sun
::star
::embed
::UnreachableStateException
,
205 ::com
::sun
::star
::uno
::Exception
);
207 //------------------------------------------------------------------------
208 /** returns supported verbs for the object.
211 the sequence of verbs the object supports
213 @throws com::sun::star::embed::NeedsRunnignStateException
214 means that the object is in loaded state now and can be switched
215 to running state, acceptable verbs can be detected only when the
216 object is not in loaded state any more
218 @throws com::sun::star::embed::WrongStateException
219 the object is in wrong state to call the function
221 sequence
< VerbDescriptor
> getSupportedVerbs
()
222 raises
( ::com
::sun
::star
::embed
::NeedsRunningStateException
,
223 ::com
::sun
::star
::embed
::WrongStateException
);
225 //------------------------------------------------------------------------
226 /** sets a connection to the container's client.
229 provides a reference to a client implementation
231 @throws com::sun::star::embed::WrongStateException
232 the object is in wrong state
234 void setClientSite
( [in] XEmbeddedClient xClient
)
235 raises
( ::com
::sun
::star
::embed
::WrongStateException
);
237 //------------------------------------------------------------------------
238 /** provides access to the internal link to the container client.
241 a reference to related container client if any is set
243 @throws com::sun::star::embed::WrongStateException
244 the object is in wrong state
246 XEmbeddedClient getClientSite
()
247 raises
( ::com
::sun
::star
::embed
::WrongStateException
);
249 //------------------------------------------------------------------------
250 /** updates object's representations.
252 @throws com::sun::star::embed::WrongStateException
253 the object is in wrong state to call the function
255 @throws com::sun::star::uno::Exception
256 in case problems detected
259 raises
( ::com
::sun
::star
::embed
::WrongStateException
,
260 ::com
::sun
::star
::uno
::Exception
);
262 //------------------------------------------------------------------------
263 /** specifies how often the object's representation should be updated.
266 the new update mode, can take values from
267 <type>EmbeddedUpdateModes</type>
269 @throws ::com::sun::star::embed::WrongStateException
270 the object is in wrong state
272 void setUpdateMode
( [in] long nMode
)
273 raises
( ::com
::sun
::star
::embed
::WrongStateException
);
275 //------------------------------------------------------------------------
276 /** retrieves the status of the object.
279 the aspect specifying the form of object representation
282 the value specifying the status of the object for specified aspect
283 can take values from <type>EmbedMisc</type> constant set
285 @throws com::sun::star::embed::WrongStateException
286 the object is in wrong state
288 hyper getStatus
( [in] hyper nAspect
)
289 raises
( ::com
::sun
::star
::embed
::WrongStateException
);
291 //-------------------------------------------------------------------------
292 /** provides object with the name of container document.
295 name of the container document
297 void setContainerName
( [in] string sName
);
301 //============================================================================