Lines Matching refs:tooltip
294 struct tooltip *tooltip; member
436 struct tooltip { struct
1679 widget->tooltip = NULL; in widget_create()
1723 if (widget->tooltip) in widget_destroy()
2096 struct tooltip *tooltip = data; in tooltip_redraw_handler() local
2116 cairo_show_text(cr, tooltip->entry); in tooltip_redraw_handler()
2121 get_text_extents(struct display *display, struct tooltip *tooltip) in get_text_extents() argument
2132 cairo_text_extents(cr, tooltip->entry, &extents); in get_text_extents()
2139 window_create_tooltip(struct tooltip *tooltip) in window_create_tooltip() argument
2141 struct widget *parent = tooltip->parent; in window_create_tooltip()
2147 if (tooltip->widget) in window_create_tooltip()
2150 tooltip->widget = window_add_subsurface(parent->window, tooltip, SUBSURFACE_DESYNCHRONIZED); in window_create_tooltip()
2152 extents = get_text_extents(display, tooltip); in window_create_tooltip()
2153 widget_set_redraw_handler(tooltip->widget, tooltip_redraw_handler); in window_create_tooltip()
2154 widget_set_allocation(tooltip->widget, in window_create_tooltip()
2155 tooltip->x, tooltip->y + offset_y, in window_create_tooltip()
2164 struct tooltip *tooltip = parent->tooltip; in widget_destroy_tooltip() local
2167 if (!tooltip) in widget_destroy_tooltip()
2170 if (tooltip->widget) { in widget_destroy_tooltip()
2171 widget_destroy(tooltip->widget); in widget_destroy_tooltip()
2172 tooltip->widget = NULL; in widget_destroy_tooltip()
2175 toytimer_fini(&tooltip->timer); in widget_destroy_tooltip()
2176 free(tooltip->entry); in widget_destroy_tooltip()
2177 free(tooltip); in widget_destroy_tooltip()
2178 parent->tooltip = NULL; in widget_destroy_tooltip()
2184 struct tooltip *tooltip = container_of(tt, struct tooltip, timer); in tooltip_func() local
2186 window_create_tooltip(tooltip); in tooltip_func()
2191 tooltip_timer_reset(struct tooltip *tooltip) in tooltip_timer_reset() argument
2193 toytimer_arm_once_usec(&tooltip->timer, TOOLTIP_TIMEOUT * 1000); in tooltip_timer_reset()
2201 struct tooltip *tooltip = parent->tooltip; in widget_set_tooltip() local
2204 if (tooltip) { in widget_set_tooltip()
2205 tooltip->x = x; in widget_set_tooltip()
2206 tooltip->y = y; in widget_set_tooltip()
2207 tooltip_timer_reset(tooltip); in widget_set_tooltip()
2216 tooltip = malloc(sizeof *tooltip); in widget_set_tooltip()
2217 if (!tooltip) in widget_set_tooltip()
2220 parent->tooltip = tooltip; in widget_set_tooltip()
2221 tooltip->parent = parent; in widget_set_tooltip()
2222 tooltip->widget = NULL; in widget_set_tooltip()
2223 tooltip->x = x; in widget_set_tooltip()
2224 tooltip->y = y; in widget_set_tooltip()
2225 tooltip->entry = strdup(entry); in widget_set_tooltip()
2226 toytimer_init(&tooltip->timer, CLOCK_MONOTONIC, in widget_set_tooltip()
2228 tooltip_timer_reset(tooltip); in widget_set_tooltip()