Logo Search packages:      
Sourcecode: wayland-demos version File versions  Download package

static void resize_handler ( struct window window,
int32_t  width,
int32_t  height,
void *  data 
) [static]

CALLBACK function, Wayland requests the window to resize.

Parameters:
windowwindow to be resized
widthdesired width
heightdesired height
datauser data associated to the window

Definition at line 146 of file eventdemo.c.

References height_max, log_resize, and width_max.

Referenced by eventdemo_create().

{
      struct eventdemo *e = data;
      if (log_resize)
            printf("resize width: %d, height: %d\n", width, height);

      /* if a maximum width is set, constrain to it */
      if (width_max && width_max < width)
            width = width_max;

      /* if a maximum height is set, constrain to it */
      if (height_max && height_max < height)
            height = height_max;

      /* set the new window dimensions */
      window_set_child_size(e->window, width, height);

      /* inform Wayland that the window needs to be redrawn */
      window_schedule_redraw(e->window);
}

Here is the caller graph for this function:


Generated by  Doxygen 1.6.0   Back to index