Ejemplo n.º 1
0
static void mac_activateeventlog(WindowPtr window, EventRecord *event)
{
    Session *s = mac_windowsession(window);
    int active = (event->modifiers & activeFlag) != 0;

    LActivate(active, s->eventlog);
    mac_draweventloggrowicon(s);
}
Ejemplo n.º 2
0
// --------------------------------------------------------------------------------------
void  HandleActivate(WindowRef window, Boolean activate)
{
    ControlRef rootControl;
    ListHandle iconList;
    SInt16 pixelDepth;
    Boolean isColorDevice;

    GetRootControl(window, &rootControl);
    GetWindowProperty(window, kAppSignature, kIconListTag, sizeof(ListHandle), NULL, &iconList);

    SetPortWindowPort(window);
    GetWindowDeviceDepthAndColor(window, &pixelDepth, &isColorDevice);

    if (activate)
    {
        SetThemeTextColor(kThemeTextColorModelessDialogActive, pixelDepth, isColorDevice);
        ActivateControl(rootControl);

        SetThemeBackground(kThemeBrushWhite, pixelDepth, isColorDevice);
        LActivate(true, iconList);
        RedrawPrefsWindowList(window);	// redraw the list with the active appearance
        drawFrameAndFocus(iconList, true, window);

        EnableMenuItem(GetMenuRef(mFile), iClose);
    }
    else	// deactivate
    {
        SetThemeTextColor(kThemeTextColorModelessDialogInactive, pixelDepth, isColorDevice);
        DeactivateControl(rootControl);

        SetThemeBackground(kThemeBrushWhite, pixelDepth, isColorDevice);
        LActivate(false, iconList);
        RedrawPrefsWindowList(window);	// redraw the  list with the inactive appearance
        drawFrameAndFocus(iconList, false, window);

        DisableMenuItem(GetMenuRef(mFile), iClose);
    }
}
Ejemplo n.º 3
0
extern pascal void 		LActivateWhite(Boolean act, ListHandle lHandle)
{
	OSStatus err;
	MoreThemeDrawingState state;

	err = MoreGetThemeDrawingState(&state);
	if (err == noErr) {
		err = MoreNormalizeThemeDrawingState();
		assert(err == noErr);
		LActivate(act, lHandle);
		err = MoreSetThemeDrawingState(state, true);
	}
	assert(err == noErr);
}