PluginSupport.st
author Claus Gittinger <cg@exept.de>
Thu, 22 Dec 2005 19:10:55 +0100
changeset 9052 d59a247df39d
parent 9048 bc709cdeac79
child 11260 8fd6e42fce7b
permissions -rw-r--r--
*** empty log message ***
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
625d473ea13e initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    13
"{ Package: 'stx:libbasic' }"
625d473ea13e initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    14
625d473ea13e initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    15
Object subclass:#PluginSupport
625d473ea13e initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    16
	instanceVariableNames:''
625d473ea13e initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    17
	classVariableNames:''
625d473ea13e initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    18
	poolDictionaries:''
625d473ea13e initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    19
	category:'System-Support'
625d473ea13e initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    20
!
625d473ea13e initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    21
625d473ea13e initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    22
!PluginSupport class methodsFor:'documentation'!
625d473ea13e initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    23
625d473ea13e initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    24
copyright
625d473ea13e initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    25
"
625d473ea13e initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    26
 COPYRIGHT (c) 2005 by Claus Gittinger
9045
62fb1014a790 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 9044
diff changeset
    27
	      All Rights Reserved
9031
625d473ea13e initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    28
625d473ea13e initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    29
 This software is furnished under a license and may be used
625d473ea13e initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    30
 only in accordance with the terms of that license and with the
625d473ea13e initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    31
 inclusion of the above copyright notice.   This software may not
625d473ea13e initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    32
 be provided or otherwise made available to, or used by, any
625d473ea13e initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    33
 other person.  No title to or ownership of the software is
625d473ea13e initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    34
 hereby transferred.
625d473ea13e initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    35
"
625d473ea13e initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    36
!
625d473ea13e initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    37
625d473ea13e initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    38
documentation
625d473ea13e initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    39
"
625d473ea13e initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    40
    Provides support functions to run stx in a browser window as a plugin.
625d473ea13e initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    41
    (actually, it could be started from any other application just the same...)
625d473ea13e initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    42
625d473ea13e initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    43
    [author:]
9045
62fb1014a790 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 9044
diff changeset
    44
	Claus Gittinger
9031
625d473ea13e initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    45
625d473ea13e initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    46
    [see also:]
9045
62fb1014a790 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 9044
diff changeset
    47
	Smalltalk
9031
625d473ea13e initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    48
"
625d473ea13e initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    49
! !
625d473ea13e initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    50
625d473ea13e initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    51
!PluginSupport class methodsFor:'startup'!
625d473ea13e initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    52
9052
d59a247df39d *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 9048
diff changeset
    53
showPluginWarning:message inWindowWithID:windowID
d59a247df39d *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 9048
diff changeset
    54
    |messageView|
d59a247df39d *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 9048
diff changeset
    55
d59a247df39d *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 9048
diff changeset
    56
    messageView := Label new.
d59a247df39d *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 9048
diff changeset
    57
    messageView label:message.
d59a247df39d *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 9048
diff changeset
    58
    self        
d59a247df39d *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 9048
diff changeset
    59
        start:messageView
d59a247df39d *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 9048
diff changeset
    60
        inWindowWithID:windowID 
d59a247df39d *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 9048
diff changeset
    61
        parameters:#()
d59a247df39d *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 9048
diff changeset
    62
!
d59a247df39d *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 9048
diff changeset
    63
d59a247df39d *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 9048
diff changeset
    64
start:anApplicationOrView inWindowWithID:windowID parameters:parameters
d59a247df39d *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 9048
diff changeset
    65
    "open up an application or view in the external browserWindow"
d59a247df39d *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 9048
diff changeset
    66
d59a247df39d *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 9048
diff changeset
    67
    |v browserWindow|
9031
625d473ea13e initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    68
625d473ea13e initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    69
    browserWindow := ExternalTopView newWithID:windowID.
625d473ea13e initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    70
    browserWindow viewBackground:(Color red).
625d473ea13e initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    71
    browserWindow clear.
9046
c31812178624 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 9045
diff changeset
    72
    browserWindow width:self getBrowserWindowWidth.
c31812178624 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 9045
diff changeset
    73
    browserWindow height:self getBrowserWindowHeight.
