2010-06-14 16:05:57 +00:00
|
|
|
/* CALLY - The Clutter Accessibility Implementation Library
|
|
|
|
*
|
|
|
|
* Copyright (C) 2008 Igalia, S.L.
|
|
|
|
*
|
|
|
|
* Author: Alejandro Piñeiro Iglesias <apinheiro@igalia.com>
|
|
|
|
*
|
|
|
|
* This library is free software; you can redistribute it and/or
|
|
|
|
* modify it under the terms of the GNU Lesser General Public
|
|
|
|
* License as published by the Free Software Foundation; either
|
|
|
|
* version 2 of the License, or (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This library is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
|
|
* Lesser General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU Lesser General Public
|
|
|
|
* License along with this library; if not, write to the
|
|
|
|
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
|
|
|
* Boston, MA 02111-1307, USA.
|
|
|
|
*/
|
|
|
|
|
2010-07-06 14:51:24 +00:00
|
|
|
/**
|
|
|
|
* SECTION:cally
|
|
|
|
* @Title: Cally
|
|
|
|
* @short_description: Cally initialization methods.
|
|
|
|
*
|
|
|
|
* Cally initialization methods.
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
2010-07-05 13:43:18 +00:00
|
|
|
#ifdef HAVE_CONFIG_H
|
|
|
|
#include "config.h"
|
|
|
|
#endif
|
|
|
|
|
2012-05-03 10:34:57 +00:00
|
|
|
#define CLUTTER_DISABLE_DEPRECATION_WARNINGS
|
|
|
|
|
2010-06-14 16:05:57 +00:00
|
|
|
#include "cally.h"
|
|
|
|
|
2010-04-26 17:33:49 +00:00
|
|
|
#include "cally-actor.h"
|
|
|
|
#include "cally-stage.h"
|
|
|
|
#include "cally-text.h"
|
|
|
|
#include "cally-clone.h"
|
|
|
|
|
2010-06-14 16:05:57 +00:00
|
|
|
#include "cally-factory.h"
|
|
|
|
#include "cally-util.h"
|
|
|
|
|
2010-07-05 13:43:18 +00:00
|
|
|
#include "clutter.h"
|
|
|
|
|
2010-04-26 17:33:49 +00:00
|
|
|
#include "clutter-debug.h"
|
2010-07-05 13:43:18 +00:00
|
|
|
#include "clutter-private.h"
|
2010-06-14 16:05:57 +00:00
|
|
|
|
|
|
|
static int cally_initialized = FALSE;
|
|
|
|
|
|
|
|
/* factories initialization*/
|
|
|
|
CALLY_ACCESSIBLE_FACTORY (CALLY_TYPE_ACTOR, cally_actor, cally_actor_new)
|
|
|
|
CALLY_ACCESSIBLE_FACTORY (CALLY_TYPE_STAGE, cally_stage, cally_stage_new)
|
|
|
|
CALLY_ACCESSIBLE_FACTORY (CALLY_TYPE_TEXT, cally_text, cally_text_new)
|
|
|
|
CALLY_ACCESSIBLE_FACTORY (CALLY_TYPE_CLONE, cally_clone, cally_clone_new)
|
|
|
|
|
2010-04-26 17:33:49 +00:00
|
|
|
/**
|
2010-07-06 14:51:24 +00:00
|
|
|
* cally_accessibility_init:
|
2010-04-26 17:33:49 +00:00
|
|
|
*
|
|
|
|
* Initializes the accessibility support.
|
|
|
|
*
|
|
|
|
* Return value: %TRUE if accessibility support has been correctly
|
|
|
|
* initialized.
|
|
|
|
*
|
|
|
|
* Since: 1.4
|
|
|
|
*/
|
|
|
|
gboolean
|
|
|
|
cally_accessibility_init (void)
|
2010-06-14 16:05:57 +00:00
|
|
|
{
|
|
|
|
if (cally_initialized)
|
2010-04-26 17:33:49 +00:00
|
|
|
return TRUE;
|
2010-06-14 16:05:57 +00:00
|
|
|
|
|
|
|
cally_initialized = TRUE;
|
|
|
|
|
|
|
|
/* setting the factories */
|
|
|
|
CALLY_ACTOR_SET_FACTORY (CLUTTER_TYPE_ACTOR, cally_actor);
|
|
|
|
CALLY_ACTOR_SET_FACTORY (CLUTTER_TYPE_STAGE, cally_stage);
|
|
|
|
CALLY_ACTOR_SET_FACTORY (CLUTTER_TYPE_TEXT, cally_text);
|
|
|
|
CALLY_ACTOR_SET_FACTORY (CLUTTER_TYPE_CLONE, cally_clone);
|
|
|
|
|
|
|
|
/* Initialize the CallyUtility class */
|
|
|
|
g_type_class_unref (g_type_class_ref (CALLY_TYPE_UTIL));
|
|
|
|
|
2010-04-26 17:33:49 +00:00
|
|
|
CLUTTER_NOTE (MISC, "Clutter Accessibility initialized");
|
2010-06-14 16:05:57 +00:00
|
|
|
|
2010-04-26 17:33:49 +00:00
|
|
|
return cally_initialized;
|
2010-06-14 16:05:57 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
2010-04-26 17:33:49 +00:00
|
|
|
* cally_get_cally_initialized:
|
|
|
|
*
|
|
|
|
* Returns if the accessibility support using cally is enabled.
|
2010-06-14 16:05:57 +00:00
|
|
|
*
|
2010-04-26 17:33:49 +00:00
|
|
|
* Return value: %TRUE if accessibility support has been correctly
|
|
|
|
* initialized.
|
|
|
|
*
|
|
|
|
* Since: 1.4
|
|
|
|
*/
|
|
|
|
gboolean cally_get_cally_initialized (void)
|
2010-06-14 16:05:57 +00:00
|
|
|
{
|
2010-04-26 17:33:49 +00:00
|
|
|
return cally_initialized;
|
2010-06-14 16:05:57 +00:00
|
|
|
}
|