vitunes
Main Page
Data Structures
Files
File List
All
Data Structures
src
paint.h
1
/*
2
* Copyright (c) 2010, 2011, 2012 Ryan Flannery <ryan.flannery@gmail.com>
3
*
4
* Permission to use, copy, modify, and distribute this software for any
5
* purpose with or without fee is hereby granted, provided that the above
6
* copyright notice and this permission notice appear in all copies.
7
*
8
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
9
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
10
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
11
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
12
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
13
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
14
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
15
*/
16
17
#ifndef PAINT_H
18
#define PAINT_H
19
20
#include "compat/compat.h"
21
22
#include <curses.h>
23
#include <math.h>
24
#include <string.h>
25
#include <stdarg.h>
26
#include <stdio.h>
27
#include <time.h>
28
29
#include "enums.h"
30
#include "meta_info.h"
31
#include "player/player.h"
32
#include "playlist.h"
33
#include "uinterface.h"
34
#include "vitunes.h"
35
36
/* colors used by paint - each of these will be a number for a COLOR_PAIR */
37
typedef
struct
{
38
/* visual dividers of windows */
39
int
bars;
40
41
/* individual windows */
42
int
player;
43
int
status;
44
int
library;
45
int
playlist
;
46
47
/* error/info messages */
48
int
errors;
49
int
messages;
50
51
/* empty rows in library and playlist window */
52
int
tildas_library;
53
int
tildas_playlist;
54
55
/* currently playing rows in the library & playlist windows */
56
int
playing_library;
57
int
playing_playlist;
58
59
/* current row in inactive window */
60
int
current_inactive;
61
62
/* current row in active window */
63
int
current_active;
64
65
/* individual fields in the playlist window */
66
int
cinfos[MI_NUM_CINFO];
67
bool
cinfos_set[MI_NUM_CINFO];
68
69
}
_colors
;
70
extern
_colors
colors;
71
72
/* routines for painting each window */
73
void
paint_status_bar();
74
void
paint_player();
75
void
paint_library();
76
void
paint_playlist();
77
void
paint_borders();
78
void
paint_all();
79
80
extern
bool
showing_file_info;
81
void
paint_playlist_file_info(
const
meta_info
*m);
82
83
/* routines for painting errors/messages in the command/status window */
84
void
paint_error(
char
*fmt, ...);
85
void
paint_message(
char
*fmt, ...);
86
87
/* for setting up and working with the colors */
88
void
paint_setup_colors();
89
int
paint_str2item(
const
char
*str);
90
int
paint_str2color(
const
char
*str);
91
92
#endif
Generated on Mon Feb 29 2016 23:43:53 for vitunes by
1.8.2