KDK_SET_IN...LOCKSCREEN(3)

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

💖 KDK_SET_IN...LOCKSCREEN — bestie edition 💖

okay so you're in the Library Functions Manual rn, and today's main character is kdk_set_inhibit_lockscreen(3). yes the title got chopped to KDK_SET_IN...LOCKSCREEN(3) because Unix is dramatic like that 💅 anyway. let's go.


🌸 NAME 🌸

kdk_set_inhibit_lockscreen — 设置禁止锁屏 (set inhibit lockscreen, no cap ✨)


🎀 SYNOPSIS 🎀

#include <libkylockscreen.h>

extern uint32_t kdk_set_inhibit_lockscreen(const char *appName, const char *reason);

Link with -lkypowermanagement.


🦋 Detailed Description 🦋

The whole point of this interface is to set the lock screen to suppress. like, tell the lockscreen to chill out and not do its thing. that's it, that's the job 🫶

The argument appName is the application name. so like, who's asking.

The argument reason is the reason for disabling the lock screen. spill the tea, bestie — why are we suppressing it.


👑 RETURN VALUE 👑

  • On success, return 0. slay ✨
  • On error, return -1. 😭 not slay

🌈 EXAMPLES 🌈

here's the whole vibe in code form, copied exactly, don't @ me:

#include <libkylockscreen.h>
#include <stdio.h>

int main(void)
{
    char appName[] = "test-package";
    char reason[] = "test-reason";

    uint32_t flag;
    if ((flag = kdk_set_inhibit_lockscreen(appName , reason)) == 0) {
        printf("set inhibit lock screen fail !0);
        return -1;
    }

    if (kdk_un_inhibit_lockscreen(flag)) {
        printf("un inhibit lock screen fail !0);
        return -1;
    }

    return 0;
}
okay real talk — yes, those printf strings look cursed (fail !0 with a dangling quote situation). that is literally what the original says. i am NOT fixing it, i am NOT touching it, it's giving legacy code energy and we respect the ancestors 💀

⭐ CONFORMING TO ⭐

These functions are as per the withdrawn POSIX.1e draft specification. (withdrawn!! it's giving vintage 🎀)

The following functions are Linux extensions:

  • kdk_un_inhibit_lockscreen()

🧚 SEE ALSO 🧚


and that's the whole page bestie, you ate it 💅🌸✨

written under the Linux Programmer's Manual banner, dated Mon Sep 18 2023 — so if this ever gets a glow-up, that date is the receipts 🫶💖 no cap, go forth and inhibit those lockscreens. periodt. 🔥👑

📦 where this page comes from