~kkubasik/vala/motu_package

« back to all changes in this revision

Viewing changes to vala-0.0.8/vala/valanamespace.h

  • Committer: Kevin Kubasik
  • Date: 2007-04-23 16:46:12 UTC
  • Revision ID: kevin@kubasik.net-20070423164612-2nrkvw6m0lxixxft
inital import of vala 0.0.8 and its ubuntu packaging

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/* valanamespace.vala
 
2
 *
 
3
 * Copyright (C) 2006  Jürg Billeter
 
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 Free Software
 
17
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
 
18
 *
 
19
 * Author:
 
20
 *      Jürg Billeter <j@bitron.ch>
 
21
 */
 
22
 
 
23
#ifndef __VALANAMESPACE_H__
 
24
#define __VALANAMESPACE_H__
 
25
 
 
26
#include <glib.h>
 
27
#include <glib-object.h>
 
28
#include <stdlib.h>
 
29
#include <string.h>
 
30
#include <vala/valacodenode.h>
 
31
 
 
32
G_BEGIN_DECLS
 
33
 
 
34
 
 
35
#define VALA_TYPE_NAMESPACE (vala_namespace_get_type ())
 
36
#define VALA_NAMESPACE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), VALA_TYPE_NAMESPACE, ValaNamespace))
 
37
#define VALA_NAMESPACE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), VALA_TYPE_NAMESPACE, ValaNamespaceClass))
 
38
#define VALA_IS_NAMESPACE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), VALA_TYPE_NAMESPACE))
 
39
#define VALA_IS_NAMESPACE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), VALA_TYPE_NAMESPACE))
 
40
#define VALA_NAMESPACE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), VALA_TYPE_NAMESPACE, ValaNamespaceClass))
 
41
 
 
42
typedef struct _ValaNamespacePrivate ValaNamespacePrivate;
 
43
 
 
44
/**
 
45
 * Represents a namespace declaration in the source code.
 
46
 */
 
47
struct _ValaNamespace {
 
48
        ValaCodeNode parent;
 
49
        ValaNamespacePrivate * priv;
 
50
};
 
51
struct _ValaNamespaceClass {
 
52
        ValaCodeNodeClass parent;
 
53
};
 
54
 
 
55
ValaNamespace* vala_namespace_new (char* _name, ValaSourceReference* source);
 
56
void vala_namespace_add_class (ValaNamespace* self, ValaClass* cl);
 
57
void vala_namespace_add_interface (ValaNamespace* self, ValaInterface* iface);
 
58
void vala_namespace_add_struct (ValaNamespace* self, ValaStruct* st);
 
59
void vala_namespace_add_enum (ValaNamespace* self, ValaEnum* en);
 
60
void vala_namespace_add_flags (ValaNamespace* self, ValaFlags* fl);
 
61
void vala_namespace_add_callback (ValaNamespace* self, ValaCallback* cb);
 
62
GList* vala_namespace_get_structs (ValaNamespace* self);
 
63
GList* vala_namespace_get_classes (ValaNamespace* self);
 
64
GList* vala_namespace_get_interfaces (ValaNamespace* self);
 
65
void vala_namespace_add_constant (ValaNamespace* self, ValaConstant* constant);
 
66
void vala_namespace_add_field (ValaNamespace* self, ValaField* f);
 
67
void vala_namespace_add_method (ValaNamespace* self, ValaMethod* m);
 
68
char* vala_namespace_camel_case_to_lower_case (char* camel_case);
 
69
char* vala_namespace_get_cprefix (ValaNamespace* self);
 
70
char* vala_namespace_get_lower_case_cprefix (ValaNamespace* self);
 
71
GList* vala_namespace_get_cheader_filenames (ValaNamespace* self);
 
72
char* vala_namespace_get_cheader_filename (ValaNamespace* self);
 
73
void vala_namespace_set_cheader_filename (ValaNamespace* self, char* cheader_filename);
 
74
void vala_namespace_process_attributes (ValaNamespace* self);
 
75
char* vala_namespace_get_name (ValaNamespace* self);
 
76
void vala_namespace_set_name (ValaNamespace* self, const char* value);
 
77
GType vala_namespace_get_type ();
 
78
 
 
79
G_END_DECLS
 
80
 
 
81
#endif