Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
wine
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Terraform modules
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Johnny Cai
wine
Commits
93a2ce6e
Commit
93a2ce6e
authored
26 years ago
by
Joseph Pranevich
Committed by
Alexandre Julliard
26 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Added GetBackgroundColor call to the console struct. Will be used
later.
parent
a82b91cd
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
console/interface.c
+9
-0
9 additions, 0 deletions
console/interface.c
console/ncurses.c
+16
-1
16 additions, 1 deletion
console/ncurses.c
include/console.h
+3
-2
3 additions, 2 deletions
include/console.h
with
28 additions
and
3 deletions
console/interface.c
+
9
−
0
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
)
...
...
This diff is collapsed.
Click to expand it.
console/ncurses.c
+
16
−
1
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
...
...
This diff is collapsed.
Click to expand it.
include/console.h
+
3
−
2
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 */
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment