LINUX.ORG.RU

InvalidateRect


0

0

Есть ли аналог InvalidateRect в GTK. Исплользую gtk_signal_emit_by_name(GTK_OBJECT(g_panel), "event"), всё завасает. Рекурсии нигде нет.

anonymous

хехе .. такой вот глобальный инвалидатор пойдет?

void
invalidate(void **smt)
{
      *smt = 0;
}

lg ★★
()
Ответ на: комментарий от anonymous

запрос называется ClearArea в X протоколе ..

lg ★★
()
Ответ на: комментарий от anonymous

---------------------------------------------------------------------- gtk_widget_queue_draw_area ()

void gtk_widget_queue_draw_area (GtkWidget *widget, gint x, gint y, gint width, gint height);

Invalidates the rectangular area of widget defined by x, y, width and height by calling gdk_window_invalidate_rect() on the widget's window and all its child windows. Once the main loop becomes idle (after the current batch of events has been processed, roughly), the window will receive expose events for the union of all regions that have been invalidated.

Normally you would only use this function in widget implementations. You might also use it, or gdk_window_invalidate_rect() directly, to schedule a redraw of a GtkDrawingArea or some portion thereof.

Frequently you can just call gdk_window_invalidate_rect() or gdk_window_invalidate_region() instead of this function. Those functions will invalidate only a single window, instead of the widget and all its children.

The advantage of adding to the invalidated region compared to simply drawing immediately is efficiency; using an invalid region ensures that you only have to redraw one time.

widget : a GtkWidget x : x coordinate of upper-left corner of rectangle to redraw y : y coordinate of upper-left corner of rectangle to redraw width : width of region to draw height : height of region to draw ------------------------------------------------------------------------ Read /usr/share/gtk-doc/html/gtk/gtk.html

anonymous
()
Ответ на: комментарий от anonymous

Спасибо всем. Я разобрался с проблемой другим способом.

anonymous
()
Вы не можете добавлять комментарии в эту тему. Тема перемещена в архив.