PluginSupport.st
author Claus Gittinger <cg@exept.de>
Tue, 09 Jul 2019 20:55:17 +0200
changeset 24417 03b083548da2
parent 14299 d9b1c2cc3779
child 18011 deb0c3355881
permissions -rw-r--r--
#REFACTORING by exept class: Smalltalk class changed: #recursiveInstallAutoloadedClassesFrom:rememberIn:maxLevels:noAutoload:packageTop:showSplashInLevels: Transcript showCR:(... bindWith:...) -> Transcript showCR:... with:...
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
9031
625d473ea13e initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
     1
"
625d473ea13e initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
     2
 COPYRIGHT (c) 2005 by Claus Gittinger
9045
62fb1014a790 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 9044
diff changeset
     3
	      All Rights Reserved
9031
625d473ea13e initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
     4
625d473ea13e initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
     5
 This software is furnished under a license and may be used
625d473ea13e initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
     6
 only in accordance with the terms of that license and with the
625d473ea13e initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
     7
 inclusion of the above copyright notice.   This software may not
625d473ea13e initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
     8
 be provided or otherwise made available to, or used by, any
625d473ea13e initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
     9
 other person.  No title to or ownership of the software is
625d473ea13e initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    10
 hereby transferred.
625d473ea13e initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    11
"
625d473ea13e initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    12
"{ Package: 'stx:libbasic' }"
625d473ea13e initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    13
625d473ea13e initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    14
Object subclass:#PluginSupport
625d473ea13e initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    15
	instanceVariableNames:''
625d473ea13e initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    16
	classVariableNames:''
625d473ea13e initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    17
	poolDictionaries:''
625d473ea13e initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    18
	category:'System-Support'
625d473ea13e initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    19
!
625d473ea13e initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    20
13490
Claus Gittinger <cg@exept.de>
parents: 13059
diff changeset
    21
Query subclass:#StartParameterQuery
Claus Gittinger <cg@exept.de>
parents: 13059
diff changeset
    22
	instanceVariableNames:''
Claus Gittinger <cg@exept.de>
parents: 13059
diff changeset
    23
	classVariableNames:''
Claus Gittinger <cg@exept.de>
parents: 13059
diff changeset
    24
	poolDictionaries:''
Claus Gittinger <cg@exept.de>
parents: 13059
diff changeset
    25
	privateIn:PluginSupport
Claus Gittinger <cg@exept.de>
parents: 13059
diff changeset
    26
!
Claus Gittinger <cg@exept.de>
parents: 13059
diff changeset
    27
9031
625d473ea13e initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    28
!PluginSupport class methodsFor:'documentation'!
625d473ea13e initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    29
625d473ea13e initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    30
copyright
625d473ea13e initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    31
"
625d473ea13e initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    32
 COPYRIGHT (c) 2005 by Claus Gittinger
9045
62fb1014a790 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 9044
diff changeset
    33
	      All Rights Reserved
9031
625d473ea13e initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    34
625d473ea13e initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    35
 This software is furnished under a license and may be used
625d473ea13e initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    36
 only in accordance with the terms of that license and with the
625d473ea13e initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    37
 inclusion of the above copyright notice.   This software may not
625d473ea13e initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    38
 be provided or otherwise made available to, or used by, any
625d473ea13e initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    39
 other person.  No title to or ownership of the software is
625d473ea13e initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    40
 hereby transferred.
625d473ea13e initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    41
"
625d473ea13e initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    42
!
625d473ea13e initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    43
625d473ea13e initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    44
documentation
625d473ea13e initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    45
"
13490
Claus Gittinger <cg@exept.de>
parents: 13059
diff changeset
    46
    Provides support functions to run ST/X in an external (web-browser) window as a plugin.
9031
625d473ea13e initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    47
    (actually, it could be started from any other application just the same...)
625d473ea13e initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    48
625d473ea13e initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    49
    [author:]
13490
Claus Gittinger <cg@exept.de>
parents: 13059
diff changeset
    50
        Claus Gittinger
9031
625d473ea13e initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    51
625d473ea13e initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    52
    [see also:]
13490
Claus Gittinger <cg@exept.de>
parents: 13059
diff changeset
    53
        Smalltalk
9031
625d473ea13e initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    54
"
625d473ea13e initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    55
! !
625d473ea13e initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    56
625d473ea13e initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    57
!PluginSupport class methodsFor:'startup'!
625d473ea13e initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    58
13490
Claus Gittinger <cg@exept.de>
parents: 13059
diff changeset
    59
embedView:aView inWindowWithID:windowID
Claus Gittinger <cg@exept.de>
parents: 13059
diff changeset
    60
    "embed a view in the external (web-browser-) window"
