本文整理汇总了C++中Blackbox::XDisplay方法的典型用法代码示例。如果您正苦于以下问题:C++ Blackbox::XDisplay方法的具体用法?C++ Blackbox::XDisplay怎么用?C++ Blackbox::XDisplay使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Blackbox
的用法示例。
在下文中一共展示了Blackbox::XDisplay方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: load
void BlackboxResource::load(Blackbox& blackbox) {
if (screen_resources == 0) {
screen_resources = new ScreenResource[blackbox.screenCount()];
}
bt::Resource res(rc_file);
menu_file = bt::expandTilde(res.read("session.menuFile",
"Session.MenuFile",
DEFAULTMENU));
style_file = bt::expandTilde(res.read("session.styleFile",
"Session.StyleFile",
DEFAULTSTYLE));
unsigned int maxcolors = res.read("session.maximumColors",
"Session.MaximumColors",
~0u);
if (maxcolors != ~0u)
bt::Image::setMaximumColors(maxcolors);
double_click_interval = res.read("session.doubleClickInterval",
"Session.DoubleClickInterval",
250l);
auto_raise_delay.tv_usec = res.read("session.autoRaiseDelay",
"Session.AutoRaiseDelay",
400l);
auto_raise_delay.tv_sec = auto_raise_delay.tv_usec / 1000;
auto_raise_delay.tv_usec -= (auto_raise_delay.tv_sec * 1000);
auto_raise_delay.tv_usec *= 1000;
bt::DitherMode dither_mode;
std::string str = res.read("session.imageDither",
"Session.ImageDither",
"OrderedDither");
if (!strcasecmp("ordered", str.c_str()) ||
!strcasecmp("fast", str.c_str()) ||
!strcasecmp("ordereddither", str.c_str()) ||
!strcasecmp("fastdither", str.c_str())) {
dither_mode = bt::OrderedDither;
} else if (!strcasecmp("floydsteinberg", str.c_str()) ||
!strcasecmp("quality", str.c_str()) ||
!strcasecmp("diffuse", str.c_str()) ||
!strcasecmp("floydsteinbergdither", str.c_str()) ||
!strcasecmp("qualitydither", str.c_str()) ||
!strcasecmp("diffusedither", str.c_str())) {
dither_mode = bt::FloydSteinbergDither;
} else if (!strcasecmp("no", str.c_str()) ||
!strcasecmp("nodither", str.c_str()) ||
!strcasecmp("off", str.c_str())) {
dither_mode = bt::NoDither;
} else {
dither_mode = bt::OrderedDither;
}
bt::Image::setDitherMode(dither_mode);
_cursors.pointer =
XCreateFontCursor(blackbox.XDisplay(), XC_left_ptr);
_cursors.move =
XCreateFontCursor(blackbox.XDisplay(), XC_fleur);
_cursors.resize_top_left =
XCreateFontCursor(blackbox.XDisplay(), XC_top_left_corner);
_cursors.resize_bottom_left =
XCreateFontCursor(blackbox.XDisplay(), XC_bottom_left_corner);
_cursors.resize_top_right =
XCreateFontCursor(blackbox.XDisplay(), XC_top_right_corner);
_cursors.resize_bottom_right =
XCreateFontCursor(blackbox.XDisplay(), XC_bottom_right_corner);
// window options
str = res.read("session.focusModel",
"Session.FocusModel",
res.read("session.screen0.focusModel",
"Session.Screen0.FocusModel",
"ClickToFocus"));
if (str.find("ClickToFocus") != std::string::npos) {
focus_model = ClickToFocusModel;
auto_raise = false;
click_raise = false;
} else {
focus_model = SloppyFocusModel;
auto_raise = (str.find("AutoRaise") != std::string::npos);
click_raise = (str.find("ClickRaise") != std::string::npos);
}
str = res.read("session.windowPlacement",
"Session.WindowPlacement",
res.read("session.screen0.windowPlacement",
"Session.Screen0.WindowPlacement",
"RowSmartPlacement"));
if (strcasecmp(str.c_str(), "ColSmartPlacement") == 0)
window_placement_policy = ColSmartPlacement;
else if (strcasecmp(str.c_str(), "CenterPlacement") == 0)
window_placement_policy = CenterPlacement;
else if (strcasecmp(str.c_str(), "CascadePlacement") == 0)
window_placement_policy = CascadePlacement;
else
window_placement_policy = RowSmartPlacement;
//.........这里部分代码省略.........