mirror of
https://github.com/gryf/wmaker.git
synced 2025-12-18 12:00:31 +01:00
Tidy
- Kill unused vars in wrlib - Add missing initializers to defaults.c:staticOptionList - Re-format it slightly - Kill some dead code - Kill stupid "if (const op var)"
This commit is contained in:
committed by
Carlos R. Mafra
parent
79e1bb53d3
commit
241e66ff0a
389
src/defaults.c
389
src/defaults.c
@@ -310,365 +310,352 @@ static WOptionEnumeration seWorkspaceBorder[] = {
|
||||
WDefaultEntry staticOptionList[] = {
|
||||
|
||||
{"ColormapSize", "4", NULL,
|
||||
&wPreferences.cmap_size, getInt, NULL},
|
||||
&wPreferences.cmap_size, getInt, NULL, NULL, NULL},
|
||||
{"DisableDithering", "NO", NULL,
|
||||
&wPreferences.no_dithering, getBool, NULL},
|
||||
/* static by laziness */
|
||||
&wPreferences.no_dithering, getBool, NULL, NULL, NULL},
|
||||
{"IconSize", "64", NULL,
|
||||
&wPreferences.icon_size, getInt, NULL},
|
||||
&wPreferences.icon_size, getInt, NULL, NULL, NULL},
|
||||
{"ModifierKey", "Mod1", NULL,
|
||||
&wPreferences.modifier_mask, getModMask, NULL},
|
||||
&wPreferences.modifier_mask, getModMask, NULL, NULL, NULL},
|
||||
{"DisableWSMouseActions", "NO", NULL,
|
||||
&wPreferences.disable_root_mouse, getBool, NULL},
|
||||
{"FocusMode", "manual", seFocusModes,
|
||||
&wPreferences.focus_mode, getEnum, NULL}, /* have a problem when switching from manual to sloppy without restart */
|
||||
&wPreferences.disable_root_mouse, getBool, NULL, NULL, NULL},
|
||||
{"FocusMode", "manual", seFocusModes, /* have a problem when switching from */
|
||||
&wPreferences.focus_mode, getEnum, NULL, NULL, NULL}, /* manual to sloppy without restart */
|
||||
{"NewStyle", "NO", NULL,
|
||||
&wPreferences.new_style, getBool, NULL},
|
||||
&wPreferences.new_style, getBool, NULL, NULL, NULL},
|
||||
{"DisableDock", "NO", (void *)WM_DOCK,
|
||||
NULL, getBool, setIfDockPresent},
|
||||
NULL, getBool, setIfDockPresent, NULL, NULL},
|
||||
{"DisableClip", "NO", (void *)WM_CLIP,
|
||||
NULL, getBool, setIfDockPresent},
|
||||
NULL, getBool, setIfDockPresent, NULL, NULL},
|
||||
{"DisableMiniwindows", "NO", NULL,
|
||||
&wPreferences.disable_miniwindows, getBool, NULL}
|
||||
&wPreferences.disable_miniwindows, getBool, NULL, NULL, NULL}
|
||||
};
|
||||
|
||||
WDefaultEntry optionList[] = {
|
||||
|
||||
/* dynamic options */
|
||||
|
||||
{"IconPosition", "blh", seIconPositions,
|
||||
&wPreferences.icon_yard, getEnum, setIconPosition},
|
||||
&wPreferences.icon_yard, getEnum, setIconPosition, NULL, NULL},
|
||||
{"IconificationStyle", "Zoom", seIconificationStyles,
|
||||
&wPreferences.iconification_style, getEnum, NULL},
|
||||
&wPreferences.iconification_style, getEnum, NULL, NULL, NULL},
|
||||
{"MouseLeftButtonAction", "SelectWindows", seMouseButtonActions,
|
||||
&wPreferences.mouse_button1, getEnum, NULL},
|
||||
&wPreferences.mouse_button1, getEnum, NULL, NULL, NULL},
|
||||
{"MouseMiddleButtonAction", "OpenWindowListMenu", seMouseButtonActions,
|
||||
&wPreferences.mouse_button2, getEnum, NULL},
|
||||
&wPreferences.mouse_button2, getEnum, NULL, NULL, NULL},
|
||||
{"MouseRightButtonAction", "OpenApplicationsMenu", seMouseButtonActions,
|
||||
&wPreferences.mouse_button3, getEnum, NULL},
|
||||
&wPreferences.mouse_button3, getEnum, NULL, NULL, NULL},
|
||||
{"MouseWheelAction", "None", seMouseWheelActions,
|
||||
&wPreferences.mouse_wheel, getEnum, NULL},
|
||||
&wPreferences.mouse_wheel, getEnum, NULL, NULL, NULL},
|
||||
{"PixmapPath", DEF_PIXMAP_PATHS, NULL,
|
||||
&wPreferences.pixmap_path, getPathList, NULL},
|
||||
&wPreferences.pixmap_path, getPathList, NULL, NULL, NULL},
|
||||
{"IconPath", DEF_ICON_PATHS, NULL,
|
||||
&wPreferences.icon_path, getPathList, NULL},
|
||||
&wPreferences.icon_path, getPathList, NULL, NULL, NULL},
|
||||
{"ColormapMode", "auto", seColormapModes,
|
||||
&wPreferences.colormap_mode, getEnum, NULL},
|
||||
&wPreferences.colormap_mode, getEnum, NULL, NULL, NULL},
|
||||
{"AutoFocus", "NO", NULL,
|
||||
&wPreferences.auto_focus, getBool, NULL},
|
||||
&wPreferences.auto_focus, getBool, NULL, NULL, NULL},
|
||||
{"RaiseDelay", "0", NULL,
|
||||
&wPreferences.raise_delay, getInt, NULL},
|
||||
&wPreferences.raise_delay, getInt, NULL, NULL, NULL},
|
||||
{"CirculateRaise", "NO", NULL,
|
||||
&wPreferences.circ_raise, getBool, NULL},
|
||||
&wPreferences.circ_raise, getBool, NULL, NULL, NULL},
|
||||
{"Superfluous", "NO", NULL,
|
||||
&wPreferences.superfluous, getBool, NULL},
|
||||
&wPreferences.superfluous, getBool, NULL, NULL, NULL},
|
||||
{"AdvanceToNewWorkspace", "NO", NULL,
|
||||
&wPreferences.ws_advance, getBool, NULL},
|
||||
&wPreferences.ws_advance, getBool, NULL, NULL, NULL},
|
||||
{"CycleWorkspaces", "NO", NULL,
|
||||
&wPreferences.ws_cycle, getBool, NULL},
|
||||
&wPreferences.ws_cycle, getBool, NULL, NULL, NULL},
|
||||
{"WorkspaceNameDisplayPosition", "center", seDisplayPositions,
|
||||
&wPreferences.workspace_name_display_position, getEnum, NULL},
|
||||
&wPreferences.workspace_name_display_position, getEnum, NULL, NULL, NULL},
|
||||
{"WorkspaceBorder", "None", seWorkspaceBorder,
|
||||
&wPreferences.workspace_border_position, getEnum, updateUsableArea},
|
||||
&wPreferences.workspace_border_position, getEnum, updateUsableArea, NULL, NULL},
|
||||
{"WorkspaceBorderSize", "0", NULL,
|
||||
&wPreferences.workspace_border_size, getInt, updateUsableArea},
|
||||
&wPreferences.workspace_border_size, getInt, updateUsableArea, NULL, NULL},
|
||||
{"StickyIcons", "NO", NULL,
|
||||
&wPreferences.sticky_icons, getBool, setStickyIcons},
|
||||
&wPreferences.sticky_icons, getBool, setStickyIcons, NULL, NULL},
|
||||
{"SaveSessionOnExit", "NO", NULL,
|
||||
&wPreferences.save_session_on_exit, getBool, NULL},
|
||||
&wPreferences.save_session_on_exit, getBool, NULL, NULL, NULL},
|
||||
{"WrapMenus", "NO", NULL,
|
||||
&wPreferences.wrap_menus, getBool, NULL},
|
||||
&wPreferences.wrap_menus, getBool, NULL, NULL, NULL},
|
||||
{"ScrollableMenus", "NO", NULL,
|
||||
&wPreferences.scrollable_menus, getBool, NULL},
|
||||
&wPreferences.scrollable_menus, getBool, NULL, NULL, NULL},
|
||||
{"MenuScrollSpeed", "medium", seSpeeds,
|
||||
&wPreferences.menu_scroll_speed, getEnum, NULL},
|
||||
&wPreferences.menu_scroll_speed, getEnum, NULL, NULL, NULL},
|
||||
{"IconSlideSpeed", "medium", seSpeeds,
|
||||
&wPreferences.icon_slide_speed, getEnum, NULL},
|
||||
&wPreferences.icon_slide_speed, getEnum, NULL, NULL, NULL},
|
||||
{"ShadeSpeed", "medium", seSpeeds,
|
||||
&wPreferences.shade_speed, getEnum, NULL},
|
||||
&wPreferences.shade_speed, getEnum, NULL, NULL, NULL},
|
||||
{"DoubleClickTime", "250", (void *)&wPreferences.dblclick_time,
|
||||
&wPreferences.dblclick_time, getInt, setDoubleClick,
|
||||
},
|
||||
&wPreferences.dblclick_time, getInt, setDoubleClick, NULL, NULL},
|
||||
{"AlignSubmenus", "NO", NULL,
|
||||
&wPreferences.align_menus, getBool, NULL},
|
||||
&wPreferences.align_menus, getBool, NULL, NULL, NULL},
|
||||
{"OpenTransientOnOwnerWorkspace", "NO", NULL,
|
||||
&wPreferences.open_transients_with_parent, getBool, NULL},
|
||||
&wPreferences.open_transients_with_parent, getBool, NULL, NULL, NULL},
|
||||
{"WindowPlacement", "auto", sePlacements,
|
||||
&wPreferences.window_placement, getEnum, NULL},
|
||||
&wPreferences.window_placement, getEnum, NULL, NULL, NULL},
|
||||
{"IgnoreFocusClick", "NO", NULL,
|
||||
&wPreferences.ignore_focus_click, getBool, NULL},
|
||||
&wPreferences.ignore_focus_click, getBool, NULL, NULL, NULL},
|
||||
{"UseSaveUnders", "NO", NULL,
|
||||
&wPreferences.use_saveunders, getBool, NULL},
|
||||
&wPreferences.use_saveunders, getBool, NULL, NULL, NULL},
|
||||
{"OpaqueMove", "NO", NULL,
|
||||
&wPreferences.opaque_move, getBool, NULL},
|
||||
&wPreferences.opaque_move, getBool, NULL, NULL, NULL},
|
||||
{"DisableAnimations", "NO", NULL,
|
||||
&wPreferences.no_animations, getBool, NULL},
|
||||
&wPreferences.no_animations, getBool, NULL, NULL, NULL},
|
||||
{"DontLinkWorkspaces", "NO", NULL,
|
||||
&wPreferences.no_autowrap, getBool, NULL},
|
||||
&wPreferences.no_autowrap, getBool, NULL, NULL, NULL},
|
||||
{"AutoArrangeIcons", "NO", NULL,
|
||||
&wPreferences.auto_arrange_icons, getBool, NULL},
|
||||
&wPreferences.auto_arrange_icons, getBool, NULL, NULL, NULL},
|
||||
{"NoWindowOverDock", "NO", NULL,
|
||||
&wPreferences.no_window_over_dock, getBool, updateUsableArea},
|
||||
&wPreferences.no_window_over_dock, getBool, updateUsableArea, NULL, NULL},
|
||||
{"NoWindowOverIcons", "NO", NULL,
|
||||
&wPreferences.no_window_over_icons, getBool, updateUsableArea},
|
||||
&wPreferences.no_window_over_icons, getBool, updateUsableArea, NULL, NULL},
|
||||
{"WindowPlaceOrigin", "(0, 0)", NULL,
|
||||
&wPreferences.window_place_origin, getCoord, NULL},
|
||||
&wPreferences.window_place_origin, getCoord, NULL, NULL, NULL},
|
||||
{"ResizeDisplay", "corner", seGeomDisplays,
|
||||
&wPreferences.size_display, getEnum, NULL},
|
||||
&wPreferences.size_display, getEnum, NULL, NULL, NULL},
|
||||
{"MoveDisplay", "corner", seGeomDisplays,
|
||||
&wPreferences.move_display, getEnum, NULL},
|
||||
&wPreferences.move_display, getEnum, NULL, NULL, NULL},
|
||||
{"DontConfirmKill", "NO", NULL,
|
||||
&wPreferences.dont_confirm_kill, getBool, NULL},
|
||||
&wPreferences.dont_confirm_kill, getBool, NULL, NULL, NULL},
|
||||
{"WindowTitleBalloons", "NO", NULL,
|
||||
&wPreferences.window_balloon, getBool, NULL},
|
||||
&wPreferences.window_balloon, getBool, NULL, NULL, NULL},
|
||||
{"MiniwindowTitleBalloons", "NO", NULL,
|
||||
&wPreferences.miniwin_balloon, getBool, NULL},
|
||||
&wPreferences.miniwin_balloon, getBool, NULL, NULL, NULL},
|
||||
{"AppIconBalloons", "NO", NULL,
|
||||
&wPreferences.appicon_balloon, getBool, NULL},
|
||||
&wPreferences.appicon_balloon, getBool, NULL, NULL, NULL},
|
||||
{"HelpBalloons", "NO", NULL,
|
||||
&wPreferences.help_balloon, getBool, NULL},
|
||||
&wPreferences.help_balloon, getBool, NULL, NULL, NULL},
|
||||
{"EdgeResistance", "30", NULL,
|
||||
&wPreferences.edge_resistance, getInt, NULL},
|
||||
&wPreferences.edge_resistance, getInt, NULL, NULL, NULL},
|
||||
{"ResizeIncrement", "32", NULL,
|
||||
&wPreferences.resize_increment, getInt, NULL},
|
||||
&wPreferences.resize_increment, getInt, NULL, NULL, NULL},
|
||||
{"Attraction", "NO", NULL,
|
||||
&wPreferences.attract, getBool, NULL},
|
||||
&wPreferences.attract, getBool, NULL, NULL, NULL},
|
||||
{"DisableBlinking", "NO", NULL,
|
||||
&wPreferences.dont_blink, getBool, NULL},
|
||||
&wPreferences.dont_blink, getBool, NULL, NULL, NULL},
|
||||
{"SingleClickLaunch", "NO", NULL,
|
||||
&wPreferences.single_click, getBool, NULL},
|
||||
&wPreferences.single_click, getBool, NULL, NULL, NULL},
|
||||
|
||||
/* style options */
|
||||
|
||||
{"MenuStyle", "normal", seMenuStyles,
|
||||
&wPreferences.menu_style, getEnum, setMenuStyle},
|
||||
&wPreferences.menu_style, getEnum, setMenuStyle, NULL, NULL},
|
||||
{"WidgetColor", "(solid, gray)", NULL,
|
||||
NULL, getTexture, setWidgetColor,
|
||||
},
|
||||
NULL, getTexture, setWidgetColor, NULL, NULL},
|
||||
{"WorkspaceSpecificBack", "()", NULL,
|
||||
NULL, getWSSpecificBackground, setWorkspaceSpecificBack},
|
||||
NULL, getWSSpecificBackground, setWorkspaceSpecificBack, NULL, NULL},
|
||||
/* WorkspaceBack must come after WorkspaceSpecificBack or
|
||||
* WorkspaceBack wont know WorkspaceSpecificBack was also
|
||||
* specified and 2 copies of wmsetbg will be launched */
|
||||
{"WorkspaceBack", "(solid, black)", NULL,
|
||||
NULL, getWSBackground, setWorkspaceBack},
|
||||
NULL, getWSBackground, setWorkspaceBack, NULL, NULL},
|
||||
{"SmoothWorkspaceBack", "NO", NULL,
|
||||
NULL, getBool, NULL},
|
||||
NULL, getBool, NULL, NULL, NULL},
|
||||
{"IconBack", "(solid, gray)", NULL,
|
||||
NULL, getTexture, setIconTile},
|
||||
NULL, getTexture, setIconTile, NULL, NULL},
|
||||
{"TitleJustify", "center", seJustifications,
|
||||
&wPreferences.title_justification, getEnum, setJustify},
|
||||
&wPreferences.title_justification, getEnum, setJustify, NULL, NULL},
|
||||
{"WindowTitleFont", DEF_TITLE_FONT, NULL,
|
||||
NULL, getFont, setWinTitleFont,
|
||||
},
|
||||
NULL, getFont, setWinTitleFont, NULL, NULL},
|
||||
{"WindowTitleExtendSpace", DEF_WINDOW_TITLE_EXTEND_SPACE, NULL,
|
||||
&wPreferences.window_title_clearance, getInt, setClearance},
|
||||
&wPreferences.window_title_clearance, getInt, setClearance, NULL, NULL},
|
||||
{"MenuTitleExtendSpace", DEF_MENU_TITLE_EXTEND_SPACE, NULL,
|
||||
&wPreferences.menu_title_clearance, getInt, setClearance},
|
||||
&wPreferences.menu_title_clearance, getInt, setClearance, NULL, NULL},
|
||||
{"MenuTextExtendSpace", DEF_MENU_TEXT_EXTEND_SPACE, NULL,
|
||||
&wPreferences.menu_text_clearance, getInt, setClearance},
|
||||
&wPreferences.menu_text_clearance, getInt, setClearance, NULL, NULL},
|
||||
{"MenuTitleFont", DEF_MENU_TITLE_FONT, NULL,
|
||||
NULL, getFont, setMenuTitleFont},
|
||||
NULL, getFont, setMenuTitleFont, NULL, NULL},
|
||||
{"MenuTextFont", DEF_MENU_ENTRY_FONT, NULL,
|
||||
NULL, getFont, setMenuTextFont},
|
||||
NULL, getFont, setMenuTextFont, NULL, NULL},
|
||||
{"IconTitleFont", DEF_ICON_TITLE_FONT, NULL,
|
||||
NULL, getFont, setIconTitleFont},
|
||||
NULL, getFont, setIconTitleFont, NULL, NULL},
|
||||
{"ClipTitleFont", DEF_CLIP_TITLE_FONT, NULL,
|
||||
NULL, getFont, setClipTitleFont},
|
||||
NULL, getFont, setClipTitleFont, NULL, NULL},
|
||||
{"LargeDisplayFont", DEF_WORKSPACE_NAME_FONT, NULL,
|
||||
NULL, getFont, setLargeDisplayFont},
|
||||
NULL, getFont, setLargeDisplayFont, NULL, NULL},
|
||||
{"HighlightColor", "white", NULL,
|
||||
NULL, getColor, setHightlight},
|
||||
NULL, getColor, setHightlight, NULL, NULL},
|
||||
{"HighlightTextColor", "black", NULL,
|
||||
NULL, getColor, setHightlightText},
|
||||
NULL, getColor, setHightlightText, NULL, NULL},
|
||||
{"ClipTitleColor", "black", (void *)CLIP_NORMAL,
|
||||
NULL, getColor, setClipTitleColor},
|
||||
NULL, getColor, setClipTitleColor, NULL, NULL},
|
||||
{"CClipTitleColor", "\"#454045\"", (void *)CLIP_COLLAPSED,
|
||||
NULL, getColor, setClipTitleColor},
|
||||
NULL, getColor, setClipTitleColor, NULL, NULL},
|
||||
{"FTitleColor", "white", (void *)WS_FOCUSED,
|
||||
NULL, getColor, setWTitleColor},
|
||||
NULL, getColor, setWTitleColor, NULL, NULL},
|
||||
{"PTitleColor", "white", (void *)WS_PFOCUSED,
|
||||
NULL, getColor, setWTitleColor},
|
||||
NULL, getColor, setWTitleColor, NULL, NULL},
|
||||
{"UTitleColor", "black", (void *)WS_UNFOCUSED,
|
||||
NULL, getColor, setWTitleColor},
|
||||
NULL, getColor, setWTitleColor, NULL, NULL},
|
||||
{"FTitleBack", "(solid, black)", NULL,
|
||||
NULL, getTexture, setFTitleBack},
|
||||
NULL, getTexture, setFTitleBack, NULL, NULL},
|
||||
{"PTitleBack", "(solid, \"#616161\")", NULL,
|
||||
NULL, getTexture, setPTitleBack},
|
||||
NULL, getTexture, setPTitleBack, NULL, NULL},
|
||||
{"UTitleBack", "(solid, gray)", NULL,
|
||||
NULL, getTexture, setUTitleBack},
|
||||
NULL, getTexture, setUTitleBack, NULL, NULL},
|
||||
{"ResizebarBack", "(solid, gray)", NULL,
|
||||
NULL, getTexture, setResizebarBack},
|
||||
NULL, getTexture, setResizebarBack, NULL, NULL},
|
||||
{"MenuTitleColor", "white", NULL,
|
||||
NULL, getColor, setMenuTitleColor},
|
||||
NULL, getColor, setMenuTitleColor, NULL, NULL},
|
||||
{"MenuTextColor", "black", NULL,
|
||||
NULL, getColor, setMenuTextColor},
|
||||
NULL, getColor, setMenuTextColor, NULL, NULL},
|
||||
{"MenuDisabledColor", "\"#616161\"", NULL,
|
||||
NULL, getColor, setMenuDisabledColor},
|
||||
NULL, getColor, setMenuDisabledColor, NULL, NULL},
|
||||
{"MenuTitleBack", "(solid, black)", NULL,
|
||||
NULL, getTexture, setMenuTitleBack},
|
||||
NULL, getTexture, setMenuTitleBack, NULL, NULL},
|
||||
{"MenuTextBack", "(solid, gray)", NULL,
|
||||
NULL, getTexture, setMenuTextBack},
|
||||
NULL, getTexture, setMenuTextBack, NULL, NULL},
|
||||
{"IconTitleColor", "white", NULL,
|
||||
NULL, getColor, setIconTitleColor},
|
||||
NULL, getColor, setIconTitleColor, NULL, NULL},
|
||||
{"IconTitleBack", "black", NULL,
|
||||
NULL, getColor, setIconTitleBack},
|
||||
NULL, getColor, setIconTitleBack, NULL, NULL},
|
||||
{"SwitchPanelImages", "(swtile.png, swback.png, 30, 40)", &wPreferences,
|
||||
NULL, getPropList, setSwPOptions},
|
||||
NULL, getPropList, setSwPOptions, NULL, NULL},
|
||||
|
||||
/* keybindings */
|
||||
|
||||
{"RootMenuKey", "None", (void *)WKBD_ROOTMENU,
|
||||
NULL, getKeybind, setKeyGrab},
|
||||
NULL, getKeybind, setKeyGrab, NULL, NULL},
|
||||
{"WindowListKey", "None", (void *)WKBD_WINDOWLIST,
|
||||
NULL, getKeybind, setKeyGrab},
|
||||
NULL, getKeybind, setKeyGrab, NULL, NULL},
|
||||
{"WindowMenuKey", "None", (void *)WKBD_WINDOWMENU,
|
||||
NULL, getKeybind, setKeyGrab},
|
||||
NULL, getKeybind, setKeyGrab, NULL, NULL},
|
||||
{"DockRaiseLowerKey", "None", (void*)WKBD_DOCKRAISELOWER,
|
||||
NULL, getKeybind, setKeyGrab},
|
||||
NULL, getKeybind, setKeyGrab, NULL, NULL},
|
||||
{"ClipRaiseLowerKey", "None", (void *)WKBD_CLIPRAISELOWER,
|
||||
NULL, getKeybind, setKeyGrab},
|
||||
NULL, getKeybind, setKeyGrab, NULL, NULL},
|
||||
{"MiniaturizeKey", "None", (void *)WKBD_MINIATURIZE,
|
||||
NULL, getKeybind, setKeyGrab},
|
||||
NULL, getKeybind, setKeyGrab, NULL, NULL},
|
||||
{"HideKey", "None", (void *)WKBD_HIDE,
|
||||
NULL, getKeybind, setKeyGrab},
|
||||
NULL, getKeybind, setKeyGrab, NULL, NULL},
|
||||
{"HideOthersKey", "None", (void *)WKBD_HIDE_OTHERS,
|
||||
NULL, getKeybind, setKeyGrab},
|
||||
NULL, getKeybind, setKeyGrab, NULL, NULL},
|
||||
{"MoveResizeKey", "None", (void *)WKBD_MOVERESIZE,
|
||||
NULL, getKeybind, setKeyGrab},
|
||||
NULL, getKeybind, setKeyGrab, NULL, NULL},
|
||||
{"CloseKey", "None", (void *)WKBD_CLOSE,
|
||||
NULL, getKeybind, setKeyGrab},
|
||||
NULL, getKeybind, setKeyGrab, NULL, NULL},
|
||||
{"MaximizeKey", "None", (void *)WKBD_MAXIMIZE,
|
||||
NULL, getKeybind, setKeyGrab},
|
||||
NULL, getKeybind, setKeyGrab, NULL, NULL},
|
||||
{"VMaximizeKey", "None", (void *)WKBD_VMAXIMIZE,
|
||||
NULL, getKeybind, setKeyGrab},
|
||||
NULL, getKeybind, setKeyGrab, NULL, NULL},
|
||||
{"HMaximizeKey", "None", (void *)WKBD_HMAXIMIZE,
|
||||
NULL, getKeybind, setKeyGrab},
|
||||
NULL, getKeybind, setKeyGrab, NULL, NULL},
|
||||
{"LHMaximizeKey", "None", (void*)WKBD_LHMAXIMIZE,
|
||||
NULL, getKeybind, setKeyGrab},
|
||||
NULL, getKeybind, setKeyGrab, NULL, NULL},
|
||||
{"RHMaximizeKey", "None", (void*)WKBD_RHMAXIMIZE,
|
||||
NULL, getKeybind, setKeyGrab},
|
||||
NULL, getKeybind, setKeyGrab, NULL, NULL},
|
||||
{"MaximusKey", "None", (void*)WKBD_MAXIMUS,
|
||||
NULL, getKeybind, setKeyGrab},
|
||||
NULL, getKeybind, setKeyGrab, NULL, NULL},
|
||||
{"RaiseKey", "\"Meta+Up\"", (void *)WKBD_RAISE,
|
||||
NULL, getKeybind, setKeyGrab},
|
||||
NULL, getKeybind, setKeyGrab, NULL, NULL},
|
||||
{"LowerKey", "\"Meta+Down\"", (void *)WKBD_LOWER,
|
||||
NULL, getKeybind, setKeyGrab},
|
||||
NULL, getKeybind, setKeyGrab, NULL, NULL},
|
||||
{"RaiseLowerKey", "None", (void *)WKBD_RAISELOWER,
|
||||
NULL, getKeybind, setKeyGrab},
|
||||
NULL, getKeybind, setKeyGrab, NULL, NULL},
|
||||
{"ShadeKey", "None", (void *)WKBD_SHADE,
|
||||
NULL, getKeybind, setKeyGrab},
|
||||
NULL, getKeybind, setKeyGrab, NULL, NULL},
|
||||
{"SelectKey", "None", (void *)WKBD_SELECT,
|
||||
NULL, getKeybind, setKeyGrab},
|
||||
NULL, getKeybind, setKeyGrab, NULL, NULL},
|
||||
{"FocusNextKey", "None", (void *)WKBD_FOCUSNEXT,
|
||||
NULL, getKeybind, setKeyGrab},
|
||||
NULL, getKeybind, setKeyGrab, NULL, NULL},
|
||||
{"FocusPrevKey", "None", (void *)WKBD_FOCUSPREV,
|
||||
NULL, getKeybind, setKeyGrab},
|
||||
NULL, getKeybind, setKeyGrab, NULL, NULL},
|
||||
{"GroupNextKey", "None", (void *)WKBD_GROUPNEXT,
|
||||
NULL, getKeybind, setKeyGrab},
|
||||
NULL, getKeybind, setKeyGrab, NULL, NULL},
|
||||
{"GroupPrevKey", "None", (void *)WKBD_GROUPPREV,
|
||||
NULL, getKeybind, setKeyGrab},
|
||||
NULL, getKeybind, setKeyGrab, NULL, NULL},
|
||||
{"NextWorkspaceKey", "None", (void *)WKBD_NEXTWORKSPACE,
|
||||
NULL, getKeybind, setKeyGrab},
|
||||
NULL, getKeybind, setKeyGrab, NULL, NULL},
|
||||
{"PrevWorkspaceKey", "None", (void *)WKBD_PREVWORKSPACE,
|
||||
NULL, getKeybind, setKeyGrab},
|
||||
NULL, getKeybind, setKeyGrab, NULL, NULL},
|
||||
{"NextWorkspaceLayerKey", "None", (void *)WKBD_NEXTWSLAYER,
|
||||
NULL, getKeybind, setKeyGrab},
|
||||
NULL, getKeybind, setKeyGrab, NULL, NULL},
|
||||
{"PrevWorkspaceLayerKey", "None", (void *)WKBD_PREVWSLAYER,
|
||||
NULL, getKeybind, setKeyGrab},
|
||||
NULL, getKeybind, setKeyGrab, NULL, NULL},
|
||||
{"Workspace1Key", "None", (void *)WKBD_WORKSPACE1,
|
||||
NULL, getKeybind, setKeyGrab},
|
||||
NULL, getKeybind, setKeyGrab, NULL, NULL},
|
||||
{"Workspace2Key", "None", (void *)WKBD_WORKSPACE2,
|
||||
NULL, getKeybind, setKeyGrab},
|
||||
NULL, getKeybind, setKeyGrab, NULL, NULL},
|
||||
{"Workspace3Key", "None", (void *)WKBD_WORKSPACE3,
|
||||
NULL, getKeybind, setKeyGrab},
|
||||
NULL, getKeybind, setKeyGrab, NULL, NULL},
|
||||
{"Workspace4Key", "None", (void *)WKBD_WORKSPACE4,
|
||||
NULL, getKeybind, setKeyGrab},
|
||||
NULL, getKeybind, setKeyGrab, NULL, NULL},
|
||||
{"Workspace5Key", "None", (void *)WKBD_WORKSPACE5,
|
||||
NULL, getKeybind, setKeyGrab},
|
||||
NULL, getKeybind, setKeyGrab, NULL, NULL},
|
||||
{"Workspace6Key", "None", (void *)WKBD_WORKSPACE6,
|
||||
NULL, getKeybind, setKeyGrab},
|
||||
NULL, getKeybind, setKeyGrab, NULL, NULL},
|
||||
{"Workspace7Key", "None", (void *)WKBD_WORKSPACE7,
|
||||
NULL, getKeybind, setKeyGrab},
|
||||
NULL, getKeybind, setKeyGrab, NULL, NULL},
|
||||
{"Workspace8Key", "None", (void *)WKBD_WORKSPACE8,
|
||||
NULL, getKeybind, setKeyGrab},
|
||||
NULL, getKeybind, setKeyGrab, NULL, NULL},
|
||||
{"Workspace9Key", "None", (void *)WKBD_WORKSPACE9,
|
||||
NULL, getKeybind, setKeyGrab},
|
||||
NULL, getKeybind, setKeyGrab, NULL, NULL},
|
||||
{"Workspace10Key", "None", (void *)WKBD_WORKSPACE10,
|
||||
NULL, getKeybind, setKeyGrab},
|
||||
NULL, getKeybind, setKeyGrab, NULL, NULL},
|
||||
{"WindowShortcut1Key", "None", (void *)WKBD_WINDOW1,
|
||||
NULL, getKeybind, setKeyGrab},
|
||||
NULL, getKeybind, setKeyGrab, NULL, NULL},
|
||||
{"WindowShortcut2Key", "None", (void *)WKBD_WINDOW2,
|
||||
NULL, getKeybind, setKeyGrab},
|
||||
NULL, getKeybind, setKeyGrab, NULL, NULL},
|
||||
{"WindowShortcut3Key", "None", (void *)WKBD_WINDOW3,
|
||||
NULL, getKeybind, setKeyGrab},
|
||||
NULL, getKeybind, setKeyGrab, NULL, NULL},
|
||||
{"WindowShortcut4Key", "None", (void *)WKBD_WINDOW4,
|
||||
NULL, getKeybind, setKeyGrab}
|
||||
, {"WindowShortcut5Key", "None", (void *)WKBD_WINDOW5,
|
||||
NULL, getKeybind, setKeyGrab},
|
||||
NULL, getKeybind, setKeyGrab, NULL, NULL},
|
||||
{"WindowShortcut5Key", "None", (void *)WKBD_WINDOW5,
|
||||
NULL, getKeybind, setKeyGrab, NULL, NULL},
|
||||
{"WindowShortcut6Key", "None", (void *)WKBD_WINDOW6,
|
||||
NULL, getKeybind, setKeyGrab},
|
||||
NULL, getKeybind, setKeyGrab, NULL, NULL},
|
||||
{"WindowShortcut7Key", "None", (void *)WKBD_WINDOW7,
|
||||
NULL, getKeybind, setKeyGrab},
|
||||
NULL, getKeybind, setKeyGrab, NULL, NULL},
|
||||
{"WindowShortcut8Key", "None", (void *)WKBD_WINDOW8,
|
||||
NULL, getKeybind, setKeyGrab},
|
||||
NULL, getKeybind, setKeyGrab, NULL, NULL},
|
||||
{"WindowShortcut9Key", "None", (void *)WKBD_WINDOW9,
|
||||
NULL, getKeybind, setKeyGrab},
|
||||
NULL, getKeybind, setKeyGrab, NULL, NULL},
|
||||
{"WindowShortcut10Key", "None", (void *)WKBD_WINDOW10,
|
||||
NULL, getKeybind, setKeyGrab},
|
||||
NULL, getKeybind, setKeyGrab, NULL, NULL},
|
||||
{"ScreenSwitchKey", "None", (void *)WKBD_SWITCH_SCREEN,
|
||||
NULL, getKeybind, setKeyGrab},
|
||||
NULL, getKeybind, setKeyGrab, NULL, NULL},
|
||||
|
||||
#ifdef KEEP_XKB_LOCK_STATUS
|
||||
{"ToggleKbdModeKey", "None", (void *)WKBD_TOGGLE,
|
||||
NULL, getKeybind, setKeyGrab},
|
||||
NULL, getKeybind, setKeyGrab, NULL, NULL},
|
||||
{"KbdModeLock", "NO", NULL,
|
||||
&wPreferences.modelock, getBool, NULL},
|
||||
&wPreferences.modelock, getBool, NULL, NULL, NULL},
|
||||
#endif /* KEEP_XKB_LOCK_STATUS */
|
||||
|
||||
{"NormalCursor", "(builtin, left_ptr)", (void *)WCUR_ROOT,
|
||||
NULL, getCursor, setCursor},
|
||||
NULL, getCursor, setCursor, NULL, NULL},
|
||||
{"ArrowCursor", "(builtin, top_left_arrow)", (void *)WCUR_ARROW,
|
||||
NULL, getCursor, setCursor},
|
||||
NULL, getCursor, setCursor, NULL, NULL},
|
||||
{"MoveCursor", "(builtin, fleur)", (void *)WCUR_MOVE,
|
||||
NULL, getCursor, setCursor},
|
||||
NULL, getCursor, setCursor, NULL, NULL},
|
||||
{"ResizeCursor", "(builtin, sizing)", (void *)WCUR_RESIZE,
|
||||
NULL, getCursor, setCursor},
|
||||
{"TopLeftResizeCursor", "(builtin, top_left_corner)",
|
||||
(void *)WCUR_TOPLEFTRESIZE,
|
||||
NULL, getCursor, setCursor},
|
||||
{"TopRightResizeCursor", "(builtin, top_right_corner)",
|
||||
(void *)WCUR_TOPRIGHTRESIZE,
|
||||
NULL, getCursor, setCursor},
|
||||
{"BottomLeftResizeCursor", "(builtin, bottom_left_corner)",
|
||||
(void *)WCUR_BOTTOMLEFTRESIZE,
|
||||
NULL, getCursor, setCursor},
|
||||
{"BottomRightResizeCursor", "(builtin, bottom_right_corner)",
|
||||
(void *)WCUR_BOTTOMRIGHTRESIZE,
|
||||
NULL, getCursor, setCursor},
|
||||
{"VerticalResizeCursor", "(builtin, sb_v_double_arrow)",
|
||||
(void *)WCUR_VERTICALRESIZE,
|
||||
NULL, getCursor, setCursor},
|
||||
{"HorizontalResizeCursor", "(builtin, sb_h_double_arrow)",
|
||||
(void *)WCUR_HORIZONRESIZE,
|
||||
NULL, getCursor, setCursor},
|
||||
NULL, getCursor, setCursor, NULL, NULL},
|
||||
{"TopLeftResizeCursor", "(builtin, top_left_corner)", (void *)WCUR_TOPLEFTRESIZE,
|
||||
NULL, getCursor, setCursor, NULL, NULL},
|
||||
{"TopRightResizeCursor", "(builtin, top_right_corner)", (void *)WCUR_TOPRIGHTRESIZE,
|
||||
NULL, getCursor, setCursor, NULL, NULL},
|
||||
{"BottomLeftResizeCursor", "(builtin, bottom_left_corner)", (void *)WCUR_BOTTOMLEFTRESIZE,
|
||||
NULL, getCursor, setCursor, NULL, NULL},
|
||||
{"BottomRightResizeCursor", "(builtin, bottom_right_corner)", (void *)WCUR_BOTTOMRIGHTRESIZE,
|
||||
NULL, getCursor, setCursor, NULL, NULL},
|
||||
{"VerticalResizeCursor", "(builtin, sb_v_double_arrow)", (void *)WCUR_VERTICALRESIZE,
|
||||
NULL, getCursor, setCursor, NULL, NULL},
|
||||
{"HorizontalResizeCursor", "(builtin, sb_h_double_arrow)", (void *)WCUR_HORIZONRESIZE,
|
||||
NULL, getCursor, setCursor, NULL, NULL},
|
||||
{"WaitCursor", "(builtin, watch)", (void *)WCUR_WAIT,
|
||||
NULL, getCursor, setCursor},
|
||||
NULL, getCursor, setCursor, NULL, NULL},
|
||||
{"QuestionCursor", "(builtin, question_arrow)", (void *)WCUR_QUESTION,
|
||||
NULL, getCursor, setCursor},
|
||||
NULL, getCursor, setCursor, NULL, NULL},
|
||||
{"TextCursor", "(builtin, xterm)", (void *)WCUR_TEXT,
|
||||
NULL, getCursor, setCursor},
|
||||
NULL, getCursor, setCursor, NULL, NULL},
|
||||
{"SelectCursor", "(builtin, cross)", (void *)WCUR_SELECT,
|
||||
NULL, getCursor, setCursor},
|
||||
NULL, getCursor, setCursor, NULL, NULL},
|
||||
{"DialogHistoryLines", "500", NULL,
|
||||
&wPreferences.history_lines, getInt, NULL},
|
||||
&wPreferences.history_lines, getInt, NULL, NULL, NULL},
|
||||
{"CycleActiveHeadOnly", "NO", NULL,
|
||||
&wPreferences.cycle_active_head_only, getBool, NULL}
|
||||
&wPreferences.cycle_active_head_only, getBool, NULL, NULL, NULL}
|
||||
};
|
||||
|
||||
#if 0
|
||||
static void rereadDefaults(void)
|
||||
{
|
||||
/* must defer the update because accessing X data from a
|
||||
* signal handler can mess up Xlib */
|
||||
|
||||
}
|
||||
#endif
|
||||
|
||||
static void initDefaults()
|
||||
{
|
||||
unsigned int i;
|
||||
@@ -695,14 +682,6 @@ static void initDefaults()
|
||||
else
|
||||
entry->plvalue = NULL;
|
||||
}
|
||||
|
||||
/*
|
||||
wDomainName = WMCreatePLString(WMDOMAIN_NAME);
|
||||
wAttributeDomainName = WMCreatePLString(WMATTRIBUTE_DOMAIN_NAME);
|
||||
|
||||
PLRegister(wDomainName, rereadDefaults);
|
||||
PLRegister(wAttributeDomainName, rereadDefaults);
|
||||
*/
|
||||
}
|
||||
|
||||
static WMPropList *readGlobalDomain(char *domainName, Bool requireDictionary)
|
||||
@@ -2226,14 +2205,14 @@ static int parse_cursor(WScreen * scr, WMPropList * pl, Cursor * cursor)
|
||||
}
|
||||
val = WMGetFromPLString(elem);
|
||||
|
||||
if (0 == strcasecmp(val, "none")) {
|
||||
if (strcasecmp(val, "none") == 0) {
|
||||
status = 1;
|
||||
*cursor = None;
|
||||
} else if (0 == strcasecmp(val, "builtin")) {
|
||||
} else if (strcasecmp(val, "builtin") == 0) {
|
||||
int i;
|
||||
int cursor_id = CURSOR_ID_NONE;
|
||||
|
||||
if (2 != nelem) {
|
||||
if (nelem != 2) {
|
||||
wwarning(_("bad number of arguments in cursor specification"));
|
||||
return (status);
|
||||
}
|
||||
@@ -2243,8 +2222,8 @@ static int parse_cursor(WScreen * scr, WMPropList * pl, Cursor * cursor)
|
||||
}
|
||||
val = WMGetFromPLString(elem);
|
||||
|
||||
for (i = 0; NULL != cursor_table[i].name; i++) {
|
||||
if (0 == strcasecmp(val, cursor_table[i].name)) {
|
||||
for (i = 0; cursor_table[i].name != NULL; i++) {
|
||||
if (strcasecmp(val, cursor_table[i].name) == 0) {
|
||||
cursor_id = cursor_table[i].id;
|
||||
break;
|
||||
}
|
||||
@@ -2255,7 +2234,7 @@ static int parse_cursor(WScreen * scr, WMPropList * pl, Cursor * cursor)
|
||||
*cursor = XCreateFontCursor(dpy, cursor_id);
|
||||
status = 1;
|
||||
}
|
||||
} else if (0 == strcasecmp(val, "bitmap")) {
|
||||
} else if (strcasecmp(val, "bitmap") == 0) {
|
||||
char *bitmap_name;
|
||||
char *mask_name;
|
||||
int bitmap_status;
|
||||
@@ -2266,7 +2245,7 @@ static int parse_cursor(WScreen * scr, WMPropList * pl, Cursor * cursor)
|
||||
int x, y;
|
||||
XColor fg, bg;
|
||||
|
||||
if (3 != nelem) {
|
||||
if (nelem != 3) {
|
||||
wwarning(_("bad number of arguments in cursor specification"));
|
||||
return (status);
|
||||
}
|
||||
|
||||
@@ -37,7 +37,7 @@ static int InterlacedJumps[] = { 8, 8, 4, 2 };
|
||||
/*
|
||||
* Partially based on code in gif2rgb from giflib, by Gershon Elber.
|
||||
*/
|
||||
RImage *RLoadGIF(RContext * context, char *file, int index)
|
||||
RImage *RLoadGIF(char *file, int index)
|
||||
{
|
||||
RImage *image = NULL;
|
||||
unsigned char *cptr;
|
||||
|
||||
@@ -89,7 +89,7 @@ static void my_error_exit(j_common_ptr cinfo)
|
||||
longjmp(myerr->setjmp_buffer, 1);
|
||||
}
|
||||
|
||||
RImage *RLoadJPEG(RContext * context, char *file_name, int index)
|
||||
RImage *RLoadJPEG(RContext * context, char *file_name)
|
||||
{
|
||||
RImage *image = NULL;
|
||||
struct jpeg_decompress_struct cinfo;
|
||||
|
||||
24
wrlib/load.c
24
wrlib/load.c
@@ -79,21 +79,21 @@ static RCachedImage *RImageCache;
|
||||
|
||||
static int identFile(char *path);
|
||||
|
||||
extern RImage *RLoadPPM(RContext * context, char *file_name, int index);
|
||||
extern RImage *RLoadPPM(char *file_name);
|
||||
|
||||
extern RImage *RLoadXPM(RContext * context, char *file, int index);
|
||||
extern RImage *RLoadXPM(RContext * context, char *file);
|
||||
|
||||
#ifdef USE_TIFF
|
||||
extern RImage *RLoadTIFF(RContext * context, char *file, int index);
|
||||
extern RImage *RLoadTIFF(char *file, int index);
|
||||
#endif
|
||||
#ifdef USE_PNG
|
||||
extern RImage *RLoadPNG(RContext * context, char *file, int index);
|
||||
extern RImage *RLoadPNG(RContext * context, char *file);
|
||||
#endif
|
||||
#ifdef USE_JPEG
|
||||
extern RImage *RLoadJPEG(RContext * context, char *file_name, int index);
|
||||
extern RImage *RLoadJPEG(RContext * context, char *file_name);
|
||||
#endif
|
||||
#ifdef USE_GIF
|
||||
extern RImage *RLoadGIF(RContext * context, char *file_name, int index);
|
||||
extern RImage *RLoadGIF(char *file_name, int index);
|
||||
#endif
|
||||
|
||||
char **RSupportedFileFormats(void)
|
||||
@@ -188,35 +188,35 @@ RImage *RLoadImage(RContext * context, char *file, int index)
|
||||
return NULL;
|
||||
|
||||
case IM_XPM:
|
||||
image = RLoadXPM(context, file, index);
|
||||
image = RLoadXPM(context, file);
|
||||
break;
|
||||
|
||||
#ifdef USE_TIFF
|
||||
case IM_TIFF:
|
||||
image = RLoadTIFF(context, file, index);
|
||||
image = RLoadTIFF(file, index);
|
||||
break;
|
||||
#endif /* USE_TIFF */
|
||||
|
||||
#ifdef USE_PNG
|
||||
case IM_PNG:
|
||||
image = RLoadPNG(context, file, index);
|
||||
image = RLoadPNG(context, file);
|
||||
break;
|
||||
#endif /* USE_PNG */
|
||||
|
||||
#ifdef USE_JPEG
|
||||
case IM_JPEG:
|
||||
image = RLoadJPEG(context, file, index);
|
||||
image = RLoadJPEG(context, file);
|
||||
break;
|
||||
#endif /* USE_JPEG */
|
||||
|
||||
#ifdef USE_GIF
|
||||
case IM_GIF:
|
||||
image = RLoadGIF(context, file, index);
|
||||
image = RLoadGIF(file, index);
|
||||
break;
|
||||
#endif /* USE_GIF */
|
||||
|
||||
case IM_PPM:
|
||||
image = RLoadPPM(context, file, index);
|
||||
image = RLoadPPM(file);
|
||||
break;
|
||||
|
||||
default:
|
||||
|
||||
@@ -226,7 +226,7 @@ RImage *RGetImageFromXPMData(RContext * context, char **data)
|
||||
return NULL;
|
||||
}
|
||||
|
||||
RImage *RLoadXPM(RContext * context, char *file, int index)
|
||||
RImage *RLoadXPM(RContext * context, char *file)
|
||||
{
|
||||
RImage *image = NULL;
|
||||
char line[LINEWIDTH + 1];
|
||||
|
||||
@@ -31,7 +31,7 @@
|
||||
|
||||
#include "wraster.h"
|
||||
|
||||
RImage *RLoadPNG(RContext * context, char *file, int index)
|
||||
RImage *RLoadPNG(RContext * context, char *file)
|
||||
{
|
||||
char *tmp;
|
||||
RImage *image = NULL;
|
||||
|
||||
10
wrlib/ppm.c
10
wrlib/ppm.c
@@ -28,7 +28,7 @@
|
||||
|
||||
#include "wraster.h"
|
||||
|
||||
static RImage *load_graymap(char *file_name, FILE * file, int w, int h, int max, int raw)
|
||||
static RImage *load_graymap(FILE * file, int w, int h, int max, int raw)
|
||||
{
|
||||
RImage *image;
|
||||
|
||||
@@ -74,7 +74,7 @@ static RImage *load_graymap(char *file_name, FILE * file, int w, int h, int max,
|
||||
return NULL;
|
||||
}
|
||||
|
||||
static RImage *load_pixmap(char *file_name, FILE * file, int w, int h, int max, int raw)
|
||||
static RImage *load_pixmap(FILE * file, int w, int h, int max, int raw)
|
||||
{
|
||||
RImage *image;
|
||||
int i;
|
||||
@@ -111,7 +111,7 @@ static RImage *load_pixmap(char *file_name, FILE * file, int w, int h, int max,
|
||||
return NULL;
|
||||
}
|
||||
|
||||
RImage *RLoadPPM(RContext * context, char *file_name, int index)
|
||||
RImage *RLoadPPM(char *file_name)
|
||||
{
|
||||
FILE *file;
|
||||
RImage *image = NULL;
|
||||
@@ -156,9 +156,9 @@ RImage *RLoadPPM(RContext * context, char *file_name, int index)
|
||||
goto bad_file;
|
||||
|
||||
if (type == '5')
|
||||
image = load_graymap(file_name, file, w, h, m, type == '5');
|
||||
image = load_graymap(file, w, h, m, type == '5');
|
||||
else if (type == '6')
|
||||
image = load_pixmap(file_name, file, w, h, m, type == '6');
|
||||
image = load_pixmap(file, w, h, m, type == '6');
|
||||
|
||||
fclose(file);
|
||||
return image;
|
||||
|
||||
@@ -292,7 +292,7 @@ void RCombineImagesWithOpaqueness(RImage * image, RImage * src, int opaqueness)
|
||||
}
|
||||
|
||||
int
|
||||
calculateCombineArea(RImage * des, RImage * src, int *sx, int *sy,
|
||||
calculateCombineArea(RImage * des, int *sx, int *sy,
|
||||
unsigned int *swidth, unsigned int *sheight, int *dx, int *dy)
|
||||
{
|
||||
int width = (int)*swidth, height = (int)*sheight;
|
||||
@@ -333,7 +333,7 @@ void RCombineArea(RImage * image, RImage * src, int sx, int sy, unsigned width,
|
||||
unsigned char *s;
|
||||
int alpha, calpha;
|
||||
|
||||
if (!calculateCombineArea(image, src, &sx, &sy, &width, &height, &dx, &dy))
|
||||
if (!calculateCombineArea(image, &sx, &sy, &width, &height, &dx, &dy))
|
||||
return;
|
||||
|
||||
if (!HAS_ALPHA(src)) {
|
||||
@@ -409,7 +409,7 @@ void RCopyArea(RImage * image, RImage * src, int sx, int sy, unsigned width, uns
|
||||
unsigned char *d;
|
||||
unsigned char *s;
|
||||
|
||||
if (!calculateCombineArea(image, src, &sx, &sy, &width, &height, &dx, &dy))
|
||||
if (!calculateCombineArea(image, &sx, &sy, &width, &height, &dx, &dy))
|
||||
return;
|
||||
|
||||
if (!HAS_ALPHA(src)) {
|
||||
@@ -487,7 +487,7 @@ RCombineAreaWithOpaqueness(RImage * image, RImage * src, int sx, int sy,
|
||||
int dalpha = HAS_ALPHA(image);
|
||||
int dch = (dalpha ? 4 : 3);
|
||||
|
||||
if (!calculateCombineArea(image, src, &sx, &sy, &width, &height, &dx, &dy))
|
||||
if (!calculateCombineArea(image, &sx, &sy, &width, &height, &dx, &dy))
|
||||
return;
|
||||
|
||||
d = image->data + (dy * image->width + dx) * dch;
|
||||
|
||||
@@ -32,7 +32,7 @@
|
||||
|
||||
#include "wraster.h"
|
||||
|
||||
RImage *RLoadTIFF(RContext * context, char *file, int index)
|
||||
RImage *RLoadTIFF(char *file, int index)
|
||||
{
|
||||
RImage *image = NULL;
|
||||
TIFF *tif;
|
||||
|
||||
@@ -151,7 +151,7 @@ RImage *RGetImageFromXPMData(RContext * context, char **xpmData)
|
||||
return image;
|
||||
}
|
||||
|
||||
RImage *RLoadXPM(RContext * context, char *file, int index)
|
||||
RImage *RLoadXPM(RContext * context, char *file)
|
||||
{
|
||||
Display *dpy = context->dpy;
|
||||
Colormap cmap = context->cmap;
|
||||
|
||||
Reference in New Issue
Block a user