diff options
author | Campbell Barton <ideasman42@gmail.com> | 2019-04-17 07:17:24 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2019-04-17 07:21:24 +0300 |
commit | e12c08e8d170b7ca40f204a5b0423c23a9fbc2c1 (patch) | |
tree | 8cf3453d12edb177a218ef8009357518ec6cab6a /source/blender/imbuf/intern/IMB_filetype.h | |
parent | b3dabc200a4b0399ec6b81f2ff2730d07b44fcaa (diff) |
ClangFormat: apply to source, most of intern
Apply clang format as proposed in T53211.
For details on usage and instructions for migrating branches
without conflicts, see:
https://wiki.blender.org/wiki/Tools/ClangFormat
Diffstat (limited to 'source/blender/imbuf/intern/IMB_filetype.h')
-rw-r--r-- | source/blender/imbuf/intern/IMB_filetype.h | 95 |
1 files changed, 66 insertions, 29 deletions
diff --git a/source/blender/imbuf/intern/IMB_filetype.h b/source/blender/imbuf/intern/IMB_filetype.h index 8ce1a293d0f..5048414ac65 100644 --- a/source/blender/imbuf/intern/IMB_filetype.h +++ b/source/blender/imbuf/intern/IMB_filetype.h @@ -18,7 +18,6 @@ * \ingroup imbuf */ - #ifndef __IMB_FILETYPE_H__ #define __IMB_FILETYPE_H__ @@ -26,23 +25,31 @@ struct ImBuf; -#define IM_FTYPE_FLOAT 1 +#define IM_FTYPE_FLOAT 1 typedef struct ImFileType { - void (*init)(void); - void (*exit)(void); - - int (*is_a)(const unsigned char *buf); - int (*is_a_filepath)(const char *name); - int (*ftype)(const struct ImFileType *type, struct ImBuf *ibuf); - struct ImBuf *(*load)(const unsigned char *mem, size_t size, int flags, char colorspace[IM_MAX_SPACE]); - struct ImBuf *(*load_filepath)(const char *name, int flags, char colorspace[IM_MAX_SPACE]); - int (*save)(struct ImBuf *ibuf, const char *name, int flags); - void (*load_tile)(struct ImBuf *ibuf, const unsigned char *mem, size_t size, int tx, int ty, unsigned int *rect); - - int flag; - int filetype; - int default_save_role; + void (*init)(void); + void (*exit)(void); + + int (*is_a)(const unsigned char *buf); + int (*is_a_filepath)(const char *name); + int (*ftype)(const struct ImFileType *type, struct ImBuf *ibuf); + struct ImBuf *(*load)(const unsigned char *mem, + size_t size, + int flags, + char colorspace[IM_MAX_SPACE]); + struct ImBuf *(*load_filepath)(const char *name, int flags, char colorspace[IM_MAX_SPACE]); + int (*save)(struct ImBuf *ibuf, const char *name, int flags); + void (*load_tile)(struct ImBuf *ibuf, + const unsigned char *mem, + size_t size, + int tx, + int ty, + unsigned int *rect); + + int flag; + int filetype; + int default_save_role; } ImFileType; extern const ImFileType IMB_FILE_TYPES[]; @@ -61,56 +68,86 @@ void imb_tile_cache_tile_free(struct ImBuf *ibuf, int tx, int ty); /* png */ int imb_is_a_png(const unsigned char *buf); -struct ImBuf *imb_loadpng(const unsigned char *mem, size_t size, int flags, char colorspace[IM_MAX_SPACE]); +struct ImBuf *imb_loadpng(const unsigned char *mem, + size_t size, + int flags, + char colorspace[IM_MAX_SPACE]); int imb_savepng(struct ImBuf *ibuf, const char *name, int flags); /* targa */ int imb_is_a_targa(const unsigned char *buf); -struct ImBuf *imb_loadtarga(const unsigned char *mem, size_t size, int flags, char colorspace[IM_MAX_SPACE]); +struct ImBuf *imb_loadtarga(const unsigned char *mem, + size_t size, + int flags, + char colorspace[IM_MAX_SPACE]); int imb_savetarga(struct ImBuf *ibuf, const char *name, int flags); /* iris */ int imb_is_a_iris(const unsigned char *mem); -struct ImBuf *imb_loadiris(const unsigned char *mem, size_t size, int flags, char colorspace[IM_MAX_SPACE]); +struct ImBuf *imb_loadiris(const unsigned char *mem, + size_t size, + int flags, + char colorspace[IM_MAX_SPACE]); int imb_saveiris(struct ImBuf *ibuf, const char *name, int flags); /* jp2 */ int imb_is_a_jp2(const unsigned char *buf); -struct ImBuf *imb_load_jp2(const unsigned char *mem, size_t size, int flags, char colorspace[IM_MAX_SPACE]); +struct ImBuf *imb_load_jp2(const unsigned char *mem, + size_t size, + int flags, + char colorspace[IM_MAX_SPACE]); struct ImBuf *imb_load_jp2_filepath(const char *name, int flags, char colorspace[IM_MAX_SPACE]); int imb_save_jp2(struct ImBuf *ibuf, const char *name, int flags); /* jpeg */ int imb_is_a_jpeg(const unsigned char *mem); int imb_savejpeg(struct ImBuf *ibuf, const char *name, int flags); -struct ImBuf *imb_load_jpeg(const unsigned char *buffer, size_t size, int flags, char colorspace[IM_MAX_SPACE]); +struct ImBuf *imb_load_jpeg(const unsigned char *buffer, + size_t size, + int flags, + char colorspace[IM_MAX_SPACE]); /* bmp */ int imb_is_a_bmp(const unsigned char *buf); -struct ImBuf *imb_bmp_decode(const unsigned char *mem, size_t size, int flags, char colorspace[IM_MAX_SPACE]); +struct ImBuf *imb_bmp_decode(const unsigned char *mem, + size_t size, + int flags, + char colorspace[IM_MAX_SPACE]); int imb_savebmp(struct ImBuf *ibuf, const char *name, int flags); /* cineon */ int imb_is_cineon(const unsigned char *buf); int imb_save_cineon(struct ImBuf *buf, const char *name, int flags); -struct ImBuf *imb_load_cineon(const unsigned char *mem, size_t size, int flags, char colorspace[IM_MAX_SPACE]); +struct ImBuf *imb_load_cineon(const unsigned char *mem, + size_t size, + int flags, + char colorspace[IM_MAX_SPACE]); /* dpx */ int imb_is_dpx(const unsigned char *buf); int imb_save_dpx(struct ImBuf *buf, const char *name, int flags); -struct ImBuf *imb_load_dpx(const unsigned char *mem, size_t size, int flags, char colorspace[IM_MAX_SPACE]); +struct ImBuf *imb_load_dpx(const unsigned char *mem, + size_t size, + int flags, + char colorspace[IM_MAX_SPACE]); /* hdr */ int imb_is_a_hdr(const unsigned char *buf); -struct ImBuf *imb_loadhdr(const unsigned char *mem, size_t size, int flags, char colorspace[IM_MAX_SPACE]); +struct ImBuf *imb_loadhdr(const unsigned char *mem, + size_t size, + int flags, + char colorspace[IM_MAX_SPACE]); int imb_savehdr(struct ImBuf *ibuf, const char *name, int flags); /* tiff */ void imb_inittiff(void); int imb_is_a_tiff(const unsigned char *buf); -struct ImBuf *imb_loadtiff(const unsigned char *mem, size_t size, int flags, char colorspace[IM_MAX_SPACE]); -void imb_loadtiletiff(struct ImBuf *ibuf, const unsigned char *mem, size_t size, - int tx, int ty, unsigned int *rect); +struct ImBuf *imb_loadtiff(const unsigned char *mem, + size_t size, + int flags, + char colorspace[IM_MAX_SPACE]); +void imb_loadtiletiff( + struct ImBuf *ibuf, const unsigned char *mem, size_t size, int tx, int ty, unsigned int *rect); int imb_savetiff(struct ImBuf *ibuf, const char *name, int flags); -#endif /* __IMB_FILETYPE_H__ */ +#endif /* __IMB_FILETYPE_H__ */ |