Mercurial > mplayer.hg
annotate gui/win32/gui.h @ 33243:c33f32258d33
Improve cache size spin button.
Set the value shown (start value) to the current cache size, set page
increment to 32 (kBytes) and set page size (which is irrelevant) to zero.
author | ib |
---|---|
date | Mon, 25 Apr 2011 12:38:55 +0000 |
parents | bd219c185f29 |
children | c89456eb2ea4 |
rev | line source |
---|---|
23077 | 1 /* |
23079 | 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 file is part of MPlayer. | |
8 * | |
9 * MPlayer is free software; you can redistribute it and/or modify | |
10 * it under the terms of the GNU General Public License as published by | |
11 * the Free Software Foundation; either version 2 of the License, or | |
12 * (at your option) any later version. | |
13 * | |
14 * MPlayer is distributed in the hope that it will be useful, | |
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
17 * GNU General Public License for more details. | |
18 * | |
26457 | 19 * You should have received a copy of the GNU General Public License along |
20 * with MPlayer; if not, write to the Free Software Foundation, Inc., | |
21 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA | |
23079 | 22 */ |
23077 | 23 |
26029 | 24 #ifndef MPLAYER_GUI_GUI_H |
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 |
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 | 31 #include "skinload.h" |
32 #include "playlist.h" | |
33 | |
34 extern float sub_aspect; | |
35 extern play_tree_t* playtree; | |
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
|
36 extern int sub_window; |
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
|
37 extern int console; |
23077 | 38 extern NOTIFYICONDATA nid; |
32067
548499b3f354
Move codecname extern variable declaration to gui.h, which is better suited.
diego
parents:
31533
diff
changeset
|
39 extern char *codecname; |
23077 | 40 |
41 typedef struct window_priv_t window_priv_t; | |
42 struct window_priv_t | |
43 { | |
44 HWND hwnd; | |
45 image img; | |
46 image *background; | |
47 HBITMAP bitmap; | |
48 int type; | |
49 }; | |
50 | |
51 typedef struct gui_t gui_t; | |
52 struct gui_t | |
53 { | |
54 /* screenproperties */ | |
55 int screenw, screenh, screenbpp; | |
56 /* window related stuff */ | |
57 char *classname; | |
58 HICON icon; | |
59 unsigned int window_priv_count; | |
60 window_priv_t **window_priv; | |
61 | |
62 HWND mainwindow; | |
63 HWND subwindow; | |
64 | |
65 /* for event handling */ | |
66 widget *activewidget; | |
67 | |
68 int mousewx, mousewy; /* mousepos inside widget */ | |
69 int mousex, mousey; | |
70 | |
71 HMENU menu; | |
72 HMENU diskmenu; | |
73 HMENU traymenu; | |
74 HMENU trayplaymenu; | |
75 HMENU trayplaybackmenu; | |
76 HMENU submenu; | |
77 HMENU subtitlemenu; | |
78 HMENU aspectmenu; | |
79 HMENU dvdmenu; | |
80 HMENU playlistmenu; | |
81 | |
82 int skinbrowserwindow; | |
83 int playlistwindow; | |
84 int aboutwindow; | |
85 | |
86 skin_t *skin; | |
87 playlist_t *playlist; | |
88 | |
89 void (*startplay)(gui_t *gui); | |
90 void (*updatedisplay)(gui_t *gui, HWND hwnd); | |
91 void (*playercontrol)(int event); /* userdefine call back function */ | |
92 void (*uninit)(gui_t *gui); | |
93 }; | |
94 | |
95 #define wsShowWindow 8 | |
96 #define wsHideWindow 16 | |
97 #define wsShowFrame 1 | |
98 #define wsMovable 2 | |
99 #define wsSizeable 4 | |
100 | |
28051 | 101 gui_t *create_gui(char *skindir, char *skinName, void (*playercontrol)(int event)); |
102 int destroy_window(gui_t *gui); | |
103 int create_window(gui_t *gui, char *skindir); | |
104 int create_subwindow(gui_t *gui, char *skindir); | |
105 int parse_filename(char *file, play_tree_t *playtree, m_config_t *mconfig, int clear); | |
106 void capitalize(char *filename); | |
23077 | 107 |
108 /* Dialogs */ | |
28051 | 109 void display_playlistwindow(gui_t *gui); |
110 void update_playlistwindow(void); | |
111 int display_openfilewindow(gui_t *gui, int add); | |
112 void display_openurlwindow(gui_t *gui, int add); | |
113 void display_skinbrowser(gui_t *gui); | |
114 void display_chapterselwindow(gui_t *gui); | |
115 void display_eqwindow(gui_t *gui); | |
116 void display_prefswindow(gui_t *gui); | |
117 void display_opensubtitlewindow(gui_t *gui); | |
23077 | 118 |
26029 | 119 #endif /* MPLAYER_GUI_GUI_H */ |