libxputty 0.1
Loading...
Searching...
No Matches
xmultilistview.h
Go to the documentation of this file.
1/*
2 * 0BSD
3 *
4 * BSD Zero Clause License
5 *
6 * Copyright (c) 2019 Hermann Meyer
7 *
8 * Permission to use, copy, modify, and/or distribute this software for any
9 * purpose with or without fee is hereby granted.
10
11 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
12 * REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
13 * AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
14 * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
15 * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
16 * OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
17 * PERFORMANCE OF THIS SOFTWARE.
18 *
19 */
20
21#pragma once
22
23#ifndef XMULTILISTVIEW_H_
24#define XMULTILISTVIEW_H_
25
26#include "xputty.h"
27
28#ifdef __cplusplus
29extern "C" {
30#endif
31
42typedef struct {
43 char **list_names;
46 cairo_surface_t *folder;
47 cairo_surface_t *folder_select;
48 cairo_surface_t *file;
49 cairo_surface_t *folder_scaled;
50 cairo_surface_t *folder_select_scaled;
51 cairo_surface_t *file_scaled;
53 float scale_up;
63 int column;
65 char pad[4];
67
74void multi_listview_set_active_entry(Widget_t *w, int active);
75
82
92Widget_t* create_multi_listview_viewport(Widget_t *parent, int elem, int width, int height);
93
102Widget_t* add_multi_listview(Widget_t *parent, const char * label,
103 int x, int y, int width, int height);
104
111void multi_listview_mem_free(void *w_, void* user_data);
112
119
127void multi_listview_set_list(Widget_t *listview, char **list, int list_size);
128
135void multi_listview_set_check_dir(Widget_t *listview, int set);
136
143void multi_listview_set_item_size(Widget_t *listview, float set);
144
145#ifdef __cplusplus
146}
147#endif
148
149#endif //XMULTILISTVIEW_H_
ViewMultiList_t - struct to hold information for the listview.
cairo_surface_t * folder_scaled
cairo_surface_t * folder_select_scaled
cairo_surface_t * file_scaled
Widget_t * slider
cairo_surface_t * file
cairo_surface_t * folder
cairo_surface_t * folder_select
Widget_t - struct to hold the basic Widget_t info.
Definition xwidget.h:457
Widget_t * create_multi_listview_viewport(Widget_t *parent, int elem, int width, int height)
create_multi_listview_viewport - create a viewport on a listview to a Widget_t
void multi_listview_set_item_size(Widget_t *listview, float set)
multi_listview_set_item_size - set size for the icons in the viewport
void multi_listview_set_active_entry(Widget_t *w, int active)
multi_listview_set_active_entry - set the active listview entry
void multi_listview_unset_active_entry(Widget_t *w)
multi_listview_unset_active_entry - unset the active listview entry
Widget_t * add_multi_listview(Widget_t *parent, const char *label, int x, int y, int width, int height)
add_label - add a listview to a Widget_t
void multi_listview_set_list(Widget_t *listview, char **list, int list_size)
multi_listview_set_multi_list - set a list to a listview Widget_t
void multi_listview_set_check_dir(Widget_t *listview, int set)
multi_listview_set_check_dir - set optional check if list item is a directory
void multi_listview_remove_list(Widget_t *listview)
multi_listview_remove_list - remove the list from a listview Widget_t
void multi_listview_mem_free(void *w_, void *user_data)
multi_listview_mem_free - release additional used memory when destroy the Widget_t
This file contains definitions and structs used on all platforms. Platform specific definitions are l...