Bug 1769952 - Fix running raptor on a Win10-64 VM r=sparky
[gecko.git] / dom / xul / nsXULSortService.h
blobc087cb572a0b7e0f9503dc9ccf5b40bd6001c8db
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 /*
7 This sort service is used to sort content by attribute.
8 */
10 #ifndef nsXULSortService_h
11 #define nsXULSortService_h
13 #include "nsAString.h"
14 #include "nsError.h"
16 namespace mozilla {
18 namespace dom {
19 class Element;
20 } // namespace dom
22 /**
23 * Sort the contents of the widget containing <code>aNode</code>
24 * using <code>aSortKey</code> as the comparison key, and
25 * <code>aSortDirection</code> as the direction.
27 * @param aNode A node in the XUL widget whose children are to be sorted.
28 * @param aSortKey The value to be used as the comparison key.
29 * @param aSortHints One or more hints as to how to sort:
31 * ascending: to sort the contents in ascending order
32 * descending: to sort the contents in descending order
33 * comparecase: perform case sensitive comparisons
34 * integer: treat values as integers, non-integers are compared as strings
35 * twostate: don't allow the natural (unordered state)
37 nsresult XULWidgetSort(dom::Element* aNode, const nsAString& aSortKey,
38 const nsAString& aSortHints);
40 } // namespace mozilla
42 #endif // nsXULSortService_h