From ed5640d8b587fbcfed7dd7967f3de04b37a76f26 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sun, 7 Apr 2024 11:06:44 +0200 Subject: Adding upstream version 4:7.4.7. Signed-off-by: Daniel Baumann --- .../com/sun/star/drawing/framework/XResourceId.idl | 145 +++++++++++++++++++++ 1 file changed, 145 insertions(+) create mode 100644 offapi/com/sun/star/drawing/framework/XResourceId.idl (limited to 'offapi/com/sun/star/drawing/framework/XResourceId.idl') diff --git a/offapi/com/sun/star/drawing/framework/XResourceId.idl b/offapi/com/sun/star/drawing/framework/XResourceId.idl new file mode 100644 index 000000000..d2635ae76 --- /dev/null +++ b/offapi/com/sun/star/drawing/framework/XResourceId.idl @@ -0,0 +1,145 @@ +/* -*- 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_drawing_framework_XResourceId_idl__ +#define __com_sun_star_drawing_framework_XResourceId_idl__ + +#include +#include +#include + +module com { module sun { module star { module drawing { module framework { + +/** A resource id uses a set of URLs to unambiguously specify a resource of + the drawing framework. +

Resources of the drawing framework are panes, views, tool bars, and + command groups. One URL describes the type of the actual resource. A + sequence of URLs (typically one, sometimes two) specifies its anchor, + the resource it is bound to. The anchor typically is a pane (for + views), or it is empty (for panes).

+

The resource URL may be empty. In this case the anchor is empty, + too. Such an empty resource id does not describe a resource but rather + the absence of one. Instead of an empty XResourceId object + an empty reference can be used in many places.

+

The resource URL may have arguments that are passed to the factory + method on its creation. Arguments are only available through the + getFullResourceURL(). The getResourceURL() method strips them away.

+*/ +interface XResourceId +{ + /** Return the URL of the resource. Arguments supplied on creation are + stripped away. Use getFullResourceURL() to access them. + */ + string getResourceURL (); + + /** Return a URL object of the resource URL that may contain arguments. + */ + com::sun::star::util::URL getFullResourceURL (); + + /** Return whether there is a non-empty anchor URL. When this method + returns `FALSE` then getAnchorURLs() will return an empty list. + */ + boolean hasAnchor (); + + /** Return a new XResourceId that represents the anchor resource. + */ + XResourceId getAnchor (); + + /** Return the, possibly empty, list of anchor URLs. The URLs are + ordered so that the one in position 0 is the direct anchor of the + resource, while the one in position i+1 is the direct anchor of the + one in position i. + */ + sequence getAnchorURLs (); + + /** Return the type prefix of the resource URL. This includes all up to + and including the second slash. + */ + string getResourceTypePrefix (); + + /** Compare the called XResourceId object with the given + one. +

The two resource ids A and B are compared so that if A +

The algorithm for this comparison is quite simple. It uses a + double lexicographic ordering. On the lower level individual URLs + are compared via the lexicographic order defined on strings. On the + higher level two resource ids are compared via a lexicographic order + defined on the URLS. So when there are two resource ids A1.A2 + (A1 being the anchor of A2) and B1.B2 then A1.A2 + @param xId + The resource id to which the called resource id is compared. + @return + Returns 0 when the called resource id is + equivalent to the given resource id. Returns -1 or + +1 when the two compared resource ids differ. + */ + short compareTo ( + [in] XResourceId xId); + + /** Return whether the anchor of the called resource id object + represents the same resource as the given object. +

Note that not only the anchor of the given object is taken into + account. The whole object, including the resource URL, is + interpreted as anchor resource.

+ @param xAnchorId + The resource id of the anchor. + @param eMode + This mode specifies how the called resource has to be bound to + the given anchor in order to have this function return `TRUE`. +

If eMode is DIRECT then the anchor of the called resource id + has to be identical to the given anchor. If eMode is + INDIRECT then the given anchor has to be a part + of the anchor of the called resource. + */ + boolean isBoundTo ( + [in] XResourceId xAnchorId, + [in] AnchorBindingMode eMode); + + /** Return whether the anchor of the called resource id object + represents the same resource as the given anchor URL. This is a + convenience variant of the isBoundTo() function + that can also be seen as an optimization for the case that the + anchor consists of exactly one URL. + @param AnchorURL + The resource URL of the anchor. + @param eMode + This mode specifies how the called resource has to be bound to + the given anchor in order to have this function return. See the + description of isBoundTo() for more + information. + */ + boolean isBoundToURL ( + [in] string AnchorURL, + [in] AnchorBindingMode eMode); + + /** Return a copy of the called resource id. The caller becomes the + owner of the new object. + */ + XResourceId clone (); +}; + +}; }; }; }; }; // ::com::sun::star::drawing::framework + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ -- cgit v1.2.3