OpenCores
URL https://opencores.org/ocsvn/openrisc_me/openrisc_me/trunk

Subversion Repositories openrisc_me

[/] [openrisc/] [trunk/] [gnu-src/] [gcc-4.5.1/] [gcc/] [testsuite/] [gcc.c-torture/] [compile/] [pr29201.c] - Blame information for rev 298

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 297 jeremybenn
/* { dg-do assemble { target ia64-*-* } } */
2
typedef int gint;
3
typedef gint gboolean;
4
typedef unsigned int guint;
5
typedef struct _MetaRectangle MetaRectangle;
6
struct _MetaRectangle
7
{
8
  int x;
9
  int y;
10
};
11
typedef struct _MetaDisplay MetaDisplay;
12
typedef struct _MetaFrame MetaFrame;
13
typedef struct _MetaWindow MetaWindow;
14
typedef struct
15
{
16
  int win_gravity;
17
}
18
XSizeHints;
19
typedef enum
20
{
21
  META_DEBUG_FOCUS = 1 << 0, META_DEBUG_WORKAREA = 1 << 1, META_DEBUG_STACK =
22
    1 << 6, META_DEBUG_WINDOW_OPS = 1 << 7, META_DEBUG_GEOMETRY =
23
    1 << 20, META_DEBUG_EDGE_RESISTANCE = 1 << 21
24
}
25
MetaStackLayer;
26
struct _MetaWindow
27
{
28
  MetaDisplay *display;
29
  MetaFrame *frame;
30
  guint user_has_move_resized:1;
31
  MetaRectangle user_rect;
32
  XSizeHints size_hints;
33
};
34
void meta_window_get_position (MetaWindow * window, int *x, int *y);
35
typedef struct _MetaFrameGeometry MetaFrameGeometry;
36
struct _MetaFrameGeometry
37
{
38
};
39
struct _MetaFrame
40
{
41
  MetaWindow *window;
42
  MetaRectangle rect;
43
  int child_x;
44
  int child_y;
45
};
46
typedef enum
47
{
48
  META_IS_CONFIGURE_REQUEST = 1 << 0, META_DO_GRAVITY_ADJUST =
49
    1 << 3, META_IS_RESIZE_ACTION = 1 << 4
50
}
51
MetaMoveResizeFlags;
52
adjust_for_gravity (MetaWindow * window, MetaFrameGeometry * fgeom,
53
                    gboolean coords_assume_border, int gravity,
54
                    MetaRectangle * rect)
55
{
56
  int ref_x, ref_y;
57
  int child_x, child_y;
58
  int frame_width, frame_height;
59
  switch (gravity)
60
    {
61
    case 1:
62
      ref_x = rect->x;
63
    }
64
  switch (gravity)
65
    {
66
    case 1:
67
      rect->y = ref_y + child_y;
68
    case 2:
69
      rect->x = ref_x - frame_width / 2 + child_x;
70
      break;
71
    case 3:
72
    case 5:
73
    case 6:
74
      rect->x = ref_x - frame_width + child_x;
75
    }
76
}
77
meta_window_move_resize_internal (MetaWindow * window,
78
                                  MetaMoveResizeFlags flags,
79
                                  int resize_gravity, int root_x_nw,
80
                                  int root_y_nw, int w, int h)
81
{
82
  unsigned int mask;
83
  MetaFrameGeometry fgeom;
84
  gboolean need_resize_client = (0);
85
  gboolean is_configure_request;
86
  MetaRectangle new_rect;
87
  MetaRectangle old_rect;
88
  {
89
    adjust_for_gravity (window, window->frame ? &fgeom : ((void *) 0),
90
                        is_configure_request, window->size_hints.win_gravity,
91
                        &new_rect);
92
  }
93
  meta_window_constrain (window, window->frame ? &fgeom : ((void *) 0), flags,
94
                         resize_gravity, &old_rect, &new_rect);
95
  if (mask != 0)
96
    {
97
      {
98
        meta_topic_real (META_DEBUG_GEOMETRY,
99
                         need_resize_client ? "true" : "false");
100
      }
101
    }
102
  {
103
    window->user_has_move_resized = (!(0));
104
    meta_window_get_position (window, &window->user_rect.x,
105
                              &window->user_rect.y);
106
  }
107
}
108
void
109
meta_window_get_position (MetaWindow * window, int *x, int *y)
110
{
111
  if (window->frame)
112
    {
113
      *x = window->frame->rect.x + window->frame->child_x;
114
      *y = window->frame->rect.y + window->frame->child_y;
115
    }
116
}

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.