<commit_before>#include <climits>
#include <cstdlib>
#include <unistd.h>
#include <iostream>
#include <vector>
#include <X11/keysym.h>
#include <xcb/xcb.h>
#include <xcb/xcb_atom.h>
#include <xcb/xcb_keysyms.h>
#include <xcb/damage.h>
#include <xcb/composite.h>

// http://svn.enlightenment.org/svn/e/tags/evas-1.0.2/src/modules/engines/xrender_x11/evas_engine_xcb_render.c
#define DOUBLE_TO_FIXED(d) ((xcb_render_fixed_t) ((d) * 65536))

class x_connection;
class x_client;

xcb_render_pictformat_t
render_find_visual_format(const x_connection & c, xcb_visualid_t visual);

xcb_render_picture_t
make_picture(const x_connection & c, xcb_window_t window);

std::vector<x_client>
make_thumbnails(const x_connection & c, const std::vector<xcb_window_t> & windows);

struct dimension_t {
  dimension_t(void) {}
  dimension_t(unsigned int w, unsigned int h) : width(w), height(h) {}
  unsigned int width, height;
};

struct position_t {
  position_t(void) {}
  position_t(int x, int y) : x(x), y(y) {}
  int x, y;
};

struct rectangle_t {
  rectangle_t(void) {}
  rectangle_t(dimension_t size, position_t position)
    : size(size), position(position) {}

  int & x(void) { return position.x; }
  int const & x(void) const { return position.x; }
  int & y(void) { return position.y; }
  int const & y(void) const { return position.y; }
  unsigned int & width(void) { return size.width; }
  unsigned int const & width(void) const { return size.width; }
  unsigned int & height(void) { return size.height; }
  unsigned int const & height(void) const { return size.height; }

  dimension_t size;
  position_t position;
};

class x_event_handler {
  public:
    virtual void handle(xcb_generic_event_t *) = 0;
};

class x_connection {<commit_msg>Rename member variable size to dimension<commit_after>#include <climits>
#include <cstdlib>
#include <unistd.h>
#include <iostream>
#include <vector>
#include <X11/keysym.h>
#include <xcb/xcb.h>
#include <xcb/xcb_atom.h>
#include <xcb/xcb_keysyms.h>
#include <xcb/damage.h>
#include <xcb/composite.h>

// http://svn.enlightenment.org/svn/e/tags/evas-1.0.2/src/modules/engines/xrender_x11/evas_engine_xcb_render.c
#define DOUBLE_TO_FIXED(d) ((xcb_render_fixed_t) ((d) * 65536))

class x_connection;
class x_client;

xcb_render_pictformat_t
render_find_visual_format(const x_connection & c, xcb_visualid_t visual);

xcb_render_picture_t
make_picture(const x_connection & c, xcb_window_t window);

std::vector<x_client>
make_thumbnails(const x_connection & c, const std::vector<xcb_window_t> & windows);

struct dimension_t {
  dimension_t(void) {}
  dimension_t(unsigned int w, unsigned int h) : width(w), height(h) {}
  unsigned int width, height;
};

struct position_t {
  position_t(void) {}
  position_t(int x, int y) : x(x), y(y) {}
  int x, y;
};

struct rectangle_t {
  rectangle_t(void) {}
  rectangle_t(dimension_t dimension, position_t position)
    : dimension(dimension), position(position) {}

  int & x(void) { return position.x; }
  int const & x(void) const { return position.x; }
  int & y(void) { return position.y; }
  int const & y(void) const { return position.y; }
  unsigned int & width(void) { return dimension.width; }
  unsigned int const & width(void) const { return dimension.width; }
  unsigned int & height(void) { return dimension.height; }
  unsigned int const & height(void) const { return dimension.height; }

  position_t position;
  dimension_t dimension;
};

class x_event_handler {
  public:
    virtual void handle(xcb_generic_event_t *) = 0;
};

class x_connection {
{'fraction_non_alphanumeric': 0.1316012425868399, 'fraction_numerical': 0.0073425585992657446, 'mean_word_length': 5.023809523809524, 'pattern_counts': {'":': 0, '<': 29, '<?xml version=': 0, '>': 29, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1721646', 'n_tokens_mistral': 1346, 'n_tokens_neox': 1316, 'n_words': 293}