~ubuntu-branches/ubuntu/precise/kompozer/precise

« back to all changes in this revision

Viewing changes to mozilla/accessible/src/atk/nsMai.h

  • Committer: Bazaar Package Importer
  • Author(s): Anthony Yarusso
  • Date: 2007-08-27 01:11:03 UTC
  • Revision ID: james.westby@ubuntu.com-20070827011103-2jgf4s6532gqu2ka
Tags: upstream-0.7.10
ImportĀ upstreamĀ versionĀ 0.7.10

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
 
2
/* vim:expandtab:shiftwidth=4:tabstop=4:
 
3
 */
 
4
/* ***** BEGIN LICENSE BLOCK *****
 
5
 * Version: NPL 1.1/GPL 2.0/LGPL 2.1
 
6
 *
 
7
 *
 
8
 * The contents of this file are subject to the Mozilla Public
 
9
 * License Version 1.1 (the "License"); you may not use this file
 
10
 * except in compliance with the License. You may obtain a copy of
 
11
 * the License at http://www.mozilla.org/MPL/
 
12
 *
 
13
 * Software distributed under the License is distributed on an "AS
 
14
 * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
 
15
 * implied. See the License for the specific language governing
 
16
 * rights and limitations under the License.
 
17
 *
 
18
 * The Original Code is mozilla.org code.
 
19
 *
 
20
 * The Initial Developer of the Original Code is Sun Microsystems, Inc.
 
21
 * Portions created by Sun Microsystems are Copyright (C) 2002 Sun
 
22
 * Microsystems, Inc. All Rights Reserved.
 
23
 *
 
24
 * Original Author: Bolian Yin (bolian.yin@sun.com)
 
25
 *
 
26
 * Contributor(s): John Sun (john.sun@sun.com)
 
27
 *
 
28
 * Alternatively, the contents of this file may be used under the terms of
 
29
 * either the GNU General Public License Version 2 or later (the "GPL"), or
 
30
 * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
 
31
 * in which case the provisions of the GPL or the LGPL are applicable instead
 
32
 * of those above. If you wish to allow use of your version of this file only
 
33
 * under the terms of either the GPL or the LGPL, and not to allow others to
 
34
 * use your version of this file under the terms of the NPL, indicate your
 
35
 * decision by deleting the provisions above and replace them with the notice
 
36
 * and other provisions required by the GPL or the LGPL. If you do not delete
 
37
 * the provisions above, a recipient may use your version of this file under
 
38
 * the terms of any one of the NPL, the GPL or the LGPL.
 
39
 *
 
40
 * ***** END LICENSE BLOCK ***** */
 
41
 
 
42
#ifndef __NS_MAI_H__
 
43
#define __NS_MAI_H__
 
44
 
 
45
#include <atk/atk.h>
 
46
#include <glib.h>
 
47
#include <glib-object.h>
 
48
 
 
49
#include "nsAccessibleWrap.h"
 
50
 
 
51
extern PRLogModuleInfo *gMaiLog;
 
52
 
 
53
#ifdef MAI_LOGGING
 
54
#define MAI_LOG(level, args) \
 
55
PR_BEGIN_MACRO \
 
56
    if (!gMaiLog) { \
 
57
        gMaiLog = PR_NewLogModule("Mai"); \
 
58
        PR_ASSERT(gMaiLog); \
 
59
    } \
 
60
    PR_LOG(gMaiLog, (level), args); \
 
61
PR_END_MACRO
 
62
#else
 
63
#define MAI_LOG(level, args) 
 
64
#endif
 
65
 
 
66
#define MAI_LOG_DEBUG(args) MAI_LOG(PR_LOG_DEBUG, args)
 
67
#define MAI_LOG_WARNING(args) MAI_LOG(PR_LOG_WARNING, args)
 
68
#define MAI_LOG_ERROR(args) MAI_LOG(PR_LOG_ERROR, args)
 
69
 
 
70
#define MAI_TYPE_ATK_OBJECT             (mai_atk_object_get_type ())
 
71
#define MAI_ATK_OBJECT(obj)             (G_TYPE_CHECK_INSTANCE_CAST ((obj), \
 
72
                                         MAI_TYPE_ATK_OBJECT, MaiAtkObject))
 
73
#define MAI_ATK_OBJECT_CLASS(klass)     (G_TYPE_CHECK_CLASS_CAST ((klass), \
 
74
                                         MAI_TYPE_ATK_OBJECT, \
 
75
                                         MaiAtkObjectClass))
 
76
#define MAI_IS_ATK_OBJECT(obj)          (G_TYPE_CHECK_INSTANCE_TYPE ((obj), \
 
77
                                         MAI_TYPE_ATK_OBJECT))
 
78
#define MAI_IS_ATK_OBJECT_CLASS(klass)  (G_TYPE_CHECK_CLASS_TYPE ((klass), \
 
79
                                         MAI_TYPE_ATK_OBJECT))
 
80
#define MAI_ATK_OBJECT_GET_CLASS(obj)   (G_TYPE_INSTANCE_GET_CLASS ((obj), \
 
81
                                         MAI_TYPE_ATK_OBJECT, \
 
82
                                         MaiAtkObjectClass))
 
83
GType mai_atk_object_get_type(void);
 
84
nsresult CheckMaiAtkObject(AtkObject *aAtkObj);
 
85
nsAccessibleWrap *GetAccessibleWrap(AtkObject *aAtkObj);
 
86
 
 
87
#endif /* __NS_MAI_H__ */