XWorkstation.st
changeset 5936 32467c3ce97d
parent 5934 456535dcca66
child 5938 f5d6189257d4
equal deleted inserted replaced
5935:6093fded5ed1 5936:32467c3ce97d
  9669                 free(cp);
  9669                 free(cp);
  9670         }
  9670         }
  9671     }
  9671     }
  9672 fail: ;
  9672 fail: ;
  9673 %}.
  9673 %}.
  9674     typeID isNil ifTrue:[
  9674     (typeID isNil or:[typeID == 0]) ifTrue:[
       
  9675         "typeID == 0 (None): The property does not exist in the specified window"
  9675         ^ nil
  9676         ^ nil
  9676     ].
  9677     ].
  9677     ^ typeID->val
  9678     ^ typeID->val
  9678 
  9679 
  9679     "
  9680     "
 12450 !
 12451 !
 12451 
 12452 
 12452 selectionNotify:aView selection:aSelectionID target:aTargetID property:aPropertyID requestor:requestorID time:time
 12453 selectionNotify:aView selection:aSelectionID target:aTargetID property:aPropertyID requestor:requestorID time:time
 12453     "this is a forwarded selectionNotify event from XWorkstation"
 12454     "this is a forwarded selectionNotify event from XWorkstation"
 12454 
 12455 
 12455     |property propertyKey|
 12456     |property propertyKey atomName|
 12456 
 12457 
 12457     aSelectionID ~~ selectionID ifTrue:[
 12458     aSelectionID ~~ selectionID ifTrue:[
 12458         "ignore notification that is not for our selection"
 12459         "ignore notification that is not for our selection"
 12459         ^ self.
 12460         ^ self.
 12460     ].
 12461     ].
 12464         done := true.
 12465         done := true.
 12465         ^ self.
 12466         ^ self.
 12466     ].
 12467     ].
 12467 
 12468 
 12468     property := display getProperty:aPropertyID from:drawableID delete:true.
 12469     property := display getProperty:aPropertyID from:drawableID delete:true.
       
 12470     property isNil ifTrue:[
       
 12471         "the property does not exist in the specified window"
       
 12472         done := true.
       
 12473         ^ self
       
 12474     ].
       
 12475         
 12469     propertyKey := property key.
 12476     propertyKey := property key.
 12470     propertyKey == aTargetID ifTrue:[
 12477     propertyKey == aTargetID ifTrue:[
 12471         "good, the property is consistent with our request.
 12478         "good, the property is consistent with our request.
 12472          The whole selection is in the property"
 12479          The whole selection is in the property"
 12473         buffer := property value.
 12480         buffer := property value.
 12474         done := true.
 12481         done := true.
 12475     ] ifFalse:[propertyKey == (display atomIDOf:#INCR) ifTrue:[
 12482     ] ifFalse:[propertyKey == (display atomIDOf:#INCR) ifTrue:[
 12476         "this is an incremental transfer. Wait for property change"
 12483         "this is an incremental transfer. Wait for property change"
 12477         incremental := true.
 12484         incremental := true.
 12478     ] ifFalse:[
 12485     ] ifFalse:[
       
 12486         atomName := (display atomName:propertyKey) ? propertyKey.
 12479         'XWorkstation(error): unexpected targetID (' errorPrint.
 12487         'XWorkstation(error): unexpected targetID (' errorPrint.
 12480         (display atomName:propertyKey) errorPrint.
 12488         atomName errorPrint.
 12481         ')in selectionNotify: ' errorPrint.
 12489         ') in selectionNotify: ' errorPrint.
 12482         display errorPrintCR.
 12490         display errorPrintCR.
 12483         done := true.
 12491         done := true.
 12484     ]].
 12492     ]].
 12485 ! !
 12493 ! !
 12486 
 12494 
 12540 ! !
 12548 ! !
 12541 
 12549 
 12542 !XWorkstation class methodsFor:'documentation'!
 12550 !XWorkstation class methodsFor:'documentation'!
 12543 
 12551 
 12544 version_CVS
 12552 version_CVS
 12545     ^ '$Header: /cvs/stx/stx/libview/XWorkstation.st,v 1.545 2012-10-08 07:43:32 stefan Exp $'
 12553     ^ '$Header: /cvs/stx/stx/libview/XWorkstation.st,v 1.546 2012-10-22 17:20:54 stefan Exp $'
 12546 !
 12554 !
 12547 
 12555 
 12548 version_SVN
 12556 version_SVN
 12549     ^ '§ Id §'
 12557     ^ '§ Id §'
 12550 ! !
 12558 ! !