XenevaOS
Loading...
Searching...
No Matches
Macros | Functions
gridview.cpp File Reference
#include "gridview.h"
#include <stdlib.h>
Include dependency graph for gridview.cpp:

Macros

#define BASELINE_RATIO_NUM   4
 
#define BASELINE_RATIO_DEN   5
 
#define LABEL_HEIGHT   16
 

Functions

void _neon_fill_rect32 (ChCanvas *canv, int stride_px, int x, int y, int w, int h, uint32_t color)
 
void _neon_cpy_row32 (uint32_t *dst, const uint32_t *src, int w)
 
void _neon_shift_rect_vertical (uint32_t *fb, int stride_px, int x, int y, int w, int h, int delta_y)
 
void ChGridViewMouseEvent (ChWidget *wid, ChWindow *win, int mx, int my, int button)
 
void ChGridViewDraw (ChWidget *gv, ChWindow *win)
 
ChGridViewChGridViewCreate (int x, int y, int w, int h, int columns, int cell_w, int cell_h, int padding)
 ChGridViewCreate – create a new fresh grid view.
 
int ChGridAddThumbnail (ChGridView *gv, ChIcon *icon, const char *label, void *user_data)
 ChGridAddThumbnail – add a thumbnail to the grid view.
 
int ChGridAddWidget (ChGridView *gv, ChWidget *child, void *data)
 
void ChGridViewRemoveItem (ChGridView *gv, int index)
 
void ChGridViewClear (ChGridView *gv)
 
void ChGridViewDrawChildren (ChGridView *gv, ChWindow *win)
 

Detailed Description

BSD 2-Clause License

Copyright (c) 2022-2026, Manas Kamal Choudhury All rights reserved.

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

  1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
  2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

Macro Definition Documentation

◆ BASELINE_RATIO_DEN

#define BASELINE_RATIO_DEN   5

◆ BASELINE_RATIO_NUM

#define BASELINE_RATIO_NUM   4

◆ LABEL_HEIGHT

#define LABEL_HEIGHT   16

Function Documentation

◆ _neon_cpy_row32()

void _neon_cpy_row32 ( uint32_t dst,
const uint32_t src,
int  w 
)
extern

◆ _neon_fill_rect32()

void _neon_fill_rect32 ( ChCanvas canv,
int  stride_px,
int  x,
int  y,
int  w,
int  h,
uint32_t  color 
)
extern

◆ _neon_shift_rect_vertical()

void _neon_shift_rect_vertical ( uint32_t fb,
int  stride_px,
int  x,
int  y,
int  w,
int  h,
int  delta_y 
)
extern

◆ ChGridAddThumbnail()

int ChGridAddThumbnail ( ChGridView gv,
ChIcon icon,
const char *  label,
void *  user_data 
)

ChGridAddThumbnail – add a thumbnail to the grid view.

◆ ChGridAddWidget()

int ChGridAddWidget ( ChGridView gv,
ChWidget child,
void *  data 
)

◆ ChGridViewClear()

void ChGridViewClear ( ChGridView gv)

◆ ChGridViewCreate()

ChGridView * ChGridViewCreate ( int  x,
int  y,
int  w,
int  h,
int  columns,
int  cell_w,
int  cell_h,
int  padding 
)

ChGridViewCreate – create a new fresh grid view.

Parameters
x– najanu moi
y– janibi de toi
w– eitu moi bujam neki??
h– bujubi de toi nije
columns– kiba bhagore lagisi
cell_w– tuk bujabo mon nai
cell_h– eman khiniu nije buji napao ?
padding– olop jaga eribi etu xitur majot, noholi atha khai thakibo

◆ ChGridViewDraw()

void ChGridViewDraw ( ChWidget gv,
ChWindow win 
)

◆ ChGridViewDrawChildren()

void ChGridViewDrawChildren ( ChGridView gv,
ChWindow win 
)

◆ ChGridViewMouseEvent()

void ChGridViewMouseEvent ( ChWidget wid,
ChWindow win,
int  mx,
int  my,
int  button 
)

◆ ChGridViewRemoveItem()

void ChGridViewRemoveItem ( ChGridView gv,
int  index 
)