void colour_f_rgb2yuv(const colour_floats *in, colour_floats *out) { out->c[cY] = 16 + SCF(in->c[cR], 65.738) + SCF(in->c[cG], 129.057) + SCF(in->c[cB], 25.064); out->c[cCb] = 128 - SCF(in->c[cR], 37.945) - SCF(in->c[cG], 74.494) + SCF(in->c[cB], 112.439); out->c[cCr] = 128 + SCF(in->c[cR], 112.439) - SCF(in->c[cG], 94.154) - SCF(in->c[cB], 18.285); out->c[cA] = in->c[cA]; }
void colour_f_yuv2rgb(const colour_floats *in, colour_floats *out) { out->c[cR] = SCF(in->c[cY], 298.082) + SCF(in->c[cCr], 408.583) - 222.921; out->c[cG] = SCF(in->c[cY], 298.082) - SCF(in->c[cCb], 100.291) - SCF(in->c[cCr], 208.120) + 135.576; out->c[cB] = SCF(in->c[cY], 298.082) + SCF(in->c[cCb], 516.412) - 276.836; out->c[cA] = in->c[cA]; }
Bool EWMH_CMD_Style(char *token, window_style *ptmpstyle, int on) { int found = False; if (StrEquals(token, "EWMHDonateIcon")) { found = True; S_SET_DO_EWMH_DONATE_ICON(SCF(*ptmpstyle), on); S_SET_DO_EWMH_DONATE_ICON(SCM(*ptmpstyle), 1); S_SET_DO_EWMH_DONATE_ICON(SCC(*ptmpstyle), 1); } else if (StrEquals(token, "EWMHDonateMiniIcon")) { found = True; S_SET_DO_EWMH_DONATE_MINI_ICON(SCF(*ptmpstyle), on); S_SET_DO_EWMH_DONATE_MINI_ICON(SCM(*ptmpstyle), 1); S_SET_DO_EWMH_DONATE_MINI_ICON(SCC(*ptmpstyle), 1); } else if (StrEquals(token, "EWMHDontDonateIcon")) { found = True; S_SET_DO_EWMH_DONATE_ICON(SCF(*ptmpstyle), !on); S_SET_DO_EWMH_DONATE_ICON(SCM(*ptmpstyle), 1); S_SET_DO_EWMH_DONATE_ICON(SCC(*ptmpstyle), 1); } else if (StrEquals(token, "EWMHDontDonateMiniIcon")) { found = True; S_SET_DO_EWMH_DONATE_MINI_ICON(SCF(*ptmpstyle), !on); S_SET_DO_EWMH_DONATE_MINI_ICON(SCM(*ptmpstyle), 1); S_SET_DO_EWMH_DONATE_MINI_ICON(SCC(*ptmpstyle), 1); } else if (StrEquals(token, "EWMHMaximizeIgnoreWorkingArea")) { found = True; S_SET_EWMH_MAXIMIZE_MODE( SCF(*ptmpstyle), EWMH_IGNORE_WORKING_AREA); S_SET_EWMH_MAXIMIZE_MODE( SCM(*ptmpstyle), EWMH_WORKING_AREA_MASK); S_SET_EWMH_MAXIMIZE_MODE( SCC(*ptmpstyle), EWMH_WORKING_AREA_MASK); } else if (StrEquals(token, "EWMHMaximizeUseWorkingArea")) { found = True; S_SET_EWMH_MAXIMIZE_MODE( SCF(*ptmpstyle), EWMH_USE_WORKING_AREA); S_SET_EWMH_MAXIMIZE_MODE( SCM(*ptmpstyle), EWMH_WORKING_AREA_MASK); S_SET_EWMH_MAXIMIZE_MODE( SCC(*ptmpstyle), EWMH_WORKING_AREA_MASK); } else if (StrEquals(token, "EWMHMaximizeUseDynamicWorkingArea")) { found = True; S_SET_EWMH_MAXIMIZE_MODE( SCF(*ptmpstyle), EWMH_USE_DYNAMIC_WORKING_AREA); S_SET_EWMH_MAXIMIZE_MODE( SCM(*ptmpstyle), EWMH_WORKING_AREA_MASK); S_SET_EWMH_MAXIMIZE_MODE( SCC(*ptmpstyle), EWMH_WORKING_AREA_MASK); } else if (StrEquals(token, "EWMHMiniIconOverride")) { found = True; S_SET_DO_EWMH_MINI_ICON_OVERRIDE(SCF(*ptmpstyle), on); S_SET_DO_EWMH_MINI_ICON_OVERRIDE(SCM(*ptmpstyle), 1); S_SET_DO_EWMH_MINI_ICON_OVERRIDE(SCC(*ptmpstyle), 1); } else if (StrEquals(token, "EWMHNoMiniIconOverride")) { found = True; S_SET_DO_EWMH_MINI_ICON_OVERRIDE(SCF(*ptmpstyle), !on); S_SET_DO_EWMH_MINI_ICON_OVERRIDE(SCM(*ptmpstyle), 1); S_SET_DO_EWMH_MINI_ICON_OVERRIDE(SCC(*ptmpstyle), 1); } else if (StrEquals(token, "EWMHPlacementIgnoreWorkingArea")) { found = True; ptmpstyle->flags.ewmh_placement_mode = EWMH_IGNORE_WORKING_AREA; ptmpstyle->flag_mask.ewmh_placement_mode = EWMH_WORKING_AREA_MASK; ptmpstyle->change_mask.ewmh_placement_mode = EWMH_WORKING_AREA_MASK; } else if (StrEquals(token, "EWMHPlacementUseWorkingArea")) { found = True; ptmpstyle->flags.ewmh_placement_mode = EWMH_USE_WORKING_AREA; ptmpstyle->flag_mask.ewmh_placement_mode = EWMH_WORKING_AREA_MASK; ptmpstyle->change_mask.ewmh_placement_mode = EWMH_WORKING_AREA_MASK; } else if (StrEquals(token, "EWMHPlacementUseDynamicWorkingArea")) { found = True; ptmpstyle->flags.ewmh_placement_mode = EWMH_USE_DYNAMIC_WORKING_AREA; ptmpstyle->flag_mask.ewmh_placement_mode = EWMH_WORKING_AREA_MASK; ptmpstyle->change_mask.ewmh_placement_mode = EWMH_WORKING_AREA_MASK; } else if (StrEquals(token, "EWMHUseStackingOrderHints")) { found = True; S_SET_DO_EWMH_USE_STACKING_HINTS(SCF(*ptmpstyle), on); S_SET_DO_EWMH_USE_STACKING_HINTS(SCM(*ptmpstyle), 1); S_SET_DO_EWMH_USE_STACKING_HINTS(SCC(*ptmpstyle), 1); } else if (StrEquals(token, "EWMHIgnoreStackingOrderHints")) { found = True; S_SET_DO_EWMH_USE_STACKING_HINTS(SCF(*ptmpstyle), !on); S_SET_DO_EWMH_USE_STACKING_HINTS(SCM(*ptmpstyle), 1); S_SET_DO_EWMH_USE_STACKING_HINTS(SCC(*ptmpstyle), 1); } else if (StrEquals(token, "EWMHUseStateHints")) { found = True; S_SET_DO_EWMH_IGNORE_STATE_HINTS(SCF(*ptmpstyle), !on); S_SET_DO_EWMH_IGNORE_STATE_HINTS(SCM(*ptmpstyle), 1); S_SET_DO_EWMH_IGNORE_STATE_HINTS(SCC(*ptmpstyle), 1); } else if (StrEquals(token, "EWMHIgnoreStateHints")) { found = True; S_SET_DO_EWMH_IGNORE_STATE_HINTS(SCF(*ptmpstyle), on); S_SET_DO_EWMH_IGNORE_STATE_HINTS(SCM(*ptmpstyle), 1); S_SET_DO_EWMH_IGNORE_STATE_HINTS(SCC(*ptmpstyle), 1); } else if (StrEquals(token, "EWMHUseStrutHints")) { found = True; S_SET_DO_EWMH_IGNORE_STRUT_HINTS(SCF(*ptmpstyle), !on); S_SET_DO_EWMH_IGNORE_STRUT_HINTS(SCM(*ptmpstyle), 1); S_SET_DO_EWMH_IGNORE_STRUT_HINTS(SCC(*ptmpstyle), 1); } else if (StrEquals(token, "EWMHIgnoreStrutHints")) { found = True; S_SET_DO_EWMH_IGNORE_STRUT_HINTS(SCF(*ptmpstyle), on); S_SET_DO_EWMH_IGNORE_STRUT_HINTS(SCM(*ptmpstyle), 1); S_SET_DO_EWMH_IGNORE_STRUT_HINTS(SCC(*ptmpstyle), 1); } else if (StrEquals(token, "EWMHIgnoreWindowType")) { found = True; S_SET_DO_EWMH_IGNORE_WINDOW_TYPE(SCF(*ptmpstyle), on); S_SET_DO_EWMH_IGNORE_WINDOW_TYPE(SCM(*ptmpstyle), 1); S_SET_DO_EWMH_IGNORE_WINDOW_TYPE(SCC(*ptmpstyle), 1); } return found; }
/*SCF*/ static void op_0x37(Z80EX_CONTEXT *cpu) { SCF(); T_WAIT_UNTIL(4); return; }