ekg2
|
Idź do kodu źródłowego tego pliku.
Struktury danych | |
struct | fstring_t |
Definicje | |
#define | _(a) gettext(a) |
#define | N_(a) gettext_noop(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))) |
#define | isalpha_pl_PL(x) ((x >= 'a' && x <= 'z') || (x >= 'A' && x <= 'Z') || x == 'ą' || x == 'ć' || x == 'ę' || x == 'ł' || x == 'ń' || x == 'ó' || x == 'ś' || x == 'ż' || x == 'ź' || x == 'Ą' || x == 'Ć' || x == 'Ę' || x == 'Ł' || x == 'Ń' || x == 'Ó' || x == 'Ś' || x == 'Ż' || x == 'Ź') |
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_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 | print_window (const char *target, session_t *session, int activity, int separate, const char *theme,...) |
void | print_info (const char *target, session_t *session, const char *theme,...) |
void | print_warning (const char *target, session_t *session, const char *theme,...) |
void | format_add (const char *name, const char *value, int replace) |
const char * | format_find (const char *name) |
char * | format_string (const char *format,...) |
void | theme_init () |
void | theme_plugins_init () |
void | theme_enumerate (int(*enumerator)(const char *theme, const char *value)) |
int | theme_read (const char *filename, int replace) |
int | theme_write (const char *filename) |
void | theme_cache_reset () |
void | theme_free () |
fstring_t * | fstring_new (const char *str) |
fstring_t * | fstring_new_format (const char *format,...) |
void | fstring_free (fstring_t *str) |
#define _ | ( | a | ) | gettext(a) |
#define format_ok | ( | format_find_result | ) | (format_find_result[0]) |
#define isalpha_pl_PL | ( | x | ) | ((x >= 'a' && x <= 'z') || (x >= 'A' && x <= 'Z') || x == 'ą' || x == 'ć' || x == 'ę' || x == 'ł' || x == 'ń' || x == 'ó' || x == 'ś' || x == 'ż' || x == 'ź' || x == 'Ą' || x == 'Ć' || x == 'Ę' || x == 'Ł' || x == 'Ń' || x == 'Ó' || x == 'Ś' || x == 'Ż' || x == 'Ź') |
#define N_ | ( | a | ) | gettext_noop(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) |
enum fstr_t |
void format_add | ( | const char * | name, |
const char * | value, | ||
int | replace | ||
) |
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.
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. |
const char* format_find | ( | const char * | name | ) |
char* format_string | ( | const char * | format, |
... | |||
) |
void fstring_free | ( | fstring_t * | str | ) |
Free memory allocated by str
str | - fstring_t * to free. |
fstring_t* fstring_new | ( | const char * | str | ) |
Change formatted ansi string (str) to Nowy-i-Lepszy (tm) [New-and-Better].
str | - string |
fstring_t* fstring_new_format | ( | const char * | format, |
... | |||
) |
char *tmp = format_string("format", .....); fstr = fstring_new(tmp); xfree(tmp);
void print_info | ( | const char * | target, |
session_t * | session, | ||
const char * | theme, | ||
... | |||
) |
void print_warning | ( | const char * | target, |
session_t * | session, | ||
const char * | theme, | ||
... | |||
) |
void print_window | ( | const char * | target, |
session_t * | session, | ||
int | activity, | ||
int | separate, | ||
const char * | theme, | ||
... | |||
) |
Print given text in given window [target+ session]
target | - target to look for. |
session | - session to look for. |
activity | - how important is text? |
separate | - if essence of text is important to create new window |
theme | - Name of format to format_string() with ... Text will be be built. |
... |
void theme_cache_reset | ( | ) |
Remove cached: prompt_cache, prompt2_cache, error_cache and timestamp_cache
These values are used by va_format_string() to don't call format_find() on:
["prompt" "%>", "prompt2" "%)", "errror" "%!", "timestamp" "%#"]
void theme_enumerate | ( | int(*)(const char *theme, const char *value) | enumerator | ) |
void theme_free | ( | ) |
void theme_init | ( | ) |
void theme_plugins_init | ( | ) |
int theme_read | ( | const char * | filename, |
int | replace | ||
) |
int theme_write | ( | const char * | filename | ) |