18914
|
1 /*
|
|
2 MPlayer Gui for win32
|
|
3 Copyright (c) 2003 Sascha Sommer <saschasommer@freenet.de>
|
|
4 Copyright (c) 2006 Erik Augustson <erik_27can@yahoo.com>
|
|
5 Copyright (c) 2006 Gianluigi Tiesi <sherpya@netfarm.it>
|
|
6
|
|
7 This program is free software; you can redistribute it and/or modify
|
|
8 it under the terms of the GNU General Public License as published by
|
|
9 the Free Software Foundation; either version 2 of the License, or
|
|
10 (at your option) any later version.
|
|
11
|
|
12 This program is distributed in the hope that it will be useful,
|
|
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
15 GNU General Public License for more details.
|
|
16
|
|
17 You should have received a copy of the GNU General Public License
|
|
18 along with this program; if not, write to the Free Software
|
|
19 Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02111-1307 USA
|
|
20 */
|
|
21
|
|
22 #ifndef _GUI_H
|
|
23 #define _GUI_H
|
|
24 #include <config.h>
|
|
25 #include <playtree.h>
|
|
26 #include <m_config.h>
|
|
27 #include "skinload.h"
|
|
28 #include "playlist.h"
|
|
29
|
|
30 extern char *skinName;
|
|
31 extern float sub_aspect;
|
|
32 extern play_tree_t* playtree;
|
|
33 extern m_config_t* mconfig;
|
|
34
|
|
35 extern NOTIFYICONDATA nid;
|
|
36
|
|
37 typedef struct window_priv_t window_priv_t;
|
|
38 struct window_priv_t
|
|
39 {
|
|
40 HWND hwnd;
|
|
41 image img;
|
|
42 image *background;
|
|
43 HBITMAP bitmap;
|
|
44 int type;
|
|
45 };
|
|
46
|
|
47 typedef struct gui_t gui_t;
|
|
48 struct gui_t
|
|
49 {
|
|
50 /* screenproperties */
|
|
51 int screenw, screenh, screenbpp;
|
|
52 /* window related stuff */
|
|
53 char *classname;
|
|
54 HICON icon;
|
|
55 unsigned int window_priv_count;
|
|
56 window_priv_t **window_priv;
|
|
57
|
|
58 HWND mainwindow;
|
|
59 HWND subwindow;
|
|
60
|
|
61 /* for event handling */
|
|
62 widget *activewidget;
|
|
63
|
|
64 int mousewx, mousewy; /* mousepos inside widget */
|
|
65 int mousex, mousey;
|
|
66
|
|
67 HMENU menu;
|
|
68 HMENU diskmenu;
|
|
69 HMENU traymenu;
|
|
70 HMENU trayplaymenu;
|
|
71 HMENU trayplaybackmenu;
|
|
72 HMENU submenu;
|
|
73 HMENU subtitlemenu;
|
|
74 HMENU aspectmenu;
|
|
75 HMENU dvdmenu;
|
|
76 HMENU playlistmenu;
|
|
77
|
|
78 int skinbrowserwindow;
|
|
79 int playlistwindow;
|
|
80 int aboutwindow;
|
|
81
|
|
82 skin_t *skin;
|
|
83 playlist_t *playlist;
|
|
84
|
|
85 void (*startplay)(gui_t *gui);
|
|
86 void (*updatedisplay)(gui_t *gui, HWND hwnd);
|
|
87 void (*playercontrol)(int event); /* userdefine call back function */
|
|
88 void (*uninit)(gui_t *gui);
|
|
89 };
|
|
90
|
|
91 #define wsShowWindow 8
|
|
92 #define wsHideWindow 16
|
|
93 #define wsShowFrame 1
|
|
94 #define wsMovable 2
|
|
95 #define wsSizeable 4
|
|
96
|
|
97 extern gui_t *create_gui(char *skindir, char *skinName, void (*playercontrol)(int event));
|
|
98 extern int destroy_window(gui_t *gui);
|
|
99 extern int create_window(gui_t *gui, char *skindir);
|
|
100 extern int create_subwindow(gui_t *gui, char *skindir);
|
|
101 extern int parse_filename(char *file, play_tree_t *playtree, m_config_t *mconfig, int clear);
|
|
102 extern void capitalize(char *filename);
|
|
103 extern int import_playtree_playlist_into_gui(play_tree_t *my_playtree, m_config_t *config);
|
|
104
|
|
105 /* Dialogs */
|
|
106 extern void display_playlistwindow(gui_t *gui);
|
|
107 extern void update_playlistwindow(void);
|
|
108 extern int display_openfilewindow(gui_t *gui, int add);
|
|
109 extern void display_openurlwindow(gui_t *gui, int add);
|
|
110 extern void display_skinbrowser(gui_t *gui);
|
|
111 extern void display_chapterselwindow(gui_t *gui);
|
|
112 extern void display_eqwindow(gui_t *gui);
|
|
113 extern void display_prefswindow(gui_t *gui);
|
|
114 extern void display_opensubtitlewindow(gui_t *gui);
|
|
115
|
|
116 #endif
|