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
lizhongxiao
OpenXG-RAN
Commits
042f284b
Commit
042f284b
authored
May 02, 2016
by
Cedric Roux
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
introduce widget_dirty - not only text list might want the optimization
parent
ca3a05a5
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
11 additions
and
11 deletions
+11
-11
common/utils/T/tracer/gui/gui.h
common/utils/T/tracer/gui/gui.h
+1
-1
common/utils/T/tracer/gui/text_list.c
common/utils/T/tracer/gui/text_list.c
+0
-9
common/utils/T/tracer/gui/widget.c
common/utils/T/tracer/gui/widget.c
+9
-0
common/utils/T/tracer/view/textlist.c
common/utils/T/tracer/view/textlist.c
+1
-1
No files found.
common/utils/T/tracer/gui/gui.h
View file @
042f284b
...
@@ -16,6 +16,7 @@ gui *gui_init(void);
...
@@ -16,6 +16,7 @@ gui *gui_init(void);
/* position = -1 to put at the end */
/* position = -1 to put at the end */
void
widget_add_child
(
gui
*
gui
,
widget
*
parent
,
widget
*
child
,
int
position
);
void
widget_add_child
(
gui
*
gui
,
widget
*
parent
,
widget
*
child
,
int
position
);
void
widget_dirty
(
gui
*
gui
,
widget
*
this
);
widget
*
new_toplevel_window
(
gui
*
gui
,
int
width
,
int
height
,
char
*
title
);
widget
*
new_toplevel_window
(
gui
*
gui
,
int
width
,
int
height
,
char
*
title
);
widget
*
new_container
(
gui
*
gui
,
int
vertical
);
widget
*
new_container
(
gui
*
gui
,
int
vertical
);
...
@@ -44,7 +45,6 @@ void text_list_set_start_line(gui *gui, widget *this, int line);
...
@@ -44,7 +45,6 @@ void text_list_set_start_line(gui *gui, widget *this, int line);
void
text_list_get_line
(
gui
*
gui
,
widget
*
this
,
int
line
,
void
text_list_get_line
(
gui
*
gui
,
widget
*
this
,
int
line
,
char
**
text
,
int
*
color
);
char
**
text
,
int
*
color
);
void
text_list_set_color
(
gui
*
gui
,
widget
*
this
,
int
line
,
int
color
);
void
text_list_set_color
(
gui
*
gui
,
widget
*
this
,
int
line
,
int
color
);
void
text_list_dirty
(
gui
*
_gui
,
widget
*
_this
);
void
gui_loop
(
gui
*
gui
);
void
gui_loop
(
gui
*
gui
);
...
...
common/utils/T/tracer/gui/text_list.c
View file @
042f284b
...
@@ -242,12 +242,3 @@ void text_list_set_color(gui *_gui, widget *_this, int line, int color)
...
@@ -242,12 +242,3 @@ void text_list_set_color(gui *_gui, widget *_this, int line, int color)
gunlock
(
g
);
gunlock
(
g
);
}
}
void
text_list_dirty
(
gui
*
_gui
,
widget
*
_this
)
{
struct
gui
*
g
=
_gui
;
struct
text_list_widget
*
this
=
_this
;
glock
(
g
);
send_event
(
g
,
DIRTY
,
this
->
common
.
id
);
gunlock
(
g
);
}
common/utils/T/tracer/gui/widget.c
View file @
042f284b
...
@@ -180,6 +180,15 @@ void widget_add_child(gui *_gui, widget *parent, widget *child, int position)
...
@@ -180,6 +180,15 @@ void widget_add_child(gui *_gui, widget *parent, widget *child, int position)
gunlock
(
_gui
);
gunlock
(
_gui
);
}
}
void
widget_dirty
(
gui
*
_gui
,
widget
*
_this
)
{
struct
gui
*
g
=
_gui
;
struct
widget
*
this
=
_this
;
glock
(
g
);
send_event
(
g
,
DIRTY
,
this
->
id
);
gunlock
(
g
);
}
static
const
char
*
names
[]
=
{
static
const
char
*
names
[]
=
{
"TOPLEVEL_WINDOW"
,
"CONTAINER"
,
"TEXT_LIST"
,
"XY_PLOT"
,
"BUTTON"
,
"LABEL"
"TOPLEVEL_WINDOW"
,
"CONTAINER"
,
"TEXT_LIST"
,
"XY_PLOT"
,
"BUTTON"
,
"LABEL"
};
};
...
...
common/utils/T/tracer/view/textlist.c
View file @
042f284b
...
@@ -42,7 +42,7 @@ static void *textlist_thread(void *_this)
...
@@ -42,7 +42,7 @@ static void *textlist_thread(void *_this)
free
(
s
);
free
(
s
);
}
}
if
(
pthread_mutex_unlock
(
&
this
->
lock
))
abort
();
if
(
pthread_mutex_unlock
(
&
this
->
lock
))
abort
();
if
(
dirty
)
text_lis
t_dirty
(
this
->
g
,
this
->
w
);
if
(
dirty
)
widge
t_dirty
(
this
->
g
,
this
->
w
);
sleepms
(
1000
/
this
->
refresh_rate
);
sleepms
(
1000
/
this
->
refresh_rate
);
}
}
...
...
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