wlmaker
Loading...
Searching...
No Matches
Typedefs | Functions
idle.h File Reference
#include <stdbool.h>
#include "server.h"
Include dependency graph for idle.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Typedefs

typedef struct _wlmaker_idle_monitor_t wlmaker_idle_monitor_t
 

Functions

wlmaker_idle_monitor_twlmaker_idle_monitor_create (wlmaker_server_t *server_ptr)
 
void wlmaker_idle_monitor_destroy (wlmaker_idle_monitor_t *idle_monitor_ptr)
 
void wlmaker_idle_monitor_reset (wlmaker_idle_monitor_t *idle_monitor_ptr)
 
bool wlmaker_idle_monitor_lock (wlmaker_idle_monitor_t *idle_monitor_ptr)
 
void wlmaker_idle_monitor_inhibit (wlmaker_idle_monitor_t *idle_monitor_ptr)
 
void wlmaker_idle_monitor_uninhibit (wlmaker_idle_monitor_t *idle_monitor_ptr)
 

Detailed Description

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 Documentation

◆ wlmaker_idle_monitor_t

Forward declaration: Idle monitor handle.

Function Documentation

◆ wlmaker_idle_monitor_create()

wlmaker_idle_monitor_t * wlmaker_idle_monitor_create ( wlmaker_server_t server_ptr)

Creates the idle monitor.

Parameters
server_ptr
Returns
Handle of the idle monitor or NULL on error.

◆ wlmaker_idle_monitor_destroy()

void wlmaker_idle_monitor_destroy ( wlmaker_idle_monitor_t idle_monitor_ptr)

Destroys the idle monitor.

Parameters
idle_monitor_ptr

◆ wlmaker_idle_monitor_inhibit()

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.

See also
wlmaker_idle_monitor_uninhibit for releasing the inhibitor.
Parameters
idle_monitor_ptr

◆ wlmaker_idle_monitor_lock()

bool wlmaker_idle_monitor_lock ( wlmaker_idle_monitor_t idle_monitor_ptr)

Executes the configured 'Command' for locking. Overrides inhibits.

Parameters
idle_monitor_ptr
Returns
true on success.

◆ wlmaker_idle_monitor_reset()

void wlmaker_idle_monitor_reset ( wlmaker_idle_monitor_t idle_monitor_ptr)

Resets the idle monitor: For example, when a key is pressed.

Parameters
idle_monitor_ptr

◆ wlmaker_idle_monitor_uninhibit()

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.

Parameters
idle_monitor_ptr