9052
d59a247df39d *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 9048
diff changeset
    61
13490
Claus Gittinger <cg@exept.de>
parents: 13059
diff changeset
    62
    |browserWindow|
9031
625d473ea13e initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    63
625d473ea13e initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    64
    browserWindow := ExternalTopView newWithID:windowID.
625d473ea13e initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    65
    browserWindow viewBackground:(Color red).
625d473ea13e initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    66
    browserWindow clear.
9046
c31812178624 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 9045
diff changeset
    67
    browserWindow width:self getBrowserWindowWidth.
c31812178624 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 9045
diff changeset
    68
    browserWindow height:self getBrowserWindowHeight.
9031
625d473ea13e initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    69
13490
Claus Gittinger <cg@exept.de>
parents: 13059
diff changeset
    70
    browserWindow becomeParentOf:aView.
Claus Gittinger <cg@exept.de>
parents: 13059
diff changeset
    71
    self setPluginWindowHandle:(aView id).
Claus Gittinger <cg@exept.de>
parents: 13059
diff changeset
    72
!
Claus Gittinger <cg@exept.de>
parents: 13059
diff changeset
    73
Claus Gittinger <cg@exept.de>
parents: 13059
diff changeset
    74
showPluginWarning:message inWindowWithID:windowID
Claus Gittinger <cg@exept.de>
parents: 13059
diff changeset
    75
    |messageView|
Claus Gittinger <cg@exept.de>
parents: 13059
diff changeset
    76
Claus Gittinger <cg@exept.de>
parents: 13059
diff changeset
    77
    messageView := Label new.
Claus Gittinger <cg@exept.de>
parents: 13059
diff changeset
    78
    messageView label:message.
Claus Gittinger <cg@exept.de>
parents: 13059
diff changeset
    79
    self embedView:messageView inWindowWithID:windowID 
9052
d59a247df39d *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 9048
diff changeset
    80
!
d59a247df39d *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 9048
diff changeset
    81
d59a247df39d *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 9048
diff changeset
    82
startClass:anApplicationClass inWindowWithID:windowID parameters:parameters
d59a247df39d *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 9048
diff changeset
    83
    "open up a new instance of an application- or view-class in the external browserWindow"
d59a247df39d *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 9048
diff changeset
    84
13490
Claus Gittinger <cg@exept.de>
parents: 13059
diff changeset
    85
    |applicationOrView view|
9052
d59a247df39d *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 9048
diff changeset
    86
13490
Claus Gittinger <cg@exept.de>
parents: 13059
diff changeset
    87
    StartParameterQuery answer:parameters do:[
Claus Gittinger <cg@exept.de>
parents: 13059
diff changeset
    88
        (anApplicationClass isSubclassOf:ApplicationModel) ifTrue:[
Claus Gittinger <cg@exept.de>
parents: 13059
diff changeset
    89
            applicationOrView := anApplicationClass new.
Claus Gittinger <cg@exept.de>
parents: 13059
diff changeset
    90
            applicationOrView allButOpen.
Claus Gittinger <cg@exept.de>
parents: 13059
diff changeset
    91
            view := applicationOrView window.
Claus Gittinger <cg@exept.de>
parents: 13059
diff changeset
    92
        ] ifFalse:[
Claus Gittinger <cg@exept.de>
parents: 13059
diff changeset
    93
            applicationOrView := anApplicationClass new.
14299
d9b1c2cc3779 Avoid #isKindOf: where possible
Stefan Vogel <sv@exept.de>
parents: 13490
diff changeset
    94
            applicationOrView isView ifTrue:[
13490
Claus Gittinger <cg@exept.de>
parents: 13059
diff changeset
    95
                view := applicationOrView
Claus Gittinger <cg@exept.de>
parents: 13059
diff changeset
    96
            ] ifFalse:[
Claus Gittinger <cg@exept.de>
parents: 13059
diff changeset
    97
                view := applicationOrView window.
Claus Gittinger <cg@exept.de>
parents: 13059
diff changeset
    98
            ].
Claus Gittinger <cg@exept.de>
parents: 13059
diff changeset
    99
        ].
9031
625d473ea13e initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   100
    ].
625d473ea13e initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   101
13490
Claus Gittinger <cg@exept.de>
parents: 13059
diff changeset
   102
    self embedView:view inWindowWithID:windowID 
9031
625d473ea13e initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   103
!
625d473ea13e initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   104
625d473ea13e initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   105
startInBrowserWithWindowID:windowID parameters:parameters
9052
d59a247df39d *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 9048
diff changeset
   106
    "take application-info from the browser-parameters,
