PluginSupport.st
author Claus Gittinger <cg@exept.de>
Tue, 14 Sep 2010 16:07:59 +0200
changeset 13059 4d63f8d1f57c
parent 12676 18527baaa343
child 13490 593d0329f4c5
permissions -rw-r--r--
changed: #startInBrowserWithWindowID:parameters:
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
625d473ea13e initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    21
!PluginSupport class methodsFor:'documentation'!
625d473ea13e initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    22
625d473ea13e initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    23
copyright
625d473ea13e initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    24
"
625d473ea13e initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    25
 COPYRIGHT (c) 2005 by Claus Gittinger
9045
62fb1014a790 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 9044
diff changeset
    26
	      All Rights Reserved
9031
625d473ea13e initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    27
625d473ea13e initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    28
 This software is furnished under a license and may be used
625d473ea13e initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    29
 only in accordance with the terms of that license and with the
625d473ea13e initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    30
 inclusion of the above copyright notice.   This software may not
625d473ea13e initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    31
 be provided or otherwise made available to, or used by, any
625d473ea13e initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    32
 other person.  No title to or ownership of the software is
625d473ea13e initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    33
 hereby transferred.
625d473ea13e initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    34
"
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
documentation
625d473ea13e initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    38
"
625d473ea13e initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    39
    Provides support functions to run stx in a browser window as a plugin.
625d473ea13e initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    40
    (actually, it could be started from any other application just the same...)
625d473ea13e initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    41
625d473ea13e initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    42
    [author:]
9045
62fb1014a790 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 9044
diff changeset
    43
	Claus Gittinger
9031
625d473ea13e initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    44
625d473ea13e initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    45
    [see also:]
9045
62fb1014a790 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 9044
diff changeset
    46
	Smalltalk
9031
625d473ea13e initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    47
"
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
!PluginSupport class methodsFor:'startup'!
625d473ea13e initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    51
9052
d59a247df39d *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 9048
diff changeset
    52
showPluginWarning:message inWindowWithID:windowID
d59a247df39d *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 9048
diff changeset
    53
    |messageView|
d59a247df39d *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 9048
diff changeset
    54
d59a247df39d *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 9048
diff changeset
    55
    messageView := Label new.
d59a247df39d *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 9048
diff changeset
    56
    messageView label:message.
d59a247df39d *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 9048
diff changeset
    57
    self        
d59a247df39d *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 9048
diff changeset
    58
        start:messageView
d59a247df39d *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 9048
diff changeset
    59
        inWindowWithID:windowID 
d59a247df39d *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 9048
diff changeset
    60
        parameters:#()
d59a247df39d *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 9048
diff changeset
    61
!
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
start:anApplicationOrView inWindowWithID:windowID parameters:parameters
d59a247df39d *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 9048
diff changeset
    64
    "open up an application or view in the external browserWindow"
d59a247df39d *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 9048
diff changeset
    65
d59a247df39d *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 9048
diff changeset
    66
    |v browserWindow|
9031
625d473ea13e initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    67
625d473ea13e initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    68
    browserWindow := ExternalTopView newWithID:windowID.
625d473ea13e initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    69
    browserWindow viewBackground:(Color red).
625d473ea13e initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    70
    browserWindow clear.
9046
c31812178624 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 9045
diff changeset
    71
    browserWindow width:self getBrowserWindowWidth.
c31812178624 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 9045
diff changeset
    72
    browserWindow height:self getBrowserWindowHeight.
9031
625d473ea13e initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    73
9052
d59a247df39d *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 9048
diff changeset
    74
    (anApplicationOrView isKindOf:ApplicationModel) ifTrue:[
d59a247df39d *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 9048
diff changeset
    75
        v := anApplicationOrView window.
d59a247df39d *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 9048
diff changeset
    76
    ] ifFalse:[
d59a247df39d *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 9048
diff changeset
    77
        v := anApplicationOrView.
d59a247df39d *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 9048
diff changeset
    78
    ].
d59a247df39d *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 9048
diff changeset
    79
    browserWindow becomeParentOf:v.
d59a247df39d *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 9048
diff changeset
    80
    self setPluginWindowHandle:(v id).
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
d59a247df39d *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 9048
diff changeset
    83
startClass:anApplicationClass inWindowWithID:windowID parameters:parameters
d59a247df39d *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 9048
diff changeset
    84
    "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
    85
d59a247df39d *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 9048
diff changeset
    86
    |applicationOrView|
d59a247df39d *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 9048
diff changeset
    87
