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_BLUE, 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 (); }
GtkObjectClass *object_class; GtkWidgetClass *widget_class; gobject_class = (GObjectClass *) class; object_class = (GtkObjectClass *) class; widget_class = (GtkWidgetClass *) class; gobject_class->set_property = image_view_set_property; gobject_class->get_property = image_view_get_property; /* FIXME: we should use the enum types but that's a pain */ g_object_class_install_property ( gobject_class, PROP_INTERP_TYPE, g_param_spec_int ("interp_type", _("interpolation type"), _("the type of interpolation to use"), 0, G_MAXINT, 0, 0)); g_object_class_install_property ( gobject_class, PROP_CHECK_TYPE, g_param_spec_int ("check_type", _("check type"), _("the type of chequering to use"), 0, G_MAXINT, 0, 0)); g_object_class_install_property ( gobject_class, PROP_CHECK_SIZE, g_param_spec_int ("check_size", _("check type"), _("the size of chequers to use"), 0, G_MAXINT, 0, 0));
object_class->constructor = base_object_constructor; object_class->set_property = base_object_set_property; object_class->get_property = base_object_get_property; object_class->notify = base_object_notify; g_object_class_override_property (object_class, BASE_PROP1, "prop1"); /* We override this one using a real property, not GParamSpecOverride * We change the flags from READONLY to READWRITE to show that we * can make the flags less restrictive */ inherited_spec2 = g_param_spec_int ("prop2", "Prop2", "Property 2", G_MININT, /* min */ G_MAXINT, /* max */ 0, /* default */ G_PARAM_READWRITE); g_object_class_install_property (object_class, BASE_PROP2, inherited_spec2); g_object_class_override_property (object_class, BASE_PROP3, "prop3"); inherited_spec4 = g_param_spec_int ("prop4", "Prop4", "Property 4", G_MININT, /* min */ G_MAXINT, /* max */ 0, /* default */ G_PARAM_READWRITE); g_object_class_install_property (object_class, BASE_PROP4, inherited_spec4);
static void nm_access_point_class_init (NMAccessPointClass *ap_class) { GObjectClass *object_class = G_OBJECT_CLASS (ap_class); g_type_class_add_private (ap_class, sizeof (NMAccessPointPrivate)); /* virtual methods */ object_class->constructed = constructed; object_class->get_property = get_property; object_class->dispose = dispose; object_class->finalize = finalize; /* properties */ /** * NMAccessPoint:flags: * * The flags of the access point. **/ g_object_class_install_property (object_class, PROP_FLAGS, g_param_spec_uint (NM_ACCESS_POINT_FLAGS, "", "", NM_802_11_AP_FLAGS_NONE, NM_802_11_AP_FLAGS_PRIVACY, NM_802_11_AP_FLAGS_NONE, G_PARAM_READABLE | G_PARAM_STATIC_STRINGS)); /** * NMAccessPoint:wpa-flags: * * The WPA flags of the access point. **/ g_object_class_install_property (object_class, PROP_WPA_FLAGS, g_param_spec_uint (NM_ACCESS_POINT_WPA_FLAGS, "", "", 0, G_MAXUINT32, 0, G_PARAM_READABLE | G_PARAM_STATIC_STRINGS)); /** * NMAccessPoint:rsn-flags: * * The RSN flags of the access point. **/ g_object_class_install_property (object_class, PROP_RSN_FLAGS, g_param_spec_uint (NM_ACCESS_POINT_RSN_FLAGS, "", "", 0, G_MAXUINT32, 0, G_PARAM_READABLE | G_PARAM_STATIC_STRINGS)); /** * NMAccessPoint:ssid: * * The SSID of the access point. **/ g_object_class_install_property (object_class, PROP_SSID, g_param_spec_boxed (NM_ACCESS_POINT_SSID, "", "", NM_TYPE_SSID, G_PARAM_READABLE | G_PARAM_STATIC_STRINGS)); /** * NMAccessPoint:frequency: * * The frequency of the access point. **/ g_object_class_install_property (object_class, PROP_FREQUENCY, g_param_spec_uint (NM_ACCESS_POINT_FREQUENCY, "", "", 0, 10000, 0, G_PARAM_READABLE | G_PARAM_STATIC_STRINGS)); /** * NMAccessPoint:bssid: * * The BSSID of the access point. **/ g_object_class_install_property (object_class, PROP_BSSID, g_param_spec_string (NM_ACCESS_POINT_BSSID, "", "", NULL, G_PARAM_READABLE | G_PARAM_STATIC_STRINGS)); /** * NMAccessPoint:hw-address: * * The hardware address of the access point. **/ g_object_class_install_property (object_class, PROP_HW_ADDRESS, g_param_spec_string (NM_ACCESS_POINT_HW_ADDRESS, "", "", NULL, G_PARAM_READABLE | G_PARAM_STATIC_STRINGS)); /** * NMAccessPoint:mode: * * The mode of the access point; either "infrastructure" (a central * coordinator of the wireless network allowing clients to connect) or * "ad-hoc" (a network with no central controller). **/ g_object_class_install_property (object_class, PROP_MODE, g_param_spec_uint (NM_ACCESS_POINT_MODE, "", "", NM_802_11_MODE_ADHOC, NM_802_11_MODE_INFRA, NM_802_11_MODE_INFRA, G_PARAM_READABLE | G_PARAM_STATIC_STRINGS)); /** * NMAccessPoint:max-bitrate: * * The maximum bit rate of the access point in kbit/s. **/ g_object_class_install_property (object_class, PROP_MAX_BITRATE, g_param_spec_uint (NM_ACCESS_POINT_MAX_BITRATE, "", "", 0, G_MAXUINT32, 0, G_PARAM_READABLE | G_PARAM_STATIC_STRINGS)); /** * NMAccessPoint:strength: * * The current signal strength of the access point. **/ g_object_class_install_property (object_class, PROP_STRENGTH, g_param_spec_uchar (NM_ACCESS_POINT_STRENGTH, "", "", 0, G_MAXUINT8, 0, G_PARAM_READABLE | G_PARAM_STATIC_STRINGS)); /** * NMAccessPoint:last-seen: * * The timestamp (in CLOCK_BOOTTIME seconds) for the last time the * access point was found in scan results. A value of -1 means the * access point has not been found in a scan. * * Since: 1.2 **/ g_object_class_install_property (object_class, PROP_LAST_SEEN, g_param_spec_int (NM_ACCESS_POINT_LAST_SEEN, "", "", -1, G_MAXINT, -1, G_PARAM_READABLE | G_PARAM_STATIC_STRINGS)); }
static void gst_basertppayload_class_init (GstBaseRTPPayloadClass * klass) { GObjectClass *gobject_class; GstElementClass *gstelement_class; gobject_class = (GObjectClass *) klass; gstelement_class = (GstElementClass *) klass; g_type_class_add_private (klass, sizeof (GstBaseRTPPayloadPrivate)); parent_class = g_type_class_peek_parent (klass); gobject_class->finalize = gst_basertppayload_finalize; gobject_class->set_property = gst_basertppayload_set_property; gobject_class->get_property = gst_basertppayload_get_property; g_object_class_install_property (G_OBJECT_CLASS (klass), PROP_MTU, g_param_spec_uint ("mtu", "MTU", "Maximum size of one packet", 28, G_MAXUINT, DEFAULT_MTU, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); g_object_class_install_property (G_OBJECT_CLASS (klass), PROP_PT, g_param_spec_uint ("pt", "payload type", "The payload type of the packets", 0, 0x80, DEFAULT_PT, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); g_object_class_install_property (G_OBJECT_CLASS (klass), PROP_SSRC, g_param_spec_uint ("ssrc", "SSRC", "The SSRC of the packets (default == random)", 0, G_MAXUINT32, DEFAULT_SSRC, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); g_object_class_install_property (G_OBJECT_CLASS (klass), PROP_TIMESTAMP_OFFSET, g_param_spec_uint ("timestamp-offset", "Timestamp Offset", "Offset to add to all outgoing timestamps (default = random)", 0, G_MAXUINT32, DEFAULT_TIMESTAMP_OFFSET, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); g_object_class_install_property (G_OBJECT_CLASS (klass), PROP_SEQNUM_OFFSET, g_param_spec_int ("seqnum-offset", "Sequence number Offset", "Offset to add to all outgoing seqnum (-1 = random)", -1, G_MAXUINT16, DEFAULT_SEQNUM_OFFSET, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); g_object_class_install_property (G_OBJECT_CLASS (klass), PROP_MAX_PTIME, g_param_spec_int64 ("max-ptime", "Max packet time", "Maximum duration of the packet data in ns (-1 = unlimited up to MTU)", -1, G_MAXINT64, DEFAULT_MAX_PTIME, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); /** * GstBaseRTPAudioPayload:min-ptime: * * Minimum duration of the packet data in ns (can't go above MTU) * * Since: 0.10.13 **/ g_object_class_install_property (G_OBJECT_CLASS (klass), PROP_MIN_PTIME, g_param_spec_int64 ("min-ptime", "Min packet time", "Minimum duration of the packet data in ns (can't go above MTU)", 0, G_MAXINT64, DEFAULT_MIN_PTIME, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); g_object_class_install_property (G_OBJECT_CLASS (klass), PROP_TIMESTAMP, g_param_spec_uint ("timestamp", "Timestamp", "The RTP timestamp of the last processed packet", 0, G_MAXUINT32, 0, G_PARAM_READABLE | G_PARAM_STATIC_STRINGS)); g_object_class_install_property (G_OBJECT_CLASS (klass), PROP_SEQNUM, g_param_spec_uint ("seqnum", "Sequence number", "The RTP sequence number of the last processed packet", 0, G_MAXUINT16, 0, G_PARAM_READABLE | G_PARAM_STATIC_STRINGS)); gstelement_class->change_state = gst_basertppayload_change_state; GST_DEBUG_CATEGORY_INIT (basertppayload_debug, "basertppayload", 0, "Base class for RTP Payloaders"); }
widget_class = (GtkWidgetClass*) class; container_class = (GtkContainerClass*) class; gobject_class->set_property = gtk_layout_set_property; gobject_class->get_property = gtk_layout_get_property; gobject_class->finalize = gtk_layout_finalize; container_class->set_child_property = gtk_layout_set_child_property; container_class->get_child_property = gtk_layout_get_child_property; gtk_container_class_install_child_property (container_class, CHILD_PROP_X, g_param_spec_int ("x", P_("X position"), P_("X position of child widget"), G_MININT, G_MAXINT, 0, GTK_PARAM_READWRITE)); gtk_container_class_install_child_property (container_class, CHILD_PROP_Y, g_param_spec_int ("y", P_("Y position"), P_("Y position of child widget"), G_MININT, G_MAXINT, 0, GTK_PARAM_READWRITE)); /* Scrollable interface */
static void gst_udpsrc_class_init (GstUDPSrcClass * klass) { GObjectClass *gobject_class; GstElementClass *gstelement_class; GstBaseSrcClass *gstbasesrc_class; GstPushSrcClass *gstpushsrc_class; gobject_class = (GObjectClass *) klass; gstelement_class = (GstElementClass *) klass; gstbasesrc_class = (GstBaseSrcClass *) klass; gstpushsrc_class = (GstPushSrcClass *) klass; GST_DEBUG_CATEGORY_INIT (udpsrc_debug, "udpsrc", 0, "UDP src"); gobject_class->set_property = gst_udpsrc_set_property; gobject_class->get_property = gst_udpsrc_get_property; gobject_class->finalize = gst_udpsrc_finalize; g_object_class_install_property (G_OBJECT_CLASS (klass), PROP_PORT, g_param_spec_int ("port", "Port", "The port to receive the packets from, 0=allocate", 0, G_MAXUINT16, UDP_DEFAULT_PORT, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); /* FIXME 2.0: Remove multicast-group property */ #ifndef GST_REMOVE_DEPRECATED g_object_class_install_property (gobject_class, PROP_MULTICAST_GROUP, g_param_spec_string ("multicast-group", "Multicast Group", "The Address of multicast group to join. (DEPRECATED: " "Use address property instead)", UDP_DEFAULT_MULTICAST_GROUP, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS | G_PARAM_DEPRECATED)); #endif g_object_class_install_property (gobject_class, PROP_MULTICAST_IFACE, g_param_spec_string ("multicast-iface", "Multicast Interface", "The network interface on which to join the multicast group", UDP_DEFAULT_MULTICAST_IFACE, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); g_object_class_install_property (gobject_class, PROP_URI, g_param_spec_string ("uri", "URI", "URI in the form of udp://multicast_group:port", UDP_DEFAULT_URI, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); g_object_class_install_property (gobject_class, PROP_CAPS, g_param_spec_boxed ("caps", "Caps", "The caps of the source pad", GST_TYPE_CAPS, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); g_object_class_install_property (gobject_class, PROP_SOCKET, g_param_spec_object ("socket", "Socket", "Socket to use for UDP reception. (NULL == allocate)", G_TYPE_SOCKET, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); g_object_class_install_property (G_OBJECT_CLASS (klass), PROP_BUFFER_SIZE, g_param_spec_int ("buffer-size", "Buffer Size", "Size of the kernel receive buffer in bytes, 0=default", 0, G_MAXINT, UDP_DEFAULT_BUFFER_SIZE, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); g_object_class_install_property (G_OBJECT_CLASS (klass), PROP_TIMEOUT, g_param_spec_uint64 ("timeout", "Timeout", "Post a message after timeout nanoseconds (0 = disabled)", 0, G_MAXUINT64, UDP_DEFAULT_TIMEOUT, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); g_object_class_install_property (G_OBJECT_CLASS (klass), PROP_SKIP_FIRST_BYTES, g_param_spec_int ("skip-first-bytes", "Skip first bytes", "number of bytes to skip for each udp packet", 0, G_MAXINT, UDP_DEFAULT_SKIP_FIRST_BYTES, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); g_object_class_install_property (gobject_class, PROP_CLOSE_SOCKET, g_param_spec_boolean ("close-socket", "Close socket", "Close socket if passed as property on state change", UDP_DEFAULT_CLOSE_SOCKET, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); g_object_class_install_property (gobject_class, PROP_USED_SOCKET, g_param_spec_object ("used-socket", "Socket Handle", "Socket currently in use for UDP reception. (NULL = no socket)", G_TYPE_SOCKET, G_PARAM_READABLE | G_PARAM_STATIC_STRINGS)); g_object_class_install_property (gobject_class, PROP_AUTO_MULTICAST, g_param_spec_boolean ("auto-multicast", "Auto Multicast", "Automatically join/leave multicast groups", UDP_DEFAULT_AUTO_MULTICAST, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); g_object_class_install_property (gobject_class, PROP_REUSE, g_param_spec_boolean ("reuse", "Reuse", "Enable reuse of the port", UDP_DEFAULT_REUSE, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); g_object_class_install_property (gobject_class, PROP_ADDRESS, g_param_spec_string ("address", "Address", "Address to receive packets for. This is equivalent to the " "multicast-group property for now", UDP_DEFAULT_MULTICAST_GROUP, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); gst_element_class_add_pad_template (gstelement_class, gst_static_pad_template_get (&src_template)); gst_element_class_set_static_metadata (gstelement_class, "UDP packet receiver", "Source/Network", "Receive data over the network via UDP", "Wim Taymans <*****@*****.**>, " "Thijs Vermeir <*****@*****.**>"); gstelement_class->change_state = gst_udpsrc_change_state; gstbasesrc_class->unlock = gst_udpsrc_unlock; gstbasesrc_class->unlock_stop = gst_udpsrc_unlock_stop; gstbasesrc_class->get_caps = gst_udpsrc_getcaps; gstbasesrc_class->negotiate = gst_udpsrc_negotiate; gstpushsrc_class->create = gst_udpsrc_create; }
static void nm_setting_proxy_class_init (NMSettingProxyClass *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 (NMSettingProxyPrivate)); /* virtual methods */ object_class->set_property = set_property; object_class->get_property = get_property; object_class->finalize = finalize; parent_class->verify = verify; /** * NMSettingProxy:method: * * Method for proxy configuration, Default is "NONE" * * Since: 1.4 **/ g_object_class_install_property (object_class, PROP_METHOD, g_param_spec_int (NM_SETTING_PROXY_METHOD, "", "", G_MININT32, G_MAXINT32, NM_SETTING_PROXY_METHOD_NONE, G_PARAM_READWRITE | G_PARAM_CONSTRUCT | G_PARAM_STATIC_STRINGS)); /** * NMSettingProxy:http-proxy: * * HTTP proxy * * Since: 1.4 **/ g_object_class_install_property (object_class, PROP_HTTP_PROXY, g_param_spec_string (NM_SETTING_PROXY_HTTP_PROXY, "", "", NULL, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); /** * NMSettingProxy:http-port: * * Port number for HTTP proxy * * Since: 1.4 **/ g_object_class_install_property (object_class, PROP_HTTP_PORT, g_param_spec_uint (NM_SETTING_PROXY_HTTP_PORT, "", "", 0, G_MAXUINT32, 0, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); /** * NMSettingProxy:http-default: * * Make HTTP proxy default for all protocols. * * Since: 1.4 **/ g_object_class_install_property (object_class, PROP_HTTP_DEFAULT, g_param_spec_boolean (NM_SETTING_PROXY_HTTP_DEFAULT, "", "", FALSE, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); /** * NMSettingProxy:ssl-proxy: * * SSL proxy. * * Since: 1.4 **/ g_object_class_install_property (object_class, PROP_SSL_PROXY, g_param_spec_string (NM_SETTING_PROXY_SSL_PROXY, "", "", NULL, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); /** * NMSettingProxy:ssl-port: * * Port number for SSL proxy. * * Since: 1.4 **/ g_object_class_install_property (object_class, PROP_SSL_PORT, g_param_spec_uint (NM_SETTING_PROXY_SSL_PORT, "", "", 0, G_MAXUINT32, 0, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); /** * NMSettingProxy:ftp-proxy: * * FTP proxy. * * Since: 1.4 **/ g_object_class_install_property (object_class, PROP_FTP_PROXY, g_param_spec_string (NM_SETTING_PROXY_FTP_PROXY, "", "", NULL, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); /** * NMSettingProxy:ftp-port: * * Port number for FTP proxy. * * Since: 1.4 **/ g_object_class_install_property (object_class, PROP_FTP_PORT, g_param_spec_uint (NM_SETTING_PROXY_FTP_PORT, "", "", 0, G_MAXUINT32, 0, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); /** * NMSettingProxy:socks-proxy: * * SOCKS proxy. * * Since: 1.4 **/ g_object_class_install_property (object_class, PROP_SOCKS_PROXY, g_param_spec_string (NM_SETTING_PROXY_SOCKS_PROXY, "", "", NULL, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); /** * NMSettingProxy:socks-port: * * Port number for SOCKS proxy. * * Since: 1.4 **/ g_object_class_install_property (object_class, PROP_SOCKS_PORT, g_param_spec_uint (NM_SETTING_PROXY_SOCKS_PORT, "", "", 0, G_MAXUINT32, 0, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); /** * NMSettingProxy:socks-version-5: * * set %TRUE if SOCKS version is 5. * * Since: 1.4 **/ g_object_class_install_property (object_class, PROP_SOCKS_VERSION_5, g_param_spec_boolean (NM_SETTING_PROXY_SOCKS_VERSION_5, "", "", FALSE, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); /** * NMSettingProxy:nm-proxy-for: * * Array of host to be excluded from proxy. * * Since: 1.4 **/ g_object_class_install_property (object_class, PROP_NO_PROXY_FOR, g_param_spec_boxed (NM_SETTING_PROXY_NO_PROXY_FOR, "", "", G_TYPE_STRV, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); /** * NMSettingProxy:pac-url: * * PAC Url for obtaining PAC File. * * Since: 1.4 **/ g_object_class_install_property (object_class, PROP_PAC_URL, g_param_spec_string (NM_SETTING_PROXY_PAC_URL, "", "", NULL, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); /** * NMSettingProxy:pac-script: * * PAC Script location. * * Since: 1.4 **/ g_object_class_install_property (object_class, PROP_PAC_SCRIPT, g_param_spec_string (NM_SETTING_PROXY_PAC_SCRIPT, "", "", NULL, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); }
static void hippo_canvas_image_class_init(HippoCanvasImageClass *klass) { GObjectClass *object_class = G_OBJECT_CLASS (klass); HippoCanvasBoxClass *box_class = HIPPO_CANVAS_BOX_CLASS(klass); object_class->set_property = hippo_canvas_image_set_property; object_class->get_property = hippo_canvas_image_get_property; object_class->finalize = hippo_canvas_image_finalize; box_class->paint_below_children = hippo_canvas_image_paint_below_children; box_class->get_content_width_request = hippo_canvas_image_get_content_width_request; box_class->get_content_height_request = hippo_canvas_image_get_content_height_request; /** * HippoCanvasImage:image * * Specifies the Cairo surface to display. */ g_object_class_install_property(object_class, PROP_IMAGE, g_param_spec_boxed("image", _("Image"), _("Image as cairo_surface_t"), HIPPO_TYPE_CAIRO_SURFACE, G_PARAM_READABLE | G_PARAM_WRITABLE)); /** * HippoCanvasImage:image-name * * Specifies an image name to display; with GTK+ the image name is * an image name registered with the GTK+ theme system. */ g_object_class_install_property(object_class, PROP_IMAGE_NAME, g_param_spec_string("image-name", _("Image Name"), _("Image name to be loaded into the item"), NULL, G_PARAM_READABLE | G_PARAM_WRITABLE)); /** * HippoCanvasImage:scale-width * * A width in pixels to scale the image to, or -1 to use the image's original width. */ g_object_class_install_property(object_class, PROP_SCALE_WIDTH, g_param_spec_int("scale-width", _("Scale width"), _("Width to scale to or -1 for no scale"), -1, G_MAXINT, -1, G_PARAM_READABLE | G_PARAM_WRITABLE)); /** * HippoCanvasImage:scale-height * * A height in pixels to scale the image to, or -1 to use the image's original height. */ g_object_class_install_property(object_class, PROP_SCALE_HEIGHT, g_param_spec_int("scale-height", _("Scale height"), _("Height to scale to or -1 for no scale"), -1, G_MAXINT, -1, G_PARAM_READABLE | G_PARAM_WRITABLE)); }
static void rb_track_transfer_batch_class_init (RBTrackTransferBatchClass *klass) { GObjectClass *object_class = G_OBJECT_CLASS (klass); object_class->set_property = impl_set_property; object_class->get_property = impl_get_property; object_class->finalize = impl_finalize; object_class->dispose = impl_dispose; /** * RBTrackTransferBatch:media-types * * Array of media type strings describing the acceptable * destination formats. If NULL, no format conversion will * be done. */ g_object_class_install_property (object_class, PROP_MEDIA_TYPES_STRV, g_param_spec_boxed ("media-types-strv", "media types", "Set of allowable destination media types", G_TYPE_STRV, G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY)); /** * RBTrackTransferBatch:media-types * * GList of media type strings describing the acceptable * destination formats. If NULL, no format conversion will * be done. */ g_object_class_install_property (object_class, PROP_MEDIA_TYPES, g_param_spec_pointer ("media-types", "media types", "Set of allowable destination media types", G_PARAM_WRITABLE | G_PARAM_CONSTRUCT_ONLY)); /** * RBTrackTransferBatch:source * * The RBSource from which the tracks are being transferred. */ g_object_class_install_property (object_class, PROP_SOURCE, g_param_spec_object ("source", "source source", "RBSource from which the tracks are being transferred", RB_TYPE_SOURCE, G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY)); /** * RBTrackTransferBatch:destination * * The RBSource to which the tracks are being transferred. */ g_object_class_install_property (object_class, PROP_DESTINATION, g_param_spec_object ("destination", "destination source", "RBSource to which the tracks are being transferred", RB_TYPE_SOURCE, G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY)); /** * RBTrackTransferBatch:total-entries * * Total number of entries in the transfer batch. */ g_object_class_install_property (object_class, PROP_TOTAL_ENTRIES, g_param_spec_int ("total-entries", "total entries", "Number of entries in the batch", 0, G_MAXINT, 0, G_PARAM_READABLE)); /** * RBTrackTransferBatch:done-entries * * Number of entries in the batch that have been transferred. */ g_object_class_install_property (object_class, PROP_DONE_ENTRIES, g_param_spec_int ("done-entries", "done entries", "Number of entries already transferred", 0, G_MAXINT, 0, G_PARAM_READABLE)); /** * RBTrackTransferBatch:progress * * Fraction of the transfer batch that has been processed. */ g_object_class_install_property (object_class, PROP_PROGRESS, g_param_spec_double ("progress", "progress fraction", "Fraction of the batch that has been transferred", 0.0, 1.0, 0.0, G_PARAM_READABLE)); /** * RBTrackTransferBatch:entry-list * * A list of all entries in the batch. */ g_object_class_install_property (object_class, PROP_ENTRY_LIST, g_param_spec_pointer ("entry-list", "entry list", "list of all entries in the batch", G_PARAM_READABLE)); /** * RBTrackTransferBatch::started: * @batch: the #RBTrackTransferBatch * * Emitted when the batch is started. This will be after * all previous batches have finished, which is not necessarily * when #rb_track_transfer_manager_start_batch is called. */ signals [STARTED] = g_signal_new ("started", G_OBJECT_CLASS_TYPE (object_class), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (RBTrackTransferBatchClass, started), NULL, NULL, g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0); /** * RBTrackTransferBatch::complete: * @batch: the #RBTrackTransferBatch * * Emitted when the batch is complete. This will be immediately * after the final entry transfer is complete. */ signals [COMPLETE] = g_signal_new ("complete", G_OBJECT_CLASS_TYPE (object_class), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (RBTrackTransferBatchClass, complete), NULL, NULL, g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0); /** * RBTrackTransferBatch::cancelled: * @batch: the #RBTrackTransferBatch * * Emitted when the batch is cancelled. * * hmm. will 'complete' still be emitted in this case? */ signals [CANCELLED] = g_signal_new ("cancelled", G_OBJECT_CLASS_TYPE (object_class), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (RBTrackTransferBatchClass, cancelled), NULL, NULL, g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0); /** * RBTrackTransferBatch::get-dest-uri: * @batch: the #RBTrackTransferBatch * @entry: the #RhythmDBEntry to be transferred * @mediatype: the destination media type for the transfer * @extension: usual extension for the destionation media type * * The batch emits this to allow the creator to provide a destination * URI for an entry being transferred. This is emitted after the * output media type is decided, so the usual extension for the media * type can be taken into consideration. */ signals [GET_DEST_URI] = g_signal_new ("get-dest-uri", G_OBJECT_CLASS_TYPE (object_class), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (RBTrackTransferBatchClass, get_dest_uri), NULL, NULL, rb_marshal_STRING__BOXED_STRING_STRING, G_TYPE_STRING, 3, RHYTHMDB_TYPE_ENTRY, G_TYPE_STRING, G_TYPE_STRING); /** * RBTrackTransferBatch::overwrite-prompt: * @batch: the #RBTrackTransferBatch * @file: the #GFile that may be overwritten * * Emitted when the destination URI for a transfer already exists. * If a handler returns TRUE, the file will be overwritten, otherwise * the transfer will be skipped. */ signals [OVERWRITE_PROMPT] = g_signal_new ("overwrite-prompt", G_OBJECT_CLASS_TYPE (object_class), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (RBTrackTransferBatchClass, overwrite_prompt), NULL, NULL, rb_marshal_BOOLEAN__OBJECT, G_TYPE_BOOLEAN, 1, G_TYPE_FILE); /** * RBTrackTransferBatch::track-started: * @batch: the #RBTrackTransferBatch * @entry: the #RhythmDBEntry being transferred * @dest: the destination URI for the transfer * * Emitted when a new entry is about to be transferred. * This will be emitted for each entry in the batch, unless * the batch is cancelled. */ signals [TRACK_STARTED] = g_signal_new ("track-started", G_OBJECT_CLASS_TYPE (object_class), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (RBTrackTransferBatchClass, track_started), NULL, NULL, rb_marshal_VOID__BOXED_STRING, G_TYPE_NONE, 2, RHYTHMDB_TYPE_ENTRY, G_TYPE_STRING); /** * RBTrackTransferBatch::track-progress: * @batch: the #RBTrackTransferBatch * @entry: the #RhythmDBEntry being transferred * @dest: the destination URI for the transfer * @done: some measure of how much of the transfer is done * @total: the total amount of that same measure * @fraction: the fraction of the transfer that is done * * Emitted regularly throughout the transfer to allow progress bars * and other UI elements to be updated. */ signals [TRACK_PROGRESS] = g_signal_new ("track-progress", G_OBJECT_CLASS_TYPE (object_class), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (RBTrackTransferBatchClass, track_progress), NULL, NULL, rb_marshal_VOID__BOXED_STRING_INT_INT_DOUBLE, G_TYPE_NONE, 5, RHYTHMDB_TYPE_ENTRY, G_TYPE_STRING, G_TYPE_INT, G_TYPE_INT, G_TYPE_DOUBLE); /** * RBTrackTransferBatch::track-done: * @batch: the #RBTrackTransferBatch * @entry: the #RhythmDBEntry that was transferred * @dest: the destination URI for the transfer * @dest_size: size of the destination file * @dest_mediatype: the media type of the destination file * @error: any error that occurred during transfer * * Emitted when a track transfer is complete, whether because * the track was fully transferred, because an error occurred, * or because the batch was cancelled (maybe..). */ signals [TRACK_DONE] = g_signal_new ("track-done", G_OBJECT_CLASS_TYPE (object_class), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (RBTrackTransferBatchClass, track_done), NULL, NULL, rb_marshal_VOID__BOXED_STRING_UINT64_STRING_POINTER, G_TYPE_NONE, 5, RHYTHMDB_TYPE_ENTRY, G_TYPE_STRING, G_TYPE_UINT64, G_TYPE_STRING, G_TYPE_POINTER); g_type_class_add_private (klass, sizeof (RBTrackTransferBatchPrivate)); }
static void ev_link_dest_class_init (EvLinkDestClass *ev_link_dest_class) { GObjectClass *g_object_class; g_object_class = G_OBJECT_CLASS (ev_link_dest_class); g_object_class->set_property = ev_link_dest_set_property; g_object_class->get_property = ev_link_dest_get_property; g_object_class->finalize = ev_link_dest_finalize; g_type_class_add_private (g_object_class, sizeof (EvLinkDestPrivate)); g_object_class_install_property (g_object_class, PROP_TYPE, g_param_spec_enum ("type", "Dest Type", "The destination type", EV_TYPE_LINK_DEST_TYPE, EV_LINK_DEST_TYPE_UNKNOWN, G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY)); g_object_class_install_property (g_object_class, PROP_PAGE, g_param_spec_int ("page", "Dest Page", "The destination page", -1, G_MAXINT, 0, G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY)); g_object_class_install_property (g_object_class, PROP_LEFT, g_param_spec_double ("left", "Left coordinate", "The left coordinate", -G_MAXDOUBLE, G_MAXDOUBLE, 0, G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY)); g_object_class_install_property (g_object_class, PROP_TOP, g_param_spec_double ("top", "Top coordinate", "The top coordinate", -G_MAXDOUBLE, G_MAXDOUBLE, 0, G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY)); g_object_class_install_property (g_object_class, PROP_BOTTOM, g_param_spec_double ("bottom", "Bottom coordinate", "The bottom coordinate", -G_MAXDOUBLE, G_MAXDOUBLE, 0, G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY)); g_object_class_install_property (g_object_class, PROP_RIGHT, g_param_spec_double ("right", "Right coordinate", "The right coordinate", -G_MAXDOUBLE, G_MAXDOUBLE, 0, G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY)); g_object_class_install_property (g_object_class, PROP_ZOOM, g_param_spec_double ("zoom", "Zoom", "Zoom", 0, G_MAXDOUBLE, 0, G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY)); g_object_class_install_property (g_object_class, PROP_CHANGE, g_param_spec_uint ("change", "Change", "Wether top, left, and zoom should be changed", 0, G_MAXUINT, 0, G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY)); g_object_class_install_property (g_object_class, PROP_NAMED, g_param_spec_string ("named", "Named destination", "The named destination", NULL, G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY)); g_object_class_install_property (g_object_class, PROP_PAGE_LABEL, g_param_spec_string ("page_label", "Label of the page", "The label of the destination page", NULL, G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY)); }
static void gtk_check_menu_item_class_init (GtkCheckMenuItemClass *klass) { GObjectClass *gobject_class; GtkWidgetClass *widget_class; GtkMenuItemClass *menu_item_class; gobject_class = G_OBJECT_CLASS (klass); widget_class = (GtkWidgetClass*) klass; menu_item_class = (GtkMenuItemClass*) klass; gobject_class->set_property = gtk_check_menu_item_set_property; gobject_class->get_property = gtk_check_menu_item_get_property; widget_class->state_flags_changed = gtk_check_menu_item_state_flags_changed; widget_class->direction_changed = gtk_check_menu_item_direction_changed; g_object_class_install_property (gobject_class, PROP_ACTIVE, g_param_spec_boolean ("active", P_("Active"), P_("Whether the menu item is checked"), FALSE, GTK_PARAM_READWRITE|G_PARAM_EXPLICIT_NOTIFY)); g_object_class_install_property (gobject_class, PROP_INCONSISTENT, g_param_spec_boolean ("inconsistent", P_("Inconsistent"), P_("Whether to display an \"inconsistent\" state"), FALSE, GTK_PARAM_READWRITE|G_PARAM_EXPLICIT_NOTIFY)); g_object_class_install_property (gobject_class, PROP_DRAW_AS_RADIO, g_param_spec_boolean ("draw-as-radio", P_("Draw as radio menu item"), P_("Whether the menu item looks like a radio menu item"), FALSE, GTK_PARAM_READWRITE|G_PARAM_EXPLICIT_NOTIFY)); gtk_widget_class_install_style_property (widget_class, g_param_spec_int ("indicator-size", P_("Indicator Size"), P_("Size of check or radio indicator"), 0, G_MAXINT, INDICATOR_SIZE, GTK_PARAM_READABLE)); widget_class->draw = gtk_check_menu_item_draw; menu_item_class->activate = gtk_check_menu_item_activate; menu_item_class->hide_on_activate = FALSE; menu_item_class->toggle_size_request = gtk_check_menu_item_toggle_size_request; klass->toggled = NULL; klass->draw_indicator = gtk_real_check_menu_item_draw_indicator; /** * GtkCheckMenuItem::toggled: * @checkmenuitem: the object which received the signal. * * This signal is emitted when the state of the check box is changed. * * A signal handler can use gtk_check_menu_item_get_active() * to discover the new state. */ check_menu_item_signals[TOGGLED] = g_signal_new (I_("toggled"), G_OBJECT_CLASS_TYPE (gobject_class), G_SIGNAL_RUN_FIRST, G_STRUCT_OFFSET (GtkCheckMenuItemClass, toggled), NULL, NULL, _gtk_marshal_VOID__VOID, G_TYPE_NONE, 0); gtk_widget_class_set_accessible_type (widget_class, GTK_TYPE_CHECK_MENU_ITEM_ACCESSIBLE); gtk_widget_class_set_css_name (widget_class, "menuitem"); }
static void gst_dv1394src_class_init (GstDV1394SrcClass * klass) { GObjectClass *gobject_class; GstElementClass *gstelement_class; GstBaseSrcClass *gstbasesrc_class; GstPushSrcClass *gstpushsrc_class; gobject_class = (GObjectClass *) klass; gstelement_class = (GstElementClass *) klass; gstbasesrc_class = (GstBaseSrcClass *) klass; gstpushsrc_class = (GstPushSrcClass *) klass; gobject_class->set_property = gst_dv1394src_set_property; gobject_class->get_property = gst_dv1394src_get_property; gobject_class->dispose = gst_dv1394src_dispose; gstelement_class->provide_clock = gst_dv1394src_provide_clock; gstelement_class->change_state = gst_dv1394_src_change_state; gst_dv1394src_signals[SIGNAL_FRAME_DROPPED] = g_signal_new ("frame-dropped", G_TYPE_FROM_CLASS (klass), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (GstDV1394SrcClass, frame_dropped), NULL, NULL, g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0); g_object_class_install_property (G_OBJECT_CLASS (klass), PROP_PORT, g_param_spec_int ("port", "Port", "Port number (-1 automatic)", -1, 16, DEFAULT_PORT, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); g_object_class_install_property (G_OBJECT_CLASS (klass), PROP_CHANNEL, g_param_spec_int ("channel", "Channel", "Channel number for listening", 0, 64, DEFAULT_CHANNEL, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); g_object_class_install_property (G_OBJECT_CLASS (klass), PROP_CONSECUTIVE, g_param_spec_int ("consecutive", "consecutive frames", "send n consecutive frames after skipping", 1, G_MAXINT, DEFAULT_CONSECUTIVE, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); g_object_class_install_property (G_OBJECT_CLASS (klass), PROP_SKIP, g_param_spec_int ("skip", "skip frames", "skip n frames", 0, G_MAXINT, DEFAULT_SKIP, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); g_object_class_install_property (G_OBJECT_CLASS (klass), PROP_DROP_INCOMPLETE, g_param_spec_boolean ("drop-incomplete", "drop incomplete", "drop incomplete frames", DEFAULT_DROP_INCOMPLETE, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); g_object_class_install_property (G_OBJECT_CLASS (klass), PROP_USE_AVC, g_param_spec_boolean ("use-avc", "Use AV/C", "Use AV/C VTR control", DEFAULT_USE_AVC, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); g_object_class_install_property (G_OBJECT_CLASS (klass), PROP_GUID, g_param_spec_uint64 ("guid", "GUID", "select one of multiple DV devices by its GUID. use a hexadecimal " "like 0xhhhhhhhhhhhhhhhh. (0 = no guid)", 0, G_MAXUINT64, DEFAULT_GUID, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); /** * GstDV1394Src:device-name: * * Descriptive name of the currently opened device */ g_object_class_install_property (G_OBJECT_CLASS (klass), PROP_DEVICE_NAME, g_param_spec_string ("device-name", "device name", "user-friendly name of the device", "Default", G_PARAM_READABLE | G_PARAM_STATIC_STRINGS)); gstbasesrc_class->negotiate = NULL; gstbasesrc_class->start = gst_dv1394src_start; gstbasesrc_class->stop = gst_dv1394src_stop; gstbasesrc_class->unlock = gst_dv1394src_unlock; gstbasesrc_class->query = gst_dv1394src_query; gstpushsrc_class->create = gst_dv1394src_create; gst_element_class_add_pad_template (gstelement_class, gst_static_pad_template_get (&src_factory)); gst_element_class_set_static_metadata (gstelement_class, "Firewire (1394) DV video source", "Source/Video", "Source for DV video data from firewire port", "Erik Walthinsen <*****@*****.**>, " "Daniel Fischer <*****@*****.**>, " "Wim Taymans <*****@*****.**>, " "Zaheer Abbas Merali <zaheerabbas at merali dot org>"); GST_DEBUG_CATEGORY_INIT (dv1394src_debug, "dv1394src", 0, "DV firewire source"); }
GTK_PARAM_READWRITE)); g_object_class_install_property (object_class, PROP_RADIO, g_param_spec_boolean ("radio", P_("Radio state"), P_("Draw the toggle button as a radio button"), FALSE, GTK_PARAM_READWRITE)); g_object_class_install_property (object_class, PROP_INDICATOR_SIZE, g_param_spec_int ("indicator-size", P_("Indicator size"), P_("Size of check or radio indicator"), 0, G_MAXINT, TOGGLE_WIDTH, GTK_PARAM_READWRITE)); /** * GtkCellRendererToggle::toggled: * @cell_renderer: the object which received the signal * @path: string representation of #GtkTreePath describing the * event location * * The ::toggled signal is emitted when the cell is toggled. * * It is the responsibility of the application to update the model * with the correct value to store at @path. Often this is simply the
static void sch_output_stream_class_init(gpointer g_class, gpointer g_class_data) { GObjectClass *klasse = G_OBJECT_CLASS(g_class); g_type_class_add_private(klasse, sizeof(SchOutputStreamPrivate)); klasse->get_property = sch_output_stream_get_property; klasse->set_property = sch_output_stream_set_property; g_object_class_install_property( klasse, SCH_OUTPUT_STREAM_BASE_STREAM, g_param_spec_object( "base-stream", "Base Stream", "Base Stream", G_TYPE_OUTPUT_STREAM, G_PARAM_LAX_VALIDATION | G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS ) ); #if 0 g_object_class_install_property( klasse, SCH_OUTPUT_STREAM_Y1, g_param_spec_int( "y1", "Y1", "Y1", G_MININT, G_MAXINT, 0, G_PARAM_LAX_VALIDATION | G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS ) ); g_object_class_install_property( klasse, SCH_OUTPUT_STREAM_X2, g_param_spec_int( "x2", "X2", "X2", G_MININT, G_MAXINT, 0, G_PARAM_LAX_VALIDATION | G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS ) ); g_object_class_install_property( klasse, SCH_OUTPUT_STREAM_Y2, g_param_spec_int( "y2", "Y2", "Y2", G_MININT, G_MAXINT, 0, G_PARAM_LAX_VALIDATION | G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS ) ); g_object_class_install_property( klasse, SCH_OUTPUT_STREAM_COLOR, g_param_spec_int( "color", "Color", "Color", 0, /*COLOR_MIN,*/ 31, /*COLOR_MAX,*/ 3, /*COLOR_GRAPHIC,*/ G_PARAM_LAX_VALIDATION | G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS ) ); g_object_class_install_property( klasse, SCH_OUTPUT_STREAM_WIDTH, g_param_spec_int( "line-width", "Line Width", "Line Width", 0, G_MAXINT, 0, G_PARAM_LAX_VALIDATION | G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS ) ); g_object_class_install_property( klasse, SCH_OUTPUT_STREAM_CAP_STYLE, g_param_spec_int( "line-cap-style", "Line Cap Style", "Line Cap Style", 0, 2, 0, G_PARAM_LAX_VALIDATION | G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS ) ); g_object_class_install_property( klasse, SCH_OUTPUT_STREAM_DASH_STYLE, g_param_spec_int( "line-dash-style", "Line dash Style", "Line dash Style", 0, 4, 0, G_PARAM_LAX_VALIDATION | G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS ) ); g_object_class_install_property( klasse, SCH_OUTPUT_STREAM_DASH_LENGTH, g_param_spec_int( "line-dash-length", "Line Dash Length", "Line Dash Length", -1, G_MAXINT, -1, G_PARAM_LAX_VALIDATION | G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS ) ); g_object_class_install_property( klasse, SCH_OUTPUT_STREAM_DASH_SPACE, g_param_spec_int( "line-dash-space", "Line Dash Space", "Line Dash Space", -1, G_MAXINT, -1, G_PARAM_LAX_VALIDATION | G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS ) ); #endif }
static JSBool param_new_internal(JSContext *cx, unsigned argc, jsval *vp) { jsval *argv = JS_ARGV(cx, vp); GParamSpec *pspec = NULL; JSBool ret = JS_FALSE; gchar *method_name; gchar *prop_name; JSObject *prop_gtype_jsobj; GType prop_gtype; GType prop_type; gchar *nick; gchar *blurb; GParamFlags flags; if (!gjs_parse_args(cx, "GObject.ParamSpec._new_internal", "!sossi", argc, argv, "prop_name", &prop_name, "prop_gtype", &prop_gtype_jsobj, "nick", &nick, "blurb", &blurb, "flags", &flags)) return JS_FALSE; prop_gtype = gjs_gtype_get_actual_gtype(cx, prop_gtype_jsobj); prop_type = G_TYPE_FUNDAMENTAL(prop_gtype); method_name = g_strdup_printf("GObject.ParamSpec.%s", g_type_name(prop_type)); argv += 5; argc -= 5; switch (prop_type) { case G_TYPE_UCHAR: case G_TYPE_CHAR: { gchar *minimum, *maximum, *default_value; if (!gjs_parse_args(cx, method_name, "sss", argc, argv, "minimum", &minimum, "maximum", &maximum, "default_value", &default_value)) goto out; if (prop_type == G_TYPE_CHAR) pspec = g_param_spec_char(prop_name, nick, blurb, minimum[0], maximum[0], default_value[0], flags); else pspec = g_param_spec_uchar(prop_name, nick, blurb, minimum[0], maximum[0], default_value[0], flags); g_free(minimum); g_free(maximum); g_free(default_value); } break; case G_TYPE_INT: case G_TYPE_UINT: case G_TYPE_LONG: case G_TYPE_ULONG: case G_TYPE_INT64: case G_TYPE_UINT64: { gint64 minimum, maximum, default_value; if (!gjs_parse_args(cx, method_name, "ttt", argc, argv, "minimum", &minimum, "maximum", &maximum, "default_value", &default_value)) goto out; switch (prop_type) { case G_TYPE_INT: pspec = g_param_spec_int(prop_name, nick, blurb, minimum, maximum, default_value, flags); break; case G_TYPE_UINT: pspec = g_param_spec_uint(prop_name, nick, blurb, minimum, maximum, default_value, flags); break; case G_TYPE_LONG: pspec = g_param_spec_long(prop_name, nick, blurb, minimum, maximum, default_value, flags); break; case G_TYPE_ULONG: pspec = g_param_spec_ulong(prop_name, nick, blurb, minimum, maximum, default_value, flags); break; case G_TYPE_INT64: pspec = g_param_spec_int64(prop_name, nick, blurb, minimum, maximum, default_value, flags); break; case G_TYPE_UINT64: pspec = g_param_spec_uint64(prop_name, nick, blurb, minimum, maximum, default_value, flags); break; } } break; case G_TYPE_BOOLEAN: { gboolean default_value; if (!gjs_parse_args(cx, method_name, "b", argc, argv, "default_value", &default_value)) goto out; default_value = JSVAL_TO_BOOLEAN(argv[0]); pspec = g_param_spec_boolean(prop_name, nick, blurb, default_value, flags); } break; case G_TYPE_ENUM: { JSObject *gtype_jsobj; GType gtype; GIEnumInfo *info; gint64 default_value; if (!gjs_parse_args(cx, method_name, "ot", argc, argv, "gtype", >ype_jsobj, "default_value", &default_value)) goto out; gtype = gjs_gtype_get_actual_gtype(cx, gtype_jsobj); if (gtype == G_TYPE_NONE) { gjs_throw(cx, "Passed invalid GType to GParamSpecEnum constructor"); goto out; } info = g_irepository_find_by_gtype(g_irepository_get_default(), gtype); if (!_gjs_enum_value_is_valid(cx, info, default_value)) goto out; pspec = g_param_spec_enum(prop_name, nick, blurb, gtype, default_value, flags); } break; case G_TYPE_FLAGS: { JSObject *gtype_jsobj; GType gtype; gint64 default_value; if (!gjs_parse_args(cx, method_name, "ot", argc, argv, "gtype", >ype_jsobj, "default_value", &default_value)) goto out; gtype = gjs_gtype_get_actual_gtype(cx, gtype_jsobj); if (gtype == G_TYPE_NONE) { gjs_throw(cx, "Passed invalid GType to GParamSpecFlags constructor"); goto out; } if (!_gjs_flags_value_is_valid(cx, gtype, default_value)) goto out; pspec = g_param_spec_flags(prop_name, nick, blurb, gtype, default_value, flags); } break; case G_TYPE_FLOAT: case G_TYPE_DOUBLE: { gfloat minimum, maximum, default_value; if (!gjs_parse_args(cx, "GObject.ParamSpec.float", "fff", argc, argv, "minimum", &minimum, "maximum", &maximum, "default_value", &default_value)) goto out; if (prop_type == G_TYPE_FLOAT) pspec = g_param_spec_float(prop_name, nick, blurb, minimum, maximum, default_value, flags); else pspec = g_param_spec_double(prop_name, nick, blurb, minimum, maximum, default_value, flags); } break; case G_TYPE_STRING: { gchar *default_value; if (!gjs_parse_args(cx, method_name, "s", argc, argv, "default_value", &default_value)) goto out; pspec = g_param_spec_string(prop_name, nick, blurb, default_value, flags); g_free (default_value); } break; case G_TYPE_PARAM: pspec = g_param_spec_param(prop_name, nick, blurb, prop_type, flags); break; case G_TYPE_BOXED: pspec = g_param_spec_boxed(prop_name, nick, blurb, prop_type, flags); break; case G_TYPE_POINTER: pspec = g_param_spec_pointer(prop_name, nick, blurb, flags); break; case G_TYPE_OBJECT: pspec = g_param_spec_object(prop_name, nick, blurb, prop_type, flags); break; default: gjs_throw(cx, "Could not create param spec for type '%s'", g_type_name(prop_gtype)); goto out; } ret = JS_TRUE; jsval foo = OBJECT_TO_JSVAL(gjs_param_from_g_param(cx, pspec)); JS_SET_RVAL(cx, vp, foo); out: g_free(method_name); g_free(prop_name); g_free(nick); g_free(blurb); return ret; }
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->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, "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.", NULL, G_PARAM_READWRITE)); /** * 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, "Username", "Username used to authenticate with the network, if " "required. Note that many providers do not require " "a username or accept any username.", NULL, G_PARAM_READWRITE)); /** * 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, "Password", "Password used to authenticate with the network, if " "required. Note that many providers do not require " "a password or accept any password.", NULL, G_PARAM_READWRITE | NM_SETTING_PARAM_SECRET)); /** * NMSettingGsm:password-flags: * * Flags indicating how to handle #NMSettingGsm:password:. **/ g_object_class_install_property (object_class, PROP_PASSWORD_FLAGS, g_param_spec_uint (NM_SETTING_GSM_PASSWORD_FLAGS, "Password Flags", "Flags indicating how to handle the GSM password.", NM_SETTING_SECRET_FLAG_NONE, NM_SETTING_SECRET_FLAGS_ALL, NM_SETTING_SECRET_FLAG_NONE, G_PARAM_READWRITE)); /** * 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, "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.", NULL, G_PARAM_READWRITE)); /** * 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, "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.", NULL, G_PARAM_READWRITE)); /** * NMSettingGsm:network-type: * * Network preference to force the device to only use specific network * technologies. Permitted values are those specified by * #NMSettingGsmNetworkType. Note that not all devices allow network * preference control. * * Deprecated: 0.9.10: No longer used. Network type setting should be done talking to ModemManager directly. **/ g_object_class_install_property (object_class, PROP_NETWORK_TYPE, g_param_spec_int (NM_SETTING_GSM_NETWORK_TYPE, "Network type", "Network preference to force the device to only use " "specific network technologies. The permitted values " "are: -1: any, 0: 3G only, 1: GPRS/EDGE only, " "2: prefer 3G, 3: prefer 2G, 4: prefer 4G/LTE, 5: 4G/LTE only. " "Notes: This property is deprecated and NetworkManager from 0.9.10 " "onwards doesn't use this property when talking to ModemManager." "Also, not all devices allow network preference control.", NM_SETTING_GSM_NETWORK_TYPE_ANY, NM_SETTING_GSM_NETWORK_TYPE_4G, NM_SETTING_GSM_NETWORK_TYPE_ANY, G_PARAM_READWRITE | G_PARAM_CONSTRUCT)); /** * NMSettingGsm:allowed-bands: * * Bitfield of allowed frequency bands. Note that not all devices allow * frequency band control. Permitted values are those specified by * #NMSettingGsmNetworkBand. * * Deprecated: 0.9.10: No longer used. Band setting should be done talking to ModemManager directly. **/ g_object_class_install_property (object_class, PROP_ALLOWED_BANDS, g_param_spec_uint (NM_SETTING_GSM_ALLOWED_BANDS, "Allowed Bands", "Bitfield of allowed frequency bands." "Notes: This property is deprecated and NetworkManager from 0.9.10 " "onwards doesn't use this property when talking to ModemManager." "Also, not all devices allow frequency band control.", NM_SETTING_GSM_BAND_UNKNOWN, NM_SETTING_GSM_BANDS_MAX, NM_SETTING_GSM_BAND_ANY, G_PARAM_READWRITE | G_PARAM_CONSTRUCT)); /** * 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, "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.", NULL, G_PARAM_READWRITE | NM_SETTING_PARAM_SECRET)); /** * NMSettingGsm:pin-flags: * * Flags indicating how to handle #NMSettingGsm:pin. **/ g_object_class_install_property (object_class, PROP_PIN_FLAGS, g_param_spec_uint (NM_SETTING_GSM_PIN_FLAGS, "PIN Flags", "Flags indicating how to handle the GSM SIM PIN.", NM_SETTING_SECRET_FLAG_NONE, NM_SETTING_SECRET_FLAGS_ALL, NM_SETTING_SECRET_FLAG_NONE, G_PARAM_READWRITE)); /** * 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, "Home Only", "When TRUE, only connections to the home network will " "be allowed. Connections to roaming networks will " "not be made.", FALSE, G_PARAM_READWRITE)); }
static void gst_aravis_class_init (GstAravisClass * klass) { GObjectClass *gobject_class = G_OBJECT_CLASS (klass); GstBaseSrcClass *gstbasesrc_class = GST_BASE_SRC_CLASS (klass); GstPushSrcClass *gstpushsrc_class = GST_PUSH_SRC_CLASS (klass); gobject_class->finalize = gst_aravis_finalize; gobject_class->set_property = gst_aravis_set_property; gobject_class->get_property = gst_aravis_get_property; g_object_class_install_property (gobject_class, PROP_CAMERA_NAME, g_param_spec_string ("camera-name", "Camera name", "Name of the camera", NULL, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); g_object_class_install_property (gobject_class, PROP_CAMERA, g_param_spec_object ("camera", "Camera Object", "Camera instance to retrieve additional information", ARV_TYPE_CAMERA, G_PARAM_READABLE | G_PARAM_STATIC_STRINGS)); g_object_class_install_property (gobject_class, PROP_GAIN, g_param_spec_double ("gain", "Gain", "Gain (dB)", -1.0, 500.0, 0.0, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); g_object_class_install_property (gobject_class, PROP_GAIN_AUTO, g_param_spec_boolean ("gain-auto", "Auto Gain", "Auto Gain Mode", TRUE, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); g_object_class_install_property (gobject_class, PROP_EXPOSURE, g_param_spec_double ("exposure", "Exposure", "Exposure time (µs)", -1, 100000000.0, 500.0, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); g_object_class_install_property (gobject_class, PROP_EXPOSURE_AUTO, g_param_spec_boolean ("exposure-auto", "Auto Exposure", "Auto Exposure Mode", TRUE, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); g_object_class_install_property (gobject_class, PROP_OFFSET_X, g_param_spec_int ("offset-x", "x Offset", "Offset in x direction", 0, G_MAXINT, 0, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); g_object_class_install_property (gobject_class, PROP_OFFSET_Y, g_param_spec_int ("offset-y", "y Offset", "Offset in y direction", 0, G_MAXINT, 0, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); g_object_class_install_property (gobject_class, PROP_H_BINNING, g_param_spec_int ("h-binning", "Horizontal binning", "CCD horizontal binning", 1, G_MAXINT, 1, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); g_object_class_install_property (gobject_class, PROP_V_BINNING, g_param_spec_int ("v-binning", "Vertical binning", "CCD vertical binning", 1, G_MAXINT, 1, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); GST_DEBUG_CATEGORY_INIT (aravis_debug, "aravissrc", 0, "Aravis interface"); gstbasesrc_class->get_caps = gst_aravis_get_caps; gstbasesrc_class->set_caps = gst_aravis_set_caps; gstbasesrc_class->start = gst_aravis_start; gstbasesrc_class->stop = gst_aravis_stop; gstbasesrc_class->get_times = gst_aravis_get_times; gstpushsrc_class->create = gst_aravis_create; }
object_class->set_property = pixbuf_set_property; object_class->get_property = pixbuf_get_property; ecc->new_view = pixbuf_new_view; ecc->kill_view = pixbuf_kill_view; ecc->draw = pixbuf_draw; ecc->event = pixbuf_event; ecc->height = pixbuf_height; ecc->print = pixbuf_print; ecc->print_height = pixbuf_print_height; ecc->max_width = pixbuf_max_width; g_object_class_install_property (object_class, PROP_SELECTED_COLUMN, g_param_spec_int ("selected_column", "Selected Column", NULL, 0, G_MAXINT, 0, G_PARAM_READWRITE)); g_object_class_install_property (object_class, PROP_FOCUSED_COLUMN, g_param_spec_int ("focused_column", "Focused Column", NULL, 0, G_MAXINT, 0, G_PARAM_READWRITE)); g_object_class_install_property (object_class, PROP_UNSELECTED_COLUMN, g_param_spec_int ("unselected_column", "Unselected Column", NULL, 0, G_MAXINT, 0,
static void mex_content_box_class_init (MexContentBoxClass *klass) { GParamSpec *pspec; GObjectClass *object_class = G_OBJECT_CLASS (klass); ClutterActorClass *actor_class = CLUTTER_ACTOR_CLASS (klass); g_type_class_add_private (klass, sizeof (MexContentBoxPrivate)); object_class->get_property = mex_content_box_get_property; object_class->set_property = mex_content_box_set_property; object_class->dispose = mex_content_box_dispose; object_class->finalize = mex_content_box_finalize; actor_class->paint = mex_content_box_paint; actor_class->get_paint_volume = mex_content_box_get_paint_volume; actor_class->map = mex_content_box_map; actor_class->unmap = mex_content_box_unmap; pspec = g_param_spec_string ("media-url", "Media URL", "URL for the media this box represents.", NULL, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS); g_object_class_install_property (object_class, PROP_MEDIA_URL, pspec); pspec = g_param_spec_string ("logo-url", "Logo URL", "URL for the logo of the provider for this " "content", NULL, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS); g_object_class_install_property (object_class, PROP_LOGO_URL, pspec); pspec = g_param_spec_int ("thumb-width", "Thumbnail width", "Scale the width of the thumbnail while loading.", -1, G_MAXINT, 426, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS); g_object_class_install_property (object_class, PROP_THUMB_WIDTH, pspec); pspec = g_param_spec_int ("thumb-height", "Thumbnail height", "Scale the height of the thumbnail while loading.", -1, G_MAXINT, 240, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS); g_object_class_install_property (object_class, PROP_THUMB_HEIGHT, pspec); signals[GOT_THUMB] = g_signal_new ("got-thumb", G_TYPE_FROM_CLASS (klass), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (MexContentBoxClass, got_thumb), NULL, NULL, g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0); }
static void gst_openjpeg_enc_class_init (GstOpenJPEGEncClass * klass) { GObjectClass *gobject_class; GstElementClass *element_class; GstVideoEncoderClass *video_encoder_class; gobject_class = (GObjectClass *) klass; element_class = (GstElementClass *) klass; video_encoder_class = (GstVideoEncoderClass *) klass; gobject_class->set_property = gst_openjpeg_enc_set_property; gobject_class->get_property = gst_openjpeg_enc_get_property; g_object_class_install_property (gobject_class, PROP_NUM_LAYERS, g_param_spec_int ("num-layers", "Number of layers", "Number of layers", 1, 10, DEFAULT_NUM_LAYERS, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); g_object_class_install_property (gobject_class, PROP_NUM_RESOLUTIONS, g_param_spec_int ("num-resolutions", "Number of resolutions", "Number of resolutions", 1, 10, DEFAULT_NUM_RESOLUTIONS, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); g_object_class_install_property (gobject_class, PROP_PROGRESSION_ORDER, g_param_spec_enum ("progression-order", "Progression Order", "Progression order", GST_OPENJPEG_ENC_TYPE_PROGRESSION_ORDER, DEFAULT_PROGRESSION_ORDER, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); g_object_class_install_property (gobject_class, PROP_TILE_OFFSET_X, g_param_spec_int ("tile-offset-x", "Tile Offset X", "Tile Offset X", G_MININT, G_MAXINT, DEFAULT_TILE_OFFSET_X, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); g_object_class_install_property (gobject_class, PROP_TILE_OFFSET_Y, g_param_spec_int ("tile-offset-y", "Tile Offset Y", "Tile Offset Y", G_MININT, G_MAXINT, DEFAULT_TILE_OFFSET_Y, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); g_object_class_install_property (gobject_class, PROP_TILE_WIDTH, g_param_spec_int ("tile-width", "Tile Width", "Tile Width", 0, G_MAXINT, DEFAULT_TILE_WIDTH, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); g_object_class_install_property (gobject_class, PROP_TILE_HEIGHT, g_param_spec_int ("tile-height", "Tile Height", "Tile Height", 0, G_MAXINT, DEFAULT_TILE_HEIGHT, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); gst_element_class_add_pad_template (element_class, gst_static_pad_template_get (&gst_openjpeg_enc_src_template)); gst_element_class_add_pad_template (element_class, gst_static_pad_template_get (&gst_openjpeg_enc_sink_template)); gst_element_class_set_static_metadata (element_class, "OpenJPEG JPEG2000 encoder", "Codec/Encoder/Video", "Encode JPEG2000 streams", "Sebastian Dröge <*****@*****.**>"); video_encoder_class->start = GST_DEBUG_FUNCPTR (gst_openjpeg_enc_start); video_encoder_class->stop = GST_DEBUG_FUNCPTR (gst_openjpeg_enc_stop); video_encoder_class->set_format = GST_DEBUG_FUNCPTR (gst_openjpeg_enc_set_format); video_encoder_class->handle_frame = GST_DEBUG_FUNCPTR (gst_openjpeg_enc_handle_frame); video_encoder_class->propose_allocation = gst_openjpeg_enc_propose_allocation; GST_DEBUG_CATEGORY_INIT (gst_openjpeg_enc_debug, "openjpegenc", 0, "OpenJPEG Encoder"); }
PROP_ENABLED, g_param_spec_boolean ("enabled", "Activeness", "The active state of the breakpoint", FALSE, G_PARAM_READWRITE) ); g_object_class_install_property (object_class, PROP_CONDITION, g_param_spec_string ("condition", "Breakpoint condition", "Whether a brealpoint has a condition", FALSE, G_PARAM_READWRITE) ); g_object_class_install_property (object_class, PROP_HITSCOUNT, g_param_spec_int ( "hitscount", "Breakpoint hitscount", "Number of passes to wait until stop at a breakpoint", G_MININT, G_MAXINT, 0, G_PARAM_READWRITE ) ); clicked_signal = g_signal_new ("clicked", G_OBJECT_CLASS_TYPE (object_class), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (CellRendererBreakIconClass, clicked), NULL, NULL, g_cclosure_marshal_VOID__STRING, G_TYPE_NONE, 1, G_TYPE_STRING); }
static void gst_ks_video_src_class_init (GstKsVideoSrcClass * klass) { GObjectClass *gobject_class = G_OBJECT_CLASS (klass); GstElementClass *gstelement_class = GST_ELEMENT_CLASS (klass); GstBaseSrcClass *gstbasesrc_class = GST_BASE_SRC_CLASS (klass); GstPushSrcClass *gstpushsrc_class = GST_PUSH_SRC_CLASS (klass); g_type_class_add_private (klass, sizeof (GstKsVideoSrcPrivate)); parent_class = g_type_class_peek_parent (klass); gst_element_class_set_static_metadata (gstelement_class, "KsVideoSrc", "Source/Video", "Stream data from a video capture device through Windows kernel streaming", "Ole André Vadla Ravnås <*****@*****.**>\n" "Haakon Sporsheim <*****@*****.**>\n" "Andres Colubri <*****@*****.**>"); gst_element_class_add_pad_template (gstelement_class, gst_pad_template_new ("src", GST_PAD_SRC, GST_PAD_ALWAYS, ks_video_get_all_caps ())); gobject_class->finalize = gst_ks_video_src_finalize; gobject_class->get_property = gst_ks_video_src_get_property; gobject_class->set_property = gst_ks_video_src_set_property; gstelement_class->change_state = GST_DEBUG_FUNCPTR (gst_ks_video_src_change_state); gstelement_class->set_clock = GST_DEBUG_FUNCPTR (gst_ks_video_src_set_clock); gstbasesrc_class->get_caps = GST_DEBUG_FUNCPTR (gst_ks_video_src_get_caps); gstbasesrc_class->set_caps = GST_DEBUG_FUNCPTR (gst_ks_video_src_set_caps); gstbasesrc_class->fixate = GST_DEBUG_FUNCPTR (gst_ks_video_src_fixate); gstbasesrc_class->query = GST_DEBUG_FUNCPTR (gst_ks_video_src_query); gstbasesrc_class->unlock = GST_DEBUG_FUNCPTR (gst_ks_video_src_unlock); gstbasesrc_class->unlock_stop = GST_DEBUG_FUNCPTR (gst_ks_video_src_unlock_stop); gstpushsrc_class->create = GST_DEBUG_FUNCPTR (gst_ks_video_src_create); g_object_class_install_property (gobject_class, PROP_DEVICE_PATH, g_param_spec_string ("device-path", "Device Path", "The device path", DEFAULT_DEVICE_PATH, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); g_object_class_install_property (gobject_class, PROP_DEVICE_NAME, g_param_spec_string ("device-name", "Device Name", "The human-readable device name", DEFAULT_DEVICE_NAME, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); g_object_class_install_property (gobject_class, PROP_DEVICE_INDEX, g_param_spec_int ("device-index", "Device Index", "The zero-based device index", -1, G_MAXINT, DEFAULT_DEVICE_INDEX, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); g_object_class_install_property (gobject_class, PROP_DO_STATS, g_param_spec_boolean ("do-stats", "Enable statistics", "Enable logging of statistics", DEFAULT_DO_STATS, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); g_object_class_install_property (gobject_class, PROP_FPS, g_param_spec_int ("fps", "Frames per second", "Last measured framerate, if statistics are enabled", -1, G_MAXINT, -1, G_PARAM_READABLE | G_PARAM_STATIC_STRINGS)); g_object_class_install_property (gobject_class, PROP_ENABLE_QUIRKS, g_param_spec_boolean ("enable-quirks", "Enable quirks", "Enable driver-specific quirks", DEFAULT_ENABLE_QUIRKS, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); }
static void gtk_source_gutter_class_init (GtkSourceGutterClass *klass) { GObjectClass *object_class = G_OBJECT_CLASS (klass); object_class->set_property = gtk_source_gutter_set_property; object_class->get_property = gtk_source_gutter_get_property; object_class->finalize = gtk_source_gutter_finalize; object_class->dispose = gtk_source_gutter_dispose; object_class->constructed = gtk_source_gutter_constructed; /** * GtkSourceGutter:view: * * The #GtkSourceView of the gutter */ g_object_class_install_property (object_class, PROP_VIEW, g_param_spec_object ("view", _("View"), _("The gutters' GtkSourceView"), GTK_SOURCE_TYPE_VIEW, G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY)); /** * GtkSourceGutter:window-type: * * The text window type on which the window is placed */ g_object_class_install_property (object_class, PROP_WINDOW_TYPE, g_param_spec_enum ("window_type", _("Window Type"), _("The gutters text window type"), GTK_TYPE_TEXT_WINDOW_TYPE, 0, G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY)); g_type_class_add_private (object_class, sizeof(GtkSourceGutterPrivate)); g_object_class_install_property (object_class, PROP_XPAD, g_param_spec_int ("xpad", _("X Padding"), _("The x-padding"), -1, G_MAXINT, 0, G_PARAM_READWRITE | G_PARAM_CONSTRUCT)); g_object_class_install_property (object_class, PROP_YPAD, g_param_spec_int ("ypad", _("Y Padding"), _("The y-padding"), -1, G_MAXINT, 0, G_PARAM_READWRITE | G_PARAM_CONSTRUCT)); }
static void rhythmdb_property_model_class_init (RhythmDBPropertyModelClass *klass) { GObjectClass *object_class = G_OBJECT_CLASS (klass); if (!rhythmdb_property_model_artist_drag_target_list) rhythmdb_property_model_artist_drag_target_list = gtk_target_list_new (targets_artist, G_N_ELEMENTS (targets_artist)); if (!rhythmdb_property_model_album_drag_target_list) rhythmdb_property_model_album_drag_target_list = gtk_target_list_new (targets_album, G_N_ELEMENTS (targets_album)); if (!rhythmdb_property_model_genre_drag_target_list) rhythmdb_property_model_genre_drag_target_list = gtk_target_list_new (targets_genre, G_N_ELEMENTS (targets_genre)); if (!rhythmdb_property_model_location_drag_target_list) rhythmdb_property_model_location_drag_target_list = gtk_target_list_new (targets_location, G_N_ELEMENTS (targets_location)); object_class->set_property = rhythmdb_property_model_set_property; object_class->get_property = rhythmdb_property_model_get_property; object_class->dispose = rhythmdb_property_model_dispose; object_class->finalize = rhythmdb_property_model_finalize; /** * RhythmDBPropertyModel::pre-row-deletion: * @model: the #RhythmDBPropertyModel * * Emitted just before a row is deleted from the model. */ rhythmdb_property_model_signals[PRE_ROW_DELETION] = g_signal_new ("pre-row-deletion", G_OBJECT_CLASS_TYPE (object_class), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (RhythmDBPropertyModelClass, pre_row_deletion), NULL, NULL, g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0); /** * RhythmDBPropertyModel:db: * * The #RhythmDB object the model is associated with. */ g_object_class_install_property (object_class, PROP_RHYTHMDB, g_param_spec_object ("db", "RhythmDB", "RhythmDB object", RHYTHMDB_TYPE, G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY)); /** * RhythmDBPropertyModel:prop: * * The property that this property model indexes. */ g_object_class_install_property (object_class, PROP_PROP, g_param_spec_int ("prop", "propid", "Property id", 0, RHYTHMDB_NUM_PROPERTIES, RHYTHMDB_PROP_TYPE, G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY)); /** * RhythmDBPropertyModel:query-model: * * The query model that this property model indexes. */ g_object_class_install_property (object_class, PROP_QUERY_MODEL, g_param_spec_object ("query-model", "RhythmDBQueryModel", "RhythmDBQueryModel object ", RHYTHMDB_TYPE_QUERY_MODEL, G_PARAM_READWRITE)); g_type_class_add_private (klass, sizeof (RhythmDBPropertyModelPrivate)); }
static void mame_gui_prefs_class_init (MameGuiPrefsClass *klass) { GObjectClass *object_class = G_OBJECT_CLASS (klass); object_class->set_property = mame_gui_prefs_set_property; object_class->get_property = mame_gui_prefs_get_property; object_class->finalize = mame_gui_prefs_finalize; /* UI preferences */ g_object_class_install_property (object_class, PROP_UI_WIDTH, g_param_spec_int ("ui-width", "Window Width", "Width of the main window", 0, 2000, 800, G_PARAM_READWRITE)); g_object_class_install_property (object_class, PROP_UI_HEIGHT, g_param_spec_int ("ui-height", "Window Height", "Height of the main window", 0, 2000, 600, G_PARAM_READWRITE)); g_object_class_install_property (object_class, PROP_SHOW_TOOLBAR, g_param_spec_boolean ("show-toolbar", "Show Toolbar", "Show the main toolbar", TRUE, G_PARAM_READWRITE)); g_object_class_install_property (object_class, PROP_SHOW_STATUSBAR, g_param_spec_boolean ("show-statusbar", "Show Statusbar", "Show the statusbar", TRUE, G_PARAM_READWRITE)); g_object_class_install_property (object_class, PROP_SHOW_FILTERLIST, g_param_spec_boolean ("show-filterlist", "Show Filter List", "Show the filters", TRUE, G_PARAM_READWRITE)); g_object_class_install_property (object_class, PROP_SHOW_SCREENSHOT, g_param_spec_boolean ("show-screenshot", "Show Sidebar", "Show the screenshot sidebar", TRUE, G_PARAM_READWRITE)); g_object_class_install_property (object_class, PROP_CURRENT_ROMFILTER, g_param_spec_int ("current-rom-filter", "Current ROM filter", "Current ROM filter", 0, 2, 0, G_PARAM_READWRITE)); g_object_class_install_property (object_class, PROP_CURRENT_MODE, g_param_spec_int ("current-mode", "Current Mode", "Current Mode", LIST, DETAILS, DETAILS, G_PARAM_READWRITE)); g_object_class_install_property (object_class, PROP_PREVIOUS_MODE, g_param_spec_int ("previous-mode", "Previous Mode", "Previous Mode", LIST, DETAILS, LIST, G_PARAM_READWRITE)); g_object_class_install_property (object_class, PROP_COLS_SHOWN, g_param_spec_value_array ("cols-shown", "Columns Shown", "Which Columns Are Shown or Hidden", NULL, G_PARAM_READWRITE)); g_object_class_install_property (object_class, PROP_COLS_WIDTH, g_param_spec_value_array ("cols-width", "Column Width", "Width of Each Column", NULL, G_PARAM_READWRITE)); g_object_class_install_property (object_class, PROP_SORT_COL, g_param_spec_int ("sort-col", "Sort Column", "Sort column", 0, NUMBER_COLUMN, GAMENAME, G_PARAM_READWRITE)); g_object_class_install_property (object_class, PROP_SORT_COL_DIR, g_param_spec_int ("sort-col-direction", "Sort Column Direction", "Direction in which column data is sorted", GTK_SORT_ASCENDING, GTK_SORT_DESCENDING, GTK_SORT_ASCENDING, G_PARAM_READWRITE)); g_object_class_install_property (object_class, PROP_XPOS_FILTERS, g_param_spec_int ("xpos-filters", "Filters Xpos", "X position of the filters hpaned", 0, 1000, 150, G_PARAM_READWRITE)); g_object_class_install_property (object_class, PROP_XPOS_GAMELIST, g_param_spec_int ("xpos-gamelist", "Gamelist Xpos", "X position of the gamelist hpaned", 0, 1000, 500, G_PARAM_READWRITE)); /* Startup preferences */ g_object_class_install_property (object_class, PROP_GAMECHECK, g_param_spec_boolean ("gamecheck", "Game Check", "Check for games on startup", TRUE, G_PARAM_READWRITE)); g_object_class_install_property (object_class, PROP_VERSIONCHECK, g_param_spec_boolean ("versioncheck", "Version Check", "Check for new version on startup", TRUE, G_PARAM_READWRITE)); g_object_class_install_property (object_class, PROP_USEXMAMEOPTIONS, g_param_spec_boolean ("usexmameoptions", "Use MAME Options", "Use MAME options, rather than those set in GMAMEUI", FALSE, G_PARAM_READWRITE)); g_object_class_install_property (object_class, PROP_PREFERCUSTOMICONS, g_param_spec_boolean ("prefercustomicons", "Prefer custom icons", "Prefer custom icons over status icons", FALSE, G_PARAM_READWRITE)); g_object_class_install_property (object_class, PROP_USEJOYINGUI, g_param_spec_boolean ("usejoyingui", "Use Joystick in GUI", "Use the joystick to navigate in GMAMEUI", 0, G_PARAM_READWRITE)); g_object_class_install_property (object_class, PROP_JOYSTICKNAME, g_param_spec_string ("joystick-name", "Joystick Name", "Device name of the joystick", "/dev/js0", G_PARAM_READWRITE)); /* Miscellaneous preferences */ g_object_class_install_property (object_class, PROP_THEPREFIX, g_param_spec_boolean ("theprefix", "Display 'The'", "Display 'The' as a prefix in the gamelist", TRUE, G_PARAM_READWRITE)); g_object_class_install_property (object_class, PROP_CURRENT_ROM, g_param_spec_string ("current-rom", "Current Rom", "The currently selected ROM", NULL, G_PARAM_READWRITE)); g_object_class_install_property (object_class, PROP_CURRENT_EXECUTABLE, g_param_spec_string ("current-executable", "Current executable", "The currently selected MAME executable", NULL, G_PARAM_READWRITE)); g_object_class_install_property (object_class, PROP_EXECUTABLE_PATHS, g_param_spec_value_array ("executable-paths", "Executable Paths", "Paths to the MAME executables", NULL, G_PARAM_READWRITE)); g_object_class_install_property (object_class, PROP_ROM_PATHS, g_param_spec_value_array ("rom-paths", "ROM Paths", "Directories containing MAME ROMs", NULL, G_PARAM_READWRITE)); g_object_class_install_property (object_class, PROP_SAMPLE_PATHS, g_param_spec_value_array ("sample-paths", "Sample Paths", "Directories containing MAME samples", NULL, G_PARAM_READWRITE)); /* Directory preferences */ int i; /* Used for walking the directory_prefs struct array */ for (i = 0; i < NUM_DIRS; i++) { /*GMAMEUI_DEBUG ("Installing new property %s with id %d", directory_prefs[i].name, directory_prefs[i].prop_id);*/ g_object_class_install_property (object_class, directory_prefs[i].prop_id, g_param_spec_string (directory_prefs[i].name, "", "", directory_prefs[i].default_dir, G_PARAM_READWRITE)); } /* Signal emitted when a column is toggled */ signals[GUI_PREFS_COL_TOGGLED] = g_signal_new ("col-toggled", G_OBJECT_CLASS_TYPE (object_class), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (MameGuiPrefsClass, col_toggled), NULL, NULL, /* Accumulator and accumulator data */ gmameui_marshaller_VOID__POINTER, G_TYPE_NONE, /* Return type */ 1, G_TYPE_INT); /* Signal emitted when the prefix is toggled */ signals[GUI_PREFS_THEPREFIX_TOGGLED] = g_signal_new ("theprefix-toggled", G_OBJECT_CLASS_TYPE (object_class), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (MameGuiPrefsClass, theprefix_toggled), NULL, NULL, /* Accumulator and accumulator data */ gmameui_marshaller_VOID__BOOLEAN, G_TYPE_NONE, /* Return type */ 1, G_TYPE_BOOLEAN); /* Signal emitted when custom icon preference is toggled */ signals[GUI_PREFS_PREFERCUSTOMICONS_TOGGLED] = g_signal_new ("prefercustomicons-toggled", G_OBJECT_CLASS_TYPE (object_class), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (MameGuiPrefsClass, prefercustomicons_toggled), NULL, NULL, /* Accumulator and accumulator data */ gmameui_marshaller_VOID__BOOLEAN, G_TYPE_NONE, /* Return type */ 1, G_TYPE_BOOLEAN); }
g_object_class_install_property (gobject_class, PROP_STORAGE_TYPE, g_param_spec_enum ("storage-type", P_("Storage type"), P_("The representation being used for image data"), GTK_TYPE_IMAGE_TYPE, GTK_IMAGE_EMPTY, GTK_PARAM_READABLE)); g_object_class_install_property (gobject_class, PROP_SIZE, g_param_spec_int ("size", P_("Size"), P_("The size of the icon"), 0, G_MAXINT, 0, GTK_PARAM_READABLE)); g_object_class_install_property (gobject_class, PROP_BLINKING, g_param_spec_boolean ("blinking", P_("Blinking"), P_("Whether or not the status icon is blinking"), FALSE, GTK_PARAM_READWRITE)); g_object_class_install_property (gobject_class, PROP_VISIBLE, g_param_spec_boolean ("visible",
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->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_uint (NM_SETTING_GSM_PASSWORD_FLAGS, "", "", NM_SETTING_SECRET_FLAG_NONE, NM_SETTING_SECRET_FLAGS_ALL, 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:network-type: * * Network preference to force the device to only use specific network * technologies. The permitted values are %NM_SETTING_GSM_NETWORK_TYPE_ANY, * %NM_SETTING_GSM_NETWORK_TYPE_UMTS_HSPA, * %NM_SETTING_GSM_NETWORK_TYPE_GPRS_EDGE, * %NM_SETTING_GSM_NETWORK_TYPE_PREFER_UMTS_HSPA, * %NM_SETTING_GSM_NETWORK_TYPE_PREFER_GPRS_EDGE, * %NM_SETTING_GSM_NETWORK_TYPE_PREFER_4G, and * %NM_SETTING_GSM_NETWORK_TYPE_4G. Note that not all devices allow network * preference control. * * Deprecated: 0.9.10: No longer used. Network type setting should be done * by talking to ModemManager directly. **/ g_object_class_install_property (object_class, PROP_NETWORK_TYPE, g_param_spec_int (NM_SETTING_GSM_NETWORK_TYPE, "", "", NM_SETTING_GSM_NETWORK_TYPE_ANY, NM_SETTING_GSM_NETWORK_TYPE_4G, NM_SETTING_GSM_NETWORK_TYPE_ANY, G_PARAM_READWRITE | G_PARAM_CONSTRUCT | G_PARAM_STATIC_STRINGS)); /** * NMSettingGsm:allowed-bands: * * Bitfield of allowed frequency bands. Note that not all devices allow * frequency band control. Permitted values are those specified by * #NMSettingGsmNetworkBand. * * Deprecated: 0.9.10: No longer used. Band setting should be done by * talking to ModemManager directly. **/ g_object_class_install_property (object_class, PROP_ALLOWED_BANDS, g_param_spec_uint (NM_SETTING_GSM_ALLOWED_BANDS, "", "", NM_SETTING_GSM_BAND_UNKNOWN, NM_SETTING_GSM_BANDS_MAX, NM_SETTING_GSM_BAND_ANY, G_PARAM_READWRITE | G_PARAM_CONSTRUCT | 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_uint (NM_SETTING_GSM_PIN_FLAGS, "", "", NM_SETTING_SECRET_FLAG_NONE, NM_SETTING_SECRET_FLAGS_ALL, 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)); }
g_object_class_install_property (object_class, PROP_VARIANT, g_param_spec_enum ("variant", _("Font variant"), _("Font variant"), PANGO_TYPE_VARIANT, PANGO_VARIANT_NORMAL, G_PARAM_READABLE | G_PARAM_WRITABLE)); g_object_class_install_property (object_class, PROP_WEIGHT, g_param_spec_int ("weight", _("Font weight"), _("Font weight"), 0, G_MAXINT, PANGO_WEIGHT_NORMAL, G_PARAM_READABLE | G_PARAM_WRITABLE)); g_object_class_install_property (object_class, PROP_STRETCH, g_param_spec_enum ("stretch", _("Font stretch"), _("Font stretch"), PANGO_TYPE_STRETCH, PANGO_STRETCH_NORMAL, G_PARAM_READABLE | G_PARAM_WRITABLE)); g_object_class_install_property (object_class, PROP_SIZE,
static void gst_ffmpegvidenc_class_init (GstFFMpegVidEncClass * klass) { GObjectClass *gobject_class; GstVideoEncoderClass *venc_class; int caps; gobject_class = (GObjectClass *) klass; venc_class = (GstVideoEncoderClass *) klass; parent_class = g_type_class_peek_parent (klass); gobject_class->set_property = gst_ffmpegvidenc_set_property; gobject_class->get_property = gst_ffmpegvidenc_get_property; /* FIXME: could use -1 for a sensible per-codec default based on * e.g. input resolution and framerate */ g_object_class_install_property (G_OBJECT_CLASS (klass), PROP_BIT_RATE, g_param_spec_int ("bitrate", "Bit Rate", "Target Video Bitrate", 0, G_MAXINT, DEFAULT_VIDEO_BITRATE, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); g_object_class_install_property (G_OBJECT_CLASS (klass), PROP_GOP_SIZE, g_param_spec_int ("gop-size", "GOP Size", "Number of frames within one GOP", 0, G_MAXINT, DEFAULT_VIDEO_GOP_SIZE, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); g_object_class_install_property (G_OBJECT_CLASS (klass), PROP_ME_METHOD, g_param_spec_enum ("me-method", "ME Method", "Motion Estimation Method", GST_TYPE_ME_METHOD, ME_EPZS, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); g_object_class_install_property (G_OBJECT_CLASS (klass), PROP_BUFSIZE, g_param_spec_int ("buffer-size", "Buffer Size", "Size of the video buffers", 0, G_MAXINT, 0, G_PARAM_READABLE | G_PARAM_STATIC_STRINGS)); g_object_class_install_property (G_OBJECT_CLASS (klass), PROP_RTP_PAYLOAD_SIZE, g_param_spec_int ("rtp-payload-size", "RTP Payload Size", "Target GOB length", 0, G_MAXINT, 0, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); caps = klass->in_plugin->capabilities; if (caps & (CODEC_CAP_FRAME_THREADS | CODEC_CAP_SLICE_THREADS)) { g_object_class_install_property (G_OBJECT_CLASS (klass), PROP_MAX_THREADS, g_param_spec_int ("max-threads", "Maximum encode threads", "Maximum number of worker threads to spawn. (0 = auto)", 0, G_MAXINT, 0, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); } g_object_class_install_property (G_OBJECT_CLASS (klass), PROP_COMPLIANCE, g_param_spec_enum ("compliance", "Compliance", "Adherence of the encoder to the specifications", GST_TYPE_FFMPEG_COMPLIANCE, FFMPEG_DEFAULT_COMPLIANCE, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS)); /* register additional properties, possibly dependent on the exact CODEC */ gst_ffmpeg_cfg_install_property (klass, PROP_CFG_BASE); venc_class->start = gst_ffmpegvidenc_start; venc_class->stop = gst_ffmpegvidenc_stop; venc_class->finish = gst_ffmpegvidenc_finish; venc_class->handle_frame = gst_ffmpegvidenc_handle_frame; venc_class->set_format = gst_ffmpegvidenc_set_format; venc_class->propose_allocation = gst_ffmpegvidenc_propose_allocation; venc_class->flush = gst_ffmpegvidenc_flush; gobject_class->finalize = gst_ffmpegvidenc_finalize; }