2 * Copyright (C) 2007 Benjamin Otte <otte@gnome.org>
3 * 2007 Pekka Lampila <pekka.lampila@iki.fi>
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.1 of the License, or (at your option) any later version.
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.
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,
18 * Boston, MA 02110-1301 USA
21 #ifndef _SWFDEC_AS_ARRAY_H_
22 #define _SWFDEC_AS_ARRAY_H_
24 #include <swfdec/swfdec_as_object.h>
25 #include <swfdec/swfdec_as_types.h>
30 SwfdecAsObject
*swfdec_as_array_new (SwfdecAsContext
* context
);
32 #define swfdec_as_array_push(array,value) \
33 swfdec_as_array_append_with_flags ((array), 1, (value), 0)
34 #define swfdec_as_array_push_with_flags(array,value,flags) \
35 swfdec_as_array_append_with_flags ((array), 1, (value), (flags))
36 #define swfdec_as_array_append(array,n,values) \
37 swfdec_as_array_append_with_flags ((array), (n), (values), 0)
38 void swfdec_as_array_append_with_flags (SwfdecAsObject
* array
,
40 const SwfdecAsValue
* values
,
41 SwfdecAsVariableFlag flags
);
42 void swfdec_as_array_insert (SwfdecAsObject
* array
,
44 SwfdecAsValue
* value
);
45 #define swfdec_as_array_insert(array,idx,value) \
46 swfdec_as_array_insert_with_flags ((array), (idx), (value), 0)
47 void swfdec_as_array_insert_with_flags (SwfdecAsObject
* array
,
49 const SwfdecAsValue
* value
,
50 SwfdecAsVariableFlag flags
);
51 gint32
swfdec_as_array_get_length (SwfdecAsObject
* array
);
52 void swfdec_as_array_set_length (SwfdecAsObject
* array
,
54 void swfdec_as_array_get_value (SwfdecAsObject
* array
,
56 SwfdecAsValue
* value
);
57 void swfdec_as_array_set_value (SwfdecAsObject
* array
,
59 SwfdecAsValue
* value
);
60 void swfdec_as_array_remove (SwfdecAsObject
* array
,