stx_goodies_libcairo.st
author Jan Vrany <jan.vrany@fit.cvut.cz>
Wed, 24 Dec 2014 22:29:13 +0100
changeset 25 643d03d21ddf
parent 23 38ee47dbd976
child 28 1bd3d147cd77
permissions -rw-r--r--
Fixes to make it working under recent Smalltalk/X

"{ Package: 'stx:goodies/libcairo' }"

LibraryDefinition subclass:#stx_goodies_libcairo
	instanceVariableNames:''
	classVariableNames:''
	poolDictionaries:''
	category:'* Projects & Packages *'
!


!stx_goodies_libcairo class methodsFor:'description'!

mandatoryPreRequisites
    "list packages which are mandatory as a prerequisite.
     This are packages containing superclasses of my classes and classes which
     are extended by myself.
     They are mandatory, because we need these packages as a prerequisite for loading and compiling.
     This method is generated automatically,
     by searching along the inheritance chain of all of my classes."

    ^ #(
        #'stx:libbasic'    "ArrayedCollection - superclass of Cairo::FontExtents"
        #'stx:libview'    "DeviceGraphicsContext - extended"
    )
!

postLoadAction

    "
        stx_goodies_libcairo postLoadAction
    "

    super postLoadAction.
    OperatingSystem isUNIXlike 
        ifTrue:
            [ExternalLibraryFunction dllPath:    
                (ExternalLibraryFunction dllPath asOrderedCollection
                    add:'/usr/lib/i386-linux-gnu';
                    add:'/usr/lib';
                    add:'/usr/local/lib';
                    yourself)].

    "Created: / 10-09-2008 / 18:30:19 / Jan Vrany <vranyj1@fel.cvut.cz>"
    "Modified: / 21-09-2014 / 01:01:07 / Jan Vrany <jan.vrany@fit.cvut.cz>"
!

preLoadAction

    "
        stx_goodies_libcairo preLoadAction
    "

    super preLoadAction.
    NameSpace name:#Cairo

    "Created: / 10-09-2008 / 19:16:56 / Jan Vrany <vranyj1@fel.cvut.cz>"
!

preRequisites
    "list all required packages.
     This list can be maintained manually or (better) generated and
     updated by scanning the superclass hierarchies and looking for
     global variable accesses. (the browser has a menu function for that)
     Howevery, often too much is found, and you may want to explicitely
     exclude individual packages in the #excludedFromPrerequisites method."

    ^ #(
        #'stx:libbasic'    "ProjectDefinition - superclass of stx_goodies_libcairo "
        #'stx:libview'    "GLXWorkstation - superclass of Cairo::GLXWorkstation "
    )
!

referencedPreRequisites
    "list packages which are a prerequisite, because they contain
     classes which are referenced by my classes.
     We do not need these packages as a prerequisite for loading or compiling.
     This method is generated automatically,
     by searching all classes (and their packages) which are referenced by my classes."

    ^ #(
    )
!

subProjects
    "list packages which are known as subprojects. 
     The generated makefile will enter those and make there as well.
     However: they are not forced to be loaded when a package is loaded; 
     for those, redefine requiredPrerequisites."

    ^ #(
    )
! !

!stx_goodies_libcairo class methodsFor:'description - contents'!

classNamesAndAttributes
    "lists the classes which are to be included in the project.
     Each entry in the list may be: a single class-name (symbol),
     or an array-literal consisting of class name and attributes.
     Attributes are: #autoload or #<os> where os is one of win32, unix,..."

    ^ #(
        "<className> or (<className> attributes...) in load order"
        #'Cairo::Antialias'
        #'Cairo::ClockView'
        #'Cairo::Content'
        #'Cairo::Extend'
        #'Cairo::FillRule'
        #'Cairo::Filter'
        #'Cairo::FontExtents'
        #'Cairo::FontOptions'
        #'Cairo::FontSlant'
        #'Cairo::FontType'
        #'Cairo::FontWeight'
        #'Cairo::Format'
        #'Cairo::GLXWorkstation'
        #'Cairo::Glyph'
        #'Cairo::HintMetrics'
        #'Cairo::HintStyle'
        #'Cairo::LineCap'
        #'Cairo::LineJoin'
        #'Cairo::Matrix'
        #'Cairo::Operator'
        #'Cairo::Path'
        #'Cairo::PathData'
        #'Cairo::PathDataType'
        #'Cairo::PatternType'
        #'Cairo::Rectangle'
        #'Cairo::RectangleList'
        #'Cairo::RefCountedStructure'
        #'Cairo::Status'
        #'Cairo::SubpixelOrder'
        #'Cairo::SurfaceType'
        #'Cairo::SvgVersion'
        #'Cairo::TextExampleView'
        #'Cairo::TextExtents'
        #'Cairo::UserDataKey'
        #'stx_goodies_libcairo'
        #'Cairo::FontFace'
        #'Cairo::GraphicsContext'
        #'Cairo::Pattern'
        #'Cairo::ScaledFont'
        #'Cairo::Surface'
    )
!

extensionMethodNames
    "list class/selector pairs of extensions.
     A correponding method with real names must be present in my concrete subclasses"

    ^ #(
        DeviceGraphicsContext drawableId
        GraphicsDevice cairoSurfaceFor:
        GraphicsDevice displayId
        SimpleView cairo
        SimpleView cairoSurface
        XWorkstation cairoSurfaceFor:
    )
! !

!stx_goodies_libcairo class methodsFor:'description - project information'!

companyName
    "Return a companyname which will appear in <lib>.rc"

    ^ 'CTU FEI'

    "Created: / 10-07-2008 / 23:11:59 / Jan Vrany <vranyj1@fel.cvut.cz>"
!

description
    "Return a description string which will appear in vc.def / bc.def"

    ^ 'Cairo bindings (http://www.cairographics.org)'

    "Created: / 10-07-2008 / 23:11:59 / Jan Vrany <vranyj1@fel.cvut.cz>"
!

legalCopyright
    "Return a copyright string which will appear in <lib>.rc"

    ^ 'Copyright Jan Vrany 2008'

    "Created: / 10-07-2008 / 23:11:59 / Jan Vrany <vranyj1@fel.cvut.cz>"
!

productName
    "Return a product name which will appear in <lib>.rc"

    ^ 'Cairo'

    "Created: / 10-07-2008 / 23:11:59 / Jan Vrany <vranyj1@fel.cvut.cz>"
! !

!stx_goodies_libcairo class methodsFor:'description - svn'!

svnRepositoryUrlString
    "Return a SVN repository URL of myself.
     (Generated since 2011-04-08)
     Do not make the string shorter!!!!!! We have to use fixed-length keyword!!!!!!
    "        

    ^ '$URL::                                                                                                                        $'
!

svnRevisionNr
    "Return a SVN revision number of myself.
     This number is updated after a commit"

    ^ "$SVN-Revision:"'14              '"$"
! !

!stx_goodies_libcairo class methodsFor:'documentation'!

version
    ^'$Id$'
!

version_HG
    ^ '$Changeset: <not expanded> $'
! !