void
sp_document_request_modified(SPDocument *doc)
{
    if (!doc->modified_id) {
        doc->modified_id = gtk_idle_add_priority(SP_DOCUMENT_UPDATE_PRIORITY, sp_document_idle_handler, doc);
    }
}
Ejemplo n.º 2
0
void scope_setdata(Scope *scope, short *samples)
{
	g_return_if_fail(scope != NULL);
	g_return_if_fail(IS_SCOPE(scope));
        memcpy(scope->y, samples, sizeof(scope->y));
	if (GTK_WIDGET_DRAWABLE(GTK_WIDGET(scope))) {
		if (!scope->idlefunc)
			scope->idlefunc = gtk_idle_add_priority(PRIO, idle_callback, scope);
	}
}
Ejemplo n.º 3
0
void scope_setmarker(Scope *scope, int pointer)
{
	g_return_if_fail(scope != NULL);
	g_return_if_fail(IS_SCOPE(scope));
	if (pointer >= 0 && pointer < SCOPE_WIDTH)
		scope->pointer = pointer;
	if (GTK_WIDGET_DRAWABLE(GTK_WIDGET(scope))) {
		if (!scope->idlefunc)
			scope->idlefunc = gtk_idle_add_priority(PRIO, idle_callback, scope);
	}
}
Ejemplo n.º 4
0
static gint scope_expose(GtkWidget *widget, GdkEventExpose *event)
{
	Scope *scope;

	g_return_val_if_fail(widget != NULL, FALSE);
	g_return_val_if_fail(IS_SCOPE(widget), FALSE);
	g_return_val_if_fail (event != NULL, FALSE);
	if (GTK_WIDGET_DRAWABLE(widget)) {
		scope = SCOPE(widget);
		if (!scope->idlefunc)
			scope->idlefunc = gtk_idle_add_priority(PRIO, idle_callback, scope);
	}
	return FALSE;
}
Ejemplo n.º 5
0
void wxListBox::DoSetFirstItem( int n )
{
    wxCHECK_RET( m_list, wxT("invalid listbox") );

    if (gdk_pointer_is_grabbed () && GTK_WIDGET_HAS_GRAB (m_list))
        return;

    // terribly efficient
    const gchar *vadjustment_key = "gtk-vadjustment";
    guint vadjustment_key_id = g_quark_from_static_string (vadjustment_key);

    GtkAdjustment *adjustment =
       (GtkAdjustment*) gtk_object_get_data_by_id (GTK_OBJECT (m_list), vadjustment_key_id);
    wxCHECK_RET( adjustment, wxT("invalid listbox code") );

    GList *target = g_list_nth( m_list->children, n );
    wxCHECK_RET( target, wxT("invalid listbox index") );

    GtkWidget *item = GTK_WIDGET(target->data);
    wxCHECK_RET( item, wxT("invalid listbox code") );

    if (item->allocation.y == -1)
    {
        wxlistbox_idle_struct* data = new wxlistbox_idle_struct;
        data->m_listbox = this;
        data->m_item = n;
        data->m_tag = gtk_idle_add_priority( 800, wxlistbox_idle_callback, (gpointer) data );

        return;
    }

    float y = item->allocation.y;
    if (y > adjustment->upper - adjustment->page_size)
        y = adjustment->upper - adjustment->page_size;
    gtk_adjustment_set_value( adjustment, y );
}