1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
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 .
22 module com
{ module sun
{ module star
{ module frame
{
24 /** This is the main interface of a desktop service.
27 A desktop is an environment for components which can be viewed in
28 frames. Frames are like frames in HTML framesets. This does not imply
29 that a desktop can handle framesets; the frames may be top frames
35 published
interface XDesktop
: com
::sun
::star
::uno
::XInterface
37 /** tries to terminate the desktop.
40 First, every terminate listener is called by his XTerminateListener::queryTermination() method.
41 Throwing of a TerminationVetoException can break the termination process and the listener how has
42 done that will be the new "controller" of the desktop lifetime. He should try to terminate it by himself after
43 his own processes will be finished.
44 If nobody disagree with the termination request, every listener will be called by his
45 XTerminateListener::notifyTermination() method.
49 `TRUE` If all listeners agree with this request
53 @see XTerminateListener
54 @see TerminationVetoException
58 /** registers an event listener to the desktop, which is called
59 when the desktop is queried to terminate, and when it really
63 listener for termination events
65 @see XDesktop::removeTerminateListener()
67 void addTerminateListener
( [in] XTerminateListener Listener
);
69 /** unregisters an event listener for termination events.
72 listener which wishes to be deregistered
74 @see XDesktop::addTerminateListener()
76 void removeTerminateListener
( [in] XTerminateListener Listener
);
78 /** provides read access to collection of all currently loaded components
82 The component is, by definition, the model of the control which
83 is loaded into a frame, or if no model exists, into the control
85 The service Components which is available from this
86 method is a collection of all components of the desktop which are open
87 within a frame of the desktop.
91 the collection of all components
95 com
::sun
::star
::container
::XEnumerationAccess getComponents
();
97 /** provides read access to the component inside the tree which has the UI focus
100 Normally, the component is the model part of the
101 active component. If no model exists it is the active controller
106 the component within the desktop environment which has the UI focus.
108 @see XDesktop::getCurrentFrame()
110 com
::sun
::star
::lang
::XComponent getCurrentComponent
();
112 /** provides read access to the frame which contains the current component
115 the frame of the component which has the
116 UI focus within this desktop environment
118 @see XDesktop::getCurrentComponent()
120 XFrame getCurrentFrame
();
126 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */