static void scrollable_get_adjustments (MxScrollable *scrollable, MxAdjustment **hadjustment, MxAdjustment **vadjustment) { MxViewportPrivate *priv; g_return_if_fail (MX_IS_VIEWPORT (scrollable)); priv = ((MxViewport *) scrollable)->priv; if (hadjustment) { if (priv->hadjustment) *hadjustment = priv->hadjustment; else { MxAdjustment *adjustment; /* create an initial adjustment. this is filled with correct values * as soon as allocate() is called */ adjustment = mx_adjustment_new (); scrollable_set_adjustments (scrollable, adjustment, priv->vadjustment); g_object_unref (adjustment); *hadjustment = adjustment; } } if (vadjustment) { if (priv->vadjustment) *vadjustment = priv->vadjustment; else { MxAdjustment *adjustment; /* create an initial adjustment. this is filled with correct values * as soon as allocate() is called */ adjustment = mx_adjustment_new (); scrollable_set_adjustments (scrollable, priv->hadjustment, adjustment); g_object_unref (adjustment); *vadjustment = adjustment; } } }
static void mex_column_get_adjustments (MxScrollable *scrollable, MxAdjustment **hadjust, MxAdjustment **vadjust) { MexColumnPrivate *priv = MEX_COLUMN (scrollable)->priv; if (hadjust) *hadjust = NULL; if (!vadjust) return; if (!priv->adjustment) mx_scrollable_set_adjustments (scrollable, NULL, mx_adjustment_new ()); *vadjust = priv->adjustment; }
static void mex_column_get_adjustments (MxScrollable *scrollable, MxAdjustment **hadjust, MxAdjustment **vadjust) { MexColumnPrivate *priv = MEX_COLUMN (scrollable)->priv; if (hadjust) *hadjust = NULL; if (!vadjust) return; if (!priv->adjustment) { *vadjust = mx_adjustment_new (); mx_scrollable_set_adjustments (scrollable, NULL, *vadjust); g_object_unref (*vadjust); } else *vadjust = priv->adjustment; }