Beispiel #1
0
void
SonySetSilkResizable(UInt8 state)
{
	if (silk_ver == -1)
		return;
	if (silk_ver == 0) {
		if (state) {
			SilkLibEnableResize(silk_ref);
		} else {
			SilkLibResizeDispWin(silk_ref, silkResizeNormal);
			SilkLibDisableResize(silk_ref);
		}
	} else {
		if (!state)
			VskSetState(silk_ref, vskStateEnable, state);
		else if (silk_ver >= 0x03)
			VskSetState(silk_ref, vskStateEnable,
			    vskResizeVertically | vskResizeHorizontally);
		else
			VskSetState(silk_ref, vskStateEnable, 1);
	}
}
Beispiel #2
0
void SetDIAState( DIAStateType state )
{
    if ( DIA_HARDWARE_HANDERA == hardware && GetDIAState() == state )
        return;
    switch ( hardware ) {
#ifdef SUPPORT_DIA_SONY
        case DIA_HARDWARE_SONY1:
            switch ( state ) {
                case DIA_STATE_MAX:
                    SilkLibResizeDispWin( sonyRefNum, silkResizeNormal );
                    break;
                case DIA_STATE_MIN:
                    SilkLibResizeDispWin( sonyRefNum, silkResizeToStatus );
                    break;
                case DIA_STATE_NO_STATUS_BAR:
                    SilkLibResizeDispWin( sonyRefNum, silkResizeMax );
                    break;
                default:
                    break;
            }
            break;
        case DIA_HARDWARE_SONY2:
            switch ( state ) {
                case DIA_STATE_MAX:
                    VskSetState( sonyRefNum, vskStateResize, vskResizeMax );
                    break;
                case DIA_STATE_MIN:
                    VskSetState( sonyRefNum, vskStateResize, vskResizeMin );
                    break;
                case DIA_STATE_NO_STATUS_BAR:
                    VskSetState( sonyRefNum, vskStateResize, vskResizeNone );
                    break;
                default:
                    break;
            }
            break;
#endif
#ifdef SUPPORT_DIA_HANDERA
        case DIA_HARDWARE_HANDERA:
            switch ( state ) {
                case DIA_STATE_MAX:
                    SilkMaximizeWindow();
                    break;
                case DIA_STATE_MIN:
                case DIA_STATE_NO_STATUS_BAR:
                    SilkMinimizeWindow();
                    break;
                default:
                    break;
            }
            break;
#endif
#ifdef HAVE_PALM_DIA_SDK
        case DIA_HARDWARE_PALM10:
        case DIA_HARDWARE_PALM11:
            switch ( state ) {
                case DIA_STATE_MAX:
                    PINSetInputAreaState( pinInputAreaOpen );
                    break;
                case DIA_STATE_MIN:
                case DIA_STATE_NO_STATUS_BAR:
                    PINSetInputAreaState( pinInputAreaClosed );
                    break;
                default:
                    break;
            }
            break;
#endif
        default:
            break;
    }
}
Beispiel #3
0
void SetDIAState( DIAStateType state )
{
    if ( DIA_HARDWARE_HANDERA == hardware && GetDIAState() == state )
        return;

    switch ( hardware ) {
#ifdef SUPPORT_DIA_SONY
        case DIA_HARDWARE_SONY1: {
            Boolean oldAllow;

            oldAllow = sony1AllowResize;

            if ( ! oldAllow )
                SetDIAAllowResize( true );

            switch ( state ) {
                case DIA_STATE_MAX:
                    SilkLibResizeDispWin( sonyRefNum, silkResizeNormal );
                    break;
                case DIA_STATE_MIN:
                    SilkLibResizeDispWin( sonyRefNum, silkResizeToStatus );
                    break;
                case DIA_STATE_NO_STATUS_BAR:
                    SilkLibResizeDispWin( sonyRefNum, silkResizeMax );
                    break;
                default:
                    break;
            }
            break;

            if ( ! oldAllow )
                SetDIAAllowResize( false );
        }

        case DIA_HARDWARE_SONY2: {
            Boolean oldAllow;
            UInt16  allowState;

            if ( errNone == VskGetState( sonyRefNum, vskStateEnable,
                               &allowState ) )
                oldAllow = ( allowState != 0 );
            else
                oldAllow = false;

            if ( ! oldAllow ) {
                SetDIAAllowResize( true );
            }

            switch ( state ) {
                case DIA_STATE_MAX:
                    VskSetState( sonyRefNum, vskStateResize, vskResizeMax );
                    break;
                case DIA_STATE_MIN:
                    VskSetState( sonyRefNum, vskStateResize, vskResizeMin );
                    break;
                case DIA_STATE_NO_STATUS_BAR:
                    VskSetState( sonyRefNum, vskStateResize, vskResizeNone );
                    break;
                default:
                    break;
            }
            break;

            if ( ! oldAllow )
                SetDIAAllowResize( false );
        }
#endif
#ifdef SUPPORT_DIA_HANDERA
        case DIA_HARDWARE_HANDERA:
            switch ( state ) {
                case DIA_STATE_MAX:
                    SilkMaximizeWindow();
                    break;
                case DIA_STATE_MIN:
                case DIA_STATE_NO_STATUS_BAR:
                    SilkMinimizeWindow();
                    break;
                default:
                    break;
            }
            break;
#endif
#ifdef HAVE_PALM_DIA_SDK
        case DIA_HARDWARE_PALM10:
        case DIA_HARDWARE_PALM11:
            switch ( state ) {
                case DIA_STATE_MAX:
                    StatShow();
                    PINSetInputAreaState( pinInputAreaOpen );
                    break;
                case DIA_STATE_MIN:
                    StatShow();
                    PINSetInputAreaState( pinInputAreaClosed );
                    break;
                case DIA_STATE_NO_STATUS_BAR:
                    StatHide();
                    if ( pinInputAreaOpen == PINGetInputAreaState() )
                        PINSetInputAreaState( pinInputAreaClosed );
                    /* extra hide for some devices */
                    if ( GetDIAState() != DIA_STATE_NO_STATUS_BAR )
                        StatHide();
                    break;
                default:
                    break;
            }
            break;
#endif
        default:
            break;
    }
}