9031
625d473ea13e initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    74
9052
d59a247df39d *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 9048
diff changeset
    75
    (anApplicationOrView isKindOf:ApplicationModel) ifTrue:[
d59a247df39d *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 9048
diff changeset
    76
        v := anApplicationOrView window.
d59a247df39d *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 9048
diff changeset
    77
    ] ifFalse:[
d59a247df39d *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 9048
diff changeset
    78
        v := anApplicationOrView.
d59a247df39d *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 9048
diff changeset
    79
    ].
d59a247df39d *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 9048
diff changeset
    80
    browserWindow becomeParentOf:v.
d59a247df39d *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 9048
diff changeset
    81
    self setPluginWindowHandle:(v id).
d59a247df39d *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 9048
diff changeset
    82
!
d59a247df39d *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 9048
diff changeset
    83
d59a247df39d *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 9048
diff changeset
    84
startClass:anApplicationClass inWindowWithID:windowID parameters:parameters
d59a247df39d *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 9048
diff changeset
    85
    "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
    86
d59a247df39d *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 9048
diff changeset
    87
    |applicationOrView|
d59a247df39d *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 9048
diff changeset
    88
9031
625d473ea13e initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    89
    (anApplicationClass isSubclassOf:ApplicationModel) ifTrue:[
9052
d59a247df39d *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 9048
diff changeset
    90
        applicationOrView := anApplicationClass new.
d59a247df39d *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 9048
diff changeset
    91
        applicationOrView allButOpen.
9031
625d473ea13e initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    92
    ] ifFalse:[
9052
d59a247df39d *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 9048
diff changeset
    93
        applicationOrView := anApplicationClass new.
9031
625d473ea13e initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    94
    ].
625d473ea13e initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    95
9052
d59a247df39d *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 9048
diff changeset
    96
    self
d59a247df39d *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 9048
diff changeset
    97
        start:applicationOrView 
d59a247df39d *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 9048
diff changeset
    98
        inWindowWithID:windowID 
d59a247df39d *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 9048
diff changeset
    99
        parameters:parameters
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
625d473ea13e initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   102
startInBrowserWithWindowID:windowID parameters:parameters
9052
d59a247df39d *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 9048
diff changeset
   103
    "take application-info from the browser-parameters,
d59a247df39d *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 9048
diff changeset
   104
     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
   105
9048
bc709cdeac79 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 9047
diff changeset
   106
    |appClassName appClass src|
bc709cdeac79 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 9047
diff changeset
   107
bc709cdeac79 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 9047
diff changeset
   108
    appClassName := parameters at:'application' ifAbsent:nil.
bc709cdeac79 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 9047
diff changeset
   109
    appClassName notNil ifTrue:[
bc709cdeac79 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 9047
diff changeset
   110
        appClass := Smalltalk classNamed:appClassName.
bc709cdeac79 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 9047
diff changeset
   111
        appClass notNil ifTrue:[
bc709cdeac79 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 9047
diff changeset
   112
            self
9052
d59a247df39d *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 9048
diff changeset
   113
                startClass:appClass
9048
bc709cdeac79 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 9047
diff changeset
   114
                inWindowWithID:windowID
bc709cdeac79 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 9047
diff changeset
   115
                parameters:parameters.
bc709cdeac79 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 9047
diff changeset
   116
            ^ self.
bc709cdeac79 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 9047
diff changeset
   117
        ].
9052
d59a247df39d *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 9048
diff changeset
   118
        self 
d59a247df39d *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 9048
diff changeset
   119
            showPluginWarning:'Missing Application Class: ', appClassName
d59a247df39d *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 9048
diff changeset
   120
            inWindowWithID:windowID.
d59a247df39d *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 9048
diff changeset
   121
        ^ self.
9048
bc709cdeac79 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 9047
diff changeset
   122
    ].
bc709cdeac79 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 9047
diff changeset
   123
bc709cdeac79 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 9047
diff changeset
   124
    src := parameters at:'src' ifAbsent:nil.
bc709cdeac79 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 9047
diff changeset
   125
    src notNil ifTrue:[
bc709cdeac79 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 9047
diff changeset
   126
        self halt.
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
    ].
9047
7bd12cc7b471 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 9046
diff changeset
   129
9045
62fb1014a790 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 9044
diff changeset
   130
    self
