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/blenkernel/BKE_icons.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/blenkernel/BKE_icons.h')
-rw-r--r-- | source/blender/blenkernel/BKE_icons.h | 72 |
1 files changed, 37 insertions, 35 deletions
diff --git a/source/blender/blenkernel/BKE_icons.h b/source/blender/blenkernel/BKE_icons.h index abfcd0f19b7..417591e03c5 100644 --- a/source/blender/blenkernel/BKE_icons.h +++ b/source/blender/blenkernel/BKE_icons.h @@ -29,43 +29,43 @@ typedef void (*DrawInfoFreeFP)(void *drawinfo); enum { - /** ID preview: obj is #ID. */ - ICON_DATA_ID = 0, - /** Preview: obj is #PreviewImage */ - ICON_DATA_PREVIEW, - /** 2D triangles: obj is #Icon_Geom */ - ICON_DATA_GEOM, - /** Studiolight */ - ICON_DATA_STUDIOLIGHT, - /** GPencil Layer color preview (annotations): obj is #bGPDlayer */ - ICON_DATA_GPLAYER, + /** ID preview: obj is #ID. */ + ICON_DATA_ID = 0, + /** Preview: obj is #PreviewImage */ + ICON_DATA_PREVIEW, + /** 2D triangles: obj is #Icon_Geom */ + ICON_DATA_GEOM, + /** Studiolight */ + ICON_DATA_STUDIOLIGHT, + /** GPencil Layer color preview (annotations): obj is #bGPDlayer */ + ICON_DATA_GPLAYER, }; struct Icon { - void *drawinfo; - /** - * Data defined by #obj_type - * \note for #ICON_DATA_GEOM the memory is owned by the icon, - * could be made into a flag if we want that to be optional. - */ - void *obj; - char obj_type; - /** Internal use only. */ - char flag; - /** #ID_Type or 0 when not used for ID preview. */ - short id_type; - DrawInfoFreeFP drawinfo_free; + void *drawinfo; + /** + * Data defined by #obj_type + * \note for #ICON_DATA_GEOM the memory is owned by the icon, + * could be made into a flag if we want that to be optional. + */ + void *obj; + char obj_type; + /** Internal use only. */ + char flag; + /** #ID_Type or 0 when not used for ID preview. */ + short id_type; + DrawInfoFreeFP drawinfo_free; }; /** Used for #ICON_DATA_GEOM, assigned to #Icon.obj. */ struct Icon_Geom { - int icon_id; - int coords_len; - int coords_range[2]; - const unsigned char (*coords)[2]; - const unsigned char (*colors)[4]; - /* when not NULL, the memory of coords and colors is a sub-region of this pointer. */ - const void *mem; + int icon_id; + int coords_len; + int coords_range[2]; + const unsigned char (*coords)[2]; + const unsigned char (*colors)[4]; + /* when not NULL, the memory of coords and colors is a sub-region of this pointer. */ + const void *mem; }; typedef struct Icon Icon; @@ -145,8 +145,10 @@ struct PreviewImage *BKE_previewimg_cached_get(const char *name); struct PreviewImage *BKE_previewimg_cached_ensure(const char *name); -struct PreviewImage *BKE_previewimg_cached_thumbnail_read( - const char *name, const char *path, const int source, bool force_update); +struct PreviewImage *BKE_previewimg_cached_thumbnail_read(const char *name, + const char *path, + const int source, + bool force_update); void BKE_previewimg_cached_release(const char *name); void BKE_previewimg_cached_release_pointer(struct PreviewImage *prv); @@ -155,9 +157,9 @@ int BKE_icon_geom_ensure(struct Icon_Geom *geom); struct Icon_Geom *BKE_icon_geom_from_memory(const uchar *data, size_t data_len); struct Icon_Geom *BKE_icon_geom_from_file(const char *filename); -struct ImBuf *BKE_icon_geom_rasterize( - const struct Icon_Geom *geom, - const unsigned int size_x, const unsigned int size_y); +struct ImBuf *BKE_icon_geom_rasterize(const struct Icon_Geom *geom, + const unsigned int size_x, + const unsigned int size_y); int BKE_icon_ensure_studio_light(struct StudioLight *sl, int id_type); |