9031
625d473ea13e initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    88
    (anApplicationClass isSubclassOf:ApplicationModel) ifTrue:[
9052
d59a247df39d *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 9048
diff changeset
    89
        applicationOrView := anApplicationClass new.
d59a247df39d *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 9048
diff changeset
    90
        applicationOrView allButOpen.
9031
625d473ea13e initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    91
    ] ifFalse:[
9052
d59a247df39d *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 9048
diff changeset
    92
        applicationOrView := anApplicationClass new.
9031
625d473ea13e initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    93
    ].
625d473ea13e initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    94
9052
d59a247df39d *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 9048
diff changeset
    95
    self
d59a247df39d *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 9048
diff changeset
    96
        start:applicationOrView 
d59a247df39d *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 9048
diff changeset
    97
        inWindowWithID:windowID 
d59a247df39d *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 9048
diff changeset
    98
        parameters:parameters
9031
625d473ea13e initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
    99
!
625d473ea13e initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   100
625d473ea13e initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   101
startInBrowserWithWindowID:windowID parameters:parameters
9052
d59a247df39d *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 9048
diff changeset
   102
    "take application-info from the browser-parameters,
d59a247df39d *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 9048
diff changeset
   103
     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
   104
9048
bc709cdeac79 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 9047
diff changeset
   105
    |appClassName appClass src|
bc709cdeac79 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 9047
diff changeset
   106
13059
4d63f8d1f57c changed: #startInBrowserWithWindowID:parameters:
Claus Gittinger <cg@exept.de>
parents: 12676
diff changeset
   107
    src := parameters at:'src' ifAbsent:nil.
4d63f8d1f57c changed: #startInBrowserWithWindowID:parameters:
Claus Gittinger <cg@exept.de>
parents: 12676
diff changeset
   108
    src notNil ifTrue:[
4d63f8d1f57c changed: #startInBrowserWithWindowID:parameters:
Claus Gittinger <cg@exept.de>
parents: 12676
diff changeset
   109
        "/ fetch this document from the browser...
4d63f8d1f57c changed: #startInBrowserWithWindowID:parameters:
Claus Gittinger <cg@exept.de>
parents: 12676
diff changeset
   110
        self 
4d63f8d1f57c changed: #startInBrowserWithWindowID:parameters:
Claus Gittinger <cg@exept.de>
parents: 12676
diff changeset
   111
            showPluginWarning:'Cannot (yet) load Application code'
4d63f8d1f57c changed: #startInBrowserWithWindowID:parameters:
Claus Gittinger <cg@exept.de>
parents: 12676
diff changeset
   112
            inWindowWithID:windowID.
4d63f8d1f57c changed: #startInBrowserWithWindowID:parameters:
Claus Gittinger <cg@exept.de>
parents: 12676
diff changeset
   113
    ].
4d63f8d1f57c changed: #startInBrowserWithWindowID:parameters:
Claus Gittinger <cg@exept.de>
parents: 12676
diff changeset
   114
9048
bc709cdeac79 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 9047
diff changeset
   115
    appClassName := parameters at:'application' ifAbsent:nil.
bc709cdeac79 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 9047
diff changeset
   116
    appClassName notNil ifTrue:[
bc709cdeac79 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 9047
diff changeset
   117
        appClass := Smalltalk classNamed:appClassName.
bc709cdeac79 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 9047
diff changeset
   118
        appClass notNil ifTrue:[
bc709cdeac79 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 9047
diff changeset
   119
            self
9052
d59a247df39d *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 9048
diff changeset
   120
                startClass:appClass
9048
bc709cdeac79 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 9047
diff changeset
   121
                inWindowWithID:windowID
bc709cdeac79 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 9047
diff changeset
   122
                parameters:parameters.
bc709cdeac79 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 9047
diff changeset
   123
            ^ self.
bc709cdeac79 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 9047
diff changeset
   124
        ].
9052
d59a247df39d *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 9048
diff changeset
   125
        self 
d59a247df39d *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 9048
diff changeset
   126
            showPluginWarning:'Missing Application Class: ', appClassName
d59a247df39d *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 9048
diff changeset
   127
            inWindowWithID:windowID.
d59a247df39d *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 9048
diff changeset
   128
        ^ self.
9048
bc709cdeac79 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 9047
diff changeset
   129
    ].
bc709cdeac79 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 9047
diff changeset
   130
9045
62fb1014a790 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 9044
diff changeset
   131
    self
9048
bc709cdeac79 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 9047
diff changeset
   132
        start:NewLauncher
9047
7bd12cc7b471 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 9046
diff changeset
   133
        inWindowWithID:windowID
9048
bc709cdeac79 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 9047
diff changeset
   134
        parameters:parameters.
9037
ab156dd0adf0 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 9031
diff changeset
   135
ab156dd0adf0 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 9031
diff changeset
   136
    "
9039
f7c0026aad9a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 9037
diff changeset
   137
     |v|
f7c0026aad9a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 9037
diff changeset
   138
