示例#1
0
文件: world.c 项目: danorine/shoes
shoes_code
shoes_init(SHOES_INIT_ARGS)
{
#ifdef SHOES_GTK
  gtk_init(NULL, NULL);
#endif
#ifdef SHOES_WIN32
  INITCOMMONCONTROLSEX InitCtrlEx;
  InitCtrlEx.dwSize = sizeof(INITCOMMONCONTROLSEX);
  InitCtrlEx.dwICC = ICC_PROGRESS_CLASS;
  InitCommonControlsEx(&InitCtrlEx);
#else
  signal(SIGINT,  shoes_sigint);
  signal(SIGQUIT, shoes_sigint);
#endif
  ruby_init();
  shoes_ruby_init();
  shoes_world = shoes_world_alloc();
#ifdef SHOES_QUARTZ
  shoes_app_quartz_install();
  shoes_slot_quartz_register();
  if (PasteboardCreate(kPasteboardClipboard, &shoes_world->os.clip) != noErr) {
    INFO("Apple Pasteboard create failed.\n");
  }
#endif
#ifdef SHOES_WIN32
  shoes_world->os.instance = inst;
  shoes_world->os.style = style;
  shoes_classex_init();
#endif
  return SHOES_OK;
}
示例#2
0
shoes_code
shoes_init(SHOES_INIT_ARGS)
{
#ifdef SHOES_SIGNAL
    signal(SIGINT,  shoes_sigint);
    signal(SIGQUIT, shoes_sigint);
#endif
    shoes_ruby_embed();
    shoes_ruby_init();
    shoes_world = shoes_world_alloc();
#ifdef SHOES_WIN32
    shoes_world->os.instance = inst;
    shoes_world->os.style = style;
#endif
    shoes_native_init();
    rb_const_set(cShoes, rb_intern("FONTS"), shoes_font_list());
    return SHOES_OK;
}