Back to index

easystroke  0.5.5.1
Public Member Functions | Static Public Member Functions | Public Attributes | Protected Attributes | Private Attributes
ButtonHandler Class Reference
Inheritance diagram for ButtonHandler:
Inheritance graph
[legend]
Collaboration diagram for ButtonHandler:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 ButtonHandler (RModifiers mods_, guint button_)
virtual void press (guint b, RTriple e)
virtual void motion (RTriple e)
virtual void release (guint b, RTriple e)
virtual std::string name ()
virtual Grabber::State grab_mode ()
Handlertop ()
virtual void raw_motion (RTriple e, bool, bool)
virtual void press_master (guint b, Time t)
virtual void pressure ()
virtual void proximity_out ()
virtual void pong ()
void replace_child (Handler *c)
virtual void init ()

Static Public Member Functions

static bool idle ()

Public Attributes

Handlerparent

Protected Attributes

Handlerchild

Private Attributes

RModifiers mods
guint button
guint real_button

Detailed Description

Definition at line 247 of file main.cc.


Constructor & Destructor Documentation

ButtonHandler::ButtonHandler ( RModifiers  mods_,
guint  button_ 
) [inline]

Definition at line 251 of file main.cc.

: mods(mods_), button(button_), real_button(0) {}

Member Function Documentation

virtual Grabber::State ButtonHandler::grab_mode ( ) [inline, virtual]

Implements Handler.

Definition at line 278 of file main.cc.

{ return Grabber::NONE; }
static bool Handler::idle ( ) [inline, static, inherited]

Definition at line 135 of file main.cc.

{ return !handler->child; }

Here is the caller graph for this function:

virtual void Handler::init ( ) [inline, virtual, inherited]

Reimplemented in IdleHandler, StrokeHandler, and AdvancedHandler.

Definition at line 167 of file main.cc.

{}

Here is the caller graph for this function:

virtual void ButtonHandler::motion ( RTriple  e) [inline, virtual]

Reimplemented from Handler.

Definition at line 262 of file main.cc.

                                      {
              if (current_dev->master)
                     XTestFakeMotionEvent(dpy, DefaultScreen(dpy), e->x, e->y, 0);
       }
virtual std::string ButtonHandler::name ( ) [inline, virtual]

Implements Handler.

Definition at line 277 of file main.cc.

{ return "Button"; }
virtual void Handler::pong ( ) [inline, virtual, inherited]

Reimplemented in WaitForPongHandler.

Definition at line 144 of file main.cc.

{}
virtual void ButtonHandler::press ( guint  b,
RTriple  e 
) [inline, virtual]

Reimplemented from Handler.

Definition at line 252 of file main.cc.

                                              {
              if (current_dev->master) {
                     if (!real_button)
                            real_button = b;
                     if (real_button == b)
                            b = button;
                     XTestFakeMotionEvent(dpy, DefaultScreen(dpy), e->x, e->y, 0);
                     XTestFakeButtonEvent(dpy, b, true, CurrentTime);
              }
       }
virtual void Handler::press_master ( guint  b,
Time  t 
) [inline, virtual, inherited]

Reimplemented in SelectHandler, and ScrollHandler.

Definition at line 141 of file main.cc.

{}
virtual void Handler::pressure ( ) [inline, virtual, inherited]

Reimplemented in StrokeHandler.

Definition at line 142 of file main.cc.

{}
virtual void Handler::proximity_out ( ) [inline, virtual, inherited]

Reimplemented in ScrollHandler.

Definition at line 143 of file main.cc.

{}
virtual void Handler::raw_motion ( RTriple  e,
bool  ,
bool   
) [inline, virtual, inherited]

Reimplemented in ScrollHandler, and AbstractScrollHandler.

Definition at line 138 of file main.cc.

{}
virtual void ButtonHandler::release ( guint  b,
RTriple  e 
) [inline, virtual]

Reimplemented from Handler.

Definition at line 267 of file main.cc.

                                                {
              if (current_dev->master) {
                     if (real_button == b)
                            b = button;
                     XTestFakeMotionEvent(dpy, DefaultScreen(dpy), e->x, e->y, 0);
                     XTestFakeButtonEvent(dpy, b, false, CurrentTime);
              }
              if (!xinput_pressed.size())
                     parent->replace_child(NULL);
       }

Here is the call graph for this function:

void Handler::replace_child ( Handler c) [inline, inherited]

Definition at line 145 of file main.cc.

                                      {
              if (child)
                     delete child;
              child = c;
              if (child)
                     child->parent = this;
              if (verbosity >= 2) {
                     std::string stack;
                     for (Handler *h = child ? child : this; h; h=h->parent) {
                            stack = h->name() + " " + stack;
                     }
                     printf("New event handling stack: %s\n", stack.c_str());
              }
              Handler *new_handler = child ? child : this;
              grabber->grab(new_handler->grab_mode());
              if (child)
                     child->init();
              while (queued.size() && Handler::idle()) {
                     (*queued.begin())();
                     queued.pop_front();
              }
       }

Here is the call graph for this function:

Here is the caller graph for this function:

Handler* Handler::top ( ) [inline, inherited]

Definition at line 129 of file main.cc.

                      {
              if (child)
                     return child->top();
              else
                     return this;
       }

Here is the call graph for this function:

Here is the caller graph for this function:


Member Data Documentation

guint ButtonHandler::button [private]

Definition at line 249 of file main.cc.

Handler* Handler::child [protected, inherited]

Definition at line 125 of file main.cc.

Definition at line 248 of file main.cc.

Handler* Handler::parent [inherited]

Definition at line 127 of file main.cc.

guint ButtonHandler::real_button [private]

Definition at line 249 of file main.cc.


The documentation for this class was generated from the following file: