wlmaker
|
#include "idle.h"
#include <libbase/libbase.h>
#include <libbase/plist.h>
#include <stdint.h>
#include <stdlib.h>
#include <wayland-server-core.h>
#include <wayland-server-protocol.h>
#include <wayland-util.h>
#include <wlr/types/wlr_idle_inhibit_v1.h>
#include "subprocess_monitor.h"
#include "toolkit/toolkit.h"
Classes | |
struct | _wlmaker_idle_monitor_t |
struct | _wlmaker_idle_inhibitor_t |
Typedefs | |
typedef struct _wlmaker_idle_inhibitor_t | wlmaker_idle_inhibitor_t |
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
typedef struct _wlmaker_idle_inhibitor_t wlmaker_idle_inhibitor_t |
Forward declaration: Handle of an idle inhibitor.
|
static |
Creates and adds a new inhibitor to the monitor.
idle_monitor_ptr | |
wlr_idle_inhibitor_v1_ptr |
|
static |
Executes a lock, if not inhibited & timer has indeed expired.
|
static |
Handler for the destroy
signal of the inhibitor. Destroys it.
listener_ptr | |
data_ptr | Unused. |
|
static |
Handler for the new_inhibitor
signal of the inhibit manager: Registers the inhibitor.
listener_ptr | |
data_ptr | Pointer to struct wlr_idle_inhibitor_v1. |
|
static |
Handler for wlmtk_root_events_t::unlock_event. Re-arms the timer.
listener_ptr | |
data_ptr | unused. |
|
static |
Timer function for the wayland event loop.
data_ptr | Untyped pointer to wlmaker_idle_monitor_t. |
|
static |
Returns the idle timeout time in milliseconds.
idle_monitor_ptr |
wlmaker_idle_monitor_t * wlmaker_idle_monitor_create | ( | wlmaker_server_t * | server_ptr | ) |
Creates the idle monitor.
server_ptr |
void wlmaker_idle_monitor_destroy | ( | wlmaker_idle_monitor_t * | idle_monitor_ptr | ) |
Destroys the idle monitor.
idle_monitor_ptr |
void wlmaker_idle_monitor_inhibit | ( | wlmaker_idle_monitor_t * | idle_monitor_ptr | ) |
Inhibits locking: Increases inhibitor counter, which will prevent locking when the idle timer expires.
idle_monitor_ptr |
bool wlmaker_idle_monitor_lock | ( | wlmaker_idle_monitor_t * | idle_monitor_ptr | ) |
Executes the configured 'Command' for locking. Overrides inhibits.
idle_monitor_ptr |
void wlmaker_idle_monitor_reset | ( | wlmaker_idle_monitor_t * | idle_monitor_ptr | ) |
Resets the idle monitor: For example, when a key is pressed.
idle_monitor_ptr |
void wlmaker_idle_monitor_uninhibit | ( | wlmaker_idle_monitor_t * | idle_monitor_ptr | ) |
Uninhibits locking: Decreases the counter. If 0, and no other inhibitors found, an expired idle timer will lock.
idle_monitor_ptr |