1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/content/base/src/nsGkAtoms.cpp Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,36 @@ 1.4 +/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ 1.5 +/* This Source Code Form is subject to the terms of the Mozilla Public 1.6 + * License, v. 2.0. If a copy of the MPL was not distributed with this 1.7 + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ 1.8 + 1.9 +/* 1.10 + * This class wraps up the creation (and destruction) of the standard 1.11 + * set of atoms used by gklayout; the atoms are created when gklayout 1.12 + * is loaded and they are destroyed when gklayout is unloaded. 1.13 + */ 1.14 + 1.15 +#include "nsGkAtoms.h" 1.16 +#include "nsStaticAtom.h" 1.17 + 1.18 +using namespace mozilla; 1.19 + 1.20 +// define storage for all atoms 1.21 +#define GK_ATOM(name_, value_) nsIAtom* nsGkAtoms::name_; 1.22 +#include "nsGkAtomList.h" 1.23 +#undef GK_ATOM 1.24 + 1.25 +#define GK_ATOM(name_, value_) NS_STATIC_ATOM_BUFFER(name_##_buffer, value_) 1.26 +#include "nsGkAtomList.h" 1.27 +#undef GK_ATOM 1.28 + 1.29 +static const nsStaticAtom GkAtoms_info[] = { 1.30 +#define GK_ATOM(name_, value_) NS_STATIC_ATOM(name_##_buffer, &nsGkAtoms::name_), 1.31 +#include "nsGkAtomList.h" 1.32 +#undef GK_ATOM 1.33 +}; 1.34 + 1.35 +void nsGkAtoms::AddRefAtoms() 1.36 +{ 1.37 + NS_RegisterStaticAtoms(GkAtoms_info); 1.38 +} 1.39 +