| 1 |
/* CALLY - The Clutter Accessibility Implementation Library |
| 2 |
* |
| 3 |
* Copyright (C) 2008 Igalia, S.L. |
| 4 |
* |
| 5 |
* Author: Alejandro PiƱeiro Iglesias <[email protected]> |
| 6 |
* |
| 7 |
* This library is free software; you can redistribute it and/or |
| 8 |
* modify it under the terms of the GNU Lesser General Public |
| 9 |
* License as published by the Free Software Foundation; either |
| 10 |
* version 2 of the License, or (at your option) any later version. |
| 11 |
* |
| 12 |
* This library is distributed in the hope that it will be useful, |
| 13 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 14 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
| 15 |
* Lesser General Public License for more details. |
| 16 |
* |
| 17 |
* You should have received a copy of the GNU Lesser General Public |
| 18 |
* License along with this library; if not, write to the |
| 19 |
* Free Software Foundation, Inc., 59 Temple Place - Suite 330, |
| 20 |
* Boston, MA 02111-1307, USA. |
| 21 |
*/ |
| 22 |
|
| 23 |
/** |
| 24 |
* SECTION:cally |
| 25 |
* @Title: Cally |
| 26 |
* @short_description: Cally initialization methods. |
| 27 |
* |
| 28 |
* Cally initialization methods. |
| 29 |
* |
| 30 |
*/ |
| 31 |
|
| 32 |
#ifdef HAVE_CONFIG_H |
| 33 |
#include "config.h" |
| 34 |
#endif |
| 35 |
|
| 36 |
#define CLUTTER_DISABLE_DEPRECATION_WARNINGS |
| 37 |
|
| 38 |
#include "cally.h" |
| 39 |
|
| 40 |
#include "cally-actor.h" |
| 41 |
#include "cally-group.h" |
| 42 |
#include "cally-stage.h" |
| 43 |
#include "cally-text.h" |
| 44 |
#include "cally-texture.h" |
| 45 |
#include "cally-rectangle.h" |
| 46 |
#include "cally-clone.h" |
| 47 |
|
| 48 |
#include "cally-factory.h" |
| 49 |
#include "cally-util.h" |
| 50 |
|
| 51 |
#include "clutter.h" |
| 52 |
|
| 53 |
#include "clutter-debug.h" |
| 54 |
#include "clutter-private.h" |
| 55 |
|
| 56 |
/* factories initialization*/ |
| 57 |
CALLY_ACCESSIBLE_FACTORY (CALLY_TYPE_ACTOR, cally_actor, cally_actor_new) |
| 58 |
CALLY_ACCESSIBLE_FACTORY (CALLY_TYPE_GROUP, cally_group, cally_group_new) |
| 59 |
CALLY_ACCESSIBLE_FACTORY (CALLY_TYPE_STAGE, cally_stage, cally_stage_new) |
| 60 |
CALLY_ACCESSIBLE_FACTORY (CALLY_TYPE_TEXT, cally_text, cally_text_new) |
| 61 |
CALLY_ACCESSIBLE_FACTORY (CALLY_TYPE_TEXTURE, cally_texture, cally_texture_new) |
| 62 |
CALLY_ACCESSIBLE_FACTORY (CALLY_TYPE_RECTANGLE, cally_rectangle, cally_rectangle_new) |
| 63 |
CALLY_ACCESSIBLE_FACTORY (CALLY_TYPE_CLONE, cally_clone, cally_clone_new) |
| 64 |
|
| 65 |
/** |
| 66 |
* cally_accessibility_init: |
| 67 |
* |
| 68 |
* Initializes the accessibility support. |
| 69 |
* |
| 70 |
* Return value: %TRUE if accessibility support has been correctly |
| 71 |
* initialized. |
| 72 |
* |
| 73 |
* Since: 1.4 |
| 74 |
*/ |
| 75 |
gboolean |
| 76 |
cally_accessibility_init (void) |
| 77 |
{ |
| 78 |
/* setting the factories */ |
| 79 |
CALLY_ACTOR_SET_FACTORY (CLUTTER_TYPE_ACTOR, cally_actor); |
| 80 |
CALLY_ACTOR_SET_FACTORY (CLUTTER_TYPE_GROUP, cally_group); |
| 81 |
CALLY_ACTOR_SET_FACTORY (CLUTTER_TYPE_STAGE, cally_stage); |
| 82 |
CALLY_ACTOR_SET_FACTORY (CLUTTER_TYPE_TEXT, cally_text); |
| 83 |
CALLY_ACTOR_SET_FACTORY (CLUTTER_TYPE_TEXTURE, cally_texture); |
| 84 |
CALLY_ACTOR_SET_FACTORY (CLUTTER_TYPE_RECTANGLE, cally_rectangle); |
| 85 |
CALLY_ACTOR_SET_FACTORY (CLUTTER_TYPE_CLONE, cally_clone); |
| 86 |
|
| 87 |
/* Initialize the CallyUtility class */ |
| 88 |
_cally_util_override_atk_util (); |
| 89 |
|
| 90 |
CLUTTER_NOTE (MISC, "Clutter Accessibility initialized"); |
| 91 |
|
| 92 |
return TRUE; |
| 93 |
} |
| 94 |
|
| 95 |
/** |
| 96 |
* cally_get_cally_initialized: |
| 97 |
* |
| 98 |
* Returns if the accessibility support using cally is enabled. |
| 99 |
* |
| 100 |
* Return value: %TRUE if accessibility support has been correctly |
| 101 |
* initialized. |
| 102 |
* |
| 103 |
* Since: 1.4 |
| 104 |
*/ |
| 105 |
gboolean cally_get_cally_initialized (void) |
| 106 |
{ |
| 107 |
return !g_strcmp0 (atk_get_toolkit_name (), "clutter"); |
| 108 |
} |