d59a247df39d *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 9048
diff changeset
   107
     and open up a new instance of it in the external browserWindow"
d59a247df39d *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 9048
diff changeset
   108
9048
bc709cdeac79 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 9047
diff changeset
   109
    |appClassName appClass src|
bc709cdeac79 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 9047
diff changeset
   110
13059
4d63f8d1f57c changed: #startInBrowserWithWindowID:parameters:
Claus Gittinger <cg@exept.de>
parents: 12676
diff changeset
   111
    src := parameters at:'src' ifAbsent:nil.
4d63f8d1f57c changed: #startInBrowserWithWindowID:parameters:
Claus Gittinger <cg@exept.de>
parents: 12676
diff changeset
   112
    src notNil ifTrue:[
4d63f8d1f57c changed: #startInBrowserWithWindowID:parameters:
Claus Gittinger <cg@exept.de>
parents: 12676
diff changeset
   113
        "/ fetch this document from the browser...
4d63f8d1f57c changed: #startInBrowserWithWindowID:parameters:
Claus Gittinger <cg@exept.de>
parents: 12676
diff changeset
   114
        self 
4d63f8d1f57c changed: #startInBrowserWithWindowID:parameters:
Claus Gittinger <cg@exept.de>
parents: 12676
diff changeset
   115
            showPluginWarning:'Cannot (yet) load Application code'
4d63f8d1f57c changed: #startInBrowserWithWindowID:parameters:
Claus Gittinger <cg@exept.de>
parents: 12676
diff changeset
   116
            inWindowWithID:windowID.
4d63f8d1f57c changed: #startInBrowserWithWindowID:parameters:
Claus Gittinger <cg@exept.de>
parents: 12676
diff changeset
   117
    ].
4d63f8d1f57c changed: #startInBrowserWithWindowID:parameters:
Claus Gittinger <cg@exept.de>
parents: 12676
diff changeset
   118
9048
bc709cdeac79 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 9047
diff changeset
   119
    appClassName := parameters at:'application' ifAbsent:nil.
bc709cdeac79 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 9047
diff changeset
   120
    appClassName notNil ifTrue:[
bc709cdeac79 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 9047
diff changeset
   121
        appClass := Smalltalk classNamed:appClassName.
bc709cdeac79 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 9047
diff changeset
   122
        appClass notNil ifTrue:[
bc709cdeac79 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 9047
diff changeset
   123
            self
9052
d59a247df39d *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 9048
diff changeset
   124
                startClass:appClass
9048
bc709cdeac79 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 9047
diff changeset
   125
                inWindowWithID:windowID
bc709cdeac79 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 9047
diff changeset
   126
                parameters:parameters.
bc709cdeac79 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 9047
diff changeset
   127
            ^ self.
bc709cdeac79 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 9047
diff changeset
   128
        ].
9052
d59a247df39d *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 9048
diff changeset
   129
        self 
d59a247df39d *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 9048
diff changeset
   130
            showPluginWarning:'Missing Application Class: ', appClassName
d59a247df39d *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 9048
diff changeset
   131
            inWindowWithID:windowID.
d59a247df39d *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 9048
diff changeset
   132
        ^ self.
9048
bc709cdeac79 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 9047
diff changeset
   133
    ].
bc709cdeac79 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 9047
diff changeset
   134
9045
62fb1014a790 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 9044
diff changeset
   135
    self
13490
Claus Gittinger <cg@exept.de>
parents: 13059
diff changeset
   136
        startClass:NewLauncher
9047
7bd12cc7b471 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 9046
diff changeset
   137
        inWindowWithID:windowID
9048
bc709cdeac79 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 9047
diff changeset
   138
        parameters:parameters.
9037
ab156dd0adf0 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 9031
diff changeset
   139
ab156dd0adf0 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 9031
diff changeset
   140
    "
9039
f7c0026aad9a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 9037
diff changeset
   141
     |v|
f7c0026aad9a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 9037
diff changeset
   142
f7c0026aad9a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 9037
diff changeset
   143
     v := StandardSystemView new.
9040
0ca4ec16e473 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 9039
diff changeset
   144
     v openAndWait.
13490
Claus Gittinger <cg@exept.de>
parents: 13059
diff changeset
   145
     self startInBrowserWithWindowID:v id parameters:(Dictionary new).
9039
f7c0026aad9a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 9037
diff changeset
   146
    "
f7c0026aad9a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 9037
diff changeset
   147
f7c0026aad9a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 9037
diff changeset
   148
    "
9037
ab156dd0adf0 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 9031
diff changeset
   149
     |v app|
