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
|
#include "ibus.h"
#include "stdio.h"
int main()
{
g_type_init ();
IBusAttrList *list;
IBusMessage *message;
gboolean retval;
IBusError *error;
list = ibus_attr_list_new ();
ibus_attr_list_append (list, ibus_attribute_new (1, 1, 1, 2));
ibus_attr_list_append (list, ibus_attribute_new (2, 1, 1, 2));
ibus_attr_list_append (list, ibus_attribute_new (3, 1, 1, 2));
ibus_attr_list_append (list, ibus_attribute_new (3, 1, 1, 2));
message = ibus_message_new_signal ("/org/freedesktop/IBus",
"org.freedesktop.IBus",
"Test");
IBusSerializable *p = ibus_serializable_new ();
retval = ibus_message_append_args (message,
IBUS_TYPE_SERIALIZABLE, &p,
IBUS_TYPE_SERIALIZABLE, &p,
IBUS_TYPE_SERIALIZABLE, &p,
IBUS_TYPE_SERIALIZABLE, &p,
IBUS_TYPE_SERIALIZABLE, &p,
G_TYPE_INVALID);
g_assert (retval);
retval = ibus_message_get_args (message,
&error,
IBUS_TYPE_SERIALIZABLE, &p,
IBUS_TYPE_SERIALIZABLE, &p,
IBUS_TYPE_SERIALIZABLE, &p,
IBUS_TYPE_SERIALIZABLE, &p,
IBUS_TYPE_SERIALIZABLE, &p,
G_TYPE_INVALID);
g_assert (retval);
return 0;
}
|