当前位置: 首页>>代码示例>>C++>>正文


C++ Flags::get方法代码示例

本文整理汇总了C++中Flags::get方法的典型用法代码示例。如果您正苦于以下问题:C++ Flags::get方法的具体用法?C++ Flags::get怎么用?C++ Flags::get使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Flags的用法示例。


在下文中一共展示了Flags::get方法的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: isOn

 bool isOn(Flags flags) const {
   if (flags.isOn(ModifierFlag::NONE)) {
     return (value_ | ModifierFlag::NONE.get()) == flags.get();
   } else {
     return (value_ & flags.get()) == flags.get();
   }
 }
开发者ID:dodamn,项目名称:keyremap4macbook,代码行数:7,代码来源:KeyCode.hpp

示例2: if

void
KeyboardRepeat::set(EventType eventType,
                    Flags flags,
                    ConsumerKeyCode key,
                    int delayUntilRepeat,
                    int keyRepeat) {
  if (key == ConsumerKeyCode::VK_NONE) return;

  if (eventType == EventType::UP) {
    goto cancel;

  } else if (eventType == EventType::DOWN) {
    if (!key.isRepeatable()) {
      goto cancel;
    }

    cancel();

    primitive_add(eventType, flags, key);
    primitive_start(delayUntilRepeat, keyRepeat);

    IOLOG_DEVEL("KeyboardRepeat::set consumer key:%d flags:0x%x\n", key.get(), flags.get());

  } else {
    goto cancel;
  }

  return;

cancel:
  cancel();
}
开发者ID:MethodGrab,项目名称:Karabiner,代码行数:32,代码来源:KeyboardRepeat.cpp

示例3: if

  void
  KeyboardRepeat::set(EventType eventType,
                      Flags flags,
                      ConsumerKeyCode key)
  {
    if (! queue_) return;

    if (key == ConsumerKeyCode::VK_NONE) return;

    if (eventType == EventType::UP) {
      goto cancel;

    } else if (eventType == EventType::DOWN) {
      if (! key.isRepeatable()) {
        goto cancel;
      }

      cancel();

      primitive_add(eventType, flags, key);
      primitive_start(Config::get_repeat_consumer_initial_wait(),
                      Config::get_repeat_consumer_wait());

      IOLOG_DEVEL("KeyboardRepeat::set consumer key:%d flags:0x%x\n", key.get(), flags.get());

    } else {
      goto cancel;
    }

    return;

  cancel:
    cancel();
  }
开发者ID:NJAldwin,项目名称:KeyRemap4MacBook,代码行数:34,代码来源:KeyboardRepeat.cpp

示例4: loadBitmapFromResource

		inline BitmapHandle loadBitmapFromResource(
			ModuleHandle module,
			const Tstring& instName,
			Flags<ImageLoadOption> loadOption,
			const Size& size = {}
			) {
			return
				static_cast<BitmapHandle>(
					::LoadImage(
						module,
						instName.c_str(),
						IMAGE_ICON,
						size.x,
						size.y,
						loadOption.get()
						)
					);
		}
开发者ID:azaika,项目名称:wawl,代码行数:18,代码来源:Bitmap.hpp

示例5: loadBitmap

		inline BitmapHandle loadBitmap(
			ModuleHandle module,
			const Tstring& fileName,
			Flags<ImageLoadOption> loadOption,
			const Size& size
			) {
			return
				static_cast<BitmapHandle>(
					::LoadImage(
						module,
						fileName.c_str(),
						IMAGE_BITMAP,
						size.x,
						size.y,
						loadOption.get() | LR_LOADFROMFILE
						)
					);
		}
开发者ID:azaika,项目名称:wawl,代码行数:18,代码来源:Bitmap.hpp

示例6: set

void KeyboardRepeat::set(EventType eventType,
                         Flags flags,
                         KeyCode key,
                         KeyboardType keyboardType,
                         int delayUntilRepeat,
                         int keyRepeat) {
  if (key == KeyCode::VK_NONE) return;

  if (eventType == EventType::MODIFY) {
    goto cancel;

  } else if (eventType == EventType::UP) {
    // The repetition of multiple keys is controlled by manual operation.
    // So, we ignore it.
    if (queue_.size() != 1) return;

    // We stop key repeat only when the repeating key is up.
    KeyboardRepeat::Item* p = static_cast<KeyboardRepeat::Item*>(queue_.safe_front());
    if (p) {
      auto params = (p->getParamsBase()).get_Params_KeyboardEventCallBack();
      if (params && key == params->key) {
        goto cancel;
      }
    }

  } else if (eventType == EventType::DOWN) {
    cancel();

    primitive_add(eventType, flags, key, keyboardType);
    primitive_start(delayUntilRepeat, keyRepeat);

    IOLOG_DEVEL("KeyboardRepeat::set key:%d flags:0x%x\n", key.get(), flags.get());

  } else {
    goto cancel;
  }

  return;

cancel:
  cancel();
}
开发者ID:bairedzhang,项目名称:Karabiner,代码行数:42,代码来源:KeyboardRepeat.cpp

示例7: add

 void add(Flags newval)          { add(BRIDGE_DATATYPE_FLAGS,   newval.get()); }
开发者ID:Bilalh,项目名称:KeyRemap4MacBook,代码行数:1,代码来源:KeyToPointingButton.hpp

示例8: log

 // ----------------------------------------
 static void log(bool isCaught, Flags flags) {
   IOLOG_DEBUG("UpdateEventFlagsCallback [%7s]: flags 0x%08x\n",
               isCaught ? "caught" : "sending",
               flags.get());
 }
开发者ID:11liju,项目名称:Karabiner,代码行数:6,代码来源:Params.hpp

示例9:

 Flags operator&(Flags other) const { return value_ & other.get(); }
开发者ID:dodamn,项目名称:keyremap4macbook,代码行数:1,代码来源:KeyCode.hpp

示例10: add

 void add(KeyToKeyType::Value type, Flags newval)   { add(type, BRIDGE_DATATYPE_FLAGS,   newval.get()); }
开发者ID:Bilalh,项目名称:KeyRemap4MacBook,代码行数:1,代码来源:DependingPressingPeriodKeyToKey.hpp


注:本文中的Flags::get方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。