|
rofi 2.0.0
|
#include "config.h"#include "helper-theme.h"#include "helper.h"#include "keyb.h"#include "mode.h"#include "timings.h"#include "view.h"#include "widgets/textbox.h"#include <ctype.h>#include <glib.h>#include <math.h>#include <string.h>#include "theme.h"
Go to the source code of this file.
Variables | |
| static PangoContext * | p_context = NULL |
| static PangoFontMetrics * | p_metrics = NULL |
| static TBFontConfig * | tbfc_default = NULL |
| static GHashTable * | tbfc_cache = NULL |
| const char *const | theme_prop_names [][3] |
| const char * | default_font_name = "default" |
| static double | char_width = -1 |
| static double | ch_width = -1 |
|
static |
| tb | The textbox object. |
Update the pango layout's text. It does this depending on the textbox flags.
Definition at line 339 of file textbox.c.
References textbox::flags, helper_token_match_set_pango_attr_on_style(), textbox::layout, MARKUP, textbox::password_mask_char, textbox::placeholder, rofi_theme_get_highlight(), textbox::show_placeholder, RofiHighlightColorStyle::style, TB_MARKUP, TB_PASSWORD, textbox::tbft, textbox::text, and WIDGET.
Referenced by textbox_draw(), textbox_get_desired_height(), and textbox_text().


|
static |
Definition at line 1014 of file textbox.c.
References textbox::flags, _widget::h, textbox::layout, TB_AUTOHEIGHT, textbox_get_estimated_height(), and textbox::widget.
Referenced by textbox_create().


|
static |
Definition at line 959 of file textbox.c.
References TBFontConfig::metrics, and TBFontConfig::pfd.
Referenced by textbox_setup().

|
static |
Definition at line 61 of file textbox.c.
References textbox::blink, rofi_view_queue_redraw(), WIDGET, and widget_queue_redraw().
Referenced by textbox_create().


|
static |
| tb | Handle to the textbox |
Delete character before cursor.
Definition at line 820 of file textbox.c.
References textbox::cursor, textbox_cursor_dec(), and textbox_cursor_del().
Referenced by textbox_keybinding().


|
static |
Definition at line 826 of file textbox.c.
References textbox::cursor, textbox_cursor_dec_word(), and textbox_delete().
Referenced by textbox_keybinding().


|
static |
| tb | Handle to the textbox |
Move cursor one position backward.
Definition at line 667 of file textbox.c.
References textbox::cursor, and textbox_cursor().
Referenced by textbox_cursor_bkspc(), and textbox_keybinding().


|
static |
Definition at line 705 of file textbox.c.
References textbox::cursor, textbox::text, and textbox_cursor().
Referenced by textbox_cursor_bkspc_word(), and textbox_keybinding().


|
static |
| tb | Handle to the textbox |
Delete character after cursor.
Definition at line 808 of file textbox.c.
References textbox::cursor, textbox::text, and textbox_delete().
Referenced by textbox_cursor_bkspc(), and textbox_keybinding().


|
static |
Definition at line 835 of file textbox.c.
References textbox::cursor, textbox::text, and textbox_delete().
Referenced by textbox_keybinding().


|
static |
Definition at line 843 of file textbox.c.
References textbox::cursor, and textbox_delete().
Referenced by textbox_keybinding().


|
static |
Definition at line 849 of file textbox.c.
References textbox::cursor, textbox_cursor_inc_word(), and textbox_delete().
Referenced by textbox_keybinding().


|
static |
| tb | Handle to the textbox |
Move cursor one position forward.
Definition at line 654 of file textbox.c.
References textbox::cursor, and textbox_cursor().
Referenced by textbox_keybinding().


|
static |
Definition at line 674 of file textbox.c.
References textbox::cursor, textbox::text, and textbox_cursor().
Referenced by textbox_cursor_del_word(), and textbox_keybinding().


