Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-cw
Commits
5477453c
Commit
5477453c
authored
Jan 09, 2003
by
Eric Pouech
Committed by
Alexandre Julliard
Jan 09, 2003
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added an edition mode flavor (win32/emacs...) to the console settings
in the registry.
parent
fa8b85aa
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
37 additions
and
1 deletion
+37
-1
registry.c
programs/wineconsole/registry.c
+11
-1
winecon_private.h
programs/wineconsole/winecon_private.h
+1
-0
wineconsole.c
programs/wineconsole/wineconsole.c
+25
-0
No files found.
programs/wineconsole/registry.c
View file @
5477453c
...
...
@@ -30,6 +30,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(wineconsole);
static
const
WCHAR
wszConsole
[]
=
{
'C'
,
'o'
,
'n'
,
's'
,
'o'
,
'l'
,
'e'
,
0
};
static
const
WCHAR
wszCursorSize
[]
=
{
'C'
,
'u'
,
'r'
,
's'
,
'o'
,
'r'
,
'S'
,
'i'
,
'z'
,
'e'
,
0
};
static
const
WCHAR
wszCursorVisible
[]
=
{
'C'
,
'u'
,
'r'
,
's'
,
'o'
,
'r'
,
'V'
,
'i'
,
's'
,
'i'
,
'b'
,
'l'
,
'e'
,
0
};
static
const
WCHAR
wszEditionMode
[]
=
{
'E'
,
'd'
,
'i'
,
't'
,
'i'
,
'o'
,
'n'
,
'M'
,
'o'
,
'd'
,
'e'
,
0
};
static
const
WCHAR
wszExitOnDie
[]
=
{
'E'
,
'x'
,
'i'
,
't'
,
'O'
,
'n'
,
'D'
,
'i'
,
'e'
,
0
};
static
const
WCHAR
wszFaceName
[]
=
{
'F'
,
'a'
,
'c'
,
'e'
,
'N'
,
'a'
,
'm'
,
'e'
,
0
};
static
const
WCHAR
wszFontSize
[]
=
{
'F'
,
'o'
,
'n'
,
't'
,
'S'
,
'i'
,
'z'
,
'e'
,
0
};
...
...
@@ -44,11 +45,12 @@ static const WCHAR wszWindowSize[] = {'W','i','n','d','o','w','S','i','z'
void
WINECON_DumpConfig
(
const
char
*
pfx
,
const
struct
config_data
*
cfg
)
{
WINE_TRACE
(
"%s cell=(%u,%u) cursor=(%d,%d) attr=%02lx font=%s/%lu hist=%lu/%d flags=%c%c msk=%08lx sb=(%u,%u) win=(%u,%u)x(%u,%u) registry=%s
\n
"
,
WINE_TRACE
(
"%s cell=(%u,%u) cursor=(%d,%d) attr=%02lx font=%s/%lu hist=%lu/%d flags=%c%c msk=%08lx sb=(%u,%u) win=(%u,%u)x(%u,%u)
edit=%u
registry=%s
\n
"
,
pfx
,
cfg
->
cell_width
,
cfg
->
cell_height
,
cfg
->
cursor_size
,
cfg
->
cursor_visible
,
cfg
->
def_attr
,
wine_dbgstr_w
(
cfg
->
face_name
),
cfg
->
font_weight
,
cfg
->
history_size
,
cfg
->
history_nodup
?
1
:
2
,
cfg
->
quick_edit
?
'Q'
:
'q'
,
cfg
->
exit_on_die
?
'X'
:
'x'
,
cfg
->
menu_mask
,
cfg
->
sb_width
,
cfg
->
sb_height
,
cfg
->
win_pos
.
X
,
cfg
->
win_pos
.
Y
,
cfg
->
win_width
,
cfg
->
win_height
,
cfg
->
edition_mode
,
wine_dbgstr_w
(
cfg
->
registry
));
}
...
...
@@ -91,6 +93,10 @@ static void WINECON_RegLoadHelper(HKEY hConKey, struct config_data* cfg)
cfg
->
cursor_visible
=
val
;
count
=
sizeof
(
val
);
if
(
!
RegQueryValueEx
(
hConKey
,
wszEditionMode
,
0
,
&
type
,
(
char
*
)
&
val
,
&
count
))
cfg
->
edition_mode
=
val
;
count
=
sizeof
(
val
);
if
(
!
RegQueryValueEx
(
hConKey
,
wszExitOnDie
,
0
,
&
type
,
(
char
*
)
&
val
,
&
count
))
cfg
->
exit_on_die
=
val
;
...
...
@@ -173,6 +179,7 @@ void WINECON_RegLoad(const WCHAR* appname, struct config_data* cfg)
cfg
->
def_attr
=
0x000F
;
cfg
->
win_height
=
25
;
cfg
->
win_width
=
80
;
cfg
->
edition_mode
=
0
;
cfg
->
registry
=
NULL
;
/* then read global settings */
...
...
@@ -213,6 +220,9 @@ static void WINECON_RegSaveHelper(HKEY hConKey, const struct config_data* cfg)
val
=
cfg
->
cursor_visible
;
RegSetValueEx
(
hConKey
,
wszCursorVisible
,
0
,
REG_DWORD
,
(
char
*
)
&
val
,
sizeof
(
val
));
val
=
cfg
->
edition_mode
;
RegSetValueEx
(
hConKey
,
wszEditionMode
,
0
,
REG_DWORD
,
(
char
*
)
&
val
,
sizeof
(
val
));
val
=
cfg
->
exit_on_die
;
RegSetValueEx
(
hConKey
,
wszExitOnDie
,
0
,
REG_DWORD
,
(
char
*
)
&
val
,
sizeof
(
val
));
...
...
programs/wineconsole/winecon_private.h
View file @
5477453c
...
...
@@ -42,6 +42,7 @@ struct config_data {
unsigned
win_height
;
COORD
win_pos
;
/* position (in cells) of visible part of screen buffer in window */
BOOL
exit_on_die
;
/* whether the wineconsole should quit if server destroys the console */
unsigned
edition_mode
;
/* edition mode flavor while line editing */
WCHAR
*
registry
;
/* <x> part of HKLU\\<x>\\Console where config is read from (NULL if default settings) */
};
...
...
programs/wineconsole/wineconsole.c
View file @
5477453c
...
...
@@ -181,6 +181,26 @@ BOOL WINECON_GetConsoleTitle(HANDLE hConIn, WCHAR* buffer, size_t len)
}
/******************************************************************
* WINECON_SetEditionMode
*
*
*/
static
BOOL
WINECON_SetEditionMode
(
HANDLE
hConIn
,
int
edition_mode
)
{
BOOL
ret
;
SERVER_START_REQ
(
set_console_input_info
)
{
req
->
handle
=
(
obj_handle_t
)
hConIn
;
req
->
mask
=
SET_CONSOLE_INPUT_INFO_EDITION_MODE
;
req
->
edition_mode
=
edition_mode
;
ret
=
!
wine_server_call_err
(
req
);
}
SERVER_END_REQ
;
return
ret
;
}
/******************************************************************
* WINECON_GrabChanges
*
* A change occurs, try to figure out which
...
...
@@ -413,6 +433,11 @@ void WINECON_SetConfig(struct inner_data* data,
SetConsoleWindowInfo
(
data
->
hConOut
,
FALSE
,
&
pos
);
}
data
->
curcfg
.
exit_on_die
=
cfg
->
exit_on_die
;
if
(
force
||
data
->
curcfg
.
edition_mode
!=
cfg
->
edition_mode
)
{
data
->
curcfg
.
edition_mode
=
cfg
->
edition_mode
;
WINECON_SetEditionMode
(
data
->
hConIn
,
cfg
->
edition_mode
);
}
/* we now need to gather all events we got from the operations above,
* in order to get data correctly updated
*/
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment