Ejemplo n.º 1
0
    //-------------------------------------------------------------------------
    void App::OnWindowFocus( HWND hwnd )
    {
        try
        {
            DWORD process_id = 0;

            // get process id of window
            if( GetWindowThreadProcessId(hwnd, &process_id) )
            {
                // find instance
                Instance* instance = _instance_manager.Find(process_id);
                if( instance != NULL )
                {
                    // notify target to refresh
                    instance->Notify(NOTIFY_REFRESH);
                }
                else
                {
                    // load instance if configured for yolomouse
                    if( _instance_manager.IsConfigured(process_id) )
                        _instance_manager.Load(process_id);
                }
            }
        }
        // catch eggs
        catch( const Char* error )
        {
            SharedTools::ErrorMessage(error);
        }
    }
Ejemplo n.º 2
0
    Bool App::_AssignSize( Long size_index_delta )
    {
        // access active instance
        Instance* instance = _AccessCurrentInstance();
        if( instance == NULL )
            return false;

        // notify instance to assign
        return instance->Notify(NOTIFY_SETSIZE, size_index_delta);
    }
Ejemplo n.º 3
0
    //-------------------------------------------------------------------------
    Bool App::_AssignCursor( Index group_index )
    {
        // access active instance
        Instance* instance = _AccessCurrentInstance();
        if( instance == NULL )
            return false;

        // notify instance to assign
        return instance->Notify(NOTIFY_SETCURSOR, group_index);
    }