 -- setColor :: 'Ref' 'Widget' -> 'Color' -> 'IO' ()
 --
 -- setColorWithBgSel :: 'Ref' 'Widget' -> 'Color' -> 'Color' -> 'IO' ()
+--
+-- setDamage :: 'Ref' 'Widget' -> ['Damage'] -> 'IO' ()
+--
+-- setDamageInside :: 'Ref' 'Widget' -> ['Damage'] -> 'Rectangle' -> 'IO' ()
 --
 -- setDeimage:: ('Parent' a 'Image') => 'Ref' 'Widget' -> 'Maybe'( 'Ref' a ) -> 'IO' ()
 --

--
-- getY :: 'Ref' 'Widget' -> 'IO' ('Int')
--
-- handle :: 'Ref' 'Widget' -> ('Event' -> 'IO' ('Either' 'UnknownEvent' ()))
--
-- hasCallback :: 'Ref' 'Widget' -> 'IO' ('Bool')
--

instance (impl ~ ( [Damage] ->  IO ())) => Op (SetDamage ()) Widget orig impl where
  runOp _ _ widget damages = withRef widget $ \widgetPtr -> damageWithText' widgetPtr (fromIntegral (combine damages))
{# fun Fl_Widget_damage_inside_widget as damageInsideWidget' { id `Ptr ()',`Word8',`Int',`Int',`Int',`Int' } -> `()' supressWarningAboutRes #}
instance (impl ~ ( [Damage] -> Rectangle ->  IO ())) => Op (SetDamageInside ()) Widget orig impl where
  runOp _ _ widget damages rectangle = withRef widget $ \widgetPtr -> do
    let (x_pos,y_pos,w_pos,h_pos) = fromRectangle rectangle
    damageInsideWidget' widgetPtr (fromIntegral (combine damages)) x_pos y_pos w_pos h_pos
