KDK_DISPLAY_GET_VENDOR(3)

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

💖 kdk_display_get_vendor — ok bestie let's get that GPU vendor 💖

So like, this is a page from the Library Functions Manual, and it's literally all about kdk_display_get_vendor(3). The Chinese name for it is 获取显卡的制造商, which is just "get the video card manufacturer" but make it fancy. It's giving "let me peek inside your machine and tell you who made the graphics card" energy. 🎀


✨ SYNOPSIS ✨

#include <libkydisplay.h>

extern char* kdk_display_get_vendor();

Link with -lkyhw.

🫶 yes queen, you gotta link with -lkyhw or the linker will simply not know her.

🌸 Detailed Description 🌸

The main character job of this interface? Obtain the Video card manufacturer. That's it, that's the whole gig. She walks in, she asks the hardware who made it, she hands you a string. Iconic behaviour, no notes. 👑


💅 RETURN VALUE 💅

  • On success, returns the Video card manufacturer of type char*. The returned string needs to be released by free. Yes bestie, you have to free it — she is not gonna clean up after herself, that's your job now.
  • On error, return NULL. So vibe check the result before you go printing it, fr fr.
😭 if you forget the free, that memory is just... gone. Forever. Leaked. Not slay.

🌈 EXAMPLES 🌈

Okay so here's the whole little program, and honestly? She's serving a full hardware info dump. Every single call gets freed like a responsible main character. 🦋

#include "libkydisplay.h"
#include <stdio.h>

int main()
{
    char *vendor = kdk_display_get_vendor();
    printf("生产厂商:%s\n", vendor);
    free(vendor);
    char *product = kdk_display_get_product();
    printf("型号:%s\n", product);
    free(product);
    char *description = kdk_display_get_description();
    printf("设备类型:%s\n", description);
    free(description);
    char *id = kdk_display_get_physical_id();
    printf("物理id:%s\n", id);
    free(id);
    char *bus = kdk_display_get_bus_info();
    printf("总线地址:%s\n", bus);
    free(bus);
    char *version = kdk_display_get_version();
    printf("设备版本:%s\n", version);
    free(version);
    char *width = kdk_display_get_width();
    printf("数据宽度:%s\n", width);
    free(width);
    char *clock = kdk_display_get_clock();
    printf("频率:%s\n", clock);
    free(clock);
    char *capabilities = kdk_display_get_capabilities();
    printf("功能:%s\n", capabilities);
    free(capabilities);
    char *configuration = kdk_display_get_configuration();
    printf("配置:%s\n", configuration);
    free(configuration);
    char *resources = kdk_display_get_resources();
    printf("资源:%s\n", resources);
    free(resources);
    return 0;
}

🧚 CONFORMING TO 🧚

These functions are as per the withdrawn POSIX.1e draft specification. The following functions are Linux extensions:

  • kdk_display_get_product()
  • kdk_display_get_description()
  • kdk_display_get_physical_id()
  • kdk_display_get_bus_info()
  • kdk_display_get_version()
  • kdk_display_get_width()
  • kdk_display_get_clock()
  • kdk_display_get_capabilities()
  • kdk_display_get_configuration()
  • kdk_display_get_resources()
💀 "withdrawn draft specification" — she's vintage, she's archival, she's lowkey retired but still showing up to the function.

🔥 SEE ALSO 🔥


💜 that's the whole page babes 💜

This one's from the Linux Programmer's Manual, dated Thu Aug 24 2023, and it's filed under KDK_DISPLAY_GET_VENDOR(3). Go forth and free your strings. 💅✨🌸

📦 where this page comes from