ekg2  GIT master
Struktury danych | Definicje | Wyliczenia | Funkcje
Dokumentacja pliku themes.h
#include "strings.h"
Wykres zależności załączania dla themes.h:
Ten wykres pokazuje, które pliki bezpośrednio lub pośrednio załączają ten plik:

Idź do kodu źródłowego tego pliku.

Struktury danych

struct  fstring_t
 

Definicje

#define _(a)   (a)
 
#define N_(a)   (a)
 
#define print(x...)   print_window_w(NULL, EKG_WINACT_JUNK, x)
 
#define print_status(x...)   print_window_w(window_status, EKG_WINACT_JUNK, x)
 
#define format_ok(format_find_result)   (format_find_result[0])
 
#define format_exists(format)   (format_ok(format_find(format)))
 

Wyliczenia

enum  fstr_t {
  FSTR_FOREA = 1, FSTR_FOREB = 2, FSTR_FOREC = 4, FSTR_FOREMASK = (FSTR_FOREA|FSTR_FOREB|FSTR_FOREC),
  FSTR_BACKA = 8, FSTR_BACKB = 16, FSTR_BACKC = 32, FSTR_BACKMASK = (FSTR_BACKA|FSTR_BACKB|FSTR_BACKC),
  FSTR_BOLD = 64, FSTR_NORMAL = 128, FSTR_BLINK = 256, FSTR_UNDERLINE = 512,
  FSTR_REVERSE = 1024, FSTR_ALTCHARSET = 2048, FSTR_LINEBREAK = 4096, FSTR_FOREA = 1,
  FSTR_FOREB = 2, FSTR_FOREC = 4, FSTR_FOREMASK = (FSTR_FOREA|FSTR_FOREB|FSTR_FOREC), FSTR_BACKA = 8,
  FSTR_BACKB = 16, FSTR_BACKC = 32, FSTR_BACKMASK = (FSTR_BACKA|FSTR_BACKB|FSTR_BACKC), FSTR_BOLD = 64,
  FSTR_NORMAL = 128, FSTR_BLINK = 256, FSTR_UNDERLINE = 512, FSTR_REVERSE = 1024,
  FSTR_ALTCHARSET = 2048
}
 

Funkcje

void format_add (const char *name, const char *value, int replace)
 
void remote_format_add (const char *name, const char *value)
 
const char * format_find (const char *name)
 
char * format_string (const char *format,...)
 
void theme_init ()
 
void theme_free ()
 
fstring_tfstring_new (const char *str)
 
fstring_tfstring_new_format (const char *format,...)
 
void fstring_free (fstring_t *str)
 

Dokumentacja definicji

◆ _

#define _ (   a)    (a)

◆ format_exists

#define format_exists (   format)    (format_ok(format_find(format)))

◆ format_ok

#define format_ok (   format_find_result)    (format_find_result[0])

◆ N_

#define N_ (   a)    (a)

◆ print

#define print (   x...)    print_window_w(NULL, EKG_WINACT_JUNK, x)

◆ print_status

#define print_status (   x...)    print_window_w(window_status, EKG_WINACT_JUNK, x)

Dokumentacja typów wyliczanych

◆ fstr_t

enum fstr_t
Wartości wyliczeń
FSTR_FOREA 
FSTR_FOREB 
FSTR_FOREC 
FSTR_FOREMASK 
FSTR_BACKA 
FSTR_BACKB 
FSTR_BACKC 
FSTR_BACKMASK 
FSTR_BOLD 
FSTR_NORMAL 
FSTR_BLINK 
FSTR_UNDERLINE 
FSTR_REVERSE 
FSTR_ALTCHARSET 
FSTR_LINEBREAK 
FSTR_FOREA 
FSTR_FOREB 
FSTR_FOREC 
FSTR_FOREMASK 
FSTR_BACKA 
FSTR_BACKB 
FSTR_BACKC 
FSTR_BACKMASK 
FSTR_BOLD 
FSTR_NORMAL 
FSTR_BLINK 
FSTR_UNDERLINE 
FSTR_REVERSE 
FSTR_ALTCHARSET 

Dokumentacja funkcji

◆ format_add()

void format_add ( const char *  name,
const char *  value,
int  replace 
)

format_add()

Add format with name and value.
If replace set to 1, than if format with the same name exists. than format value will be replaced.

Do zrobienia:
What about creating global variable: formats_unique_here.. and if set to 1, don't search if this format already exists? It should speedup theme_init() a little.
Parametry
name- name of format
value- value of format
replace- if this format exists and is set to 1 than format value will be replaced with new one. else do nothing.

◆ format_find()

const char* format_find ( const char *  name)

◆ format_string()

char* format_string ( const char *  format,
  ... 
)

◆ fstring_free()

void fstring_free ( fstring_t str)

fstring_free()

Free memory allocated by str

Do zrobienia:
XXX Think about freeing str->priv_data
Parametry
str- fstring_t * to free.

◆ fstring_new()

fstring_t* fstring_new ( const char *  str)

fstring_new()

Change formatted ansi string (str) to Nowy-i-Lepszy (tm) [New-and-Better].

Parametry
str- string
Zobacz również
format_string() - Function to format strings.
fstring_free() - Function to free fstring_t.
Zwraca
Allocated fstring_t.

◆ fstring_new_format()

fstring_t* fstring_new_format ( const char *  format,
  ... 
)

fstring_new_format()

char *tmp = format_string("format", .....); fstr = fstring_new(tmp); xfree(tmp);

◆ remote_format_add()

void remote_format_add ( const char *  name,
const char *  value 
)

◆ theme_free()

void theme_free ( )

◆ theme_init()

void theme_init ( )