Blender  V3.3
IMB_thumbs.h
Go to the documentation of this file.
1 /* SPDX-License-Identifier: GPL-2.0-or-later
2  * Copyright 2007 Blender Foundation. All rights reserved. */
3 
8 #pragma once
9 
10 #ifdef __cplusplus
11 extern "C" {
12 #endif
13 
14 struct ImBuf;
15 
22 typedef enum ThumbSize {
27 
28 typedef enum ThumbSource {
34 
38 #define THUMB_SIZE_MAX (100 * 1024 * 1024)
39 
40 #define PREVIEW_RENDER_DEFAULT_HEIGHT 128
41 #define PREVIEW_RENDER_LARGE_HEIGHT 256
42 
48 #define THUMB_DEFAULT_HASH "00000000000000000000000000000000"
49 
53 struct ImBuf *IMB_thumb_create(const char *filepath,
55  ThumbSource source,
56  struct ImBuf *img);
57 
61 struct ImBuf *IMB_thumb_read(const char *filepath, ThumbSize size);
62 
66 void IMB_thumb_delete(const char *filepath, ThumbSize size);
67 
71 struct ImBuf *IMB_thumb_manage(const char *filepath, ThumbSize size, ThumbSource source);
72 
76 void IMB_thumb_makedirs(void);
77 
81 struct ImBuf *IMB_thumb_load_blend(const char *blen_path,
82  const char *blen_group,
83  const char *blen_id);
84 
88 struct ImBuf *IMB_thumb_load_font(const char *filepath, unsigned int x, unsigned int y);
89 bool IMB_thumb_load_font_get_hash(char *r_hash);
92 
93 /* Threading */
94 
95 void IMB_thumb_locks_acquire(void);
96 void IMB_thumb_locks_release(void);
97 void IMB_thumb_path_lock(const char *path);
98 void IMB_thumb_path_unlock(const char *path);
99 
100 #ifdef __cplusplus
101 }
102 #endif /* __cplusplus */
_GL_VOID GLfloat value _GL_VOID_RET _GL_VOID const GLuint GLboolean *residences _GL_BOOL_RET _GL_VOID GLsizei GLfloat GLfloat GLfloat GLfloat const GLubyte *bitmap _GL_VOID_RET _GL_VOID GLenum const void *lists _GL_VOID_RET _GL_VOID const GLdouble *equation _GL_VOID_RET _GL_VOID GLdouble GLdouble blue _GL_VOID_RET _GL_VOID GLfloat GLfloat blue _GL_VOID_RET _GL_VOID GLint GLint blue _GL_VOID_RET _GL_VOID GLshort GLshort blue _GL_VOID_RET _GL_VOID GLubyte GLubyte blue _GL_VOID_RET _GL_VOID GLuint GLuint blue _GL_VOID_RET _GL_VOID GLushort GLushort blue _GL_VOID_RET _GL_VOID GLbyte GLbyte GLbyte alpha _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble alpha _GL_VOID_RET _GL_VOID GLfloat GLfloat GLfloat alpha _GL_VOID_RET _GL_VOID GLint GLint GLint alpha _GL_VOID_RET _GL_VOID GLshort GLshort GLshort alpha _GL_VOID_RET _GL_VOID GLubyte GLubyte GLubyte alpha _GL_VOID_RET _GL_VOID GLuint GLuint GLuint alpha _GL_VOID_RET _GL_VOID GLushort GLushort GLushort alpha _GL_VOID_RET _GL_VOID GLenum mode _GL_VOID_RET _GL_VOID GLint y
struct ImBuf * IMB_thumb_load_blend(const char *blen_path, const char *blen_group, const char *blen_id)
Definition: thumbs_blend.c:67
void IMB_thumb_makedirs(void)
Definition: thumbs.c:288
ThumbSize
Definition: IMB_thumbs.h:22
@ THB_FAIL
Definition: IMB_thumbs.h:25
@ THB_NORMAL
Definition: IMB_thumbs.h:23
@ THB_LARGE
Definition: IMB_thumbs.h:24
bool IMB_thumb_load_font_get_hash(char *r_hash)
Definition: thumbs_font.c:77
void IMB_thumb_locks_release(void)
Definition: thumbs.c:655
ThumbSource
Definition: IMB_thumbs.h:28
@ THB_SOURCE_IMAGE
Definition: IMB_thumbs.h:29
@ THB_SOURCE_FONT
Definition: IMB_thumbs.h:32
@ THB_SOURCE_BLEND
Definition: IMB_thumbs.h:31
@ THB_SOURCE_MOVIE
Definition: IMB_thumbs.h:30
void IMB_thumb_path_unlock(const char *path)
Definition: thumbs.c:686
struct ImBuf * IMB_thumb_manage(const char *filepath, ThumbSize size, ThumbSource source)
Definition: thumbs.c:516
void IMB_thumb_delete(const char *filepath, ThumbSize size)
Definition: thumbs.c:498
void IMB_thumb_path_lock(const char *path)
Definition: thumbs.c:670
struct ImBuf * IMB_thumb_read(const char *filepath, ThumbSize size)
Definition: thumbs.c:482
void IMB_thumb_locks_acquire(void)
Definition: thumbs.c:639
struct ImBuf * IMB_thumb_load_font(const char *filepath, unsigned int x, unsigned int y)
Definition: thumbs_font.c:44
void IMB_thumb_clear_translations(void)
Definition: thumbs_font.c:30
struct ImBuf * IMB_thumb_create(const char *filepath, ThumbSize size, ThumbSource source, struct ImBuf *img)
Definition: thumbs.c:468
void IMB_thumb_ensure_translations(void)
Definition: thumbs_font.c:37
static DBVT_INLINE btScalar size(const btDbvtVolume &a)
Definition: btDbvt.cpp:52