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

Macros

#define LV_COLOR_BG   0xFF1E1E1E
 
#define LV_COLOR_TEXT   0xFFE0E0E0
 
#define LV_SELECTED_BG   0xFF3A6EA5
 
#define LV_SELECTED_TEXT   0xFFFFFFFF
 
#define LV_COLOR_HOVER_BG   0xFF2A2A2A
 
#define LV_COLOR_HEADER_TEXT   0xFFCCCCCC
 
#define LV_COLOR_HEADER_BG   0xFF2D2D2D
 
#define LV_COLOR_GRID_LINE   0xFF3A3A3A
 
#define COLUMN_RESIZE_HANDLE_PX   4
 
#define MAX_SCANLINE_PX   4096
 
#define BASELINE_RATIO_NUM   4
 
#define BASELINE_RATIO_DEN   5
 

Functions

void OnListViewScroll (ChWidget *wid, ChWindow *win, int currentVal, uint8_t orientation)
 
void OnListViewHScroll (ChWidget *wid, ChWindow *win, int currentVal, uint8_t orientation)
 
void ListViewDraw (ChWidget *wid, ChWindow *win)
 
void ListViewMouseEvent (ChWidget *wid, ChWindow *win, int mx, int my, int button)
 
ListViewChListViewCreate (int x, int y, int w, int h, int itemHeight)
 ChListViewCreate – create a new list view.
 
void ListViewAddColumn (ListView *lv, const char *header, int width, int minWidth)
 
ListItemListViewAddItem (ListView *lv, const char **cell_texts, int cell_count, void *user_data)
 ListViewAddItem – add a new item to the listview.
 
void ListViewSetItemIcon (ListView *lv, int index, ChIcon *icon, int iconW, int iconH)
 ListViewSetItemIcon – add a icon to the item.
 
void ListViewRemoveItem (ListView *lv, int index)
 
void ListViewClear (ListView *lv)
 
void _neon_fill_rect32 (ChCanvas *canv, int stride_px, int x, int y, int w, int h, uint32_t color)
 
void _neon_shift_rect_vertical (uint32_t *fb, int stride_px, int x, int y, int w, int h, int delta_y)
 

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

◆ COLUMN_RESIZE_HANDLE_PX

#define COLUMN_RESIZE_HANDLE_PX   4

◆ LV_COLOR_BG

#define LV_COLOR_BG   0xFF1E1E1E

◆ LV_COLOR_GRID_LINE

#define LV_COLOR_GRID_LINE   0xFF3A3A3A

◆ LV_COLOR_HEADER_BG

#define LV_COLOR_HEADER_BG   0xFF2D2D2D

◆ LV_COLOR_HEADER_TEXT

#define LV_COLOR_HEADER_TEXT   0xFFCCCCCC

◆ LV_COLOR_HOVER_BG

#define LV_COLOR_HOVER_BG   0xFF2A2A2A

◆ LV_COLOR_TEXT

#define LV_COLOR_TEXT   0xFFE0E0E0

◆ LV_SELECTED_BG

#define LV_SELECTED_BG   0xFF3A6EA5

◆ LV_SELECTED_TEXT

#define LV_SELECTED_TEXT   0xFFFFFFFF

◆ MAX_SCANLINE_PX

#define MAX_SCANLINE_PX   4096

Function Documentation

◆ _neon_fill_rect32()

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

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.

◆ _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 
)

◆ ChListViewCreate()

ListView * ChListViewCreate ( int  x,
int  y,
int  w,
int  h,
int  itemHeight 
)

ChListViewCreate – create a new list view.

Parameters
x– X location within the window
y– Y location within the window
w– Width of the view
h– Height of the view
itemHeight– each row item height

◆ ListViewAddColumn()

void ListViewAddColumn ( ListView lv,
const char *  header,
int  width,
int  minWidth 
)

◆ ListViewAddItem()

ListItem * ListViewAddItem ( ListView lv,
const char **  cell_texts,
int  cell_count,
void *  user_data 
)

ListViewAddItem – add a new item to the listview.

Parameters
lv– pointer to the list view
cell_texts– item text with each column details
cell_count– number of cells
user_data– any data that this item holds

◆ ListViewClear()

void ListViewClear ( ListView lv)

◆ ListViewDraw()

void ListViewDraw ( ChWidget wid,
ChWindow win 
)

◆ ListViewMouseEvent()

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

◆ ListViewRemoveItem()

void ListViewRemoveItem ( ListView lv,
int  index 
)

◆ ListViewSetItemIcon()

void ListViewSetItemIcon ( ListView lv,
int  index,
ChIcon icon,
int  iconW,
int  iconH 
)

ListViewSetItemIcon – add a icon to the item.

Parameters
lv– pointer to the list view
index– item index number
icon– icon to add
iconW– icon width
iconH– icon height

◆ OnListViewHScroll()

void OnListViewHScroll ( ChWidget wid,
ChWindow win,
int  currentVal,
uint8_t  orientation 
)

◆ OnListViewScroll()

void OnListViewScroll ( ChWidget wid,
ChWindow win,
int  currentVal,
uint8_t  orientation 
)