Bug 432986, bump 1.8 staging to Fx2.0.0.15 (in anticipation), r=bhearsum
[mozilla-1.9.git] / widget / public / nsIRwsService.idl
blob30e5e2bae24a74fd2ed1f120400e8587fe362bb8
1 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 /* ***** BEGIN LICENSE BLOCK *****
3 * Version: MPL 1.1/GPL 2.0/LGPL 2.1
5 * The contents of this file are subject to the Mozilla Public License Version
6 * 1.1 (the "License"); you may not use this file except in compliance with
7 * the License. You may obtain a copy of the License at
8 * http://www.mozilla.org/MPL/
10 * Software distributed under the License is distributed on an "AS IS" basis,
11 * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
12 * for the specific language governing rights and limitations under the
13 * License.
15 * The Original Code is OS/2 Remote Workplace Server interface.
17 * The Initial Developer of the Original Code is
18 * Richard L Walsh.
19 * Portions created by the Initial Developer are Copyright (C) 2005
20 * the Initial Developer. All Rights Reserved.
22 * Contributor(s):
24 * Alternatively, the contents of this file may be used under the terms of
25 * either of the GNU General Public License Version 2 or later (the "GPL"),
26 * or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
27 * in which case the provisions of the GPL or the LGPL are applicable instead
28 * of those above. If you wish to allow use of your version of this file only
29 * under the terms of either the GPL or the LGPL, and not to allow others to
30 * use your version of this file under the terms of the MPL, indicate your
31 * decision by deleting the provisions above and replace them with the notice
32 * and other provisions required by the GPL or the LGPL. If you do not delete
33 * the provisions above, a recipient may use your version of this file under
34 * the terms of any one of the MPL, the GPL or the LGPL.
36 * ***** END LICENSE BLOCK ***** */
38 #include "nsISupports.idl"
40 [scriptable, uuid(74a1105c-7e5a-418e-9a57-a0fc8cc992fc)]
41 interface nsIRwsService : nsISupports
43 /**
44 * Retrieves the icon given to files with the specified extension
46 * @param aExt The extension without the leading dot;
47 * if the dot is present, it will be ignored.
48 * @param aNeedMini Retrieve a mini icon if true; a standard icon if false.
49 * @return An HPOINTER representing the icon.
51 unsigned long iconFromExtension(in string aExt, in boolean aNeedMini);
53 /**
54 * Retrieves the icon for a specific file or abstract object.
56 * @param aPath The fully-qualified name of the file or object.
57 * @param aAbstract False for filesystem objects, true for abstract objects.
58 * @param aNeedMini Retrieve a mini icon if true; a standard icon if false.
59 * @return An HPOINTER representing the icon.
61 unsigned long iconFromPath(in string aPath, in boolean aAbstract,
62 in boolean aNeedMini);
64 /**
65 * Retrieves a file or abstract object's icon using its WPS object handle.
67 * @param aHandle The file or object's WPS object handle.
68 * @param aNeedMini Retrieve a mini icon if true; a standard icon if false.
69 * @return An HPOINTER representing the icon.
71 unsigned long iconFromHandle(in unsigned long aHandle, in boolean aNeedMini);
73 /**
74 * Returns the name of the default handler for files with the
75 * specified extension. If the handler is a program, it also
76 * retrieves the handler's WPS object handle; if the default
77 * handler is provided by a WPS class, aHandle will be zero.
79 * @param aExt The extension without the leading dot;
80 * if the dot is present, it will be ignored.
81 * @param aHandle Returns a WPS object handle for programs or
82 * zero for class-based handlers.
83 * @return Either the unqualified title of a program or
84 * the name of the WPS class' default viewer/player.
86 AString handlerFromExtension(in string aExt, out unsigned long aHandle);
88 /**
89 * Returns the name of the default handler for a specific file.
90 * If the handler is a program, it also retrieves the handler's
91 * WPS object handle; if the default handler is provided by a
92 * WPS class, aHandle will be zero.
94 * @param aPath The fully-qualified name of a file.
95 * @param aHandle Returns a WPS object handle for programs or
96 * zero for class-based handlers.
97 * @return Either the unqualified title of a program or
98 * the name of the WPS class' default viewer/player.
100 AString handlerFromPath(in string aPath, out unsigned long aHandle);
103 * Returns the unqualified title of the specified object.
105 * @param aHandle A WPS object handle.
106 * @return The title of this object.
108 AString titleFromHandle(in unsigned long aHandle);
111 * Displays the WPS object menu for the specified file or abstract object.
113 * @param aPath The fully-qualified name of the file or object.
114 * @param aAbstract False for filesystem objects, true for abstract objects.
116 void menuFromPath(in string aPath, in boolean aAbstract);
119 * Opens a file using the specified program file. The effect
120 * is identical to dropping the file on the program's icon.
122 * @param aFilePath The fully-qualified name of a file.
123 * @param aAppPath The fully-qualified name of a program file.
125 void openWithAppPath(in string aFilePath, in string aAppPath);
128 * Opens a file using the specified WPS object handle. The effect
129 * is identical to dropping the file on the object's icon.
131 * @param aFilePath The fully-qualified name of a file.
132 * @param aAppHandle A WPS object handle.
134 void openWithAppHandle(in string aFilePath, in unsigned long aAppHandle);