2022-05-22 09:55:04 +02:00
|
|
|
#ifndef PREVIEW_H
|
|
|
|
#define PREVIEW_H
|
|
|
|
|
|
|
|
#include <stdlib.h>
|
|
|
|
|
|
|
|
typedef struct {
|
2022-05-23 20:45:35 +02:00
|
|
|
char *name, *ext, *type, *subtype, *script;
|
|
|
|
int priority;
|
2022-05-28 19:33:18 +02:00
|
|
|
size_t script_len;
|
2022-05-22 09:55:04 +02:00
|
|
|
} Preview;
|
|
|
|
|
|
|
|
typedef struct {
|
2022-05-28 16:07:59 +02:00
|
|
|
char *ctpv, *f, *w, *h, *x, *y;
|
2022-05-22 09:55:04 +02:00
|
|
|
} PreviewArgs;
|
|
|
|
|
|
|
|
void init_previews(Preview *ps, size_t len);
|
|
|
|
void cleanup_previews(void);
|
2022-05-23 03:32:09 +02:00
|
|
|
int run_preview(const char *ext, const char *mimetype, PreviewArgs *pa);
|
2022-05-22 22:07:08 +02:00
|
|
|
Preview **get_previews_list(size_t *len);
|
2022-05-22 09:55:04 +02:00
|
|
|
|
|
|
|
#endif
|