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: XDesktop.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_frame_XDesktop_idl__
31 #define __com_sun_star_frame_XDesktop_idl__
33 #ifndef __com_sun_star_uno_XInterface_idl__
34 #include
<com
/sun
/star
/uno
/XInterface.idl
>
37 #ifndef __com_sun_star_frame_XTerminateListener_idl__
38 #include
<com
/sun
/star
/frame
/XTerminateListener.idl
>
41 #ifndef __com_sun_star_container_XEnumerationAccess_idl__
42 #include
<com
/sun
/star
/container
/XEnumerationAccess.idl
>
45 #ifndef __com_sun_star_lang_XComponent_idl__
46 #include
<com
/sun
/star
/lang
/XComponent.idl
>
49 #ifndef __com_sun_star_frame_XFrame_idl__
50 #include
<com
/sun
/star
/frame
/XFrame.idl
>
54 //=============================================================================
56 module com
{ module sun
{ module star
{ module frame
{
58 //=============================================================================
59 /** This is the main interface of a desktop service.
62 A desktop is an environment for components which can be viewed in
63 frames. Frames are like frames in HTML framesets. This does not imply
64 that a desktop can handle framesets; the frames may be top frames
70 published
interface XDesktop
: com
::sun
::star
::uno
::XInterface
72 //-------------------------------------------------------------------------
73 /** tries to terminate the desktop.
76 First, every terminate listener is called by his <member>XTerminateListener::queryTermination()</member> method.
77 Throwing of a <type>TerminationVetoException</type> can break the termination process and the listener how has
78 done that will be the new "controller" of the desktop lifetime. He should try to terminate it by himself after
79 his own processes will be finished.
80 If nobody disagree with the termination request, every listener will be called by his
81 <member>XTerminateListener::notifyTermination()</member> method.
85 <TRUE/>if all listener agree with this request
89 @see XTerminateListener
90 @see TerminationVetoException
94 //-------------------------------------------------------------------------
95 /** registers an event listener to the desktop, which is called
96 when the desktop is queried to terminate, and when it really
100 listener for termination events
102 @see XDesktop::removeTerminateListener()
104 [oneway
] void addTerminateListener
( [in] XTerminateListener Listener
);
106 //-------------------------------------------------------------------------
107 /** unregisters an event listener for termination events.
110 listener which wish to be deregistered
112 @see XDesktop::addTerminateListener()
114 [oneway
] void removeTerminateListener
( [in] XTerminateListener Listener
);
116 //-------------------------------------------------------------------------
117 /** provides read access to collection of all currently loaded components
118 inside the frame tree
121 The component is, by definition, the model of the control which
122 is loaded into a frame, or if no model exists, into the control
124 The service <type>Components</type> which is available from this
125 method is a collection of all components of the desktop which are open
126 within a frame of the desktop.
130 the collection of all components
134 com
::sun
::star
::container
::XEnumerationAccess getComponents
();
136 //-------------------------------------------------------------------------
137 /** provides read access to the component inside the tree which has the UI focus
140 Normally, the component is the model part of the
141 active component. If no model exists it is the active controller
146 the component within the desktop environment which has the UI focus.
148 @see XDesktop::getCurrentFrame()
150 com
::sun
::star
::lang
::XComponent getCurrentComponent
();
152 //-------------------------------------------------------------------------
153 /** provides read access to the frame wich contains the current component
156 the frame of the component which has the
157 UI focus within this desktop enviroment
159 @see XDesktop::getCurrentComponent()
161 XFrame getCurrentFrame
();
164 //=============================================================================