Statistics
| Branch: | Revision:

chunker-player / chunker_player / player_gui.h @ 6f1fe643

History | View | Annotate | Download (1.43 KB)

1
#ifndef _CHUNKER_PLAYER_GUI_H
2
#define _CHUNKER_PLAYER_GUI_H
3

    
4
#include "player_defines.h"
5
#include "player_core.h"
6
#include "chunker_player.h"
7
#include <SDL.h>
8
#include <SDL_mutex.h>
9
#include <SDL_ttf.h>
10
#include <SDL_image.h>
11

    
12
typedef struct SButton
13
{
14
        int Hover;
15
        int Visible;
16
        int XOffset;
17
        SDL_Rect ButtonIconBox;
18
        SDL_Surface* ButtonIcon;
19
        SDL_Surface* ButtonHoverIcon;
20
        struct SButton* ToggledButton;
21
        void (*HoverCallback)();
22
        void (*LButtonUpCallback)();
23
} SButton;
24

    
25
int FullscreenWidth;
26
int FullscreenHeight;
27

    
28
float ratio;
29
SDL_Cursor *defaultCursor;
30
SDL_Cursor *handCursor;
31

    
32
int ChunkerPlayerGUI_Init();
33
void ChunkerPlayerGUI_Close();
34
void ChunkerPlayerGUI_HandleResize(int w, int h);
35
void ChunkerPlayerGUI_HandleGetFocus();
36
void ChunkerPlayerGUI_HandleMouseMotion(int x, int y);
37
void ChunkerPlayerGUI_HandleLButton(int x, int y);
38
void ChunkerPlayerGUI_HandleKey();
39
void ChunkerPlayerGUI_SetupOverlayRect(SChannel* channel);
40
void ChunkerPlayerGUI_ForceResize(int w, int h);
41
void ChunkerPlayerGUI_SetChannelTitle(char* title);
42
void ChunkerPlayerGUI_SetStatsText(char* audio_text, char* video_text, int ledstatus);
43
void ChunkerPlayerGUI_ToggleFullscreen();
44
void ChunkerPlayerGUI_ChannelSwitched();
45
void GetScreenSizeFromOverlay(int overlayWidth, int overlayHeight, int* screenWidth, int* screenHeight);
46
void ChunkerPlayerGUI_AspectRatioResize(float aspect_ratio, int width, int height, int* out_width, int* out_height);
47

    
48
SButton Buttons[NBUTTONS];
49

    
50
#endif