static void gtd_object_class_init (GtdObjectClass *klass) { GObjectClass *object_class = G_OBJECT_CLASS (klass); klass->get_uid = gtd_object_real_get_uid; klass->set_uid = gtd_object_real_set_uid; object_class->finalize = gtd_object_finalize; object_class->get_property = gtd_object_get_property; object_class->set_property = gtd_object_set_property; /** * GtdObject::uid: * * The unique identified of the object, set by the backend. */ properties[PROP_UID] = g_param_spec_string ("uid", "Unique identifier of the object", "The unique identifier of the object, defined by the backend", NULL, G_PARAM_READWRITE | G_PARAM_CONSTRUCT | G_PARAM_STATIC_STRINGS); /** * GtdObject::loading: * * Whether the object is loading or not. */ properties[PROP_LOADING] = g_param_spec_boolean ("loading", "Loading state of the object", "Whether the object is loading or not", TRUE, G_PARAM_READABLE | G_PARAM_STATIC_STRINGS); g_object_class_install_properties (object_class, N_PROPS, properties); }
static void gb_terminal_view_class_init (GbTerminalViewClass *klass) { GObjectClass *object_class = G_OBJECT_CLASS (klass); GtkWidgetClass *widget_class = GTK_WIDGET_CLASS (klass); IdeLayoutViewClass *view_class = IDE_LAYOUT_VIEW_CLASS (klass); object_class->finalize = gb_terminal_view_finalize; object_class->set_property = gb_terminal_view_set_property; widget_class->realize = gb_terminal_realize; widget_class->get_preferred_width = gb_terminal_get_preferred_width; widget_class->get_preferred_height = gb_terminal_get_preferred_height; widget_class->grab_focus = gb_terminal_grab_focus; view_class->get_title = gb_terminal_get_title; view_class->create_split = gb_terminal_create_split; view_class->set_split_view = gb_terminal_set_split_view; gtk_widget_class_set_template_from_resource (widget_class, "/org/gnome/builder/plugins/terminal/gb-terminal-view.ui"); gtk_widget_class_bind_template_child (widget_class, GbTerminalView, terminal_top); gtk_widget_class_bind_template_child (widget_class, GbTerminalView, bottom_container); g_type_ensure (VTE_TYPE_TERMINAL); properties [PROP_FONT_NAME] = g_param_spec_string ("font-name", "Font Name", "Font Name", NULL, (G_PARAM_WRITABLE | G_PARAM_STATIC_STRINGS)); g_object_class_install_properties (object_class, LAST_PROP, properties); g_type_ensure (GB_TYPE_TERMINAL); }
static void kms_muxing_pipeline_class_init (KmsMuxingPipelineClass * klass) { GObjectClass *objclass = G_OBJECT_CLASS (klass); objclass->finalize = kms_muxing_pipeline_finalize; objclass->dispose = kms_muxing_pipeline_dispose; objclass->set_property = kms_muxing_pipeline_set_property; objclass->get_property = kms_muxing_pipeline_get_property; /* Install properties */ obj_properties[PROP_VIDEO_APPSRC] = g_param_spec_object (KMS_MUXING_PIPELINE_VIDEO_APPSRC, "Video appsrc element", "Video media input for the pipeline", GST_TYPE_ELEMENT, (G_PARAM_READABLE)); obj_properties[PROP_AUDIO_APPSRC] = g_param_spec_object (KMS_MUXING_PIPELINE_AUDIO_APPSRC, "Audio appsrc element", "Audio media input for the pipeline", GST_TYPE_ELEMENT, (G_PARAM_READABLE)); obj_properties[PROP_SINK] = g_param_spec_object (KMS_MUXING_PIPELINE_SINK, "Sink element", "Sink element", GST_TYPE_ELEMENT, (G_PARAM_CONSTRUCT_ONLY | G_PARAM_READWRITE)); obj_properties[PROP_PROFILE] = g_param_spec_enum (KMS_MUXING_PIPELINE_PROFILE, "Recording profile", "The profile used to encapsulate media", KMS_TYPE_RECORDING_PROFILE, KMS_MUXING_PIPELINE_DEFAULT_RECORDING_PROFILE, (G_PARAM_CONSTRUCT_ONLY | G_PARAM_READWRITE)); g_object_class_install_properties (objclass, N_PROPERTIES, obj_properties); g_type_class_add_private (klass, sizeof (KmsMuxingPipelinePrivate)); }
static void crank_shape2_vertexed_class_init (CrankShape2VertexedClass *c) { GObjectClass *c_gobject; CrankShape2FiniteClass *c_shape2finite; c_gobject = G_OBJECT_CLASS (c); c_gobject->get_property = crank_shape2_vertexed_get_property; pspecs[PROP_DIMENSION] = g_param_spec_uint ( "dimension", "dimension", "Dimension of vertexed shape.", 0, 2, 0, G_PARAM_READABLE | G_PARAM_STATIC_STRINGS); pspecs[PROP_NVERTICES] = g_param_spec_uint ( "nvertices", "nvertices", "Number of vertices.", 0, G_MAXUINT, 0, G_PARAM_READABLE | G_PARAM_STATIC_STRINGS); pspecs[PROP_NEDGES] = g_param_spec_uint ( "nedges", "nedges", "Number of edges.", 0, G_MAXUINT, 0, G_PARAM_READABLE | G_PARAM_STATIC_STRINGS); g_object_class_install_properties (c_gobject, PROP_COUNTS, pspecs); c_shape2finite = CRANK_SHAPE2_FINITE_CLASS (c); c_shape2finite->get_bound_radius = crank_shape2_vertexed_get_bound_radius; c_shape2finite->approximate_vertexed = crank_shape2_vertexed_approximate_vertexed; c->get_farthest_vertex = crank_shape2_vertexed_def_get_farthest_vertex; }
static void gd_tagged_entry_tag_class_init (GdTaggedEntryTagClass *klass) { GObjectClass *oclass = G_OBJECT_CLASS (klass); oclass->finalize = gd_tagged_entry_tag_finalize; oclass->set_property = gd_tagged_entry_tag_set_property; oclass->get_property = gd_tagged_entry_tag_get_property; tag_properties[PROP_TAG_LABEL] = g_param_spec_string ("label", "Label", "Text to show on the tag.", NULL, G_PARAM_CONSTRUCT | G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS); tag_properties[PROP_TAG_HAS_CLOSE_BUTTON] = g_param_spec_boolean ("has-close-button", "Tag has a close button", "Whether the tag has a close button.", TRUE, G_PARAM_CONSTRUCT | G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS); tag_properties[PROP_TAG_STYLE] = g_param_spec_string ("style", "Style", "Style of the tag.", "documents-entry-tag", G_PARAM_CONSTRUCT | G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS); g_object_class_install_properties (oclass, NUM_TAG_PROPERTIES, tag_properties); }
static void st_background_effect_class_init (StBackgroundEffectClass *klass) { ClutterEffectClass *effect_class = CLUTTER_EFFECT_CLASS (klass); GObjectClass *gobject_class = G_OBJECT_CLASS (klass); ClutterOffscreenEffectClass *offscreen_class; effect_class->pre_paint = st_background_effect_pre_paint; gobject_class->set_property = st_background_effect_set_property; gobject_class->get_property = st_background_effect_get_property; gobject_class->dispose = st_background_effect_dispose; offscreen_class = CLUTTER_OFFSCREEN_EFFECT_CLASS (klass); offscreen_class->paint_target = st_background_effect_paint_target; obj_props[PROP_BUMPMAP] = g_param_spec_string ("bumpmap", "Background effect construct prop", "Set bumpmap path", "/usr/share/cinnamon/bumpmaps/bumpmap.png", G_PARAM_READWRITE); g_object_class_install_properties (gobject_class, PROP_LAST, obj_props); }
static void gt_channels_view_child_class_init(GtChannelsViewChildClass* klass) { GObjectClass* object_class = G_OBJECT_CLASS(klass); object_class->finalize = finalize; object_class->get_property = get_property; object_class->set_property = set_property; object_class->constructed = constructed; gtk_widget_class_set_template_from_resource(GTK_WIDGET_CLASS(klass), "/com/gnome-twitch/ui/gt-channels-view-child.ui"); props[PROP_CHANNEL] = g_param_spec_object("channel", "Channel", "Associated channel", GT_TYPE_CHANNEL, G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY); g_object_class_install_properties(object_class, NUM_PROPS, props); gtk_widget_class_bind_template_callback(GTK_WIDGET_CLASS(klass), motion_enter_cb); gtk_widget_class_bind_template_callback(GTK_WIDGET_CLASS(klass), motion_leave_cb); gtk_widget_class_bind_template_callback(GTK_WIDGET_CLASS(klass), favourite_button_cb); gtk_widget_class_bind_template_child_private(GTK_WIDGET_CLASS(klass), GtChannelsViewChild, preview_image); gtk_widget_class_bind_template_child_private(GTK_WIDGET_CLASS(klass), GtChannelsViewChild, name_label); gtk_widget_class_bind_template_child_private(GTK_WIDGET_CLASS(klass), GtChannelsViewChild, game_label); gtk_widget_class_bind_template_child_private(GTK_WIDGET_CLASS(klass), GtChannelsViewChild, event_box); gtk_widget_class_bind_template_child_private(GTK_WIDGET_CLASS(klass), GtChannelsViewChild, middle_revealer); gtk_widget_class_bind_template_child_private(GTK_WIDGET_CLASS(klass), GtChannelsViewChild, viewers_label); gtk_widget_class_bind_template_child_private(GTK_WIDGET_CLASS(klass), GtChannelsViewChild, time_label); gtk_widget_class_bind_template_child_private(GTK_WIDGET_CLASS(klass), GtChannelsViewChild, favourite_button); gtk_widget_class_bind_template_child_private(GTK_WIDGET_CLASS(klass), GtChannelsViewChild, middle_stack); }
static void goat_dataset_store_class_init (GoatDatasetStoreClass *klass) { GObjectClass *object_class = G_OBJECT_CLASS (klass); object_class->finalize = goat_dataset_store_finalize; object_class->get_property = goat_dataset_store_get_property; object_class->set_property = goat_dataset_store_set_property; obj_properties[PROP_TREE_MODEL] = g_param_spec_object ("tree-model", "GoatDatasetStore::tree-model", "the backend tree store", GTK_TYPE_TREE_MODEL, G_PARAM_READWRITE | G_PARAM_STATIC_BLURB); obj_properties[PROP_X_INDEX] = g_param_spec_int ("x-index", "GoatDatasetStore::x-index", "mapping", -1, G_MAXINT, -1, G_PARAM_READWRITE | G_PARAM_STATIC_BLURB); obj_properties[PROP_Y_INDEX] = g_param_spec_int ("y-index", "GoatDatasetStore::y-index", "mapping", -1, G_MAXINT, -1, G_PARAM_READWRITE | G_PARAM_STATIC_BLURB); obj_properties[PROP_YSTDDEV_INDEX] = g_param_spec_int ("ystddev-index", "GoatDatasetStore::ystddev-index", "mapping", -1, G_MAXINT, -1, G_PARAM_READWRITE | G_PARAM_STATIC_BLURB); g_object_class_install_properties (object_class, N_PROPS, obj_properties); }
static void owr_image_server_class_init(OwrImageServerClass *klass) { GObjectClass *gobject_class = G_OBJECT_CLASS(klass); g_type_class_add_private(klass, sizeof(OwrImageServerPrivate)); obj_properties[PROP_PORT] = g_param_spec_uint("port", "Port", "The port to listen on for incoming connections", 0, 65535, DEFAULT_PORT, G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY | G_PARAM_STATIC_STRINGS); obj_properties[PROP_ALLOW_ORIGIN] = g_param_spec_string("allow-origin", "Allow origin", "Space-separated list of origins allowed for cross-origin resource sharing" " (alternatively, \"null\" for none or \"*\" for all)", DEFAULT_ALLOW_ORIGIN, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS); gobject_class->set_property = owr_image_server_set_property; gobject_class->get_property = owr_image_server_get_property; gobject_class->finalize = owr_image_server_finalize; g_object_class_install_properties(gobject_class, N_PROPERTIES, obj_properties); }
static void ide_buffer_change_monitor_class_init (IdeBufferChangeMonitorClass *klass) { GObjectClass *object_class = G_OBJECT_CLASS (klass); object_class->set_property = ide_buffer_change_monitor_set_property; gParamSpecs [PROP_BUFFER] = g_param_spec_object ("buffer", "Buffer", "The IdeBuffer to be monitored.", IDE_TYPE_BUFFER, (G_PARAM_WRITABLE | G_PARAM_CONSTRUCT_ONLY | G_PARAM_STATIC_STRINGS)); g_object_class_install_properties (object_class, LAST_PROP, gParamSpecs); gSignals [CHANGED] = g_signal_new ("changed", G_TYPE_FROM_CLASS (klass), G_SIGNAL_RUN_LAST, 0, NULL, NULL, NULL, G_TYPE_NONE, 0); }
static void egg_task_cache_class_init (EggTaskCacheClass *klass) { GObjectClass *object_class = G_OBJECT_CLASS (klass); object_class->constructed = egg_task_cache_constructed; object_class->dispose = egg_task_cache_dispose; object_class->finalize = egg_task_cache_finalize; object_class->set_property = egg_task_cache_set_property; gParamSpecs [PROP_KEY_HASH_FUNC] = g_param_spec_pointer ("key-hash-func", "Key Hash Func", "Key Hash Func", (G_PARAM_WRITABLE | G_PARAM_CONSTRUCT_ONLY | G_PARAM_STATIC_STRINGS)); gParamSpecs [PROP_KEY_EQUAL_FUNC] = g_param_spec_pointer ("key-equal-func", "Key Equal Func", "Key Equal Func", (G_PARAM_WRITABLE | G_PARAM_CONSTRUCT_ONLY | G_PARAM_STATIC_STRINGS)); gParamSpecs [PROP_KEY_COPY_FUNC] = g_param_spec_pointer ("key-copy-func", "Key Copy Func", "Key Copy Func", (G_PARAM_WRITABLE | G_PARAM_CONSTRUCT_ONLY | G_PARAM_STATIC_STRINGS)); gParamSpecs [PROP_KEY_DESTROY_FUNC] = g_param_spec_pointer ("key-destroy-func", "Key Destroy Func", "Key Destroy Func", (G_PARAM_WRITABLE | G_PARAM_CONSTRUCT_ONLY | G_PARAM_STATIC_STRINGS)); gParamSpecs [PROP_POPULATE_CALLBACK] = g_param_spec_pointer ("populate-callback", "Populate Callback", "Populate Callback", (G_PARAM_WRITABLE | G_PARAM_CONSTRUCT_ONLY | G_PARAM_STATIC_STRINGS)); gParamSpecs [PROP_POPULATE_CALLBACK_DATA] = g_param_spec_pointer ("populate-callback-data", "Populate Callback Data", "Populate Callback Data", (G_PARAM_WRITABLE | G_PARAM_CONSTRUCT_ONLY | G_PARAM_STATIC_STRINGS)); gParamSpecs [PROP_POPULATE_CALLBACK_DATA_DESTROY] = g_param_spec_pointer ("populate-callback-data-destroy", "Populate Callback Data Destroy", "Populate Callback Data Destroy", (G_PARAM_WRITABLE | G_PARAM_CONSTRUCT_ONLY | G_PARAM_STATIC_STRINGS)); /** * EggTaskCache:time-to-live: * * This is the number of milliseconds before an item should be evicted * from the cache. * * A value of zero indicates no eviction. */ gParamSpecs [PROP_TIME_TO_LIVE] = g_param_spec_int64 ("time-to-live", "Time to Live", "The time to live in milliseconds.", 0, G_MAXINT64, 30 * 1000, (G_PARAM_WRITABLE | G_PARAM_CONSTRUCT_ONLY | G_PARAM_STATIC_STRINGS)); gParamSpecs [PROP_VALUE_COPY_FUNC] = g_param_spec_pointer ("value-copy-func", "Value Copy Func", "Value Copy Func", (G_PARAM_WRITABLE | G_PARAM_CONSTRUCT_ONLY | G_PARAM_STATIC_STRINGS)); gParamSpecs [PROP_VALUE_DESTROY_FUNC] = g_param_spec_pointer ("value-destroy-func", "Value Destroy Func", "Value Destroy Func", (G_PARAM_WRITABLE | G_PARAM_CONSTRUCT_ONLY | G_PARAM_STATIC_STRINGS)); g_object_class_install_properties (object_class, LAST_PROP, gParamSpecs); }
static void clutter_settings_class_init (ClutterSettingsClass *klass) { GObjectClass *gobject_class = G_OBJECT_CLASS (klass); /** * ClutterSettings:backend: * * A back pointer to the #ClutterBackend * * Since: 1.4 * * Deprecated: 1.10 */ obj_props[PROP_BACKEND] = g_param_spec_object ("backend", "Backend", "A pointer to the backend", CLUTTER_TYPE_BACKEND, CLUTTER_PARAM_WRITABLE | G_PARAM_DEPRECATED | G_PARAM_CONSTRUCT_ONLY); /** * ClutterSettings:double-click-time: * * The time, in milliseconds, that should elapse between button-press * events in order to increase the click count by 1. * * Since: 1.4 */ obj_props[PROP_DOUBLE_CLICK_TIME] = g_param_spec_int ("double-click-time", P_("Double Click Time"), P_("The time between clicks necessary to detect a multiple click"), 0, G_MAXINT, 250, CLUTTER_PARAM_READWRITE); /** * ClutterSettings:double-click-distance: * * The maximum distance, in pixels, between button-press events that * determines whether or not to increase the click count by 1. * * Since: 1.4 */ obj_props[PROP_DOUBLE_CLICK_DISTANCE] = g_param_spec_int ("double-click-distance", P_("Double Click Distance"), P_("The distance between clicks necessary to detect a multiple click"), 0, G_MAXINT, 5, CLUTTER_PARAM_READWRITE); /** * ClutterSettings:dnd-drag-threshold: * * The default distance that the cursor of a pointer device * should travel before a drag operation should start. * * Since: 1.8 */ obj_props[PROP_DND_DRAG_THRESHOLD] = g_param_spec_int ("dnd-drag-threshold", P_("Drag Threshold"), P_("The distance the cursor should travel before starting to drag"), 1, G_MAXINT, 8, CLUTTER_PARAM_READWRITE); /** * ClutterSettings:font-name: * * The default font name that should be used by text actors, as * a string that can be passed to pango_font_description_from_string(). * * Since: 1.4 */ obj_props[PROP_FONT_NAME] = g_param_spec_string ("font-name", P_("Font Name"), P_("The description of the default font, as one that could be parsed by Pango"), NULL, CLUTTER_PARAM_READWRITE); /** * ClutterSettings:font-antialias: * * Whether or not to use antialiasing when rendering text; a value * of 1 enables it unconditionally; a value of 0 disables it * unconditionally; and -1 will use the system's default. * * Since: 1.4 */ obj_props[PROP_FONT_ANTIALIAS] = g_param_spec_int ("font-antialias", P_("Font Antialias"), P_("Whether to use antialiasing (1 to enable, 0 to disable, and -1 to use the default)"), -1, 1, -1, CLUTTER_PARAM_READWRITE); /** * ClutterSettings:font-dpi: * * The DPI used when rendering text, as a value of 1024 * dots/inch. * * If set to -1, the system's default will be used instead * * Since: 1.4 */ obj_props[PROP_FONT_DPI] = g_param_spec_int ("font-dpi", P_("Font DPI"), P_("The resolution of the font, in 1024 * dots/inch, or -1 to use the default"), -1, 1024 * 1024, -1, CLUTTER_PARAM_READWRITE); obj_props[PROP_UNSCALED_FONT_DPI] = g_param_spec_int ("unscaled-font-dpi", P_("Font DPI"), P_("The resolution of the font, in 1024 * dots/inch, or -1 to use the default"), -1, 1024 * 1024, -1, CLUTTER_PARAM_WRITABLE); /** * ClutterSettings:font-hinting: * * Whether or not to use hinting when rendering text; a value of 1 * unconditionally enables it; a value of 0 unconditionally disables * it; and a value of -1 will use the system's default. * * Since: 1.4 */ obj_props[PROP_FONT_HINTING] = g_param_spec_int ("font-hinting", P_("Font Hinting"), P_("Whether to use hinting (1 to enable, 0 to disable and -1 to use the default)"), -1, 1, -1, CLUTTER_PARAM_READWRITE); /** * ClutterSettings:font-hint-style: * * The style of the hinting used when rendering text. Valid values * are: * * - hintnone * - hintslight * - hintmedium * - hintfull * * Since: 1.4 */ obj_props[PROP_FONT_HINT_STYLE] = g_param_spec_string ("font-hint-style", P_("Font Hint Style"), P_("The style of hinting (hintnone, hintslight, hintmedium, hintfull)"), NULL, CLUTTER_PARAM_READWRITE); /** * ClutterSettings:font-subpixel-order: * * The type of sub-pixel antialiasing used when rendering text. Valid * values are: * * - none * - rgb * - bgr * - vrgb * - vbgr * * Since: 1.4 */ obj_props[PROP_FONT_RGBA] = g_param_spec_string ("font-subpixel-order", P_("Font Subpixel Order"), P_("The type of subpixel antialiasing (none, rgb, bgr, vrgb, vbgr)"), NULL, CLUTTER_PARAM_READWRITE); /** * ClutterSettings:long-press-duration: * * Sets the minimum duration for a press to be recognized as a long press * gesture. The duration is expressed in milliseconds. * * See also #ClutterClickAction:long-press-duration. * * Since: 1.8 */ obj_props[PROP_LONG_PRESS_DURATION] = g_param_spec_int ("long-press-duration", P_("Long Press Duration"), P_("The minimum duration for a long press gesture to be recognized"), 0, G_MAXINT, 500, CLUTTER_PARAM_READWRITE); obj_props[PROP_WINDOW_SCALING_FACTOR] = g_param_spec_int ("window-scaling-factor", P_("Window Scaling Factor"), P_("The scaling factor to be applied to windows"), 1, G_MAXINT, 1, CLUTTER_PARAM_READWRITE); obj_props[PROP_FONTCONFIG_TIMESTAMP] = g_param_spec_uint ("fontconfig-timestamp", P_("Fontconfig configuration timestamp"), P_("Timestamp of the current fontconfig configuration"), 0, G_MAXUINT, 0, CLUTTER_PARAM_WRITABLE); /** * ClutterText:password-hint-time: * * How long should Clutter show the last input character in editable * ClutterText actors. The value is in milliseconds. A value of 0 * disables showing the password hint. 600 is a good value for * enabling the hint. * * Since: 1.10 */ obj_props[PROP_PASSWORD_HINT_TIME] = g_param_spec_uint ("password-hint-time", P_("Password Hint Time"), P_("How long to show the last input character in hidden entries"), 0, G_MAXUINT, 0, CLUTTER_PARAM_READWRITE); gobject_class->set_property = clutter_settings_set_property; gobject_class->get_property = clutter_settings_get_property; gobject_class->dispatch_properties_changed = clutter_settings_dispatch_properties_changed; gobject_class->finalize = clutter_settings_finalize; g_object_class_install_properties (gobject_class, PROP_LAST, obj_props); }
static void owr_data_channel_class_init(OwrDataChannelClass *klass) { GObjectClass *gobject_class = G_OBJECT_CLASS(klass); g_type_class_add_private(klass, sizeof(OwrDataChannelPrivate)); gobject_class->set_property = owr_data_channel_set_property; gobject_class->get_property = owr_data_channel_get_property; gobject_class->finalize = owr_data_channel_finalize; /** * OwrDataChannel::on-binary-data: * @data_channel: * @binary_data: (array length=length) (element-type guint8): * @length: */ data_channel_signals[SIGNAL_DATA_BINARY] = g_signal_new("on-binary-data", G_OBJECT_CLASS_TYPE(klass), G_SIGNAL_RUN_FIRST, G_STRUCT_OFFSET(OwrDataChannelClass, on_binary_data), NULL, NULL, g_cclosure_marshal_generic, G_TYPE_NONE, 2, G_TYPE_POINTER, G_TYPE_UINT); data_channel_signals[SIGNAL_DATA] = g_signal_new("on-data", G_OBJECT_CLASS_TYPE(klass), G_SIGNAL_RUN_FIRST, G_STRUCT_OFFSET(OwrDataChannelClass, on_data), NULL, NULL, g_cclosure_marshal_generic, G_TYPE_NONE, 1, G_TYPE_STRING); obj_properties[PROP_ORDERED] = g_param_spec_boolean("ordered", "Ordered", "Send data ordered", DEFAULT_ORDERED, G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY); obj_properties[PROP_MAX_PACKET_LIFE_TIME] = g_param_spec_int("max-packet-life-time", "Max packet life time", "The maximum time to try to retransmit a packet", -1, MAX_MAX_PACKETS_LIFE_TIME, DEFAULT_MAX_PACKETS_LIFE_TIME, G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY); obj_properties[PROP_MAX_RETRANSMITS] = g_param_spec_int("max-retransmits", "Max retransmits", "The maximum number of retransmits for a packet", -1, MAX_MAX_RETRANSMITS, DEFAULT_MAX_RETRANSMITS, G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY); obj_properties[PROP_PROTOCOL] = g_param_spec_string("protocol", "DataChannel protocol", "Sub-protocol used for this channel", DEFAULT_PROTOCOL, G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY | G_PARAM_STATIC_STRINGS); obj_properties[PROP_NEGOTIATED] = g_param_spec_boolean("negotiated", "Negotiated", "Datachannel already negotiated", DEFAULT_NEGOTIATED, G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY | G_PARAM_STATIC_STRINGS); obj_properties[PROP_ID] = g_param_spec_uint("id", "Id", "Channel id. Unless otherwise defined or negotiated, the id are picked based on the DTLS" " role; client picks even identifiers and server picks odd. However, the application is " "responsible for avoiding conflicts. In case of conflict, the channel should fail.", 0, G_MAXUSHORT, DEFAULT_ID, G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY | G_PARAM_STATIC_STRINGS); obj_properties[PROP_LABEL] = g_param_spec_string("label", "Label", "The label of the channel.", DEFAULT_LABEL, G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY); obj_properties[PROP_READY_STATE] = g_param_spec_enum("ready-state", "Ready state", "The ready state of the data channel", OWR_DATA_CHANNEL_READY_STATE_TYPE, OWR_DATA_CHANNEL_READY_STATE_CONNECTING, G_PARAM_READABLE | G_PARAM_STATIC_STRINGS); obj_properties[PROP_BUFFERED_AMOUNT] = g_param_spec_uint("buffered-amount", "Buffered amount", "The amount of buffered outgoing data on this data channel", 0, G_MAXUINT, 0, G_PARAM_READABLE | G_PARAM_STATIC_STRINGS); g_object_class_install_properties(gobject_class, N_PROPERTIES, obj_properties); }
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 clutter_bind_constraint_class_init (ClutterBindConstraintClass *klass) { ClutterActorMetaClass *meta_class = CLUTTER_ACTOR_META_CLASS (klass); ClutterConstraintClass *constraint_class = CLUTTER_CONSTRAINT_CLASS (klass); GObjectClass *gobject_class = G_OBJECT_CLASS (klass); gobject_class->set_property = clutter_bind_constraint_set_property; gobject_class->get_property = clutter_bind_constraint_get_property; gobject_class->dispose = clutter_bind_constraint_dispose; meta_class->set_actor = clutter_bind_constraint_set_actor; constraint_class->update_allocation = clutter_bind_constraint_update_allocation; /** * ClutterBindConstraint:source: * * The #ClutterActor used as the source for the binding. * * The #ClutterActor must not be contained inside the actor associated * to the constraint. * * Since: 1.4 */ obj_props[PROP_SOURCE] = g_param_spec_object ("source", P_("Source"), P_("The source of the binding"), CLUTTER_TYPE_ACTOR, CLUTTER_PARAM_READWRITE | G_PARAM_CONSTRUCT); /** * ClutterBindConstraint:coordinate: * * The coordinate to be bound * * Since: 1.4 */ obj_props[PROP_COORDINATE] = g_param_spec_enum ("coordinate", P_("Coordinate"), P_("The coordinate to bind"), CLUTTER_TYPE_BIND_COORDINATE, CLUTTER_BIND_X, CLUTTER_PARAM_READWRITE | G_PARAM_CONSTRUCT); /** * ClutterBindConstraint:offset: * * The offset, in pixels, to be applied to the binding * * Since: 1.4 */ obj_props[PROP_OFFSET] = g_param_spec_float ("offset", P_("Offset"), P_("The offset in pixels to apply to the binding"), -G_MAXFLOAT, G_MAXFLOAT, 0.0f, CLUTTER_PARAM_READWRITE | G_PARAM_CONSTRUCT); g_object_class_install_properties (gobject_class, PROP_LAST, obj_props); }
/* Class initialization * Override functions in parent classes and define properties * and signals */ static void xfdashboard_application_class_init(XfdashboardApplicationClass *klass) { GApplicationClass *appClass=G_APPLICATION_CLASS(klass); GObjectClass *gobjectClass=G_OBJECT_CLASS(klass); /* Override functions */ appClass->activate=_xfdashboard_application_activate; appClass->command_line=_xfdashboard_application_command_line; #if GLIB_CHECK_VERSION(2, 40, 0) appClass->local_command_line=_xfdashboard_application_local_command_line; #endif gobjectClass->dispose=_xfdashboard_application_dispose; gobjectClass->set_property=_xfdashboard_application_set_property; gobjectClass->get_property=_xfdashboard_application_get_property; /* Set up private structure */ g_type_class_add_private(klass, sizeof(XfdashboardApplicationPrivate)); /* Define properties */ XfdashboardApplicationProperties[PROP_DAEMONIZED]= g_param_spec_boolean("is-daemonized", _("Is daemonized"), _("Flag indicating if application is daemonized"), FALSE, G_PARAM_READABLE | G_PARAM_STATIC_STRINGS); XfdashboardApplicationProperties[PROP_SUSPENDED]= g_param_spec_boolean("is-suspended", _("Is suspended"), _("Flag indicating if application is suspended currently"), FALSE, G_PARAM_READABLE | G_PARAM_STATIC_STRINGS); XfdashboardApplicationProperties[PROP_THEME_NAME]= g_param_spec_string("theme-name", _("Theme name"), _("Name of current theme"), DEFAULT_THEME_NAME, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS); g_object_class_install_properties(gobjectClass, PROP_LAST, XfdashboardApplicationProperties); /* Define signals */ XfdashboardApplicationSignals[SIGNAL_QUIT]= g_signal_new("quit", G_TYPE_FROM_CLASS(klass), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET(XfdashboardApplicationClass, quit), NULL, NULL, g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0); XfdashboardApplicationSignals[SIGNAL_SHUTDOWN_FINAL]= g_signal_new("shutdown-final", G_TYPE_FROM_CLASS(klass), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET(XfdashboardApplicationClass, shutdown_final), NULL, NULL, g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0); XfdashboardApplicationSignals[SIGNAL_SUSPEND]= g_signal_new("suspend", G_TYPE_FROM_CLASS(klass), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET(XfdashboardApplicationClass, suspend), NULL, NULL, g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0); XfdashboardApplicationSignals[SIGNAL_RESUME]= g_signal_new("resume", G_TYPE_FROM_CLASS(klass), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET(XfdashboardApplicationClass, resume), NULL, NULL, g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0); XfdashboardApplicationSignals[SIGNAL_THEME_CHANGED]= g_signal_new("theme-changed", G_TYPE_FROM_CLASS(klass), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET(XfdashboardApplicationClass, theme_changed), NULL, NULL, g_cclosure_marshal_VOID__OBJECT, G_TYPE_NONE, 1, XFDASHBOARD_TYPE_THEME); /* Register GValue transformation function not provided by any other library */ xfdashboard_register_gvalue_transformation_funcs(); }
static void clutter_flow_layout_class_init (ClutterFlowLayoutClass *klass) { GObjectClass *gobject_class; ClutterLayoutManagerClass *layout_class; gobject_class = G_OBJECT_CLASS (klass); layout_class = CLUTTER_LAYOUT_MANAGER_CLASS (klass); layout_class->get_preferred_width = clutter_flow_layout_get_preferred_width; layout_class->get_preferred_height = clutter_flow_layout_get_preferred_height; layout_class->allocate = clutter_flow_layout_allocate; layout_class->set_container = clutter_flow_layout_set_container; /** * ClutterFlowLayout:orientation: * * The orientation of the #ClutterFlowLayout. The children * of the layout will be layed out following the orientation. * * This property also controls the overflowing directions * * Since: 1.2 */ flow_properties[PROP_ORIENTATION] = g_param_spec_enum ("orientation", P_("Orientation"), P_("The orientation of the layout"), CLUTTER_TYPE_FLOW_ORIENTATION, CLUTTER_FLOW_HORIZONTAL, CLUTTER_PARAM_READWRITE | G_PARAM_CONSTRUCT); /** * ClutterFlowLayout:homogeneous: * * Whether each child inside the #ClutterFlowLayout should receive * the same allocation * * Since: 1.2 */ flow_properties[PROP_HOMOGENEOUS] = g_param_spec_boolean ("homogeneous", P_("Homogeneous"), P_("Whether each item should receive the same allocation"), FALSE, CLUTTER_PARAM_READWRITE); /** * ClutterFlowLayout:column-spacing: * * The spacing between columns, in pixels; the value of this * property is honoured by horizontal non-overflowing layouts * and by vertical overflowing layouts * * Since: 1.2 */ flow_properties[PROP_COLUMN_SPACING] = g_param_spec_float ("column-spacing", P_("Column Spacing"), P_("The spacing between columns"), 0.0, G_MAXFLOAT, 0.0, CLUTTER_PARAM_READWRITE); /** * ClutterFlowLayout:row-spacing: * * The spacing between rows, in pixels; the value of this * property is honoured by vertical non-overflowing layouts and * by horizontal overflowing layouts * * Since: 1.2 */ flow_properties[PROP_ROW_SPACING] = g_param_spec_float ("row-spacing", P_("Row Spacing"), P_("The spacing between rows"), 0.0, G_MAXFLOAT, 0.0, CLUTTER_PARAM_READWRITE); /** * ClutterFlowLayout:min-column-width: * * Minimum width for each column in the layout, in pixels * * Since: 1.2 */ flow_properties[PROP_MIN_COLUMN_WIDTH] = g_param_spec_float ("min-column-width", P_("Minimum Column Width"), P_("Minimum width for each column"), 0.0, G_MAXFLOAT, 0.0, CLUTTER_PARAM_READWRITE); /** * ClutterFlowLayout:max-column-width: * * Maximum width for each column in the layout, in pixels. If * set to -1 the width will be the maximum child width * * Since: 1.2 */ flow_properties[PROP_MAX_COLUMN_WIDTH] = g_param_spec_float ("max-column-width", P_("Maximum Column Width"), P_("Maximum width for each column"), -1.0, G_MAXFLOAT, -1.0, CLUTTER_PARAM_READWRITE); /** * ClutterFlowLayout:min-row-height: * * Minimum height for each row in the layout, in pixels * * Since: 1.2 */ flow_properties[PROP_MIN_ROW_HEGHT] = g_param_spec_float ("min-row-height", P_("Minimum Row Height"), P_("Minimum height for each row"), 0.0, G_MAXFLOAT, 0.0, CLUTTER_PARAM_READWRITE); /** * ClutterFlowLayout:max-row-height: * * Maximum height for each row in the layout, in pixels. If * set to -1 the width will be the maximum child height * * Since: 1.2 */ flow_properties[PROP_MAX_ROW_HEIGHT] = g_param_spec_float ("max-row-height", P_("Maximum Row Height"), P_("Maximum height for each row"), -1.0, G_MAXFLOAT, -1.0, CLUTTER_PARAM_READWRITE); /** * ClutterFlowLayout:snap-to-grid: * * Whether the #ClutterFlowLayout should arrange its children * on a grid * * Since: 1.16 */ flow_properties[PROP_SNAP_TO_GRID] = g_param_spec_boolean ("snap-to-grid", P_("Snap to grid"), P_("Snap to grid"), TRUE, CLUTTER_PARAM_READWRITE); gobject_class->finalize = clutter_flow_layout_finalize; gobject_class->set_property = clutter_flow_layout_set_property; gobject_class->get_property = clutter_flow_layout_get_property; g_object_class_install_properties (gobject_class, N_PROPERTIES, flow_properties); }
static void gtk_level_bar_class_init (GtkLevelBarClass *klass) { GObjectClass *oclass = G_OBJECT_CLASS (klass); GtkWidgetClass *wclass = GTK_WIDGET_CLASS (klass); oclass->get_property = gtk_level_bar_get_property; oclass->set_property = gtk_level_bar_set_property; oclass->finalize = gtk_level_bar_finalize; wclass->draw = gtk_level_bar_draw; wclass->get_preferred_width = gtk_level_bar_get_preferred_width; wclass->get_preferred_height = gtk_level_bar_get_preferred_height; g_object_class_override_property (oclass, PROP_ORIENTATION, "orientation"); /** * GtkLevelBar::offset-changed: * @self: a #GtkLevelBar * @name: the name of the offset that changed value * * Emitted when an offset specified on the bar changes value as an * effect to gtk_level_bar_add_offset_value() being called. * * The signal supports detailed connections; you can connect to the * detailed signal "changed::x" in order to only receive callbacks when * the value of offset "x" changes. * * Since: 3.6 */ signals[SIGNAL_OFFSET_CHANGED] = g_signal_new ("offset-changed", GTK_TYPE_LEVEL_BAR, G_SIGNAL_RUN_FIRST | G_SIGNAL_DETAILED, G_STRUCT_OFFSET (GtkLevelBarClass, offset_changed), NULL, NULL, _gtk_marshal_VOID__STRING, G_TYPE_NONE, 1, G_TYPE_STRING); /** * GtkLevelBar:value: * * The #GtkLevelBar:value property determines the currently * filled value of the level bar. * * Since: 3.6 */ properties[PROP_VALUE] = g_param_spec_double ("value", P_("Currently filled value level"), P_("Currently filled value level of the level bar"), 0.0, G_MAXDOUBLE, 0.0, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS); /** * GtkLevelBar:min-value: * * The #GtkLevelBar:min-value property determines the minimum value of * the interval that can be displayed by the bar. * * Since: 3.6 */ properties[PROP_MIN_VALUE] = g_param_spec_double ("min-value", P_("Minimum value level for the bar"), P_("Minimum value level that can be displayed by the bar"), 0.0, G_MAXDOUBLE, 0.0, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS); /** * GtkLevelBar:max-value: * * The #GtkLevelBar:max-value property determaxes the maximum value of * the interval that can be displayed by the bar. * * Since: 3.6 */ properties[PROP_MAX_VALUE] = g_param_spec_double ("max-value", P_("Maximum value level for the bar"), P_("Maximum value level that can be displayed by the bar"), 0.0, G_MAXDOUBLE, 1.0, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS); /** * GtkLevelBar:mode: * * The #GtkLevelBar:bar-mode property determines the way #GtkLevelBar * interprets the value properties to draw the level fill area. * Specifically, when the value is #GTK_LEVEL_BAR_MODE_CONTINUOUS, * #GtkLevelBar will draw a single block representing the current value in * that area; when the value is #GTK_LEVEL_BAR_MODE_DISCRETE, * the widget will draw a succession of separate blocks filling the * draw area, with the number of blocks being equal to the units separating * the integral roundings of #GtkLevelBar:min-value and #GtkLevelBar:max-value. * * Since: 3.6 */ properties[PROP_MODE] = g_param_spec_enum ("mode", P_("The mode of the value indicator"), P_("The mode of the value indicator displayed by the bar"), GTK_TYPE_LEVEL_BAR_MODE, GTK_LEVEL_BAR_MODE_CONTINUOUS, G_PARAM_READWRITE); /** * GtkLevelBar:inverted: * * Level bars normally grow from top to bottom or left to right. * Inverted level bars grow in the opposite direction. * * Since: 3.8 */ properties[PROP_INVERTED] = g_param_spec_boolean ("inverted", P_("Inverted"), P_("Invert the direction in which the level bar grows"), FALSE, G_PARAM_READWRITE); /** * GtkLevelBar:min-block-height: * * The min-block-height style property determines the minimum * height for blocks filling the #GtkLevelBar widget. * * Since: 3.6 */ gtk_widget_class_install_style_property (wclass, g_param_spec_int ("min-block-height", P_("Minimum height for filling blocks"), P_("Minimum height for blocks that fill the bar"), 1, G_MAXINT, DEFAULT_BLOCK_SIZE, G_PARAM_READWRITE)); /** * GtkLevelBar:min-block-width: * * The min-block-width style property determines the minimum * width for blocks filling the #GtkLevelBar widget. * * Since: 3.6 */ gtk_widget_class_install_style_property (wclass, g_param_spec_int ("min-block-width", P_("Minimum width for filling blocks"), P_("Minimum width for blocks that fill the bar"), 1, G_MAXINT, DEFAULT_BLOCK_SIZE, G_PARAM_READWRITE)); g_object_class_install_properties (oclass, LAST_PROPERTY, properties); gtk_widget_class_set_accessible_type (wclass, GTK_TYPE_LEVEL_BAR_ACCESSIBLE); }
static void pragha_toolbar_class_init (PraghaToolbarClass *klass) { GObjectClass *gobject_class; gobject_class = G_OBJECT_CLASS (klass); gobject_class->set_property = pragha_toolbar_set_property; gobject_class->get_property = pragha_toolbar_get_property; gobject_class->finalize = pragha_toolbar_finalize; /* * Properties: */ properties[PROP_VOLUME] = g_param_spec_double ("volume", "Volume", "Volume showed on toolbar", 0.0, 1.0, 0.5, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS); properties[PROP_REMANING_MODE] = g_param_spec_boolean ("timer-remaining-mode", "TimerRemainingMode", "Show Remaining Time", FALSE, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS); g_object_class_install_properties (gobject_class, PROP_LAST, properties); /* * Signals: */ signals[PREV_ACTIVATED] = g_signal_new ("prev", G_TYPE_FROM_CLASS (gobject_class), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (PraghaToolbarClass, prev), NULL, NULL, g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0); signals[PLAY_ACTIVATED] = g_signal_new ("play", G_TYPE_FROM_CLASS (gobject_class), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (PraghaToolbarClass, play), NULL, NULL, g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0); signals[STOP_ACTIVATED] = g_signal_new ("stop", G_TYPE_FROM_CLASS (gobject_class), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (PraghaToolbarClass, stop), NULL, NULL, g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0); signals[NEXT_ACTIVATED] = g_signal_new ("next", G_TYPE_FROM_CLASS (gobject_class), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (PraghaToolbarClass, next), NULL, NULL, g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0); signals[ALBUM_ART_ACTIVATED] = g_signal_new ("album-art-activated", G_TYPE_FROM_CLASS (gobject_class), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (PraghaToolbarClass, album_art_activated), NULL, NULL, g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0); signals[TRACK_INFO_ACTIVATED] = g_signal_new ("track-info-activated", G_TYPE_FROM_CLASS (gobject_class), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (PraghaToolbarClass, track_info_activated), NULL, NULL, g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0); signals[TRACK_PROGRESS_ACTIVATED] = g_signal_new ("track-progress-activated", G_TYPE_FROM_CLASS (gobject_class), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (PraghaToolbarClass, track_progress_activated), NULL, NULL, g_cclosure_marshal_VOID__DOUBLE, G_TYPE_NONE, 1, G_TYPE_DOUBLE); signals[UNFULL_ACTIVATED] = g_signal_new ("unfull-activated", G_TYPE_FROM_CLASS (gobject_class), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (PraghaToolbarClass, unfull), NULL, NULL, g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0); }
static void ide_test_class_init (IdeTestClass *klass) { GObjectClass *object_class = G_OBJECT_CLASS (klass); object_class->finalize = ide_test_finalize; object_class->get_property = ide_test_get_property; object_class->set_property = ide_test_set_property; /** * IdeTest:display_name: * * The "display-name" property contains the display name of the test as * the user is expected to read in UI elements. * * Since: 3.28 */ properties [PROP_DISPLAY_NAME] = g_param_spec_string ("display-name", "Name", "The display_name of the unit test", NULL, (G_PARAM_READWRITE | G_PARAM_EXPLICIT_NOTIFY | G_PARAM_STATIC_STRINGS)); /** * IdeTest:id: * * The "id" property contains the unique identifier of the test. * * Since: 3.28 */ properties [PROP_ID] = g_param_spec_string ("id", "Id", "The unique identifier of the test", NULL, (G_PARAM_READWRITE | G_PARAM_EXPLICIT_NOTIFY | G_PARAM_STATIC_STRINGS)); /** * IdeTest:group: * * The "group" property contains the name of the gruop the test belongs * to, if any. * * Since: 3.28 */ properties [PROP_GROUP] = g_param_spec_string ("group", "Group", "The name of the group the test belongs to, if any", NULL, (G_PARAM_READWRITE | G_PARAM_EXPLICIT_NOTIFY | G_PARAM_STATIC_STRINGS)); /** * IdeTest::status: * * The "status" property contains the status of the test, updated by * providers when they have run the test. * * Since: 3.28 */ properties [PROP_STATUS] = g_param_spec_enum ("status", "Status", "The status of the test", IDE_TYPE_TEST_STATUS, IDE_TEST_STATUS_NONE, (G_PARAM_READWRITE | G_PARAM_EXPLICIT_NOTIFY | G_PARAM_STATIC_STRINGS)); g_object_class_install_properties (object_class, N_PROPS, properties); }
static void ges_timeline_element_class_init (GESTimelineElementClass * klass) { GObjectClass *object_class = G_OBJECT_CLASS (klass); object_class->get_property = _get_property; object_class->set_property = _set_property; /** * GESTimelineElement:parent: * * The parent container of the object */ properties[PROP_PARENT] = g_param_spec_object ("parent", "Parent", "The parent container of the object", GES_TYPE_TIMELINE_ELEMENT, G_PARAM_READWRITE); /** * GESTimelineElement:timeline: * * The timeline in which @element is */ properties[PROP_TIMELINE] = g_param_spec_object ("timeline", "Timeline", "The timeline the object is in", GES_TYPE_TIMELINE, G_PARAM_READWRITE); /** * GESTimelineElement:start: * * The position of the object in its container (in nanoseconds). */ properties[PROP_START] = g_param_spec_uint64 ("start", "Start", "The position in the container", 0, G_MAXUINT64, 0, G_PARAM_READWRITE); /** * GESTimelineElement:in-point: * * The in-point at which this #GESTimelineElement will start outputting data * from its contents (in nanoseconds). * * Ex : an in-point of 5 seconds means that the first outputted buffer will * be the one located 5 seconds in the controlled resource. */ properties[PROP_INPOINT] = g_param_spec_uint64 ("in-point", "In-point", "The in-point", 0, G_MAXUINT64, 0, G_PARAM_READWRITE); /** * GESTimelineElement:duration: * * The duration (in nanoseconds) which will be used in the container */ properties[PROP_DURATION] = g_param_spec_uint64 ("duration", "Duration", "The duration to use", 0, G_MAXUINT64, GST_CLOCK_TIME_NONE, G_PARAM_READWRITE); /** * GESTimelineElement:max-duration: * * The maximum duration (in nanoseconds) of the #GESTimelineElement. */ properties[PROP_MAX_DURATION] = g_param_spec_uint64 ("max-duration", "Maximum duration", "The maximum duration of the object", 0, G_MAXUINT64, GST_CLOCK_TIME_NONE, G_PARAM_READWRITE | G_PARAM_CONSTRUCT); /** * GESTimelineElement:priority: * * The layer priority of the object. */ properties[PROP_PRIORITY] = g_param_spec_uint ("priority", "Priority", "The priority of the object", 0, G_MAXUINT, 0, G_PARAM_READWRITE); g_object_class_install_properties (object_class, PROP_LAST, properties); object_class->finalize = ges_timeline_element_finalize; klass->set_parent = NULL; klass->set_start = NULL; klass->set_inpoint = NULL; klass->set_duration = NULL; klass->set_max_duration = NULL; klass->set_priority = NULL; klass->ripple = NULL; klass->ripple_end = NULL; klass->roll_start = NULL; klass->roll_end = NULL; klass->trim = NULL; }
static void my_timeline_model_class_init (MyTimelineModelClass * klass) { GObjectClass *gobject_class; gobject_class = G_OBJECT_CLASS (klass); gobject_class->finalize = my_timeline_model_finalize; gobject_class->dispose = my_timeline_model_dispose; gobject_class->set_property = my_timeline_model_set_property; gobject_class->get_property = my_timeline_model_get_property; signals[SIG_TIME_POS_ADDED] = g_signal_new ("time-pos-added", G_OBJECT_CLASS_TYPE (gobject_class), G_SIGNAL_RUN_FIRST, 0, NULL, NULL, g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 1, G_TYPE_UINT); signals[SIG_SYSTEM_ADDED] = g_signal_new ("system-added", G_OBJECT_CLASS_TYPE (gobject_class), G_SIGNAL_RUN_FIRST, 0, NULL, NULL, g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 1, MY_TYPE_SYSTEM); signals[SIG_ARROW_ADDED_AT_CURRENT_POS] = g_signal_new ("arrow-added-at-current-pos", G_OBJECT_CLASS_TYPE (gobject_class), G_SIGNAL_RUN_FIRST, 0, NULL, NULL, g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 1, MY_TYPE_FLOW_ARROW); signals[SIG_SYSTEM_REMOVED] = g_signal_new ("system-removed", G_OBJECT_CLASS_TYPE (gobject_class), G_SIGNAL_RUN_FIRST, 0, NULL, NULL, g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0); signals[SIG_SYSTEMS_CHANGED] = g_signal_new ("systems-changed", G_OBJECT_CLASS_TYPE (gobject_class), G_SIGNAL_RUN_FIRST, 0, NULL, NULL, g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0); signals[SIG_CURRENT_POS_CHANGED] = g_signal_new ("current-pos-changed", G_OBJECT_CLASS_TYPE (gobject_class), G_SIGNAL_RUN_FIRST, 0, NULL, NULL, g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0); obj_properties[PROP_ADJUST] = g_param_spec_object ("adjustment", "adjustment", "adjustment", GTK_TYPE_ADJUSTMENT, G_PARAM_READWRITE); g_object_class_install_properties (gobject_class, N_PROPERTIES, obj_properties); }
static void nm_active_connection_class_init (NMActiveConnectionClass *ac_class) { GObjectClass *object_class = G_OBJECT_CLASS (ac_class); NMExportedObjectClass *exported_object_class = NM_EXPORTED_OBJECT_CLASS (ac_class); g_type_class_add_private (ac_class, sizeof (NMActiveConnectionPrivate)); exported_object_class->export_path = NM_DBUS_PATH "/ActiveConnection/%u"; /* virtual methods */ object_class->get_property = get_property; object_class->set_property = set_property; object_class->constructed = constructed; object_class->dispose = dispose; /* D-Bus exported properties */ obj_properties[PROP_CONNECTION] = g_param_spec_string (NM_ACTIVE_CONNECTION_CONNECTION, "", "", NULL, G_PARAM_READABLE | G_PARAM_STATIC_STRINGS); obj_properties[PROP_ID] = g_param_spec_string (NM_ACTIVE_CONNECTION_ID, "", "", NULL, G_PARAM_READABLE | G_PARAM_STATIC_STRINGS); obj_properties[PROP_UUID] = g_param_spec_string (NM_ACTIVE_CONNECTION_UUID, "", "", NULL, G_PARAM_READABLE | G_PARAM_STATIC_STRINGS); obj_properties[PROP_TYPE] = g_param_spec_string (NM_ACTIVE_CONNECTION_TYPE, "", "", NULL, G_PARAM_READABLE | G_PARAM_STATIC_STRINGS); obj_properties[PROP_SPECIFIC_OBJECT] = g_param_spec_string (NM_ACTIVE_CONNECTION_SPECIFIC_OBJECT, "", "", NULL, G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY | G_PARAM_STATIC_STRINGS); obj_properties[PROP_DEVICES] = g_param_spec_boxed (NM_ACTIVE_CONNECTION_DEVICES, "", "", G_TYPE_STRV, G_PARAM_READABLE | G_PARAM_STATIC_STRINGS); obj_properties[PROP_STATE] = g_param_spec_uint (NM_ACTIVE_CONNECTION_STATE, "", "", NM_ACTIVE_CONNECTION_STATE_UNKNOWN, NM_ACTIVE_CONNECTION_STATE_DEACTIVATING, NM_ACTIVE_CONNECTION_STATE_UNKNOWN, G_PARAM_READABLE | G_PARAM_STATIC_STRINGS); obj_properties[PROP_DEFAULT] = g_param_spec_boolean (NM_ACTIVE_CONNECTION_DEFAULT, "", "", FALSE, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS); obj_properties[PROP_IP4_CONFIG] = g_param_spec_string (NM_ACTIVE_CONNECTION_IP4_CONFIG, "", "", NULL, G_PARAM_READABLE | G_PARAM_STATIC_STRINGS); obj_properties[PROP_DHCP4_CONFIG] = g_param_spec_string (NM_ACTIVE_CONNECTION_DHCP4_CONFIG, "", "", NULL, G_PARAM_READABLE | G_PARAM_STATIC_STRINGS); obj_properties[PROP_DEFAULT6] = g_param_spec_boolean (NM_ACTIVE_CONNECTION_DEFAULT6, "", "", FALSE, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS); obj_properties[PROP_IP6_CONFIG] = g_param_spec_string (NM_ACTIVE_CONNECTION_IP6_CONFIG, "", "", NULL, G_PARAM_READABLE | G_PARAM_STATIC_STRINGS); obj_properties[PROP_DHCP6_CONFIG] = g_param_spec_string (NM_ACTIVE_CONNECTION_DHCP6_CONFIG, "", "", NULL, G_PARAM_READABLE | G_PARAM_STATIC_STRINGS); obj_properties[PROP_VPN] = g_param_spec_boolean (NM_ACTIVE_CONNECTION_VPN, "", "", FALSE, G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY | G_PARAM_STATIC_STRINGS); obj_properties[PROP_MASTER] = g_param_spec_string (NM_ACTIVE_CONNECTION_MASTER, "", "", NULL, G_PARAM_READABLE | G_PARAM_STATIC_STRINGS); /* Internal properties */ obj_properties[PROP_INT_SETTINGS_CONNECTION] = g_param_spec_object (NM_ACTIVE_CONNECTION_INT_SETTINGS_CONNECTION, "", "", NM_TYPE_SETTINGS_CONNECTION, G_PARAM_WRITABLE | G_PARAM_CONSTRUCT_ONLY | G_PARAM_STATIC_STRINGS); obj_properties[PROP_INT_DEVICE] = g_param_spec_object (NM_ACTIVE_CONNECTION_INT_DEVICE, "", "", NM_TYPE_DEVICE, G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY | G_PARAM_STATIC_STRINGS); obj_properties[PROP_INT_SUBJECT] = g_param_spec_object (NM_ACTIVE_CONNECTION_INT_SUBJECT, "", "", NM_TYPE_AUTH_SUBJECT, G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY | G_PARAM_STATIC_STRINGS); obj_properties[PROP_INT_MASTER] = g_param_spec_object (NM_ACTIVE_CONNECTION_INT_MASTER, "", "", NM_TYPE_ACTIVE_CONNECTION, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS); obj_properties[PROP_INT_MASTER_READY] = g_param_spec_boolean (NM_ACTIVE_CONNECTION_INT_MASTER_READY, "", "", FALSE, G_PARAM_READABLE | G_PARAM_STATIC_STRINGS); g_object_class_install_properties (object_class, _PROPERTY_ENUMS_LAST, obj_properties); signals[DEVICE_CHANGED] = g_signal_new (NM_ACTIVE_CONNECTION_DEVICE_CHANGED, G_OBJECT_CLASS_TYPE (object_class), G_SIGNAL_RUN_FIRST, G_STRUCT_OFFSET (NMActiveConnectionClass, device_changed), NULL, NULL, NULL, G_TYPE_NONE, 2, NM_TYPE_DEVICE, NM_TYPE_DEVICE); signals[DEVICE_METERED_CHANGED] = g_signal_new (NM_ACTIVE_CONNECTION_DEVICE_METERED_CHANGED, G_OBJECT_CLASS_TYPE (object_class), G_SIGNAL_RUN_FIRST, G_STRUCT_OFFSET (NMActiveConnectionClass, device_metered_changed), NULL, NULL, NULL, G_TYPE_NONE, 1, G_TYPE_UINT); signals[PARENT_ACTIVE] = g_signal_new (NM_ACTIVE_CONNECTION_PARENT_ACTIVE, G_OBJECT_CLASS_TYPE (object_class), G_SIGNAL_RUN_FIRST, G_STRUCT_OFFSET (NMActiveConnectionClass, parent_active), NULL, NULL, NULL, G_TYPE_NONE, 1, NM_TYPE_ACTIVE_CONNECTION); nm_exported_object_class_add_interface (NM_EXPORTED_OBJECT_CLASS (ac_class), NMDBUS_TYPE_ACTIVE_CONNECTION_SKELETON, NULL); }
static void gtk_switch_class_init (GtkSwitchClass *klass) { GtkWidgetClass *widget_class = GTK_WIDGET_CLASS (klass); GObjectClass *gobject_class = G_OBJECT_CLASS (klass); gpointer activatable_iface; G_GNUC_BEGIN_IGNORE_DEPRECATIONS; activatable_iface = g_type_default_interface_peek (GTK_TYPE_ACTIVATABLE); G_GNUC_END_IGNORE_DEPRECATIONS; switch_props[PROP_RELATED_ACTION] = g_param_spec_override ("related-action", g_object_interface_find_property (activatable_iface, "related-action")); switch_props[PROP_USE_ACTION_APPEARANCE] = g_param_spec_override ("use-action-appearance", g_object_interface_find_property (activatable_iface, "use-action-appearance")); /** * GtkSwitch:active: * * Whether the #GtkSwitch widget is in its on or off state. */ switch_props[PROP_ACTIVE] = g_param_spec_boolean ("active", P_("Active"), P_("Whether the switch is on or off"), FALSE, GTK_PARAM_READWRITE); gobject_class->set_property = gtk_switch_set_property; gobject_class->get_property = gtk_switch_get_property; gobject_class->dispose = gtk_switch_dispose; g_object_class_install_properties (gobject_class, LAST_PROP, switch_props); widget_class->get_preferred_width = gtk_switch_get_preferred_width; widget_class->get_preferred_height = gtk_switch_get_preferred_height; widget_class->size_allocate = gtk_switch_size_allocate; widget_class->realize = gtk_switch_realize; widget_class->unrealize = gtk_switch_unrealize; widget_class->map = gtk_switch_map; widget_class->unmap = gtk_switch_unmap; widget_class->draw = gtk_switch_draw; widget_class->button_press_event = gtk_switch_button_press; widget_class->button_release_event = gtk_switch_button_release; widget_class->motion_notify_event = gtk_switch_motion; widget_class->enter_notify_event = gtk_switch_enter; widget_class->leave_notify_event = gtk_switch_leave; klass->activate = gtk_switch_activate; /** * GtkSwitch:slider-width: * * The minimum width of the #GtkSwitch handle, in pixels. */ gtk_widget_class_install_style_property (widget_class, g_param_spec_int ("slider-width", P_("Slider Width"), P_("The minimum width of the handle"), DEFAULT_SLIDER_WIDTH, G_MAXINT, DEFAULT_SLIDER_WIDTH, GTK_PARAM_READABLE)); /** * GtkSwitch::activate: * @widget: the object which received the signal. * * The ::activate signal on GtkSwitch is an action signal and * emitting it causes the switch to animate. * Applications should never connect to this signal, but use the * notify::active signal. */ signals[ACTIVATE] = g_signal_new (I_("activate"), G_OBJECT_CLASS_TYPE (gobject_class), G_SIGNAL_RUN_FIRST | G_SIGNAL_ACTION, G_STRUCT_OFFSET (GtkSwitchClass, activate), NULL, NULL, _gtk_marshal_VOID__VOID, G_TYPE_NONE, 0); widget_class->activate_signal = signals[ACTIVATE]; g_object_class_override_property (gobject_class, PROP_ACTION_NAME, "action-name"); g_object_class_override_property (gobject_class, PROP_ACTION_TARGET, "action-target"); gtk_widget_class_set_accessible_type (widget_class, GTK_TYPE_SWITCH_ACCESSIBLE); gtk_widget_class_set_accessible_role (widget_class, ATK_ROLE_TOGGLE_BUTTON); }
static void clutter_cairo_texture_class_init (ClutterCairoTextureClass *klass) { GObjectClass *gobject_class = G_OBJECT_CLASS (klass); ClutterActorClass *actor_class = CLUTTER_ACTOR_CLASS (klass); gobject_class->finalize = clutter_cairo_texture_finalize; gobject_class->set_property = clutter_cairo_texture_set_property; gobject_class->get_property = clutter_cairo_texture_get_property; gobject_class->notify = clutter_cairo_texture_notify; actor_class->get_paint_volume = clutter_cairo_texture_get_paint_volume; actor_class->get_preferred_width = clutter_cairo_texture_get_preferred_width; actor_class->get_preferred_height = clutter_cairo_texture_get_preferred_height; klass->create_surface = clutter_cairo_texture_create_surface; g_type_class_add_private (gobject_class, sizeof (ClutterCairoTexturePrivate)); /** * ClutterCairoTexture:surface-width: * * The width of the Cairo surface used by the #ClutterCairoTexture * actor, in pixels. * * Since: 1.0 */ obj_props[PROP_SURFACE_WIDTH] = g_param_spec_uint ("surface-width", P_("Surface Width"), P_("The width of the Cairo surface"), 0, G_MAXUINT, 0, CLUTTER_PARAM_READWRITE); /** * ClutterCairoTexture:surface-height: * * The height of the Cairo surface used by the #ClutterCairoTexture * actor, in pixels. * * Since: 1.0 */ obj_props[PROP_SURFACE_HEIGHT] = g_param_spec_uint ("surface-height", P_("Surface Height"), P_("The height of the Cairo surface"), 0, G_MAXUINT, 0, CLUTTER_PARAM_READWRITE); g_object_class_install_properties (gobject_class, PROP_LAST, obj_props); /** * ClutterCairoTexture::create-surface: * @texture: the #ClutterCairoTexture that emitted the signal * @width: the width of the surface to create * @height: the height of the surface to create * * The ::create-surface signal is emitted when a #ClutterCairoTexture * news its surface (re)created, which happens either when the Cairo * context is created with clutter_cairo_texture_create() or * clutter_cairo_texture_create_region(), or when the surface is resized * through clutter_cairo_texture_set_surface_size(). * * The first signal handler that returns a non-%NULL, valid surface will * stop any further signal emission, and the returned surface will be * the one used. * * Return value: the newly created #cairo_surface_t for the texture * * Since: 1.6 */ cairo_signals[CREATE_SURFACE] = g_signal_new (I_("create-surface"), G_TYPE_FROM_CLASS (klass), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (ClutterCairoTextureClass, create_surface), create_surface_accum, NULL, _clutter_marshal_BOXED__UINT_UINT, CAIRO_GOBJECT_TYPE_SURFACE, 2, G_TYPE_UINT, G_TYPE_UINT); }
static void gtk_places_view_row_class_init (GtkPlacesViewRowClass *klass) { GObjectClass *object_class = G_OBJECT_CLASS (klass); GtkWidgetClass *widget_class = GTK_WIDGET_CLASS (klass); object_class->finalize = gtk_places_view_row_finalize; object_class->get_property = gtk_places_view_row_get_property; object_class->set_property = gtk_places_view_row_set_property; properties[PROP_ICON] = g_param_spec_object ("icon", P_("Icon of the row"), P_("The icon representing the volume"), G_TYPE_ICON, G_PARAM_READWRITE); properties[PROP_NAME] = g_param_spec_string ("name", P_("Name of the volume"), P_("The name of the volume"), "", G_PARAM_READWRITE); properties[PROP_PATH] = g_param_spec_string ("path", P_("Path of the volume"), P_("The path of the volume"), "", G_PARAM_READWRITE); properties[PROP_VOLUME] = g_param_spec_object ("volume", P_("Volume represented by the row"), P_("The volume represented by the row"), G_TYPE_VOLUME, G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY); properties[PROP_MOUNT] = g_param_spec_object ("mount", P_("Mount represented by the row"), P_("The mount point represented by the row, if any"), G_TYPE_MOUNT, G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY); properties[PROP_FILE] = g_param_spec_object ("file", P_("File represented by the row"), P_("The file represented by the row, if any"), G_TYPE_FILE, G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY); properties[PROP_IS_NETWORK] = g_param_spec_boolean ("is-network", P_("Whether the row represents a network location"), P_("Whether the row represents a network location"), FALSE, G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY); g_object_class_install_properties (object_class, LAST_PROP, properties); gtk_widget_class_set_template_from_resource (widget_class, "/org/gtk/libgtk/ui/gtkplacesviewrow.ui"); gtk_widget_class_bind_template_child (widget_class, GtkPlacesViewRow, busy_spinner); gtk_widget_class_bind_template_child (widget_class, GtkPlacesViewRow, eject_button); gtk_widget_class_bind_template_child (widget_class, GtkPlacesViewRow, eject_icon); gtk_widget_class_bind_template_child (widget_class, GtkPlacesViewRow, event_box); gtk_widget_class_bind_template_child (widget_class, GtkPlacesViewRow, icon_image); gtk_widget_class_bind_template_child (widget_class, GtkPlacesViewRow, name_label); gtk_widget_class_bind_template_child (widget_class, GtkPlacesViewRow, path_label); }
static void gtk_switch_class_init (GtkSwitchClass *klass) { GtkWidgetClass *widget_class = GTK_WIDGET_CLASS (klass); GObjectClass *gobject_class = G_OBJECT_CLASS (klass); /** * GtkSwitch:active: * * Whether the #GtkSwitch widget is in its on or off state. */ switch_props[PROP_ACTIVE] = g_param_spec_boolean ("active", P_("Active"), P_("Whether the switch is on or off"), FALSE, GTK_PARAM_READWRITE|G_PARAM_EXPLICIT_NOTIFY); /** * GtkSwitch:state: * * The backend state that is controlled by the switch. * See #GtkSwitch::state-set for details. * * Since: 3.14 */ switch_props[PROP_STATE] = g_param_spec_boolean ("state", P_("State"), P_("The backend state"), FALSE, GTK_PARAM_READWRITE|G_PARAM_EXPLICIT_NOTIFY); gobject_class->set_property = gtk_switch_set_property; gobject_class->get_property = gtk_switch_get_property; gobject_class->dispose = gtk_switch_dispose; gobject_class->finalize = gtk_switch_finalize; g_object_class_install_properties (gobject_class, LAST_PROP, switch_props); widget_class->measure = gtk_switch_measure; widget_class->size_allocate = gtk_switch_size_allocate; widget_class->realize = gtk_switch_realize; widget_class->unrealize = gtk_switch_unrealize; widget_class->map = gtk_switch_map; widget_class->unmap = gtk_switch_unmap; widget_class->snapshot = gtk_switch_snapshot; widget_class->enter_notify_event = gtk_switch_enter; widget_class->leave_notify_event = gtk_switch_leave; widget_class->screen_changed = gtk_switch_screen_changed; widget_class->style_updated = gtk_switch_style_updated; klass->activate = gtk_switch_activate; klass->state_set = state_set; /** * GtkSwitch::activate: * @widget: the object which received the signal. * * The ::activate signal on GtkSwitch is an action signal and * emitting it causes the switch to animate. * Applications should never connect to this signal, but use the * notify::active signal. */ signals[ACTIVATE] = g_signal_new (I_("activate"), G_OBJECT_CLASS_TYPE (gobject_class), G_SIGNAL_RUN_FIRST | G_SIGNAL_ACTION, G_STRUCT_OFFSET (GtkSwitchClass, activate), NULL, NULL, NULL, G_TYPE_NONE, 0); widget_class->activate_signal = signals[ACTIVATE]; /** * GtkSwitch::state-set: * @widget: the object on which the signal was emitted * @state: the new state of the switch * * The ::state-set signal on GtkSwitch is emitted to change the underlying * state. It is emitted when the user changes the switch position. The * default handler keeps the state in sync with the #GtkSwitch:active * property. * * To implement delayed state change, applications can connect to this signal, * initiate the change of the underlying state, and call gtk_switch_set_state() * when the underlying state change is complete. The signal handler should * return %TRUE to prevent the default handler from running. * * Visually, the underlying state is represented by the trough color of * the switch, while the #GtkSwitch:active property is represented by the * position of the switch. * * Returns: %TRUE to stop the signal emission * * Since: 3.14 */ signals[STATE_SET] = g_signal_new (I_("state-set"), G_OBJECT_CLASS_TYPE (gobject_class), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (GtkSwitchClass, state_set), _gtk_boolean_handled_accumulator, NULL, _gtk_marshal_BOOLEAN__BOOLEAN, G_TYPE_BOOLEAN, 1, G_TYPE_BOOLEAN); g_object_class_override_property (gobject_class, PROP_ACTION_NAME, "action-name"); g_object_class_override_property (gobject_class, PROP_ACTION_TARGET, "action-target"); gtk_widget_class_set_accessible_type (widget_class, GTK_TYPE_SWITCH_ACCESSIBLE); gtk_widget_class_set_accessible_role (widget_class, ATK_ROLE_TOGGLE_BUTTON); gtk_widget_class_set_css_name (widget_class, "switch"); }
static void gdk_keymap_class_init (GdkKeymapClass *klass) { GObjectClass *object_class = G_OBJECT_CLASS (klass); object_class->get_property = gdk_keymap_get_property; object_class->set_property = gdk_keymap_set_property; klass->get_modifier_mask = gdk_keymap_real_get_modifier_mask; props[PROP_DISPLAY] = g_param_spec_object ("display", "Display", "The display of the keymap", GDK_TYPE_DISPLAY, G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY | G_PARAM_STATIC_STRINGS); g_object_class_install_properties (object_class, LAST_PROP, props); /** * GdkKeymap::direction-changed: * @keymap: the object on which the signal is emitted * * The ::direction-changed signal gets emitted when the direction * of the keymap changes. See gdk_keymap_get_direction(). */ signals[DIRECTION_CHANGED] = g_signal_new (g_intern_static_string ("direction-changed"), G_OBJECT_CLASS_TYPE (object_class), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (GdkKeymapClass, direction_changed), NULL, NULL, g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0); /** * GdkKeymap::keys-changed: * @keymap: the object on which the signal is emitted * * The ::keys-changed signal is emitted when the mapping represented by * @keymap changes. */ signals[KEYS_CHANGED] = g_signal_new (g_intern_static_string ("keys-changed"), G_OBJECT_CLASS_TYPE (object_class), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (GdkKeymapClass, keys_changed), NULL, NULL, g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0); /** * GdkKeymap::state-changed: * @keymap: the object on which the signal is emitted * * The ::state-changed signal is emitted when the state of the * keyboard changes, e.g when Caps Lock is turned on or off. * See gdk_keymap_get_caps_lock_state(). */ signals[STATE_CHANGED] = g_signal_new (g_intern_static_string ("state-changed"), G_OBJECT_CLASS_TYPE (object_class), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (GdkKeymapClass, state_changed), NULL, NULL, g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0); }
static void gst_msdkvpp_class_init (GstMsdkVPPClass * klass) { GObjectClass *gobject_class; GstElementClass *element_class; GstBaseTransformClass *trans_class; GParamSpec *obj_properties[PROP_N] = { NULL, }; gobject_class = G_OBJECT_CLASS (klass); element_class = GST_ELEMENT_CLASS (klass); trans_class = GST_BASE_TRANSFORM_CLASS (klass); gobject_class->set_property = gst_msdkvpp_set_property; gobject_class->get_property = gst_msdkvpp_get_property; gobject_class->finalize = gst_msdkvpp_finalize; element_class->set_context = gst_msdkvpp_set_context; gst_element_class_add_static_pad_template (element_class, &gst_msdkvpp_src_factory); gst_element_class_add_static_pad_template (element_class, &gst_msdkvpp_sink_factory); gst_element_class_set_static_metadata (element_class, "MSDK Video Postprocessor", "Filter/Converter/Video;Filter/Converter/Video/Scaler;" "Filter/Effect/Video;Filter/Effect/Video/Deinterlace", "A MediaSDK Video Postprocessing Filter", "Sreerenj Balachandrn <*****@*****.**>"); trans_class->start = GST_DEBUG_FUNCPTR (gst_msdkvpp_start); trans_class->stop = GST_DEBUG_FUNCPTR (gst_msdkvpp_stop); trans_class->transform_caps = GST_DEBUG_FUNCPTR (gst_msdkvpp_transform_caps); trans_class->fixate_caps = GST_DEBUG_FUNCPTR (gst_msdkvpp_fixate_caps); trans_class->set_caps = GST_DEBUG_FUNCPTR (gst_msdkvpp_set_caps); trans_class->transform = GST_DEBUG_FUNCPTR (gst_msdkvpp_transform); trans_class->propose_allocation = GST_DEBUG_FUNCPTR (gst_msdkvpp_propose_allocation); trans_class->decide_allocation = GST_DEBUG_FUNCPTR (gst_msdkvpp_decide_allocation); trans_class->prepare_output_buffer = GST_DEBUG_FUNCPTR (gst_msdkvpp_prepare_output_buffer); obj_properties[PROP_HARDWARE] = g_param_spec_boolean ("hardware", "Hardware", "Enable hardware VPP", PROP_HARDWARE_DEFAULT, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS); obj_properties[PROP_ASYNC_DEPTH] = g_param_spec_uint ("async-depth", "Async Depth", "Depth of asynchronous pipeline", 1, 1, PROP_ASYNC_DEPTH_DEFAULT, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS); obj_properties[PROP_DENOISE] = g_param_spec_uint ("denoise", "Denoising factor", "Denoising Factor", 0, 100, PROP_DENOISE_DEFAULT, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS); obj_properties[PROP_ROTATION] = g_param_spec_enum ("rotation", "Rotation", "Rotation Angle", gst_msdkvpp_rotation_get_type (), PROP_ROTATION_DEFAULT, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS); obj_properties[PROP_DEINTERLACE_MODE] = g_param_spec_enum ("deinterlace-mode", "Deinterlace Mode", "Deinterlace mode to use", gst_msdkvpp_deinterlace_mode_get_type (), PROP_DEINTERLACE_MODE_DEFAULT, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS); obj_properties[PROP_DEINTERLACE_METHOD] = g_param_spec_enum ("deinterlace-method", "Deinterlace Method", "Deinterlace method to use", gst_msdkvpp_deinterlace_method_get_type (), PROP_DEINTERLACE_METHOD_DEFAULT, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS); obj_properties[PROP_HUE] = g_param_spec_float ("hue", "Hue", "The hue of the video", -180, 180, PROP_HUE_DEFAULT, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS); obj_properties[PROP_SATURATION] = g_param_spec_float ("saturation", "Saturation", "The Saturation of the video", 0, 10, PROP_SATURATION_DEFAULT, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS); obj_properties[PROP_BRIGHTNESS] = g_param_spec_float ("brightness", "Brightness", "The Brightness of the video", -100, 100, PROP_BRIGHTNESS_DEFAULT, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS); obj_properties[PROP_CONTRAST] = g_param_spec_float ("contrast", "Contrast", "The Contrast of the video", 0, 10, PROP_CONTRAST_DEFAULT, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS); obj_properties[PROP_DETAIL] = g_param_spec_uint ("detail", "Detail", "The factor of detail/edge enhancement filter algorithm", 0, 100, PROP_DETAIL_DEFAULT, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS); obj_properties[PROP_MIRRORING] = g_param_spec_enum ("mirroring", "Mirroring", "The Mirroring type", gst_msdkvpp_mirroring_get_type (), PROP_MIRRORING_DEFAULT, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS); obj_properties[PROP_SCALING_MODE] = g_param_spec_enum ("scaling-mode", "Scaling Mode", "The Scaling mode to use", gst_msdkvpp_scaling_mode_get_type (), PROP_SCALING_MODE_DEFAULT, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS); obj_properties[PROP_FORCE_ASPECT_RATIO] = g_param_spec_boolean ("force-aspect-ratio", "Force Aspect Ratio", "When enabled, scaling will respect original aspect ratio", PROP_FORCE_ASPECT_RATIO_DEFAULT, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS); obj_properties[PROP_FRC_ALGORITHM] = g_param_spec_enum ("frc-algorithm", "FrameRateControl Algorithm", "The Framerate Control Alogorithm to use", gst_msdkvpp_frc_algorithm_get_type (), PROP_FRC_ALGORITHM_DEFAULT, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS); g_object_class_install_properties (gobject_class, PROP_N, obj_properties); }
/* Class initialization * Override functions in parent classes and define properties * and signals */ static void xfdashboard_text_box_class_init(XfdashboardTextBoxClass *klass) { XfdashboardActorClass *actorClass=XFDASHBOARD_ACTOR_CLASS(klass); ClutterActorClass *clutterActorClass=CLUTTER_ACTOR_CLASS(klass); GObjectClass *gobjectClass=G_OBJECT_CLASS(klass); /* Override functions */ gobjectClass->dispose=_xfdashboard_text_box_dispose; gobjectClass->set_property=_xfdashboard_text_box_set_property; gobjectClass->get_property=_xfdashboard_text_box_get_property; clutterActorClass->show_all=_xfdashboard_text_box_show; clutterActorClass->get_preferred_width=_xfdashboard_text_box_get_preferred_width; clutterActorClass->get_preferred_height=_xfdashboard_text_box_get_preferred_height; clutterActorClass->allocate=_xfdashboard_text_box_allocate; clutterActorClass->destroy=_xfdashboard_text_box_destroy; clutterActorClass->key_focus_in=_xfdashboard_text_box_key_focus_in; /* Set up private structure */ g_type_class_add_private(klass, sizeof(XfdashboardTextBoxPrivate)); /* Define properties */ XfdashboardTextBoxProperties[PROP_PADDING]= g_param_spec_float("padding", _("Padding"), _("Padding between background and elements"), 0.0f, G_MAXFLOAT, 0.0f, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS); XfdashboardTextBoxProperties[PROP_SPACING]= g_param_spec_float("spacing", _("Spacing"), _("Spacing between text and icon"), 0.0f, G_MAXFLOAT, 0.0f, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS); XfdashboardTextBoxProperties[PROP_EDITABLE]= g_param_spec_boolean("editable", _("Editable"), _("Flag to set if text is editable"), FALSE, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS); XfdashboardTextBoxProperties[PROP_PRIMARY_ICON_NAME]= g_param_spec_string("primary-icon-name", _("Primary icon name"), _("Themed icon name or file name of primary icon shown left of text box"), NULL, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS); XfdashboardTextBoxProperties[PROP_SECONDARY_ICON_NAME]= g_param_spec_string("secondary-icon-name", _("Secondary icon name"), _("Themed icon name or file name of secondary icon shown right of text box"), NULL, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS); XfdashboardTextBoxProperties[PROP_TEXT]= g_param_spec_string("text", _("Text"), _("Text of editable text box"), N_(""), G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS); XfdashboardTextBoxProperties[PROP_TEXT_FONT]= g_param_spec_string("text-font", _("Text font"), _("Font of editable text box"), NULL, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS); XfdashboardTextBoxProperties[PROP_TEXT_COLOR]= clutter_param_spec_color("text-color", _("Text color"), _("Color of text in editable text box"), NULL, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS); XfdashboardTextBoxProperties[PROP_SELECTION_TEXT_COLOR]= clutter_param_spec_color("selection-text-color", _("Selection text color"), _("Color of text of selected text"), NULL, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS); XfdashboardTextBoxProperties[PROP_SELECTION_BACKGROUND_COLOR]= clutter_param_spec_color("selection-background-color", _("Selection background color"), _("Color of background of selected text"), NULL, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS); XfdashboardTextBoxProperties[PROP_HINT_TEXT]= g_param_spec_string("hint-text", _("Hint text"), _("Hint text shown if editable text box is empty"), NULL, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS); XfdashboardTextBoxProperties[PROP_HINT_TEXT_FONT]= g_param_spec_string("hint-text-font", _("Hint text font"), _("Font of hint text shown if editable text box is empty"), NULL, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS); XfdashboardTextBoxProperties[PROP_HINT_TEXT_COLOR]= clutter_param_spec_color("hint-text-color", _("Hint text color"), _("Color of hint text shown if editable text box is empty"), NULL, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS); XfdashboardTextBoxProperties[PROP_HINT_TEXT_SET]= g_param_spec_boolean("hint-text-set", _("Hint text set"), _("Flag indicating if a hint text was set"), FALSE, G_PARAM_READABLE | G_PARAM_STATIC_STRINGS); g_object_class_install_properties(gobjectClass, PROP_LAST, XfdashboardTextBoxProperties); /* Define stylable properties */ xfdashboard_actor_install_stylable_property(actorClass, XfdashboardTextBoxProperties[PROP_PADDING]); xfdashboard_actor_install_stylable_property(actorClass, XfdashboardTextBoxProperties[PROP_SPACING]); xfdashboard_actor_install_stylable_property(actorClass, XfdashboardTextBoxProperties[PROP_PRIMARY_ICON_NAME]); xfdashboard_actor_install_stylable_property(actorClass, XfdashboardTextBoxProperties[PROP_SECONDARY_ICON_NAME]); xfdashboard_actor_install_stylable_property(actorClass, XfdashboardTextBoxProperties[PROP_TEXT_FONT]); xfdashboard_actor_install_stylable_property(actorClass, XfdashboardTextBoxProperties[PROP_TEXT_COLOR]); xfdashboard_actor_install_stylable_property(actorClass, XfdashboardTextBoxProperties[PROP_SELECTION_BACKGROUND_COLOR]); xfdashboard_actor_install_stylable_property(actorClass, XfdashboardTextBoxProperties[PROP_HINT_TEXT_FONT]); xfdashboard_actor_install_stylable_property(actorClass, XfdashboardTextBoxProperties[PROP_HINT_TEXT_COLOR]); /* Define signals */ XfdashboardTextBoxSignals[SIGNAL_TEXT_CHANGED]= g_signal_new("text-changed", G_TYPE_FROM_CLASS(klass), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET(XfdashboardTextBoxClass, text_changed), NULL, NULL, g_cclosure_marshal_VOID__STRING, G_TYPE_NONE, 1, G_TYPE_STRING); XfdashboardTextBoxSignals[SIGNAL_PRIMARY_ICON_CLICKED]= g_signal_new("primary-icon-clicked", G_TYPE_FROM_CLASS(klass), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET(XfdashboardTextBoxClass, primary_icon_clicked), NULL, NULL, g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0); XfdashboardTextBoxSignals[SIGNAL_SECONDARY_ICON_CLICKED]= g_signal_new("secondary-icon-clicked", G_TYPE_FROM_CLASS(klass), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET(XfdashboardTextBoxClass, secondary_icon_clicked), NULL, NULL, g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0); }