Added YUV routines needed for v4l driver, and in the future possibly
[wine/gsoc-2012-control.git] / dlls / kernel / kernel_private.h
blob8da81745aaf06a4d820fd37fc5818fb91b8e3370
1 /*
2 * Kernel32 undocumented and private functions definition
4 * Copyright 2003 Eric Pouech
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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
21 #ifndef __WINE_KERNEL_PRIVATE_H
22 #define __WINE_KERNEL_PRIVATE_H
24 HANDLE WINAPI OpenConsoleW(LPCWSTR, DWORD, BOOL, DWORD);
25 BOOL WINAPI VerifyConsoleIoHandle(HANDLE);
26 HANDLE WINAPI DuplicateConsoleHandle(HANDLE, DWORD, BOOL, DWORD);
27 BOOL WINAPI CloseConsoleHandle(HANDLE handle);
28 HANDLE WINAPI GetConsoleInputWaitHandle(void);
30 static inline BOOL is_console_handle(HANDLE h)
32 return h != INVALID_HANDLE_VALUE && ((DWORD)h & 3) == 3;
35 /* map a real wineserver handle onto a kernel32 console handle */
36 static inline HANDLE console_handle_map(HANDLE h)
38 return h != INVALID_HANDLE_VALUE ? (HANDLE)((DWORD)h ^ 3) : INVALID_HANDLE_VALUE;
41 /* map a kernel32 console handle onto a real wineserver handle */
42 static inline HANDLE console_handle_unmap(HANDLE h)
44 return h != INVALID_HANDLE_VALUE ? (HANDLE)((DWORD)h ^ 3) : INVALID_HANDLE_VALUE;
47 extern HMODULE kernel32_handle;
49 /* Size of per-process table of DOS handles */
50 #define DOS_TABLE_SIZE 256
51 extern HANDLE dos_handles[DOS_TABLE_SIZE];
53 extern const WCHAR *DIR_Windows;
54 extern const WCHAR *DIR_System;
56 extern void PTHREAD_Init(void);
57 extern BOOL WOWTHUNK_Init(void);
59 extern VOID SYSLEVEL_CheckNotLevel( INT level );
61 extern void FILE_SetDosError(void);
62 extern WCHAR *FILE_name_AtoW( LPCSTR name, BOOL alloc );
63 extern DWORD FILE_name_WtoA( LPCWSTR src, INT srclen, LPSTR dest, INT destlen );
65 extern DWORD INSTR_EmulateInstruction( EXCEPTION_RECORD *rec, CONTEXT86 *context );
66 extern void INSTR_CallBuiltinHandler( CONTEXT86 *context, BYTE intnum );
68 /* return values for MODULE_GetBinaryType */
69 enum binary_type
71 BINARY_UNKNOWN,
72 BINARY_PE_EXE,
73 BINARY_PE_DLL,
74 BINARY_WIN16,
75 BINARY_OS216,
76 BINARY_DOS,
77 BINARY_UNIX_EXE,
78 BINARY_UNIX_LIB
81 /* module.c */
82 extern WCHAR *MODULE_get_dll_load_path( LPCWSTR module );
83 extern enum binary_type MODULE_GetBinaryType( HANDLE hfile, void **res_start, void **res_end );
85 extern BOOL NLS_IsUnicodeOnlyLcid(LCID);
87 extern HANDLE VXD_Open( LPCWSTR filename, DWORD access, LPSECURITY_ATTRIBUTES sa );
89 extern WORD DOSMEM_0000H;
90 extern WORD DOSMEM_BiosDataSeg;
91 extern WORD DOSMEM_BiosSysSeg;
93 /* dosmem.c */
94 extern BOOL DOSMEM_Init(void);
95 extern WORD DOSMEM_AllocSelector(WORD);
96 extern LPVOID DOSMEM_MapRealToLinear(DWORD); /* real-mode to linear */
97 extern LPVOID DOSMEM_MapDosToLinear(UINT); /* linear DOS to Wine */
98 extern UINT DOSMEM_MapLinearToDos(LPVOID); /* linear Wine to DOS */
99 extern void load_winedos(void);
101 extern struct winedos_exports
103 /* for global16.c */
104 void* (*AllocDosBlock)(UINT size, UINT16* pseg);
105 BOOL (*FreeDosBlock)(void* ptr);
106 UINT (*ResizeDosBlock)(void *ptr, UINT size, BOOL exact);
107 /* for instr.c */
108 void (WINAPI *EmulateInterruptPM)( CONTEXT86 *context, BYTE intnum );
109 void (WINAPI *CallBuiltinHandler)( CONTEXT86 *context, BYTE intnum );
110 DWORD (WINAPI *inport)( int port, int size );
111 void (WINAPI *outport)( int port, int size, DWORD val );
112 void (* BiosTick)(WORD timer);
113 } winedos;
115 #endif