php-internal-docs 8.4.8
Unofficial docs for php/php-src
Loading...
Searching...
No Matches
console.h
Go to the documentation of this file.
1/*
2 +----------------------------------------------------------------------+
3 | Copyright (c) The PHP Group |
4 +----------------------------------------------------------------------+
5 | This source file is subject to version 3.01 of the PHP license, |
6 | that is bundled with this package in the file LICENSE, and is |
7 | available through the world-wide-web at the following url: |
8 | https://www.php.net/license/3_01.txt |
9 | If you did not receive a copy of the PHP license and are unable to |
10 | obtain it through the world-wide-web, please send a note to |
11 | license@php.net so we can mail you a copy immediately. |
12 +----------------------------------------------------------------------+
13 | Author: Michele Locati <mlocati@gmail.com> |
14 +----------------------------------------------------------------------+
15*/
16
17#ifndef PHP_WIN32_CONSOLE_H
18#define PHP_WIN32_CONSOLE_H
19
20#ifndef PHP_WINUTIL_API
21#ifdef PHP_EXPORTS
22# define PHP_WINUTIL_API __declspec(dllexport)
23#else
24# define PHP_WINUTIL_API __declspec(dllimport)
25#endif
26#endif
27
28#include "php.h"
29#include "php_streams.h"
30#include <windows.h>
31
32#ifndef ENABLE_VIRTUAL_TERMINAL_PROCESSING
33#define ENABLE_VIRTUAL_TERMINAL_PROCESSING 0x0004
34#endif
35
36
37/*
38Check if a file descriptor associated to a stream is a console
39(valid fileno, neither redirected nor piped)
40*/
42
43/*
44Check if the console attached to a file descriptor (screen buffer, not STDIN)
45has the ENABLE_VIRTUAL_TERMINAL_PROCESSING flag set
46*/
48
49/*
50Set/unset the ENABLE_VIRTUAL_TERMINAL_PROCESSING flag for the screen buffer (STDOUT/STDERR)
51associated to a file descriptor
52*/
54
55/* Check, whether the program has its own console. If a process was launched
56 through a GUI, it will have it's own console. For more info see
57 http://support.microsoft.com/kb/99115 */
59
60/* Check whether the current SAPI is run on console. */
62
63#endif
PHP_WINUTIL_API BOOL php_win32_console_is_cli_sapi(void)
Definition console.c:112
#define PHP_WINUTIL_API
Definition console.h:24
PHP_WINUTIL_API BOOL php_win32_console_fileno_has_vt100(zend_long fileno)
Definition console.c:36
PHP_WINUTIL_API BOOL php_win32_console_is_own(void)
Definition console.c:93
PHP_WINUTIL_API BOOL php_win32_console_fileno_is_console(zend_long fileno)
Definition console.c:22
PHP_WINUTIL_API BOOL php_win32_console_fileno_set_vt100(zend_long fileno, BOOL enable)
Definition console.c:58
int BOOL
int32_t zend_long
Definition zend_long.h:42