KDK_EDID_GET_YEAR(3)

📦 version 3.0.1.4, in arch rolling, ubuntu resolute, ubuntu stonking

🎀 KDK_EDID_GET_YEAR(3) 🎀

okay so bestie, you've wandered into section 3 of the manual, which is the part where we talk about library functions — specifically the libkyedid girlies. this one's called kdk_edid_get_year, and she's here to tell you what year your monitor was born. yes, literally. your screen has a birthday. 💅


✨ NAME ✨

kdk_edid_get_year — 获取显示器的生产日期/年

translation for the girlies who don't read Chinese: she gets the manufacturing date (year) of your display. iconic of her.

🌸 SYNOPSIS 🌸

#include <libkyedid.h>

extern int kdk_edid_get_year(char *name);

and don't forget to Link with -lkyedid or she simply will not show up. no cap. 🔗


💬 Detailed Description 💬

The main function of the interface is to obtain the manufacturing date (year) of the screen. that's it. that's her whole job. she does one thing and she ate. ✨

The argument name is the current interface of the screen — like, the handle of the display you're asking about. pass it in and she'll spill the year.


🔥 RETURN VALUE 🔥

  • On success — returns the screen manufacturing date (year) of type int. slay 💚
  • On error — returns -1. she said no. 😭

🦋 EXAMPLES 🦋

here's the whole vibe in one program, bestie — she prints everything about every interface she can find:

#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("当前接口 = %s0, name[count]);
        float gamma = kdk_edid_get_gamma(name[count]);
        printf("gamma = %0.2f0, gamma);
        float size = kdk_edid_get_size(name[count]);
        printf("size = %0.1f0, size);
        char *max_resolution = kdk_edid_get_max_resolution(name[count]);
        printf("max_resolution = %s0, max_resolution);
        free(max_resolution);
        char *model = kdk_edid_get_model(name[count]);
        printf("model = %s0, model);
        free(model);
        char *area = kdk_edid_get_visible_area(name[count]);
        printf("area = %s0, area);
        free(area);
        char *manufacturer = kdk_edid_get_manufacturer(name[count]);
        printf("manufacturer = %s0, manufacturer);
        free(manufacturer);
        int week = kdk_edid_get_week(name[count]);
        printf("week = %d0, week);
        int year = kdk_edid_get_year(name[count]);
        printf("year = %d0, year);
        int primary = kdk_edid_get_primary(name[count]);
        printf("%s0, primary == 1 ? "是" : "否");

        char *resolution = kdk_edid_get_resolution(name[count]);
        printf("resolution = %s0, resolution);
        free(resolution);

        char *ratio = kdk_edid_get_ratio(name[count]);
        printf("ratio = %s0, ratio);
        free(ratio);

        char *character = kdk_edid_get_character(name[count]);
        printf("character = %s0, character);
        free(character);

        printf("---------------------------------------0);
        count ++;
    }
    kdk_edid_freeall(name);
    return 0;
}
fr fr, notice how she frees every string she got back — max_resolution, model, area, manufacturer, resolution, ratio, character — and then calls kdk_edid_freeall(name) at the very end to clean up the whole list. memory hygiene is main character energy. don't skip it. 🙈

👑 CONFORMING TO 👑

These functions are as per the withdrawn POSIX.1e draft specification. (yes, withdrawn. she's retro. vintage. a true icon. 💀)

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_primary()
  • kdk_edid_get_resolution()
  • kdk_edid_get_ratio()
  • kdk_edid_get_character()
  • kdk_edid_freeall()

🌈 SEE ALSO 🌈

go read her friends, they're all icons too:


and that's the whole page, bestie!! 🫶 this little love letter lives in the Linux Programmer's Manual, and the version you're holding was stamped Fri Aug 25 2023. go forth and read your monitor's birth year, she's been waiting to tell you. 💖✨🎀

📦 where this page comes from