9048
bc709cdeac79 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 9047
diff changeset
   131
        start:NewLauncher
9047
7bd12cc7b471 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 9046
diff changeset
   132
        inWindowWithID:windowID
9048
bc709cdeac79 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 9047
diff changeset
   133
        parameters:parameters.
9037
ab156dd0adf0 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 9031
diff changeset
   134
ab156dd0adf0 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 9031
diff changeset
   135
    "
9039
f7c0026aad9a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 9037
diff changeset
   136
     |v|
f7c0026aad9a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 9037
diff changeset
   137
f7c0026aad9a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 9037
diff changeset
   138
     v := StandardSystemView new.
9040
0ca4ec16e473 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 9039
diff changeset
   139
     v openAndWait.
0ca4ec16e473 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 9039
diff changeset
   140
     self startInBrowserWithWindowID:v id parameters:#().
9039
f7c0026aad9a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 9037
diff changeset
   141
    "
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
    "
9037
ab156dd0adf0 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 9031
diff changeset
   144
     |v app|
ab156dd0adf0 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 9031
diff changeset
   145
ab156dd0adf0 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 9031
diff changeset
   146
     v := StandardSystemView new.
ab156dd0adf0 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 9031
diff changeset
   147
     v create.
ab156dd0adf0 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 9031
diff changeset
   148
     app := WorkspaceApplication new.
ab156dd0adf0 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 9031
diff changeset
   149
     app window:v.
ab156dd0adf0 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 9031
diff changeset
   150
     app allButOpen.
ab156dd0adf0 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 9031
diff changeset
   151
     app openWindow.
ab156dd0adf0 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 9031
diff changeset
   152
    "
9031
625d473ea13e initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   153
! !
625d473ea13e initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   154
9047
7bd12cc7b471 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 9046
diff changeset
   155
!PluginSupport class methodsFor:'support'!
7bd12cc7b471 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 9046
diff changeset
   156
7bd12cc7b471 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 9046
diff changeset
   157
getBrowserWindowHeight
7bd12cc7b471 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 9046
diff changeset
   158
%{
7bd12cc7b471 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 9046
diff changeset
   159
    extern int __pluginGetBrowserWindowHeight();
7bd12cc7b471 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 9046
diff changeset
   160
7bd12cc7b471 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 9046
diff changeset
   161
    RETURN (__mkSmallInteger(__pluginGetBrowserWindowHeight()));
7bd12cc7b471 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 9046
diff changeset
   162
%}.
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
7bd12cc7b471 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 9046
diff changeset
   165
getBrowserWindowWidth
7bd12cc7b471 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 9046
diff changeset
   166
%{
7bd12cc7b471 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 9046
diff changeset
   167
    extern int __pluginGetBrowserWindowWidth();
7bd12cc7b471 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 9046
diff changeset
   168
7bd12cc7b471 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 9046
diff changeset
   169
    RETURN (__mkSmallInteger(__pluginGetBrowserWindowWidth()));
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
7bd12cc7b471 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 9046
diff changeset
   173
setPluginWindowHandle:windowId
7bd12cc7b471 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 9046
diff changeset
   174
%{
7bd12cc7b471 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 9046
diff changeset
   175
    extern void __pluginSetWindow();
7bd12cc7b471 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 9046
diff changeset
   176
#   define HWND         void *
7bd12cc7b471 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 9046
diff changeset
   177
#   define _HWNDVal(o)  (HWND)(__MKCP(o))
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
    if (__isExternalAddress(windowId)) {
7bd12cc7b471 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 9046
diff changeset
   180
	HWND hWnd = _HWNDVal(windowId);
7bd12cc7b471 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 9046
diff changeset
   181
	__pluginSetWindow(hWnd);
7bd12cc7b471 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 9046
diff changeset
   182
    }
7bd12cc7b471 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 9046
diff changeset
   183
%}.
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
9031
625d473ea13e initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   186
!PluginSupport class methodsFor:'documentation'!
625d473ea13e initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   187
625d473ea13e initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   188
version
9052
d59a247df39d *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 9048
diff changeset
   189
    ^ '$Header: /cvs/stx/stx/libbasic/PluginSupport.st,v 1.11 2005-12-22 18:10:55 cg Exp $'
9031
625d473ea13e initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   190
! !