Bug 848401: switch from ReentrantMonitors and PR_Lock/Condvar to Monitor. Fix {pictu...
[gecko.git] / widget / nsIRwsService.idl
blob6e539083996eabad5c300ecf8cd0ae3a86ad8f69
1 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 /* This Source Code Form is subject to the terms of the Mozilla Public
3 * License, v. 2.0. If a copy of the MPL was not distributed with this
4 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
6 #include "nsISupports.idl"
8 [scriptable, uuid(74a1105c-7e5a-418e-9a57-a0fc8cc992fc)]
9 interface nsIRwsService : nsISupports
11 /**
12 * Retrieves the icon given to files with the specified extension
14 * @param aExt The extension without the leading dot;
15 * if the dot is present, it will be ignored.
16 * @param aNeedMini Retrieve a mini icon if true; a standard icon if false.
17 * @return An HPOINTER representing the icon.
19 unsigned long iconFromExtension(in string aExt, in boolean aNeedMini);
21 /**
22 * Retrieves the icon for a specific file or abstract object.
24 * @param aPath The fully-qualified name of the file or object.
25 * @param aAbstract False for filesystem objects, true for abstract objects.
26 * @param aNeedMini Retrieve a mini icon if true; a standard icon if false.
27 * @return An HPOINTER representing the icon.
29 unsigned long iconFromPath(in string aPath, in boolean aAbstract,
30 in boolean aNeedMini);
32 /**
33 * Retrieves a file or abstract object's icon using its WPS object handle.
35 * @param aHandle The file or object's WPS object handle.
36 * @param aNeedMini Retrieve a mini icon if true; a standard icon if false.
37 * @return An HPOINTER representing the icon.
39 unsigned long iconFromHandle(in unsigned long aHandle, in boolean aNeedMini);
41 /**
42 * Returns the name of the default handler for files with the
43 * specified extension. If the handler is a program, it also
44 * retrieves the handler's WPS object handle; if the default
45 * handler is provided by a WPS class, aHandle will be zero.
47 * @param aExt The extension without the leading dot;
48 * if the dot is present, it will be ignored.
49 * @param aHandle Returns a WPS object handle for programs or
50 * zero for class-based handlers.
51 * @return Either the unqualified title of a program or
52 * the name of the WPS class' default viewer/player.
54 AString handlerFromExtension(in string aExt, out unsigned long aHandle);
56 /**
57 * Returns the name of the default handler for a specific file.
58 * If the handler is a program, it also retrieves the handler's
59 * WPS object handle; if the default handler is provided by a
60 * WPS class, aHandle will be zero.
62 * @param aPath The fully-qualified name of a file.
63 * @param aHandle Returns a WPS object handle for programs or
64 * zero for class-based handlers.
65 * @return Either the unqualified title of a program or
66 * the name of the WPS class' default viewer/player.
68 AString handlerFromPath(in string aPath, out unsigned long aHandle);
70 /**
71 * Returns the unqualified title of the specified object.
73 * @param aHandle A WPS object handle.
74 * @return The title of this object.
76 AString titleFromHandle(in unsigned long aHandle);
78 /**
79 * Displays the WPS object menu for the specified file or abstract object.
81 * @param aPath The fully-qualified name of the file or object.
82 * @param aAbstract False for filesystem objects, true for abstract objects.
84 void menuFromPath(in string aPath, in boolean aAbstract);
86 /**
87 * Opens a file using the specified program file. The effect
88 * is identical to dropping the file on the program's icon.
90 * @param aFilePath The fully-qualified name of a file.
91 * @param aAppPath The fully-qualified name of a program file.
93 void openWithAppPath(in string aFilePath, in string aAppPath);
95 /**
96 * Opens a file using the specified WPS object handle. The effect
97 * is identical to dropping the file on the object's icon.
99 * @param aFilePath The fully-qualified name of a file.
100 * @param aAppHandle A WPS object handle.
102 void openWithAppHandle(in string aFilePath, in unsigned long aAppHandle);