2021-11-30 13:01:36 +00:00
|
|
|
/** @file
|
|
|
|
*
|
2012-10-21 14:45:23 +00:00
|
|
|
* Console support for MSWindows
|
|
|
|
*
|
|
|
|
* Wireshark - Network traffic analyzer
|
|
|
|
* By Gerald Combs <gerald@wireshark.org>
|
|
|
|
* Copyright 2002, Jeffrey C. Foster <jfoste@woodward.com>
|
|
|
|
*
|
2018-02-07 11:26:45 +00:00
|
|
|
* SPDX-License-Identifier: GPL-2.0-or-later
|
2012-10-21 14:45:23 +00:00
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef __CONSOLE_WIN32_H__
|
|
|
|
#define __CONSOLE_WIN32_H__
|
|
|
|
|
2022-10-06 05:43:30 +00:00
|
|
|
#include <wireshark.h>
|
|
|
|
|
2012-10-21 14:45:23 +00:00
|
|
|
#ifdef __cplusplus
|
|
|
|
extern "C" {
|
|
|
|
#endif /* __cplusplus */
|
|
|
|
|
|
|
|
#ifdef _WIN32
|
|
|
|
|
|
|
|
/** @file
|
|
|
|
* Win32 specific console.
|
|
|
|
*/
|
|
|
|
|
|
|
|
/** Create Windows console.
|
|
|
|
*
|
|
|
|
*/
|
2022-10-06 05:43:30 +00:00
|
|
|
WS_DLL_PUBLIC
|
2012-10-21 14:45:23 +00:00
|
|
|
void create_console(void);
|
|
|
|
|
2020-09-09 02:59:02 +00:00
|
|
|
/** Connect to stdio if available.
|
|
|
|
*
|
|
|
|
*/
|
2022-10-06 05:43:30 +00:00
|
|
|
WS_DLL_PUBLIC
|
2020-09-09 02:59:02 +00:00
|
|
|
void restore_pipes(void);
|
|
|
|
|
2012-10-21 14:45:23 +00:00
|
|
|
/** Destroy Windows console.
|
|
|
|
*
|
|
|
|
*/
|
2022-10-06 05:43:30 +00:00
|
|
|
WS_DLL_PUBLIC
|
2012-10-21 14:45:23 +00:00
|
|
|
void destroy_console(void);
|
|
|
|
|
2015-04-16 21:31:58 +00:00
|
|
|
/** Set console wait. GTK+ only.
|
2012-10-21 14:45:23 +00:00
|
|
|
* @param console_wait set/no set console wait
|
|
|
|
*/
|
2022-10-06 05:43:30 +00:00
|
|
|
WS_DLL_PUBLIC
|
2012-10-21 14:45:23 +00:00
|
|
|
void set_console_wait(gboolean console_wait);
|
|
|
|
/** get console wait
|
|
|
|
* @return set/no set console wait
|
|
|
|
*/
|
2022-10-06 05:43:30 +00:00
|
|
|
WS_DLL_PUBLIC
|
2012-10-21 14:45:23 +00:00
|
|
|
gboolean get_console_wait(void);
|
|
|
|
|
|
|
|
/** Set stdin capture.
|
|
|
|
* @param console_wait set/no stdin_capture
|
|
|
|
*/
|
2022-10-06 05:43:30 +00:00
|
|
|
WS_DLL_PUBLIC
|
2012-10-21 14:45:23 +00:00
|
|
|
void set_stdin_capture(gboolean set_stdin_capture);
|
|
|
|
|
|
|
|
/** get stdin caputre
|
|
|
|
* @return set/no set stdin_capture
|
|
|
|
*/
|
2022-10-06 05:43:30 +00:00
|
|
|
WS_DLL_PUBLIC
|
2012-10-21 14:45:23 +00:00
|
|
|
gboolean get_stdin_capture(void);
|
|
|
|
#endif/* _WIN32 */
|
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
}
|
|
|
|
#endif /* __cplusplus */
|
|
|
|
|
|
|
|
#endif /* __CONSOLE_WIN32_H__ */
|