tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

nsXULSortService.h (1387B)


      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/. */
      5 
      6 /*
      7  This sort service is used to sort content by attribute.
      8 */
      9 
     10 #ifndef nsXULSortService_h
     11 #define nsXULSortService_h
     12 
     13 #include "nsAString.h"
     14 #include "nsError.h"
     15 
     16 namespace mozilla {
     17 
     18 namespace dom {
     19 class Element;
     20 }  // namespace dom
     21 
     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.
     26 *
     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:
     30 *
     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)
     36 */
     37 nsresult XULWidgetSort(dom::Element* aNode, const nsAString& aSortKey,
     38                       const nsAString& aSortHints);
     39 
     40 }  // namespace mozilla
     41 
     42 #endif  // nsXULSortService_h