123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831 |
- #include "config.h"
- #include "annotation.h"
- char backslash_parsing_tester = '\\';
- G_DEFINE_TYPE (RegressAnnotationObject, regress_annotation_object, G_TYPE_OBJECT);
- enum {
- PROP_0,
- PROP_STRING_PROPERTY,
- PROP_FUNCTION_PROPERTY,
- PROP_TAB_PROPERTY
- };
- enum {
- STRING_SIGNAL,
- LIST_SIGNAL,
- DOC_EMPTY_ARG_PARSING,
- ATTRIBUTE_SIGNAL,
- LAST_SIGNAL
- };
- static guint regress_annotation_object_signals[LAST_SIGNAL] = { 0 };
- static void
- regress_annotation_object_set_property (GObject *object,
- guint prop_id,
- const GValue *value,
- GParamSpec *pspec)
- {
- switch (prop_id)
- {
- case PROP_STRING_PROPERTY:
- break;
- case PROP_FUNCTION_PROPERTY:
- break;
- case PROP_TAB_PROPERTY:
- break;
- default:
- G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
- break;
- }
- }
- static void
- regress_annotation_object_get_property (GObject *object,
- guint prop_id,
- GValue *value,
- GParamSpec *pspec)
- {
- switch (prop_id)
- {
- case PROP_STRING_PROPERTY:
- break;
- case PROP_FUNCTION_PROPERTY:
- break;
- case PROP_TAB_PROPERTY:
- break;
- default:
- G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
- break;
- }
- }
- static void
- regress_annotation_object_class_init (RegressAnnotationObjectClass *klass)
- {
- GObjectClass *gobject_class;
- gobject_class = G_OBJECT_CLASS (klass);
- gobject_class->set_property = regress_annotation_object_set_property;
- gobject_class->get_property = regress_annotation_object_get_property;
-
- regress_annotation_object_signals[STRING_SIGNAL] =
- g_signal_new ("string-signal",
- G_OBJECT_CLASS_TYPE (gobject_class),
- G_SIGNAL_RUN_LAST,
- 0,
- NULL, NULL,
- (GSignalCMarshaller)g_cclosure_marshal_VOID__POINTER,
- G_TYPE_NONE, 1, G_TYPE_POINTER);
-
- regress_annotation_object_signals[LIST_SIGNAL] =
- g_signal_new ("list-signal",
- G_OBJECT_CLASS_TYPE (gobject_class),
- G_SIGNAL_RUN_LAST,
- 0,
- NULL, NULL,
- (GSignalCMarshaller)g_cclosure_marshal_VOID__POINTER,
- G_TYPE_NONE, 1, G_TYPE_POINTER);
-
- regress_annotation_object_signals[DOC_EMPTY_ARG_PARSING] =
- g_signal_new ("doc-empty-arg-parsing",
- G_OBJECT_CLASS_TYPE (gobject_class),
- G_SIGNAL_RUN_LAST,
- 0,
- NULL, NULL,
- (GSignalCMarshaller)g_cclosure_marshal_VOID__POINTER,
- G_TYPE_NONE, 1, G_TYPE_POINTER);
-
- regress_annotation_object_signals[ATTRIBUTE_SIGNAL] =
- g_signal_new ("attribute-signal",
- G_OBJECT_CLASS_TYPE (gobject_class),
- G_SIGNAL_RUN_LAST,
- 0,
- NULL, NULL,
- NULL,
- G_TYPE_STRING,
- 2,
- G_TYPE_STRING,
- G_TYPE_STRING);
-
- g_object_class_install_property (gobject_class,
- PROP_STRING_PROPERTY,
- g_param_spec_string ("string-property",
- "String property",
- "This property is a string",
- NULL,
- G_PARAM_READWRITE | G_PARAM_CONSTRUCT));
-
- g_object_class_install_property (gobject_class,
- PROP_FUNCTION_PROPERTY,
- g_param_spec_pointer ("function-property",
- "Function property",
- "This property is a function pointer",
- G_PARAM_READWRITE | G_PARAM_CONSTRUCT));
-
- g_object_class_install_property (gobject_class,
- PROP_TAB_PROPERTY,
- g_param_spec_string ("tab-property",
- "Tab property",
- "This property is a thing",
- NULL,
- G_PARAM_READWRITE | G_PARAM_CONSTRUCT));
- }
- static void
- regress_annotation_object_init (RegressAnnotationObject *object)
- {
- }
- gint
- regress_annotation_object_method (RegressAnnotationObject *object)
- {
- return 1;
- }
- gint
- regress_annotation_object_out (RegressAnnotationObject *object, int *outarg)
- {
- *outarg = 2;
- return 1;
- }
- gint
- regress_annotation_object_in (RegressAnnotationObject *object, int *inarg)
- {
- return *inarg;
- }
- gint
- regress_annotation_object_inout (RegressAnnotationObject *object, int *inoutarg)
- {
- return *inoutarg += 1;
- }
- gint
- regress_annotation_object_inout2 (RegressAnnotationObject *object, int *inoutarg)
- {
- return *inoutarg += 1;
- }
- gint
- regress_annotation_object_inout3 (RegressAnnotationObject *object, int *inoutarg)
- {
- if (inoutarg)
- return *inoutarg + 1;
- return 1;
- }
- gint
- regress_annotation_object_calleeowns (RegressAnnotationObject *object, GObject **toown)
- {
- return 1;
- }
- gint
- regress_annotation_object_calleesowns (RegressAnnotationObject *object,
- GObject **toown1,
- GObject **toown2)
- {
- return 1;
- }
- GList*
- regress_annotation_object_get_strings (RegressAnnotationObject *object)
- {
- GList *list = NULL;
- list = g_list_prepend (list, g_strdup ("regress_annotation"));
- list = g_list_prepend (list, g_strdup ("bar"));
- return list;
- }
- GHashTable*
- regress_annotation_object_get_hash (RegressAnnotationObject *object)
- {
- GHashTable *hash = g_hash_table_new_full (g_str_hash, g_str_equal,
- g_free, g_object_unref);
- g_hash_table_insert (hash, g_strdup ("one"), g_object_ref (object));
- g_hash_table_insert (hash, g_strdup ("two"), g_object_ref (object));
- return hash;
- }
- void
- regress_annotation_object_with_voidp (RegressAnnotationObject *object, void *data)
- {
- }
- GSList*
- regress_annotation_object_get_objects (RegressAnnotationObject *object)
- {
- GSList *list = NULL;
- list = g_slist_prepend (list, object);
- return list;
- }
- GObject*
- regress_annotation_object_create_object (RegressAnnotationObject *object)
- {
- return g_object_ref (object);
- }
- void
- regress_annotation_object_use_buffer (RegressAnnotationObject *object,
- guchar *bytes)
- {
- }
- void
- regress_annotation_object_compute_sum (RegressAnnotationObject *object,
- int *nums)
- {
- }
- void
- regress_annotation_object_compute_sum_n(RegressAnnotationObject *object,
- int *nums,
- int n_nums)
- {
- }
- void
- regress_annotation_object_compute_sum_nz(RegressAnnotationObject *object,
- int *nums,
- int n_nums)
- {
- }
- void
- regress_annotation_object_parse_args(RegressAnnotationObject *object,
- int *argc,
- char ***argv)
- {
- }
- gboolean
- regress_annotation_object_string_out(RegressAnnotationObject *object,
- char **str_out)
- {
- return FALSE;
- }
- void
- regress_annotation_object_foreach (RegressAnnotationObject *object,
- RegressAnnotationForeachFunc func,
- gpointer user_data)
- {
- }
- void
- regress_annotation_object_set_data (RegressAnnotationObject *object,
- const guchar *data,
- gsize length)
- {
- }
- void
- regress_annotation_object_set_data2 (RegressAnnotationObject *object,
- const gchar *data,
- gsize length)
- {
- }
- void
- regress_annotation_object_set_data3 (RegressAnnotationObject *object,
- gpointer data,
- gsize length)
- {
- }
- GObject*
- regress_annotation_object_allow_none (RegressAnnotationObject *object, const gchar *somearg)
- {
- return NULL;
- }
- GObject*
- regress_annotation_object_notrans (RegressAnnotationObject *object)
- {
- return NULL;
- }
- GObject*
- regress_annotation_object_do_not_use (RegressAnnotationObject *object)
- {
- return NULL;
- }
- void
- regress_annotation_object_watch (RegressAnnotationObject *object,
- RegressAnnotationForeachFunc func,
- gpointer user_data)
- {
- }
- void
- regress_annotation_object_watch_full (RegressAnnotationObject *object,
- RegressAnnotationForeachFunc func,
- gpointer user_data,
- GDestroyNotify destroy)
- {
- }
- void
- regress_annotation_object_hidden_self (gpointer object)
- {
- }
- void
- regress_annotation_init (int *argc, char ***argv)
- {
- }
- char **
- regress_annotation_return_array (int *length)
- {
- return NULL;
- }
- char **
- regress_annotation_string_zero_terminated (void)
- {
- return NULL;
- }
- void
- regress_annotation_string_zero_terminated_out (char ***out)
- {
- }
- void
- regress_annotation_versioned (void)
- {
- }
- void
- regress_annotation_string_array_length (guint n_properties, const gchar * const properties[])
- {
- }
- void
- regress_annotation_object_extra_annos (RegressAnnotationObject *object)
- {
- }
- void
- regress_annotation_custom_destroy (RegressAnnotationCallback callback,
- RegressAnnotationNotifyFunc destroy,
- gpointer data)
- {
- }
- char *
- regress_annotation_get_source_file (void)
- {
- return NULL;
- }
- void
- regress_annotation_set_source_file (const char *fname)
- {
- }
- void
- regress_annotation_ptr_array (GPtrArray *array)
- {
- }
- gint
- regress_annotation_attribute_func (RegressAnnotationObject *object,
- const gchar *data)
- {
- return 42;
- }
- void
- regress_annotation_invalid_regress_annotation (int foo)
- {
- }
- char backslash_parsing_tester_2 = '\\';
- GObject *
- regress_annotation_test_parsing_bug630862 (void)
- {
- return NULL;
- }
- void
- regress_annotation_space_after_comment_bug631690 (void)
- {
- }
- gchar*
- regress_annotation_return_filename (void)
- {
- return "a utf-8 filename";
- }
- GObject *
- regress_annotation_transfer_floating(void)
- {
- return NULL;
- }
|