示例#1
0
int waitLoop()
{
    createEvents();
    assert(sharedStruct->size == sizeof(*sharedStruct));
    sharedStruct->running64 = true;

    WaitForSingleObject(eventEnter, INFINITE);
    while(! sharedStruct->exit) {
        assert(sharedStruct->dstThreadId != 0);
        assert(sharedStruct->dstWindow.handle);

        sharedStruct->HOOKHANDLE = SetWindowsHookEx(WH_CALLWNDPROC, KeyboardProc, hMod, sharedStruct->dstThreadId);
        if(sharedStruct->HOOKHANDLE == NULL) {
            DWORD error = GetLastError();
            ODS(_T("Hook not installed error: %ld\n"), error);
        }

        // Signal the 32 bit we are ready
        SetEvent(eventHookInstalled);

        // Wait until the handler is done
        WaitForSingleObject(eventExit, INFINITE);
        if(!UnhookWindowsHookEx(sharedStruct->HOOKHANDLE)) {
            DWORD error = GetLastError();
            ODS(_T("Hook %p not removed error: %ld\n"), sharedStruct->HOOKHANDLE, error);
        }

        WaitForSingleObject(eventEnter, INFINITE);
    }

    destroyEvents();
    return 0;
}
示例#2
0
void EnterVacationDialog::okClicked()
{
    QSettings settings;
    settings.beginGroup( QLatin1String("EnterVacation") );
    settings.setValue( QLatin1String("workHours"), m_ui->hoursSpinBox->value() );
    settings.setValue( QLatin1String("workMinutes"), m_ui->minutesSpinBox->value() );
    settings.setValue( QLatin1String("selectedTaskId"), m_selectedTaskId );

    createEvents();
    QDialog::accept();
}
示例#3
0
 /** Returns a free cuda event
  *
  * @return free cuda event
  */
 CudaEventHandle pop( )
 {
     if( freeEvents.size( ) != 0 )
     {
         CudaEventHandle result = freeEvents.front( );
         freeEvents.pop_front( );
         return result;
     }
     createEvents( );
     return pop( );
 }
示例#4
0
        kClipHolder::kClipHolder( shared_ptr<Settings> _settings ) {
            createEvents();
            autoArrange = false;
            isDraggable = true;
            isDroppable = false;

            applySettings(_settings);
            setWidgetSettings (_settings);
output=-1;

        }
示例#5
0
Equalizer::Equalizer(QWidget *parent) : DialogBase(parent)
{
    oldValues = Global::equalizerValues;
    currentIndex = Database::value("Current", "EqualizerPreset").toInt();
    isNewPreset = false;
    lastId = false;
    presetComboUpdate = false;

    createLabels();
    createButtons();
    createSlider();
    createBoxLayout();
    createEvents();
    setWindowTitle("Equalizador » "+AppName);
}
示例#6
0
Equalizer::Equalizer(QWidget *parent, Database *db, GlobalData *gData) : DialogBase(parent, gData)
{
    this->db = db;
    this->gData = gData;
    equalizerValues = gData->equalizerValues;

    setWindowTitle(tr("Equalizador » ")+AppName);

    createLabels();
    createButtons();
    createSlider();
    createWidgets();
    createEvents();
    createBoxLayout();
}
示例#7
0
void initSharedMem()
{
    new(sharedStruct) SharedMemStruct();
    createEvents();
}
示例#8
0
 kMediaScrollView::kMediaScrollView(){
     createEvents();
 }
示例#9
0
//{ CLIP VIEW!
    kClipView::kClipView() { createEvents(); }
示例#10
0
 kClip::kClip(){ setActiveRange(0.5f); createEvents(); }
示例#11
0
int main() {
    createEvents();
    simulator.startSimulation();
    return 0;
}