Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
O
OpenXG-RAN
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Michael Black
OpenXG-RAN
Commits
062f7fad
Commit
062f7fad
authored
Apr 11, 2016
by
Cedric Roux
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add clear function to the gui
parent
3e334165
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
12 additions
and
0 deletions
+12
-0
common/utils/T/tracer/gui/event.c
common/utils/T/tracer/gui/event.c
+1
-0
common/utils/T/tracer/gui/gui_defs.h
common/utils/T/tracer/gui/gui_defs.h
+1
-0
common/utils/T/tracer/gui/widget.c
common/utils/T/tracer/gui/widget.c
+10
-0
No files found.
common/utils/T/tracer/gui/event.c
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
;
...
...
common/utils/T/tracer/gui/gui_defs.h
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
{
...
...
common/utils/T/tracer/gui/widget.c
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
;
...
...
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