ab156dd0adf0 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 9031
diff changeset
   150
ab156dd0adf0 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 9031
diff changeset
   151
     v := StandardSystemView new.
ab156dd0adf0 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 9031
diff changeset
   152
     v create.
ab156dd0adf0 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 9031
diff changeset
   153
     app := WorkspaceApplication new.
ab156dd0adf0 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 9031
diff changeset
   154
     app window:v.
ab156dd0adf0 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 9031
diff changeset
   155
     app allButOpen.
ab156dd0adf0 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 9031
diff changeset
   156
     app openWindow.
ab156dd0adf0 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 9031
diff changeset
   157
    "
13059
4d63f8d1f57c changed: #startInBrowserWithWindowID:parameters:
Claus Gittinger <cg@exept.de>
parents: 12676
diff changeset
   158
4d63f8d1f57c changed: #startInBrowserWithWindowID:parameters:
Claus Gittinger <cg@exept.de>
parents: 12676
diff changeset
   159
    "Modified: / 14-09-2010 / 16:07:42 / cg"
9031
625d473ea13e initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   160
! !
625d473ea13e initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   161
9047
7bd12cc7b471 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 9046
diff changeset
   162
!PluginSupport class methodsFor:'support'!
7bd12cc7b471 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 9046
diff changeset
   163
7bd12cc7b471 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 9046
diff changeset
   164
getBrowserWindowHeight
7bd12cc7b471 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 9046
diff changeset
   165
%{
7bd12cc7b471 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 9046
diff changeset
   166
    extern int __pluginGetBrowserWindowHeight();
7bd12cc7b471 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 9046
diff changeset
   167
7bd12cc7b471 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 9046
diff changeset
   168
    RETURN (__mkSmallInteger(__pluginGetBrowserWindowHeight()));
7bd12cc7b471 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 9046
diff changeset
   169
%}.
7bd12cc7b471 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 9046
diff changeset
   170
!
7bd12cc7b471 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 9046
diff changeset
   171
7bd12cc7b471 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 9046
diff changeset
   172
getBrowserWindowWidth
7bd12cc7b471 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 9046
diff changeset
   173
%{
7bd12cc7b471 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 9046
diff changeset
   174
    extern int __pluginGetBrowserWindowWidth();
7bd12cc7b471 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 9046
diff changeset
   175
7bd12cc7b471 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 9046
diff changeset
   176
    RETURN (__mkSmallInteger(__pluginGetBrowserWindowWidth()));
7bd12cc7b471 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 9046
diff changeset
   177
%}.
7bd12cc7b471 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 9046
diff changeset
   178
!
7bd12cc7b471 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 9046
diff changeset
   179
7bd12cc7b471 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 9046
diff changeset
   180
setPluginWindowHandle:windowId
7bd12cc7b471 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 9046
diff changeset
   181
%{
7bd12cc7b471 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 9046
diff changeset
   182
    extern void __pluginSetWindow();
7bd12cc7b471 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 9046
diff changeset
   183
#   define HWND         void *
7bd12cc7b471 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 9046
diff changeset
   184
7bd12cc7b471 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 9046
diff changeset
   185
    if (__isExternalAddress(windowId)) {
12676
18527baaa343 Use __MKEXTERNALADDRESS() instead of __MKOBJ()
Stefan Vogel <sv@exept.de>
parents: 11260
diff changeset
   186
        HWND hWnd = (HWND)__externalAddressVal(windowId);
18527baaa343 Use __MKEXTERNALADDRESS() instead of __MKOBJ()
Stefan Vogel <sv@exept.de>
parents: 11260
diff changeset
   187
        __pluginSetWindow(hWnd);
9047
7bd12cc7b471 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 9046
diff changeset
   188
    }
7bd12cc7b471 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 9046
diff changeset
   189
%}.
7bd12cc7b471 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 9046
diff changeset
   190
! !
7bd12cc7b471 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 9046
diff changeset
   191
9031
625d473ea13e initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   192
!PluginSupport class methodsFor:'documentation'!
625d473ea13e initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   193
12676
18527baaa343 Use __MKEXTERNALADDRESS() instead of __MKOBJ()
Stefan Vogel <sv@exept.de>
parents: 11260
diff changeset
   194
version_CVS
14299
d9b1c2cc3779 Avoid #isKindOf: where possible
Stefan Vogel <sv@exept.de>
parents: 13490
diff changeset
   195
    ^ '$Header: /cvs/stx/stx/libbasic/PluginSupport.st,v 1.16 2012-08-03 20:26:00 stefan Exp $'
9031
625d473ea13e initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   196
! !