| 509 |
theseven |
1 |
//
|
|
|
2 |
//
|
|
|
3 |
// Copyright 2011 TheSeven
|
|
|
4 |
//
|
|
|
5 |
//
|
|
|
6 |
// This file is part of emCORE.
|
|
|
7 |
//
|
|
|
8 |
// emCORE is free software: you can redistribute it and/or
|
|
|
9 |
// modify it under the terms of the GNU General Public License as
|
|
|
10 |
// published by the Free Software Foundation, either version 2 of the
|
|
|
11 |
// License, or (at your option) any later version.
|
|
|
12 |
//
|
|
|
13 |
// emCORE is distributed in the hope that it will be useful,
|
|
|
14 |
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
15 |
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
|
|
16 |
// See the GNU General Public License for more details.
|
|
|
17 |
//
|
|
|
18 |
// You should have received a copy of the GNU General Public License along
|
|
|
19 |
// with emCORE. If not, see <http://www.gnu.org/licenses/>.
|
|
|
20 |
//
|
|
|
21 |
//
|
|
|
22 |
|
|
|
23 |
|
|
|
24 |
#ifndef __CHOOSER_RENDERER_ICONFLOW_H__
|
|
|
25 |
#define __CHOOSER_RENDERER_ICONFLOW_H__
|
|
|
26 |
|
|
|
27 |
#include "emcorelib.h"
|
|
|
28 |
#include "libui.h"
|
|
|
29 |
#include "chooser.h"
|
|
|
30 |
|
|
|
31 |
|
| 820 |
theseven |
32 |
#define CHOOSER_RENDERER_ICONFLOW_PARAMS_VERSION 2
|
| 509 |
theseven |
33 |
|
|
|
34 |
struct chooser_renderer_iconflow_params
|
|
|
35 |
{
|
|
|
36 |
int version;
|
|
|
37 |
struct libui_location copy_dest;
|
|
|
38 |
struct libui_surface copy_src;
|
|
|
39 |
struct libui_location bg_dest;
|
|
|
40 |
struct libui_surface bg_src;
|
|
|
41 |
int bg_opacity;
|
|
|
42 |
struct libui_surface fill_dest;
|
|
|
43 |
uint32_t fill_color;
|
|
|
44 |
struct libui_surface viewport;
|
|
|
45 |
struct libui_point text_pos;
|
|
|
46 |
struct libui_point blit_dest;
|
|
|
47 |
struct libui_surface blit_src;
|
|
|
48 |
uint32_t smoothness;
|
|
|
49 |
uint32_t startposition;
|
|
|
50 |
uint32_t iconsinview;
|
|
|
51 |
bool (*preblit)(struct chooser_data* data);
|
|
|
52 |
void (*postblit)(struct chooser_data* data);
|
|
|
53 |
};
|
|
|
54 |
|
|
|
55 |
struct chooser_renderer_iconflow_itemdata
|
|
|
56 |
{
|
|
|
57 |
struct libui_surface icon;
|
|
|
58 |
struct libui_surface icon_selected;
|
| 820 |
theseven |
59 |
const char* text;
|
| 509 |
theseven |
60 |
uint32_t text_color;
|
| 820 |
theseven |
61 |
void (*render)(struct chooser_data* data, const struct chooser_item* item,
|
|
|
62 |
bool selected, int x, int y, int opacity, int textx, int texty);
|
| 509 |
theseven |
63 |
};
|
|
|
64 |
|
|
|
65 |
struct chooser_renderer_iconflow_data
|
|
|
66 |
{
|
|
|
67 |
int viewposition;
|
|
|
68 |
long lastupdate;
|
|
|
69 |
int accumulator;
|
|
|
70 |
};
|
|
|
71 |
|
|
|
72 |
|
|
|
73 |
extern const struct chooser_renderer chooser_renderer_iconflow;
|
|
|
74 |
|
|
|
75 |
|
|
|
76 |
#endif
|