Ignore:
Timestamp:
Jul 26, 2006, 3:02:50 PM (15 years ago)
Author:
Eugene Romanenko
Message:

UI improvements, save files, ability to compile plugins with gcc, saveAs for djvu plugin, djvu plugin compiled with gcc, get rid of ddjvuapi.dll

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Lucide/SOURCE/plugins/ludjvu/ludjvu.cpp

    r87 r88  
     1
     2/*
     3 *  This file was generated by the SOM Compiler.
     4 *  Generated using:
     5 *     SOM incremental update: 2.24
     6 */
     7
    18/*
    29 * Copyright (c) 2006, Eugene Romanenko, netlabs.org
     
    1926
    2027/*
    21  *  This file was generated by the SOM Compiler.
    22  *  Generated using:
    23  *     SOM incremental update: 2.24
    24  */
    25 
    26 
    27 /*
    2828 *  This file was generated by the SOM Compiler and Emitter Framework.
    2929 *  Generated using template emitter:
     
    294294}
    295295
     296SOM_Scope boolean  SOMLINK isSaveable(LuDjvuDocument *somSelf,
     297                                       Environment *ev)
     298{
     299#ifdef __GNUC__
     300    return TRUE;
     301#else
     302    return FALSE;
     303#endif
     304}
     305
     306SOM_Scope boolean  SOMLINK saveAs(LuDjvuDocument *somSelf,  Environment *ev,
     307                                  string filename)
     308{
     309#ifdef __GNUC__
     310    LuDjvuDocumentData *somThis = LuDjvuDocumentGetData(somSelf);
     311    DjvuDocument *d = (DjvuDocument *)somThis->data;
     312
     313    FILE *f = NULL;
     314    if ( ( f = fopen( filename, "wb" ) ) == NULL ) {
     315        return FALSE;
     316    }
     317
     318    ddjvu_job_t *job = ddjvu_document_save( d->d_document, f, 0, NULL );
     319    while ( !ddjvu_job_done( job ) ) {
     320        djvu_handle_events( d->d_context );
     321    }
     322    fclose( f );
     323
     324    return TRUE;
     325#else
     326    return FALSE;
     327#endif
     328}
     329
    296330SOM_Scope void SOMLINK somDefaultInit(LuDjvuDocument *somSelf,
    297331                                      som3InitCtrl* ctrl)
Note: See TracChangeset for help on using the changeset viewer.