Back to index

lightning-sunbird  0.9+nobinonly
nsMai.h
Go to the documentation of this file.
00001 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
00002 /* vim:expandtab:shiftwidth=4:tabstop=4:
00003  */
00004 /* ***** BEGIN LICENSE BLOCK *****
00005  * Version: NPL 1.1/GPL 2.0/LGPL 2.1
00006  *
00007  *
00008  * The contents of this file are subject to the Mozilla Public
00009  * License Version 1.1 (the "License"); you may not use this file
00010  * except in compliance with the License. You may obtain a copy of
00011  * the License at http://www.mozilla.org/MPL/
00012  *
00013  * Software distributed under the License is distributed on an "AS
00014  * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
00015  * implied. See the License for the specific language governing
00016  * rights and limitations under the License.
00017  *
00018  * The Original Code is mozilla.org code.
00019  *
00020  * The Initial Developer of the Original Code is Sun Microsystems, Inc.
00021  * Portions created by Sun Microsystems are Copyright (C) 2002 Sun
00022  * Microsystems, Inc. All Rights Reserved.
00023  *
00024  * Original Author: Bolian Yin (bolian.yin@sun.com)
00025  *
00026  * Contributor(s): John Sun (john.sun@sun.com)
00027  *
00028  * Alternatively, the contents of this file may be used under the terms of
00029  * either the GNU General Public License Version 2 or later (the "GPL"), or
00030  * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
00031  * in which case the provisions of the GPL or the LGPL are applicable instead
00032  * of those above. If you wish to allow use of your version of this file only
00033  * under the terms of either the GPL or the LGPL, and not to allow others to
00034  * use your version of this file under the terms of the NPL, indicate your
00035  * decision by deleting the provisions above and replace them with the notice
00036  * and other provisions required by the GPL or the LGPL. If you do not delete
00037  * the provisions above, a recipient may use your version of this file under
00038  * the terms of any one of the NPL, the GPL or the LGPL.
00039  *
00040  * ***** END LICENSE BLOCK ***** */
00041 
00042 #ifndef __NS_MAI_H__
00043 #define __NS_MAI_H__
00044 
00045 #include <atk/atk.h>
00046 #include <glib.h>
00047 #include <glib-object.h>
00048 
00049 #include "nsAccessibleWrap.h"
00050 
00051 extern PRLogModuleInfo *gMaiLog;
00052 
00053 #ifdef MAI_LOGGING
00054 #define MAI_LOG(level, args) \
00055 PR_BEGIN_MACRO \
00056     if (!gMaiLog) { \
00057         gMaiLog = PR_NewLogModule("Mai"); \
00058         PR_ASSERT(gMaiLog); \
00059     } \
00060     PR_LOG(gMaiLog, (level), args); \
00061 PR_END_MACRO
00062 #else
00063 #define MAI_LOG(level, args) 
00064 #endif
00065 
00066 #define MAI_LOG_DEBUG(args) MAI_LOG(PR_LOG_DEBUG, args)
00067 #define MAI_LOG_WARNING(args) MAI_LOG(PR_LOG_WARNING, args)
00068 #define MAI_LOG_ERROR(args) MAI_LOG(PR_LOG_ERROR, args)
00069 
00070 #define MAI_TYPE_ATK_OBJECT             (mai_atk_object_get_type ())
00071 #define MAI_ATK_OBJECT(obj)             (G_TYPE_CHECK_INSTANCE_CAST ((obj), \
00072                                          MAI_TYPE_ATK_OBJECT, MaiAtkObject))
00073 #define MAI_ATK_OBJECT_CLASS(klass)     (G_TYPE_CHECK_CLASS_CAST ((klass), \
00074                                          MAI_TYPE_ATK_OBJECT, \
00075                                          MaiAtkObjectClass))
00076 #define MAI_IS_ATK_OBJECT(obj)          (G_TYPE_CHECK_INSTANCE_TYPE ((obj), \
00077                                          MAI_TYPE_ATK_OBJECT))
00078 #define MAI_IS_ATK_OBJECT_CLASS(klass)  (G_TYPE_CHECK_CLASS_TYPE ((klass), \
00079                                          MAI_TYPE_ATK_OBJECT))
00080 #define MAI_ATK_OBJECT_GET_CLASS(obj)   (G_TYPE_INSTANCE_GET_CLASS ((obj), \
00081                                          MAI_TYPE_ATK_OBJECT, \
00082                                          MaiAtkObjectClass))
00083 GType mai_atk_object_get_type(void);
00084 nsresult CheckMaiAtkObject(AtkObject *aAtkObj);
00085 nsAccessibleWrap *GetAccessibleWrap(AtkObject *aAtkObj);
00086 
00087 #endif /* __NS_MAI_H__ */