File: fliapplygeometry.c

package info (click to toggle)
xplot 1.19-9.2
  • links: PTS
  • area: main
  • in suites: forky, sid, trixie
  • size: 460 kB
  • sloc: ansic: 1,264; sh: 359; makefile: 86
file content (20 lines) | stat: -rw-r--r-- 441 bytes parent folder | download | duplicates (8)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20

#include <fli.h>
#include <forms.h>

int fli_apply_geometry (FL_FORM *form, char const *geom)
{
    int
	parseres,
	x, y, w, h;

    parseres = fli_parse_geometry (geom, &x, &y, &w, &h);
    if (parseres == FLI_WHXY_PARSED)
	fl_set_form_geometry (form, x, y, w, h);
    else if (parseres == FLI_XY_PARSED)
	fl_set_form_position (form, x, y);
    else if (parseres == FLI_WH_PARSED)
	fl_set_form_size (form, w, h);

    return (parseres);
}