merged tag ooo/OOO330_m14
[LibreOffice.git] / offapi / com / sun / star / frame / XDesktop.idl
blob18f531703da5dc6c1a569d25d082a12fd22313e3
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_frame_XDesktop_idl__
28 #define __com_sun_star_frame_XDesktop_idl__
30 #ifndef __com_sun_star_uno_XInterface_idl__
31 #include <com/sun/star/uno/XInterface.idl>
32 #endif
34 #ifndef __com_sun_star_frame_XTerminateListener_idl__
35 #include <com/sun/star/frame/XTerminateListener.idl>
36 #endif
38 #ifndef __com_sun_star_container_XEnumerationAccess_idl__
39 #include <com/sun/star/container/XEnumerationAccess.idl>
40 #endif
42 #ifndef __com_sun_star_lang_XComponent_idl__
43 #include <com/sun/star/lang/XComponent.idl>
44 #endif
46 #ifndef __com_sun_star_frame_XFrame_idl__
47 #include <com/sun/star/frame/XFrame.idl>
48 #endif
51 //=============================================================================
53 module com { module sun { module star { module frame {
55 //=============================================================================
56 /** This is the main interface of a desktop service.
58 <p>
59 A desktop is an environment for components which can be viewed in
60 frames. Frames are like frames in HTML framesets. This does not imply
61 that a desktop can handle framesets; the frames may be top frames
62 only.
63 </p>
65 @see Desktop
67 published interface XDesktop: com::sun::star::uno::XInterface
69 //-------------------------------------------------------------------------
70 /** tries to terminate the desktop.
72 <p>
73 First, every terminate listener is called by his <member>XTerminateListener::queryTermination()</member> method.
74 Throwing of a <type>TerminationVetoException</type> can break the termination process and the listener how has
75 done that will be the new "controller" of the desktop lifetime. He should try to terminate it by himself after
76 his own processes will be finished.
77 If nobody disagree with the termination request, every listener will be called by his
78 <member>XTerminateListener::notifyTermination()</member> method.
79 </p>
81 @return
82 <TRUE/>if all listener agree with this request
83 <br>
84 <FALSE/>otherwise
86 @see XTerminateListener
87 @see TerminationVetoException
89 boolean terminate();
91 //-------------------------------------------------------------------------
92 /** registers an event listener to the desktop, which is called
93 when the desktop is queried to terminate, and when it really
94 terminates.
96 @param Listener
97 listener for termination events
99 @see XDesktop::removeTerminateListener()
101 [oneway] void addTerminateListener( [in] XTerminateListener Listener );
103 //-------------------------------------------------------------------------
104 /** unregisters an event listener for termination events.
106 @param Listener
107 listener which wish to be deregistered
109 @see XDesktop::addTerminateListener()
111 [oneway] void removeTerminateListener( [in] XTerminateListener Listener );
113 //-------------------------------------------------------------------------
114 /** provides read access to collection of all currently loaded components
115 inside the frame tree
118 The component is, by definition, the model of the control which
119 is loaded into a frame, or if no model exists, into the control
120 itself.
121 The service <type>Components</type> which is available from this
122 method is a collection of all components of the desktop which are open
123 within a frame of the desktop.
124 </p>
126 @returns
127 the collection of all components
129 @see Components
131 com::sun::star::container::XEnumerationAccess getComponents();
133 //-------------------------------------------------------------------------
134 /** provides read access to the component inside the tree which has the UI focus
137 Normally, the component is the model part of the
138 active component. If no model exists it is the active controller
139 (view) itself.
140 </p>
142 @returns
143 the component within the desktop environment which has the UI focus.
145 @see XDesktop::getCurrentFrame()
147 com::sun::star::lang::XComponent getCurrentComponent();
149 //-------------------------------------------------------------------------
150 /** provides read access to the frame wich contains the current component
152 @returns
153 the frame of the component which has the
154 UI focus within this desktop enviroment
156 @see XDesktop::getCurrentComponent()
158 XFrame getCurrentFrame();
161 //=============================================================================
163 }; }; }; };
165 #endif