|
static |
Definition at line 498 of file textbox.c.
References __textbox_update_pango_text(), textbox::blink, textbox::changed, textbox::cursor, textbox::cursor_x_pos, distance_get_pixel(), textbox::flags, _widget::h, textbox::layout, TBFontConfig::metrics, textbox::password_mask_char, ROFI_ORIENTATION_HORIZONTAL, rofi_theme_get_boolean(), rofi_theme_get_color(), rofi_theme_get_distance(), rofi_theme_get_double(), textbox::show_placeholder, TB_EDITABLE, TB_PASSWORD, textbox::tbfc, textbox::text, _widget::w, WIDGET, textbox::widget, widget_padding_get_bottom(), widget_padding_get_left(), widget_padding_get_padding_width(), widget_padding_get_top(), textbox::xalign, and textbox::yalign.
Referenced by textbox_create().


|
static |
Definition at line 97 of file textbox.c.
References textbox::layout, MOUSE_CLICK_DOWN, MOUSE_CLICK_UP, MOUSE_DCLICK_DOWN, MOUSE_DCLICK_UP, textbox_cursor(), textbox_cursor_end(), textbox_get_font_width(), widget_padding_get_left(), WIDGET_TRIGGER_ACTION_RESULT_HANDLED, and WIDGET_TRIGGER_ACTION_RESULT_IGNORED.
Referenced by textbox_create().


|
static |
Definition at line 479 of file textbox.c.
References textbox::blink_timeout, textbox::layout, textbox::placeholder, and textbox::text.
Referenced by textbox_create().

|
static |
Definition at line 77 of file textbox.c.
References __textbox_update_pango_text(), textbox::changed, textbox::flags, _widget::h, textbox::layout, TB_AUTOHEIGHT, textbox_get_estimated_height(), WIDGET, textbox::widget, and widget_padding_get_padding_width().
Referenced by textbox_create().


|
static |
Definition at line 1006 of file textbox.c.
References textbox::flags, TB_AUTOWIDTH, textbox_get_font_width(), _widget::w, textbox::widget, and widget_padding_get_padding_width().
Referenced by textbox_create().


|
static |
Definition at line 126 of file textbox.c.
References TBFontConfig::height, helper_validate_font(), textbox::layout, TBFontConfig::metrics, p_context, TBFontConfig::pfd, rofi_theme_get_string(), textbox::tbfc, tbfc_cache, tbfc_default, TICK_N, and WIDGET.
Referenced by textbox_create().


|
static |
Definition at line 73 of file textbox.c.
References textbox_moveresize(), textbox::widget, _widget::x, and _widget::y.
Referenced by textbox_create().


|
static |
Definition at line 178 of file textbox.c.
References distance_get_pixel(), textbox::layout, ROFI_ORIENTATION_HORIZONTAL, rofi_theme_get_list_distance(), and WIDGET.
Referenced by textbox_create().


|
static |
Cache storing the estimated width of a digit (ch).
Definition at line 1053 of file textbox.c.
Referenced by textbox_get_estimated_ch().
|
static |
Caching for the expected character width.
Definition at line 1043 of file textbox.c.
Referenced by textbox_get_estimated_char_width().
| const char* default_font_name = "default" |
Name of the default font (if none is given)
Definition at line 972 of file textbox.c.
Referenced by textbox_set_pango_context().
|
static |
Default pango context
Definition at line 51 of file textbox.c.
Referenced by textbox_cleanup(), textbox_create(), textbox_initialize_font(), and textbox_set_pango_context().
|
static |
The pango font metrics
Definition at line 53 of file textbox.c.
Referenced by textbox_get_estimated_ch(), textbox_get_estimated_char_width(), and textbox_set_pango_context().
|
static |
HashMap of previously parsed font descriptions.
Definition at line 59 of file textbox.c.
Referenced by textbox_cleanup(), textbox_initialize_font(), textbox_set_pango_context(), and textbox_setup().
|
static |
Default tbfc
Definition at line 56 of file textbox.c.
Referenced by textbox_get_estimated_char_height(), textbox_initialize_font(), and textbox_set_pango_context().
| const char* const theme_prop_names[][3] |
State names used for theming.
Definition at line 298 of file textbox.c.
Referenced by textbox_font().