Renamed Xedit -> Xed (avoid name clash with x11-apps's xedit)

This commit is contained in:
Clement Lefebvre
2016-02-04 09:20:42 +00:00
parent c8dd785ea8
commit 16eacdc3f4
487 changed files with 104410 additions and 104432 deletions

View File

@@ -1,24 +1,24 @@
# C plugin loader
loaderdir = $(libdir)/xedit/plugin-loaders
loaderdir = $(libdir)/xed/plugin-loaders
AM_CPPFLAGS = \
-I$(top_srcdir) \
$(XEDIT_CFLAGS) \
$(XED_CFLAGS) \
$(WARN_CFLAGS) \
$(DISABLE_DEPRECATED_CFLAGS) \
-DXEDIT_LOCALEDIR=\""$(prefix)/$(DATADIRNAME)/locale"\"
-DXED_LOCALEDIR=\""$(prefix)/$(DATADIRNAME)/locale"\"
loader_LTLIBRARIES = libcloader.la
NOINST_H_FILES = \
xedit-plugin-loader-c.h
xed-plugin-loader-c.h
libcloader_la_SOURCES = \
xedit-plugin-loader-c.c \
xed-plugin-loader-c.c \
$(NOINST_H_FILES)
libcloader_la_LDFLAGS = $(LOADER_LIBTOOL_FLAGS)
libcloader_la_LIBADD = $(XEDIT_LIBS)
libcloader_la_LIBADD = $(XED_LIBS)
-include $(top_srcdir)/git.mk

View File

@@ -1,6 +1,6 @@
/*
* xedit-plugin-loader-c.c
* This file is part of xedit
* xed-plugin-loader-c.c
* This file is part of xed
*
* Copyright (C) 2008 - Jesse van den Kieboom
*
@@ -20,46 +20,46 @@
* Boston, MA 02110-1301, USA.
*/
#include "xedit-plugin-loader-c.h"
#include <xedit/xedit-object-module.h>
#include "xed-plugin-loader-c.h"
#include <xed/xed-object-module.h>
#define XEDIT_PLUGIN_LOADER_C_GET_PRIVATE(object)(G_TYPE_INSTANCE_GET_PRIVATE((object), XEDIT_TYPE_PLUGIN_LOADER_C, XeditPluginLoaderCPrivate))
#define XED_PLUGIN_LOADER_C_GET_PRIVATE(object)(G_TYPE_INSTANCE_GET_PRIVATE((object), XED_TYPE_PLUGIN_LOADER_C, XedPluginLoaderCPrivate))
struct _XeditPluginLoaderCPrivate
struct _XedPluginLoaderCPrivate
{
GHashTable *loaded_plugins;
};
static void xedit_plugin_loader_iface_init (gpointer g_iface, gpointer iface_data);
static void xed_plugin_loader_iface_init (gpointer g_iface, gpointer iface_data);
XEDIT_PLUGIN_LOADER_REGISTER_TYPE (XeditPluginLoaderC, xedit_plugin_loader_c, G_TYPE_OBJECT, xedit_plugin_loader_iface_init);
XED_PLUGIN_LOADER_REGISTER_TYPE (XedPluginLoaderC, xed_plugin_loader_c, G_TYPE_OBJECT, xed_plugin_loader_iface_init);
static const gchar *
xedit_plugin_loader_iface_get_id (void)
xed_plugin_loader_iface_get_id (void)
{
return "C";
}
static XeditPlugin *
xedit_plugin_loader_iface_load (XeditPluginLoader *loader,
XeditPluginInfo *info,
static XedPlugin *
xed_plugin_loader_iface_load (XedPluginLoader *loader,
XedPluginInfo *info,
const gchar *path)
{
XeditPluginLoaderC *cloader = XEDIT_PLUGIN_LOADER_C (loader);
XeditObjectModule *module;
XedPluginLoaderC *cloader = XED_PLUGIN_LOADER_C (loader);
XedObjectModule *module;
const gchar *module_name;
XeditPlugin *result;
XedPlugin *result;
module = (XeditObjectModule *)g_hash_table_lookup (cloader->priv->loaded_plugins, info);
module_name = xedit_plugin_info_get_module_name (info);
module = (XedObjectModule *)g_hash_table_lookup (cloader->priv->loaded_plugins, info);
module_name = xed_plugin_info_get_module_name (info);
if (module == NULL)
{
/* For now we force all modules to be resident */
module = xedit_object_module_new (module_name,
module = xed_object_module_new (module_name,
path,
"register_xedit_plugin",
"register_xed_plugin",
TRUE);
/* Infos are available for all the lifetime of the loader.
@@ -70,7 +70,7 @@ xedit_plugin_loader_iface_load (XeditPluginLoader *loader,
if (!g_type_module_use (G_TYPE_MODULE (module)))
{
g_warning ("Could not load plugin module: %s", xedit_plugin_info_get_name (info));
g_warning ("Could not load plugin module: %s", xed_plugin_info_get_name (info));
return NULL;
}
@@ -78,14 +78,14 @@ xedit_plugin_loader_iface_load (XeditPluginLoader *loader,
/* TODO: for now we force data-dir-name = module-name... if needed we can
* add a datadir field to the plugin descriptor file.
*/
result = (XeditPlugin *)xedit_object_module_new_object (module,
result = (XedPlugin *)xed_object_module_new_object (module,
"install-dir", path,
"data-dir-name", module_name,
NULL);
if (!result)
{
g_warning ("Could not create plugin object: %s", xedit_plugin_info_get_name (info));
g_warning ("Could not create plugin object: %s", xed_plugin_info_get_name (info));
g_type_module_unuse (G_TYPE_MODULE (module));
return NULL;
@@ -97,10 +97,10 @@ xedit_plugin_loader_iface_load (XeditPluginLoader *loader,
}
static void
xedit_plugin_loader_iface_unload (XeditPluginLoader *loader,
XeditPluginInfo *info)
xed_plugin_loader_iface_unload (XedPluginLoader *loader,
XedPluginInfo *info)
{
//XeditPluginLoaderC *cloader = XEDIT_PLUGIN_LOADER_C (loader);
//XedPluginLoaderC *cloader = XED_PLUGIN_LOADER_C (loader);
/* this is a no-op, since the type module will be properly unused as
the last reference to the plugin dies. When the plugin is activated
@@ -108,20 +108,20 @@ xedit_plugin_loader_iface_unload (XeditPluginLoader *loader,
}
static void
xedit_plugin_loader_iface_init (gpointer g_iface,
xed_plugin_loader_iface_init (gpointer g_iface,
gpointer iface_data)
{
XeditPluginLoaderInterface *iface = (XeditPluginLoaderInterface *)g_iface;
XedPluginLoaderInterface *iface = (XedPluginLoaderInterface *)g_iface;
iface->get_id = xedit_plugin_loader_iface_get_id;
iface->load = xedit_plugin_loader_iface_load;
iface->unload = xedit_plugin_loader_iface_unload;
iface->get_id = xed_plugin_loader_iface_get_id;
iface->load = xed_plugin_loader_iface_load;
iface->unload = xed_plugin_loader_iface_unload;
}
static void
xedit_plugin_loader_c_finalize (GObject *object)
xed_plugin_loader_c_finalize (GObject *object)
{
XeditPluginLoaderC *cloader = XEDIT_PLUGIN_LOADER_C (object);
XedPluginLoaderC *cloader = XED_PLUGIN_LOADER_C (object);
GList *infos;
GList *item;
@@ -132,9 +132,9 @@ xedit_plugin_loader_c_finalize (GObject *object)
for (item = infos; item; item = item->next)
{
XeditPluginInfo *info = (XeditPluginInfo *)item->data;
XedPluginInfo *info = (XedPluginInfo *)item->data;
if (xedit_plugin_info_is_active (info))
if (xed_plugin_info_is_active (info))
{
g_warning ("There are still C plugins loaded during destruction");
break;
@@ -145,38 +145,38 @@ xedit_plugin_loader_c_finalize (GObject *object)
g_hash_table_destroy (cloader->priv->loaded_plugins);
G_OBJECT_CLASS (xedit_plugin_loader_c_parent_class)->finalize (object);
G_OBJECT_CLASS (xed_plugin_loader_c_parent_class)->finalize (object);
}
static void
xedit_plugin_loader_c_class_init (XeditPluginLoaderCClass *klass)
xed_plugin_loader_c_class_init (XedPluginLoaderCClass *klass)
{
GObjectClass *object_class = G_OBJECT_CLASS (klass);
object_class->finalize = xedit_plugin_loader_c_finalize;
object_class->finalize = xed_plugin_loader_c_finalize;
g_type_class_add_private (object_class, sizeof (XeditPluginLoaderCPrivate));
g_type_class_add_private (object_class, sizeof (XedPluginLoaderCPrivate));
}
static void
xedit_plugin_loader_c_class_finalize (XeditPluginLoaderCClass *klass)
xed_plugin_loader_c_class_finalize (XedPluginLoaderCClass *klass)
{
}
static void
xedit_plugin_loader_c_init (XeditPluginLoaderC *self)
xed_plugin_loader_c_init (XedPluginLoaderC *self)
{
self->priv = XEDIT_PLUGIN_LOADER_C_GET_PRIVATE (self);
self->priv = XED_PLUGIN_LOADER_C_GET_PRIVATE (self);
/* loaded_plugins maps XeditPluginInfo to a XeditObjectModule */
/* loaded_plugins maps XedPluginInfo to a XedObjectModule */
self->priv->loaded_plugins = g_hash_table_new (g_direct_hash,
g_direct_equal);
}
XeditPluginLoaderC *
xedit_plugin_loader_c_new ()
XedPluginLoaderC *
xed_plugin_loader_c_new ()
{
GObject *loader = g_object_new (XEDIT_TYPE_PLUGIN_LOADER_C, NULL);
GObject *loader = g_object_new (XED_TYPE_PLUGIN_LOADER_C, NULL);
return XEDIT_PLUGIN_LOADER_C (loader);
return XED_PLUGIN_LOADER_C (loader);
}

View File

@@ -0,0 +1,60 @@
/*
* xed-plugin-loader-c.h
* This file is part of xed
*
* Copyright (C) 2008 - Jesse van den Kieboom
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program 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 General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor,
* Boston, MA 02110-1301, USA.
*/
#ifndef __XED_PLUGIN_LOADER_C_H__
#define __XED_PLUGIN_LOADER_C_H__
#include <xed/xed-plugin-loader.h>
G_BEGIN_DECLS
#define XED_TYPE_PLUGIN_LOADER_C (xed_plugin_loader_c_get_type ())
#define XED_PLUGIN_LOADER_C(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), XED_TYPE_PLUGIN_LOADER_C, XedPluginLoaderC))
#define XED_PLUGIN_LOADER_C_CONST(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), XED_TYPE_PLUGIN_LOADER_C, XedPluginLoaderC const))
#define XED_PLUGIN_LOADER_C_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), XED_TYPE_PLUGIN_LOADER_C, XedPluginLoaderCClass))
#define XED_IS_PLUGIN_LOADER_C(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), XED_TYPE_PLUGIN_LOADER_C))
#define XED_IS_PLUGIN_LOADER_C_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), XED_TYPE_PLUGIN_LOADER_C))
#define XED_PLUGIN_LOADER_C_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), XED_TYPE_PLUGIN_LOADER_C, XedPluginLoaderCClass))
typedef struct _XedPluginLoaderC XedPluginLoaderC;
typedef struct _XedPluginLoaderCClass XedPluginLoaderCClass;
typedef struct _XedPluginLoaderCPrivate XedPluginLoaderCPrivate;
struct _XedPluginLoaderC {
GObject parent;
XedPluginLoaderCPrivate *priv;
};
struct _XedPluginLoaderCClass {
GObjectClass parent_class;
};
GType xed_plugin_loader_c_get_type (void) G_GNUC_CONST;
XedPluginLoaderC *xed_plugin_loader_c_new(void);
/* All the loaders must implement this function */
G_MODULE_EXPORT GType register_xed_plugin_loader (GTypeModule * module);
G_END_DECLS
#endif /* __XED_PLUGIN_LOADER_C_H__ */

View File

@@ -1,60 +0,0 @@
/*
* xedit-plugin-loader-c.h
* This file is part of xedit
*
* Copyright (C) 2008 - Jesse van den Kieboom
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program 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 General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor,
* Boston, MA 02110-1301, USA.
*/
#ifndef __XEDIT_PLUGIN_LOADER_C_H__
#define __XEDIT_PLUGIN_LOADER_C_H__
#include <xedit/xedit-plugin-loader.h>
G_BEGIN_DECLS
#define XEDIT_TYPE_PLUGIN_LOADER_C (xedit_plugin_loader_c_get_type ())
#define XEDIT_PLUGIN_LOADER_C(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), XEDIT_TYPE_PLUGIN_LOADER_C, XeditPluginLoaderC))
#define XEDIT_PLUGIN_LOADER_C_CONST(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), XEDIT_TYPE_PLUGIN_LOADER_C, XeditPluginLoaderC const))
#define XEDIT_PLUGIN_LOADER_C_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), XEDIT_TYPE_PLUGIN_LOADER_C, XeditPluginLoaderCClass))
#define XEDIT_IS_PLUGIN_LOADER_C(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), XEDIT_TYPE_PLUGIN_LOADER_C))
#define XEDIT_IS_PLUGIN_LOADER_C_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), XEDIT_TYPE_PLUGIN_LOADER_C))
#define XEDIT_PLUGIN_LOADER_C_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), XEDIT_TYPE_PLUGIN_LOADER_C, XeditPluginLoaderCClass))
typedef struct _XeditPluginLoaderC XeditPluginLoaderC;
typedef struct _XeditPluginLoaderCClass XeditPluginLoaderCClass;
typedef struct _XeditPluginLoaderCPrivate XeditPluginLoaderCPrivate;
struct _XeditPluginLoaderC {
GObject parent;
XeditPluginLoaderCPrivate *priv;
};
struct _XeditPluginLoaderCClass {
GObjectClass parent_class;
};
GType xedit_plugin_loader_c_get_type (void) G_GNUC_CONST;
XeditPluginLoaderC *xedit_plugin_loader_c_new(void);
/* All the loaders must implement this function */
G_MODULE_EXPORT GType register_xedit_plugin_loader (GTypeModule * module);
G_END_DECLS
#endif /* __XEDIT_PLUGIN_LOADER_C_H__ */