Sparse notes for developers

********************************************************************************
*SOURCE FILES

- curveeditor_widget.c/.h  : the curve editor widget
- dcraw_api.cc/.h          : dcraw interface
- dcraw.cc/.h              : dcraw sources (sligtly modified)
- dcraw_indi.c             : dcraw interface
- iccjpeg.c/.h             : TODO
- nikon_curve.c/.h         : TODO
- uf_glib.h                : TODO
- uf_gtk.cc/.h             : gtk utilities
- ufobject.cc/.h           : UFObject
- uf_progress.h            : TODO
- nufraw_colorspaces.c/.h  : TODO
- nufraw_conf.c            : configuration management (load, save, parse, ecc)
- nufraw_developer.c       : TODO
- nufraw_embedded.c        : TODO
- nufraw_exiv2.cc          : exif information management
- nufraw.h                 : common definitions (the main include file)
- nufraw_icons.c           : the icons
- nufraw_lensfun.cc        : lensfun interface
- nufraw_main.c            : the main for nufraw binary
- nufraw_main-batch.c      : the main for nufraw-batch binary
- nufraw-main-gimp.c       : the main for gimp plugin
- nufraw_message.c         : TODO
- nufraw_routines.c        : TODO
- nufraw_settings.cc       : TODO
- nufraw_nufraw.c          : nufraw core functions
- nufraw_ui.h              : common include for GUIs
- nufraw_ui.c              : GUI functions for main window
- nufraw_ui_chooser.c      : GUI functions for file chooser
- nufraw_ui_delete.c       : GUI function for delete files
- nufraw_ui_histogram.c    : GUI functions for histograms
- nufraw_ui_lensfun.c      : GUI functions for lensfun
- nufraw_ui_options.c      : GUI functions for options window
- nufraw_ui_saver.c        : GUI function for save or send to gimp
- nufraw_writer.c          : nufraw_write_image function, image files formats management
- wb_presets.c             : list of white balance preset for all supported camera


********************************************************************************
*MAIN DATA STRUCTS

A configuration (conf_data in nufraw.h) is required. The configuration contains mainly the image adjustment.

The variable name for configuration are rc, cmd and conf, depending on the origin: 
- rc for the default configuration (loaded from home user file)
- cmd for configuration options from the command line
- conf for the configuration options 
the three conf file are normally merged in the configuration inside the uf data.

nufraw_data (define in nufraw.h) is the global data required at runtime.
It contains images and thumbnail data, the applied configuration, raw data, ecc.

nufraw_image_data TODO

developer_data TODO

DeveloperMode:
- display_developer : TODO
- file_developer    : TODO
-auto_developer     : TODO

UFObject:
Ufobjet is a generic container for data or group of data.
White balance settings uses ufobject

nUFRawPhase:
- nufraw_raw_phase       : TODO
- nufraw_first_phase     : TODO
- nufraw_transform_phase : TODO
- nufraw_develop_phase   : TODO
- nufraw_display_phase   : TODO


********************************************************************************
*MAIN OPERATIVE SEQUENCE

Prepare configuration and nufraw_data:
- conf_load : load configuration from user default (UF_RC_FILE) in rc
- ui_conf_load : load UI configuration in uiconf (not for batch mode)
- nufraw_process_arg : parse command line options in cmd
- conf_file_load : load configuration from "-C/--conf IDfile" in conf (apply a different configuration)
- nufraw_open : init uf struct, load uf->conf for ID files 
- nufraw_config : merge uf->conf, rc, conf and cmd in uf->conf

nufraw_load_raw (nufraw_nufraw.c):
- TODO

nufraw_convert_image (nufraw_nufraw.c):

- nufraw_developer_prepare:
  -  TODO

- nufraw_convert_image_raw:
  - nufraw_convert_import_buffer :
  - nufraw_shave_hotpixels       
  - dcraw_wavelet_denoise (not for XTrans sensor)
  - dcraw_finalize_raw
  - nufraw_despeckle 
  - nufraw_prepare_tca
  - nufraw_convert_image_tca
  
- nufraw_convert_prepare_first_buffer
  - 
  
- nufraw_convert_image_first
  - nufraw_convertshrink
  - dcraw_flip_image
  - dcraw_wavelet_denoise_shrinked (only for XTrans sensor)
  - nufraw_convert_reverse_wb
  
- nufraw_convert_prepare_transform_buffer
  -  TODO
  
- nufraw_convert_image_vignetting
  -  TODO
  
- nufraw_convert_image_transform
  -  TODO

Image is saved using nufraw_write_image in 


********************************************************************************
*GUI NOTES

GUI is used both for nufraw standalone and for nufraw-gimp plugin
GUI configuration (window size, expanders state, etc) is separated from image configuration.
GUI code is in the nufraw_ui* files. Some common function are in uf_gtk and in curveeditor_widget

nufraw_get_image TODO

gdk_threads TODO

draw_area TODO
nufraw_convert_image_area TODO

nufraw_invalidate_layer TODO

GtkImageView TODO


