miketheprogrammer / go-thrust

Cross Platform UI Kit powered by Blink/V8/Chromium Content Lib
MIT License
445 stars 34 forks source link

Figure out best way to implement is is_* Getters in thrust #24

Open miketheprogrammer opened 9 years ago

miketheprogrammer commented 9 years ago

Getters like is_maximized dont fit nicely into our asynchronous library. What is the best way to handle this.

The following C code shows the commands.

  else if(method.compare("is_maximized") == 0) {
    res->SetBoolean("maximized", window_->IsMaximized());
  }
  else if(method.compare("is_minimized") == 0) {
    res->SetBoolean("minimized", window_->IsMinimized());
  }
  else if(method.compare("is_fullscreen") == 0) {
    res->SetBoolean("fullscreen", window_->IsFullscreen());
  }
  else if(method.compare("is_kiosk") == 0) {
    res->SetBoolean("kiosk", window_->IsKiosk());
  }
  else if(method.compare("is_devtools_opened") == 0) {
    res->SetBoolean("opened", window_->IsDevToolsOpened());
  }