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

Location:
trunk/Lucide/SOURCE/plugins
Files:
2 added
12 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)
  • trunk/Lucide/SOURCE/plugins/ludjvu/ludjvu.idl

    r27 r88  
    2828        getThumbnailSize: override;
    2929        getThumbnail: override;
     30        isSaveable: override;
     31        saveAs: override;
    3032
    3133        somDefaultInit: override, init;
  • trunk/Lucide/SOURCE/plugins/ludjvu/ludjvu.xh

    r61 r88  
    6262 * -- Typedefs for LuDjvuDocument Method Procedures
    6363 */
    64 SOMEXTERN {
     64SOMEXTERNF {
    6565
    6666/*
  • trunk/Lucide/SOURCE/plugins/ludjvu/ludjvu.xih

    r61 r88  
    147147  #define _getThumbnailSize somSelf->getThumbnailSize
    148148  #define _getThumbnail somSelf->getThumbnail
     149  #define _isSaveable somSelf->isSaveable
     150  #define _saveAs somSelf->saveAs
    149151  #define _somDefaultInit somSelf->somDefaultInit
    150152  #define _somDestruct somSelf->somDestruct
     
    514516#define LuDjvuDocument_parents_getThumbnail(somSelf,ev,pagenum,suggested_width) (\
    515517   LuDjvuDocument_parent_LuDocument_getThumbnail(somSelf,ev,pagenum,suggested_width))
     518
     519/*
     520 * Overridden method: isSaveable
     521 */
     522SOM_Scope boolean  SOMLINK isSaveable(LuDjvuDocument *somSelf, Environment *ev);
     523static char *somMN_LuDjvuDocumentisSaveable = "LuDocument::isSaveable";
     524static somId somId_LuDjvuDocumentisSaveable = &somMN_LuDjvuDocumentisSaveable;
     525#ifdef somId_isSaveable
     526#undef somId_isSaveable
     527#else
     528#define somId_isSaveable somId_LuDjvuDocumentisSaveable
     529#endif
     530typedef boolean   SOMLINK somTP_xih_LuDjvuDocument_isSaveable(LuDjvuDocument *somSelf, Environment *ev);
     531typedef somTP_xih_LuDjvuDocument_isSaveable *somTD_xih_LuDjvuDocument_isSaveable;
     532/* define the parent method call macro */
     533static somMethodProc* LuDjvuDocument_parent_LuDocument_isSaveable_resolved;
     534#define LuDjvuDocument_parent_LuDocument_isSaveable(somSelf,ev) \
     535  ((( somTD_xih_LuDjvuDocument_isSaveable ) \
     536      LuDjvuDocument_parent_LuDocument_isSaveable_resolved) \
     537        (somSelf,ev))
     538/* define a variety of (possibly ambiguous) short forms */
     539#ifndef SOMGD_pmc_parent_isSaveable
     540  #ifdef parent_isSaveable
     541    #define SOMGD_pmc_parent_isSaveable
     542    #undef parent_isSaveable
     543  #else
     544#define parent_isSaveable LuDjvuDocument_parent_LuDocument_isSaveable
     545  #endif
     546#endif
     547#ifndef SOMGD_pmc_parent_LuDocument_isSaveable
     548  #ifdef parent_LuDocument_isSaveable
     549    #define SOMGD_pmc_parent_LuDocument_isSaveable
     550    #undef parent_LuDocument_isSaveable
     551  #else
     552    #define parent_LuDocument_isSaveable LuDjvuDocument_parent_LuDocument_isSaveable
     553  #endif
     554#endif
     555#define LuDjvuDocument_parents_isSaveable(somSelf,ev) (\
     556   LuDjvuDocument_parent_LuDocument_isSaveable(somSelf,ev))
     557
     558/*
     559 * Overridden method: saveAs
     560 */
     561SOM_Scope boolean  SOMLINK saveAs(LuDjvuDocument *somSelf, Environment *ev,
     562                string filename);
     563static char *somMN_LuDjvuDocumentsaveAs = "LuDocument::saveAs";
     564static somId somId_LuDjvuDocumentsaveAs = &somMN_LuDjvuDocumentsaveAs;
     565#ifdef somId_saveAs
     566#undef somId_saveAs
     567#else
     568#define somId_saveAs somId_LuDjvuDocumentsaveAs
     569#endif
     570typedef boolean   SOMLINK somTP_xih_LuDjvuDocument_saveAs(LuDjvuDocument *somSelf, Environment *ev,
     571                string filename);
     572typedef somTP_xih_LuDjvuDocument_saveAs *somTD_xih_LuDjvuDocument_saveAs;
     573/* define the parent method call macro */
     574static somMethodProc* LuDjvuDocument_parent_LuDocument_saveAs_resolved;
     575#define LuDjvuDocument_parent_LuDocument_saveAs(somSelf,ev,filename) \
     576  ((( somTD_xih_LuDjvuDocument_saveAs ) \
     577      LuDjvuDocument_parent_LuDocument_saveAs_resolved) \
     578        (somSelf,ev,filename))
     579/* define a variety of (possibly ambiguous) short forms */
     580#ifndef SOMGD_pmc_parent_saveAs
     581  #ifdef parent_saveAs
     582    #define SOMGD_pmc_parent_saveAs
     583    #undef parent_saveAs
     584  #else
     585#define parent_saveAs LuDjvuDocument_parent_LuDocument_saveAs
     586  #endif
     587#endif
     588#ifndef SOMGD_pmc_parent_LuDocument_saveAs
     589  #ifdef parent_LuDocument_saveAs
     590    #define SOMGD_pmc_parent_LuDocument_saveAs
     591    #undef parent_LuDocument_saveAs
     592  #else
     593    #define parent_LuDocument_saveAs LuDjvuDocument_parent_LuDocument_saveAs
     594  #endif
     595#endif
     596#define LuDjvuDocument_parents_saveAs(somSelf,ev,filename) (\
     597   LuDjvuDocument_parent_LuDocument_saveAs(somSelf,ev,filename))
    516598
    517599/*
     
    567649    {    &somId_LuDjvuDocumentgetThumbnail,
    568650         (somMethodProc *) getThumbnail  },
     651    {    &somId_LuDjvuDocumentisSaveable,
     652         (somMethodProc *) isSaveable  },
     653    {    &somId_LuDjvuDocumentsaveAs,
     654         (somMethodProc *) saveAs  },
    569655    {    &somId_LuDjvuDocumentsomDefaultInit,
    570656         (somMethodProc *) somDefaultInit  },
     
    585671
    586672static somStaticClassInfo LuDjvuDocumentSCI = {
    587     4, 0, 10, 0, 0, 0, /* layout version 4 */
     673    4, 0, 12, 0, 0, 0, /* layout version 4 */
    588674    LuDjvuDocument_MajorVersion, LuDjvuDocument_MinorVersion,
    589675    sizeof(LuDjvuDocumentData), LuDjvuDocument_MaxNoMethods, 1,
     
    631717    LuDocumentNewClass(LuDocument_MajorVersion,LuDocument_MinorVersion);        /* static reference */
    632718    result = (SOMClass*)((void*)somBuildClass(0xFFFFFFFF,&LuDjvuDocumentSCI, somtmajorVersion, somtminorVersion));
     719    LuDjvuDocument_parent_LuDocument_saveAs_resolved =
     720        somParentNumResolve(LuDjvuDocumentCClassData.parentMtab, 1, LuDocumentClassData.saveAs);
     721    LuDjvuDocument_parent_LuDocument_isSaveable_resolved =
     722        somParentNumResolve(LuDjvuDocumentCClassData.parentMtab, 1, LuDocumentClassData.isSaveable);
    633723    LuDjvuDocument_parent_LuDocument_getThumbnail_resolved =
    634724        somParentNumResolve(LuDjvuDocumentCClassData.parentMtab, 1, LuDocumentClassData.getThumbnail);
  • trunk/Lucide/SOURCE/plugins/ludjvu/makefile

    r68 r88  
    1515.idl.xh:
    1616    sc -c -s"xc;xih;xh" -I..\ludoc $<
    17      
     17    ..\..\sominc\cnvsomex.cmd $@
     18
    1819
    1920all: make.cfg ludjvu.dll
     
    5859-xs
    5960-xr
     61-I..\..\sominc
    6062-I..\ludoc
    6163-I..\..\..\..\libdjvu
  • trunk/Lucide/SOURCE/plugins/ludoc/ludoc.xh

    r61 r88  
    186186 * -- Typedefs for LuDocument Method Procedures
    187187 */
    188 SOMEXTERN {
     188SOMEXTERNF {
    189189typedef boolean   SOMLINK somTP_LuDocument_loadFile(LuDocument *somSelf, Environment *ev,
    190190                string filename,
  • trunk/Lucide/SOURCE/plugins/ludoc/luinode.xh

    r2 r88  
    7575 * -- Typedefs for LuIndexNode Method Procedures
    7676 */
    77 SOMEXTERN {
     77SOMEXTERNF {
    7878typedef void   SOMLINK somTP_LuIndexNode_LuIndexNodeInit(LuIndexNode *somSelf, Environment *ev,
    7979                somInitCtrl* ctrl,
  • trunk/Lucide/SOURCE/plugins/ludoc/lupixbuf.xh

    r27 r88  
    7070 * -- Typedefs for LuPixbuf Method Procedures
    7171 */
    72 SOMEXTERN {
     72SOMEXTERNF {
    7373typedef void   SOMLINK somTP_LuPixbuf_LuPixbufInit(LuPixbuf *somSelf, Environment *ev,
    7474                somInitCtrl* ctrl,
  • trunk/Lucide/SOURCE/plugins/ludoc/makefile

    r68 r88  
    1515.idl.xh:
    1616    sc -c -s"xc;xih;xh" $<
     17    ..\..\sominc\cnvsomex.cmd $@
    1718     
    1819
     
    8788-xs
    8889-xr
     90-I..\..\sominc
    8991-DOS2
    9092| MAKE.CFG >NUL
  • trunk/Lucide/SOURCE/plugins/lujpeg/makefile

    r68 r88  
    1515.idl.xh:
    1616    sc -c -s"xc;xih;xh" -I..\ludoc $<
    17      
     17    ..\..\sominc\cnvsomex.cmd $@
     18
    1819
    1920all: make.cfg lujpeg.dll
     
    5859-xs
    5960-xr
     61-I..\..\sominc
    6062-I..\ludoc
    6163-I..\..\..\..\libjpeg
  • trunk/Lucide/SOURCE/plugins/lupoppler/lupoppler.xh

    r61 r88  
    6262 * -- Typedefs for LuPopplerDocument Method Procedures
    6363 */
    64 SOMEXTERN {
     64SOMEXTERNF {
    6565
    6666/*
  • trunk/Lucide/SOURCE/plugins/lupoppler/makefile

    r68 r88  
    1515.idl.xh:
    1616    sc -c -s"xc;xih;xh" -I..\ludoc $<
    17      
     17    ..\..\sominc\cnvsomex.cmd $@
     18
    1819
    1920all: make.cfg lupplr.dll
     
    5859-xr
    5960-sg
     61-I..\..\sominc
    6062-I..\ludoc
    6163-I..\..\..\..\poppler\mypoppler
Note: See TracChangeset for help on using the changeset viewer.