Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
openairinterface5G
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
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
Balaji Kolla
openairinterface5G
Commits
062f7fad
Commit
062f7fad
authored
8 years ago
by
Cédric Roux
Browse files
Options
Downloads
Patches
Plain Diff
add clear function to the gui
parent
3e334165
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
common/utils/T/tracer/gui/event.c
+1
-0
1 addition, 0 deletions
common/utils/T/tracer/gui/event.c
common/utils/T/tracer/gui/gui_defs.h
+1
-0
1 addition, 0 deletions
common/utils/T/tracer/gui/gui_defs.h
common/utils/T/tracer/gui/widget.c
+10
-0
10 additions, 0 deletions
common/utils/T/tracer/gui/widget.c
with
12 additions
and
0 deletions
common/utils/T/tracer/gui/event.c
+
1
−
0
View file @
062f7fad
...
...
@@ -132,6 +132,7 @@ static void dirty_event(struct gui *g, int id)
if
(
win
==
NULL
)
{
WARN
(
"widget id %d not contained in a window
\n
"
,
id
);
return
;
}
g
->
xwin
=
win
->
x
;
w
->
clear
(
g
,
w
);
w
->
paint
(
g
,
w
);
g
->
xwin
=
NULL
;
g
->
repainted
=
1
;
...
...
This diff is collapsed.
Click to expand it.
common/utils/T/tracer/gui/gui_defs.h
+
1
−
0
View file @
062f7fad
...
...
@@ -46,6 +46,7 @@ struct widget {
void
(
*
allocate
)(
gui
*
g
,
widget
*
this
,
int
x
,
int
y
,
int
width
,
int
height
);
void
(
*
hints
)(
gui
*
g
,
widget
*
this
,
int
*
width
,
int
*
height
);
void
(
*
paint
)(
gui
*
g
,
widget
*
this
);
void
(
*
clear
)(
gui
*
g
,
widget
*
this
);
};
struct
widget_list
{
...
...
This diff is collapsed.
Click to expand it.
common/utils/T/tracer/gui/widget.c
+
10
−
0
View file @
062f7fad
...
...
@@ -6,6 +6,7 @@
#include
<stdarg.h>
#include
<string.h>
static
void
default_clear
(
gui
*
gui
,
widget
*
_this
);
static
void
default_repack
(
gui
*
gui
,
widget
*
_this
);
static
void
default_allocate
(
gui
*
gui
,
widget
*
_this
,
int
x
,
int
y
,
int
width
,
int
height
);
...
...
@@ -41,6 +42,7 @@ widget *new_widget(struct gui *g, enum widget_type type, int size)
ret
=
calloc
(
1
,
size
);
if
(
ret
==
NULL
)
OOM
;
ret
->
clear
=
default_clear
;
ret
->
repack
=
default_repack
;
ret
->
add_child
=
default_add_child
;
ret
->
allocate
=
default_allocate
;
...
...
@@ -120,6 +122,14 @@ repack:
/* default functions */
/*************************************************************************/
static
void
default_clear
(
gui
*
_gui
,
widget
*
_this
)
{
struct
gui
*
g
=
_gui
;
struct
widget
*
this
=
_this
;
x_fill_rectangle
(
g
->
x
,
g
->
xwin
,
BACKGROUND_COLOR
,
this
->
x
,
this
->
y
,
this
->
width
,
this
->
height
);
}
static
void
default_repack
(
gui
*
gui
,
widget
*
_this
)
{
struct
widget
*
this
=
_this
;
...
...
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