KDK_SETTINGS_GET_DOUBLE(3)

NAME
kdk_settings_get_double - 获取gesettings指定double类型key值

SYNOPSIS

#include <libkygsetting.h>

  Functions

  double kdk_settings_get_double (const char * schema_id, const char * key)

获取gesettings指定double类型key值

Parameters
    schema_id schema中的id
    key key的名称

Returns
    double 成功返回key的值，失败返回0

Link with -lkygsetting.

Detailed Description

接口的主要功能是获取gesettings指定double类型key值

EXAMPLES
    #include "libkygsetting.h"
    #include <stdio.h>
    #include <stdbool.h>
    #include <string.h>
    #include <glib.h>
    #include <glib/gi18n.h>
    #include <glib-object.h>
    int main()
    {
    	int ret = kdk_settings_reset("org.gnome.evolution-data-server.calendar", "notify-custom-snooze-minutes");
    	double a[] = {0.0,2.0};
    	size_t s = 2;
     	// double **s = a;

    	ret = kdk_gsettings_set("org.onboard.window", "docking-aspect-change-range", "ad", a, s);	//当类型为数组时，请输入数组大小，size_t
    	printf("%d, ret);
    	ret = kdk_settings_set_string("org.gnome.evolution", "version", "3.36.1");
    	ret = kdk_settings_set_int("org.ukui.audio", "output-volume", 67);
    	char* res = kdk_settings_get_string("org.gnome.evolution", "version");
    	printf("res = %s, res);
    	int key = kdk_settings_get_int("org.ukui.audio", "output-volume");
    	printf("key = %d, key);
    	bool enabled;
    	GVariantIter iter;
    	kdk_gsettings_get("org.ukui.control-center.notice", "blacklist", "as", &iter);
    	printf("enable = %d, enabled);
    	// printf("value = %d, value);
    	// for (int i = 0; value[i]; i++)
        // {
        //     printf("[%d]Get disk info error., value[i]);
    	// }
    	double dde = kdk_settings_get_double("org.ukui.SettingsDaemon.plugins.xsettings", "scaling-factor");
    	printf("dde = %0.1f, dde);
    	return 0;
    }

CONFORMING TO
These functions are as per the withdrawn POSIX.1e draft specification. The following functions are Linux extensions: kdk_gsettings_set(), kdk_settings_reset(), kdk_settings_set_string(), kdk_settings_set_int(), kdk_gsettings_get(), kdk_settings_get_string() and kdk_settings_get_int().

SEE ALSO
kdk_gsettings_set(3), kdk_settings_reset(3), kdk_settings_set_string(3), kdk_settings_set_int(3), kdk_gsettings_get(3), kdk_settings_get_string(3) and kdk_settings_get_int(3).

Author

Generated automatically by Doxygen for libkygsetting.h from the source code.