eog/collection/eog-collection-model.h
Jens Finke ec67c75892 s/path/uri/
2001-04-23  Jens Finke <jens@gnome.org>

	* cimage.[ch]: s/path/uri/

	* eog_image_loader.c: Added queue and idle loop based loading. Due
	to this, the EogImageLoader doesn't depend on EogCollectionModel
	anymore.
	(eog_image_loader_set_model): Removed.
	(loading_canceled),
	(loading_finished),
	(setup_next_uri): New functions.
	(real_image_loading): Renamed to load_uri and revised.
	(eog_image_loader_start): Append image to load to queue, changed signature.

	* eog_collection_model.c
	(eog_collection_model_get_next_loading_context): Removed.
	(eog_collection_model_real_image_loading): Assemble correct URI
	for cimage objects, call eog_image_loader_start and emit
	INTERVAL_ADDED signale for every single cimage object.
	(eog_collection_model_get_uri): Use cimage_get_uri function.

	* eog_item_factory_simple.c (ii_factory_update_item): Use
	cimage_get_uri.
2001-04-23 09:57:40 +00:00

107 lines
3.7 KiB
C

/* -*- Mode: C; indent-tabs-mode: nil; c-basic-offset: 8 c-style: "K&R" -*- */
/* Eye of Gnome image viewer - EoG collection model
*
* Copyright (C) 2001 The Free Software Foundation
*
* Author: Jens Finke <jens@gnome.org>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
*/
#ifndef EOG_COLLECTION_MODEL_H
#define EOG_COLLECTION_MODEL_H
#include <bonobo/bonobo-storage.h>
#include <gtk/gtkobject.h>
#include "cimage.h"
BEGIN_GNOME_DECLS
#define EOG_COLLECTION_MODEL_TYPE (eog_collection_model_get_type ())
#define EOG_COLLECTION_MODEL(obj) (GTK_CHECK_CAST ((obj), EOG_COLLECTION_MODEL_TYPE, EogCollectionModel))
#define EOG_COLLECTION_MODEL_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), EOG_COLLECTION_MODEL_TYPE, EogCollectionModelClass))
#define EOG_IS_COLLECTION_MODEL(obj) (GTK_CHECK_TYPE ((obj), EOG_COLLECTION_MODEL_TYPE))
#define EOG_IS_COLLECTION_MODEL_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), EOG_COLLECTION_MODEL_TYPE))
typedef struct _EogCollectionModel EogCollectionModel;
typedef struct _EogCollectionModelClass EogCollectionModelClass;
typedef struct _EogCollectionModelPrivate EogCollectionModelPrivate;
#define EOG_MODEL_ID_RANGE -1 /* Random number to indicate that the
following two ids are building a range. */
#define EOG_MODEL_ID_END -2 /* Random number to indicate that the list
will include all ids until the end. */
#define EOG_MODEL_ID_NONE -3 /* Random number, same as NULL otherwise.*/
struct _EogCollectionModel {
GtkObject parent_object;
EogCollectionModelPrivate *priv;
};
struct _EogCollectionModelClass {
GtkObjectClass parent_class;
/* Notification signals */
void (* interval_changed) (EogCollectionModel *model, GList *id_list);
void (* interval_added) (EogCollectionModel *model, GList *id_list);
void (* interval_removed) (EogCollectionModel *model, GList *id_list);
void (* selection_changed) (EogCollectionModel *model);
};
GtkType
eog_collection_model_get_type (void);
EogCollectionModel*
eog_collection_model_new (void);
void
eog_collection_model_construct (EogCollectionModel *model);
void
eog_collection_model_set_uri (EogCollectionModel *model,
const gchar *uri);
gint
eog_collection_model_get_length (EogCollectionModel *model);
CImage*
eog_collection_model_get_image (EogCollectionModel *model,
guint unique_id);
gchar*
eog_collection_model_get_uri (EogCollectionModel *model,
guint unique_id);
GList*
eog_collection_model_get_images (EogCollectionModel *model,
guint min_id, guint len);
void
eog_collection_model_toggle_select_status (EogCollectionModel *model,
guint id);
void
eog_collection_model_set_select_status_all (EogCollectionModel *model,
gboolean status);
END_GNOME_DECLS
#endif /* EOG_COLLECTION_MODEL_H */