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
93a2ce6e
Commit
93a2ce6e
authored
Feb 24, 1999
by
Joseph Pranevich
Committed by
Alexandre Julliard
Feb 24, 1999
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added GetBackgroundColor call to the console struct. Will be used
later.
parent
a82b91cd
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
28 additions
and
3 deletions
+28
-3
interface.c
console/interface.c
+9
-0
ncurses.c
console/ncurses.c
+16
-1
console.h
include/console.h
+3
-2
No files found.
console/interface.c
View file @
93a2ce6e
...
...
@@ -274,6 +274,15 @@ void CONSOLE_SetBackgroundColor(int fg, int bg)
driver
.
setBackgroundColor
(
fg
,
bg
);
}
void
CONSOLE_GetBackgroundColor
(
int
*
fg
,
int
*
bg
)
{
if
(
!
console_initialized
)
console_initialized
=
CONSOLE_Init
(
driver
.
driver_list
);
if
(
driver
.
getBackgroundColor
)
driver
.
getBackgroundColor
(
fg
,
bg
);
}
void
CONSOLE_WriteRawString
(
char
*
str
)
{
if
(
!
console_initialized
)
...
...
console/ncurses.c
View file @
93a2ce6e
...
...
@@ -210,7 +210,22 @@ void NCURSES_SetBackgroundColor(int fg, int bg)
pair
=
get_color_pair
(
fg
,
bg
);
bkgdset
(
COLOR_PAIR
(
pair
));
wbkgd
(
stdscr
,
COLOR_PAIR
(
pair
));
}
void
NCURSES_GetBackgroundColor
(
int
*
fg
,
int
*
bg
)
{
chtype
background
;
short
pair
,
sfg
,
sbg
;
background
=
getbkgd
(
stdscr
);
pair
=
(
!
A_CHARTEXT
&
background
);
pair_content
(
pair
,
&
sfg
,
&
sbg
);
*
fg
=
sfg
;
*
bg
=
sbg
;
}
#ifdef HAVE_RESIZETERM
...
...
include/console.h
View file @
93a2ce6e
...
...
@@ -21,8 +21,6 @@
#endif
#define CONSOLE_DEFAULT_DRIVER "tty"
/* If you have problems, try setting the next line to xterm */
#define CONSOLE_XTERM_PROG "xterm"
/* We should check for this first... */
typedef
struct
CONSOLE_DRIVER
{
...
...
@@ -37,6 +35,7 @@ typedef struct CONSOLE_DRIVER
/* Color-control functions */
int
(
*
allocColor
)(
int
color
);
void
(
*
setBackgroundColor
)(
int
fg
,
int
bg
);
void
(
*
getBackgroundColor
)(
int
*
fg
,
int
*
bg
);
/* Keyboard Functions */
int
(
*
checkForKeystroke
)(
char
*
,
char
*
);
...
...
@@ -91,6 +90,7 @@ void CONSOLE_NotifyResizeScreen(int, int);
void
CONSOLE_WriteRawString
(
char
*
);
int
CONSOLE_AllocColor
(
int
);
void
CONSOLE_SetBackgroundColor
(
int
fg
,
int
bg
);
void
CONSOLE_GetBackgroundColor
(
int
*
fg
,
int
*
bg
);
/* Generic Defines */
void
GENERIC_Start
(
void
);
...
...
@@ -121,6 +121,7 @@ void NCURSES_ClearScreen(void);
void
NCURSES_NotifyResizeScreen
(
int
x
,
int
y
);
int
NCURSES_AllocColor
(
int
);
void
NCURSES_SetBackgroundColor
(
int
fg
,
int
bg
);
void
NCURSES_GetBackgroundColor
(
int
*
fg
,
int
*
bg
);
#endif
/* WINE_NCURSES */
...
...
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