File: bonobo-running-context.h

package info (click to toggle)
bonobo 1.0.22-2.2
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 13,412 kB
  • ctags: 5,445
  • sloc: ansic: 51,714; sh: 7,733; makefile: 1,425; yacc: 318; xml: 266; sed: 16
file content (58 lines) | stat: -rw-r--r-- 1,936 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
/**
 * bonobo-running-context.c: An interface to track running objects
 *
 * Author:
 *	Michael Meeks (michael@helixcode.com)
 *
 * Copyright (C) 2000, Helix Code, Inc.
 */
#ifndef _BONOBO_RUNNING_CONTEXT_H_
#define _BONOBO_RUNNING_CONTEXT_H_

#include <bonobo/bonobo-xobject.h>

BEGIN_GNOME_DECLS

typedef struct _BonoboRunningContextPrivate BonoboRunningContextPrivate;

typedef struct {
	BonoboXObject parent;

	BonoboRunningContextPrivate *priv;
} BonoboRunningContext;

typedef struct {
	BonoboXObjectClass parent;

	POA_Bonobo_RunningContext__epv epv;

	void (*last_unref) (void);
} BonoboRunningContextClass;

GtkType       bonobo_running_context_get_type        (void);
BonoboObject *bonobo_running_context_new             (void);

/*
 *   This interface is private, and purely for speed
 * of impl. of the context.
 */
void        bonobo_running_context_add_object      (CORBA_Object object);
void        bonobo_running_context_remove_object   (CORBA_Object object);
void        bonobo_running_context_ignore_object   (CORBA_Object object);
void        bonobo_running_context_trace_objects   (CORBA_Object object,
						    const char  *fn,
						    int          line,
						    int          mode);
void        bonobo_running_context_at_exit_unref   (CORBA_Object object);

#ifdef BONOBO_OBJECT_DEBUG
#	define           bonobo_running_context_add_object(o)   G_STMT_START{bonobo_running_context_trace_objects((o),G_GNUC_PRETTY_FUNCTION,__LINE__,0);}G_STMT_END
#	define           bonobo_running_context_remove_object(o)   G_STMT_START{bonobo_running_context_trace_objects((o),G_GNUC_PRETTY_FUNCTION,__LINE__,1);}G_STMT_END
#	define           bonobo_running_context_ignore_object(o)   G_STMT_START{bonobo_running_context_trace_objects((o),G_GNUC_PRETTY_FUNCTION,__LINE__,2);}G_STMT_END
#endif

END_GNOME_DECLS

#endif /* _BONOBO_RUNNING_CONTEXT_H_ */