XenevaOS
Loading...
Searching...
No Matches
glimpse.h
Go to the documentation of this file.
1
30#ifndef __GLIMPSE_H__
31#define __GLIPMSE_H__
32
33#include <chitralekha.h>
34#include <widgets/base.h>
35#include <widgets/window.h>
36
37#define THUMB_W 200
38#define THUMB_H 200 //this will be downed to 125
39
47
48
63extern void GlimpseWindowPaint(ChWindow* win);
64
75void compute_thumb_size(int src_w, int src_h, int max_w, int max_h,
76 int* out_w, int* out_h);
77
78
90extern void thumbnail_box(ChCanvas* canvas,uint8_t* src, int src_w, int src_h,
91 uint8_t* dst,int dst_x, int dst_y, int dst_w, int dst_h);
92
93
103extern void _Glimpse_draw_thumb(ChCanvas* canv, char* path, int dst_x, int dst_y, int max_w, int max_h);
104
112extern GlimpBox* _Glimpse_create_glimbox(int xloc, int yloc, int width, int height);
113
121extern thumbnail_t* _Glimpse_create_thumbnail(int xloc, int yloc, int width, int height);
122
129extern void _Glimpse_add_thumbnail(GlimpBox* box, thumbnail_t* thumb);
130
136extern void _Glimpse_box_repaint(GlimpBox* box, ChWindow* win);
142#endif
char * path
Definition main.cpp:66
unsigned int uint32_t
Definition acefiex.h:163
unsigned char uint8_t
Definition acefiex.h:161
ChCanvas * canvas
Definition deomain.cpp:92
void compute_thumb_size(int src_w, int src_h, int max_w, int max_h, int *out_w, int *out_h)
compute_thumb_size – computes the best possible thumbnail size out of given image width and height
Definition thumbnail.cpp:128
struct _glimparea_ GlimpBox
void _Glimpse_add_thumbnail(GlimpBox *box, thumbnail_t *thumb)
_Glimpse_add_thumbnail – adds thumbnail box to glimpbox list
Definition thumbnail.cpp:84
GlimpBox * _Glimpse_get_main_glimp()
_Glimpse_get_main_glimp – return main glimp area
Definition main.cpp:131
void thumbnail_box(ChCanvas *canvas, uint8_t *src, int src_w, int src_h, uint8_t *dst, int dst_x, int dst_y, int dst_w, int dst_h)
thumbnail_box – calculate and prepare the thumbnail using box_filter algorithm
Definition thumbnail.cpp:164
void _Glimpse_box_repaint(GlimpBox *box, ChWindow *win)
_Glimpse_box_repaint – repaint glimpse area
Definition thumbnail.cpp:49
thumbnail_t * _Glimpse_create_thumbnail(int xloc, int yloc, int width, int height)
Definition thumbnail.cpp:106
void GlimpseWindowPaint(ChWindow *win)
GlimpseWindowPaint – paint the glimpse window.
Definition glwin.cpp:68
struct _thumbox_ thumbnail_t
GlimpBox * _Glimpse_create_glimbox(int xloc, int yloc, int width, int height)
Definition thumbnail.cpp:65
void _Glimpse_draw_thumb(ChCanvas *canv, char *path, int dst_x, int dst_y, int max_w, int max_h)
_Glimpse_draw_thumb – load and draw thumbnail to canvas
Definition thumbnail.cpp:212
ChWindow * win
Definition namdapha.cpp:45
Definition chitralekha.h:43
Definition window.h:91
Definition glimpse.h:49
bool draw_thumbs
Definition glimpse.h:56
int cur_xloc
Definition glimpse.h:54
int height
Definition glimpse.h:53
list_t * thumblist
Definition glimpse.h:57
int yloc
Definition glimpse.h:51
int cur_yloc
Definition glimpse.h:55
int width
Definition glimpse.h:52
int xloc
Definition glimpse.h:50
Definition list.h:46
Definition glimpse.h:40
uint32_t height
Definition glimpse.h:44
int yloc
Definition glimpse.h:42
uint32_t width
Definition glimpse.h:43
uint8_t * fullImagePixels
Definition glimpse.h:45
int xloc
Definition glimpse.h:41