~ubuntu-branches/ubuntu/wily/haskell-gtk/wily-proposed

« back to all changes in this revision

Viewing changes to Graphics/UI/Gtk/Abstract/Widget.chs

  • Committer: Package Import Robot
  • Author(s): Clint Adams
  • Date: 2012-05-05 23:57:40 UTC
  • mfrom: (1.1.3)
  • Revision ID: package-import@ubuntu.com-20120505235740-6cmyircomearaqbq
Tags: 0.12.3-1
* New upstream version.
* Bump to Standards-Version 3.9.3.

Show diffs side-by-side

added added

removed removed

Lines of Context:
158
158
  widgetModifyText,
159
159
  widgetModifyBase,
160
160
  widgetModifyFont,
 
161
  widgetRestoreFg,
 
162
  widgetRestoreBg,
 
163
  widgetRestoreText,
 
164
  widgetRestoreBase,
161
165
  widgetCreatePangoContext,
162
166
  widgetGetPangoContext,
163
167
  widgetCreateLayout,
1384
1388
widgetModifyFg :: WidgetClass self => self
1385
1389
 -> StateType -- ^ @state@ - the state for which to set the foreground color.
1386
1390
 -> Color     -- ^ @color@ - the color to assign (does not need to be
1387
 
              -- allocated), or @Nothing@ to undo the effect of previous calls
1388
 
              -- to of 'widgetModifyFg'.
 
1391
              -- allocated)
1389
1392
 -> IO ()
1390
1393
widgetModifyFg self state color =
1391
1394
  with color $ \colorPtr ->
1394
1397
    ((fromIntegral . fromEnum) state)
1395
1398
    (castPtr colorPtr)
1396
1399
 
 
1400
-- | Restores the foreground color for a widget in a particular state. This
 
1401
-- undoes the effects of previous calls to `widgetModifyFg'.
 
1402
--
 
1403
widgetRestoreFg :: WidgetClass self => self
 
1404
 -> StateType -- ^ @state@ - the state for which to restore the foreground color.
 
1405
 -> IO ()
 
1406
widgetRestoreFg self state =
 
1407
  {# call gtk_widget_modify_fg #}
 
1408
    (toWidget self)
 
1409
    ((fromIntegral . fromEnum) state)
 
1410
    nullPtr
 
1411
 
1397
1412
-- %hash c:2c5
1398
1413
-- | Sets the background color for a widget in a particular state. All other
1399
1414
-- style values are left untouched. See also 'widgetModifyStyle'.
1408
1423
widgetModifyBg :: WidgetClass self => self
1409
1424
 -> StateType -- ^ @state@ - the state for which to set the background color.
1410
1425
 -> Color     -- ^ @color@ - the color to assign (does not need to be
1411
 
              -- allocated), or @Nothing@ to undo the effect of previous calls
1412
 
              -- to of 'widgetModifyBg'.
 
1426
              -- allocated).
1413
1427
 -> IO ()
1414
1428
widgetModifyBg self state color =
1415
1429
  with color $ \colorPtr ->
1418
1432
    ((fromIntegral . fromEnum) state)
1419
1433
    (castPtr colorPtr)
1420
1434
 
 
1435
-- | Restores the background color for a widget in a particular state. This
 
1436
-- undoes the effects of previous calls to `widgetModifyBg'.
 
1437
--
 
1438
widgetRestoreBg :: WidgetClass self => self
 
1439
 -> StateType -- ^ @state@ - the state for which to restore the background color.
 
1440
 -> IO ()
 
1441
widgetRestoreBg self state =
 
1442
  {# call gtk_widget_modify_bg #}
 
1443
    (toWidget self)
 
1444
    ((fromIntegral . fromEnum) state)
 
1445
    nullPtr
 
1446
 
1421
1447
-- %hash c:d2ba
1422
1448
-- | Sets the text color for a widget in a particular state. All other style
1423
1449
-- values are left untouched. The text color is the foreground color used along
1427
1453
widgetModifyText :: WidgetClass self => self
1428
1454
 -> StateType -- ^ @state@ - the state for which to set the text color.
1429
1455
 -> Color     -- ^ @color@ - the color to assign (does not need to be
1430
 
              -- allocated), or @Nothing@ to undo the effect of previous calls
1431
 
              -- to of 'widgetModifyText'.
 
1456
              -- allocated).
1432
1457
 -> IO ()
1433
1458
widgetModifyText self state color =
1434
1459
  with color $ \colorPtr ->
1437
1462
    ((fromIntegral . fromEnum) state)
1438
1463
    (castPtr colorPtr)
1439
1464
 
 
1465
-- | Restores the text color for a widget in a particular state. This
 
1466
-- undoes the effects of previous calls to `widgetModifyText'.
 
1467
--
 
1468
widgetRestoreText :: WidgetClass self => self
 
1469
 -> StateType -- ^ @state@ - the state for which to restore the text color.
 
1470
 -> IO ()
 
1471
widgetRestoreText self state =
 
1472
  {# call gtk_widget_modify_text #}
 
1473
    (toWidget self)
 
1474
    ((fromIntegral . fromEnum) state)
 
1475
    nullPtr
 
1476
 
1440
1477
-- %hash c:ac08
1441
1478
-- | Sets the base color for a widget in a particular state. All other style
1442
1479
-- values are left untouched. The base color is the background color used along
1453
1490
widgetModifyBase :: WidgetClass self => self
1454
1491
 -> StateType -- ^ @state@ - the state for which to set the base color.
1455
1492
 -> Color     -- ^ @color@ - the color to assign (does not need to be
1456
 
              -- allocated), or @Nothing@ to undo the effect of previous calls
1457
 
              -- to of 'widgetModifyBase'.
 
1493
              -- allocated).
1458
1494
 -> IO ()
1459
1495
widgetModifyBase self state color =
1460
1496
  with color $ \colorPtr ->
1463
1499
    ((fromIntegral . fromEnum) state)
1464
1500
    (castPtr colorPtr)
1465
1501
 
 
1502
-- | Restores the base color for a widget in a particular state. This undoes
 
1503
-- the effects of previous calls to widgetModifyBase.
 
1504
--
 
1505
widgetRestoreBase :: WidgetClass self => self
 
1506
 -> StateType -- ^ @state@ - the state for which to restore the base color.
 
1507
 -> IO ()
 
1508
widgetRestoreBase self state =
 
1509
  {# call gtk_widget_modify_base #}
 
1510
    (toWidget self)
 
1511
    ((fromIntegral . fromEnum) state)
 
1512
    nullPtr
 
1513
 
 
1514
 
1466
1515
-- %hash c:38d7
1467
1516
-- | Sets the font to use for a widget. All other style values are left
1468
1517
-- untouched. See also 'widgetModifyStyle'.