KDK_EDID_GET_CHARACTER(3)

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

KDK_EDID_GET_CHARACTER(3) 💖

okay bestie, sit down, hydrate, and let's talk about kdk_edid_get_character — it lives in the Library Functions Manual section 3, aka the "functions you call from your own code" club 👑


✨ NAME ✨

kdk_edid_get_character — 获取显示器 edid 未解析的字符串

(translation for the girlies: it grabs the string from your monitor's EDID that hasn't been parsed yet 🖥️✨)


🌸 SYNOPSIS 🌸

#include <libkyedid.h>

extern char* kdk_edid_get_character(char *name);

and don't forget to link with -lkyedid or she simply will not show up 🔗💅


🦋 Detailed Description 🦋

So the whole ~main character~ job of this interface is: obtain the string that the screen edid has not parsed. That's it. That's the gig. 💖

The argument name is the current interface of the screen — like, which screen are we even talking about, bestie? You gotta tell her. 👀


💜 RETURN VALUE 💜

  • On success — she returns the string that the screen edid has not parsed, of type char*. ⭐ and the returned string needs to be released by free — yes, actually free it, do not ghost your malloc'd memory, that's toxic behavior 😭
  • On error — she returns NULL. no notes. 💀

🎀 EXAMPLES 🎀

here's the full vibe in code, copied exactly, no cap:

#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;
}

see how character gets its own little moment in there and then gets freed like a responsible queen? 🫶 that's the one you're here for.


🌈 CONFORMING TO 🌈

These functions are as per the withdrawn POSIX.1e draft specification — yes, withdrawn, she's vintage, she's an archive find, we stan anyway 📜✨

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

💅 SEE ALSO 💅

go read the whole friend group, they're all iconic:


and that's the whole page, bestie!! 🎀 this one's from the Linux Programmer's Manual, dated Fri Aug 25 2023, and it's page KDK_EDID_GET_CHARACTER(3) — screenshot it, memorize it, free your strings. mwah 💋💖

📦 where this page comes from