|
Packit Service |
2781ba |
/* This file is part of GEGL.
|
|
Packit Service |
2781ba |
*
|
|
Packit Service |
2781ba |
* This library is free software; you can redistribute it and/or
|
|
Packit Service |
2781ba |
* modify it under the terms of the GNU Lesser General Public
|
|
Packit Service |
2781ba |
* License as published by the Free Software Foundation; either
|
|
Packit Service |
2781ba |
* version 3 of the License, or (at your option) any later version.
|
|
Packit Service |
2781ba |
*
|
|
Packit Service |
2781ba |
* This library is distributed in the hope that it will be useful,
|
|
Packit Service |
2781ba |
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
Packit Service |
2781ba |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
Packit Service |
2781ba |
* Lesser General Public License for more details.
|
|
Packit Service |
2781ba |
*
|
|
Packit Service |
2781ba |
* You should have received a copy of the GNU Lesser General Public
|
|
Packit Service |
2781ba |
* License along with GEGL; if not, see <http://www.gnu.org/licenses/>.
|
|
Packit Service |
2781ba |
*
|
|
Packit Service |
2781ba |
* Copyright 2006, 2007 Øyvind Kolås <pippin@gimp.org>
|
|
Packit Service |
2781ba |
*/
|
|
Packit Service |
2781ba |
|
|
Packit Service |
2781ba |
#include "config.h"
|
|
Packit Service |
2781ba |
#include <gio/gio.h>
|
|
Packit Service |
2781ba |
#include <glib/gprintf.h>
|
|
Packit Service |
2781ba |
|
|
Packit Service |
2781ba |
#include <string.h>
|
|
Packit Service |
2781ba |
#include <errno.h>
|
|
Packit Service |
2781ba |
|
|
Packit Service |
2781ba |
#include "gegl-types.h"
|
|
Packit Service |
2781ba |
#include "gegl-tile-backend.h"
|
|
Packit Service |
2781ba |
#include "gegl-tile-backend-tiledir.h"
|
|
Packit Service |
2781ba |
|
|
Packit Service |
2781ba |
struct _GeglTileBackendTileDir
|
|
Packit Service |
2781ba |
{
|
|
Packit Service |
2781ba |
GeglTileBackend parent_instance;
|
|
Packit Service |
2781ba |
|
|
Packit Service |
2781ba |
gchar *path; /* the base path of the buffer */
|
|
Packit Service |
2781ba |
GFile *buffer_dir;
|
|
Packit Service |
2781ba |
};
|
|
Packit Service |
2781ba |
|
|
Packit Service |
2781ba |
/* These entries are kept in RAM for now, they should be written as an
|
|
Packit Service |
2781ba |
* index to the swap file, at a position specified by a header block,
|
|
Packit Service |
2781ba |
* making the header grow up to a multiple of the size used in this
|
|
Packit Service |
2781ba |
* swap file is probably a good idea
|
|
Packit Service |
2781ba |
*
|
|
Packit Service |
2781ba |
* Serializing the bablformat is probably also a good idea.
|
|
Packit Service |
2781ba |
*/
|
|
Packit Service |
2781ba |
typedef struct _GioEntry GioEntry;
|
|
Packit Service |
2781ba |
|
|
Packit Service |
2781ba |
struct _GioEntry
|
|
Packit Service |
2781ba |
{
|
|
Packit Service |
2781ba |
gint x;
|
|
Packit Service |
2781ba |
gint y;
|
|
Packit Service |
2781ba |
gint z;
|
|
Packit Service |
2781ba |
};
|
|
Packit Service |
2781ba |
|
|
Packit Service |
2781ba |
static gboolean
|
|
Packit Service |
2781ba |
exist_tile (GeglTileSource *store,
|
|
Packit Service |
2781ba |
GeglTile *tile,
|
|
Packit Service |
2781ba |
gint x,
|
|
Packit Service |
2781ba |
gint y,
|
|
Packit Service |
2781ba |
gint z);
|
|
Packit Service |
2781ba |
|
|
Packit Service |
2781ba |
static GFile *make_tile_file (GeglTileBackendTileDir *gio,
|
|
Packit Service |
2781ba |
gint x,
|
|
Packit Service |
2781ba |
gint y,
|
|
Packit Service |
2781ba |
gint z)
|
|
Packit Service |
2781ba |
{
|
|
Packit Service |
2781ba |
gchar buf[64];
|
|
Packit Service |
2781ba |
g_sprintf (buf, "%i-%i-%i", x, y, z);
|
|
Packit Service |
2781ba |
return g_file_get_child (gio->buffer_dir, buf);
|
|
Packit Service |
2781ba |
}
|
|
Packit Service |
2781ba |
|
|
Packit Service |
2781ba |
static inline void
|
|
Packit Service |
2781ba |
gio_entry_read (GeglTileBackendTileDir *gio,
|
|
Packit Service |
2781ba |
GioEntry *entry,
|
|
Packit Service |
2781ba |
guchar *dest)
|
|
Packit Service |
2781ba |
{
|
|
Packit Service |
2781ba |
GFile *file;
|
|
Packit Service |
2781ba |
gint tile_size = gegl_tile_backend_get_tile_size (GEGL_TILE_BACKEND (gio));
|
|
Packit Service |
2781ba |
GFileInputStream *i;
|
|
Packit Service |
2781ba |
gsize bytes_read;
|
|
Packit Service |
2781ba |
|
|
Packit Service |
2781ba |
file = make_tile_file (gio, entry->x, entry->y, entry->z);
|
|
Packit Service |
2781ba |
i = g_file_read (file, NULL, NULL);
|
|
Packit Service |
2781ba |
|
|
Packit Service |
2781ba |
g_input_stream_read_all (G_INPUT_STREAM (i), dest, tile_size, &bytes_read,
|
|
Packit Service |
2781ba |
NULL, NULL);
|
|
Packit Service |
2781ba |
g_assert (bytes_read == tile_size);
|
|
Packit Service |
2781ba |
g_input_stream_close (G_INPUT_STREAM (i), NULL, NULL);
|
|
Packit Service |
2781ba |
|
|
Packit Service |
2781ba |
g_object_unref (G_OBJECT (i));
|
|
Packit Service |
2781ba |
g_object_unref (G_OBJECT (file));
|
|
Packit Service |
2781ba |
}
|
|
Packit Service |
2781ba |
|
|
Packit Service |
2781ba |
static inline void
|
|
Packit Service |
2781ba |
gio_entry_write (GeglTileBackendTileDir *gio,
|
|
Packit Service |
2781ba |
GioEntry *entry,
|
|
Packit Service |
2781ba |
guchar *source)
|
|
Packit Service |
2781ba |
{
|
|
Packit Service |
2781ba |
gint tile_size = gegl_tile_backend_get_tile_size (GEGL_TILE_BACKEND (gio));
|
|
Packit Service |
2781ba |
GFile *file;
|
|
Packit Service |
2781ba |
GFileOutputStream *o;
|
|
Packit Service |
2781ba |
gsize bytes_written;
|
|
Packit Service |
2781ba |
|
|
Packit Service |
2781ba |
file = make_tile_file (gio, entry->x, entry->y, entry->z);
|
|
Packit Service |
2781ba |
o = g_file_replace (file, NULL, FALSE,
|
|
Packit Service |
2781ba |
G_FILE_CREATE_NONE, NULL, NULL);
|
|
Packit Service |
2781ba |
|
|
Packit Service |
2781ba |
g_output_stream_write_all (G_OUTPUT_STREAM (o), source, tile_size,
|
|
Packit Service |
2781ba |
&bytes_written, NULL, NULL);
|
|
Packit Service |
2781ba |
g_assert (bytes_written == tile_size);
|
|
Packit Service |
2781ba |
g_output_stream_close (G_OUTPUT_STREAM (o), NULL, NULL);
|
|
Packit Service |
2781ba |
|
|
Packit Service |
2781ba |
g_object_unref (G_OBJECT (o));
|
|
Packit Service |
2781ba |
g_object_unref (G_OBJECT (file));
|
|
Packit Service |
2781ba |
}
|
|
Packit Service |
2781ba |
|
|
Packit Service |
2781ba |
|
|
Packit Service |
2781ba |
G_DEFINE_TYPE (GeglTileBackendTileDir, gegl_tile_backend_tiledir, GEGL_TYPE_TILE_BACKEND)
|
|
Packit Service |
2781ba |
static GObjectClass * parent_class = NULL;
|
|
Packit Service |
2781ba |
|
|
Packit Service |
2781ba |
static gint allocs = 0;
|
|
Packit Service |
2781ba |
static gint gio_size = 0;
|
|
Packit Service |
2781ba |
static gint peak_allocs = 0;
|
|
Packit Service |
2781ba |
static gint peak_gio_size = 0;
|
|
Packit Service |
2781ba |
|
|
Packit Service |
2781ba |
void
|
|
Packit Service |
2781ba |
gegl_tile_backend_tiledir_stats (void)
|
|
Packit Service |
2781ba |
{
|
|
Packit Service |
2781ba |
g_warning ("leaked: %i chunks (%f mb) peak: %i (%i bytes %fmb))",
|
|
Packit Service |
2781ba |
allocs, gio_size / 1024 / 1024.0,
|
|
Packit Service |
2781ba |
peak_allocs, peak_gio_size, peak_gio_size / 1024 / 1024.0);
|
|
Packit Service |
2781ba |
}
|
|
Packit Service |
2781ba |
|
|
Packit Service |
2781ba |
/* this is the only place that actually should
|
|
Packit Service |
2781ba |
* instantiate tiles, when the cache is large enough
|
|
Packit Service |
2781ba |
* that should make sure we don't hit this function
|
|
Packit Service |
2781ba |
* too often.
|
|
Packit Service |
2781ba |
*/
|
|
Packit Service |
2781ba |
static GeglTile *
|
|
Packit Service |
2781ba |
get_tile (GeglTileSource *tile_store,
|
|
Packit Service |
2781ba |
gint x,
|
|
Packit Service |
2781ba |
gint y,
|
|
Packit Service |
2781ba |
gint z)
|
|
Packit Service |
2781ba |
{
|
|
Packit Service |
2781ba |
GeglTileBackendTileDir *tile_backend_tiledir = GEGL_TILE_BACKEND_TILE_DIR (tile_store);
|
|
Packit Service |
2781ba |
GeglTileBackend *backend = GEGL_TILE_BACKEND (tile_store);
|
|
Packit Service |
2781ba |
GeglTile *tile = NULL;
|
|
Packit Service |
2781ba |
|
|
Packit Service |
2781ba |
if (exist_tile (tile_store, NULL, x, y, z))
|
|
Packit Service |
2781ba |
{
|
|
Packit Service |
2781ba |
GioEntry entry;
|
|
Packit Service |
2781ba |
gint tile_size = gegl_tile_backend_get_tile_size (backend);
|
|
Packit Service |
2781ba |
|
|
Packit Service |
2781ba |
entry.x = x;
|
|
Packit Service |
2781ba |
entry.y = y;
|
|
Packit Service |
2781ba |
entry.z = z;
|
|
Packit Service |
2781ba |
|
|
Packit Service |
2781ba |
tile = gegl_tile_new (tile_size);
|
|
Packit Service |
2781ba |
|
|
Packit Service |
2781ba |
gio_entry_read (tile_backend_tiledir, &entry, gegl_tile_get_data (tile));
|
|
Packit Service |
2781ba |
return tile;
|
|
Packit Service |
2781ba |
}
|
|
Packit Service |
2781ba |
return NULL;
|
|
Packit Service |
2781ba |
}
|
|
Packit Service |
2781ba |
|
|
Packit Service |
2781ba |
static gpointer
|
|
Packit Service |
2781ba |
set_tile (GeglTileSource *store,
|
|
Packit Service |
2781ba |
GeglTile *tile,
|
|
Packit Service |
2781ba |
gint x,
|
|
Packit Service |
2781ba |
gint y,
|
|
Packit Service |
2781ba |
gint z)
|
|
Packit Service |
2781ba |
{
|
|
Packit Service |
2781ba |
GeglTileBackend *backend = GEGL_TILE_BACKEND (store);
|
|
Packit Service |
2781ba |
GeglTileBackendTileDir *tile_backend_tiledir = GEGL_TILE_BACKEND_TILE_DIR (backend);
|
|
Packit Service |
2781ba |
GioEntry entry;
|
|
Packit Service |
2781ba |
|
|
Packit Service |
2781ba |
entry.x = x;
|
|
Packit Service |
2781ba |
entry.y = y;
|
|
Packit Service |
2781ba |
entry.z = z;
|
|
Packit Service |
2781ba |
|
|
Packit Service |
2781ba |
gio_entry_write (tile_backend_tiledir, &entry, gegl_tile_get_data (tile));
|
|
Packit Service |
2781ba |
gegl_tile_mark_as_stored (tile);
|
|
Packit Service |
2781ba |
return NULL;
|
|
Packit Service |
2781ba |
}
|
|
Packit Service |
2781ba |
|
|
Packit Service |
2781ba |
static gpointer
|
|
Packit Service |
2781ba |
void_tile (GeglTileSource *store,
|
|
Packit Service |
2781ba |
GeglTile *tile,
|
|
Packit Service |
2781ba |
gint x,
|
|
Packit Service |
2781ba |
gint y,
|
|
Packit Service |
2781ba |
gint z)
|
|
Packit Service |
2781ba |
{
|
|
Packit Service |
2781ba |
GeglTileBackend *backend = GEGL_TILE_BACKEND (store);
|
|
Packit Service |
2781ba |
GeglTileBackendTileDir *gio = GEGL_TILE_BACKEND_TILE_DIR (backend);
|
|
Packit Service |
2781ba |
GFile *file;
|
|
Packit Service |
2781ba |
|
|
Packit Service |
2781ba |
file = make_tile_file (gio, x, y, z);
|
|
Packit Service |
2781ba |
g_file_delete (file, NULL, NULL);
|
|
Packit Service |
2781ba |
g_object_unref (file);
|
|
Packit Service |
2781ba |
return NULL;
|
|
Packit Service |
2781ba |
}
|
|
Packit Service |
2781ba |
|
|
Packit Service |
2781ba |
static gboolean
|
|
Packit Service |
2781ba |
exist_tile (GeglTileSource *store,
|
|
Packit Service |
2781ba |
GeglTile *tile,
|
|
Packit Service |
2781ba |
gint x,
|
|
Packit Service |
2781ba |
gint y,
|
|
Packit Service |
2781ba |
gint z)
|
|
Packit Service |
2781ba |
{
|
|
Packit Service |
2781ba |
GeglTileBackend *backend = GEGL_TILE_BACKEND (store);
|
|
Packit Service |
2781ba |
GeglTileBackendTileDir *gio = GEGL_TILE_BACKEND_TILE_DIR (backend);
|
|
Packit Service |
2781ba |
GFileInfo *file_info;
|
|
Packit Service |
2781ba |
GFile *file;
|
|
Packit Service |
2781ba |
gboolean found = FALSE;
|
|
Packit Service |
2781ba |
|
|
Packit Service |
2781ba |
file = make_tile_file (gio, x, y, z);
|
|
Packit Service |
2781ba |
file_info = g_file_query_info (file, "standard::*", G_FILE_QUERY_INFO_NONE,
|
|
Packit Service |
2781ba |
NULL, NULL);
|
|
Packit Service |
2781ba |
|
|
Packit Service |
2781ba |
if (file_info)
|
|
Packit Service |
2781ba |
{
|
|
Packit Service |
2781ba |
if (g_file_info_get_file_type (file_info) == G_FILE_TYPE_REGULAR)
|
|
Packit Service |
2781ba |
found = TRUE;
|
|
Packit Service |
2781ba |
g_object_unref (file_info);
|
|
Packit Service |
2781ba |
}
|
|
Packit Service |
2781ba |
g_object_unref (file);
|
|
Packit Service |
2781ba |
return found;
|
|
Packit Service |
2781ba |
}
|
|
Packit Service |
2781ba |
|
|
Packit Service |
2781ba |
enum
|
|
Packit Service |
2781ba |
{
|
|
Packit Service |
2781ba |
PROP_0,
|
|
Packit Service |
2781ba |
PROP_PATH
|
|
Packit Service |
2781ba |
};
|
|
Packit Service |
2781ba |
|
|
Packit Service |
2781ba |
static gpointer
|
|
Packit Service |
2781ba |
gegl_tile_backend_tiledir_command (GeglTileSource *tile_store,
|
|
Packit Service |
2781ba |
GeglTileCommand command,
|
|
Packit Service |
2781ba |
gint x,
|
|
Packit Service |
2781ba |
gint y,
|
|
Packit Service |
2781ba |
gint z,
|
|
Packit Service |
2781ba |
gpointer data)
|
|
Packit Service |
2781ba |
{
|
|
Packit Service |
2781ba |
switch (command)
|
|
Packit Service |
2781ba |
{
|
|
Packit Service |
2781ba |
case GEGL_TILE_GET:
|
|
Packit Service |
2781ba |
return get_tile (tile_store, x, y, z);
|
|
Packit Service |
2781ba |
|
|
Packit Service |
2781ba |
case GEGL_TILE_SET:
|
|
Packit Service |
2781ba |
return set_tile (tile_store, data, x, y, z);
|
|
Packit Service |
2781ba |
|
|
Packit Service |
2781ba |
case GEGL_TILE_IDLE:
|
|
Packit Service |
2781ba |
/* this backend has nothing to do on idle calls */
|
|
Packit Service |
2781ba |
return NULL;
|
|
Packit Service |
2781ba |
|
|
Packit Service |
2781ba |
case GEGL_TILE_VOID:
|
|
Packit Service |
2781ba |
return void_tile (tile_store, data, x, y, z);
|
|
Packit Service |
2781ba |
|
|
Packit Service |
2781ba |
case GEGL_TILE_EXIST:
|
|
Packit Service |
2781ba |
return GINT_TO_POINTER (exist_tile (tile_store, data, x, y, z));
|
|
Packit Service |
2781ba |
|
|
Packit Service |
2781ba |
default:
|
|
Packit Service |
2781ba |
g_assert (command < GEGL_TILE_LAST_COMMAND &&
|
|
Packit Service |
2781ba |
command >= 0);
|
|
Packit Service |
2781ba |
}
|
|
Packit Service |
2781ba |
return NULL;
|
|
Packit Service |
2781ba |
}
|
|
Packit Service |
2781ba |
|
|
Packit Service |
2781ba |
static void
|
|
Packit Service |
2781ba |
set_property (GObject *object,
|
|
Packit Service |
2781ba |
guint property_id,
|
|
Packit Service |
2781ba |
const GValue *value,
|
|
Packit Service |
2781ba |
GParamSpec *pspec)
|
|
Packit Service |
2781ba |
{
|
|
Packit Service |
2781ba |
GeglTileBackendTileDir *self = GEGL_TILE_BACKEND_TILE_DIR (object);
|
|
Packit Service |
2781ba |
|
|
Packit Service |
2781ba |
switch (property_id)
|
|
Packit Service |
2781ba |
{
|
|
Packit Service |
2781ba |
case PROP_PATH:
|
|
Packit Service |
2781ba |
if (self->path)
|
|
Packit Service |
2781ba |
g_free (self->path);
|
|
Packit Service |
2781ba |
self->path = g_value_dup_string (value);
|
|
Packit Service |
2781ba |
break;
|
|
Packit Service |
2781ba |
|
|
Packit Service |
2781ba |
default:
|
|
Packit Service |
2781ba |
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
|
|
Packit Service |
2781ba |
break;
|
|
Packit Service |
2781ba |
}
|
|
Packit Service |
2781ba |
}
|
|
Packit Service |
2781ba |
|
|
Packit Service |
2781ba |
static void
|
|
Packit Service |
2781ba |
get_property (GObject *object,
|
|
Packit Service |
2781ba |
guint property_id,
|
|
Packit Service |
2781ba |
GValue *value,
|
|
Packit Service |
2781ba |
GParamSpec *pspec)
|
|
Packit Service |
2781ba |
{
|
|
Packit Service |
2781ba |
GeglTileBackendTileDir *self = GEGL_TILE_BACKEND_TILE_DIR (object);
|
|
Packit Service |
2781ba |
|
|
Packit Service |
2781ba |
switch (property_id)
|
|
Packit Service |
2781ba |
{
|
|
Packit Service |
2781ba |
case PROP_PATH:
|
|
Packit Service |
2781ba |
g_value_set_string (value, self->path);
|
|
Packit Service |
2781ba |
break;
|
|
Packit Service |
2781ba |
|
|
Packit Service |
2781ba |
default:
|
|
Packit Service |
2781ba |
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
|
|
Packit Service |
2781ba |
break;
|
|
Packit Service |
2781ba |
}
|
|
Packit Service |
2781ba |
}
|
|
Packit Service |
2781ba |
|
|
Packit Service |
2781ba |
static void
|
|
Packit Service |
2781ba |
finalize (GObject *object)
|
|
Packit Service |
2781ba |
{
|
|
Packit Service |
2781ba |
GeglTileBackendTileDir *self = (GeglTileBackendTileDir *) object;
|
|
Packit Service |
2781ba |
GFileEnumerator *enumerator;
|
|
Packit Service |
2781ba |
GFileInfo *info;
|
|
Packit Service |
2781ba |
|
|
Packit Service |
2781ba |
enumerator = g_file_enumerate_children (self->buffer_dir, "standard::*",
|
|
Packit Service |
2781ba |
G_FILE_QUERY_INFO_NONE, NULL, NULL);
|
|
Packit Service |
2781ba |
|
|
Packit Service |
2781ba |
for (info = g_file_enumerator_next_file (enumerator, NULL, NULL);
|
|
Packit Service |
2781ba |
info;
|
|
Packit Service |
2781ba |
info = g_file_enumerator_next_file (enumerator, NULL, NULL))
|
|
Packit Service |
2781ba |
{
|
|
Packit Service |
2781ba |
const gchar *name = g_file_info_get_name (info);
|
|
Packit Service |
2781ba |
if (name)
|
|
Packit Service |
2781ba |
{
|
|
Packit Service |
2781ba |
GFile *file = g_file_get_child (self->buffer_dir, name);
|
|
Packit Service |
2781ba |
if (file)
|
|
Packit Service |
2781ba |
{
|
|
Packit Service |
2781ba |
g_file_delete (file, NULL, NULL);
|
|
Packit Service |
2781ba |
g_object_unref (file);
|
|
Packit Service |
2781ba |
}
|
|
Packit Service |
2781ba |
}
|
|
Packit Service |
2781ba |
g_object_unref (info);
|
|
Packit Service |
2781ba |
}
|
|
Packit Service |
2781ba |
|
|
Packit Service |
2781ba |
g_object_unref (enumerator);
|
|
Packit Service |
2781ba |
|
|
Packit Service |
2781ba |
g_file_delete (self->buffer_dir, NULL, NULL);
|
|
Packit Service |
2781ba |
g_object_unref (self->buffer_dir);
|
|
Packit Service |
2781ba |
|
|
Packit Service |
2781ba |
(*G_OBJECT_CLASS (parent_class)->finalize)(object);
|
|
Packit Service |
2781ba |
}
|
|
Packit Service |
2781ba |
|
|
Packit Service |
2781ba |
static GObject *
|
|
Packit Service |
2781ba |
gegl_tile_backend_tiledir_constructor (GType type,
|
|
Packit Service |
2781ba |
guint n_params,
|
|
Packit Service |
2781ba |
GObjectConstructParam *params)
|
|
Packit Service |
2781ba |
{
|
|
Packit Service |
2781ba |
GObject *object;
|
|
Packit Service |
2781ba |
GeglTileBackendTileDir *gio;
|
|
Packit Service |
2781ba |
|
|
Packit Service |
2781ba |
object = G_OBJECT_CLASS (parent_class)->constructor (type, n_params, params);
|
|
Packit Service |
2781ba |
gio = GEGL_TILE_BACKEND_TILE_DIR (object);
|
|
Packit Service |
2781ba |
|
|
Packit Service |
2781ba |
gio->buffer_dir = g_file_new_for_commandline_arg (gio->path);
|
|
Packit Service |
2781ba |
g_file_make_directory (gio->buffer_dir, NULL, NULL);
|
|
Packit Service |
2781ba |
((GeglTileSource*)(object))->command = gegl_tile_backend_tiledir_command;
|
|
Packit Service |
2781ba |
return object;
|
|
Packit Service |
2781ba |
}
|
|
Packit Service |
2781ba |
|
|
Packit Service |
2781ba |
static void
|
|
Packit Service |
2781ba |
gegl_tile_backend_tiledir_class_init (GeglTileBackendTileDirClass *klass)
|
|
Packit Service |
2781ba |
{
|
|
Packit Service |
2781ba |
GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
|
|
Packit Service |
2781ba |
|
|
Packit Service |
2781ba |
parent_class = g_type_class_peek_parent (klass);
|
|
Packit Service |
2781ba |
|
|
Packit Service |
2781ba |
gobject_class->get_property = get_property;
|
|
Packit Service |
2781ba |
gobject_class->set_property = set_property;
|
|
Packit Service |
2781ba |
gobject_class->constructor = gegl_tile_backend_tiledir_constructor;
|
|
Packit Service |
2781ba |
gobject_class->finalize = finalize;
|
|
Packit Service |
2781ba |
|
|
Packit Service |
2781ba |
g_object_class_install_property (gobject_class, PROP_PATH,
|
|
Packit Service |
2781ba |
g_param_spec_string ("path",
|
|
Packit Service |
2781ba |
"path",
|
|
Packit Service |
2781ba |
"The base path for this backing file for a buffer",
|
|
Packit Service |
2781ba |
NULL,
|
|
Packit Service |
2781ba |
G_PARAM_CONSTRUCT |
|
|
Packit Service |
2781ba |
G_PARAM_READWRITE));
|
|
Packit Service |
2781ba |
}
|
|
Packit Service |
2781ba |
|
|
Packit Service |
2781ba |
static void
|
|
Packit Service |
2781ba |
gegl_tile_backend_tiledir_init (GeglTileBackendTileDir *self)
|
|
Packit Service |
2781ba |
{
|
|
Packit Service |
2781ba |
self->path = NULL;
|
|
Packit Service |
2781ba |
}
|