dbghelp: Use local declarations of r_debug and link_map structs.
[wine.git] / dlls / wineandroid.drv / android.h
blobbefaa3c27dfb7d046e987fe7639204b8445314b1
1 /*
2 * Android driver definitions
4 * Copyright 2013 Alexandre Julliard
6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Lesser General Public
8 * License as published by the Free Software Foundation; either
9 * version 2.1 of the License, or (at your option) any later version.
11 * This library is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * Lesser General Public License for more details.
16 * You should have received a copy of the GNU Lesser General Public
17 * License along with this library; if not, write to the Free Software
18 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
21 #ifndef __WINE_ANDROID_H
22 #define __WINE_ANDROID_H
24 #include <limits.h>
25 #include <stdarg.h>
26 #include <stdlib.h>
27 #include <jni.h>
28 #include <android/log.h>
29 #include <android/input.h>
30 #include <android/native_window_jni.h>
32 #include "windef.h"
33 #include "winbase.h"
34 #include "wingdi.h"
35 #include "winuser.h"
36 #include "wine/gdi_driver.h"
37 #include "android_native.h"
40 /**************************************************************************
41 * Android interface
44 #define DECL_FUNCPTR(f) extern typeof(f) * p##f DECLSPEC_HIDDEN
45 DECL_FUNCPTR( __android_log_print );
46 DECL_FUNCPTR( ANativeWindow_fromSurface );
47 DECL_FUNCPTR( ANativeWindow_release );
48 #undef DECL_FUNCPTR
51 /**************************************************************************
52 * OpenGL driver
55 extern void update_gl_drawable( HWND hwnd ) DECLSPEC_HIDDEN;
56 extern void destroy_gl_drawable( HWND hwnd ) DECLSPEC_HIDDEN;
57 extern struct opengl_funcs *get_wgl_driver( UINT version ) DECLSPEC_HIDDEN;
60 /**************************************************************************
61 * Android pseudo-device
64 extern void start_android_device(void) DECLSPEC_HIDDEN;
65 extern void register_native_window( HWND hwnd, struct ANativeWindow *win, BOOL client ) DECLSPEC_HIDDEN;
66 extern struct ANativeWindow *create_ioctl_window( HWND hwnd, BOOL opengl, float scale ) DECLSPEC_HIDDEN;
67 extern struct ANativeWindow *grab_ioctl_window( struct ANativeWindow *window ) DECLSPEC_HIDDEN;
68 extern void release_ioctl_window( struct ANativeWindow *window ) DECLSPEC_HIDDEN;
69 extern void destroy_ioctl_window( HWND hwnd, BOOL opengl ) DECLSPEC_HIDDEN;
70 extern int ioctl_window_pos_changed( HWND hwnd, const RECT *window_rect, const RECT *client_rect,
71 const RECT *visible_rect, UINT style, UINT flags,
72 HWND after, HWND owner ) DECLSPEC_HIDDEN;
73 extern int ioctl_set_window_parent( HWND hwnd, HWND parent, float scale ) DECLSPEC_HIDDEN;
74 extern int ioctl_set_capture( HWND hwnd ) DECLSPEC_HIDDEN;
75 extern int ioctl_set_cursor( int id, int width, int height,
76 int hotspotx, int hotspoty, const unsigned int *bits ) DECLSPEC_HIDDEN;
79 /**************************************************************************
80 * USER driver
83 extern unsigned int screen_width DECLSPEC_HIDDEN;
84 extern unsigned int screen_height DECLSPEC_HIDDEN;
85 extern RECT virtual_screen_rect DECLSPEC_HIDDEN;
86 extern MONITORINFOEXW default_monitor DECLSPEC_HIDDEN;
88 enum android_window_messages
90 WM_ANDROID_REFRESH = 0x80001000,
93 extern void init_gralloc( const struct hw_module_t *module ) DECLSPEC_HIDDEN;
94 extern HWND get_capture_window(void) DECLSPEC_HIDDEN;
95 extern void init_monitors( int width, int height ) DECLSPEC_HIDDEN;
96 extern void set_screen_dpi( DWORD dpi ) DECLSPEC_HIDDEN;
97 extern void update_keyboard_lock_state( WORD vkey, UINT state ) DECLSPEC_HIDDEN;
99 /* JNI entry points */
100 extern void desktop_changed( JNIEnv *env, jobject obj, jint width, jint height ) DECLSPEC_HIDDEN;
101 extern void config_changed( JNIEnv *env, jobject obj, jint dpi ) DECLSPEC_HIDDEN;
102 extern void surface_changed( JNIEnv *env, jobject obj, jint win, jobject surface,
103 jboolean client ) DECLSPEC_HIDDEN;
104 extern jboolean motion_event( JNIEnv *env, jobject obj, jint win, jint action,
105 jint x, jint y, jint state, jint vscroll ) DECLSPEC_HIDDEN;
106 extern jboolean keyboard_event( JNIEnv *env, jobject obj, jint win, jint action,
107 jint keycode, jint state ) DECLSPEC_HIDDEN;
109 enum event_type
111 DESKTOP_CHANGED,
112 CONFIG_CHANGED,
113 SURFACE_CHANGED,
114 MOTION_EVENT,
115 KEYBOARD_EVENT,
118 union event_data
120 enum event_type type;
121 struct
123 enum event_type type;
124 unsigned int width;
125 unsigned int height;
126 } desktop;
127 struct
129 enum event_type type;
130 unsigned int dpi;
131 } cfg;
132 struct
134 enum event_type type;
135 HWND hwnd;
136 ANativeWindow *window;
137 BOOL client;
138 unsigned int width;
139 unsigned int height;
140 } surface;
141 struct
143 enum event_type type;
144 HWND hwnd;
145 INPUT input;
146 } motion;
147 struct
149 enum event_type type;
150 HWND hwnd;
151 UINT lock_state;
152 INPUT input;
153 } kbd;
156 int send_event( const union event_data *data ) DECLSPEC_HIDDEN;
158 extern JavaVM *wine_get_java_vm(void);
159 extern jobject wine_get_java_object(void);
161 #endif /* __WINE_ANDROID_H */