Exemplo n.º 1
0
/* Frees the state, which was allocated by _XrmDefaultInitParseInfo. */
static void
ub_destroy(
    XPointer state)
{
    _XCloseLC(((UbState) state)->lcd);
    Xfree((char *) state);
}
Exemplo n.º 2
0
/* Frees the state, which was allocated by _XrmDefaultInitParseInfo. */
static void
mb_destroy(
    XPointer state)
{
    _XlcCloseConverter(((MbState) state)->conv);
    _XCloseLC(((MbState) state)->lcd);
    Xfree((char *) state);
}
Exemplo n.º 3
0
Public Bool
_XimUnRegisterIMInstantiateCallback(
    XLCd	 lcd,
    Display	*display,
    XrmDatabase	 rdb,
    char	*res_name,
    char	*res_class,
    XIDProc	 callback,
    XPointer	 client_data)
{
    char		locale[XIM_MAXLCNAMELEN];
    XimInstCallback	icb, picb;

    if( !callback_list )
	return( False );

    MakeLocale( lcd, locale );

    for( icb = callback_list, picb = NULL; icb; picb = icb, icb = icb->next ) {
	if( !strcmp( locale, icb->name )  &&
	    (lcd->core->modifiers == icb->modifiers  ||		/* XXXXX */
	     (lcd->core->modifiers  &&  icb->modifiers  &&
	      !strcmp( lcd->core->modifiers, icb->modifiers )))  &&
	    rdb == icb->rdb  &&					/* XXXXX */
	    ((res_name == NULL  &&  icb->res_name == NULL)  ||
	     (res_name != NULL  &&  icb->res_name != NULL  &&
	      !strcmp( res_name, icb->res_name )))  &&
	    ((res_class == NULL  &&  icb->res_class == NULL)  ||
	     (res_class != NULL  &&  icb->res_class != NULL  &&
	      !strcmp( res_class, icb->res_class )))  &&
	    (callback == icb->callback)  &&
	    (client_data  ==  icb->client_data)  &&		/* XXXXX */
	    !icb->destroy ) {
	    if( lock )
		icb->destroy = True;
	    else {
		if( !picb ) {
		    callback_list = icb->next;
		    _XUnregisterFilter( display, RootWindow(display, 0),
					_XimFilterPropertyNotify,
					(XPointer)NULL );
		}
		else
		    picb->next = icb->next;
		_XCloseLC( icb->lcd );
		XFree( icb );
	    }
	    return( True );
	}
    }
    return( False );
}
Exemplo n.º 4
0
XLCd
_XlcCurrentLC(void)
{
    XLCd lcd;
    static XLCd last_lcd = NULL;

    lcd = _XOpenLC((char *) NULL);

    if (last_lcd)
	_XCloseLC(last_lcd);

    last_lcd = lcd;

    return lcd;
}