1/************************************************************** 2 * 3 * Licensed to the Apache Software Foundation (ASF) under one 4 * or more contributor license agreements. See the NOTICE file 5 * distributed with this work for additional information 6 * regarding copyright ownership. The ASF licenses this file 7 * to you under the Apache License, Version 2.0 (the 8 * "License"); you may not use this file except in compliance 9 * with the License. You may obtain a copy of the License at 10 * 11 * http://www.apache.org/licenses/LICENSE-2.0 12 * 13 * Unless required by applicable law or agreed to in writing, 14 * software distributed under the License is distributed on an 15 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16 * KIND, either express or implied. See the License for the 17 * specific language governing permissions and limitations 18 * under the License. 19 * 20 *************************************************************/ 21 22 23#ifndef __com_sun_star_embed_XEmbeddedObject_idl__ 24#define __com_sun_star_embed_XEmbeddedObject_idl__ 25 26#ifndef __com_sun_star_lang_XComponent_idl__ 27#include <com/sun/star/lang/XComponent.idl> 28#endif 29 30#ifndef __com_sun_star_embed_XEmbeddedClient_idl__ 31#include <com/sun/star/embed/XEmbeddedClient.idl> 32#endif 33 34#ifndef __com_sun_star_embed_XVisualObject_idl__ 35#include <com/sun/star/embed/XVisualObject.idl> 36#endif 37 38#ifndef __com_sun_star_embed_XClassifiedObject_idl__ 39#include <com/sun/star/embed/XClassifiedObject.idl> 40#endif 41 42#ifndef __com_sun_star_embed_XComponentSupplier_idl__ 43#include <com/sun/star/embed/XComponentSupplier.idl> 44#endif 45 46#ifndef __com_sun_star_embed_XStateChangeBroadcaster_idl__ 47#include <com/sun/star/embed/XStateChangeBroadcaster.idl> 48#endif 49 50#ifndef __com_sun_star_datatransfer_XTransferable_idl__ 51#include <com/sun/star/datatransfer/XTransferable.idl> 52#endif 53 54#ifndef __com_sun_star_document_XEventBroadcaster_idl__ 55#include <com/sun/star/document/XEventBroadcaster.idl> 56#endif 57 58#ifndef __com_sun_star_embed_VerbDescriptor_idl__ 59#include <com/sun/star/embed/VerbDescriptor.idl> 60#endif 61 62#ifndef __com_sun_star_embed_UnreachableStateException_idl__ 63#include <com/sun/star/embed/UnreachableStateException.idl> 64#endif 65 66#ifndef __com_sun_star_embed_WrongStateException_idl__ 67#include <com/sun/star/embed/WrongStateException.idl> 68#endif 69 70#ifndef __com_sun_star_embed_NeedsRunningStateException_idl__ 71#include <com/sun/star/embed/NeedsRunningStateException.idl> 72#endif 73 74#ifndef __com_sun_star_lang_IllegalArgumentException_idl__ 75#include <com/sun/star/lang/IllegalArgumentException.idl> 76#endif 77 78#ifndef __com_sun_star_util_XCloseable_idl__ 79#include <com/sun/star/util/XCloseable.idl> 80#endif 81 82 83 84//============================================================================ 85 86 module com { module sun { module star { module embed { 87 88//============================================================================ 89/** represents common functionality for embedded objects. 90 */ 91published interface XEmbeddedObject 92{ 93 // INTERFACES 94 // 95 //------------------------------------------------------------------------ 96 /** represents common visualisation functionality for embedded objects. 97 */ 98 interface XVisualObject; 99 100 //------------------------------------------------------------------------ 101 /** allows to detect class ID of the object. 102 */ 103 interface XClassifiedObject; 104 105 //------------------------------------------------------------------------ 106 /** allows to get access to the component handled by the object. 107 */ 108 interface XComponentSupplier; 109 110 //------------------------------------------------------------------------ 111 /** allows to be notified when object changes the state. 112 */ 113 interface XStateChangeBroadcaster; 114 115 //------------------------------------------------------------------------ 116 /** allows to be notified about object related events. 117 */ 118 interface ::com::sun::star::document::XEventBroadcaster; 119 120 //------------------------------------------------------------------------ 121 /** allows to control lifetime of the object. 122 */ 123 interface ::com::sun::star::util::XCloseable; 124 125 // METHODS 126 // 127 //------------------------------------------------------------------------ 128 /** changes the state of the object to the requested one. 129 130 @param nNewState 131 specifies the new state, can take values from the constant set 132 <type scope="com::sun::star::embed">EmbedStates</type> 133 134 @throws com::sun::star::embed::UnreachableStateException 135 the specified state can not be reached 136 137 @throws com::sun::star::embed::WrongStateException 138 in case object is in invalid state 139 140 @throws com::sun::star::uno::Exception 141 in case of other problems 142 */ 143 void changeState( [in] long nNewState ) 144 raises( ::com::sun::star::embed::UnreachableStateException, 145 ::com::sun::star::embed::WrongStateException, 146 ::com::sun::star::uno::Exception ); 147 148 //------------------------------------------------------------------------ 149 /** returns supported states for the object. 150 151 @returns 152 the sequence of states the object can be set to 153 154 @throws com::sun::star::embed::NeedsRunnignStateException 155 means that the object is in loaded state now and can be switched 156 to running state, other possible states can be detected only when 157 the object is not in loaded state any more 158 159 @throws com::sun::star::embed::WrongStateException 160 in case object is in invalid state 161 */ 162 sequence< long > getReachableStates() 163 raises( ::com::sun::star::embed::NeedsRunningStateException, 164 ::com::sun::star::embed::WrongStateException ); 165 166 //------------------------------------------------------------------------ 167 /** returns the current state of the object. 168 169 @returns 170 the current state of the object 171 172 @throws com::sun::star::embed::WrongStateException 173 in case object is in invalid state 174 */ 175 long getCurrentState() 176 raises( ::com::sun::star::embed::WrongStateException ); 177 178 //------------------------------------------------------------------------ 179 /** lets object perform an action referenced by nVerbID. 180 181 @param nVerbID 182 specifies an action to perform, can take values from 183 <type>EmbedVerbs</type> 184 185 @throws ::com::sun::star::lang::IllegalArgumentException 186 the verb is not supported 187 188 @throws com::sun::star::embed::WrongStateException 189 the object is in wrong state to call the function 190 191 @throws com::sun::star::embed::UnreachableStateException 192 the state, required by the verb, can not be reached 193 194 @throws com::sun::star::uno::Exception 195 in case of other problems 196 */ 197 void doVerb( [in] long nVerbID ) 198 raises( ::com::sun::star::lang::IllegalArgumentException, 199 ::com::sun::star::embed::WrongStateException, 200 ::com::sun::star::embed::UnreachableStateException, 201 ::com::sun::star::uno::Exception ); 202 203 //------------------------------------------------------------------------ 204 /** returns supported verbs for the object. 205 206 @returns 207 the sequence of verbs the object supports 208 209 @throws com::sun::star::embed::NeedsRunnignStateException 210 means that the object is in loaded state now and can be switched 211 to running state, acceptable verbs can be detected only when the 212 object is not in loaded state any more 213 214 @throws com::sun::star::embed::WrongStateException 215 the object is in wrong state to call the function 216 */ 217 sequence< VerbDescriptor > getSupportedVerbs() 218 raises( ::com::sun::star::embed::NeedsRunningStateException, 219 ::com::sun::star::embed::WrongStateException ); 220 221 //------------------------------------------------------------------------ 222 /** sets a connection to the container's client. 223 224 @param xClient 225 provides a reference to a client implementation 226 227 @throws com::sun::star::embed::WrongStateException 228 the object is in wrong state 229 */ 230 void setClientSite( [in] XEmbeddedClient xClient ) 231 raises( ::com::sun::star::embed::WrongStateException ); 232 233 //------------------------------------------------------------------------ 234 /** provides access to the internal link to the container client. 235 236 @returns 237 a reference to related container client if any is set 238 239 @throws com::sun::star::embed::WrongStateException 240 the object is in wrong state 241 */ 242 XEmbeddedClient getClientSite() 243 raises( ::com::sun::star::embed::WrongStateException ); 244 245 //------------------------------------------------------------------------ 246 /** updates object's representations. 247 248 @throws com::sun::star::embed::WrongStateException 249 the object is in wrong state to call the function 250 251 @throws com::sun::star::uno::Exception 252 in case problems detected 253 */ 254 void update() 255 raises( ::com::sun::star::embed::WrongStateException, 256 ::com::sun::star::uno::Exception ); 257 258 //------------------------------------------------------------------------ 259 /** specifies how often the object's representation should be updated. 260 261 @param nMode 262 the new update mode, can take values from 263 <type>EmbeddedUpdateModes</type> 264 265 @throws ::com::sun::star::embed::WrongStateException 266 the object is in wrong state 267 */ 268 void setUpdateMode( [in] long nMode ) 269 raises( ::com::sun::star::embed::WrongStateException ); 270 271 //------------------------------------------------------------------------ 272 /** retrieves the status of the object. 273 274 @param nAspect 275 the aspect specifying the form of object representation 276 277 @return 278 the value specifying the status of the object for specified aspect 279 can take values from <type>EmbedMisc</type> constant set 280 281 @throws com::sun::star::embed::WrongStateException 282 the object is in wrong state 283 */ 284 hyper getStatus( [in] hyper nAspect ) 285 raises( ::com::sun::star::embed::WrongStateException ); 286 287 //------------------------------------------------------------------------- 288 /** provides object with the name of container document. 289 290 @param sName 291 name of the container document 292 */ 293 void setContainerName( [in] string sName ); 294 295}; 296 297//============================================================================ 298 299}; }; }; }; 300 301#endif 302 303