Ejemplo n.º 1
0
NS_IMETHODIMP
XULCommandEvent::GetInputSource(uint16_t* aInputSource)
{
  NS_ENSURE_ARG_POINTER(aInputSource);
  *aInputSource = InputSource();
  return NS_OK;
}
Ejemplo n.º 2
0
QgarAppDescr::QgarAppDescr(std::istream& stream)

  throw(runtime_error)

  : _parseData(0)

{
  init(InputSource(stream));
}
Ejemplo n.º 3
0
// Default constructor
QgarAppDescr::QgarAppDescr(const char* const filename)
  
  throw(runtime_error)
  
  : _parseData(0)

{
  ifstream stream(filename);
  init(InputSource(stream));
}
Ejemplo n.º 4
0
QgarAppDescr::QgarAppDescr(const std::string& filename)

  throw(runtime_error)
 
  : _parseData(0)

{
  ifstream stream(filename.c_str());
  init(InputSource(stream));
}
bool VirtualKey::VK_JIS_TOGGLE_EISUU_KANA::handle(const Params_KeyboardEventCallBack& params) {
  if (params.key != KeyCode::VK_JIS_TOGGLE_EISUU_KANA) return false;

  if (params.ex_iskeydown) {
    if (InputSource::JAPANESE == InputSource(CommonData::getcurrent_workspacedata().inputsource)) {
      newkeycode_ = KeyCode::JIS_EISUU;
    } else {
      newkeycode_ = KeyCode::JIS_KANA;
    }
  }

  Params_KeyboardEventCallBack p(params.eventType, params.flags, newkeycode_,
                                 params.keyboardType, params.repeat);
  EventOutputQueue::FireKey::fire(p);

  return true;
}
Ejemplo n.º 6
0
 void run(){
     std::vector<InputMap<Keys>::InputEvent> out = InputManager::getEvents(input, InputSource(true));
     for (std::vector<InputMap<Keys>::InputEvent>::iterator it = out.begin(); it != out.end(); it++){
         const InputMap<Keys>::InputEvent & event = *it;
         if (event.enabled){
             if (event.out == Esc){
                 is_done = true;
             }
             /* NOTE Assumes only one cursor */
             if (event.out == Up){
                 select.moveUp(0);
             }
             if (event.out == Down){
                 select.moveDown(0);
             }
             if (event.out == Left){
                 select.moveLeft(0);
             }
             if (event.out == Right){
                 select.moveRight(0);
             }
             if (event.out == Enter){
                 select.nextMessages();
             }
         }
     }
     
     select.act();
    
     //! Update a message in a collection programmatically
     if (ticker++ >= 50){
         Util::ReferenceCount<MessageCollection> message = select.getMessages("player1");
         if (message != NULL){
             std::ostringstream number;
             number << random() % 9999999999;
             message->setReplaceMessage("number", number.str());
         }
         ticker = 0;
     }
 
 }