Back to index

easystroke  0.5.5.1
Classes | Defines | Functions | Variables
grabber.h File Reference
#include "prefdb.h"
#include <string>
#include <map>
#include <X11/extensions/XInput2.h>
#include <X11/Xatom.h>
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  XAtom
class  Children
class  Grabber
struct  Grabber::XiDevice
class  GrabFailedException

Defines

#define MAX_BUTTONS   256

Functions

bool has_wm_state (Window w)
bool has_atom (Window w, Atom prop, Atom value)
void queue (sigc::slot< void > f)
std::string select_window ()
void fake_core_button (guint b, bool press)

Variables

Grabbergrabber
Grabber::XiDevicecurrent_dev
std::set< guint > xinput_pressed

Define Documentation

#define MAX_BUTTONS   256

Definition at line 24 of file grabber.h.


Function Documentation

void fake_core_button ( guint  b,
bool  press 
)

Definition at line 110 of file main.cc.

                                           {
       if (core_inv_map.count(b))
              b = core_inv_map[b];
       XTestFakeButtonEvent(dpy, b, press, CurrentTime);
}

Here is the caller graph for this function:

bool has_atom ( Window  w,
Atom  prop,
Atom  value 
)

Definition at line 691 of file main.cc.

                                               {
       Atom actual_type;
       int actual_format;
       unsigned long nitems, bytes_after;
       unsigned char *prop_return = NULL;

       if (XGetWindowProperty(dpy, w, prop, 0, sizeof(Atom), False, XA_ATOM, &actual_type, &actual_format,
                            &nitems, &bytes_after, &prop_return) != Success)
              return None;
       if (!prop_return)
              return None;
       Atom *atoms = (Atom *)prop_return;
       bool ans = false;
       for (unsigned long i = 0; i < nitems; i++)
              if (atoms[i] == value)
                     ans = true;
       XFree(prop_return);
       return ans;
}

Here is the caller graph for this function:

bool has_wm_state ( Window  w)

Definition at line 555 of file grabber.cc.

                            {
       static XAtom WM_STATE("WM_STATE");
       Atom actual_type_return;
       int actual_format_return;
       unsigned long nitems_return;
       unsigned long bytes_after_return;
       unsigned char *prop_return;
       if (Success != XGetWindowProperty(dpy, w, *WM_STATE, 0, 2, False,
                            AnyPropertyType, &actual_type_return,
                            &actual_format_return, &nitems_return,
                            &bytes_after_return, &prop_return))
              return false;
       XFree(prop_return);
       return nitems_return;
}

Here is the caller graph for this function:

void queue ( sigc::slot< void >  f)

Definition at line 176 of file main.cc.

                             {
       if (Handler::idle()) {
              f();
              XFlush(dpy);
       } else
              queued.push_back(f);
}

Here is the call graph for this function:

Here is the caller graph for this function:

std::string select_window ( )

Definition at line 1559 of file main.cc.

                          {
       queue(sigc::ptr_fun(&SelectHandler::create));
       gtk_main();
       win->get_window().raise();
       return grabber->current_class->get();
}

Here is the call graph for this function:

Here is the caller graph for this function:


Variable Documentation

Definition at line 57 of file main.cc.

Definition at line 33 of file grabber.cc.

std::set<guint> xinput_pressed

Definition at line 58 of file main.cc.