Exemplo n.º 1
0
void Chewing::SetHsuSelectionKeyType(int type)
{
    if(type > HSU_SELKEY_TYPE2)
        chewing_set_hsuSelKeyType( ctx, HSU_SELKEY_TYPE1 );
    else
		chewing_set_hsuSelKeyType( ctx, type );
}
Exemplo n.º 2
0
gboolean hsuSelKeyType_apply_callback(PropertyContext * ctx,
				      gpointer userData)
{
    GValue *value = &(ctx->value);
    IBusChewingPreEdit *icPreEdit = (IBusChewingPreEdit *) ctx->parent;
    chewing_set_hsuSelKeyType(icPreEdit->context, g_value_get_int(value));
    return TRUE;
}
Exemplo n.º 3
0
void test_deprecated()
{
	ChewingContext *ctx;
	int type;
	ChewingConfigData configure;
	memset( &configure, 0, sizeof( ChewingConfigData ) );

	ctx = chewing_new();
	start_testcase( ctx, fd );

	chewing_set_hsuSelKeyType( ctx, HSU_SELKEY_TYPE1 );
	type = chewing_get_hsuSelKeyType( ctx );
	ok( type == HSU_SELKEY_TYPE1, "`%d' shall be `%d'", type, HSU_SELKEY_TYPE1 );

	chewing_Configure( ctx, &configure );

	chewing_delete( ctx );
}
Exemplo n.º 4
0
void test_deprecated()
{
	ChewingContext *ctx;
	int type;
	ChewingConfigData configure = { 0 };

	chewing_Init( 0, 0 );

	ctx = chewing_new();

	chewing_set_hsuSelKeyType( ctx, HSU_SELKEY_TYPE1 );
	type = chewing_get_hsuSelKeyType( ctx );
	ok( type == HSU_SELKEY_TYPE1, "`%d' shall be `%d'", type, HSU_SELKEY_TYPE1 );

	chewing_Configure( ctx, &configure );

	chewing_delete( ctx );
	chewing_Terminate();
}
Exemplo n.º 5
0
static void hsuSelKeyType_set_callback(PropertyContext *ctx, GValue *value){
#ifdef IBUS_CHEWING_MAIN
    IBusChewingEngine *engine=(IBusChewingEngine *) ctx->userData;
    chewing_set_hsuSelKeyType(engine->context,g_value_get_int(value));
#endif
}