rofi
1.7.0
|
#include "widgets/textbox.h"
#include "helper-theme.h"
#include "helper.h"
#include "keyb.h"
#include "mode.h"
#include "view.h"
#include <ctype.h>
#include <glib.h>
#include <math.h>
#include <string.h>
#include <xcb/xcb.h>
#include "theme.h"
Go to the source code of this file.
Macros | |
#define | DOT_OFFSET 15 |
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 |
#define DOT_OFFSET 15 |
|
static |
tb | The textbox object. |
Update the pango layout's text. It does this depending on the textbox flags.
Definition at line 271 of file textbox.c.
References textbox::flags, textbox::layout, MARKUP, textbox::placeholder, textbox::show_placeholder, TB_MARKUP, TB_PASSWORD, textbox::tbft, and textbox::text.
Referenced by textbox_draw(), textbox_get_desired_height(), and textbox_text().
|
static |
Definition at line 850 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 799 of file textbox.c.
References TBFontConfig::metrics, and TBFontConfig::pfd.
Referenced by textbox_setup().
|
static |
Definition at line 63 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 667 of file textbox.c.
References textbox::cursor, textbox_cursor_dec(), and textbox_cursor_del().
Referenced by textbox_keybinding().
|
static |
Definition at line 673 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 514 of file textbox.c.
References textbox::cursor, and textbox_cursor().
Referenced by textbox_cursor_bkspc(), and textbox_keybinding().
|
static |
Definition at line 552 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 655 of file textbox.c.
References textbox::cursor, textbox::text, and textbox_delete().
Referenced by textbox_cursor_bkspc(), and textbox_keybinding().
|
static |
Definition at line 682 of file textbox.c.
References textbox::cursor, textbox::text, and textbox_delete().
Referenced by textbox_keybinding().
|
static |
Definition at line 690 of file textbox.c.
References textbox::cursor, and textbox_delete().
Referenced by textbox_keybinding().
|
static |
Definition at line 698 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 501 of file textbox.c.
References textbox::cursor, and textbox_cursor().
Referenced by textbox_keybinding().
|
static |
Definition at line 521 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 405 of file textbox.c.
References __textbox_update_pango_text(), textbox::blink, textbox::changed, textbox::cursor, DOT_OFFSET, textbox::flags, _widget::h, textbox::layout, TBFontConfig::metrics, rofi_theme_get_color(), SELECTED, textbox::show_placeholder, TB_EDITABLE, TB_INDICATOR, textbox::tbfc, textbox::tbft, _widget::w, textbox::widget, 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 93 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 387 of file textbox.c.
References textbox::blink_timeout, textbox::layout, and textbox::text.
Referenced by textbox_create().
|
static |
Definition at line 79 of file textbox.c.
References __textbox_update_pango_text(), textbox::changed, textbox::flags, _widget::h, textbox::layout, TB_AUTOHEIGHT, textbox_get_estimated_height(), and textbox::widget.
Referenced by textbox_create().
|
static |
Definition at line 840 of file textbox.c.
References DOT_OFFSET, textbox::flags, TB_AUTOWIDTH, TB_INDICATOR, textbox_get_font_width(), _widget::w, textbox::widget, and widget_padding_get_padding_width().
Referenced by textbox_create().
|
static |
Definition at line 122 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, and WIDGET.
Referenced by textbox_create().
|
static |
Definition at line 75 of file textbox.c.
References textbox_moveresize(), textbox::widget, _widget::x, and _widget::y.
Referenced by textbox_create().
|
static |
Cache storing the estimated width of a digit (ch).
Definition at line 889 of file textbox.c.
Referenced by textbox_get_estimated_ch().
|
static |
Caching for the expected character width.
Definition at line 879 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 812 of file textbox.c.
Referenced by textbox_set_pango_context().
|
static |
Default pango context
Definition at line 53 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 55 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 61 of file textbox.c.
Referenced by textbox_cleanup(), textbox_initialize_font(), textbox_set_pango_context(), and textbox_setup().
|
static |
Default tbfc
Definition at line 58 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 230 of file textbox.c.
Referenced by textbox_font().