Moved the typedef to backend.h.

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

	* include/glibtop/call-vector.h (glibtop_call_vector): Moved
	the typedef to backend.h.

	* include/glibtop/backend.h (glibtop_open_backend_l): Renamed
	to glibtop_open_backend(), removed the `glibtop_client *'
	argument and made the `GError *' argument non-optional.

	* include/glibtop/glibtop-client.h
	(glibtop_client_add_backend, glibtop_client_remove_backend): New
	functions to add/remove a glibtop_backend to a glibtop_client.
	(glibtop_client_open_backend): New convenient function; calls
	glibtop_open_backend() and glibtop_client_add_backend().
This commit is contained in:
Martin Baulig
2000-11-26 18:07:11 +00:00
committed by Martin Baulig
parent 6e4f80b8e2
commit dfd678599f
18 changed files with 129 additions and 93 deletions

View File

@@ -26,12 +26,15 @@
#include <glibtop.h>
#include <glibtop/backend.h>
#include <glibtop/cpu.h>
int
main (int argc, char *argv [])
{
glibtop_client *client;
glibtop_backend *backend_common;
glibtop_backend *backend_sysdeps;
/* glibtop_cpu cpu; */
g_type_init ();
@@ -39,15 +42,17 @@ main (int argc, char *argv [])
client = glibtop_client_new ();
backend_common = glibtop_open_backend_l (client, "glibtop-backend-common",
0, NULL, NULL);
backend_common = glibtop_client_open_backend
(client, "glibtop-backend-common", 0, NULL);
g_message (G_STRLOC ": backend = %p", backend_common);
backend_sysdeps = glibtop_open_backend_l (client, "glibtop-backend-sysdeps",
0, NULL, NULL);
backend_sysdeps = glibtop_client_open_backend
(client, "glibtop-backend-sysdeps", 0, NULL);
g_message (G_STRLOC ": backend = %p", backend_sysdeps);
/* glibtop_get_cpu_l (client, &cpu); */
exit (0);
}