f7c0026aad9a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 9037
diff changeset
   139
     v := StandardSystemView new.
9040
0ca4ec16e473 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 9039
diff changeset
   140
     v openAndWait.
0ca4ec16e473 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 9039
diff changeset
   141
     self startInBrowserWithWindowID:v id parameters:#().
9039
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
f7c0026aad9a *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 9037
diff changeset
   144
    "
9037
ab156dd0adf0 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 9031
diff changeset
   145
     |v app|
ab156dd0adf0 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 9031
diff changeset
   146
ab156dd0adf0 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 9031
diff changeset
   147
     v := StandardSystemView new.
ab156dd0adf0 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 9031
diff changeset
   148
     v create.
ab156dd0adf0 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 9031
diff changeset
   149
     app := WorkspaceApplication new.
ab156dd0adf0 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 9031
diff changeset
   150
     app window:v.
ab156dd0adf0 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 9031
diff changeset
   151
     app allButOpen.
ab156dd0adf0 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 9031
diff changeset
   152
     app openWindow.
ab156dd0adf0 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 9031
diff changeset
   153
    "
13059
4d63f8d1f57c changed: #startInBrowserWithWindowID:parameters:
Claus Gittinger <cg@exept.de>
parents: 12676
diff changeset
   154
4d63f8d1f57c changed: #startInBrowserWithWindowID:parameters:
Claus Gittinger <cg@exept.de>
parents: 12676
diff changeset
   155
    "Modified: / 14-09-2010 / 16:07:42 / cg"
9031
625d473ea13e initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   156
! !
625d473ea13e initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   157
9047
7bd12cc7b471 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 9046
diff changeset
   158
!PluginSupport class methodsFor:'support'!
7bd12cc7b471 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 9046
diff changeset
   159
7bd12cc7b471 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 9046
diff changeset
   160
getBrowserWindowHeight
7bd12cc7b471 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 9046
diff changeset
   161
%{
7bd12cc7b471 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 9046
diff changeset
   162
    extern int __pluginGetBrowserWindowHeight();
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
    RETURN (__mkSmallInteger(__pluginGetBrowserWindowHeight()));
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
!
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
getBrowserWindowWidth
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
    extern int __pluginGetBrowserWindowWidth();
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
    RETURN (__mkSmallInteger(__pluginGetBrowserWindowWidth()));
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
!
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
setPluginWindowHandle:windowId
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
    extern void __pluginSetWindow();
7bd12cc7b471 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 9046
diff changeset
   179
#   define HWND         void *
7bd12cc7b471 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 9046
diff changeset
   180
7bd12cc7b471 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 9046
diff changeset
   181
    if (__isExternalAddress(windowId)) {
12676
18527baaa343 Use __MKEXTERNALADDRESS() instead of __MKOBJ()
Stefan Vogel <sv@exept.de>
parents: 11260
diff changeset
   182
        HWND hWnd = (HWND)__externalAddressVal(windowId);
18527baaa343 Use __MKEXTERNALADDRESS() instead of __MKOBJ()
Stefan Vogel <sv@exept.de>
parents: 11260
diff changeset
   183
        __pluginSetWindow(hWnd);
9047
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
%}.
7bd12cc7b471 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 9046
diff changeset
   186
! !
7bd12cc7b471 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 9046
diff changeset
   187
9031
625d473ea13e initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   188
!PluginSupport class methodsFor:'documentation'!
625d473ea13e initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   189
625d473ea13e initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   190
version
13059
4d63f8d1f57c changed: #startInBrowserWithWindowID:parameters:
Claus Gittinger <cg@exept.de>
parents: 12676
diff changeset
   191
    ^ '$Header: /cvs/stx/stx/libbasic/PluginSupport.st,v 1.14 2010-09-14 14:07:59 cg Exp $'
12676
18527baaa343 Use __MKEXTERNALADDRESS() instead of __MKOBJ()
Stefan Vogel <sv@exept.de>
parents: 11260
diff changeset
   192
!
18527baaa343 Use __MKEXTERNALADDRESS() instead of __MKOBJ()
Stefan Vogel <sv@exept.de>
parents: 11260
diff changeset
   193
18527baaa343 Use __MKEXTERNALADDRESS() instead of __MKOBJ()
Stefan Vogel <sv@exept.de>
parents: 11260
diff changeset
   194
version_CVS
13059
4d63f8d1f57c changed: #startInBrowserWithWindowID:parameters:
Claus Gittinger <cg@exept.de>
parents: 12676
diff changeset
   195
    ^ '$Header: /cvs/stx/stx/libbasic/PluginSupport.st,v 1.14 2010-09-14 14:07:59 cg Exp $'
9031
625d473ea13e initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   196
! !