~ubuntu-branches/ubuntu/utopic/glib2.0/utopic

« back to all changes in this revision

Viewing changes to tests/gobject/testmodule.h

Tags: upstream-2.12.12
ImportĀ upstreamĀ versionĀ 2.12.12

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/* GObject - GLib Type, Object, Parameter and Signal Library
 
2
 * testmodule.h: Dummy dynamic type module
 
3
 * Copyright (C) 2003 Red Hat, Inc.
 
4
 *
 
5
 * This library is free software; you can redistribute it and/or
 
6
 * modify it under the terms of the GNU Lesser General Public
 
7
 * License as published by the Free Software Foundation; either
 
8
 * version 2 of the License, or (at your option) any later version.
 
9
 *
 
10
 * This library is distributed in the hope that it will be useful,
 
11
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 
12
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 
13
 * Lesser General Public License for more details.
 
14
 *
 
15
 * You should have received a copy of the GNU Lesser General Public
 
16
 * License along with this library; if not, write to the
 
17
 * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
 
18
 * Boston, MA 02111-1307, USA.
 
19
 */
 
20
 
 
21
#ifndef __TEST_MODULE_H__
 
22
#define __TEST_MODULE_H__
 
23
 
 
24
#include <glib-object.h>
 
25
 
 
26
G_BEGIN_DECLS
 
27
 
 
28
typedef struct _TestModule      TestModule;
 
29
typedef struct _TestModuleClass TestModuleClass;
 
30
 
 
31
#define TEST_TYPE_MODULE              (test_module_get_type ())
 
32
#define TEST_MODULE(module)           (G_TYPE_CHECK_INSTANCE_CAST ((module), TEST_TYPE_MODULE, TestModule))
 
33
#define TEST_MODULE_CLASS(class)      (G_TYPE_CHECK_CLASS_CAST ((class), TEST_TYPE_MODULE, TestModuleClass))
 
34
#define TEST_IS_MODULE(module)        (G_TYPE_CHECK_INSTANCE_TYPE ((module), TEST_TYPE_MODULE))
 
35
#define TEST_IS_MODULE_CLASS(class)   (G_TYPE_CHECK_CLASS_TYPE ((class), TEST_TYPE_MODULE))
 
36
#define TEST_MODULE_GET_CLASS(module) (G_TYPE_INSTANCE_GET_CLASS ((module), TEST_TYPE_MODULE, TestModuleClass))
 
37
 
 
38
typedef void (*TestModuleRegisterFunc) (GTypeModule *module);
 
39
 
 
40
struct _TestModule 
 
41
{
 
42
  GTypeModule parent_instance;
 
43
 
 
44
  TestModuleRegisterFunc register_func;
 
45
};
 
46
 
 
47
struct _TestModuleClass
 
48
{
 
49
  GTypeModuleClass parent_class;
 
50
};
 
51
 
 
52
GType        test_module_get_type      (void);
 
53
GTypeModule *test_module_new           (TestModuleRegisterFunc register_func);
 
54
 
 
55
G_END_DECLS
 
56
 
 
57
#endif /* __TEST_MODULE_H__ */