Ignore:
Timestamp:
May 15, 2011, 6:22:13 AM (11 years ago)
Author:
Sam Hocevar
Message:

imlib: move generic code back into the platform-agnostic imlib.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • abuse/trunk/src/imlib/event.h

    r654 r656  
    7171    void SysInit();
    7272    void SysWarpMouse(vec2i pos);
     73    void SysEvent(Event &ev);
    7374
    7475  int IsPending();
     
    7879
    7980  int has_mouse() { return 1; }
    80   void set_mouse_shape(image *im, int centerx, int centery)
    81   {
    82     m_sprite->change_visual(im, 1);
    83     m_center = vec2i(centerx, centery);
    84   }
    85   void set_mouse_position(int mx, int my)
    86   {
    87     m_pos = vec2i(Min(mx, m_screen->Size().x - 1),
    88                   Min(my, m_screen->Size().y - 1));
    89     SysWarpMouse(m_pos);
    90   }
     81    void SetMouseShape(image *im, vec2i center)
     82    {
     83        m_sprite->change_visual(im, 1);
     84        m_center = center;
     85    }
     86    void SetMousePos(vec2i pos)
     87    {
     88        m_pos = vec2i(Min(Max(pos.x, 0), m_screen->Size().x - 1),
     89                      Min(Max(pos.y, 0), m_screen->Size().y - 1));
     90        SysWarpMouse(m_pos);
     91    }
    9192
    9293private:
    93     int get_key_flags();
    94 
    9594    linked_list m_events;
    96     int m_pending, last_keystat, last_key;
     95    int m_pending, last_key;
    9796    sprite_controller sc;
    9897
     
    102101    /* Mouse information */
    103102    sprite *m_sprite;
    104     vec2i m_pos, m_lastpos, m_center;
    105     int m_button, m_lastbutton;
     103    vec2i m_pos, m_center;
     104    int m_button;
    106105};
    107106
Note: See TracChangeset for help on using the changeset viewer.