Version 5.2.6.1, tag libreoffice-5.2.6.1
[LibreOffice.git] / offapi / com / sun / star / embed / XEmbeddedObject.idl
blob9e9de8b6486d82d48b8ceb9965f4755108ae5e4c
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 * This file incorporates work covered by the following license notice:
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
19 #ifndef __com_sun_star_embed_XEmbeddedObject_idl__
20 #define __com_sun_star_embed_XEmbeddedObject_idl__
22 #include <com/sun/star/lang/XComponent.idl>
23 #include <com/sun/star/embed/XEmbeddedClient.idl>
24 #include <com/sun/star/embed/XVisualObject.idl>
25 #include <com/sun/star/embed/XClassifiedObject.idl>
26 #include <com/sun/star/embed/XComponentSupplier.idl>
27 #include <com/sun/star/embed/XStateChangeBroadcaster.idl>
28 #include <com/sun/star/datatransfer/XTransferable.idl>
29 #include <com/sun/star/document/XEventBroadcaster.idl>
30 #include <com/sun/star/embed/VerbDescriptor.idl>
31 #include <com/sun/star/embed/UnreachableStateException.idl>
32 #include <com/sun/star/embed/WrongStateException.idl>
33 #include <com/sun/star/embed/NeedsRunningStateException.idl>
34 #include <com/sun/star/lang/IllegalArgumentException.idl>
35 #include <com/sun/star/util/XCloseable.idl>
40 module com { module sun { module star { module embed {
42 /** represents common functionality for embedded objects.
44 published interface XEmbeddedObject
46 // INTERFACES
47 /** represents common visualization functionality for embedded objects.
49 interface XVisualObject;
51 /** allows to detect class ID of the object.
53 interface XClassifiedObject;
55 /** allows to get access to the component handled by the object.
57 interface XComponentSupplier;
59 /** allows to be notified when object changes the state.
61 interface XStateChangeBroadcaster;
63 /** allows to be notified about object related events.
65 interface ::com::sun::star::document::XEventBroadcaster;
67 /** allows to control lifetime of the object.
69 interface ::com::sun::star::util::XCloseable;
71 // METHODS
72 /** changes the state of the object to the requested one.
74 @param nNewState
75 specifies the new state, can take values from the constant set
76 com::sun::star::embed::EmbedStates
78 @throws com::sun::star::embed::UnreachableStateException
79 the specified state can not be reached
81 @throws com::sun::star::embed::WrongStateException
82 in case object is in invalid state
84 @throws com::sun::star::uno::Exception
85 in case of other problems
87 void changeState( [in] long nNewState )
88 raises( ::com::sun::star::embed::UnreachableStateException,
89 ::com::sun::star::embed::WrongStateException,
90 ::com::sun::star::uno::Exception );
92 /** returns supported states for the object.
94 @returns
95 the sequence of states the object can be set to
97 @throws com::sun::star::embed::NeedsRunnignStateException
98 means that the object is in loaded state now and can be switched
99 to running state, other possible states can be detected only when
100 the object is not in loaded state any more
102 @throws com::sun::star::embed::WrongStateException
103 in case object is in invalid state
105 sequence< long > getReachableStates()
106 raises( ::com::sun::star::embed::NeedsRunningStateException,
107 ::com::sun::star::embed::WrongStateException );
109 /** returns the current state of the object.
111 @returns
112 the current state of the object
114 @throws com::sun::star::embed::WrongStateException
115 in case object is in invalid state
117 long getCurrentState()
118 raises( ::com::sun::star::embed::WrongStateException );
120 /** lets object perform an action referenced by nVerbID.
122 @param nVerbID
123 specifies an action to perform, can take values from
124 EmbedVerbs
126 @throws ::com::sun::star::lang::IllegalArgumentException
127 the verb is not supported
129 @throws com::sun::star::embed::WrongStateException
130 the object is in wrong state to call the function
132 @throws com::sun::star::embed::UnreachableStateException
133 the state, required by the verb, can not be reached
135 @throws com::sun::star::uno::Exception
136 in case of other problems
138 void doVerb( [in] long nVerbID )
139 raises( ::com::sun::star::lang::IllegalArgumentException,
140 ::com::sun::star::embed::WrongStateException,
141 ::com::sun::star::embed::UnreachableStateException,
142 ::com::sun::star::uno::Exception );
144 /** returns supported verbs for the object.
146 @returns
147 the sequence of verbs the object supports
149 @throws com::sun::star::embed::NeedsRunnignStateException
150 means that the object is in loaded state now and can be switched
151 to running state, acceptable verbs can be detected only when the
152 object is not in loaded state any more
154 @throws com::sun::star::embed::WrongStateException
155 the object is in wrong state to call the function
157 sequence< VerbDescriptor > getSupportedVerbs()
158 raises( ::com::sun::star::embed::NeedsRunningStateException,
159 ::com::sun::star::embed::WrongStateException );
161 /** sets a connection to the container's client.
163 @param xClient
164 provides a reference to a client implementation
166 @throws com::sun::star::embed::WrongStateException
167 the object is in wrong state
169 void setClientSite( [in] XEmbeddedClient xClient )
170 raises( ::com::sun::star::embed::WrongStateException );
172 /** provides access to the internal link to the container client.
174 @returns
175 a reference to related container client if any is set
177 @throws com::sun::star::embed::WrongStateException
178 the object is in wrong state
180 XEmbeddedClient getClientSite()
181 raises( ::com::sun::star::embed::WrongStateException );
183 /** updates object's representations.
185 @throws com::sun::star::embed::WrongStateException
186 the object is in wrong state to call the function
188 @throws com::sun::star::uno::Exception
189 in case problems detected
191 void update()
192 raises( ::com::sun::star::embed::WrongStateException,
193 ::com::sun::star::uno::Exception );
195 /** specifies how often the object's representation should be updated.
197 @param nMode
198 the new update mode, can take values from
199 EmbeddedUpdateModes
201 @throws ::com::sun::star::embed::WrongStateException
202 the object is in wrong state
204 void setUpdateMode( [in] long nMode )
205 raises( ::com::sun::star::embed::WrongStateException );
207 /** retrieves the status of the object.
209 @param nAspect
210 the aspect specifying the form of object representation
212 @return
213 the value specifying the status of the object for specified aspect
214 can take values from EmbedMisc constant set
216 @throws com::sun::star::embed::WrongStateException
217 the object is in wrong state
219 hyper getStatus( [in] hyper nAspect )
220 raises( ::com::sun::star::embed::WrongStateException );
222 /** provides object with the name of container document.
224 @param sName
225 name of the container document
227 void setContainerName( [in] string sName );
232 }; }; }; };
234 #endif
236 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */