annotate gui/win32/gui.h @ 25646:01f762da9c87

Simplify: use memset
author reimar
date Fri, 11 Jan 2008 20:23:46 +0000
parents 3baf6a2283da
children 4129c8cfa742
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 *
8e9b11648f40 Use proper GPL header.
diego
parents: 23078
diff changeset
19 * You should have received a copy of the GNU General Public License
8e9b11648f40 Use proper GPL header.
diego
parents: 23078
diff changeset
20 * along with MPlayer; if not, write to the Free Software
8e9b11648f40 Use proper GPL header.
diego
parents: 23078
diff changeset
21 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
8e9b11648f40 Use proper GPL header.
diego
parents: 23078
diff changeset
22 */
23077
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
23
23689
3f0d00abc073 Do not use leading underscores in multiple inclusion guards, they are reserved.
diego
parents: 23685
diff changeset
24 #ifndef GUI_GUI_H
3f0d00abc073 Do not use leading underscores in multiple inclusion guards, they are reserved.
diego
parents: 23685
diff changeset
25 #define GUI_GUI_H
3f0d00abc073 Do not use leading underscores in multiple inclusion guards, they are reserved.
diego
parents: 23685
diff changeset
26
23091
52488bb09d90 Consistently use quotes instead of angled brackets in #include
diego
parents: 23079
diff changeset
27 #include "config.h"
23123
21e29d5932c5 header / declarations cleanup, also fixes broken compilation.
vayne
parents: 23091
diff changeset
28 #include "mplayer.h"
23091
52488bb09d90 Consistently use quotes instead of angled brackets in #include
diego
parents: 23079
diff changeset
29 #include "playtree.h"
52488bb09d90 Consistently use quotes instead of angled brackets in #include
diego
parents: 23079
diff changeset
30 #include "m_config.h"
23077
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
31 #include "skinload.h"
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
32 #include "playlist.h"
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
33
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
34 extern char *skinName;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
35 extern float sub_aspect;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
36 extern play_tree_t* playtree;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
37 extern m_config_t* mconfig;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
38
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
39 extern NOTIFYICONDATA nid;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
40
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
41 typedef struct window_priv_t window_priv_t;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
42 struct window_priv_t
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
43 {
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
44 HWND hwnd;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
45 image img;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
46 image *background;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
47 HBITMAP bitmap;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
48 int type;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
49 };
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
50
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
51 typedef struct gui_t gui_t;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
52 struct gui_t
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
53 {
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
54 /* screenproperties */
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
55 int screenw, screenh, screenbpp;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
56 /* window related stuff */
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
57 char *classname;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
58 HICON icon;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
59 unsigned int window_priv_count;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
60 window_priv_t **window_priv;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
61
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
62 HWND mainwindow;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
63 HWND subwindow;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
64
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
65 /* for event handling */
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
66 widget *activewidget;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
67
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
68 int mousewx, mousewy; /* mousepos inside widget */
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
69 int mousex, mousey;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
70
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
71 HMENU menu;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
72 HMENU diskmenu;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
73 HMENU traymenu;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
74 HMENU trayplaymenu;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
75 HMENU trayplaybackmenu;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
76 HMENU submenu;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
77 HMENU subtitlemenu;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
78 HMENU aspectmenu;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
79 HMENU dvdmenu;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
80 HMENU playlistmenu;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
81
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
82 int skinbrowserwindow;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
83 int playlistwindow;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
84 int aboutwindow;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
85
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
86 skin_t *skin;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
87 playlist_t *playlist;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
88
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
89 void (*startplay)(gui_t *gui);
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
90 void (*updatedisplay)(gui_t *gui, HWND hwnd);
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
91 void (*playercontrol)(int event); /* userdefine call back function */
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
92 void (*uninit)(gui_t *gui);
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
93 };
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
94
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
95 #define wsShowWindow 8
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
96 #define wsHideWindow 16
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
97 #define wsShowFrame 1
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
98 #define wsMovable 2
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
99 #define wsSizeable 4
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
100
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
101 extern gui_t *create_gui(char *skindir, char *skinName, void (*playercontrol)(int event));
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
102 extern int destroy_window(gui_t *gui);
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
103 extern int create_window(gui_t *gui, char *skindir);
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
104 extern int create_subwindow(gui_t *gui, char *skindir);
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
105 extern int parse_filename(char *file, play_tree_t *playtree, m_config_t *mconfig, int clear);
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
106 extern void capitalize(char *filename);
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
107 extern int import_playtree_playlist_into_gui(play_tree_t *my_playtree, m_config_t *config);
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
108
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
109 /* Dialogs */
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
110 extern void display_playlistwindow(gui_t *gui);
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
111 extern void update_playlistwindow(void);
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
112 extern int display_openfilewindow(gui_t *gui, int add);
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
113 extern void display_openurlwindow(gui_t *gui, int add);
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
114 extern void display_skinbrowser(gui_t *gui);
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
115 extern void display_chapterselwindow(gui_t *gui);
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
116 extern void display_eqwindow(gui_t *gui);
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
117 extern void display_prefswindow(gui_t *gui);
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
118 extern void display_opensubtitlewindow(gui_t *gui);
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
119
25535
3baf6a2283da Add explanatory comments to the #endif part of multiple inclusion guards.
diego
parents: 23689
diff changeset
120 #endif /* GUI_GUI_H */