Exemplo n.º 1
0
/**
 * huey_ctx_new:
 *
 * Creates a new #HueyCtx object.
 *
 * Return value: a new HueyCtx object.
 *
 * Since: 0.1.29
 **/
HueyCtx *
huey_ctx_new (void)
{
	HueyCtx *ctx;
	ctx = g_object_new (HUEY_TYPE_CTX, NULL);
	return HUEY_CTX (ctx);
}
Exemplo n.º 2
0
/**
 * huey_ctx_finalize:
 **/
static void
huey_ctx_finalize (GObject *object)
{
	HueyCtx *ctx = HUEY_CTX (object);

	g_return_if_fail (HUEY_IS_CTX (object));

	g_free (ctx->priv->unlock_string);

	G_OBJECT_CLASS (huey_ctx_parent_class)->finalize (object);
}
Exemplo n.º 3
0
/**
 * huey_ctx_set_property:
 **/
static void
huey_ctx_set_property (GObject *object, guint prop_id, const GValue *value, GParamSpec *pspec)
{
	HueyCtx *ctx = HUEY_CTX (object);

	switch (prop_id) {
	case PROP_DEVICE:
		ctx->priv->device = g_value_dup_object (value);
		break;
	default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
		break;
	}
}
Exemplo n.º 4
0
/**
 * huey_ctx_get_property:
 **/
static void
huey_ctx_get_property (GObject *object,
		       guint prop_id,
		       GValue *value,
		       GParamSpec *pspec)
{
	HueyCtx *ctx = HUEY_CTX (object);
	HueyCtxPrivate *priv = GET_PRIVATE (ctx);

	switch (prop_id) {
	case PROP_DEVICE:
		g_value_set_object (value, priv->device);
		break;
	default:
		G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
		break;
	}
}