File: sizehint.h

package info (click to toggle)
notion 4.0.2%2Bdfsg-5
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 4,676 kB
  • sloc: ansic: 47,508; sh: 2,096; makefile: 603; perl: 270
file content (51 lines) | stat: -rw-r--r-- 1,286 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
/*
 * ion/ioncore/sizehint.h
 *
 * Copyright (c) Tuomo Valkonen 1999-2007.
 *
 * See the included file LICENSE for details.
 */

#ifndef ION_IONCORE_SIZEHINT_H
#define ION_IONCORE_SIZEHINT_H

#include "common.h"
#include "region.h"

INTRSTRUCT(WSizeHints);

DECLSTRUCT(WSizeHints){
    uint min_set:1;
    uint max_set:1;
    uint inc_set:1;
    uint base_set:1;
    uint aspect_set:1;
    uint no_constrain:1;

    int min_width, min_height;
    int max_width, max_height;
    int width_inc, height_inc;
    struct {
        int x;
        int y;
    } min_aspect, max_aspect;
    int base_width, base_height;
};

extern void xsizehints_to_sizehints(const XSizeHints *xh,
                                    WSizeHints *hints);

extern void xsizehints_sanity_adjust(XSizeHints *hints);

extern void sizehints_clear(WSizeHints *hints);

extern void sizehints_adjust_for(WSizeHints *hints, WRegion *reg);

extern void sizehints_correct(const WSizeHints *hints, int *wp, int *hp,
                              bool min, bool override_no_constrain);

extern int xgravity_deltax(int gravity, int left, int right);
extern int xgravity_deltay(int gravity, int top, int bottom);
extern void xgravity_translate(int gravity, WRegion *reg, WRectangle *geom);

#endif /* ION_IONCORE_SIZEHINT_H */