static void cedit_document_saver_class_init (CeditDocumentSaverClass *klass) { GObjectClass *object_class = G_OBJECT_CLASS (klass); object_class->finalize = cedit_document_saver_finalize; object_class->dispose = cedit_document_saver_dispose; object_class->set_property = cedit_document_saver_set_property; object_class->get_property = cedit_document_saver_get_property; g_object_class_install_property (object_class, PROP_DOCUMENT, g_param_spec_object ("document", "Document", "The CeditDocument this CeditDocumentSaver is associated with", CEDIT_TYPE_DOCUMENT, G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY | G_PARAM_STATIC_STRINGS)); g_object_class_install_property (object_class, PROP_URI, g_param_spec_string ("uri", "URI", "The URI this CeditDocumentSaver saves the document to", "", G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY | G_PARAM_STATIC_STRINGS)); g_object_class_install_property (object_class, PROP_ENCODING, g_param_spec_boxed ("encoding", "URI", "The encoding of the saved file", CEDIT_TYPE_ENCODING, G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY | G_PARAM_STATIC_STRINGS)); g_object_class_install_property (object_class, PROP_NEWLINE_TYPE, g_param_spec_enum ("newline-type", "Newline type", "The accepted types of line ending", CEDIT_TYPE_DOCUMENT_NEWLINE_TYPE, CEDIT_DOCUMENT_NEWLINE_TYPE_LF, G_PARAM_READWRITE | G_PARAM_STATIC_NAME | G_PARAM_STATIC_BLURB | G_PARAM_CONSTRUCT_ONLY)); g_object_class_install_property (object_class, PROP_FLAGS, g_param_spec_flags ("flags", "Flags", "The flags for the saving operation", CEDIT_TYPE_DOCUMENT_SAVE_FLAGS, 0, G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY)); signals[SAVING] = g_signal_new ("saving", G_OBJECT_CLASS_TYPE (object_class), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (CeditDocumentSaverClass, saving), NULL, NULL, cedit_marshal_VOID__BOOLEAN_POINTER, G_TYPE_NONE, 2, G_TYPE_BOOLEAN, G_TYPE_POINTER); }
static void soup_socket_class_init (SoupSocketClass *socket_class) { GObjectClass *object_class = G_OBJECT_CLASS (socket_class); g_type_class_add_private (socket_class, sizeof (SoupSocketPrivate)); /* virtual method override */ object_class->finalize = soup_socket_finalize; object_class->set_property = soup_socket_set_property; object_class->get_property = soup_socket_get_property; /* signals */ /** * SoupSocket::readable: * @sock: the socket * * Emitted when an async socket is readable. See * soup_socket_read(), soup_socket_read_until() and * #SoupSocket:non-blocking. **/ signals[READABLE] = g_signal_new ("readable", G_OBJECT_CLASS_TYPE (object_class), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (SoupSocketClass, readable), NULL, NULL, NULL, G_TYPE_NONE, 0); /** * SoupSocket::writable: * @sock: the socket * * Emitted when an async socket is writable. See * soup_socket_write() and #SoupSocket:non-blocking. **/ signals[WRITABLE] = g_signal_new ("writable", G_OBJECT_CLASS_TYPE (object_class), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (SoupSocketClass, writable), NULL, NULL, NULL, G_TYPE_NONE, 0); /** * SoupSocket::disconnected: * @sock: the socket * * Emitted when the socket is disconnected, for whatever * reason. **/ signals[DISCONNECTED] = g_signal_new ("disconnected", G_OBJECT_CLASS_TYPE (object_class), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (SoupSocketClass, disconnected), NULL, NULL, NULL, G_TYPE_NONE, 0); /** * SoupSocket::new-connection: * @sock: the socket * @new: the new socket * * Emitted when a listening socket (set up with * soup_socket_listen()) receives a new connection. * * You must ref the @new if you want to keep it; otherwise it * will be destroyed after the signal is emitted. **/ signals[NEW_CONNECTION] = g_signal_new ("new_connection", G_OBJECT_CLASS_TYPE (object_class), G_SIGNAL_RUN_FIRST, G_STRUCT_OFFSET (SoupSocketClass, new_connection), NULL, NULL, NULL, G_TYPE_NONE, 1, SOUP_TYPE_SOCKET); /** * SoupSocket::event: * @sock: the socket * @event: the event that occurred * @connection: the current connection state * * Emitted when a network-related event occurs. See * #GSocketClient::event for more details. * * Since: 2.38 **/ signals[EVENT] = g_signal_new ("event", G_OBJECT_CLASS_TYPE (object_class), G_SIGNAL_RUN_LAST, 0, NULL, NULL, NULL, G_TYPE_NONE, 2, G_TYPE_SOCKET_CLIENT_EVENT, G_TYPE_IO_STREAM); /* properties */ /** * SOUP_SOCKET_LOCAL_ADDRESS: * * Alias for the #SoupSocket:local-address property. (Address * of local end of socket.) **/ g_object_class_install_property ( object_class, PROP_LOCAL_ADDRESS, g_param_spec_object (SOUP_SOCKET_LOCAL_ADDRESS, "Local address", "Address of local end of socket", SOUP_TYPE_ADDRESS, G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY)); /** * SOUP_SOCKET_REMOTE_ADDRESS: * * Alias for the #SoupSocket:remote-address property. (Address * of remote end of socket.) **/ g_object_class_install_property ( object_class, PROP_REMOTE_ADDRESS, g_param_spec_object (SOUP_SOCKET_REMOTE_ADDRESS, "Remote address", "Address of remote end of socket", SOUP_TYPE_ADDRESS, G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY)); /** * SoupSocket:non-blocking: * * Whether or not the socket uses non-blocking I/O. * * #SoupSocket's I/O methods are designed around the idea of * using a single codepath for both synchronous and * asynchronous I/O. If you want to read off a #SoupSocket, * the "correct" way to do it is to call soup_socket_read() or * soup_socket_read_until() repeatedly until you have read * everything you want. If it returns %SOUP_SOCKET_WOULD_BLOCK * at any point, stop reading and wait for it to emit the * #SoupSocket::readable signal. Then go back to the * reading-as-much-as-you-can loop. Likewise, for writing to a * #SoupSocket, you should call soup_socket_write() either * until you have written everything, or it returns * %SOUP_SOCKET_WOULD_BLOCK (in which case you wait for * #SoupSocket::writable and then go back into the loop). * * Code written this way will work correctly with both * blocking and non-blocking sockets; blocking sockets will * simply never return %SOUP_SOCKET_WOULD_BLOCK, and so the * code that handles that case just won't get used for them. **/ /** * SOUP_SOCKET_FLAG_NONBLOCKING: * * Alias for the #SoupSocket:non-blocking property. (Whether * or not the socket uses non-blocking I/O.) **/ g_object_class_install_property ( object_class, PROP_NON_BLOCKING, g_param_spec_boolean (SOUP_SOCKET_FLAG_NONBLOCKING, "Non-blocking", "Whether or not the socket uses non-blocking I/O", TRUE, G_PARAM_READWRITE)); /** * SOUP_SOCKET_IS_SERVER: * * Alias for the #SoupSocket:is-server property. (Whether or * not the socket is a server socket.) **/ g_object_class_install_property ( object_class, PROP_IS_SERVER, g_param_spec_boolean (SOUP_SOCKET_IS_SERVER, "Server", "Whether or not the socket is a server socket", FALSE, G_PARAM_READABLE)); /** * SOUP_SOCKET_SSL_CREDENTIALS: * * Alias for the #SoupSocket:ssl-creds property. * (SSL credential information.) **/ /* For historical reasons, there's only a single property * here, which is a GTlsDatabase for client sockets, and * a GTlsCertificate for server sockets. Whee! */ g_object_class_install_property ( object_class, PROP_SSL_CREDENTIALS, g_param_spec_pointer (SOUP_SOCKET_SSL_CREDENTIALS, "SSL credentials", "SSL credential information, passed from the session to the SSL implementation", G_PARAM_READWRITE)); /** * SOUP_SOCKET_SSL_STRICT: * * Alias for the #SoupSocket:ssl-strict property. **/ g_object_class_install_property ( object_class, PROP_SSL_STRICT, g_param_spec_boolean (SOUP_SOCKET_SSL_STRICT, "Strictly validate SSL certificates", "Whether certificate errors should be considered a connection error", TRUE, G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY)); /** * SOUP_SOCKET_SSL_FALLBACK: * * Alias for the #SoupSocket:ssl-fallback property. **/ g_object_class_install_property ( object_class, PROP_SSL_FALLBACK, g_param_spec_boolean (SOUP_SOCKET_SSL_FALLBACK, "SSLv3 fallback", "Use SSLv3 instead of TLS (client-side only)", FALSE, G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY)); /** * SOUP_SOCKET_TRUSTED_CERTIFICATE: * * Alias for the #SoupSocket:trusted-certificate * property. **/ g_object_class_install_property ( object_class, PROP_TRUSTED_CERTIFICATE, g_param_spec_boolean (SOUP_SOCKET_TRUSTED_CERTIFICATE, "Trusted Certificate", "Whether the server certificate is trusted, if this is an SSL socket", FALSE, G_PARAM_READABLE)); /** * SOUP_SOCKET_ASYNC_CONTEXT: * * Alias for the #SoupSocket:async-context property. (The * socket's #GMainContext.) **/ g_object_class_install_property ( object_class, PROP_ASYNC_CONTEXT, g_param_spec_pointer (SOUP_SOCKET_ASYNC_CONTEXT, "Async GMainContext", "The GMainContext to dispatch this socket's async I/O in", G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY)); /** * SOUP_SOCKET_USE_THREAD_CONTEXT: * * Alias for the #SoupSocket:use-thread-context property. (Use * g_main_context_get_thread_default()) * * Since: 2.38 */ /** * SoupSocket:use-thread-context: * * Use g_main_context_get_thread_default(). * * Since: 2.38 */ g_object_class_install_property ( object_class, PROP_USE_THREAD_CONTEXT, g_param_spec_boolean (SOUP_SOCKET_USE_THREAD_CONTEXT, "Use thread context", "Use g_main_context_get_thread_default", FALSE, G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY)); /** * SOUP_SOCKET_TIMEOUT: * * Alias for the #SoupSocket: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_SOCKET_TIMEOUT, "Timeout value", "Value in seconds to timeout a blocking I/O", 0, G_MAXUINT, 0, G_PARAM_READWRITE)); g_object_class_install_property ( object_class, PROP_CLEAN_DISPOSE, g_param_spec_boolean ("clean-dispose", "Clean dispose", "Warn on unclean dispose", FALSE, G_PARAM_WRITABLE | G_PARAM_CONSTRUCT_ONLY)); /** * SOUP_SOCKET_TLS_CERTIFICATE: * * Alias for the #SoupSocket:tls-certificate * property. Note that this property's value is only useful * if the socket is for a TLS connection, and only reliable * after some data has been transferred to or from it. * * Since: 2.34 **/ g_object_class_install_property ( object_class, PROP_TLS_CERTIFICATE, g_param_spec_object (SOUP_SOCKET_TLS_CERTIFICATE, "TLS certificate", "The peer's TLS certificate", G_TYPE_TLS_CERTIFICATE, G_PARAM_READABLE)); /** * SOUP_SOCKET_TLS_ERRORS: * * Alias for the #SoupSocket:tls-errors * property. Note that this property's value is only useful * if the socket is for a TLS connection, and only reliable * after some data has been transferred to or from it. * * Since: 2.34 **/ g_object_class_install_property ( object_class, PROP_TLS_ERRORS, g_param_spec_flags (SOUP_SOCKET_TLS_ERRORS, "TLS errors", "Errors with the peer's TLS certificate", G_TYPE_TLS_CERTIFICATE_FLAGS, 0, G_PARAM_READABLE)); g_object_class_install_property ( object_class, PROP_PROXY_RESOLVER, g_param_spec_object (SOUP_SOCKET_PROXY_RESOLVER, "Proxy resolver", "GProxyResolver to use", G_TYPE_PROXY_RESOLVER, G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY)); }
static void gtk_cell_renderer_accel_class_init (GtkCellRendererAccelClass *cell_accel_class) { GObjectClass *object_class; GtkCellRendererClass *cell_renderer_class; object_class = G_OBJECT_CLASS (cell_accel_class); cell_renderer_class = GTK_CELL_RENDERER_CLASS (cell_accel_class); object_class->set_property = gtk_cell_renderer_accel_set_property; object_class->get_property = gtk_cell_renderer_accel_get_property; cell_renderer_class->get_size = gtk_cell_renderer_accel_get_size; cell_renderer_class->start_editing = gtk_cell_renderer_accel_start_editing; /** * GtkCellRendererAccel:accel-key: * * The keyval of the accelerator. * * Since: 2.10 */ g_object_class_install_property (object_class, PROP_ACCEL_KEY, g_param_spec_uint ("accel-key", P_("Accelerator key"), P_("The keyval of the accelerator"), 0, G_MAXINT, 0, GTK_PARAM_READWRITE)); /** * GtkCellRendererAccel:accel-mods: * * The modifier mask of the accelerator. * * Since: 2.10 */ g_object_class_install_property (object_class, PROP_ACCEL_MODS, g_param_spec_flags ("accel-mods", P_("Accelerator modifiers"), P_("The modifier mask of the accelerator"), GDK_TYPE_MODIFIER_TYPE, 0, GTK_PARAM_READWRITE)); /** * GtkCellRendererAccel:keycode: * * The hardware keycode of the accelerator. Note that the hardware keycode is * only relevant if the key does not have a keyval. Normally, the keyboard * configuration should assign keyvals to all keys. * * Since: 2.10 */ g_object_class_install_property (object_class, PROP_KEYCODE, g_param_spec_uint ("keycode", P_("Accelerator keycode"), P_("The hardware keycode of the accelerator"), 0, G_MAXINT, 0, GTK_PARAM_READWRITE)); /** * GtkCellRendererAccel:accel-mode: * * Determines if the edited accelerators are GTK+ accelerators. If * they are, consumed modifiers are suppressed, only accelerators * accepted by GTK+ are allowed, and the accelerators are rendered * in the same way as they are in menus. * * Since: 2.10 */ g_object_class_install_property (object_class, PROP_ACCEL_MODE, g_param_spec_enum ("accel-mode", P_("Accelerator Mode"), P_("The type of accelerators"), GTK_TYPE_CELL_RENDERER_ACCEL_MODE, GTK_CELL_RENDERER_ACCEL_MODE_GTK, GTK_PARAM_READWRITE)); /** * GtkCellRendererAccel::accel-edited: * @accel: the object reveiving the signal * @path_string: the path identifying the row of the edited cell * @accel_key: the new accelerator keyval * @accel_mods: the new acclerator modifier mask * @hardware_keycode: the keycode of the new accelerator * * Gets emitted when the user has selected a new accelerator. * * Since: 2.10 */ signals[ACCEL_EDITED] = g_signal_new (I_("accel-edited"), GTK_TYPE_CELL_RENDERER_ACCEL, G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (GtkCellRendererAccelClass, accel_edited), NULL, NULL, _gtk_marshal_VOID__STRING_UINT_FLAGS_UINT, G_TYPE_NONE, 4, G_TYPE_STRING, G_TYPE_UINT, GDK_TYPE_MODIFIER_TYPE, G_TYPE_UINT); /** * GtkCellRendererAccel::accel-cleared: * @accel: the object reveiving the signal * @path_string: the path identifying the row of the edited cell * * Gets emitted when the user has removed the accelerator. * * Since: 2.10 */ signals[ACCEL_CLEARED] = g_signal_new (I_("accel-cleared"), GTK_TYPE_CELL_RENDERER_ACCEL, G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (GtkCellRendererAccelClass, accel_cleared), NULL, NULL, g_cclosure_marshal_VOID__STRING, G_TYPE_NONE, 1, G_TYPE_STRING); }
static void gst_identity_class_init (GstIdentityClass * klass) { GObjectClass *gobject_class; GstElementClass *gstelement_class; GstBaseTransformClass *gstbasetrans_class; gobject_class = G_OBJECT_CLASS (klass); gstelement_class = GST_ELEMENT_CLASS (klass); gstbasetrans_class = GST_BASE_TRANSFORM_CLASS (klass); gobject_class->set_property = gst_identity_set_property; gobject_class->get_property = gst_identity_get_property; g_object_class_install_property (gobject_class, PROP_SLEEP_TIME, g_param_spec_uint ("sleep-time", "Sleep time", "Microseconds to sleep between processing", 0, G_MAXUINT, DEFAULT_SLEEP_TIME, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); g_object_class_install_property (gobject_class, PROP_ERROR_AFTER, g_param_spec_int ("error-after", "Error After", "Error after N buffers", G_MININT, G_MAXINT, DEFAULT_ERROR_AFTER, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); g_object_class_install_property (gobject_class, PROP_DROP_PROBABILITY, g_param_spec_float ("drop-probability", "Drop Probability", "The Probability a buffer is dropped", 0.0, 1.0, DEFAULT_DROP_PROBABILITY, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); /** * GstIdentity:drop-buffer-flags: * * Drop buffers with the given flags. * * Since: 1.8 **/ g_object_class_install_property (gobject_class, PROP_DROP_BUFFER_FLAGS, g_param_spec_flags ("drop-buffer-flags", "Check flags to drop buffers", "Drop buffers with the given flags", GST_TYPE_BUFFER_FLAGS, DEFAULT_DROP_BUFFER_FLAGS, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); g_object_class_install_property (gobject_class, PROP_DATARATE, g_param_spec_int ("datarate", "Datarate", "(Re)timestamps buffers with number of bytes per second (0 = inactive)", 0, G_MAXINT, DEFAULT_DATARATE, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); g_object_class_install_property (gobject_class, PROP_SILENT, g_param_spec_boolean ("silent", "silent", "silent", DEFAULT_SILENT, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); g_object_class_install_property (gobject_class, PROP_SINGLE_SEGMENT, g_param_spec_boolean ("single-segment", "Single Segment", "Timestamp buffers and eat segments so as to appear as one segment", DEFAULT_SINGLE_SEGMENT, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); pspec_last_message = g_param_spec_string ("last-message", "last-message", "last-message", NULL, G_PARAM_READABLE | G_PARAM_STATIC_STRINGS); g_object_class_install_property (gobject_class, PROP_LAST_MESSAGE, pspec_last_message); g_object_class_install_property (gobject_class, PROP_DUMP, g_param_spec_boolean ("dump", "Dump", "Dump buffer contents to stdout", DEFAULT_DUMP, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); g_object_class_install_property (gobject_class, PROP_SYNC, g_param_spec_boolean ("sync", "Synchronize", "Synchronize to pipeline clock", DEFAULT_SYNC, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); g_object_class_install_property (gobject_class, PROP_CHECK_IMPERFECT_TIMESTAMP, g_param_spec_boolean ("check-imperfect-timestamp", "Check for discontiguous timestamps", "Send element messages if timestamps and durations do not match up", DEFAULT_CHECK_IMPERFECT_TIMESTAMP, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); g_object_class_install_property (gobject_class, PROP_CHECK_IMPERFECT_OFFSET, g_param_spec_boolean ("check-imperfect-offset", "Check for discontiguous offset", "Send element messages if offset and offset_end do not match up", DEFAULT_CHECK_IMPERFECT_OFFSET, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); /** * GstIdentity:signal-handoffs * * If set to #TRUE, the identity will emit a handoff signal when handling a buffer. * When set to #FALSE, no signal will be emitted, which might improve performance. */ g_object_class_install_property (gobject_class, PROP_SIGNAL_HANDOFFS, g_param_spec_boolean ("signal-handoffs", "Signal handoffs", "Send a signal before pushing the buffer", DEFAULT_SIGNAL_HANDOFFS, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); /** * GstIdentity::handoff: * @identity: the identity instance * @buffer: the buffer that just has been received * @pad: the pad that received it * * This signal gets emitted before passing the buffer downstream. */ gst_identity_signals[SIGNAL_HANDOFF] = g_signal_new ("handoff", G_TYPE_FROM_CLASS (klass), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (GstIdentityClass, handoff), NULL, NULL, g_cclosure_marshal_generic, G_TYPE_NONE, 1, GST_TYPE_BUFFER | G_SIGNAL_TYPE_STATIC_SCOPE); gobject_class->finalize = gst_identity_finalize; gst_element_class_set_static_metadata (gstelement_class, "Identity", "Generic", "Pass data without modification", "Erik Walthinsen <*****@*****.**>"); gst_element_class_add_pad_template (gstelement_class, gst_static_pad_template_get (&srctemplate)); gst_element_class_add_pad_template (gstelement_class, gst_static_pad_template_get (&sinktemplate)); gstelement_class->change_state = GST_DEBUG_FUNCPTR (gst_identity_change_state); gstbasetrans_class->sink_event = GST_DEBUG_FUNCPTR (gst_identity_sink_event); gstbasetrans_class->transform_ip = GST_DEBUG_FUNCPTR (gst_identity_transform_ip); gstbasetrans_class->start = GST_DEBUG_FUNCPTR (gst_identity_start); gstbasetrans_class->stop = GST_DEBUG_FUNCPTR (gst_identity_stop); gstbasetrans_class->accept_caps = GST_DEBUG_FUNCPTR (gst_identity_accept_caps); gstbasetrans_class->query = gst_identity_query; }
static void g_dtls_client_connection_default_init (GDtlsClientConnectionInterface *iface) { /** * GDtlsClientConnection:validation-flags: * * What steps to perform when validating a certificate received from * a server. Server certificates that fail to validate in all of the * ways indicated here will be rejected unless the application * overrides the default via #GDtlsConnection::accept-certificate. * * Since: 2.48 */ g_object_interface_install_property (iface, g_param_spec_flags ("validation-flags", P_("Validation flags"), P_("What certificate validation to perform"), G_TYPE_TLS_CERTIFICATE_FLAGS, G_TLS_CERTIFICATE_VALIDATE_ALL, G_PARAM_READWRITE | G_PARAM_CONSTRUCT | G_PARAM_STATIC_STRINGS)); /** * GDtlsClientConnection:server-identity: * * A #GSocketConnectable describing the identity of the server that * is expected on the other end of the connection. * * If the %G_TLS_CERTIFICATE_BAD_IDENTITY flag is set in * #GDtlsClientConnection:validation-flags, this object will be used * to determine the expected identify of the remote end of the * connection; if #GDtlsClientConnection:server-identity is not set, * or does not match the identity presented by the server, then the * %G_TLS_CERTIFICATE_BAD_IDENTITY validation will fail. * * In addition to its use in verifying the server certificate, * this is also used to give a hint to the server about what * certificate we expect, which is useful for servers that serve * virtual hosts. * * Since: 2.48 */ g_object_interface_install_property (iface, g_param_spec_object ("server-identity", P_("Server identity"), P_("GSocketConnectable identifying the server"), G_TYPE_SOCKET_CONNECTABLE, G_PARAM_READWRITE | G_PARAM_CONSTRUCT | G_PARAM_STATIC_STRINGS)); /** * GDtlsClientConnection:accepted-cas: (type GLib.List) (element-type GLib.ByteArray) * * A list of the distinguished names of the Certificate Authorities * that the server will accept client certificates signed by. If the * server requests a client certificate during the handshake, then * this property will be set after the handshake completes. * * Each item in the list is a #GByteArray which contains the complete * subject DN of the certificate authority. * * Since: 2.48 */ g_object_interface_install_property (iface, g_param_spec_pointer ("accepted-cas", P_("Accepted CAs"), P_("Distinguished names of the CAs the server accepts certificates from"), G_PARAM_READABLE | G_PARAM_STATIC_STRINGS)); }
static void gst_rtsp_media_factory_class_init (GstRTSPMediaFactoryClass * klass) { GObjectClass *gobject_class; g_type_class_add_private (klass, sizeof (GstRTSPMediaFactoryPrivate)); gobject_class = G_OBJECT_CLASS (klass); gobject_class->get_property = gst_rtsp_media_factory_get_property; gobject_class->set_property = gst_rtsp_media_factory_set_property; gobject_class->finalize = gst_rtsp_media_factory_finalize; /** * GstRTSPMediaFactory::launch: * * The gst_parse_launch() line to use for constructing the pipeline in the * default prepare vmethod. * * The pipeline description should return a GstBin as the toplevel element * which can be accomplished by enclosing the dscription with brackets '(' * ')'. * * The description should return a pipeline with payloaders named pay0, pay1, * etc.. Each of the payloaders will result in a stream. * * Support for dynamic payloaders can be accomplished by adding payloaders * named dynpay0, dynpay1, etc.. */ g_object_class_install_property (gobject_class, PROP_LAUNCH, g_param_spec_string ("launch", "Launch", "A launch description of the pipeline", DEFAULT_LAUNCH, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); g_object_class_install_property (gobject_class, PROP_SHARED, g_param_spec_boolean ("shared", "Shared", "If media from this factory is shared", DEFAULT_SHARED, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); g_object_class_install_property (gobject_class, PROP_SUSPEND_MODE, g_param_spec_enum ("suspend-mode", "Suspend Mode", "Control how media will be suspended", GST_TYPE_RTSP_SUSPEND_MODE, DEFAULT_SUSPEND_MODE, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); g_object_class_install_property (gobject_class, PROP_EOS_SHUTDOWN, g_param_spec_boolean ("eos-shutdown", "EOS Shutdown", "Send EOS down the pipeline before shutting down", DEFAULT_EOS_SHUTDOWN, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); g_object_class_install_property (gobject_class, PROP_PROFILES, g_param_spec_flags ("profiles", "Profiles", "Allowed transfer profiles", GST_TYPE_RTSP_PROFILE, DEFAULT_PROFILES, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); g_object_class_install_property (gobject_class, PROP_PROTOCOLS, g_param_spec_flags ("protocols", "Protocols", "Allowed lower transport protocols", GST_TYPE_RTSP_LOWER_TRANS, DEFAULT_PROTOCOLS, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); g_object_class_install_property (gobject_class, PROP_BUFFER_SIZE, g_param_spec_uint ("buffer-size", "Buffer Size", "The kernel UDP buffer size to use", 0, G_MAXUINT, DEFAULT_BUFFER_SIZE, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); g_object_class_install_property (gobject_class, PROP_LATENCY, g_param_spec_uint ("latency", "Latency", "Latency used for receiving media in milliseconds", 0, G_MAXUINT, DEFAULT_LATENCY, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); g_object_class_install_property (gobject_class, PROP_TRANSPORT_MODE, g_param_spec_flags ("transport-mode", "Transport Mode", "If media from this factory is for PLAY or RECORD", GST_TYPE_RTSP_TRANSPORT_MODE, DEFAULT_TRANSPORT_MODE, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); g_object_class_install_property (gobject_class, PROP_STOP_ON_DISCONNECT, g_param_spec_boolean ("stop-on-disconnect", "Stop On Disconnect", "If media from this factory should be stopped " "when a client disconnects without TEARDOWN", DEFAULT_STOP_ON_DISCONNECT, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); g_object_class_install_property (gobject_class, PROP_CLOCK, g_param_spec_object ("clock", "Clock", "Clock to be used by the pipelines created for all " "medias of this factory", GST_TYPE_CLOCK, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); gst_rtsp_media_factory_signals[SIGNAL_MEDIA_CONSTRUCTED] = g_signal_new ("media-constructed", G_TYPE_FROM_CLASS (klass), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (GstRTSPMediaFactoryClass, media_constructed), NULL, NULL, g_cclosure_marshal_generic, G_TYPE_NONE, 1, GST_TYPE_RTSP_MEDIA); gst_rtsp_media_factory_signals[SIGNAL_MEDIA_CONFIGURE] = g_signal_new ("media-configure", G_TYPE_FROM_CLASS (klass), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (GstRTSPMediaFactoryClass, media_configure), NULL, NULL, g_cclosure_marshal_generic, G_TYPE_NONE, 1, GST_TYPE_RTSP_MEDIA); klass->gen_key = default_gen_key; klass->create_element = default_create_element; klass->construct = default_construct; klass->configure = default_configure; klass->create_pipeline = default_create_pipeline; GST_DEBUG_CATEGORY_INIT (rtsp_media_debug, "rtspmediafactory", 0, "GstRTSPMediaFactory"); }
static void gst_rpi_cam_src_class_init (GstRpiCamSrcClass * klass) { GObjectClass *gobject_class; GstElementClass *gstelement_class; GstBaseSrcClass *basesrc_class; GstPushSrcClass *pushsrc_class; gobject_class = (GObjectClass *) klass; gstelement_class = (GstElementClass *) klass; basesrc_class = (GstBaseSrcClass *) klass; pushsrc_class = (GstPushSrcClass *) klass; gobject_class->finalize = gst_rpi_cam_src_finalize; gobject_class->set_property = gst_rpi_cam_src_set_property; gobject_class->get_property = gst_rpi_cam_src_get_property; g_object_class_install_property (gobject_class, PROP_CAMERA_NUMBER, g_param_spec_int ("camera-number", "Camera Number", "Which camera to use on a multi-camera system - 0 or 1", 0, 1, CAMERA_DEFAULT, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); g_object_class_install_property (gobject_class, PROP_BITRATE, g_param_spec_int ("bitrate", "Bitrate", "Bitrate for encoding. 0 for VBR using quantisation-parameter", 0, BITRATE_HIGHEST, BITRATE_DEFAULT, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); g_object_class_install_property (gobject_class, PROP_KEYFRAME_INTERVAL, g_param_spec_int ("keyframe-interval", "Keyframe Interface", "Interval (in frames) between I frames. -1 = automatic, 0 = single-keyframe", -1, G_MAXINT, KEYFRAME_INTERVAL_DEFAULT, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); g_object_class_install_property (gobject_class, PROP_PREVIEW, g_param_spec_boolean ("preview", "Preview Window", "Display preview window overlay", TRUE, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); g_object_class_install_property (gobject_class, PROP_FULLSCREEN, g_param_spec_boolean ("fullscreen", "Fullscreen Preview", "Display preview window full screen", TRUE, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); g_object_class_install_property (gobject_class, PROP_PREVIEW_ENCODED, g_param_spec_boolean ("preview-encoded", "Preview Encoded", "Display encoder output in the preview", TRUE, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); g_object_class_install_property (G_OBJECT_CLASS (klass), PROP_PREVIEW_OPACITY, g_param_spec_int ("preview-opacity", "Preview Opacity", "Opacity to use for the preview window", 0, 255, 255, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); g_object_class_install_property (G_OBJECT_CLASS (klass), PROP_SHARPNESS, g_param_spec_int ("sharpness", "Sharpness", "Image capture sharpness", -100, 100, SHARPNESS_DEFAULT, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); g_object_class_install_property (gobject_class, PROP_CONTRAST, g_param_spec_int ("contrast", "Contrast", "Image capture contrast", -100, 100, CONTRAST_DEFAULT, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); g_object_class_install_property (gobject_class, PROP_BRIGHTNESS, g_param_spec_int ("brightness", "Brightness", "Image capture brightness", 0, 100, BRIGHTNESS_DEFAULT, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); g_object_class_install_property (gobject_class, PROP_SATURATION, g_param_spec_int ("saturation", "Saturation", "Image capture saturation", -100, 100, SATURATION_DEFAULT, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); g_object_class_install_property (gobject_class, PROP_ISO, g_param_spec_int ("iso", "ISO", "ISO value to use (0 = Auto)", 0, 3200, 0, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); g_object_class_install_property (gobject_class, PROP_VIDEO_STABILISATION, g_param_spec_boolean ("video-stabilisation", "Video Stabilisation", "Enable or disable video stabilisation", FALSE, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); g_object_class_install_property (gobject_class, PROP_EXPOSURE_COMPENSATION, g_param_spec_int ("exposure-compensation", "EV compensation", "Exposure Value compensation", -10, 10, 0, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); g_object_class_install_property (gobject_class, PROP_EXPOSURE_MODE, g_param_spec_enum ("exposure-mode", "Exposure Mode", "Camera exposure mode to use", GST_RPI_CAM_TYPE_RPI_CAM_SRC_EXPOSURE_MODE, EXPOSURE_MODE_DEFAULT, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); g_object_class_install_property (gobject_class, PROP_EXPOSURE_METERING_MODE, g_param_spec_enum ("metering-mode", "Exposure Metering Mode", "Camera exposure metering mode to use", GST_RPI_CAM_TYPE_RPI_CAM_SRC_EXPOSURE_METERING_MODE, EXPOSURE_METERING_MODE_DEFAULT, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); g_object_class_install_property (gobject_class, PROP_DRC, g_param_spec_enum ("drc", "DRC level", "Dynamic Range Control level", GST_RPI_CAM_TYPE_RPI_CAM_SRC_DRC_LEVEL, GST_RPI_CAM_SRC_DRC_LEVEL_OFF, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); g_object_class_install_property (gobject_class, PROP_AWB_MODE, g_param_spec_enum ("awb-mode", "Automatic White Balance Mode", "White Balance mode", GST_RPI_CAM_TYPE_RPI_CAM_SRC_AWB_MODE, GST_RPI_CAM_SRC_AWB_MODE_AUTO, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); g_object_class_install_property (gobject_class, PROP_AWB_GAIN_RED, g_param_spec_float ("awb-gain-red", "AWB Red Gain", "Manual AWB Gain for red channel when awb-mode=OFF", 0, 8.0, 0, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); g_object_class_install_property (gobject_class, PROP_AWB_GAIN_RED, g_param_spec_float ("awb-gain-blue", "AWB Blue Gain", "Manual AWB Gain for blue channel when awb-mode=OFF", 0, 8.0, 0, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); g_object_class_install_property (gobject_class, PROP_IMAGE_EFFECT, g_param_spec_enum ("image-effect", "Image effect", "Visual FX to apply to the image", GST_RPI_CAM_TYPE_RPI_CAM_SRC_IMAGE_EFFECT, GST_RPI_CAM_SRC_IMAGEFX_NONE, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); #if 0 PROP_IMAGE_EFFECT_PARAMS, PROP_COLOUR_EFFECTS, #endif g_object_class_install_property (gobject_class, PROP_ROTATION, g_param_spec_int ("rotation", "Rotation", "Rotate captured image (0, 90, 180, 270 degrees)", 0, 270, 0, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); g_object_class_install_property (gobject_class, PROP_HFLIP, g_param_spec_boolean ("hflip", "Horizontal Flip", "Flip capture horizontally", FALSE, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); g_object_class_install_property (gobject_class, PROP_VFLIP, g_param_spec_boolean ("vflip", "Vertical Flip", "Flip capture vertically", FALSE, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); g_object_class_install_property (gobject_class, PROP_ROI_X, g_param_spec_float ("roi-x", "ROI X", "Normalised region-of-interest X coord", 0, 1.0, 0, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); g_object_class_install_property (gobject_class, PROP_ROI_Y, g_param_spec_float ("roi-y", "ROI Y", "Normalised region-of-interest Y coord", 0, 1.0, 0, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); g_object_class_install_property (gobject_class, PROP_ROI_W, g_param_spec_float ("roi-w", "ROI W", "Normalised region-of-interest W coord", 0, 1.0, 1.0, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); g_object_class_install_property (gobject_class, PROP_ROI_H, g_param_spec_float ("roi-h", "ROI H", "Normalised region-of-interest H coord", 0, 1.0, 1.0, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); g_object_class_install_property (gobject_class, PROP_QUANTISATION_PARAMETER, g_param_spec_int ("quantisation-parameter", "Quantisation Parameter", "Set a Quantisation Parameter approx 10-40 with bitrate=0 for VBR encoding. 0 = off", 0, G_MAXINT, QUANTISATION_DEFAULT, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); g_object_class_install_property (gobject_class, PROP_INLINE_HEADERS, g_param_spec_boolean ("inline-headers", "Inline Headers", "Set to TRUE to insert SPS/PPS before each IDR packet", FALSE, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); g_object_class_install_property (gobject_class, PROP_SHUTTER_SPEED, g_param_spec_int ("shutter-speed", "Shutter Speed", "Set a fixed shutter speed, in microseconds. (0 = Auto)", 0, 6000000, 0, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); g_object_class_install_property (gobject_class, PROP_SENSOR_MODE, g_param_spec_enum ("sensor-mode", "Camera Sensor Mode", "Manually set the camera sensor mode", gst_rpi_cam_src_sensor_mode_get_type (), GST_RPI_CAM_SRC_SENSOR_MODE_AUTOMATIC, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); g_object_class_install_property (gobject_class, PROP_ANNOTATION_MODE, g_param_spec_flags ("annotation-mode", "Annotation Mode", "Flags to control annotation of the output video", GST_RPI_CAM_TYPE_RPI_CAM_SRC_ANNOTATION_MODE, 0, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); g_object_class_install_property (gobject_class, PROP_ANNOTATION_TEXT, g_param_spec_string ("annotation-text", "Annotation Text", "Text string to annotate onto video when annotation-mode flags include 'custom-text'", NULL, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); g_object_class_install_property (gobject_class, PROP_INTRA_REFRESH_TYPE, g_param_spec_enum ("intra-refresh-type", "Intra Refresh Type", "Type of Intra Refresh to use, -1 to disable intra refresh", GST_RPI_CAM_TYPE_RPI_CAM_SRC_INTRA_REFRESH_TYPE, GST_RPI_CAM_SRC_INTRA_REFRESH_TYPE_NONE, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); gst_element_class_set_static_metadata (gstelement_class, "Raspberry Pi Camera Source", "Source/Video", "Raspberry Pi camera module source", "Jan Schmidt <*****@*****.**>"); gst_element_class_add_pad_template (gstelement_class, gst_static_pad_template_get (&video_src_template)); basesrc_class->start = GST_DEBUG_FUNCPTR (gst_rpi_cam_src_start); basesrc_class->stop = GST_DEBUG_FUNCPTR (gst_rpi_cam_src_stop); basesrc_class->decide_allocation = GST_DEBUG_FUNCPTR (gst_rpi_cam_src_decide_allocation); basesrc_class->get_caps = GST_DEBUG_FUNCPTR (gst_rpi_cam_src_get_caps); basesrc_class->set_caps = GST_DEBUG_FUNCPTR (gst_rpi_cam_src_set_caps); basesrc_class->fixate = GST_DEBUG_FUNCPTR (gst_rpi_cam_src_fixate); basesrc_class->event = GST_DEBUG_FUNCPTR (gst_rpi_cam_src_event); gstelement_class->send_event = GST_DEBUG_FUNCPTR (gst_rpi_cam_src_send_event); pushsrc_class->create = GST_DEBUG_FUNCPTR (gst_rpi_cam_src_create); raspicapture_init (); }
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); g_object_class_install_property (gobject_class, PROP_TLS, g_param_spec_boolean ("tls", P_("TLS"), P_("Whether to create TLS connections"), FALSE, G_PARAM_CONSTRUCT | G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); g_object_class_install_property (gobject_class, PROP_TLS_VALIDATION_FLAGS, g_param_spec_flags ("tls-validation-flags", P_("TLS validation flags"), P_("TLS validation flags to use"), G_TYPE_TLS_CERTIFICATE_FLAGS, G_TLS_CERTIFICATE_VALIDATE_ALL, G_PARAM_CONSTRUCT | G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); } /** * g_socket_client_connect: * @client: a #GSocketClient. * @connectable: a #GSocketConnectable specifying the remote address. * @cancellable: (allow-none): optional #GCancellable object, %NULL to ignore. * @error: #GError for error reporting, or %NULL to ignore. * * Tries to resolve the @connectable and make a network connection to it.. * * Upon a successful connection, a new #GSocketConnection is constructed
static void gimp_color_area_class_init (GimpColorAreaClass *klass) { GObjectClass *object_class = G_OBJECT_CLASS (klass); GtkWidgetClass *widget_class = GTK_WIDGET_CLASS (klass); GimpRGB color; gimp_color_area_signals[COLOR_CHANGED] = g_signal_new ("color-changed", G_TYPE_FROM_CLASS (klass), G_SIGNAL_RUN_FIRST, G_STRUCT_OFFSET (GimpColorAreaClass, color_changed), NULL, NULL, g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0); object_class->get_property = gimp_color_area_get_property; object_class->set_property = gimp_color_area_set_property; object_class->finalize = gimp_color_area_finalize; widget_class->size_allocate = gimp_color_area_size_allocate; widget_class->state_changed = gimp_color_area_state_changed; widget_class->expose_event = gimp_color_area_expose; widget_class->drag_begin = gimp_color_area_drag_begin; widget_class->drag_end = gimp_color_area_drag_end; widget_class->drag_data_received = gimp_color_area_drag_data_received; widget_class->drag_data_get = gimp_color_area_drag_data_get; klass->color_changed = NULL; gimp_rgba_set (&color, 0.0, 0.0, 0.0, 1.0); /** * GimpColorArea:color: * * The color displayed in the color area. * * Since: GIMP 2.4 */ g_object_class_install_property (object_class, PROP_COLOR, gimp_param_spec_rgb ("color", NULL, NULL, TRUE, &color, GIMP_PARAM_READWRITE | G_PARAM_CONSTRUCT)); /** * GimpColorArea:type: * * The type of the color area. * * Since: GIMP 2.4 */ g_object_class_install_property (object_class, PROP_TYPE, g_param_spec_enum ("type", NULL, NULL, GIMP_TYPE_COLOR_AREA_TYPE, GIMP_COLOR_AREA_FLAT, GIMP_PARAM_READWRITE | G_PARAM_CONSTRUCT)); /** * GimpColorArea:drag-type: * * The event_mask that should trigger drags. * * Since: GIMP 2.4 */ g_object_class_install_property (object_class, PROP_DRAG_MASK, g_param_spec_flags ("drag-mask", NULL, NULL, GDK_TYPE_MODIFIER_TYPE, 0, GIMP_PARAM_WRITABLE | G_PARAM_CONSTRUCT_ONLY)); /** * GimpColorArea:draw-border: * * Whether to draw a thin border in the foreground color around the area. * * Since: GIMP 2.4 */ g_object_class_install_property (object_class, PROP_DRAW_BORDER, g_param_spec_boolean ("draw-border", NULL, NULL, FALSE, GIMP_PARAM_READWRITE)); }
static void gimp_undo_class_init (GimpUndoClass *klass) { GObjectClass *object_class = G_OBJECT_CLASS (klass); GimpObjectClass *gimp_object_class = GIMP_OBJECT_CLASS (klass); GimpViewableClass *viewable_class = GIMP_VIEWABLE_CLASS (klass); undo_signals[POP] = g_signal_new ("pop", G_TYPE_FROM_CLASS (klass), G_SIGNAL_RUN_FIRST, G_STRUCT_OFFSET (GimpUndoClass, pop), NULL, NULL, gimp_marshal_VOID__ENUM_POINTER, G_TYPE_NONE, 2, GIMP_TYPE_UNDO_MODE, G_TYPE_POINTER); undo_signals[FREE] = g_signal_new ("free", G_TYPE_FROM_CLASS (klass), G_SIGNAL_RUN_FIRST, G_STRUCT_OFFSET (GimpUndoClass, free), NULL, NULL, gimp_marshal_VOID__ENUM, G_TYPE_NONE, 1, GIMP_TYPE_UNDO_MODE); object_class->constructor = gimp_undo_constructor; object_class->finalize = gimp_undo_finalize; object_class->set_property = gimp_undo_set_property; object_class->get_property = gimp_undo_get_property; gimp_object_class->get_memsize = gimp_undo_get_memsize; viewable_class->default_stock_id = "gtk-undo"; viewable_class->get_popup_size = gimp_undo_get_popup_size; viewable_class->get_new_preview = gimp_undo_get_new_preview; klass->pop = gimp_undo_real_pop; klass->free = gimp_undo_real_free; g_object_class_install_property (object_class, PROP_IMAGE, g_param_spec_object ("image", NULL, NULL, GIMP_TYPE_IMAGE, GIMP_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY)); g_object_class_install_property (object_class, PROP_TIME, g_param_spec_uint ("time", NULL, NULL, 0, G_MAXUINT, 0, GIMP_PARAM_READWRITE)); g_object_class_install_property (object_class, PROP_UNDO_TYPE, g_param_spec_enum ("undo-type", NULL, NULL, GIMP_TYPE_UNDO_TYPE, GIMP_UNDO_GROUP_NONE, GIMP_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY)); g_object_class_install_property (object_class, PROP_DIRTY_MASK, g_param_spec_flags ("dirty-mask", NULL, NULL, GIMP_TYPE_DIRTY_MASK, GIMP_DIRTY_NONE, GIMP_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY)); }
static void budgie_applet_class_init(BudgieAppletClass *klazz) { GObjectClass *obj_class = G_OBJECT_CLASS(klazz); obj_class->get_property = budgie_applet_get_property; obj_class->set_property = budgie_applet_set_property; obj_class->dispose = budgie_applet_dispose; klazz->update_popovers = NULL; /* Todo, make the PREFIX/SCHEMA G_PARAM_CONSTRUCT_ONLY */ /** * BudgieApplet:settings-prefix: * * The GSettings schema path prefix for this applet * * For applets that require unique instance configuration, the * panel management must know where to initialise the settings * within the tree. The path takes the form: * * `$SETTINGS_PREFIX/{$UUID}` * * As an example, the Budgie Menu Applet set's the `settings-prefix` * to: * `/com/solus-project/budgie-panel/instance/budgie-menu`. * * This results in relocatable schemas being created at: * * `/com/solus-project/budgie-panel/instance/budgie-menu/{$UUID}` */ obj_properties[PROP_PREFIX] = g_param_spec_string("settings-prefix", "GSettings schema prefix", "Set the GSettings schema prefix", NULL, G_PARAM_READWRITE); /** * BudgieApplet:settings-schema: * * The ID of the GSettings schema used by this applet * * This only takes effect when you've also set #BudgieApplet:settings-prefix, * and is used by the panel managemen to both initialise and delete your per-instance * settings, respectively. * * As an example, the Budgie Menu Applet uses the schema: * * `com.solus-project.budgie-menu` * * as defined by the accompanying gschema XML file. Providing an incorrect * schema ID is considered programmer error. */ obj_properties[PROP_SCHEMA] = g_param_spec_string("settings-schema", "GSettings relocatable schema ID", "Set the GSettings relocatable schema ID", NULL, G_PARAM_READWRITE); /** * BudgieApplet:supported-actions: * * The actions supported by this applet instance */ obj_properties[PROP_ACTIONS] = g_param_spec_flags("supported-actions", "Supported panel actions", "Get/set the supported panel actions", BUDGIE_TYPE_PANEL_ACTION, BUDGIE_PANEL_ACTION_NONE, G_PARAM_READWRITE); /** * BudgieApplet::panel-size-changed: * @applet: The applet recieving the signal * @panel_size: The new panel size * @icon_size: Larget possible icon size for the panel * @small_icon_size: Smaller icon that will still fit on the panel * * Used to notify this applet of a change in the panel size */ applet_signals[POSITION_CHANGED] = g_signal_new("panel-size-changed", BUDGIE_TYPE_APPLET, G_SIGNAL_RUN_LAST|G_SIGNAL_ACTION, G_STRUCT_OFFSET(BudgieAppletClass, panel_size_changed), NULL, NULL, NULL, G_TYPE_NONE, 3, G_TYPE_INT, G_TYPE_INT, G_TYPE_INT); g_object_class_install_properties(obj_class, N_PROPS, obj_properties); }
/* Photography class initialization stuff */ static void gst_photography_iface_class_init (gpointer g_class) { /* create interface signals and properties here. */ /* White balance */ g_object_interface_install_property (g_class, g_param_spec_enum (GST_PHOTOGRAPHY_PROP_WB_MODE, "White balance mode property", "White balance affects the color temperature of the photo", GST_TYPE_PHOTOGRAPHY_WHITE_BALANCE_MODE, GST_PHOTOGRAPHY_WB_MODE_AUTO, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); /* Color tone */ g_object_interface_install_property (g_class, g_param_spec_enum (GST_PHOTOGRAPHY_PROP_COLOR_TONE, "Color tone mode property", "Color tone setting changes color shading in the photo", GST_TYPE_PHOTOGRAPHY_COLOR_TONE_MODE, GST_PHOTOGRAPHY_COLOR_TONE_MODE_NORMAL, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); /* Scene mode */ g_object_interface_install_property (g_class, g_param_spec_enum (GST_PHOTOGRAPHY_PROP_SCENE_MODE, "Scene mode property", "Scene mode works as a preset for different photo shooting mode settings", GST_TYPE_PHOTOGRAPHY_SCENE_MODE, GST_PHOTOGRAPHY_SCENE_MODE_AUTO, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); /* Flash mode */ g_object_interface_install_property (g_class, g_param_spec_enum (GST_PHOTOGRAPHY_PROP_FLASH_MODE, "Flash mode property", "Flash mode defines how the flash light should be used", GST_TYPE_PHOTOGRAPHY_FLASH_MODE, GST_PHOTOGRAPHY_FLASH_MODE_AUTO, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); /* Flicker reduction mode */ g_object_interface_install_property (g_class, g_param_spec_enum (GST_PHOTOGRAPHY_PROP_FLICKER_MODE, "Flicker reduction mode property", "Flicker reduction mode defines a line frequency for flickering prevention", GST_TYPE_PHOTOGRAPHY_FLICKER_REDUCTION_MODE, GST_PHOTOGRAPHY_FLICKER_REDUCTION_OFF, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); /* Focus mode */ g_object_interface_install_property (g_class, g_param_spec_enum (GST_PHOTOGRAPHY_PROP_FOCUS_MODE, "Focus mode property", "Focus mode defines the range of focal lengths to use in autofocus search", GST_TYPE_PHOTOGRAPHY_FOCUS_MODE, GST_PHOTOGRAPHY_FOCUS_MODE_AUTO, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); /* Capabilities */ g_object_interface_install_property (g_class, g_param_spec_ulong (GST_PHOTOGRAPHY_PROP_CAPABILITIES, "Photo capabilities bitmask", "Tells the photo capabilities of the device", 0, G_MAXULONG, 0, G_PARAM_READABLE | G_PARAM_STATIC_STRINGS)); /* EV_compensation */ g_object_interface_install_property (g_class, g_param_spec_float (GST_PHOTOGRAPHY_PROP_EV_COMP, "EV compensation property", "EV compensation affects the brightness of the image", -2.5, 2.5, 0, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); /* ISO value */ g_object_interface_install_property (g_class, g_param_spec_uint (GST_PHOTOGRAPHY_PROP_ISO_SPEED, "ISO speed property", "ISO speed defines the light sensitivity (0 = auto)", 0, 6400, 0, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); /* Aperture */ g_object_interface_install_property (g_class, g_param_spec_uint (GST_PHOTOGRAPHY_PROP_APERTURE, "Aperture property", "Aperture defines the size of lens opening (0 = auto)", 0, G_MAXUINT8, 0, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); /* Exposure */ g_object_interface_install_property (g_class, g_param_spec_uint (GST_PHOTOGRAPHY_PROP_EXPOSURE_TIME, "Exposure time in milliseconds", "Exposure time defines how long the shutter will stay open (0 = auto)", 0, G_MAXUINT32, 0, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); /** * GstPhotography:image-capture-supported-caps: * * Query caps that describe supported formats for image capture. Sometimes * element may support different formats for image capture than for video * streaming. */ g_object_interface_install_property (g_class, g_param_spec_boxed (GST_PHOTOGRAPHY_PROP_IMAGE_CAPTURE_SUPPORTED_CAPS, "Image capture supported caps", "Caps describing supported image capture formats", GST_TYPE_CAPS, G_PARAM_READABLE | G_PARAM_STATIC_STRINGS)); /** * GstPhotography:image-preview-supported-caps: * * Query caps that describe supported formats for preview image. Sometimes * element may support different formats for preview image than for video * streaming. */ g_object_interface_install_property (g_class, g_param_spec_boxed (GST_PHOTOGRAPHY_PROP_IMAGE_PREVIEW_SUPPORTED_CAPS, "Image preview supported caps", "Caps describing supported image preview formats", GST_TYPE_CAPS, G_PARAM_READABLE | G_PARAM_STATIC_STRINGS)); /* Zoom */ g_object_interface_install_property (g_class, g_param_spec_float (GST_PHOTOGRAPHY_PROP_ZOOM, "Zoom property", "How much the resulted image will be zoomed", 1.0f, 10.0f, 1.0f, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); /** * GstPhotography:color-temperature: * * Color temperature parameter for manual white balance. * Control color temperature in Kelvin units. */ g_object_interface_install_property (g_class, g_param_spec_uint (GST_PHOTOGRAPHY_PROP_COLOR_TEMPERATURE, "Color temperature in Kelvin units", "Color temperature in Kelvin units for manual white balance", 0, G_MAXUINT, 0, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); /** * GstPhotography:white-point: * * White point parameter for manual white balance. * Describes the color "white" as raw values. * * FIXME: check and document correct representation for white point */ g_object_interface_install_property (g_class, g_param_spec_value_array (GST_PHOTOGRAPHY_PROP_WHITE_POINT, "White point", "Describe color white as raw values", g_param_spec_uint ("raw-value", "Raw value", "Raw value", 0, G_MAXUINT, 0, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS), G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); /** * GstPhotography:analog-gain: * * Linear multiplicative value how much amplification is applied to the signal * before A-D conversion. */ g_object_interface_install_property (g_class, g_param_spec_float (GST_PHOTOGRAPHY_PROP_ANALOG_GAIN, "Analog gain applied to the sensor", "Analog gain applied to the sensor", 1.0f, G_MAXFLOAT, 1.0f, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); /** * GstPhotography:lens-focus: * * Manual changing of lens focus in diopter units. * Inteded use with GST_PHOTOGRAPHY_FOCUS_MODE_MANUAL focus mode, otherwise * to be ignored. * */ g_object_interface_install_property (g_class, g_param_spec_float (GST_PHOTOGRAPHY_PROP_LENS_FOCUS, "Manual lens focus", "Focus point in diopter units", 0.0f, G_MAXFLOAT, 0.0f, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); /** * GstPhotography:min-exposure-time: * * Minimum exposure time for automatic exposure mode. */ g_object_interface_install_property (g_class, g_param_spec_uint (GST_PHOTOGRAPHY_PROP_MIN_EXPOSURE_TIME, "Minimum exposure time", "Minimum exposure time for automatic exposure mode", 0, G_MAXUINT, 0, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); /** * GstPhotography:max-exposure-time: * * Maximum exposure time for automatic exposure mode. */ g_object_interface_install_property (g_class, g_param_spec_uint (GST_PHOTOGRAPHY_PROP_MAX_EXPOSURE_TIME, "Maximum exposure time", "Maximum exposure time for automatic exposure mode", 0, G_MAXUINT, 0, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); /* Noise Reduction, Bayer an YCC noise reduction are enabled by default */ g_object_interface_install_property (g_class, g_param_spec_flags (GST_PHOTOGRAPHY_PROP_NOISE_REDUCTION, "Noise Reduction settings", "Which noise reduction modes are enabled (0 = disabled)", GST_TYPE_PHOTOGRAPHY_NOISE_REDUCTION, 0, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); }
PROP_BUS_TYPE, g_param_spec_enum ("bus-type", "Bus Type", "The bus to connect to, defaults to the session one", G_TYPE_BUS_TYPE, G_BUS_TYPE_SESSION, G_PARAM_WRITABLE | G_PARAM_CONSTRUCT_ONLY | G_PARAM_STATIC_STRINGS)); g_object_class_install_property (gobject_class, PROP_FLAGS, g_param_spec_flags ("flags", "Flags", "Proxy flags", G_TYPE_DBUS_PROXY_FLAGS, G_DBUS_PROXY_FLAGS_NONE, G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY | G_PARAM_STATIC_STRINGS)); g_object_class_install_property (gobject_class, PROP_OBJECT_PATH, g_param_spec_string ("object-path", "Object Path", "The object path the proxy is for", NULL, G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY | G_PARAM_STATIC_STRINGS));
static void gst_stream_class_init (GstStreamClass * klass) { GObjectClass *gobject_class; gobject_class = (GObjectClass *) klass; g_type_class_add_private (klass, sizeof (GstStreamPrivate)); gobject_class->set_property = gst_stream_set_property; gobject_class->get_property = gst_stream_get_property; /** * GstStream:stream-id: * * The unique identifier of the #GstStream. Can only be set at construction * time. */ g_object_class_install_property (gobject_class, PROP_STREAM_ID, g_param_spec_string ("stream-id", "Stream ID", "The stream ID of the stream", NULL, G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY | G_PARAM_STATIC_STRINGS)); /** * GstStream:flags: * * The #GstStreamFlags of the #GstStream. Can only be set at construction time. **/ gst_stream_pspecs[PROP_STREAM_FLAGS] = g_param_spec_flags ("stream-flags", "Stream Flags", "The stream flags", GST_TYPE_STREAM_FLAGS, GST_STREAM_FLAG_NONE, G_PARAM_READWRITE | G_PARAM_CONSTRUCT | G_PARAM_STATIC_STRINGS); g_object_class_install_property (gobject_class, PROP_STREAM_FLAGS, gst_stream_pspecs[PROP_STREAM_FLAGS]); /** * GstStream:stream-type: * * The #GstStreamType of the #GstStream. Can only be set at construction time. **/ #ifndef GSTREAMER_LITE gst_stream_pspecs[PROP_STREAM_TYPE] = g_param_spec_flags ("stream-type", "Stream Type", "The type of stream", GST_TYPE_STREAM_TYPE, GST_STREAM_TYPE_UNKNOWN, G_PARAM_READWRITE | G_PARAM_CONSTRUCT | G_PARAM_STATIC_STRINGS); g_object_class_install_property (gobject_class, PROP_STREAM_TYPE, gst_stream_pspecs[PROP_STREAM_TYPE]); #endif // GSTREAMER_LITE /** * GstStream:caps: * * The #GstCaps of the #GstStream. **/ gst_stream_pspecs[PROP_CAPS] = g_param_spec_boxed ("caps", "Caps", "The caps of the stream", GST_TYPE_CAPS, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS); g_object_class_install_property (gobject_class, PROP_CAPS, gst_stream_pspecs[PROP_CAPS]); /** * GstStream:tags: * * The #GstTagList of the #GstStream. **/ gst_stream_pspecs[PROP_TAGS] = g_param_spec_boxed ("tags", "Tags", "The tags of the stream", GST_TYPE_TAG_LIST, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS); g_object_class_install_property (gobject_class, PROP_TAGS, gst_stream_pspecs[PROP_TAGS]); gobject_class->finalize = gst_stream_finalize; }
static void gst_gl_view_convert_element_class_init (GstGLViewConvertElementClass * klass) { GObjectClass *gobject_class; GstElementClass *element_class; gobject_class = (GObjectClass *) klass; element_class = GST_ELEMENT_CLASS (klass); gst_gl_filter_add_rgba_pad_templates (GST_GL_FILTER_CLASS (klass)); gobject_class->set_property = gst_gl_view_convert_element_set_property; gobject_class->get_property = gst_gl_view_convert_element_get_property; gobject_class->dispose = gst_gl_view_convert_dispose; gst_element_class_set_metadata (element_class, "OpenGL Multiview/3D conversion filter", "Filter", "Convert stereoscopic/multiview video formats", "Jan Schmidt <*****@*****.**>\n" "Matthew Waters <*****@*****.**>"); GST_GL_FILTER_CLASS (klass)->set_caps = gst_gl_view_convert_element_set_caps; GST_GL_FILTER_CLASS (klass)->transform_internal_caps = gst_gl_view_convert_element_transform_internal_caps; GST_BASE_TRANSFORM_CLASS (klass)->stop = gst_gl_view_convert_element_stop; GST_BASE_TRANSFORM_CLASS (klass)->fixate_caps = gst_gl_view_convert_element_fixate_caps; GST_BASE_TRANSFORM_CLASS (klass)->submit_input_buffer = gst_gl_view_convert_element_submit_input_buffer; GST_BASE_TRANSFORM_CLASS (klass)->generate_output = gst_gl_view_convert_element_generate_output_buffer; g_object_class_install_property (gobject_class, PROP_INPUT_LAYOUT, g_param_spec_enum ("input-mode-override", "Input Multiview Mode Override", "Override any input information about multiview layout", GST_TYPE_VIDEO_MULTIVIEW_FRAME_PACKING, GST_VIDEO_MULTIVIEW_MODE_NONE, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); g_object_class_install_property (gobject_class, PROP_INPUT_FLAGS, g_param_spec_flags ("input-flags-override", "Input Multiview Flags Override", "Override any input information about multiview layout flags", GST_TYPE_VIDEO_MULTIVIEW_FLAGS, GST_VIDEO_MULTIVIEW_FLAGS_NONE, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); g_object_class_install_property (gobject_class, PROP_OUTPUT_LAYOUT, g_param_spec_enum ("output-mode-override", "Output Multiview Mode Override", "Override automatic output mode selection for multiview layout", GST_TYPE_VIDEO_MULTIVIEW_MODE, GST_VIDEO_MULTIVIEW_MODE_NONE, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); g_object_class_install_property (gobject_class, PROP_OUTPUT_FLAGS, g_param_spec_flags ("output-flags-override", "Output Multiview Flags Override", "Override automatic negotiation for output multiview layout flags", GST_TYPE_VIDEO_MULTIVIEW_FLAGS, GST_VIDEO_MULTIVIEW_FLAGS_NONE, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); g_object_class_install_property (gobject_class, PROP_OUTPUT_DOWNMIX_MODE, g_param_spec_enum ("downmix-mode", "Mode for mono downmixed output", "Output anaglyph type to generate when downmixing to mono", GST_TYPE_GL_STEREO_DOWNMIX, DEFAULT_DOWNMIX, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); }
static void goo_canvas_item_model_base_init (gpointer g_iface) { static GObjectNotifyContext cpn_context = { 0, NULL, NULL }; static gboolean initialized = FALSE; if (!initialized) { GType iface_type = G_TYPE_FROM_INTERFACE (g_iface); _goo_canvas_item_model_child_property_pool = g_param_spec_pool_new (TRUE); cpn_context.quark_notify_queue = g_quark_from_static_string ("GooCanvasItemModel-child-property-notify-queue"); cpn_context.dispatcher = child_property_notify_dispatcher; _goo_canvas_item_model_child_property_notify_context = &cpn_context; /** * GooCanvasItemModel::child-added: * @model: the item model that received the signal. * @child_num: the index of the new child. * * Emitted when a child has been added. */ item_model_signals[CHILD_ADDED] = g_signal_new ("child-added", iface_type, G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (GooCanvasItemModelIface, child_added), NULL, NULL, goo_canvas_marshal_VOID__INT, G_TYPE_NONE, 1, G_TYPE_INT); /** * GooCanvasItemModel::child-moved: * @model: the item model that received the signal. * @old_child_num: the old index of the child. * @new_child_num: the new index of the child. * * Emitted when a child has been moved in the stacking order. */ item_model_signals[CHILD_MOVED] = g_signal_new ("child-moved", iface_type, G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (GooCanvasItemModelIface, child_moved), NULL, NULL, goo_canvas_marshal_VOID__INT_INT, G_TYPE_NONE, 2, G_TYPE_INT, G_TYPE_INT); /** * GooCanvasItemModel::child-removed: * @model: the item model that received the signal. * @child_num: the index of the child that was removed. * * Emitted when a child has been removed. */ item_model_signals[CHILD_REMOVED] = g_signal_new ("child-removed", iface_type, G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (GooCanvasItemModelIface, child_removed), NULL, NULL, goo_canvas_marshal_VOID__INT, G_TYPE_NONE, 1, G_TYPE_INT); /** * GooCanvasItemModel::changed: * @model: the item model that received the signal. * @recompute_bounds: if the bounds of the item need to be recomputed. * * Emitted when the item model has been changed. */ item_model_signals[CHANGED] = g_signal_new ("changed", iface_type, G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (GooCanvasItemModelIface, changed), NULL, NULL, goo_canvas_marshal_VOID__BOOLEAN, G_TYPE_NONE, 1, G_TYPE_BOOLEAN); /** * GooCanvasItemModel::child-notify: * @item: the item model that received the signal. * @pspec: (type GObject.ParamSpec): the #GParamSpec of the changed child property. * * Emitted for each child property that has changed. * The signal's detail holds the property name. */ item_model_signals[CHILD_NOTIFY] = g_signal_new ("child_notify", iface_type, G_SIGNAL_RUN_FIRST | G_SIGNAL_NO_RECURSE | G_SIGNAL_DETAILED | G_SIGNAL_NO_HOOKS, G_STRUCT_OFFSET (GooCanvasItemModelIface, child_notify), NULL, NULL, g_cclosure_marshal_VOID__PARAM, G_TYPE_NONE, 1, G_TYPE_PARAM); /** * GooCanvasItemModel::animation-finished: * @item: the item model that received the signal. * @stopped: if the animation was explicitly stopped. * * Emitted when the item model animation has finished. */ item_model_signals[ANIMATION_FINISHED] = g_signal_new ("animation-finished", iface_type, G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (GooCanvasItemModelIface, animation_finished), NULL, NULL, g_cclosure_marshal_VOID__BOOLEAN, G_TYPE_NONE, 1, G_TYPE_BOOLEAN); g_object_interface_install_property (g_iface, g_param_spec_object ("parent", _("Parent"), _("The parent item model"), GOO_TYPE_CANVAS_ITEM_MODEL, G_PARAM_READWRITE)); g_object_interface_install_property (g_iface, g_param_spec_enum ("visibility", _("Visibility"), _("When the canvas item is visible"), GOO_TYPE_CANVAS_ITEM_VISIBILITY, GOO_CANVAS_ITEM_VISIBLE, G_PARAM_READWRITE)); g_object_interface_install_property (g_iface, g_param_spec_double ("visibility-threshold", _("Visibility Threshold"), _("The scale threshold at which the item becomes visible"), 0.0, G_MAXDOUBLE, 0.0, G_PARAM_READWRITE)); g_object_interface_install_property (g_iface, g_param_spec_boxed ("transform", _("Transform"), _("The transformation matrix of the item"), GOO_TYPE_CAIRO_MATRIX, G_PARAM_READWRITE)); g_object_interface_install_property (g_iface, g_param_spec_flags ("pointer-events", _("Pointer Events"), _("Specifies when the item receives pointer events"), GOO_TYPE_CANVAS_POINTER_EVENTS, GOO_CANVAS_EVENTS_VISIBLE_PAINTED, G_PARAM_READWRITE)); g_object_interface_install_property (g_iface, g_param_spec_string ("title", _("Title"), _("A short context-rich description of the item for use by assistive technologies"), NULL, G_PARAM_READWRITE)); g_object_interface_install_property (g_iface, g_param_spec_string ("description", _("Description"), _("A description of the item for use by assistive technologies"), NULL, G_PARAM_READWRITE)); g_object_interface_install_property (g_iface, g_param_spec_boolean ("can-focus", _("Can Focus"), _("If the item can take the keyboard focus"), FALSE, G_PARAM_READWRITE)); g_object_interface_install_property (g_iface, g_param_spec_string ("tooltip", _("Tooltip"), _("The tooltip to display for the item"), NULL, G_PARAM_READWRITE)); _goo_canvas_style_init (); initialized = TRUE; } }
static void i3ipc_connection_class_init (i3ipcConnectionClass *klass) { GObjectClass *gobject_class = G_OBJECT_CLASS(klass); gobject_class->set_property = i3ipc_connection_set_property; gobject_class->get_property = i3ipc_connection_get_property; gobject_class->dispose = i3ipc_connection_dispose; gobject_class->finalize = i3ipc_connection_finalize; gobject_class->constructed = i3ipc_connected_constructed; obj_properties[PROP_SUBSCRIPTIONS] = g_param_spec_flags("subscriptions", "Connection subscriptions", "The subscriptions this connection is subscribed to", I3IPC_TYPE_EVENT, 0, G_PARAM_READABLE); obj_properties[PROP_SOCKET_PATH] = g_param_spec_string("socket-path", "Connection socket path", "The path of the unix socket the connection is connected to", NULL, /* default */ G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY); obj_properties[PROP_CONNECTED] = g_param_spec_boolean("connected", "Connection connected", "Whether or not a connection has been established to the ipc", FALSE, G_PARAM_READABLE); g_object_class_install_properties(gobject_class, N_PROPERTIES, obj_properties); /** * i3ipcConnection::workspace: * @self: the #i3ipcConnection on which the signal was emitted * @e: The workspace event object * * Sent when the user switches to a different workspace, when a new workspace * is initialized or when a workspace is removed (because the last client * vanished). */ connection_signals[WORKSPACE] = g_signal_new( "workspace", /* signal_name */ I3IPC_TYPE_CONNECTION, /* itype */ G_SIGNAL_RUN_LAST | G_SIGNAL_DETAILED,/* signal_flags */ 0, /* class_offset */ NULL, /* accumulator */ NULL, /* accu_data */ g_cclosure_marshal_VOID__BOXED, /* c_marshaller */ G_TYPE_NONE, /* return_type */ 1, I3IPC_TYPE_WORKSPACE_EVENT); /* n_params */ /** * i3ipcConnection::output: * @self: the #i3ipcConnection on which the signal was emitted * @e: The output event object * * Sent when RandR issues a change notification (of either screens, outputs, * CRTCs or output properties). */ connection_signals[OUTPUT] = g_signal_new( "output", /* signal_name */ I3IPC_TYPE_CONNECTION, /* itype */ G_SIGNAL_RUN_FIRST | G_SIGNAL_DETAILED,/* signal_flags */ 0, /* class_offset */ NULL, /* accumulator */ NULL, /* accu_data */ g_cclosure_marshal_VOID__BOXED, /* c_marshaller */ G_TYPE_NONE, /* return_type */ 1, I3IPC_TYPE_GENERIC_EVENT); /* n_params */ /** * i3ipcConnection::mode: * @self: the #i3ipcConnection on which the signal was emitted * @e: The mode event object * * Sent whenever i3 changes its binding mode. */ connection_signals[MODE] = g_signal_new( "mode", /* signal_name */ I3IPC_TYPE_CONNECTION, /* itype */ G_SIGNAL_RUN_FIRST | G_SIGNAL_DETAILED,/* signal_flags */ 0, /* class_offset */ NULL, /* accumulator */ NULL, /* accu_data */ g_cclosure_marshal_VOID__BOXED, /* c_marshaller */ G_TYPE_NONE, /* return_type */ 1, I3IPC_TYPE_GENERIC_EVENT); /* n_params */ /** * i3ipcConnection::window: * @self: the #i3ipcConnection on which the signal was emitted * @e: The window event object * * Sent when a client’s window is successfully reparented (that is when i3 * has finished fitting it into a container). */ connection_signals[WINDOW] = g_signal_new( "window", /* signal_name */ I3IPC_TYPE_CONNECTION, /* itype */ G_SIGNAL_RUN_FIRST | G_SIGNAL_DETAILED,/* signal_flags */ 0, /* class_offset */ NULL, /* accumulator */ NULL, /* accu_data */ g_cclosure_marshal_VOID__BOXED, /* c_marshaller */ G_TYPE_NONE, /* return_type */ 1, I3IPC_TYPE_WINDOW_EVENT); /* n_params */ /** * i3ipcConnection::barconfig_update: * @self: the #i3ipcConnection on which the signal was emitted * @e: The barconfig_update event object * * Sent when the hidden_state or mode field in the barconfig of any bar * instance was updated. */ connection_signals[BARCONFIG_UPDATE] = g_signal_new( "barconfig_update", /* signal_name */ I3IPC_TYPE_CONNECTION, /* itype */ G_SIGNAL_RUN_FIRST, /* signal_flags */ 0, /* class_offset */ NULL, /* accumulator */ NULL, /* accu_data */ g_cclosure_marshal_VOID__BOXED, /* c_marshaller */ G_TYPE_NONE, /* return_type */ 1, I3IPC_TYPE_BARCONFIG_UPDATE_EVENT); /* n_params */ /** * i3ipcConnection::binding: * @self: the #i3ipcConnection on which the signal was emitted * @e: the binding event object * * Sent when a binding was triggered with the keyboard or mouse because of * some user input. */ connection_signals[BINDING] = g_signal_new( "binding", /* signal_name */ I3IPC_TYPE_CONNECTION, /* itype */ G_SIGNAL_RUN_FIRST | G_SIGNAL_DETAILED,/* signal_flags */ 0, /* class_offset */ NULL, /* accumulator */ NULL, /* accu_data */ g_cclosure_marshal_VOID__BOXED, /* c_marshaller */ G_TYPE_NONE, /* return_type */ 1, /* n_params */ I3IPC_TYPE_BINDING_EVENT); /** * i3ipcConnection::ipc_shutdown: * @self: the #i3ipcConnection on which the signal was emitted * * Sent when the Connection receives notice that the ipc has shut down. */ connection_signals[IPC_SHUTDOWN] = g_signal_new( "ipc_shutdown", /* signal_name */ I3IPC_TYPE_CONNECTION, /* itype */ G_SIGNAL_RUN_FIRST, /* signal_flags */ 0, /* class_offset */ NULL, /* accumulator */ NULL, /* accu_data */ g_cclosure_marshal_VOID__VOID, /* c_marshaller */ G_TYPE_NONE, /* return_type */ 0); /* n_params */ g_type_class_add_private(klass, sizeof(i3ipcConnectionPrivate)); }
static void g_dtls_connection_default_init (GDtlsConnectionInterface *iface) { /** * GDtlsConnection:base-socket: * * The #GDatagramBased that the connection wraps. Note that this may be any * implementation of #GDatagramBased, not just a #GSocket. * * Since: 2.48 */ g_object_interface_install_property (iface, g_param_spec_object ("base-socket", P_("Base Socket"), P_("The GDatagramBased that the connection wraps"), G_TYPE_DATAGRAM_BASED, G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY | G_PARAM_STATIC_STRINGS)); /** * GDtlsConnection:database: * * The certificate database to use when verifying this TLS connection. * If no certificate database is set, then the default database will be * used. See g_dtls_backend_get_default_database(). * * Since: 2.48 */ g_object_interface_install_property (iface, g_param_spec_object ("database", P_("Database"), P_("Certificate database to use for looking up or verifying certificates"), G_TYPE_TLS_DATABASE, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); /** * GDtlsConnection:interaction: * * A #GTlsInteraction object to be used when the connection or certificate * database need to interact with the user. This will be used to prompt the * user for passwords where necessary. * * Since: 2.48 */ g_object_interface_install_property (iface, g_param_spec_object ("interaction", P_("Interaction"), P_("Optional object for user interaction"), G_TYPE_TLS_INTERACTION, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); /** * GDtlsConnection:require-close-notify: * * Whether or not proper TLS close notification is required. * See g_dtls_connection_set_require_close_notify(). * * Since: 2.48 */ g_object_interface_install_property (iface, g_param_spec_boolean ("require-close-notify", P_("Require close notify"), P_("Whether to require proper TLS close notification"), TRUE, G_PARAM_READWRITE | G_PARAM_CONSTRUCT | G_PARAM_STATIC_STRINGS)); /** * GDtlsConnection:rehandshake-mode: * * The rehandshaking mode. See * g_dtls_connection_set_rehandshake_mode(). * * Since: 2.48 */ g_object_interface_install_property (iface, g_param_spec_enum ("rehandshake-mode", P_("Rehandshake mode"), P_("When to allow rehandshaking"), G_TYPE_TLS_REHANDSHAKE_MODE, G_TLS_REHANDSHAKE_NEVER, G_PARAM_READWRITE | G_PARAM_CONSTRUCT | G_PARAM_STATIC_STRINGS)); /** * GDtlsConnection:certificate: * * The connection's certificate; see * g_dtls_connection_set_certificate(). * * Since: 2.48 */ g_object_interface_install_property (iface, g_param_spec_object ("certificate", P_("Certificate"), P_("The connection's certificate"), G_TYPE_TLS_CERTIFICATE, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); /** * GDtlsConnection:peer-certificate: * * The connection's peer's certificate, after the TLS handshake has * completed and the certificate has been accepted. Note in * particular that this is not yet set during the emission of * #GDtlsConnection::accept-certificate. * * (You can watch for a #GObject::notify signal on this property to * detect when a handshake has occurred.) * * Since: 2.48 */ g_object_interface_install_property (iface, g_param_spec_object ("peer-certificate", P_("Peer Certificate"), P_("The connection's peer's certificate"), G_TYPE_TLS_CERTIFICATE, G_PARAM_READABLE | G_PARAM_STATIC_STRINGS)); /** * GDtlsConnection:peer-certificate-errors: * * The errors noticed-and-ignored while verifying * #GDtlsConnection:peer-certificate. Normally this should be 0, but * it may not be if #GDtlsClientConnection:validation-flags is not * %G_TLS_CERTIFICATE_VALIDATE_ALL, or if * #GDtlsConnection::accept-certificate overrode the default * behavior. * * Since: 2.48 */ g_object_interface_install_property (iface, g_param_spec_flags ("peer-certificate-errors", P_("Peer Certificate Errors"), P_("Errors found with the peer's certificate"), G_TYPE_TLS_CERTIFICATE_FLAGS, 0, G_PARAM_READABLE | G_PARAM_STATIC_STRINGS)); /** * GDtlsConnection::accept-certificate: * @conn: a #GDtlsConnection * @peer_cert: the peer's #GTlsCertificate * @errors: the problems with @peer_cert. * * Emitted during the TLS handshake after the peer certificate has * been received. You can examine @peer_cert's certification path by * calling g_tls_certificate_get_issuer() on it. * * For a client-side connection, @peer_cert is the server's * certificate, and the signal will only be emitted if the * certificate was not acceptable according to @conn's * #GDtlsClientConnection:validation_flags. If you would like the * certificate to be accepted despite @errors, return %TRUE from the * signal handler. Otherwise, if no handler accepts the certificate, * the handshake will fail with %G_TLS_ERROR_BAD_CERTIFICATE. * * For a server-side connection, @peer_cert is the certificate * presented by the client, if this was requested via the server's * #GDtlsServerConnection:authentication_mode. On the server side, * the signal is always emitted when the client presents a * certificate, and the certificate will only be accepted if a * handler returns %TRUE. * * Note that if this signal is emitted as part of asynchronous I/O * in the main thread, then you should not attempt to interact with * the user before returning from the signal handler. If you want to * let the user decide whether or not to accept the certificate, you * would have to return %FALSE from the signal handler on the first * attempt, and then after the connection attempt returns a * %G_TLS_ERROR_HANDSHAKE, you can interact with the user, and if * the user decides to accept the certificate, remember that fact, * create a new connection, and return %TRUE from the signal handler * the next time. * * If you are doing I/O in another thread, you do not * need to worry about this, and can simply block in the signal * handler until the UI thread returns an answer. * * Returns: %TRUE to accept @peer_cert (which will also * immediately end the signal emission). %FALSE to allow the signal * emission to continue, which will cause the handshake to fail if * no one else overrides it. * * Since: 2.48 */ signals[ACCEPT_CERTIFICATE] = g_signal_new (I_("accept-certificate"), G_TYPE_DTLS_CONNECTION, G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (GDtlsConnectionInterface, accept_certificate), g_signal_accumulator_true_handled, NULL, NULL, G_TYPE_BOOLEAN, 2, G_TYPE_TLS_CERTIFICATE, G_TYPE_TLS_CERTIFICATE_FLAGS); }
static void nm_setting_gsm_class_init (NMSettingGsmClass *setting_class) { GObjectClass *object_class = G_OBJECT_CLASS (setting_class); NMSettingClass *parent_class = NM_SETTING_CLASS (setting_class); g_type_class_add_private (setting_class, sizeof (NMSettingGsmPrivate)); /* virtual methods */ object_class->set_property = set_property; object_class->get_property = get_property; object_class->finalize = finalize; parent_class->verify = verify; parent_class->verify_secrets = verify_secrets; parent_class->need_secrets = need_secrets; /* Properties */ /** * NMSettingGsm:number: * * Number to dial when establishing a PPP data session with the GSM-based * mobile broadband network. Many modems do not require PPP for connections * to the mobile network and thus this property should be left blank, which * allows NetworkManager to select the appropriate settings automatically. **/ g_object_class_install_property (object_class, PROP_NUMBER, g_param_spec_string (NM_SETTING_GSM_NUMBER, "", "", NULL, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); /** * NMSettingGsm:username: * * The username used to authenticate with the network, if required. Many * providers do not require a username, or accept any username. But if a * username is required, it is specified here. **/ g_object_class_install_property (object_class, PROP_USERNAME, g_param_spec_string (NM_SETTING_GSM_USERNAME, "", "", NULL, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); /** * NMSettingGsm:password: * * The password used to authenticate with the network, if required. Many * providers do not require a password, or accept any password. But if a * password is required, it is specified here. **/ g_object_class_install_property (object_class, PROP_PASSWORD, g_param_spec_string (NM_SETTING_GSM_PASSWORD, "", "", NULL, G_PARAM_READWRITE | NM_SETTING_PARAM_SECRET | G_PARAM_STATIC_STRINGS)); /** * NMSettingGsm:password-flags: * * Flags indicating how to handle the #NMSettingGsm:password property. **/ g_object_class_install_property (object_class, PROP_PASSWORD_FLAGS, g_param_spec_flags (NM_SETTING_GSM_PASSWORD_FLAGS, "", "", NM_TYPE_SETTING_SECRET_FLAGS, NM_SETTING_SECRET_FLAG_NONE, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); /** * NMSettingGsm:apn: * * The GPRS Access Point Name specifying the APN used when establishing a * data session with the GSM-based network. The APN often determines how * the user will be billed for their network usage and whether the user has * access to the Internet or just a provider-specific walled-garden, so it * is important to use the correct APN for the user's mobile broadband plan. * The APN may only be composed of the characters a-z, 0-9, ., and - per GSM * 03.60 Section 14.9. **/ g_object_class_install_property (object_class, PROP_APN, g_param_spec_string (NM_SETTING_GSM_APN, "", "", NULL, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); /** * NMSettingGsm:network-id: * * The Network ID (GSM LAI format, ie MCC-MNC) to force specific network * registration. If the Network ID is specified, NetworkManager will * attempt to force the device to register only on the specified network. * This can be used to ensure that the device does not roam when direct * roaming control of the device is not otherwise possible. **/ g_object_class_install_property (object_class, PROP_NETWORK_ID, g_param_spec_string (NM_SETTING_GSM_NETWORK_ID, "", "", NULL, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); /** * NMSettingGsm:pin: * * If the SIM is locked with a PIN it must be unlocked before any other * operations are requested. Specify the PIN here to allow operation of the * device. **/ g_object_class_install_property (object_class, PROP_PIN, g_param_spec_string (NM_SETTING_GSM_PIN, "", "", NULL, G_PARAM_READWRITE | NM_SETTING_PARAM_SECRET | G_PARAM_STATIC_STRINGS)); /** * NMSettingGsm:pin-flags: * * Flags indicating how to handle the #NMSettingGsm:pin property. **/ g_object_class_install_property (object_class, PROP_PIN_FLAGS, g_param_spec_flags (NM_SETTING_GSM_PIN_FLAGS, "", "", NM_TYPE_SETTING_SECRET_FLAGS, NM_SETTING_SECRET_FLAG_NONE, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); /** * NMSettingGsm:home-only: * * When %TRUE, only connections to the home network will be allowed. * Connections to roaming networks will not be made. **/ g_object_class_install_property (object_class, PROP_HOME_ONLY, g_param_spec_boolean (NM_SETTING_GSM_HOME_ONLY, "", "", FALSE, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); /** * NMSettingGsm:device-id: * * The device unique identifier (as given by the WWAN management service) * which this connection applies to. If given, the connection will only * apply to the specified device. * * Since: 1.2 **/ g_object_class_install_property (object_class, PROP_DEVICE_ID, g_param_spec_string (NM_SETTING_GSM_DEVICE_ID, "", "", NULL, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); /** * NMSettingGsm:sim-id: * * The SIM card unique identifier (as given by the WWAN management service) * which this connection applies to. If given, the connection will apply * to any device also allowed by #NMSettingGsm:device-id which contains a * SIM card matching the given identifier. * * Since: 1.2 **/ g_object_class_install_property (object_class, PROP_SIM_ID, g_param_spec_string (NM_SETTING_GSM_SIM_ID, "", "", NULL, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); /** * NMSettingGsm:sim-operator-id: * * A MCC/MNC string like "310260" or "21601" identifying the specific * mobile network operator which this connection applies to. If given, * the connection will apply to any device also allowed by * #NMSettingGsm:device-id and #NMSettingGsm:sim-id which contains a SIM * card provisioined by the given operator. * * Since: 1.2 **/ g_object_class_install_property (object_class, PROP_SIM_OPERATOR_ID, g_param_spec_string (NM_SETTING_GSM_SIM_OPERATOR_ID, "", "", NULL, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); /* Ignore incoming deprecated properties */ _nm_setting_class_add_dbus_only_property (parent_class, "allowed-bands", G_VARIANT_TYPE_UINT32, NULL, NULL); _nm_setting_class_add_dbus_only_property (parent_class, "network-type", G_VARIANT_TYPE_INT32, NULL, NULL); }
static void egg_cell_renderer_keys_class_init (EggCellRendererKeysClass *cell_keys_class) { GObjectClass *object_class; GtkCellRendererClass *cell_renderer_class; object_class = G_OBJECT_CLASS (cell_keys_class); cell_renderer_class = GTK_CELL_RENDERER_CLASS (cell_keys_class); parent_class = g_type_class_peek_parent (object_class); GTK_CELL_RENDERER_CLASS (cell_keys_class)->start_editing = egg_cell_renderer_keys_start_editing; object_class->set_property = egg_cell_renderer_keys_set_property; object_class->get_property = egg_cell_renderer_keys_get_property; cell_renderer_class->get_size = egg_cell_renderer_keys_get_size; object_class->finalize = egg_cell_renderer_keys_finalize; /* FIXME if this gets moved to a real library, rename the properties * to match whatever the GTK convention is */ g_object_class_install_property (object_class, PROP_ACCEL_KEY, g_param_spec_uint ("accel_key", _("Accelerator key"), _("Accelerator key"), 0, G_MAXINT, 0, G_PARAM_READABLE | G_PARAM_WRITABLE)); g_object_class_install_property (object_class, PROP_ACCEL_MASK, g_param_spec_flags ("accel_mask", _("Accelerator modifiers"), _("Accelerator modifiers"), GDK_TYPE_MODIFIER_TYPE, 0, G_PARAM_READABLE | G_PARAM_WRITABLE)); g_object_class_install_property (object_class, PROP_KEYCODE, g_param_spec_uint ("keycode", _("Accelerator keycode"), _("Accelerator keycode"), 0, G_MAXINT, 0, G_PARAM_READABLE | G_PARAM_WRITABLE)); /* FIXME: Register the enum when moving to GTK+ */ g_object_class_install_property (object_class, PROP_ACCEL_MODE, g_param_spec_int ("accel_mode", _("Accel Mode"), _("The type of accelerator."), 0, 2, 0, G_PARAM_READABLE | G_PARAM_WRITABLE)); g_signal_new ("accel_edited", EGG_TYPE_CELL_RENDERER_KEYS, G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (EggCellRendererKeysClass, accel_edited), NULL, NULL, marshal_VOID__STRING_UINT_FLAGS_UINT, G_TYPE_NONE, 4, G_TYPE_STRING, G_TYPE_UINT, GDK_TYPE_MODIFIER_TYPE, G_TYPE_UINT); g_signal_new ("accel_cleared", EGG_TYPE_CELL_RENDERER_KEYS, G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (EggCellRendererKeysClass, accel_cleared), NULL, NULL, g_cclosure_marshal_VOID__STRING, G_TYPE_NONE, 1, G_TYPE_STRING); }
int main (int argc, char **argv) { gtk_test_init (&argc, &argv); G_GNUC_BEGIN_IGNORE_DEPRECATIONS; /* Add a bunch of properties so we can test that we parse them properly */ gtk_style_properties_register_property (NULL, g_param_spec_boolean ("boolean-property", "boolean property", "test boolean properties", TRUE, G_PARAM_READABLE)); gtk_style_properties_register_property (NULL, g_param_spec_int ("int-property", "int property", "test int properties", G_MININT, G_MAXINT, 0, G_PARAM_READABLE)); gtk_style_properties_register_property (NULL, g_param_spec_uint ("uint-property", "uint property", "test uint properties", 0, G_MAXUINT, 0, G_PARAM_READABLE)); gtk_style_properties_register_property (NULL, g_param_spec_string ("string-property", "string property", "test string properties", NULL, G_PARAM_READABLE)); gtk_style_properties_register_property (NULL, g_param_spec_boxed ("rgba-property", "rgba property", "test rgba properties", GDK_TYPE_RGBA, G_PARAM_READABLE)); gtk_style_properties_register_property (NULL, g_param_spec_boxed ("color-property", "color property", "test color properties", GDK_TYPE_COLOR, G_PARAM_READABLE)); gtk_style_properties_register_property (NULL, g_param_spec_boxed ("border-property", "border property", "test border properties", GTK_TYPE_BORDER, G_PARAM_READABLE)); gtk_style_properties_register_property (NULL, g_param_spec_boxed ("font-property", "font property", "test font properties", PANGO_TYPE_FONT_DESCRIPTION, G_PARAM_READABLE)); #if 0 /* not public API, use transition instead */ gtk_style_properties_register_property (NULL, g_param_spec_boxed ("animation-property", "animation property", "test animation properties", GTK_TYPE_ANIMATION_DESCRIPTION, G_PARAM_READABLE)); #endif gtk_style_properties_register_property (NULL, g_param_spec_object ("engine-property", "engine property", "test theming engine properties", GTK_TYPE_THEMING_ENGINE, G_PARAM_READABLE)); gtk_style_properties_register_property (NULL, g_param_spec_enum ("enum-property", "enum property", "test enum properties", GTK_TYPE_SHADOW_TYPE, 0, G_PARAM_READABLE)); gtk_style_properties_register_property (NULL, g_param_spec_flags ("flags-property", "flags property", "test flags properties", GTK_TYPE_STATE_FLAGS, GTK_STATE_FLAG_NORMAL, G_PARAM_READABLE)); gtk_style_properties_register_property (parse_uint8, g_param_spec_uchar ("uint8-property", "uint8 property", "test uint8 properties", 0, G_MAXUINT8, 0, G_PARAM_READABLE)); G_GNUC_END_IGNORE_DEPRECATIONS; if (argc < 2) { const char *basedir; GFile *dir; basedir = g_test_get_dir (G_TEST_DIST); dir = g_file_new_for_path (basedir); add_tests_for_files_in_directory (dir); g_object_unref (dir); } else { guint i; for (i = 1; i < argc; i++) { GFile *file = g_file_new_for_commandline_arg (argv[i]); add_test_for_file (file); g_object_unref (file); } } return g_test_run (); }
/* 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; }
/* initialize the facedetect's class */ static void gst_face_detect_class_init (GstFaceDetectClass * klass) { GObjectClass *gobject_class; GstOpencvVideoFilterClass *gstopencvbasefilter_class; GstElementClass *element_class = GST_ELEMENT_CLASS (klass); gobject_class = (GObjectClass *) klass; gstopencvbasefilter_class = (GstOpencvVideoFilterClass *) klass; gobject_class->finalize = GST_DEBUG_FUNCPTR (gst_face_detect_finalize); gobject_class->set_property = gst_face_detect_set_property; gobject_class->get_property = gst_face_detect_get_property; gstopencvbasefilter_class->cv_trans_ip_func = gst_face_detect_transform_ip; gstopencvbasefilter_class->cv_set_caps = gst_face_detect_set_caps; g_object_class_install_property (gobject_class, PROP_DISPLAY, g_param_spec_boolean ("display", "Display", "Sets whether the detected faces should be highlighted in the output", TRUE, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); g_object_class_install_property (gobject_class, PROP_FACE_PROFILE, g_param_spec_string ("profile", "Face profile", "Location of Haar cascade file to use for face detection", DEFAULT_FACE_PROFILE, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); g_object_class_install_property (gobject_class, PROP_NOSE_PROFILE, g_param_spec_string ("nose-profile", "Nose profile", "Location of Haar cascade file to use for nose detection", DEFAULT_NOSE_PROFILE, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); g_object_class_install_property (gobject_class, PROP_MOUTH_PROFILE, g_param_spec_string ("mouth-profile", "Mouth profile", "Location of Haar cascade file to use for mouth detection", DEFAULT_MOUTH_PROFILE, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); g_object_class_install_property (gobject_class, PROP_EYES_PROFILE, g_param_spec_string ("eyes-profile", "Eyes profile", "Location of Haar cascade file to use for eye-pair detection", DEFAULT_EYES_PROFILE, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); g_object_class_install_property (gobject_class, PROP_FLAGS, g_param_spec_flags ("flags", "Flags", "Flags to cvHaarDetectObjects", GST_TYPE_OPENCV_FACE_DETECT_FLAGS, DEFAULT_FLAGS, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); g_object_class_install_property (gobject_class, PROP_SCALE_FACTOR, g_param_spec_double ("scale-factor", "Scale factor", "Factor by which the frame is scaled after each object scan", 1.1, 10.0, DEFAULT_SCALE_FACTOR, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); g_object_class_install_property (gobject_class, PROP_MIN_NEIGHBORS, g_param_spec_int ("min-neighbors", "Mininum neighbors", "Minimum number (minus 1) of neighbor rectangles that makes up " "an object", 0, G_MAXINT, DEFAULT_MIN_NEIGHBORS, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); g_object_class_install_property (gobject_class, PROP_MIN_SIZE_WIDTH, g_param_spec_int ("min-size-width", "Minimum face width", "Minimum area width to be recognized as a face", 0, G_MAXINT, DEFAULT_MIN_SIZE_WIDTH, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); g_object_class_install_property (gobject_class, PROP_MIN_SIZE_HEIGHT, g_param_spec_int ("min-size-height", "Minimum face height", "Minimum area height to be recognized as a face", 0, G_MAXINT, DEFAULT_MIN_SIZE_HEIGHT, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); gst_element_class_set_metadata (element_class, "facedetect", "Filter/Effect/Video", "Performs face detection on videos and images, providing detected positions via bus messages", "Michael Sheldon <*****@*****.**>"); gst_element_class_add_pad_template (element_class, gst_static_pad_template_get (&src_factory)); gst_element_class_add_pad_template (element_class, gst_static_pad_template_get (&sink_factory)); }
static void gst_cd_paranoia_src_class_init (GstCdParanoiaSrcClass * klass) { GstCddaBaseSrcClass *cddabasesrc_class = GST_CDDA_BASE_SRC_CLASS (klass); GObjectClass *gobject_class = G_OBJECT_CLASS (klass); gobject_class->set_property = gst_cd_paranoia_src_set_property; gobject_class->get_property = gst_cd_paranoia_src_get_property; gobject_class->finalize = gst_cd_paranoia_src_finalize; cddabasesrc_class->open = gst_cd_paranoia_src_open; cddabasesrc_class->close = gst_cd_paranoia_src_close; cddabasesrc_class->read_sector = gst_cd_paranoia_src_read_sector; g_object_class_install_property (G_OBJECT_CLASS (klass), PROP_GENERIC_DEVICE, g_param_spec_string ("generic-device", "Generic device", "Use specified generic scsi device", DEFAULT_GENERIC_DEVICE, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); g_object_class_install_property (G_OBJECT_CLASS (klass), PROP_READ_SPEED, g_param_spec_int ("read-speed", "Read speed", "Read from device at specified speed", -1, G_MAXINT, DEFAULT_READ_SPEED, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); g_object_class_install_property (G_OBJECT_CLASS (klass), PROP_PARANOIA_MODE, g_param_spec_flags ("paranoia-mode", "Paranoia mode", "Type of checking to perform", GST_TYPE_CD_PARANOIA_MODE, DEFAULT_PARANOIA_MODE, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); g_object_class_install_property (G_OBJECT_CLASS (klass), PROP_SEARCH_OVERLAP, g_param_spec_int ("search-overlap", "Search overlap", "Force minimum overlap search during verification to n sectors", -1, 75, DEFAULT_SEARCH_OVERLAP, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); /** * GstCdParanoiaSrc:cache-size * * Set CD cache size to n sectors (-1 = auto) * * Since: 0.10.24 */ g_object_class_install_property (G_OBJECT_CLASS (klass), PROP_CACHE_SIZE, g_param_spec_int ("cache-size", "Cache size", "Set CD cache size to n sectors (-1 = auto)", -1, G_MAXINT, DEFAULT_CACHE_SIZE, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); /* FIXME: we don't really want signals for this, but messages on the bus, * but then we can't check any longer whether anyone is interested in them */ /** * GstCdParanoiaSrc::transport-error * @cdparanoia: The CdParanoia instance * @sector: The sector number at which the error was encountered. * * This signal is emitted whenever an error occurs while reading. * CdParanoia will attempt to recover the data. */ cdpsrc_signals[TRANSPORT_ERROR] = g_signal_new ("transport-error", G_TYPE_FROM_CLASS (klass), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (GstCdParanoiaSrcClass, transport_error), NULL, NULL, g_cclosure_marshal_VOID__INT, G_TYPE_NONE, 1, G_TYPE_INT); /** * GstCdParanoiaSrc::uncorrected-error * @cdparanoia: The CdParanoia instance * @sector: The sector number at which the error was encountered. * * This signal is emitted whenever an uncorrectable error occurs while * reading. The data could not be read. */ cdpsrc_signals[UNCORRECTED_ERROR] = g_signal_new ("uncorrected-error", G_TYPE_FROM_CLASS (klass), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (GstCdParanoiaSrcClass, uncorrected_error), NULL, NULL, g_cclosure_marshal_VOID__INT, G_TYPE_NONE, 1, G_TYPE_INT); }
static void gst_rtsp_media_factory_class_init (GstRTSPMediaFactoryClass * klass) { GObjectClass *gobject_class; gobject_class = G_OBJECT_CLASS (klass); gobject_class->get_property = gst_rtsp_media_factory_get_property; gobject_class->set_property = gst_rtsp_media_factory_set_property; gobject_class->finalize = gst_rtsp_media_factory_finalize; /** * GstRTSPMediaFactory::launch * * The gst_parse_launch() line to use for constructing the pipeline in the * default prepare vmethod. * * The pipeline description should return a GstBin as the toplevel element * which can be accomplished by enclosing the dscription with brackets '(' * ')'. * * The description should return a pipeline with payloaders named pay0, pay1, * etc.. Each of the payloaders will result in a stream. * * Support for dynamic payloaders can be accomplished by adding payloaders * named dynpay0, dynpay1, etc.. */ g_object_class_install_property (gobject_class, PROP_LAUNCH, g_param_spec_string ("launch", "Launch", "A launch description of the pipeline", DEFAULT_LAUNCH, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); g_object_class_install_property (gobject_class, PROP_SHARED, g_param_spec_boolean ("shared", "Shared", "If media from this factory is shared", DEFAULT_SHARED, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); g_object_class_install_property (gobject_class, PROP_EOS_SHUTDOWN, g_param_spec_boolean ("eos-shutdown", "EOS Shutdown", "Send EOS down the pipeline before shutting down", DEFAULT_EOS_SHUTDOWN, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); g_object_class_install_property (gobject_class, PROP_PROTOCOLS, g_param_spec_flags ("protocols", "Protocols", "Allowed lower transport protocols", GST_TYPE_RTSP_LOWER_TRANS, DEFAULT_PROTOCOLS, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); g_object_class_install_property (gobject_class, PROP_BUFFER_SIZE, g_param_spec_uint ("buffer-size", "Buffer Size", "The kernel UDP buffer size to use", 0, G_MAXUINT, DEFAULT_BUFFER_SIZE, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); g_object_class_install_property (gobject_class, PROP_MULTICAST_GROUP, g_param_spec_string ("multicast-group", "Multicast Group", "The Multicast group to send media to", DEFAULT_MULTICAST_GROUP, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); gst_rtsp_media_factory_signals[SIGNAL_MEDIA_CONSTRUCTED] = g_signal_new ("media-constructed", G_TYPE_FROM_CLASS (klass), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (GstRTSPMediaFactoryClass, media_constructed), NULL, NULL, g_cclosure_marshal_VOID__OBJECT, G_TYPE_NONE, 1, GST_TYPE_RTSP_MEDIA); gst_rtsp_media_factory_signals[SIGNAL_MEDIA_CONFIGURE] = g_signal_new ("media-configure", G_TYPE_FROM_CLASS (klass), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (GstRTSPMediaFactoryClass, media_configure), NULL, NULL, g_cclosure_marshal_VOID__OBJECT, G_TYPE_NONE, 1, GST_TYPE_RTSP_MEDIA); klass->gen_key = default_gen_key; klass->get_element = default_get_element; klass->construct = default_construct; klass->configure = default_configure; klass->create_pipeline = default_create_pipeline; GST_DEBUG_CATEGORY_INIT (rtsp_media_debug, "rtspmediafactory", 0, "GstRTSPMediaFactory"); }
static void ges_pipeline_class_init (GESPipelineClass * klass) { GObjectClass *object_class = G_OBJECT_CLASS (klass); GstElementClass *element_class = GST_ELEMENT_CLASS (klass); g_type_class_add_private (klass, sizeof (GESPipelinePrivate)); GST_DEBUG_CATEGORY_INIT (ges_pipeline_debug, "gespipeline", GST_DEBUG_FG_YELLOW, "ges pipeline"); object_class->dispose = ges_pipeline_dispose; object_class->get_property = ges_pipeline_get_property; object_class->set_property = ges_pipeline_set_property; /** * GESPipeline:audio-sink: * * Audio sink for the preview. */ properties[PROP_AUDIO_SINK] = g_param_spec_object ("audio-sink", "Audio Sink", "Audio sink for the preview.", GST_TYPE_ELEMENT, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS); /** * GESPipeline:video-sink: * * Video sink for the preview. */ properties[PROP_VIDEO_SINK] = g_param_spec_object ("video-sink", "Video Sink", "Video sink for the preview.", GST_TYPE_ELEMENT, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS); /** * GESPipeline:timeline: * * Timeline to use in this pipeline. See also * ges_pipeline_set_timeline() for more info. */ properties[PROP_TIMELINE] = g_param_spec_object ("timeline", "Timeline", "Timeline to use in this pipeline. See also " "ges_pipeline_set_timeline() for more info.", GES_TYPE_TIMELINE, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS); /** * GESPipeline:mode: * * Pipeline mode. See ges_pipeline_set_mode() for more * info. */ properties[PROP_MODE] = g_param_spec_flags ("mode", "Mode", "Pipeline mode. See ges_pipeline_set_mode() for more info.", GES_TYPE_PIPELINE_FLAGS, DEFAULT_TIMELINE_MODE, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS); /** * GESPipeline::audio-filter * * The audio filter(s) to apply during playback right before the audio sink * * Since: 1.6.0 */ properties[PROP_AUDIO_FILTER] = g_param_spec_object ("audio-filter", "Audio filter", "the audio filter(s) to apply, if possible", GST_TYPE_ELEMENT, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS); /** * GESPipeline::video-filter * * The video filter(s) to apply during playback right before the video sink * * Since: 1.6.0 */ properties[PROP_VIDEO_FILTER] = g_param_spec_object ("video-filter", "Video filter", "the Video filter(s) to apply, if possible", GST_TYPE_ELEMENT, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS); g_object_class_install_properties (object_class, PROP_LAST, properties); element_class->change_state = GST_DEBUG_FUNCPTR (ges_pipeline_change_state); /* TODO : Add state_change handlers * Don't change state if we don't have a timeline */ }
static void nm_device_bt_class_init (NMDeviceBtClass *bt_class) { GObjectClass *object_class = G_OBJECT_CLASS (bt_class); NMObjectClass *nm_object_class = NM_OBJECT_CLASS (bt_class); NMDeviceClass *device_class = NM_DEVICE_CLASS (bt_class); g_type_class_add_private (bt_class, sizeof (NMDeviceBtPrivate)); _nm_object_class_add_interface (nm_object_class, NM_DBUS_INTERFACE_DEVICE_BLUETOOTH); /* virtual methods */ object_class->finalize = finalize; object_class->get_property = get_property; nm_object_class->init_dbus = init_dbus; device_class->connection_compatible = connection_compatible; device_class->get_setting_type = get_setting_type; device_class->get_hw_address = get_hw_address; /* properties */ /** * NMDeviceBt:hw-address: * * The hardware (MAC) address of the device. **/ g_object_class_install_property (object_class, PROP_HW_ADDRESS, g_param_spec_string (NM_DEVICE_BT_HW_ADDRESS, "", "", NULL, G_PARAM_READABLE | G_PARAM_STATIC_STRINGS)); /** * NMDeviceBt:name: * * The name of the bluetooth device. **/ g_object_class_install_property (object_class, PROP_NAME, g_param_spec_string (NM_DEVICE_BT_NAME, "", "", NULL, G_PARAM_READABLE | G_PARAM_STATIC_STRINGS)); /** * NMDeviceBt:bt-capabilities: * * The device's bluetooth capabilities, a combination of #NMBluetoothCapabilities. **/ g_object_class_install_property (object_class, PROP_BT_CAPABILITIES, g_param_spec_flags (NM_DEVICE_BT_CAPABILITIES, "", "", NM_TYPE_BLUETOOTH_CAPABILITIES, NM_BT_CAPABILITY_NONE, G_PARAM_READABLE | G_PARAM_STATIC_STRINGS)); }
class->accel_changed = NULL; g_object_class_install_property (object_class, PROP_IS_LOCKED, g_param_spec_boolean ("is-locked", "Is locked", "Is the accel group locked", FALSE, G_PARAM_READABLE)); g_object_class_install_property (object_class, PROP_MODIFIER_MASK, g_param_spec_flags ("modifier-mask", "Modifier Mask", "Modifier Mask", GDK_TYPE_MODIFIER_TYPE, default_accel_mod_mask, G_PARAM_READABLE)); /** * GtkAccelGroup::accel-activate: * @accel_group: the #GtkAccelGroup which received the signal * @acceleratable: the object on which the accelerator was activated * @keyval: the accelerator keyval * @modifier: the modifier combination of the accelerator * * The accel-activate signal is an implementation detail of * #GtkAccelGroup and not meant to be used by applications. * * Returns: %TRUE if the accelerator was activated */
PROP_VALUES, g_param_spec_pointer ("values", _("Values limited to PK fields"), _("GList of GValue to render, limited to PK fields"), G_PARAM_WRITABLE)); g_object_class_install_property (object_class, PROP_VALUES_DISPLAY, g_param_spec_pointer ("values-display", _("Values"), _("GList of GValue to render, not limited to PK fields "), G_PARAM_WRITABLE)); 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_SHOW_EXPANDER, g_param_spec_boolean ("show-expander", NULL, NULL, FALSE, G_PARAM_WRITABLE)); g_object_class_install_property (object_class, PROP_SET_DEFAULT_IF_INVALID, g_param_spec_boolean ("set-default-if-invalid", NULL, NULL, FALSE, (G_PARAM_READABLE | G_PARAM_WRITABLE))); g_object_class_install_property (object_class, PROP_PARAMLIST,
class->local_command_line = g_application_real_local_command_line; class->add_platform_data = g_application_real_add_platform_data; class->quit_mainloop = g_application_real_quit_mainloop; class->run_mainloop = g_application_real_run_mainloop; g_object_class_install_property (object_class, PROP_APPLICATION_ID, g_param_spec_string ("application-id", P_("Application identifier"), P_("The unique identifier for the application"), NULL, G_PARAM_READWRITE | G_PARAM_CONSTRUCT | G_PARAM_STATIC_STRINGS)); g_object_class_install_property (object_class, PROP_FLAGS, g_param_spec_flags ("flags", P_("Application flags"), P_("Flags specifying the behaviour of the application"), G_TYPE_APPLICATION_FLAGS, G_APPLICATION_FLAGS_NONE, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); g_object_class_install_property (object_class, PROP_IS_REGISTERED, g_param_spec_boolean ("is-registered", P_("Is registered"), P_("If g_application_register() has been called"), FALSE, G_PARAM_READABLE | G_PARAM_STATIC_STRINGS)); g_object_class_install_property (object_class, PROP_IS_REMOTE, g_param_spec_boolean ("is-remote", P_("Is remote"), P_("If this application instance is remote"), FALSE, G_PARAM_READABLE | G_PARAM_STATIC_STRINGS));