"Fossies" - the Fresh Open Source Software Archive

Member "darktable-2.6.3/src/common/film.h" (20 Oct 2019, 2451 Bytes) of package /linux/misc/darktable-2.6.3.tar.xz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) C and C++ source code syntax highlighting (style: standard) with prefixed line numbers and code folding option. Alternatively you can here view or download the uninterpreted source code file. For more information about "film.h" see the Fossies "Dox" file reference documentation.

    1 /*
    2     This file is part of darktable,
    3     copyright (c) 2009--2010 johannes hanika.
    4 
    5     darktable is free software: you can redistribute it and/or modify
    6     it under the terms of the GNU General Public License as published by
    7     the Free Software Foundation, either version 3 of the License, or
    8     (at your option) any later version.
    9 
   10     darktable is distributed in the hope that it will be useful,
   11     but WITHOUT ANY WARRANTY; without even the implied warranty of
   12     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
   13     GNU General Public License for more details.
   14 
   15     You should have received a copy of the GNU General Public License
   16     along with darktable.  If not, see <http://www.gnu.org/licenses/>.
   17 */
   18 
   19 #pragma once
   20 
   21 #include "common/darktable.h"
   22 #include "common/dtpthread.h"
   23 
   24 #include <glib.h>
   25 #include <inttypes.h>
   26 
   27 /**
   28  * film roll.
   29  * this is one directory of images on disk.
   30  * also manages the preview image cache.
   31  */
   32 typedef struct dt_film_t
   33 {
   34   int32_t id;
   35   char dirname[512];
   36   dt_pthread_mutex_t images_mutex;
   37   GDir *dir;
   38   int32_t num_images, last_loaded;
   39   int32_t ref;
   40 } dt_film_t;
   41 
   42 void dt_film_init(dt_film_t *film);
   43 void dt_film_cleanup(dt_film_t *film);
   44 /** open film with given id. */
   45 int dt_film_open(const int32_t id);
   46 /** open film with given id. */
   47 int dt_film_open2(dt_film_t *film);
   48 
   49 /** open num-th most recently used film. */
   50 int dt_film_open_recent(const int32_t num);
   51 /** import new film and all images in this directory as a background task(non-recursive, existing films/images
   52  * are respected). */
   53 int dt_film_import(const char *dirname);
   54 /** constructs the lighttable/query setting for this film, respecting stars and filters. */
   55 void dt_film_set_query(const int32_t id);
   56 /** removes this film and all its images from db. */
   57 void dt_film_remove(const int id);
   58 /** checks if film is empty */
   59 int dt_film_is_empty(const int id);
   60 /** Creating a new filmroll */
   61 int dt_film_new(dt_film_t *film, const char *directory);
   62 /** removes all empty film rolls. */
   63 void dt_film_remove_empty();
   64 /** gets all image ids in film. the returned GList has to be freed with g_list_free(). */
   65 GList *dt_film_get_image_ids(const int filmid);
   66 
   67 // modelines: These editor modelines have been set for all relevant files by tools/update_modelines.sh
   68 // vim: shiftwidth=2 expandtab tabstop=2 cindent
   69 // kate: tab-indents: off; indent-width 2; replace-tabs on; indent-mode cstyle; remove-trailing-spaces modified;