Line data Source code
1 : /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 : /* vim: set ts=8 sts=2 et sw=2 tw=80: */
3 : /* This Source Code Form is subject to the terms of the Mozilla Public
4 : * License, v. 2.0. If a copy of the MPL was not distributed with this
5 : * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
6 :
7 : /*
8 : * This class wraps up the creation (and destruction) of the standard
9 : * set of atoms used by gklayout; the atoms are created when gklayout
10 : * is loaded and they are destroyed when gklayout is unloaded.
11 : */
12 :
13 : #include "nsGkAtoms.h"
14 : #include "nsStaticAtom.h"
15 :
16 : using namespace mozilla;
17 :
18 : // define storage for all atoms
19 : #define GK_ATOM(name_, value_) nsIAtom* nsGkAtoms::name_;
20 : #include "nsGkAtomList.h"
21 : #undef GK_ATOM
22 :
23 : #define GK_ATOM(name_, value_) NS_STATIC_ATOM_BUFFER(name_##_buffer, value_)
24 : #include "nsGkAtomList.h"
25 : #undef GK_ATOM
26 :
27 : static const nsStaticAtom GkAtoms_info[] = {
28 : #define GK_ATOM(name_, value_) NS_STATIC_ATOM(name_##_buffer, &nsGkAtoms::name_),
29 : #include "nsGkAtomList.h"
30 : #undef GK_ATOM
31 : };
32 :
33 3 : void nsGkAtoms::AddRefAtoms()
34 : {
35 3 : NS_RegisterStaticAtoms(GkAtoms_info);
36 3 : }
37 :
|