annotate gui/win32/gui.h @ 36949:6593a01b08c2

Change variable in switch statement in Win32 GUI. Adjust the code to the X11/GTK GUI.
author ib
date Sun, 23 Mar 2014 11:57:18 +0000
parents 7affacef2f88
children 84c93a60ead3
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
23077
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
1 /*
23079
8e9b11648f40 Use proper GPL header.
diego
parents: 23078
diff changeset
2 * MPlayer GUI for Win32
8e9b11648f40 Use proper GPL header.
diego
parents: 23078
diff changeset
3 * Copyright (C) 2003 Sascha Sommer <saschasommer@freenet.de>
8e9b11648f40 Use proper GPL header.
diego
parents: 23078
diff changeset
4 * Copyright (C) 2006 Erik Augustson <erik_27can@yahoo.com>
8e9b11648f40 Use proper GPL header.
diego
parents: 23078
diff changeset
5 * Copyright (C) 2006 Gianluigi Tiesi <sherpya@netfarm.it>
8e9b11648f40 Use proper GPL header.
diego
parents: 23078
diff changeset
6 *
8e9b11648f40 Use proper GPL header.
diego
parents: 23078
diff changeset
7 * This file is part of MPlayer.
8e9b11648f40 Use proper GPL header.
diego
parents: 23078
diff changeset
8 *
8e9b11648f40 Use proper GPL header.
diego
parents: 23078
diff changeset
9 * MPlayer is free software; you can redistribute it and/or modify
8e9b11648f40 Use proper GPL header.
diego
parents: 23078
diff changeset
10 * it under the terms of the GNU General Public License as published by
8e9b11648f40 Use proper GPL header.
diego
parents: 23078
diff changeset
11 * the Free Software Foundation; either version 2 of the License, or
8e9b11648f40 Use proper GPL header.
diego
parents: 23078
diff changeset
12 * (at your option) any later version.
8e9b11648f40 Use proper GPL header.
diego
parents: 23078
diff changeset
13 *
8e9b11648f40 Use proper GPL header.
diego
parents: 23078
diff changeset
14 * MPlayer is distributed in the hope that it will be useful,
8e9b11648f40 Use proper GPL header.
diego
parents: 23078
diff changeset
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
8e9b11648f40 Use proper GPL header.
diego
parents: 23078
diff changeset
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
8e9b11648f40 Use proper GPL header.
diego
parents: 23078
diff changeset
17 * GNU General Public License for more details.
8e9b11648f40 Use proper GPL header.
diego
parents: 23078
diff changeset
18 *
26457
9ba6d4487292 Use standard GPL header.
diego
parents: 26193
diff changeset
19 * You should have received a copy of the GNU General Public License along
9ba6d4487292 Use standard GPL header.
diego
parents: 26193
diff changeset
20 * with MPlayer; if not, write to the Free Software Foundation, Inc.,
9ba6d4487292 Use standard GPL header.
diego
parents: 26193
diff changeset
21 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
23079
8e9b11648f40 Use proper GPL header.
diego
parents: 23078
diff changeset
22 */
23077
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
23
26029
4129c8cfa742 Add MPLAYER_ prefix to multiple inclusion guards.
diego
parents: 25535
diff changeset
24 #ifndef MPLAYER_GUI_GUI_H
4129c8cfa742 Add MPLAYER_ prefix to multiple inclusion guards.
diego
parents: 25535
diff changeset
25 #define MPLAYER_GUI_GUI_H
23689
3f0d00abc073 Do not use leading underscores in multiple inclusion guards, they are reserved.
diego
parents: 23685
diff changeset
26
23123
21e29d5932c5 header / declarations cleanup, also fixes broken compilation.
vayne
parents: 23091
diff changeset
27 #include "mplayer.h"
23091
52488bb09d90 Consistently use quotes instead of angled brackets in #include
diego
parents: 23079
diff changeset
28 #include "playtree.h"
52488bb09d90 Consistently use quotes instead of angled brackets in #include
diego
parents: 23079
diff changeset
29 #include "m_config.h"
23077
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
30 #include "skinload.h"
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
31 #include "playlist.h"
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
32
36053
7affacef2f88 Define "MPlayer" string.
ib
parents: 35521
diff changeset
33 /* Name of the program the GUI utilizes */
7affacef2f88 Define "MPlayer" string.
ib
parents: 35521
diff changeset
34 #define MPlayer "MPlayer"
7affacef2f88 Define "MPlayer" string.
ib
parents: 35521
diff changeset
35
34697
ac6b38cd0d45 Rename sub window video window.
ib
parents: 34163
diff changeset
36 extern float video_aspect;
23077
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
37 extern play_tree_t* playtree;
34697
ac6b38cd0d45 Rename sub window video window.
ib
parents: 34163
diff changeset
38 extern int video_window;
26193
609236ad27f4 more header / declaration cleanups; fixes a lot of warnings as well as a preempt to removal of redundant wincfg.h.
vayne
parents: 26029
diff changeset
39 extern int console;
23077
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
40 extern NOTIFYICONDATA nid;
32067
548499b3f354 Move codecname extern variable declaration to gui.h, which is better suited.
diego
parents: 31533
diff changeset
41 extern char *codecname;
23077
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
42
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
43 typedef struct window_priv_t window_priv_t;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
44 struct window_priv_t
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
45 {
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
46 HWND hwnd;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
47 image img;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
48 image *background;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
49 HBITMAP bitmap;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
50 int type;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
51 };
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
52
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
53 typedef struct gui_t gui_t;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
54 struct gui_t
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
55 {
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
56 /* screenproperties */
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
57 int screenw, screenh, screenbpp;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
58 /* window related stuff */
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
59 char *classname;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
60 HICON icon;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
61 unsigned int window_priv_count;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
62 window_priv_t **window_priv;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
63
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
64 HWND mainwindow;
34697
ac6b38cd0d45 Rename sub window video window.
ib
parents: 34163
diff changeset
65 HWND videowindow;
23077
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
66
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
67 /* for event handling */
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
68 widget *activewidget;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
69
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
70 int mousewx, mousewy; /* mousepos inside widget */
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
71 int mousex, mousey;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
72
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
73 HMENU menu;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
74 HMENU diskmenu;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
75 HMENU traymenu;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
76 HMENU trayplaymenu;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
77 HMENU trayplaybackmenu;
34697
ac6b38cd0d45 Rename sub window video window.
ib
parents: 34163
diff changeset
78 HMENU videomenu;
23077
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
79 HMENU subtitlemenu;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
80 HMENU aspectmenu;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
81 HMENU dvdmenu;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
82 HMENU playlistmenu;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
83
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
84 int skinbrowserwindow;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
85 int playlistwindow;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
86 int aboutwindow;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
87
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
88 skin_t *skin;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
89 playlist_t *playlist;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
90
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
91 void (*startplay)(gui_t *gui);
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
92 void (*updatedisplay)(gui_t *gui, HWND hwnd);
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
93 void (*playercontrol)(int event); /* userdefine call back function */
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
94 void (*uninit)(gui_t *gui);
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
95 };
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
96
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
97 #define wsShowWindow 8
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
98 #define wsHideWindow 16
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
99 #define wsShowFrame 1
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
100 #define wsMovable 2
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
101 #define wsSizeable 4
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
102
33781
cdd4fc0616b6 Fix memory leak in the Win32 GUI.
ib
parents: 33580
diff changeset
103 gui_t *create_gui(char *skindir, void (*playercontrol)(int event));
28051
9e739bdb049c Get rid of pointless 'extern' keywords.
diego
parents: 26457
diff changeset
104 int destroy_window(gui_t *gui);
9e739bdb049c Get rid of pointless 'extern' keywords.
diego
parents: 26457
diff changeset
105 int create_window(gui_t *gui, char *skindir);
34697
ac6b38cd0d45 Rename sub window video window.
ib
parents: 34163
diff changeset
106 int create_videowindow(gui_t *gui);
28051
9e739bdb049c Get rid of pointless 'extern' keywords.
diego
parents: 26457
diff changeset
107 int parse_filename(char *file, play_tree_t *playtree, m_config_t *mconfig, int clear);
35521
baf53d200292 Avoid using local variables named filename.
ib
parents: 35450
diff changeset
108 void capitalize(char *fname);
34163
95c396eb89ab Internationalize and localize the Win32 GUI.
ib
parents: 33782
diff changeset
109 LPSTR acp(LPCSTR utf8);
23077
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
110
33580
c89456eb2ea4 win32 gui: Move some forward declarations to the appropriate header file.
diego
parents: 32094
diff changeset
111 void renderinfobox(skin_t *skin, window_priv_t *priv);
c89456eb2ea4 win32 gui: Move some forward declarations to the appropriate header file.
diego
parents: 32094
diff changeset
112 void renderwidget(skin_t *skin, image *dest, widget *item, int state);
c89456eb2ea4 win32 gui: Move some forward declarations to the appropriate header file.
diego
parents: 32094
diff changeset
113
23077
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
114 /* Dialogs */
28051
9e739bdb049c Get rid of pointless 'extern' keywords.
diego
parents: 26457
diff changeset
115 void display_playlistwindow(gui_t *gui);
9e739bdb049c Get rid of pointless 'extern' keywords.
diego
parents: 26457
diff changeset
116 void update_playlistwindow(void);
9e739bdb049c Get rid of pointless 'extern' keywords.
diego
parents: 26457
diff changeset
117 int display_openfilewindow(gui_t *gui, int add);
9e739bdb049c Get rid of pointless 'extern' keywords.
diego
parents: 26457
diff changeset
118 void display_openurlwindow(gui_t *gui, int add);
9e739bdb049c Get rid of pointless 'extern' keywords.
diego
parents: 26457
diff changeset
119 void display_skinbrowser(gui_t *gui);
9e739bdb049c Get rid of pointless 'extern' keywords.
diego
parents: 26457
diff changeset
120 void display_chapterselwindow(gui_t *gui);
9e739bdb049c Get rid of pointless 'extern' keywords.
diego
parents: 26457
diff changeset
121 void display_eqwindow(gui_t *gui);
9e739bdb049c Get rid of pointless 'extern' keywords.
diego
parents: 26457
diff changeset
122 void display_prefswindow(gui_t *gui);
9e739bdb049c Get rid of pointless 'extern' keywords.
diego
parents: 26457
diff changeset
123 void display_opensubtitlewindow(gui_t *gui);
23077
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
124
26029
4129c8cfa742 Add MPLAYER_ prefix to multiple inclusion guards.
diego
parents: 25535
diff changeset
125 #endif /* MPLAYER_GUI_GUI_H */