new function timeline_get_width

This commit is contained in:
Cedric Roux
2016-05-13 15:29:08 +02:00
parent 48f0c341a1
commit ee62356349
2 changed files with 13 additions and 0 deletions
+1
View File
@@ -59,6 +59,7 @@ void timeline_add_points(gui *gui, widget *this, int subline, int color,
int *x, int len);
void timeline_set_subline_background_color(gui *gui, widget *this,
int subline, int color);
void timeline_get_width(gui *gui, widget *this, int *width);
void gui_loop(gui *gui);
+12
View File
@@ -148,3 +148,15 @@ void timeline_set_subline_background_color(gui *_gui, widget *_this,
gunlock(g);
}
void timeline_get_width(gui *_gui, widget *_this, int *width)
{
struct gui *g = _gui;
struct timeline_widget *this = _this;
glock(g);
*width = this->common.width == 0 ? this->wanted_width : this->common.width;
gunlock(g);
}