コード例 #1
0
ファイル: spin_edit.c プロジェクト: olegyurchenko/dda-control
/*----------------------------------------------------------------------------*/
void spin_edit_start(const char *caption, int *val, int max, int min, int increment)
{
  int size;
  char buffer[16];

  spin_data.value = val;
  spin_data.caption = caption;
  spin_data.min = min;
  spin_data.max = max;
  spin_data.increment = increment;

  spin_data.size = sprintf(buffer, "%d", min);
  size = sprintf(buffer, "%d", max);
  if(spin_data.size < size)
    spin_data.size = size;

  value = *val;
  if(value < min)
    value = min;
  if(value > max)
    value = max;

  spin_data.cursor_active = 1;
  timeout_set(&spin_data.timeout, CURSOR_TIME, sys_tick_count());
  push_event_handler();
  set_event_handler(spin_handler, 0);
}
コード例 #2
0
ファイル: xmlhttprequest.c プロジェクト: kernelOfTruth/wine
static HRESULT WINAPI HTMLXMLHttpRequest_put_onreadystatechange(IHTMLXMLHttpRequest *iface, VARIANT v)
{
    HTMLXMLHttpRequest *This = impl_from_IHTMLXMLHttpRequest(iface);

    TRACE("(%p)->(%s)\n", This, debugstr_variant(&v));

    return set_event_handler(&This->event_target, EVENTID_READYSTATECHANGE, &v);
}
コード例 #3
0
ファイル: view.c プロジェクト: olegyurchenko/dda-control
/*----------------------------------------------------------------------------*/
void viewer(view_get_t get, void *data, int string_count)
{
  view_data.get = get;
  view_data.data = data;
  view_data.string_count = string_count;
  view_data.index = 0;
  view_data.cursor_active = 1;
  view_data.active_key = 0;
  timeout_set(&view_data.timeout, CURSOR_TIME, sys_tick_count());
  push_event_handler();
  set_event_handler(view_handler, 0);
}
コード例 #4
0
ファイル: client.c プロジェクト: sfrias/orvibo
bool
orvibo_start(const ORVIBO_EVENT_HANDLER handler) {
	if (running) {
		return true;
	}
	set_event_handler(handler);
	if (pthread_create(&receive_thread, NULL, (void *(*) (void *)) receive, NULL) != 0) {
		clear_event_handler();
		return false;
	}
	return running = true;
}
コード例 #5
0
ファイル: MainWindow.cpp プロジェクト: gan74/Yave
MainWindow::MainWindow(ContextPtr cptr) :
		Window({1280, 768}, "Yave", Window::Resizable),
		ContextLinked(cptr) {

	_ui_renderer = std::make_shared<ImGuiRenderer>(device());

	set_event_handler(new MainEventHandler());

	context()->ui().show<EngineView>();
	context()->ui().show<EntityView>();
	context()->ui().show<ResourceBrowser>();
	context()->ui().show<PropertyPanel>();
	context()->ui().show<MaterialEditor>();
}
コード例 #6
0
ファイル: main.c プロジェクト: prologin/stechec-2011
int run(void* foo, void* api, void* client_cx)
{
  init_game();
  set_event_handler(api, next_turn_callback);

  g_ccx = client_cx;
  while (get_state(api) != GS_END)
  {
    // Play a turn.
    // When this return, it means the user asked to go to
    // the next turn.
    play_turn();

    // Process our messages.
    process_messages(client_cx);
  }

  //end_game();
  foo = foo;
  return 0;
}