void ags_play_audio_file_class_init(AgsPlayAudioFileClass *play_audio_file) { GObjectClass *gobject; AgsRecallClass *recall; GParamSpec *param_spec; ags_play_audio_file_parent_class = g_type_class_peek_parent(play_audio_file); /* GObjectClass */ gobject = (GObjectClass *) play_audio_file; gobject->set_property = ags_play_audio_file_set_property; gobject->get_property = ags_play_audio_file_get_property; gobject->finalize = ags_play_audio_file_finalize; /* properties */ param_spec = g_param_spec_gtype("soundcard\0", "assigned soundcard\0", "The soundcard this recall is assigned to\0", G_TYPE_OBJECT, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_SOUNDCARD, param_spec); param_spec = g_param_spec_gtype("audio_file\0", "assigned audio file\0", "The audio file this recall is assigned to\0", G_TYPE_OBJECT, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_AUDIO_FILE, param_spec); param_spec = g_param_spec_gtype("current\0", "current frame\0", "The current frame this recall is playing\0", G_TYPE_UINT, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_CURRENT_FRAME, param_spec); /* AgsRecallClass */ recall->run_inter = ags_play_audio_file_run_inter; recall->remove = ags_play_audio_file_remove; recall->cancel = ags_play_audio_file_cancel; }
static void gimp_int_store_class_init (GimpIntStoreClass *klass) { GObjectClass *object_class = G_OBJECT_CLASS (klass); object_class->constructed = gimp_int_store_constructed; object_class->finalize = gimp_int_store_finalize; object_class->set_property = gimp_int_store_set_property; object_class->get_property = gimp_int_store_get_property; /** * GimpIntStore:user-data-type: * * Sets the #GType for the GIMP_INT_STORE_USER_DATA column. * * You need to set this property when constructing the store if you want * to use the GIMP_INT_STORE_USER_DATA column and want to have the store * handle ref-counting of your user data. * * Since: 2.4 */ g_object_class_install_property (object_class, PROP_USER_DATA_TYPE, g_param_spec_gtype ("user-data-type", NULL, NULL, G_TYPE_NONE, G_PARAM_CONSTRUCT_ONLY | GIMP_PARAM_READWRITE)); g_type_class_add_private (object_class, sizeof (GimpIntStorePrivate)); }
void ges_asset_class_init (GESAssetClass * klass) { GObjectClass *object_class = G_OBJECT_CLASS (klass); g_type_class_add_private (klass, sizeof (GESAssetPrivate)); object_class->get_property = ges_asset_get_property; object_class->set_property = ges_asset_set_property; object_class->finalize = ges_asset_finalize; _properties[PROP_TYPE] = g_param_spec_gtype ("extractable-type", "Extractable type", "The type of the Object that can be extracted out of the asset", G_TYPE_OBJECT, G_PARAM_CONSTRUCT_ONLY | G_PARAM_READWRITE); _properties[PROP_ID] = g_param_spec_string ("id", "Identifier", "The unic identifier of the asset", NULL, G_PARAM_CONSTRUCT_ONLY | G_PARAM_READWRITE); g_object_class_install_properties (object_class, PROP_LAST, _properties); klass->start_loading = ges_asset_start_loading_default; klass->extract = ges_asset_extract_default; klass->request_id_update = ges_asset_request_id_update_default; klass->inform_proxy = NULL; }
static void _gtk_style_property_class_init (GtkStylePropertyClass *klass) { GObjectClass *object_class = G_OBJECT_CLASS (klass); object_class->finalize = gtk_style_property_finalize; object_class->set_property = gtk_style_property_set_property; object_class->get_property = gtk_style_property_get_property; g_object_class_install_property (object_class, PROP_NAME, g_param_spec_string ("name", P_("Property name"), P_("The name of the property"), NULL, G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY)); g_object_class_install_property (object_class, PROP_VALUE_TYPE, g_param_spec_gtype ("value-type", P_("Value type"), P_("The value type returned by GtkStyleContext"), G_TYPE_NONE, G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY)); klass->properties = g_hash_table_new (g_str_hash, g_str_equal); }
void ags_link_collection_editor_class_init(AgsLinkCollectionEditorClass *link_collection_editor) { GObjectClass *gobject; GParamSpec *param_spec; ags_link_collection_editor_parent_class = g_type_class_peek_parent(link_collection_editor); /* GObjectClass */ gobject = (GObjectClass *) link_collection_editor; gobject->set_property = ags_link_collection_editor_set_property; gobject->get_property = ags_link_collection_editor_get_property; /* properties */ /** * AgsLinkCollectionEditor:channel-type: * * The channel type to apply to. Either %AGS_TYPE_INPUT or %AGS_TYPE_OUTPUT. * * Since: 0.3 */ param_spec = g_param_spec_gtype("channel-type\0", "assigned channel type\0", "The channel type which this channel link collection editor is assigned with\0", G_TYPE_NONE, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_CHANNEL_TYPE, param_spec); }
static void gdaui_numeric_entry_class_init (GdauiNumericEntryClass *klass) { GObjectClass *object_class = G_OBJECT_CLASS (klass); parent_class = g_type_class_peek_parent (klass); object_class->finalize = gdaui_numeric_entry_finalize; GDAUI_ENTRY_CLASS (klass)->assume_insert = gdaui_numeric_entry_assume_insert; GDAUI_ENTRY_CLASS (klass)->assume_delete = gdaui_numeric_entry_assume_delete; GDAUI_ENTRY_CLASS (klass)->get_empty_text = NULL; /* Properties */ object_class->set_property = gdaui_numeric_entry_set_property; object_class->get_property = gdaui_numeric_entry_get_property; g_object_class_install_property (object_class, PROP_TYPE, g_param_spec_gtype ("type", NULL, NULL, G_TYPE_NONE, G_PARAM_READABLE | G_PARAM_WRITABLE)); g_object_class_install_property (object_class, PROP_N_DECIMALS, g_param_spec_uint ("n-decimals", NULL, NULL, 0, G_MAXUINT16, G_MAXUINT16, G_PARAM_READABLE | G_PARAM_WRITABLE)); g_object_class_install_property (object_class, PROP_DECIMAL_SEP, g_param_spec_char ("decimal-sep", NULL, NULL, 0, 127, '.', G_PARAM_READABLE | G_PARAM_WRITABLE)); g_object_class_install_property (object_class, PROP_THOUSANDS_SEP, g_param_spec_char ("thousands-sep", NULL, NULL, 0, 127, ',', G_PARAM_READABLE | G_PARAM_WRITABLE)); }
static void mex_proxy_class_init (MexProxyClass *klass) { GParamSpec *pspec; GObjectClass *object_class = G_OBJECT_CLASS (klass); g_type_class_add_private (klass, sizeof (MexProxyPrivate)); object_class->get_property = mex_proxy_get_property; object_class->set_property = mex_proxy_set_property; object_class->dispose = mex_proxy_dispose; object_class->finalize = mex_proxy_finalize; pspec = g_param_spec_object ("model", "Model", "MexModel the proxy is listening to.", G_TYPE_OBJECT, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS); g_object_class_install_property (object_class, PROP_MODEL, pspec); pspec = g_param_spec_gtype ("object-type", "Object type", "GType for creating GObjects.", G_TYPE_OBJECT, G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY | G_PARAM_STATIC_STRINGS); g_object_class_install_property (object_class, PROP_TYPE, pspec); pspec = g_param_spec_uint ("limit", "Limit", "Limit on number of objects created.", 0, G_MAXUINT, 0, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS); g_object_class_install_property (object_class, PROP_LIMIT, pspec); signals[OBJECT_CREATED] = g_signal_new ("object-created", G_TYPE_FROM_CLASS (klass), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (MexProxyClass, object_created), NULL, NULL, mex_marshal_VOID__OBJECT_OBJECT, G_TYPE_NONE, 2, G_TYPE_OBJECT, G_TYPE_OBJECT); signals[OBJECT_REMOVED] = g_signal_new ("object-removed", G_TYPE_FROM_CLASS (klass), G_SIGNAL_RUN_FIRST, G_STRUCT_OFFSET (MexProxyClass, object_removed), NULL, NULL, mex_marshal_VOID__OBJECT_OBJECT, G_TYPE_NONE, 2, G_TYPE_OBJECT, G_TYPE_OBJECT); }
static void ibus_server_class_init (IBusServerClass *klass) { GObjectClass *gobject_class = G_OBJECT_CLASS (klass); IBusObjectClass *ibus_object_class = IBUS_OBJECT_CLASS (klass); g_type_class_add_private (klass, sizeof (IBusServerPrivate)); gobject_class->set_property = (GObjectSetPropertyFunc) ibus_server_set_property; gobject_class->get_property = (GObjectGetPropertyFunc) ibus_server_get_property; ibus_object_class->destroy = (IBusObjectDestroyFunc) ibus_server_destroy; klass->new_connection = ibus_server_new_connection; /* install properties */ /** * IBusServer:connection-type: * * The connection type of server object. */ g_object_class_install_property (gobject_class, PROP_CONNECTION_TYPE, g_param_spec_gtype ("connection-type", "connection type", "The connection type of server object", IBUS_TYPE_CONNECTION, G_PARAM_READWRITE)); /* install signals */ /** * IBusServer::new-connection: * @server: An IBusServer. * @connection: The corresponding IBusConnection. * * Emitted when a new connection is coming in. * In this handler, IBus could add a reference and continue processing the connection. * If no reference is added, the new connection will be released and closed after this signal. * * <note><para>Argument @user_data is ignored in this function.</para></note> * * See also: IBusNewConnectionFunc(). */ server_signals[NEW_CONNECTION] = g_signal_new (I_("new-connection"), G_TYPE_FROM_CLASS (klass), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (IBusServerClass, new_connection), NULL, NULL, ibus_marshal_VOID__OBJECT, G_TYPE_NONE, 1, G_TYPE_OBJECT); }
static void rb_display_page_menu_class_init (RBDisplayPageMenuClass *klass) { GObjectClass *object_class = G_OBJECT_CLASS (klass); GMenuModelClass *menu_class = G_MENU_MODEL_CLASS (klass); object_class->constructed = impl_constructed; object_class->finalize = impl_finalize; object_class->dispose = impl_dispose; object_class->set_property = impl_set_property; object_class->get_property = impl_get_property; menu_class->is_mutable = impl_is_mutable; menu_class->get_n_items = impl_get_n_items; menu_class->get_item_attributes = impl_get_item_attributes; menu_class->get_item_links = impl_get_item_links; g_object_class_install_property (object_class, PROP_MODEL, g_param_spec_object ("model", "model", "display page model", RB_TYPE_DISPLAY_PAGE_MODEL, G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY)); g_object_class_install_property (object_class, PROP_ROOT_PAGE, g_param_spec_object ("root-page", "root page", "root page", RB_TYPE_DISPLAY_PAGE, G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY)); g_object_class_install_property (object_class, PROP_PAGE_TYPE, g_param_spec_gtype ("page-type", "page type", "page type", RB_TYPE_DISPLAY_PAGE, G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY)); g_object_class_install_property (object_class, PROP_ACTION, g_param_spec_string ("action", "action", "action name", NULL, G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY)); g_type_class_add_private (klass, sizeof (RBDisplayPageMenuPrivate)); }
void g_sql_result_class_init(GSQLResultClass * klass) { GObjectClass * gobjclass = G_OBJECT_CLASS(klass); gobjclass->finalize = g_sql_result_finalize; gobjclass->dispose = g_sql_result_dispose; gobjclass->set_property = g_sql_result_set_property; gobjclass->get_property = g_sql_result_get_property; g_signal_new("destory",G_OBJECT_CLASS_TYPE(klass),G_SIGNAL_RUN_LAST,0,0,0,g_cclosure_marshal_VOID__VOID,G_TYPE_NONE,0); g_object_class_install_property(gobjclass,G_SQL_RESULT_PROPERTY_RESULT,g_param_spec_pointer("result","result","result",G_PARAM_CONSTRUCT_ONLY|G_PARAM_READWRITE)); g_object_class_install_property(gobjclass,G_SQL_RESULT_PROPERTY_TYPE,g_param_spec_gtype("type","type","type",G_TYPE_SQL_CONNNECT,G_PARAM_CONSTRUCT_ONLY|G_PARAM_READWRITE)); g_object_class_install_property(gobjclass,G_SQL_RESULT_PROPERTY_FIELDS,g_param_spec_int("fields","fields","fields",0,99,0,G_PARAM_CONSTRUCT_ONLY|G_PARAM_READWRITE)); }
static void mx_list_view_class_init (MxListViewClass *klass) { GObjectClass *object_class = G_OBJECT_CLASS (klass); GParamSpec *pspec; g_type_class_add_private (klass, sizeof (MxListViewPrivate)); object_class->get_property = mx_list_view_get_property; object_class->set_property = mx_list_view_set_property; object_class->dispose = mx_list_view_dispose; object_class->finalize = mx_list_view_finalize; pspec = g_param_spec_object ("model", "model", "The model for the item view", CLUTTER_TYPE_MODEL, MX_PARAM_READWRITE); g_object_class_install_property (object_class, PROP_MODEL, pspec); pspec = g_param_spec_gtype ("item-type", "Item Type", "The GType to use as the items in the view. " "Must be a subclass of ClutterActor", CLUTTER_TYPE_ACTOR, MX_PARAM_READWRITE); g_object_class_install_property (object_class, PROP_ITEM_TYPE, pspec); /* Note, interfaces aren't necessarily objects, so you can't use * MX_TYPE_ITEM_FACTORY here. The function mx_list_view_set_factory does * a type check, so this is still safe. */ pspec = g_param_spec_object ("factory", "Factory", "The MxItemFactory used for creating new items.", G_TYPE_OBJECT /*MX_TYPE_ITEM_FACTORY*/, MX_PARAM_READWRITE); g_object_class_install_property (object_class, PROP_FACTORY, pspec); }
static void gom_application_class_init (GomApplicationClass *klass) { GObjectClass *oclass = G_OBJECT_CLASS (klass); GApplicationClass *application_class = G_APPLICATION_CLASS (klass); oclass->constructed = gom_application_constructed; oclass->dispose = gom_application_dispose; oclass->set_property = gom_application_set_property; application_class->dbus_register = gom_application_dbus_register; application_class->dbus_unregister = gom_application_dbus_unregister; application_class->shutdown = gom_application_shutdown; g_object_class_install_property (oclass, PROP_MINER_TYPE, g_param_spec_gtype ("miner-type", "Miner type", "A GType representing the miner class", GOM_TYPE_MINER, G_PARAM_CONSTRUCT_ONLY | G_PARAM_STATIC_STRINGS | G_PARAM_WRITABLE)); }
static void test_param_spec_gtype (void) { GParamSpec *pspec; GValue value = { 0, }; gboolean modified; pspec = g_param_spec_gtype ("gtype", "nick", "blurb", G_TYPE_PARAM, G_PARAM_READWRITE); g_value_init (&value, G_TYPE_GTYPE); g_value_set_gtype (&value, G_TYPE_PARAM); g_assert (g_param_value_defaults (pspec, &value)); g_value_set_gtype (&value, G_TYPE_INT); modified = g_param_value_validate (pspec, &value); g_assert (modified && g_value_get_gtype (&value) == G_TYPE_PARAM); g_value_set_gtype (&value, G_TYPE_PARAM_INT); modified = g_param_value_validate (pspec, &value); g_assert (!modified && g_value_get_gtype (&value) == G_TYPE_PARAM_INT); }
static void moto_enum_store_class_init(MotoEnumStoreClass *klass) { GObjectClass *object_class = G_OBJECT_CLASS (klass); object_class->finalize = moto_enum_store_finalize; object_class->set_property = moto_enum_store_set_property; object_class->get_property = moto_enum_store_get_property; /** * MotoEnumStore:enum-type: * * Sets the #GType of the enum to be used in the store. * * Since: MOTO 2.4 */ g_object_class_install_property(object_class, PROP_ENUM_TYPE, g_param_spec_gtype("enum-type", NULL, NULL, G_TYPE_ENUM, G_PARAM_CONSTRUCT_ONLY | G_PARAM_READWRITE)); }
static void byzanz_session_class_init (ByzanzSessionClass *klass) { GObjectClass *object_class = G_OBJECT_CLASS (klass); object_class->get_property = byzanz_session_get_property; object_class->set_property = byzanz_session_set_property; object_class->dispose = byzanz_session_dispose; object_class->finalize = byzanz_session_finalize; object_class->constructed = byzanz_session_constructed; g_object_class_install_property (object_class, PROP_ERROR, g_param_spec_pointer ("error", "error", "error that happened on the thread", G_PARAM_READABLE)); g_object_class_install_property (object_class, PROP_RECORDING, g_param_spec_boolean ("recording", "recording", "TRUE while the recorder is running", FALSE, G_PARAM_READABLE)); g_object_class_install_property (object_class, PROP_ENCODING, g_param_spec_boolean ("encoding", "encoding", "TRUE while the encoder is running", TRUE, G_PARAM_READABLE)); g_object_class_install_property (object_class, PROP_WINDOW, g_param_spec_object ("window", "window", "window to record from", GDK_TYPE_WINDOW, G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY)); g_object_class_install_property (object_class, PROP_AREA, g_param_spec_boxed ("area", "area", "recorded area", GDK_TYPE_RECTANGLE, G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY)); g_object_class_install_property (object_class, PROP_FILE, g_param_spec_object ("file", "file", "file to record to", G_TYPE_FILE, G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY)); g_object_class_install_property (object_class, PROP_AUDIO, g_param_spec_boolean ("record-audio", "record audio", "TRUE to record audio", FALSE, G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY)); g_object_class_install_property (object_class, PROP_ENCODER_TYPE, g_param_spec_gtype ("encoder-type", "encoder type", "type for the encoder to use", BYZANZ_TYPE_ENCODER, G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY)); }
static void gnm_font_button_class_init (GnmFontButtonClass *klass) { GObjectClass *gobject_class; GtkButtonClass *button_class; gnm_font_button_parent_class = g_type_class_peek_parent (klass); gobject_class = (GObjectClass *) klass; button_class = (GtkButtonClass *) klass; gobject_class->finalize = gnm_font_button_finalize; gobject_class->set_property = gnm_font_button_set_property; gobject_class->get_property = gnm_font_button_get_property; button_class->clicked = gnm_font_button_clicked; klass->font_set = NULL; _gtk_font_chooser_install_properties (gobject_class); g_object_class_install_property (gobject_class, PROP_DIALOG_TYPE, g_param_spec_gtype ("dialog-type", _("Dialog Type"), _("The type of the dialog"), GTK_TYPE_FONT_CHOOSER, (G_PARAM_READABLE | G_PARAM_WRITABLE))); /** * GnmFontButton:title: * * The title of the font chooser dialog. * * Since: 2.4 */ g_object_class_install_property (gobject_class, PROP_TITLE, g_param_spec_string ("title", _("Title"), _("The title of the font chooser dialog"), _("Pick a Font"), (G_PARAM_READABLE | G_PARAM_WRITABLE))); /** * GnmFontButton:font-name: * * The name of the currently selected font. * * Since: 2.4 */ g_object_class_install_property (gobject_class, PROP_FONT_NAME, g_param_spec_string ("font-name", _("Font name"), _("The name of the selected font"), _("Sans 12"), (G_PARAM_READABLE | G_PARAM_WRITABLE))); /** * GnmFontButton:use-font: * * If this property is set to %TRUE, the label will be drawn * in the selected font. * * Since: 2.4 */ g_object_class_install_property (gobject_class, PROP_USE_FONT, g_param_spec_boolean ("use-font", _("Use font in label"), _("Whether the label is drawn in the selected font"), FALSE, G_PARAM_READWRITE)); /** * GnmFontButton:use-size: * * If this property is set to %TRUE, the label will be drawn * with the selected font size. * * Since: 2.4 */ g_object_class_install_property (gobject_class, PROP_USE_SIZE, g_param_spec_boolean ("use-size", _("Use size in label"), _("Whether the label is drawn with the selected font size"), FALSE, G_PARAM_READWRITE)); /** * GnmFontButton:show-style: * * If this property is set to %TRUE, the name of the selected font style * will be shown in the label. For a more WYSIWYG way to show the selected * style, see the ::use-font property. * * Since: 2.4 */ g_object_class_install_property (gobject_class, PROP_SHOW_STYLE, g_param_spec_boolean ("show-style", _("Show style"), _("Whether the selected font style is shown in the label"), TRUE, G_PARAM_READWRITE)); /** * GnmFontButton:show-size: * * If this property is set to %TRUE, the selected font size will be shown * in the label. For a more WYSIWYG way to show the selected size, see the * ::use-size property. * * Since: 2.4 */ g_object_class_install_property (gobject_class, PROP_SHOW_SIZE, g_param_spec_boolean ("show-size", _("Show size"), _("Whether selected font size is shown in the label"), TRUE, G_PARAM_READWRITE)); /** * GnmFontButton::font-set: * @widget: the object which received the signal. * * The ::font-set signal is emitted when the user selects a font. * When handling this signal, use gnm_font_button_get_font_name() * to find out which font was just selected. * * Note that this signal is only emitted when the <emphasis>user</emphasis> * changes the font. If you need to react to programmatic font changes * as well, use the notify::font-name signal. * * Since: 2.4 */ font_button_signals[FONT_SET] = g_signal_new (("font-set"), G_TYPE_FROM_CLASS (gobject_class), G_SIGNAL_RUN_FIRST, G_STRUCT_OFFSET (GnmFontButtonClass, font_set), NULL, NULL, g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0); g_type_class_add_private (gobject_class, sizeof (GnmFontButtonPrivate)); }
static void gtk_css_node_class_init (GtkCssNodeClass *klass) { GObjectClass *object_class = G_OBJECT_CLASS (klass); object_class->get_property = gtk_css_node_get_property; object_class->set_property = gtk_css_node_set_property; object_class->dispose = gtk_css_node_dispose; object_class->finalize = gtk_css_node_finalize; klass->update_style = gtk_css_node_real_update_style; klass->invalidate = gtk_css_node_real_invalidate; klass->validate = gtk_css_node_real_validate; klass->queue_validate = gtk_css_node_real_queue_validate; klass->dequeue_validate = gtk_css_node_real_dequeue_validate; klass->init_matcher = gtk_css_node_real_init_matcher; klass->create_widget_path = gtk_css_node_real_create_widget_path; klass->get_widget_path = gtk_css_node_real_get_widget_path; klass->get_style_provider = gtk_css_node_real_get_style_provider; klass->get_frame_clock = gtk_css_node_real_get_frame_clock; klass->node_added = gtk_css_node_real_node_added; klass->node_removed = gtk_css_node_real_node_removed; klass->style_changed = gtk_css_node_real_style_changed; cssnode_signals[NODE_ADDED] = g_signal_new (I_("node-added"), G_TYPE_FROM_CLASS (object_class), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (GtkCssNodeClass, node_added), NULL, NULL, _gtk_marshal_VOID__OBJECT_OBJECT, G_TYPE_NONE, 2, GTK_TYPE_CSS_NODE, GTK_TYPE_CSS_NODE); g_signal_set_va_marshaller (cssnode_signals[NODE_ADDED], G_TYPE_FROM_CLASS (klass), _gtk_marshal_VOID__OBJECT_OBJECTv); cssnode_signals[NODE_REMOVED] = g_signal_new (I_("node-removed"), G_TYPE_FROM_CLASS (object_class), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (GtkCssNodeClass, node_removed), NULL, NULL, _gtk_marshal_VOID__OBJECT_OBJECT, G_TYPE_NONE, 2, GTK_TYPE_CSS_NODE, GTK_TYPE_CSS_NODE); g_signal_set_va_marshaller (cssnode_signals[NODE_REMOVED], G_TYPE_FROM_CLASS (klass), _gtk_marshal_VOID__OBJECT_OBJECTv); cssnode_signals[STYLE_CHANGED] = g_signal_new (I_("style-changed"), G_TYPE_FROM_CLASS (object_class), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (GtkCssNodeClass, style_changed), NULL, NULL, _gtk_marshal_VOID__POINTER, G_TYPE_NONE, 1, G_TYPE_POINTER); g_signal_set_va_marshaller (cssnode_signals[STYLE_CHANGED], G_TYPE_FROM_CLASS (klass), _gtk_marshal_VOID__POINTERv); cssnode_properties[PROP_CLASSES] = g_param_spec_boxed ("classes", P_("Style Classes"), P_("List of classes"), G_TYPE_STRV, G_PARAM_READWRITE | G_PARAM_EXPLICIT_NOTIFY | G_PARAM_STATIC_STRINGS); cssnode_properties[PROP_ID] = g_param_spec_string ("id", P_("ID"), P_("Unique ID"), NULL, G_PARAM_READWRITE | G_PARAM_EXPLICIT_NOTIFY | G_PARAM_STATIC_STRINGS); cssnode_properties[PROP_NAME] = g_param_spec_string ("name", P_("Name"), "Name identifying the type of node", NULL, G_PARAM_READWRITE | G_PARAM_EXPLICIT_NOTIFY | G_PARAM_STATIC_STRINGS); cssnode_properties[PROP_STATE] = g_param_spec_flags ("state", P_("State"), P_("State flags"), GTK_TYPE_STATE_FLAGS, 0, G_PARAM_READWRITE | G_PARAM_EXPLICIT_NOTIFY | G_PARAM_STATIC_STRINGS); cssnode_properties[PROP_VISIBLE] = g_param_spec_boolean ("visible", P_("Visible"), P_("If other nodes can see this node"), TRUE, G_PARAM_READWRITE | G_PARAM_EXPLICIT_NOTIFY | G_PARAM_STATIC_STRINGS); cssnode_properties[PROP_WIDGET_TYPE] = g_param_spec_gtype ("widget-type", P_("Widget type"), P_("GType of the widget"), G_TYPE_NONE, G_PARAM_READWRITE | G_PARAM_EXPLICIT_NOTIFY | G_PARAM_STATIC_STRINGS); g_object_class_install_properties (object_class, NUM_PROPERTIES, cssnode_properties); }
static void nmt_device_entry_class_init (NmtDeviceEntryClass *deventry_class) { GObjectClass *object_class = G_OBJECT_CLASS (deventry_class); g_type_class_add_private (deventry_class, sizeof (NmtDeviceEntryPrivate)); /* virtual methods */ object_class->constructed = nmt_device_entry_constructed; object_class->set_property = nmt_device_entry_set_property; object_class->get_property = nmt_device_entry_get_property; object_class->finalize = nmt_device_entry_finalize; /** * NmtDeviceEntry:label: * * The entry's label */ g_object_class_install_property (object_class, PROP_LABEL, g_param_spec_string ("label", "", "", NULL, G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY | G_PARAM_STATIC_STRINGS)); /** * NmtDeviceEntry:width: * * The entry's width in characters */ g_object_class_install_property (object_class, PROP_WIDTH, g_param_spec_int ("width", "", "", -1, 80, -1, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); /** * NmtDeviceEntry:hardware-type: * * The type of #NMDevice to limit the entry to, or %G_TYPE_NONE * if the entry is for a virtual device and should not accept * hardware addresses. */ g_object_class_install_property (object_class, PROP_HARDWARE_TYPE, g_param_spec_gtype ("hardware-type", "", "", G_TYPE_NONE, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); /** * NmtDeviceEntry:interface-name: * * The interface name of the device identified by the entry. */ g_object_class_install_property (object_class, PROP_INTERFACE_NAME, g_param_spec_string ("interface-name", "", "", NULL, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); /** * NmtDeviceEntry:mac-address: * * The hardware address of the device identified by the entry. */ g_object_class_install_property (object_class, PROP_MAC_ADDRESS, g_param_spec_string ("mac-address", "", "", NULL, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); }
static void ovirt_collection_class_init(OvirtCollectionClass *klass) { GObjectClass *object_class = G_OBJECT_CLASS(klass); GParamSpec *param_spec; g_type_class_add_private(klass, sizeof(OvirtCollectionPrivate)); object_class->finalize = ovirt_collection_finalize; object_class->get_property = ovirt_collection_get_property; object_class->set_property = ovirt_collection_set_property; param_spec = g_param_spec_string("href", "Collection href", "relative href for the collection", NULL, G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY | G_PARAM_STATIC_STRINGS); g_object_class_install_property(object_class, PROP_HREF, param_spec); param_spec = g_param_spec_gtype("resource-type", "Resource Type", "Type of resources held by this collection", OVIRT_TYPE_RESOURCE, G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY | G_PARAM_STATIC_STRINGS); g_object_class_install_property(object_class, PROP_RESOURCE_TYPE, param_spec); param_spec = g_param_spec_string("collection-xml-name", "Collection XML Name", "Name of the XML element for the collection", NULL, G_PARAM_WRITABLE | G_PARAM_CONSTRUCT_ONLY | G_PARAM_STATIC_STRINGS); g_object_class_install_property(object_class, PROP_COLLECTION_XML_NAME, param_spec); param_spec = g_param_spec_string("resource-xml-name", "Resource XML Name", "Name of the XML element for the resources stored in that collection", NULL, G_PARAM_WRITABLE | G_PARAM_CONSTRUCT_ONLY | G_PARAM_STATIC_STRINGS); g_object_class_install_property(object_class, PROP_RESOURCE_XML_NAME, param_spec); param_spec = g_param_spec_boxed("resources", "Resources", "Hash table containing the resources contained in this collection", G_TYPE_HASH_TABLE, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS); g_object_class_install_property(object_class, PROP_RESOURCES, param_spec); }
static void soup_session_class_init (SoupSessionClass *session_class) { GObjectClass *object_class = G_OBJECT_CLASS (session_class); g_type_class_add_private (session_class, sizeof (SoupSessionPrivate)); /* virtual method definition */ session_class->queue_message = queue_message; session_class->requeue_message = requeue_message; session_class->cancel_message = cancel_message; /* virtual method override */ object_class->dispose = dispose; object_class->finalize = finalize; object_class->set_property = set_property; object_class->get_property = get_property; /* signals */ /** * SoupSession::request-queued: * @session: the session * @msg: the request that was queued * * Emitted when a request is queued on @session. (Note that * "queued" doesn't just mean soup_session_queue_message(); * soup_session_send_message() implicitly queues the message * as well.) * * When sending a request, first #SoupSession::request_queued * is emitted, indicating that the session has become aware of * the request. * * Once a connection is available to send the request on, the * session emits #SoupSession::request_started. Then, various * #SoupMessage signals are emitted as the message is * processed. If the message is requeued, it will emit * #SoupMessage::restarted, which will then be followed by * another #SoupSession::request_started and another set of * #SoupMessage signals when the message is re-sent. * * Eventually, the message will emit #SoupMessage::finished. * Normally, this signals the completion of message * processing. However, it is possible that the application * will requeue the message from the "finished" handler (or * equivalently, from the soup_session_queue_message() * callback). In that case, the process will loop back to * #SoupSession::request_started. * * Eventually, a message will reach "finished" and not be * requeued. At that point, the session will emit * #SoupSession::request_unqueued to indicate that it is done * with the message. * * To sum up: #SoupSession::request_queued and * #SoupSession::request_unqueued are guaranteed to be emitted * exactly once, but #SoupSession::request_started and * #SoupMessage::finished (and all of the other #SoupMessage * signals) may be invoked multiple times for a given message. * * Since: 2.4.1 **/ signals[REQUEST_QUEUED] = g_signal_new ("request-queued", G_OBJECT_CLASS_TYPE (object_class), G_SIGNAL_RUN_FIRST, 0, /* FIXME? */ NULL, NULL, soup_marshal_NONE__OBJECT, G_TYPE_NONE, 1, SOUP_TYPE_MESSAGE); /** * SoupSession::request-started: * @session: the session * @msg: the request being sent * @socket: the socket the request is being sent on * * Emitted just before a request is sent. See * #SoupSession::request_queued for a detailed description of * the message lifecycle within a session. **/ signals[REQUEST_STARTED] = g_signal_new ("request-started", G_OBJECT_CLASS_TYPE (object_class), G_SIGNAL_RUN_FIRST, G_STRUCT_OFFSET (SoupSessionClass, request_started), NULL, NULL, soup_marshal_NONE__OBJECT_OBJECT, G_TYPE_NONE, 2, SOUP_TYPE_MESSAGE, SOUP_TYPE_SOCKET); /** * SoupSession::request-unqueued: * @session: the session * @msg: the request that was unqueued * * Emitted when a request is removed from @session's queue, * indicating that @session is done with it. See * #SoupSession::request_queued for a detailed description of the * message lifecycle within a session. * * Since: 2.4.1 **/ signals[REQUEST_UNQUEUED] = g_signal_new ("request-unqueued", G_OBJECT_CLASS_TYPE (object_class), G_SIGNAL_RUN_FIRST, 0, /* FIXME? */ NULL, NULL, soup_marshal_NONE__OBJECT, G_TYPE_NONE, 1, SOUP_TYPE_MESSAGE); /** * SoupSession::authenticate: * @session: the session * @msg: the #SoupMessage being sent * @auth: the #SoupAuth to authenticate * @retrying: %TRUE if this is the second (or later) attempt * * Emitted when the session requires authentication. If * credentials are available call soup_auth_authenticate() on * @auth. If these credentials fail, the signal will be * emitted again, with @retrying set to %TRUE, which will * continue until you return without calling * soup_auth_authenticate() on @auth. * * Note that this may be emitted before @msg's body has been * fully read. * * If you call soup_session_pause_message() on @msg before * returning, then you can authenticate @auth asynchronously * (as long as you g_object_ref() it to make sure it doesn't * get destroyed), and then unpause @msg when you are ready * for it to continue. **/ signals[AUTHENTICATE] = g_signal_new ("authenticate", G_OBJECT_CLASS_TYPE (object_class), G_SIGNAL_RUN_FIRST, G_STRUCT_OFFSET (SoupSessionClass, authenticate), NULL, NULL, soup_marshal_NONE__OBJECT_OBJECT_BOOLEAN, G_TYPE_NONE, 3, SOUP_TYPE_MESSAGE, SOUP_TYPE_AUTH, G_TYPE_BOOLEAN); /* properties */ /** * SOUP_SESSION_PROXY_URI: * * Alias for the #SoupSession:proxy-uri property. (The HTTP * proxy to use for this session.) **/ g_object_class_install_property ( object_class, PROP_PROXY_URI, g_param_spec_boxed (SOUP_SESSION_PROXY_URI, "Proxy URI", "The HTTP Proxy to use for this session", SOUP_TYPE_URI, G_PARAM_READWRITE)); /** * SOUP_SESSION_MAX_CONNS: * * Alias for the #SoupSession:max-conns property. (The maximum * number of connections that the session can open at once.) **/ g_object_class_install_property ( object_class, PROP_MAX_CONNS, g_param_spec_int (SOUP_SESSION_MAX_CONNS, "Max Connection Count", "The maximum number of connections that the session can open at once", 1, G_MAXINT, SOUP_SESSION_MAX_CONNS_DEFAULT, G_PARAM_READWRITE)); /** * SOUP_SESSION_MAX_CONNS_PER_HOST: * * Alias for the #SoupSession:max-conns-per-host property. * (The maximum number of connections that the session can * open at once to a given host.) **/ g_object_class_install_property ( object_class, PROP_MAX_CONNS_PER_HOST, g_param_spec_int (SOUP_SESSION_MAX_CONNS_PER_HOST, "Max Per-Host Connection Count", "The maximum number of connections that the session can open at once to a given host", 1, G_MAXINT, SOUP_SESSION_MAX_CONNS_PER_HOST_DEFAULT, G_PARAM_READWRITE)); /** * SoupSession:idle-timeout: * * Connection lifetime when idle * * Since: 2.4.1 **/ /** * SOUP_SESSION_IDLE_TIMEOUT: * * Alias for the #SoupSession:idle-timeout property. (The idle * connection lifetime.) * * Since: 2.4.1 **/ g_object_class_install_property ( object_class, PROP_IDLE_TIMEOUT, g_param_spec_uint (SOUP_SESSION_IDLE_TIMEOUT, "Idle Timeout", "Connection lifetime when idle", 0, G_MAXUINT, 0, G_PARAM_READWRITE)); /** * SOUP_SESSION_USE_NTLM: * * Alias for the #SoupSession:use-ntlm property. (Whether or * not to use NTLM authentication.) **/ g_object_class_install_property ( object_class, PROP_USE_NTLM, g_param_spec_boolean (SOUP_SESSION_USE_NTLM, "Use NTLM", "Whether or not to use NTLM authentication", FALSE, G_PARAM_READWRITE)); /** * SOUP_SESSION_SSL_CA_FILE: * * Alias for the #SoupSession:ssl-ca-file property. (File * containing SSL CA certificates.) **/ g_object_class_install_property ( object_class, PROP_SSL_CA_FILE, g_param_spec_string (SOUP_SESSION_SSL_CA_FILE, "SSL CA file", "File containing SSL CA certificates", NULL, G_PARAM_READWRITE)); /** * SOUP_SESSION_ASYNC_CONTEXT: * * Alias for the #SoupSession:async-context property. (The * session's #GMainContext.) **/ g_object_class_install_property ( object_class, PROP_ASYNC_CONTEXT, g_param_spec_pointer (SOUP_SESSION_ASYNC_CONTEXT, "Async GMainContext", "The GMainContext to dispatch async I/O in", G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY)); /** * SOUP_SESSION_TIMEOUT: * * Alias for the #SoupSession:timeout property. (The timeout * in seconds for blocking socket I/O operations.) **/ g_object_class_install_property ( object_class, PROP_TIMEOUT, g_param_spec_uint (SOUP_SESSION_TIMEOUT, "Timeout value", "Value in seconds to timeout a blocking I/O", 0, G_MAXUINT, 0, G_PARAM_READWRITE)); /** * SoupSession:user-agent: * * If non-%NULL, the value to use for the "User-Agent" header * on #SoupMessage<!-- -->s sent from this session. * * RFC 2616 says: "The User-Agent request-header field * contains information about the user agent originating the * request. This is for statistical purposes, the tracing of * protocol violations, and automated recognition of user * agents for the sake of tailoring responses to avoid * particular user agent limitations. User agents SHOULD * include this field with requests." * * The User-Agent header contains a list of one or more * product tokens, separated by whitespace, with the most * significant product token coming first. The tokens must be * brief, ASCII, and mostly alphanumeric (although "-", "_", * and "." are also allowed), and may optionally include a "/" * followed by a version string. You may also put comments, * enclosed in parentheses, between or after the tokens. * * If you set a %user_agent property that has trailing * whitespace, #SoupSession will append its own product token * (eg, "<literal>libsoup/2.3.2</literal>") to the end of the * header for you. **/ /** * SOUP_SESSION_USER_AGENT: * * Alias for the #SoupSession:user-agent property, qv. **/ g_object_class_install_property ( object_class, PROP_USER_AGENT, g_param_spec_string (SOUP_SESSION_USER_AGENT, "User-Agent string", "User-Agent string", NULL, G_PARAM_READWRITE)); /** * SoupSession:add-feature: * * Add a feature object to the session. (Shortcut for calling * soup_session_add_feature().) * * Since: 2.24 **/ /** * SOUP_SESSION_ADD_FEATURE: * * Alias for the #SoupSession:add-feature property. (Shortcut * for calling soup_session_add_feature(). * * Since: 2.24 **/ g_object_class_install_property ( object_class, PROP_ADD_FEATURE, g_param_spec_object (SOUP_SESSION_ADD_FEATURE, "Add Feature", "Add a feature object to the session", SOUP_TYPE_SESSION_FEATURE, G_PARAM_READWRITE)); /** * SoupSession:add-feature-by-type: * * Add a feature object of the given type to the session. * (Shortcut for calling soup_session_add_feature_by_type().) * * Since: 2.24 **/ /** * SOUP_SESSION_ADD_FEATURE_BY_TYPE: * * Alias for the #SoupSession:add-feature-by-type property. * (Shortcut for calling soup_session_add_feature_by_type(). * * Since: 2.24 **/ g_object_class_install_property ( object_class, PROP_ADD_FEATURE_BY_TYPE, g_param_spec_gtype (SOUP_SESSION_ADD_FEATURE_BY_TYPE, "Add Feature By Type", "Add a feature object of the given type to the session", SOUP_TYPE_SESSION_FEATURE, G_PARAM_READWRITE)); /** * SoupSession:remove-feature-by-type: * * Remove feature objects from the session. (Shortcut for * calling soup_session_remove_feature_by_type().) * * Since: 2.24 **/ /** * SOUP_SESSION_REMOVE_FEATURE_BY_TYPE: * * Alias for the #SoupSession:remove-feature-by-type * property. (Shortcut for calling * soup_session_remove_feature_by_type(). * * Since: 2.24 **/ g_object_class_install_property ( object_class, PROP_REMOVE_FEATURE_BY_TYPE, g_param_spec_gtype (SOUP_SESSION_REMOVE_FEATURE_BY_TYPE, "Remove Feature By Type", "Remove features of the given type from the session", SOUP_TYPE_SESSION_FEATURE, G_PARAM_READWRITE)); }
gobject_class = G_OBJECT_CLASS (class); gobject_class->finalize = katze_array_finalize; gobject_class->set_property = _katze_array_set_property; class->add_item = _katze_array_add_item; class->remove_item = _katze_array_remove_item; class->move_item = _katze_array_move_item; class->clear = _katze_array_clear; class->update = _katze_array_update; g_object_class_install_property (gobject_class, PROP_TYPE, g_param_spec_gtype ( "type", "Type", "The array item type", G_TYPE_NONE, G_PARAM_WRITABLE|G_PARAM_CONSTRUCT_ONLY)); g_type_class_add_private (class, sizeof (KatzeArrayPrivate)); } static void katze_array_init (KatzeArray* array) { array->priv = G_TYPE_INSTANCE_GET_PRIVATE (array, KATZE_TYPE_ARRAY, KatzeArrayPrivate); array->priv->type = G_TYPE_OBJECT; array->priv->items = NULL; }
static void daemon_helpers_list_helper_class_init (DaemonHelpersListHelperClass * klass) { daemon_helpers_list_helper_parent_class = g_type_class_peek_parent (klass); g_type_class_add_private (klass, sizeof (DaemonHelpersListHelperPrivate)); G_OBJECT_CLASS (klass)->get_property = _vala_daemon_helpers_list_helper_get_property; G_OBJECT_CLASS (klass)->set_property = _vala_daemon_helpers_list_helper_set_property; g_object_class_install_property (G_OBJECT_CLASS (klass), DAEMON_HELPERS_LIST_HELPER_T_TYPE, g_param_spec_gtype ("t-type", "type", "type", G_TYPE_NONE, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_WRITABLE | G_PARAM_CONSTRUCT_ONLY)); g_object_class_install_property (G_OBJECT_CLASS (klass), DAEMON_HELPERS_LIST_HELPER_T_DUP_FUNC, g_param_spec_pointer ("t-dup-func", "dup func", "dup func", G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_WRITABLE | G_PARAM_CONSTRUCT_ONLY)); g_object_class_install_property (G_OBJECT_CLASS (klass), DAEMON_HELPERS_LIST_HELPER_T_DESTROY_FUNC, g_param_spec_pointer ("t-destroy-func", "destroy func", "destroy func", G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_WRITABLE | G_PARAM_CONSTRUCT_ONLY)); }
void ags_recall_container_class_init(AgsRecallContainerClass *recall_container) { GObjectClass *gobject; GParamSpec *param_spec; ags_recall_container_parent_class = g_type_class_peek_parent(recall_container); /* GObjectClass */ gobject = (GObjectClass *) recall_container; gobject->finalize = ags_recall_container_finalize; gobject->set_property = ags_recall_container_set_property; gobject->get_property = ags_recall_container_get_property; /* properties */ /** * RecallContainer:recall-audio-type: * * The associated recall type within audio context. * * Since: 0.4.0 */ param_spec = g_param_spec_gtype("recall-audio-type\0", "audio level recall type\0", "The recall type which this recall container has on audio level\0", G_TYPE_NONE, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_RECALL_AUDIO_TYPE, param_spec); /** * RecallContainer:recall-audio: * * The associated recall within audio context. * * Since: 0.4.0 */ param_spec = g_param_spec_object("recall-audio\0", "audio level recall\0", "The recall which this recall container has on audio level\0", AGS_TYPE_RECALL_AUDIO, G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_RECALL_AUDIO, param_spec); /** * RecallContainer:recall-audio-run-type: * * The associated recall type within dynamic audio context. * * Since: 0.4.0 */ param_spec = g_param_spec_gtype("recall-audio-run-type\0", "audio runlevel recall type\0", "The recall type which this recall container has on audio level during a run\0", G_TYPE_NONE, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_RECALL_AUDIO_RUN_TYPE, param_spec); /** * RecallContainer:recall-audio-run: * * The associated recall within dynamic audio context. * * Since: 0.4.0 */ param_spec = g_param_spec_object("recall-audio-run\0", "audio runlevel recall\0", "The recall which this recall container has on audio level during a run\0", AGS_TYPE_RECALL_AUDIO_RUN, G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_RECALL_AUDIO_RUN, param_spec); /** * RecallContainer:recall-channel-type: * * The associated recall type within channel context. * * Since: 0.4.0 */ param_spec = g_param_spec_gtype("recall-channel-type\0", "channel level recall type\0", "The recall type which this recall container has on channel level\0", G_TYPE_NONE, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_RECALL_CHANNEL_TYPE, param_spec); /** * RecallContainer:recall-channel: * * The associated recall within channel context. * * Since: 0.4.0 */ param_spec = g_param_spec_object("recall-channel\0", "channel level recall\0", "The recall which this recall container has on channel level\0", AGS_TYPE_RECALL_CHANNEL, G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_RECALL_CHANNEL, param_spec); /** * RecallContainer:recall-channel-run-type: * * The associated recall type within dynamic channel context. * * Since: 0.4.0 */ param_spec = g_param_spec_gtype("recall_channel_run_type\0", "channel runlevel recall type\0", "The recall type which this recall container has on audio level during a run\0", G_TYPE_NONE, G_PARAM_READABLE | G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_RECALL_CHANNEL_RUN_TYPE, param_spec); /** * RecallContainer:recall-audio-run: * * The associated recall within dynamic channel context. * * Since: 0.4.0 */ param_spec = g_param_spec_object("recall_channel_run\0", "channel runlevel recall\0", "The recall which this recall container has on audio level during a run\0", AGS_TYPE_RECALL_CHANNEL_RUN, G_PARAM_WRITABLE); g_object_class_install_property(gobject, PROP_RECALL_CHANNEL_RUN, param_spec); }
g_object_class_install_property (object_class, PROP_VALUE_ATTRIBUTES, g_param_spec_flags ("value-attributes", NULL, NULL, GDA_TYPE_VALUE_ATTRIBUTE, GDA_VALUE_ATTR_NONE, G_PARAM_READWRITE)); g_object_class_install_property (object_class, PROP_TO_BE_DELETED, g_param_spec_boolean ("to-be-deleted", NULL, NULL, FALSE, G_PARAM_WRITABLE)); g_object_class_install_property(object_class, PROP_DATA_HANDLER, g_param_spec_object("data-handler", NULL, NULL, GDA_TYPE_DATA_HANDLER, G_PARAM_WRITABLE|G_PARAM_CONSTRUCT_ONLY)); g_object_class_install_property(object_class, PROP_TYPE, g_param_spec_gtype("type", NULL, NULL, G_TYPE_NONE, G_PARAM_WRITABLE|G_PARAM_CONSTRUCT_ONLY)); g_object_class_install_property(object_class, PROP_OPTIONS, g_param_spec_string("options", NULL, NULL, NULL, G_PARAM_WRITABLE)); text_cell_renderer_textual_signals [CHANGED] = g_signal_new ("changed", G_OBJECT_CLASS_TYPE (object_class), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (GdauiDataCellRendererTextualClass, changed), NULL, NULL, _gdaui_marshal_VOID__STRING_VALUE, G_TYPE_NONE, 2, G_TYPE_STRING,
static void web_service_class_init (WebServiceClass *klass) { GObjectClass *object_class; GthTaskClass *task_class; g_type_class_add_private (klass, sizeof (WebServicePrivate)); object_class = (GObjectClass*) klass; object_class->finalize = web_service_finalize; object_class->set_property = web_service_set_property; object_class->get_property = web_service_get_property; object_class->constructed = web_service_constructed; task_class = (GthTaskClass*) klass; task_class->exec = web_service_exec; task_class->cancelled = web_service_cancelled; /* properties */ g_object_class_install_property (object_class, PROP_SERVICE_NAME, g_param_spec_string ("service-name", "Service Name", "", NULL, G_PARAM_READWRITE | G_PARAM_CONSTRUCT)); g_object_class_install_property (object_class, PROP_SERVICE_ADDRESS, g_param_spec_string ("service-address", "Service Address", "", NULL, G_PARAM_READWRITE | G_PARAM_CONSTRUCT)); g_object_class_install_property (object_class, PROP_SERVICE_PROTOCOL, g_param_spec_string ("service-protocol", "Service Protocol", "", NULL, G_PARAM_READWRITE | G_PARAM_CONSTRUCT)); g_object_class_install_property (object_class, PROP_ACCOUNT_TYPE, g_param_spec_gtype ("account-type", "Account type", "", OAUTH_TYPE_ACCOUNT, G_PARAM_READWRITE | G_PARAM_CONSTRUCT)); g_object_class_install_property (object_class, PROP_CANCELLABLE, g_param_spec_object ("cancellable", "Cancellable", "", G_TYPE_CANCELLABLE, G_PARAM_READWRITE)); g_object_class_install_property (object_class, PROP_BROWSER, g_param_spec_pointer ("browser", "Browser", "", G_PARAM_READWRITE)); g_object_class_install_property (object_class, PROP_DIALOG, g_param_spec_pointer ("dialog", "Dialog", "", G_PARAM_READWRITE)); /* signals */ web_service_signals[ACCOUNT_READY] = g_signal_new ("account-ready", G_TYPE_FROM_CLASS (klass), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (WebServiceClass, account_ready), NULL, NULL, g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0); web_service_signals[ACCOUNTS_CHANGED] = g_signal_new ("accounts-changed", G_TYPE_FROM_CLASS (klass), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (WebServiceClass, accounts_changed), NULL, NULL, g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0); }
static void daemon_plugin_registrar_class_init (DaemonPluginRegistrarClass * klass) { daemon_plugin_registrar_parent_class = g_type_class_peek_parent (klass); g_type_class_add_private (klass, sizeof (DaemonPluginRegistrarPrivate)); G_OBJECT_CLASS (klass)->get_property = _vala_daemon_plugin_registrar_get_property; G_OBJECT_CLASS (klass)->set_property = _vala_daemon_plugin_registrar_set_property; G_OBJECT_CLASS (klass)->finalize = daemon_plugin_registrar_finalize; g_object_class_install_property (G_OBJECT_CLASS (klass), DAEMON_PLUGIN_REGISTRAR_T_TYPE, g_param_spec_gtype ("t-type", "type", "type", G_TYPE_NONE, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_WRITABLE | G_PARAM_CONSTRUCT_ONLY)); g_object_class_install_property (G_OBJECT_CLASS (klass), DAEMON_PLUGIN_REGISTRAR_T_DUP_FUNC, g_param_spec_pointer ("t-dup-func", "dup func", "dup func", G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_WRITABLE | G_PARAM_CONSTRUCT_ONLY)); g_object_class_install_property (G_OBJECT_CLASS (klass), DAEMON_PLUGIN_REGISTRAR_T_DESTROY_FUNC, g_param_spec_pointer ("t-destroy-func", "destroy func", "destroy func", G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_WRITABLE | G_PARAM_CONSTRUCT_ONLY)); g_object_class_install_property (G_OBJECT_CLASS (klass), DAEMON_PLUGIN_REGISTRAR_PATH, g_param_spec_string ("Path", "Path", "Path", NULL, G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB | G_PARAM_READABLE)); }
static void peas_extension_set_class_init (PeasExtensionSetClass *klass) { GType the_type = G_TYPE_FROM_CLASS (klass); GObjectClass *object_class = G_OBJECT_CLASS (klass); object_class->set_property = peas_extension_set_set_property; object_class->get_property = peas_extension_set_get_property; object_class->constructed = peas_extension_set_constructed; object_class->dispose = peas_extension_set_dispose; klass->call = peas_extension_set_call_real; /** * PeasExtensionSet::extension-added: * @set: A #PeasExtensionSet. * @info: A #PeasPluginInfo. * @exten: A #PeasExtension. * * The extension-added signal is emitted when a new extension has been * added to the #PeasExtensionSet. It happens when a new plugin implementing * the extension set's extension type is loaded. * * You should connect to this signal in order to set up the extensions when * they are loaded. Note that this signal is not fired for extensions coming * from plugins that were already loaded when the #PeasExtensionSet instance * was created. You should set those up by yourself. */ signals[EXTENSION_ADDED] = g_signal_new ("extension-added", the_type, G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (PeasExtensionSetClass, extension_added), NULL, NULL, peas_cclosure_marshal_VOID__BOXED_OBJECT, G_TYPE_NONE, 2, PEAS_TYPE_PLUGIN_INFO | G_SIGNAL_TYPE_STATIC_SCOPE, PEAS_TYPE_EXTENSION); /** * PeasExtensionSet::extension-removed: * @set: A #PeasExtensionSet. * @info: A #PeasPluginInfo. * @exten: A #PeasExtension. * * The extension-removed signal is emitted when a new extension is about to be * removed from the #PeasExtensionSet. It happens when a plugin implementing * the extension set's extension type is unloaded, or when the * #PeasExtensionSet itself is destroyed. * * You should connect to this signal in order to clean up the extensions * when their plugin is unload. Note that this signal is not fired for the * #PeasExtension instances still available when the #PeasExtensionSet * instance is destroyed. You should clean those up by yourself. */ signals[EXTENSION_REMOVED] = g_signal_new ("extension-removed", the_type, G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (PeasExtensionSetClass, extension_removed), NULL, NULL, peas_cclosure_marshal_VOID__BOXED_OBJECT, G_TYPE_NONE, 2, PEAS_TYPE_PLUGIN_INFO | G_SIGNAL_TYPE_STATIC_SCOPE, PEAS_TYPE_EXTENSION); g_object_class_install_property (object_class, PROP_ENGINE, g_param_spec_object ("engine", "Engine", "The PeasEngine this set is attached to", PEAS_TYPE_ENGINE, G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY | G_PARAM_STATIC_STRINGS)); g_object_class_install_property (object_class, PROP_EXTENSION_TYPE, g_param_spec_gtype ("extension-type", "Extension Type", "The extension GType managed by this set", G_TYPE_NONE, G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY | G_PARAM_STATIC_STRINGS)); g_object_class_install_property (object_class, PROP_CONSTRUCT_PROPERTIES, g_param_spec_pointer ("construct-properties", "Construct Properties", "The properties to pass the extensions when creating them", G_PARAM_WRITABLE | G_PARAM_CONSTRUCT_ONLY | G_PARAM_STATIC_STRINGS)); g_type_class_add_private (klass, sizeof (PeasExtensionSetPrivate)); }
/* XXX Historical note, originally I tried (ab)using override properties * in ESourceCamel, which redirected to the equivalent CamelSettings * property. Seemed to work at first, and I was proud of my clever * hack, but it turns out g_object_class_list_properties() excludes * override properties. So the ESourceCamel properties were being * skipped in source_load_from_key_file() (e-source.c). */ static GParamSpec * param_spec_clone (GParamSpec *pspec) { GParamSpec *clone; GParamFlags flags; const gchar *name, *nick, *blurb; name = g_param_spec_get_name (pspec); nick = g_param_spec_get_nick (pspec); blurb = g_param_spec_get_blurb (pspec); flags = (pspec->flags & ~(G_PARAM_STATIC_STRINGS)); if (G_IS_PARAM_SPEC_BOOLEAN (pspec)) { GParamSpecBoolean *pspec_boolean = G_PARAM_SPEC_BOOLEAN (pspec); clone = g_param_spec_boolean (name, nick, blurb, pspec_boolean->default_value, flags); } else if (G_IS_PARAM_SPEC_CHAR (pspec)) { GParamSpecChar *pspec_char = G_PARAM_SPEC_CHAR (pspec); clone = g_param_spec_char (name, nick, blurb, pspec_char->minimum, pspec_char->maximum, pspec_char->default_value, flags); } else if (G_IS_PARAM_SPEC_UCHAR (pspec)) { GParamSpecUChar *pspec_uchar = G_PARAM_SPEC_UCHAR (pspec); clone = g_param_spec_uchar (name, nick, blurb, pspec_uchar->minimum, pspec_uchar->maximum, pspec_uchar->default_value, flags); } else if (G_IS_PARAM_SPEC_INT (pspec)) { GParamSpecInt *pspec_int = G_PARAM_SPEC_INT (pspec); clone = g_param_spec_int (name, nick, blurb, pspec_int->minimum, pspec_int->maximum, pspec_int->default_value, flags); } else if (G_IS_PARAM_SPEC_UINT (pspec)) { GParamSpecUInt *pspec_uint = G_PARAM_SPEC_UINT (pspec); clone = g_param_spec_uint (name, nick, blurb, pspec_uint->minimum, pspec_uint->maximum, pspec_uint->default_value, flags); } else if (G_IS_PARAM_SPEC_LONG (pspec)) { GParamSpecLong *pspec_long = G_PARAM_SPEC_LONG (pspec); clone = g_param_spec_long (name, nick, blurb, pspec_long->minimum, pspec_long->maximum, pspec_long->default_value, flags); } else if (G_IS_PARAM_SPEC_ULONG (pspec)) { GParamSpecULong *pspec_ulong = G_PARAM_SPEC_ULONG (pspec); clone = g_param_spec_ulong (name, nick, blurb, pspec_ulong->minimum, pspec_ulong->maximum, pspec_ulong->default_value, flags); } else if (G_IS_PARAM_SPEC_INT64 (pspec)) { GParamSpecInt64 *pspec_int64 = G_PARAM_SPEC_INT64 (pspec); clone = g_param_spec_int64 (name, nick, blurb, pspec_int64->minimum, pspec_int64->maximum, pspec_int64->default_value, flags); } else if (G_IS_PARAM_SPEC_UINT64 (pspec)) { GParamSpecUInt64 *pspec_uint64 = G_PARAM_SPEC_UINT64 (pspec); clone = g_param_spec_uint64 (name, nick, blurb, pspec_uint64->minimum, pspec_uint64->maximum, pspec_uint64->default_value, flags); } else if (G_IS_PARAM_SPEC_FLOAT (pspec)) { GParamSpecFloat *pspec_float = G_PARAM_SPEC_FLOAT (pspec); clone = g_param_spec_float (name, nick, blurb, pspec_float->minimum, pspec_float->maximum, pspec_float->default_value, flags); } else if (G_IS_PARAM_SPEC_DOUBLE (pspec)) { GParamSpecDouble *pspec_double = G_PARAM_SPEC_DOUBLE (pspec); clone = g_param_spec_double (name, nick, blurb, pspec_double->minimum, pspec_double->maximum, pspec_double->default_value, flags); } else if (G_IS_PARAM_SPEC_ENUM (pspec)) { GParamSpecEnum *pspec_enum = G_PARAM_SPEC_ENUM (pspec); clone = g_param_spec_enum (name, nick, blurb, pspec->value_type, pspec_enum->default_value, flags); } else if (G_IS_PARAM_SPEC_FLAGS (pspec)) { GParamSpecFlags *pspec_flags = G_PARAM_SPEC_FLAGS (pspec); clone = g_param_spec_flags (name, nick, blurb, pspec->value_type, pspec_flags->default_value, flags); } else if (G_IS_PARAM_SPEC_STRING (pspec)) { GParamSpecString *pspec_string = G_PARAM_SPEC_STRING (pspec); clone = g_param_spec_string (name, nick, blurb, pspec_string->default_value, flags); } else if (G_IS_PARAM_SPEC_PARAM (pspec)) { clone = g_param_spec_param (name, nick, blurb, pspec->value_type, flags); } else if (G_IS_PARAM_SPEC_BOXED (pspec)) { clone = g_param_spec_boxed (name, nick, blurb, pspec->value_type, flags); } else if (G_IS_PARAM_SPEC_POINTER (pspec)) { clone = g_param_spec_pointer (name, nick, blurb, flags); } else if (G_IS_PARAM_SPEC_OBJECT (pspec)) { clone = g_param_spec_object (name, nick, blurb, pspec->value_type, flags); } else if (G_IS_PARAM_SPEC_UNICHAR (pspec)) { GParamSpecUnichar *pspec_unichar = G_PARAM_SPEC_UNICHAR (pspec); clone = g_param_spec_unichar (name, nick, blurb, pspec_unichar->default_value, flags); } else if (G_IS_PARAM_SPEC_GTYPE (pspec)) { GParamSpecGType *pspec_gtype = G_PARAM_SPEC_GTYPE (pspec); clone = g_param_spec_gtype (name, nick, blurb, pspec_gtype->is_a_type, flags); } else if (G_IS_PARAM_SPEC_VARIANT (pspec)) { GParamSpecVariant *pspec_variant = G_PARAM_SPEC_VARIANT (pspec); clone = g_param_spec_variant (name, nick, blurb, pspec_variant->type, pspec_variant->default_value, flags); } else { g_warn_if_reached (); } return clone; }
static void catch_resource_group_class_init (CatchResourceGroupClass *klass) { GObjectClass *object_class; object_class = G_OBJECT_CLASS(klass); object_class->finalize = catch_resource_group_finalize; object_class->get_property = catch_resource_group_get_property; object_class->set_property = catch_resource_group_set_property; g_type_class_add_private(object_class, sizeof(CatchResourceGroupPrivate)); /** * CatchResourceGroup:count: * * The number of resources in the #CatchResourceGroup. */ gParamSpecs[PROP_COUNT] = g_param_spec_uint("count", _("Count"), _("The number of items in the resource group."), 0, G_MAXUINT, 0, G_PARAM_READABLE); g_object_class_install_property(object_class, PROP_COUNT, gParamSpecs[PROP_COUNT]); /** * CatchResourceGroup:filter: * * A filter used to search for resources. */ gParamSpecs[PROP_FILTER] = g_param_spec_object("filter", _("Filter"), _("The GomFilter for the query."), GOM_TYPE_FILTER, G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY); g_object_class_install_property(object_class, PROP_FILTER, gParamSpecs[PROP_FILTER]); /** * CatchResourceGroup:group: * * The handle to the GomResourceGroup used for accessing items * from the SQLite database. */ gParamSpecs[PROP_GROUP] = g_param_spec_object("group", _("Group"), _("The underlying GomResourceGroup."), GOM_TYPE_RESOURCE_GROUP, G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY); g_object_class_install_property(object_class, PROP_GROUP, gParamSpecs[PROP_GROUP]); /** * CatchResourceGroup:resource-type: * * The #GType of #CatchResource instances to fetch. */ gParamSpecs[PROP_RESOURCE_TYPE] = g_param_spec_gtype("resource-type", _("Resource Type"), _("The object resource type."), CATCH_TYPE_RESOURCE, G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY); g_object_class_install_property(object_class, PROP_RESOURCE_TYPE, gParamSpecs[PROP_RESOURCE_TYPE]); /** * CatchResourceGroup:session: * * The #CatchSession to use for querying and credentials. */ gParamSpecs[PROP_SESSION] = g_param_spec_object("session", _("Session"), _("The CatchSession."), CATCH_TYPE_SESSION, G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY); g_object_class_install_property(object_class, PROP_SESSION, gParamSpecs[PROP_SESSION]); }
static void gst_pad_template_class_init (GstPadTemplateClass * klass) { GObjectClass *gobject_class; GstObjectClass *gstobject_class; gobject_class = (GObjectClass *) klass; gstobject_class = (GstObjectClass *) klass; /** * GstPadTemplate::pad-created: * @pad_template: the object which received the signal. * @pad: the pad that was created. * * This signal is fired when an element creates a pad from this template. */ gst_pad_template_signals[TEMPL_PAD_CREATED] = g_signal_new ("pad-created", G_TYPE_FROM_CLASS (klass), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (GstPadTemplateClass, pad_created), NULL, NULL, g_cclosure_marshal_generic, G_TYPE_NONE, 1, GST_TYPE_PAD); gobject_class->dispose = gst_pad_template_dispose; gobject_class->get_property = gst_pad_template_get_property; gobject_class->set_property = gst_pad_template_set_property; /** * GstPadTemplate:name-template: * * The name template of the pad template. */ g_object_class_install_property (gobject_class, PROP_NAME_TEMPLATE, g_param_spec_string ("name-template", "Name template", "The name template of the pad template", NULL, G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY | G_PARAM_STATIC_STRINGS)); /** * GstPadTemplate:direction: * * The direction of the pad described by the pad template. */ g_object_class_install_property (gobject_class, PROP_DIRECTION, g_param_spec_enum ("direction", "Direction", "The direction of the pad described by the pad template", GST_TYPE_PAD_DIRECTION, GST_PAD_UNKNOWN, G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY | G_PARAM_STATIC_STRINGS)); /** * GstPadTemplate:presence: * * When the pad described by the pad template will become available. */ g_object_class_install_property (gobject_class, PROP_PRESENCE, g_param_spec_enum ("presence", "Presence", "When the pad described by the pad template will become available", GST_TYPE_PAD_PRESENCE, GST_PAD_ALWAYS, G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY | G_PARAM_STATIC_STRINGS)); /** * GstPadTemplate:caps: * * The capabilities of the pad described by the pad template. */ g_object_class_install_property (gobject_class, PROP_CAPS, g_param_spec_boxed ("caps", "Caps", "The capabilities of the pad described by the pad template", GST_TYPE_CAPS, G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY | G_PARAM_STATIC_STRINGS)); /** * GstPadTemplate:gtype: * * The type of the pad described by the pad template. * * Since: 1.14 */ g_object_class_install_property (gobject_class, PROP_GTYPE, g_param_spec_gtype ("gtype", "GType", "The GType of the pad described by the pad template", G_TYPE_NONE, G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY | G_PARAM_STATIC_STRINGS)); gstobject_class->path_string_separator = "*"; }