Mark internal symbol as private

A bunch of private symbols have escaped into the SO; let's rectify this
situation by using the '_' private prefix, or making them static as they
should have been.
This commit is contained in:
Emmanuele Bassi 2012-02-09 18:40:03 +00:00
parent 8ba0351c7a
commit 910b09d70a
8 changed files with 87 additions and 58 deletions

View File

@ -1367,7 +1367,7 @@ clutter_actor_show_all (ClutterActor *self)
klass->show_all (self);
}
void
static void
clutter_actor_real_hide (ClutterActor *self)
{
if (CLUTTER_ACTOR_IS_VISIBLE (self))
@ -1538,7 +1538,7 @@ clutter_actor_realize (ClutterActor *self)
clutter_actor_update_map_state (self, MAP_STATE_CHECK);
}
void
static void
clutter_actor_real_unrealize (ClutterActor *self)
{
/* we must be unmapped (implying our children are also unmapped) */
@ -2194,7 +2194,7 @@ clutter_actor_real_queue_redraw (ClutterActor *self,
}
}
void
static void
clutter_actor_real_queue_relayout (ClutterActor *self)
{
ClutterActorPrivate *priv = self->priv;

View File

@ -333,7 +333,7 @@ clutter_list_model_iter_next (ClutterModelIter *iter)
row += 1;
/* update the iterator and return it */
clutter_model_iter_set_row (CLUTTER_MODEL_ITER (iter_default), row);
_clutter_model_iter_set_row (CLUTTER_MODEL_ITER (iter_default), row);
iter_default->seq_iter = filter_next;
return CLUTTER_MODEL_ITER (iter_default);
@ -376,7 +376,7 @@ clutter_list_model_iter_prev (ClutterModelIter *iter)
row -= 1;
/* update the iterator and return it */
clutter_model_iter_set_row (CLUTTER_MODEL_ITER (iter_default), row);
_clutter_model_iter_set_row (CLUTTER_MODEL_ITER (iter_default), row);
iter_default->seq_iter = filter_prev;
return CLUTTER_MODEL_ITER (iter_default);
@ -761,7 +761,7 @@ clutter_list_model_new (guint n_columns,
g_return_val_if_fail (n_columns > 0, NULL);
model = g_object_new (CLUTTER_TYPE_LIST_MODEL, NULL);
clutter_model_set_n_columns (model, n_columns, TRUE, TRUE);
_clutter_model_set_n_columns (model, n_columns, TRUE, TRUE);
va_start (args, n_columns);
@ -770,15 +770,15 @@ clutter_list_model_new (guint n_columns,
GType type = va_arg (args, GType);
const gchar *name = va_arg (args, gchar*);
if (!clutter_model_check_type (type))
if (!_clutter_model_check_type (type))
{
g_warning ("%s: Invalid type %s\n", G_STRLOC, g_type_name (type));
g_object_unref (model);
return NULL;
}
clutter_model_set_column_type (model, i, type);
clutter_model_set_column_name (model, i, name);
_clutter_model_set_column_type (model, i, type);
_clutter_model_set_column_name (model, i, name);
}
va_end (args);
@ -810,19 +810,19 @@ clutter_list_model_newv (guint n_columns,
g_return_val_if_fail (n_columns > 0, NULL);
model = g_object_new (CLUTTER_TYPE_LIST_MODEL, NULL);
clutter_model_set_n_columns (model, n_columns, TRUE, TRUE);
_clutter_model_set_n_columns (model, n_columns, TRUE, TRUE);
for (i = 0; i < n_columns; i++)
{
if (!clutter_model_check_type (types[i]))
if (!_clutter_model_check_type (types[i]))
{
g_warning ("%s: Invalid type %s\n", G_STRLOC, g_type_name (types[i]));
g_object_unref (model);
return NULL;
}
clutter_model_set_column_type (model, i, types[i]);
clutter_model_set_column_name (model, i, names[i]);
_clutter_model_set_column_type (model, i, types[i]);
_clutter_model_set_column_name (model, i, names[i]);
}
return model;

View File

@ -102,6 +102,8 @@ static GSourceFuncs clock_funcs = {
NULL
};
#define clutter_master_clock_get_type _clutter_master_clock_get_type
G_DEFINE_TYPE (ClutterMasterClock, clutter_master_clock, G_TYPE_OBJECT);
/*

View File

@ -28,13 +28,13 @@
G_BEGIN_DECLS
#define CLUTTER_TYPE_MASTER_CLOCK (clutter_master_clock_get_type ())
#define CLUTTER_TYPE_MASTER_CLOCK (_clutter_master_clock_get_type ())
#define CLUTTER_MASTER_CLOCK(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), CLUTTER_TYPE_MASTER_CLOCK, ClutterMasterClock))
#define CLUTTER_IS_MASTER_CLOCK(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), CLUTTER_TYPE_MASTER_CLOCK))
typedef struct _ClutterMasterClock ClutterMasterClock;
GType clutter_master_clock_get_type (void) G_GNUC_CONST;
GType _clutter_master_clock_get_type (void) G_GNUC_CONST;
ClutterMasterClock *_clutter_master_clock_get_default (void);
void _clutter_master_clock_add_timeline (ClutterMasterClock *master_clock,

View File

@ -1,26 +1,51 @@
/*
* Clutter.
*
* An OpenGL based 'interactive canvas' library.
*
* Authored By Matthew Allum <mallum@openedhand.com>
* Neil Jagdish Patel <njp@o-hand.com>
* Emmanuele Bassi <ebassi@openedhand.com>
*
* Copyright (C) 2006 OpenedHand
*
* 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, see <http://www.gnu.org/licenses/>.
*/
#ifndef __CLUTTER_MODEL_PRIVATE_H__
#define __CLUTTER_MODEL_PRIVATE_H__
#include <glib.h>
#include "clutter-model.h"
#include <clutter/clutter-types.h>
#include <clutter/clutter-model.h>
G_BEGIN_DECLS
void clutter_model_set_n_columns (ClutterModel *model,
gint n_columns,
gboolean set_types,
gboolean set_names);
gboolean clutter_model_check_type (GType gtype);
void _clutter_model_set_n_columns (ClutterModel *model,
gint n_columns,
gboolean set_types,
gboolean set_names);
gboolean _clutter_model_check_type (GType gtype);
void clutter_model_set_column_type (ClutterModel *model,
gint column,
GType gtype);
void clutter_model_set_column_name (ClutterModel *model,
gint column,
const gchar *name);
void _clutter_model_set_column_type (ClutterModel *model,
gint column,
GType gtype);
void _clutter_model_set_column_name (ClutterModel *model,
gint column,
const gchar *name);
void clutter_model_iter_set_row (ClutterModelIter *iter,
guint row);
void _clutter_model_iter_set_row (ClutterModelIter *iter,
guint row);
G_END_DECLS

View File

@ -490,7 +490,7 @@ clutter_model_init (ClutterModel *self)
* type.
*/
gboolean
clutter_model_check_type (GType gtype)
_clutter_model_check_type (GType gtype)
{
gint i = 0;
static const GType type_list[] =
@ -625,14 +625,14 @@ clutter_model_set_custom_property (ClutterScriptable *scriptable,
columns = g_value_get_pointer (value);
n_columns = g_slist_length (columns);
clutter_model_set_n_columns (model, n_columns, TRUE, TRUE);
_clutter_model_set_n_columns (model, n_columns, TRUE, TRUE);
for (i = 0, l = columns; l != NULL; l = l->next, i++)
{
ColumnInfo *cinfo = l->data;
clutter_model_set_column_name (model, i, cinfo->name);
clutter_model_set_column_type (model, i, cinfo->type);
_clutter_model_set_column_name (model, i, cinfo->name);
_clutter_model_set_column_type (model, i, cinfo->type);
g_free (cinfo->name);
g_slice_free (ColumnInfo, cinfo);
@ -858,7 +858,7 @@ clutter_model_filter_iter (ClutterModel *model,
return priv->filter_func (model, iter, priv->filter_data);
}
/*
/*< private >
* clutter_model_set_n_columns:
* @model: a #ClutterModel
* @n_columns: number of columns
@ -872,10 +872,10 @@ clutter_model_filter_iter (ClutterModel *model,
* This function can only be called once.
*/
void
clutter_model_set_n_columns (ClutterModel *model,
gint n_columns,
gboolean set_types,
gboolean set_names)
_clutter_model_set_n_columns (ClutterModel *model,
gint n_columns,
gboolean set_types,
gboolean set_names)
{
ClutterModelPrivate *priv = model->priv;
@ -891,8 +891,8 @@ clutter_model_set_n_columns (ClutterModel *model,
priv->column_names = g_new0 (gchar*, n_columns);
}
/*
* clutter_model_set_column_type:
/*< private >
* _clutter_model_set_column_type:
* @model: a #ClutterModel
* @column: column index
* @gtype: type of the column
@ -900,17 +900,17 @@ clutter_model_set_n_columns (ClutterModel *model,
* Sets the type of @column inside @model
*/
void
clutter_model_set_column_type (ClutterModel *model,
gint column,
GType gtype)
_clutter_model_set_column_type (ClutterModel *model,
gint column,
GType gtype)
{
ClutterModelPrivate *priv = model->priv;
priv->column_types[column] = gtype;
}
/*
* clutter_model_set_column_name:
/*< private >
* _clutter_model_set_column_name:
* @model: a #ClutterModel
* @column: column index
* @name: name of the column, or %NULL
@ -918,9 +918,9 @@ clutter_model_set_column_type (ClutterModel *model,
* Sets the name of @column inside @model
*/
void
clutter_model_set_column_name (ClutterModel *model,
gint column,
const gchar *name)
_clutter_model_set_column_name (ClutterModel *model,
gint column,
const gchar *name)
{
ClutterModelPrivate *priv = model->priv;
@ -957,17 +957,17 @@ clutter_model_set_types (ClutterModel *model,
g_return_if_fail (priv->n_columns < 0 || priv->n_columns == n_columns);
g_return_if_fail (priv->column_types == NULL);
clutter_model_set_n_columns (model, n_columns, TRUE, FALSE);
_clutter_model_set_n_columns (model, n_columns, TRUE, FALSE);
for (i = 0; i < n_columns; i++)
{
if (!clutter_model_check_type (types[i]))
if (!_clutter_model_check_type (types[i]))
{
g_warning ("%s: Invalid type %s\n", G_STRLOC, g_type_name (types[i]));
return;
}
clutter_model_set_column_type (model, i, types[i]);
_clutter_model_set_column_type (model, i, types[i]);
}
}
@ -1001,10 +1001,10 @@ clutter_model_set_names (ClutterModel *model,
g_return_if_fail (priv->n_columns < 0 || priv->n_columns == n_columns);
g_return_if_fail (priv->column_names == NULL);
clutter_model_set_n_columns (model, n_columns, FALSE, TRUE);
_clutter_model_set_n_columns (model, n_columns, FALSE, TRUE);
for (i = 0; i < n_columns; i++)
clutter_model_set_column_name (model, i, names[i]);
_clutter_model_set_column_name (model, i, names[i]);
}
/**
@ -1792,8 +1792,8 @@ clutter_model_iter_real_get_row (ClutterModelIter *iter)
/* private function */
void
clutter_model_iter_set_row (ClutterModelIter *iter,
guint row)
_clutter_model_iter_set_row (ClutterModelIter *iter,
guint row)
{
iter->priv->row = row;
}

View File

@ -53,6 +53,8 @@ static void clutter_script_parser_object_end (JsonParser *parser,
JsonObject *object);
static void clutter_script_parser_parse_end (JsonParser *parser);
#define clutter_script_parser_get_type _clutter_script_parser_get_type
G_DEFINE_TYPE (ClutterScriptParser, clutter_script_parser, JSON_TYPE_PARSER);
static void

View File

@ -35,7 +35,7 @@
G_BEGIN_DECLS
#define CLUTTER_TYPE_SCRIPT_PARSER (clutter_script_parser_get_type ())
#define CLUTTER_TYPE_SCRIPT_PARSER (_clutter_script_parser_get_type ())
#define CLUTTER_SCRIPT_PARSER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), CLUTTER_TYPE_SCRIPT_PARSER, ClutterScriptParser))
#define CLUTTER_IS_SCRIPT_PARSER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), CLUTTER_TYPE_SCRIPT_PARSER))
@ -99,7 +99,7 @@ typedef struct {
void property_info_free (gpointer data);
GType clutter_script_parser_get_type (void) G_GNUC_CONST;
GType _clutter_script_parser_get_type (void) G_GNUC_CONST;
gboolean _clutter_script_parse_node (ClutterScript *script,
GValue *value,