Added `void *closure' argument.

2000-11-27  Martin Baulig  <martin@home-of-linux.org>

	* include/glibtop/glibtop-backend-info.h
	(glibtop_backend_close_func_t): Added `void *closure' argument.

	* include/glibtop/call-vector.h: Changed the second argument
	of all function in the call vector from `glibtop_backend *' to
	`void *closure'.
This commit is contained in:
Martin Baulig
2000-11-26 23:29:15 +00:00
committed by Martin Baulig
parent 8a78a93e0c
commit 478be2d170
15 changed files with 74 additions and 57 deletions

View File

@@ -44,6 +44,8 @@ struct _glibtop_backend_private
{
const glibtop_backend_info *info;
void *closure_data;
glibtop_server *server;
glibtop_backend_module *module;
};
@@ -260,3 +262,19 @@ glibtop_backend_get_server (glibtop_backend *backend)
return backend->_priv->server;
}
void *
glibtop_backend_get_closure_data (glibtop_backend *backend)
{
g_return_val_if_fail (GLIBTOP_IS_BACKEND (backend), NULL);
return backend->_priv->closure_data;
}
void
glibtop_backend_set_closure_data (glibtop_backend *backend, void *closure)
{
g_return_if_fail (GLIBTOP_IS_BACKEND (backend));
g_return_if_fail (backend->_priv->closure_data == NULL);
backend->_priv->closure_data = closure;
}