ELinks 0.16.1.1
leds.c File Reference
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <time.h>
#include "elinks.h"
#include "bfu/leds.h"
#include "config/options.h"
#include "document/document.h"
#include "document/view.h"
#include "intl/libintl.h"
#include "main/module.h"
#include "main/timer.h"
#include "session/session.h"
#include "terminal/draw.h"
#include "terminal/tab.h"
#include "terminal/terminal.h"
#include "terminal/window.h"
#include "util/color.h"
#include "util/error.h"
#include "viewer/timer.h"
Include dependency graph for leds.c:

Macros

#define get_opt_leds(which)
#define get_leds_clock_enable()
#define get_leds_clock_format()
#define get_leds_panel_enable()
#define get_leds_show_ip_enable()
#define get_leds_temperature_enable()
#define get_leds_temperature_filename()

Enumerations

enum  led_option {
  LEDS_CLOCK_TREE , LEDS_CLOCK_ENABLE , LEDS_CLOCK_FORMAT , LEDS_CLOCK_ALIAS ,
  LEDS_SHOW_IP_ENABLE , LEDS_TEMPERATURE_TREE , LEDS_TEMPERATURE_ENABLE , LEDS_TEMPERATURE_FILENAME ,
  LEDS_PANEL_TREE , LEDS_PANEL_ENABLE , LEDS_OPTIONS
}

Functions

static void redraw_leds (void *)
void init_leds (struct module *module)
void done_leds (struct module *module)
void set_led_value (struct led *led, unsigned char value)
unsigned char get_led_value (struct led *led)
void unset_led_value (struct led *led)
void init_led_panel (struct led_panel *leds)
static int draw_timer (struct terminal *term, int xpos, int ypos, struct color_pair *color)
static int draw_show_ip (struct session *ses, int xpos, int ypos, struct color_pair *color)
static int draw_temperature (struct session *ses, int xpos, int ypos, struct color_pair *color)
static milliseconds_T compute_redraw_interval (void)
void draw_leds (struct session *ses)
static int sync_leds (struct session *ses)
static void update_download_led (struct session *ses)
void menu_leds_info (struct terminal *term, void *xxx, void *xxxx)
struct led * register_led (struct session *ses, int number)
void unregister_led (struct led *led)

Variables

static int timer_duration_backup = 0
static timer_id_T redraw_timer = TIMER_ID_UNDEF
static int drawing = 0
static union option_info led_options []
struct module leds_module

Macro Definition Documentation

◆ get_leds_clock_enable

#define get_leds_clock_enable ( )
Value:
#define get_opt_leds(which)
Definition leds.c:123
@ LEDS_CLOCK_ENABLE
Definition leds.c:62

◆ get_leds_clock_format

#define get_leds_clock_format ( )
Value:
@ LEDS_CLOCK_FORMAT
Definition leds.c:63

◆ get_leds_panel_enable

#define get_leds_panel_enable ( )
Value:
@ LEDS_PANEL_ENABLE
Definition leds.c:73

◆ get_leds_show_ip_enable

#define get_leds_show_ip_enable ( )
Value:
@ LEDS_SHOW_IP_ENABLE
Definition leds.c:66

◆ get_leds_temperature_enable

#define get_leds_temperature_enable ( )
Value:
@ LEDS_TEMPERATURE_ENABLE
Definition leds.c:69

◆ get_leds_temperature_filename

#define get_leds_temperature_filename ( )
Value:
@ LEDS_TEMPERATURE_FILENAME
Definition leds.c:70

◆ get_opt_leds

#define get_opt_leds ( which)
Value:
led_options[(which)].option.value
#define option
Definition options.h:17
static union option_info led_options[]
Definition leds.c:78

Enumeration Type Documentation

◆ led_option

enum led_option
Enumerator
LEDS_CLOCK_TREE 
LEDS_CLOCK_ENABLE 
LEDS_CLOCK_FORMAT 
LEDS_CLOCK_ALIAS 
LEDS_SHOW_IP_ENABLE 
LEDS_TEMPERATURE_TREE 
LEDS_TEMPERATURE_ENABLE 
LEDS_TEMPERATURE_FILENAME 
LEDS_PANEL_TREE 
LEDS_PANEL_ENABLE 
LEDS_OPTIONS 

Function Documentation

◆ compute_redraw_interval()

milliseconds_T compute_redraw_interval ( void )
static

◆ done_leds()

void done_leds ( struct module * module)

◆ draw_leds()

void draw_leds ( struct session * ses)

◆ draw_show_ip()

int draw_show_ip ( struct session * ses,
int xpos,
int ypos,
struct color_pair * color )
static

◆ draw_temperature()

int draw_temperature ( struct session * ses,
int xpos,
int ypos,
struct color_pair * color )
static

◆ draw_timer()

int draw_timer ( struct terminal * term,
int xpos,
int ypos,
struct color_pair * color )
static

◆ get_led_value()

unsigned char get_led_value ( struct led * led)

◆ init_led_panel()

void init_led_panel ( struct led_panel * leds)

◆ init_leds()

void init_leds ( struct module * module)

◆ menu_leds_info()

void menu_leds_info ( struct terminal * term,
void * xxx,
void * xxxx )

◆ redraw_leds()

void redraw_leds ( void * xxx)
static

◆ register_led()

struct led * register_led ( struct session * ses,
int number )

◆ set_led_value()

void set_led_value ( struct led * led,
unsigned char value )

◆ sync_leds()

int sync_leds ( struct session * ses)
static

◆ unregister_led()

void unregister_led ( struct led * led)

◆ unset_led_value()

void unset_led_value ( struct led * led)

◆ update_download_led()

void update_download_led ( struct session * ses)
static

Variable Documentation

◆ drawing

int drawing = 0
static

◆ led_options

union option_info led_options[]
static

◆ leds_module

struct module leds_module
Initial value:
N_("LED indicators"),
)
#define NULL
Definition explodename.c:35
#define N_(msg)
Definition libintl.h:25
void done_leds(struct module *module)
Definition leds.c:142
void init_leds(struct module *module)
Definition leds.c:132
#define struct_module(name, options, hooks, submods, data, init, done)
Definition module.h:44

◆ redraw_timer

timer_id_T redraw_timer = TIMER_ID_UNDEF
static

◆ timer_duration_backup

int timer_duration_backup = 0
static