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
62extern void GlimpseWindowPaint(ChWindow* win);
63
74void compute_thumb_size(int src_w, int src_h, int max_w, int max_h, int* out_w, int* out_h);
75
87extern void thumbnail_box(ChCanvas* canvas,
88 uint8_t* src,
89 int src_w,
90 int src_h,
91 uint8_t* dst,
92 int dst_x,
93 int dst_y,
94 int dst_w,
95 int dst_h);
96
106extern void
107_Glimpse_draw_thumb(ChCanvas* canv, char* path, int dst_x, int dst_y, int max_w, int max_h);
108
116extern GlimpBox* _Glimpse_create_glimbox(int xloc, int yloc, int width, int height);
117
125extern thumbnail_t* _Glimpse_create_thumbnail(int xloc, int yloc, int width, int height);
126
133extern void _Glimpse_add_thumbnail(GlimpBox* box, thumbnail_t* thumb);
134
140extern void _Glimpse_box_repaint(GlimpBox* box, ChWindow* win);
146#endif
char * path
Definition main.cpp:68
unsigned int uint32_t
Definition acefiex.h:163
unsigned char uint8_t
Definition acefiex.h:161
ChCanvas * canvas
Definition deomain.cpp:91
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:125
struct _glimparea_ GlimpBox
void _Glimpse_add_thumbnail(GlimpBox *box, thumbnail_t *thumb)
_Glimpse_add_thumbnail – adds thumbnail box to glimpbox list
Definition thumbnail.cpp:83
GlimpBox * _Glimpse_get_main_glimp()
_Glimpse_get_main_glimp – return main glimp area
Definition main.cpp:215
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:158
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:105
void GlimpseWindowPaint(ChWindow *win)
GlimpseWindowPaint – paint the glimpse window.
Definition glwin.cpp:79
struct _thumbox_ thumbnail_t
GlimpBox * _Glimpse_create_glimbox(int xloc, int yloc, int width, int height)
Definition thumbnail.cpp:64
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:213
ChWindow * win
Definition namdapha.cpp:54
Definition chitralekha.h:40
Definition window.h:99
Definition glimpse.h:48
bool draw_thumbs
Definition glimpse.h:55
int cur_xloc
Definition glimpse.h:53
int height
Definition glimpse.h:52
list_t * thumblist
Definition glimpse.h:56
int yloc
Definition glimpse.h:50
int cur_yloc
Definition glimpse.h:54
int width
Definition glimpse.h:51
int xloc
Definition glimpse.h:49
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