summaryrefslogtreecommitdiffstats
path: root/video/out/w32_common.h
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2014-07-26 20:27:03 +0200
committerwm4 <wm4@nowhere>2014-07-26 20:27:03 +0200
commitb3169390f5b63fb61fb244f603e1ecc26f9e85f9 (patch)
treedbc0e03a52b2856c6519813ecaf012534e45c4c9 /video/out/w32_common.h
parent7077526ffbb95368f1a7cf05e9b3230e9488eb7e (diff)
downloadmpv-b3169390f5b63fb61fb244f603e1ecc26f9e85f9.tar.bz2
mpv-b3169390f5b63fb61fb244f603e1ecc26f9e85f9.tar.xz
win32: make private struct private, refactor
Preparation for moving win32 windowing to a separate thread. The codesize is reduced a bit, because some small functions are inlined, which reduces noise. The main change is that now most functions use the private struct directly, instead of accessing it indirectly through vo->w32. Accesses to vo are minimalized. The final goal is adding some sort of new windowing backend API. It would be cleaner to use that as context pointer for all functions (like struct vo was previously used), but since this is work in progress, we just go with this commit.
Diffstat (limited to 'video/out/w32_common.h')
-rw-r--r--video/out/w32_common.h42
1 files changed, 1 insertions, 41 deletions
diff --git a/video/out/w32_common.h b/video/out/w32_common.h
index 89d4abf670..9e72c4f260 100644
--- a/video/out/w32_common.h
+++ b/video/out/w32_common.h
@@ -25,52 +25,12 @@
#include "common/common.h"
-struct vo_w32_state {
- HWND window;
-
- // Size and virtual position of the current screen.
- struct mp_rect screenrc;
-
- // last non-fullscreen extends (updated only on fullscreen or on initialization)
- int prev_width;
- int prev_height;
- int prev_x;
- int prev_y;
-
- // whether the window position and size were intialized
- bool window_bounds_initialized;
-
- bool current_fs;
-
- int window_x;
- int window_y;
-
- // video size
- uint32_t o_dwidth;
- uint32_t o_dheight;
-
- bool disable_screensaver;
- bool cursor_visible;
- int event_flags;
- int mon_cnt;
- int mon_id;
-
- BOOL tracking;
- TRACKMOUSEEVENT trackEvent;
-
- int mouse_x;
- int mouse_y;
-
- // UTF-16 decoding state for WM_CHAR and VK_PACKET
- int high_surrogate;
-};
-
struct vo;
int vo_w32_init(struct vo *vo);
void vo_w32_uninit(struct vo *vo);
int vo_w32_control(struct vo *vo, int *events, int request, void *arg);
-int vo_w32_check_events(struct vo *vo);
int vo_w32_config(struct vo *vo, uint32_t);
+HWND vo_w32_hwnd(struct vo *vo);
#endif /* MPLAYER_W32_COMMON_H */