summaryrefslogtreecommitdiffstats
path: root/offapi/com/sun/star/frame/XDispatch.idl
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-07 09:06:44 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-07 09:06:44 +0000
commited5640d8b587fbcfed7dd7967f3de04b37a76f26 (patch)
tree7a5f7c6c9d02226d7471cb3cc8fbbf631b415303 /offapi/com/sun/star/frame/XDispatch.idl
parentInitial commit. (diff)
downloadlibreoffice-ed5640d8b587fbcfed7dd7967f3de04b37a76f26.tar.xz
libreoffice-ed5640d8b587fbcfed7dd7967f3de04b37a76f26.zip
Adding upstream version 4:7.4.7.upstream/4%7.4.7upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'offapi/com/sun/star/frame/XDispatch.idl')
-rw-r--r--offapi/com/sun/star/frame/XDispatch.idl156
1 files changed, 156 insertions, 0 deletions
diff --git a/offapi/com/sun/star/frame/XDispatch.idl b/offapi/com/sun/star/frame/XDispatch.idl
new file mode 100644
index 000000000..cbd7bcb2e
--- /dev/null
+++ b/offapi/com/sun/star/frame/XDispatch.idl
@@ -0,0 +1,156 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+#ifndef __com_sun_star_frame_XDispatch_idl__
+#define __com_sun_star_frame_XDispatch_idl__
+
+#include <com/sun/star/uno/XInterface.idl>
+#include <com/sun/star/util/URL.idl>
+#include <com/sun/star/beans/PropertyValue.idl>
+#include <com/sun/star/frame/XStatusListener.idl>
+
+
+
+module com { module sun { module star { module frame {
+
+/** serves state information of objects which can be connected to
+ controls (e.g. toolbox controls).
+
+ <p>
+ Each state change is to be broadcasted to all registered
+ status listeners. The first notification should be performed
+ synchronously from XDispatch::addStatusListener();
+ if not, controls may flicker. State listener must be aware of this
+ synchronous notification.
+ </p>
+
+ <p>
+ The state consists of enabled/disabled and a short descriptive text
+ of the function (e.g. "undo insert character"). It is to be broadcasted
+ whenever this state changes or the control should re-get the value
+ for the URL it is connected to. Additionally, a context-switch-event
+ is to be broadcasted whenever the object may be out of scope,
+ to force the state listener to requery the XDispatch.
+ </p>
+
+ @see Frame
+ @see FeatureStateEvent
+ */
+published interface XDispatch: com::sun::star::uno::XInterface
+{
+ /** dispatches (executes) a URL
+
+ <p>
+ It is only allowed to dispatch URLs for which this XDispatch
+ was explicitly queried. Additional arguments ("'#..." or "?...") are allowed.
+ </p>
+
+ @param URL
+ fully parsed URL describing the feature which should be dispatched (=executed)
+
+ @param Arguments
+ optional arguments for this request
+ (see com::sun::star::document::MediaDescriptor)
+ They depend on the real implementation of the dispatch object.
+
+ Controlling synchronous or asynchronous mode happens via
+ readonly boolean Flag SynchronMode
+
+ <p>
+ By default, and absent any arguments, "SynchronMode" is
+ considered `FALSE` and the execution is performed
+ asynchronously (i.e. dispatch() returns immediately, and
+ the action is performed in the background). But when set
+ to `TRUE`, dispatch() processes the request synchronously
+ - this call will block until it has finished.
+ </p>
+
+ <i>some code for a click-handler (Java)</i>
+ @code{.java}
+ void myOnClick(String sURL,String sTargetFrame,
+ com.sun.star.beans.PropertyValue[] lArguments)
+ {
+ com.sun.star.util.URL[] aURL = new com.sun.star.util.URL[1];
+ aURL[0] = new com.sun.star.util.URL();
+ aURL[0].Complete = sURL;
+
+ com.sun.star.util.XURLTransformer xParser =
+ (com.sun.star.util.XURLTransformer)UnoRuntime.queryInterface(
+ com.sun.star.util.XURLTransformer.class,
+ mxServiceManager.createInstance("com.sun.star.util.URLTransformer"));
+
+ xParser.parseStrict(aURL);
+
+ com.sun.star.frame.XDispatch xDispatcher =
+ mxFrame.queryDispatch(aURL[0], sTargetFrame, com.sun.star.frame.FrameSearchFlag.GLOBAL);
+
+ if(xDispatcher!=null)
+ xDispatcher.dispatch(aURL[0], lArguments);
+ }
+ @endcode
+ */
+ void dispatch(
+ [in] com::sun::star::util::URL URL,
+ [in] sequence<com::sun::star::beans::PropertyValue> Arguments);
+
+ /** registers a listener of a control for a specific URL
+ at this object to receive status events.
+
+ <p>
+ It is only allowed to register URLs for which this XDispatch
+ was explicitly queried. Additional arguments ("#..." or "?...") will be ignored.
+ </p>
+ Note: Notifications can't be guaranteed! This will be a part of interface XNotifyingDispatch.
+
+ @param Control
+ listener that wishes to be informed
+
+ @param URL
+ the URL (without additional arguments) the listener wishes to be registered for.
+ A listener can be registered for more than one URL at the same time.
+
+ @see XStatusListener
+ @see XDispatch::removeStatusListener()
+ */
+ void addStatusListener(
+ [in] XStatusListener Control,
+ [in] com::sun::star::util::URL URL);
+
+ /** unregisters a listener from a control.
+
+ @param Control
+ listener that wishes to be unregistered
+
+ @param URL
+ URL the listener was registered for.
+ Additional arguments ("#..." or "?...") will be ignored.
+
+ @see XStatusListener
+ @see XDispatch::addStatusListener()
+ */
+ void removeStatusListener(
+ [in] XStatusListener Control,
+ [in] com::sun::star::util::URL URL);
+};
+
+
+}; }; }; };
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */