KDK_EDID_GET_PRIMARY(3)

NAME
kdk_edid_get_primary - 获取是否是主显示器（是/否）

SYNOPSIS
#include <libkyedid.h>

extern int kdk_edid_get_primary(char *name);

Link with -lkyedid.

Detailed Description
The main function of the interface is to determine whether it is the main screen.

The argument name is the current interface of the screen.

RETURN VALUE
On success, returns 1, which is the primary screen; Returns 0, not the primary screen. On error, return -1.

EXAMPLES
    #include "libkyedid.h"
    #include <stdio.h>
    #include <stdlib.h>
    int main()
    {
        char** name = kdk_edid_get_interface();
        size_t count = 0;
        while (name[count])
        {
            printf("当前接口 = %s, name[count]);
            float gamma = kdk_edid_get_gamma(name[count]);
            printf("gamma = %0.2f, gamma);
            float size = kdk_edid_get_size(name[count]);
            printf("size = %0.1f, size);
            char *max_resolution = kdk_edid_get_max_resolution(name[count]);
            printf("max_resolution = %s, max_resolution);
            free(max_resolution);
            char *model = kdk_edid_get_model(name[count]);
            printf("model = %s, model);
            free(model);
            char *area = kdk_edid_get_visible_area(name[count]);
            printf("area = %s, area);
            free(area);
            char *manufacturer = kdk_edid_get_manufacturer(name[count]);
            printf("manufacturer = %s, manufacturer);
            free(manufacturer);
            int week = kdk_edid_get_week(name[count]);
            printf("week = %d, week);
            int year = kdk_edid_get_year(name[count]);
            printf("year = %d, year);
            int primary = kdk_edid_get_primary(name[count]);
            printf("%s, primary == 1 ? "是" : "否");
            char *resolution = kdk_edid_get_resolution(name[count]);
            printf("resolution = %s, resolution);
            free(resolution);
            char *ratio = kdk_edid_get_ratio(name[count]);
            printf("ratio = %s, ratio);
            free(ratio);
            char *character = kdk_edid_get_character(name[count]);
            printf("character = %s, character);
            free(character);
            printf("---------------------------------------);
            count ++;
        }
        kdk_edid_freeall(name);
        return 0;
    }

CONFORMING TO
These functions are as per the withdrawn POSIX.1e draft specification. The following functions are Linux extensions: kdk_edid_get_interface(), kdk_edid_get_gamma(), kdk_edid_get_size(), kdk_edid_get_max_resolution(), kdk_edid_get_model(), kdk_edid_get_visible_area(), kdk_edid_get_manufacturer(), kdk_edid_get_week(), kdk_edid_get_year(), kdk_edid_get_resolution(), kdk_edid_get_ratio(), kdk_edid_get_character() and kdk_edid_freeall().

SEE ALSO
kdk_edid_get_interface(3), kdk_edid_get_gamma(3), kdk_edid_get_size(3), kdk_edid_get_max_resolution(3), kdk_edid_get_model(3), kdk_edid_get_visible_area(3), kdk_edid_get_manufacturer(3), kdk_edid_get_week(3), kdk_edid_get_year(3), kdk_edid_get_resolution(3), kdk_edid_get_ratio(3), kdk_edid_get_character(3) and kdk_edid_freeall(3).