WinWorkstation.st
branchjv
changeset 8073 fd95fdcb8533
parent 8016 653376a94c8f
child 8077 08cff8ab7e0a
equal deleted inserted replaced
8016:653376a94c8f 8073:fd95fdcb8533
    17 	instanceVariableNames:'blackpixel whitepixel listOfFonts rootWin rootDC buttonsPressed
    17 	instanceVariableNames:'blackpixel whitepixel listOfFonts rootWin rootDC buttonsPressed
    18 		eventTrace eventBuffer lastClipboardSequenceNumber'
    18 		eventTrace eventBuffer lastClipboardSequenceNumber'
    19 	classVariableNames:'BeepDuration NativeDialogs NativeFileDialogs NativeWidgets
    19 	classVariableNames:'BeepDuration NativeDialogs NativeFileDialogs NativeWidgets
    20 		NativeWidgetClassTable StandardColorValues IgnoreSysColorChanges
    20 		NativeWidgetClassTable StandardColorValues IgnoreSysColorChanges
    21 		IgnoreFontChanges SystemColorValues CanEndSession
    21 		IgnoreFontChanges SystemColorValues CanEndSession
    22 		VerboseNativeDialogs '
    22 		VerboseNativeDialogs'
    23 	poolDictionaries:''
    23 	poolDictionaries:''
    24 	category:'Interface-Graphics'
    24 	category:'Interface-Graphics'
    25 !
    25 !
    26 
    26 
    27 Object subclass:#AlphaBlendParameters
    27 Object subclass:#AlphaBlendParameters
  6493 
  6493 
  6494     'GetGuiResources(): # User Objects    = ' errorPrint. counts first errorPrintCR.
  6494     'GetGuiResources(): # User Objects    = ' errorPrint. counts first errorPrintCR.
  6495     '                   Peak User Objects = ' errorPrint. counts second errorPrintCR.
  6495     '                   Peak User Objects = ' errorPrint. counts second errorPrintCR.
  6496     '                   # GDI Objects     = ' errorPrint. counts third errorPrintCR.
  6496     '                   # GDI Objects     = ' errorPrint. counts third errorPrintCR.
  6497     '                   Peak GDI Objects  = ' errorPrint. counts fourth errorPrintCR.
  6497     '                   Peak GDI Objects  = ' errorPrint. counts fourth errorPrintCR.
  6498 !   
  6498 !
  6499 
  6499 
  6500 printHandleCounts
  6500 printHandleCounts
  6501    "show prim values"
  6501    "show prim values"
  6502 
  6502 
  6503     'WINWORKSTATION: # Windows = ' errorPrint. self windowHandleCounts errorPrintCR.
  6503     'WINWORKSTATION: # Windows = ' errorPrint. self windowHandleCounts errorPrintCR.
  8088     ^ windowId
  8088     ^ windowId
  8089 
  8089 
  8090     "Modified: / 28-01-2012 / 10:20:30 / cg"
  8090     "Modified: / 28-01-2012 / 10:20:30 / cg"
  8091 !
  8091 !
  8092 
  8092 
  8093 destroyGC:aGCId
       
  8094 %{
       
  8095     if (__isExternalAddress(aGCId)) {
       
  8096 	struct gcData *gcData = _GCDATA(aGCId);
       
  8097 
       
  8098 	if (gcData == NULL) {
       
  8099 	    console_fprintf(stderr, "WinWorkstation [warning]: trying to destroy GC twice\n");
       
  8100 	    RETURN(self);
       
  8101 	}
       
  8102 
       
  8103 #ifdef COUNT_RESOURCES
       
  8104 	 __cnt_gcData--;
       
  8105 	RESPRINTF(("DestroyGcData %d\n",__cnt_gcData));
       
  8106 #endif
       
  8107 
       
  8108 #ifdef CACHE_LAST_DC
       
  8109 	if (lastGcData == gcData) {
       
  8110 	    _releaseDC(gcData);
       
  8111 	}
       
  8112 #endif
       
  8113 	__ExternalAddressInstPtr(aGCId)->e_address = NULL;
       
  8114 
       
  8115 	freeGcData(gcData);
       
  8116     }
       
  8117 %}
       
  8118 !
       
  8119 
       
  8120 destroyPixmap:aDrawableId
       
  8121 
       
  8122 %{  /* NOCONTEXT */
       
  8123     if (__isExternalAddress(aDrawableId) && ISCONNECTED) {
       
  8124 	HANDLE bitmapHandle = _HANDLEVal(aDrawableId);
       
  8125 
       
  8126 	if (bitmapHandle) {
       
  8127 #ifdef COUNT_BMP_RESOURCES
       
  8128 	    __cnt_bitmap--;
       
  8129 	    RES_BMP_PRINTF(("DestroyPixmap %x %d\n", bitmapHandle, __cnt_bitmap));
       
  8130 #endif
       
  8131 	    _DeleteObject(bitmapHandle, __LINE__);
       
  8132 	}
       
  8133     }
       
  8134 %}
       
  8135 !
       
  8136 
       
  8137 destroyView:aView withId:aWindowId
       
  8138     self primDestroyView:aView withId:aWindowId.
       
  8139     self removeKnownView:aView withId:aWindowId
       
  8140 !
       
  8141 
       
  8142 dcGetClipBoxForGC: gcId
  8093 dcGetClipBoxForGC: gcId
  8143 	"Return clipping box for given device context (as  #(left top right bottom) ). "
  8094 	"Return clipping box for given device context (as  #(left top right bottom) ). "
  8144 
  8095 
  8145 	| error |
  8096 	| error |
  8146 %{
  8097 %{
  8199     }
  8150     }
  8200     error = @symbol(BadArg1);
  8151     error = @symbol(BadArg1);
  8201     err:;
  8152     err:;
  8202 %}.
  8153 %}.
  8203     ^ self primitiveFailed: error
  8154     ^ self primitiveFailed: error
  8204 !     
  8155 !
  8205 
  8156 
  8206 dcUnlockForGC:gcId
  8157 dcUnlockForGC:gcId
  8207     "Unlocks and __destroy__ a device context for given GC previously
  8158     "Unlocks and __destroy__ a device context for given GC previously
  8208      locked by #dcLockForGC:. If the GC was not locked,
  8159      locked by #dcLockForGC:. If the GC was not locked,
  8209      calling this method is no-op."
  8160      calling this method is no-op."
  8222     }
  8173     }
  8223     error = @symbol(BadArg1);
  8174     error = @symbol(BadArg1);
  8224     err:;
  8175     err:;
  8225 %}.
  8176 %}.
  8226     ^ self primitiveFailed: error
  8177     ^ self primitiveFailed: error
  8227 !     
  8178 !
       
  8179 
       
  8180 destroyGC:aGCId
       
  8181 %{
       
  8182     if (__isExternalAddress(aGCId)) {
       
  8183 	struct gcData *gcData = _GCDATA(aGCId);
       
  8184 
       
  8185 	if (gcData == NULL) {
       
  8186 	    console_fprintf(stderr, "WinWorkstation [warning]: trying to destroy GC twice\n");
       
  8187 	    RETURN(self);
       
  8188 	}
       
  8189 
       
  8190 #ifdef COUNT_RESOURCES
       
  8191 	 __cnt_gcData--;
       
  8192 	RESPRINTF(("DestroyGcData %d\n",__cnt_gcData));
       
  8193 #endif
       
  8194 
       
  8195 #ifdef CACHE_LAST_DC
       
  8196 	if (lastGcData == gcData) {
       
  8197 	    _releaseDC(gcData);
       
  8198 	}
       
  8199 #endif
       
  8200 	__ExternalAddressInstPtr(aGCId)->e_address = NULL;
       
  8201 
       
  8202 	freeGcData(gcData);
       
  8203     }
       
  8204 %}
       
  8205 !
       
  8206 
       
  8207 destroyPixmap:aDrawableId
       
  8208 
       
  8209 %{  /* NOCONTEXT */
       
  8210     if (__isExternalAddress(aDrawableId) && ISCONNECTED) {
       
  8211 	HANDLE bitmapHandle = _HANDLEVal(aDrawableId);
       
  8212 
       
  8213 	if (bitmapHandle) {
       
  8214 #ifdef COUNT_BMP_RESOURCES
       
  8215 	    __cnt_bitmap--;
       
  8216 	    RES_BMP_PRINTF(("DestroyPixmap %x %d\n", bitmapHandle, __cnt_bitmap));
       
  8217 #endif
       
  8218 	    _DeleteObject(bitmapHandle, __LINE__);
       
  8219 	}
       
  8220     }
       
  8221 %}
       
  8222 !
       
  8223 
       
  8224 destroyView:aView withId:aWindowId
       
  8225     self primDestroyView:aView withId:aWindowId.
       
  8226     self removeKnownView:aView withId:aWindowId
       
  8227 !
  8228 
  8228 
  8229 gcFor:aDrawableId
  8229 gcFor:aDrawableId
  8230 
  8230 
  8231 %{  /* NOCONTEXT */
  8231 %{  /* NOCONTEXT */
  8232     HWND hWnd;
  8232     HWND hWnd;
 13169      or a numeric keysym code. If state is nil, the modifier bits (shift & control)
 13169      or a numeric keysym code. If state is nil, the modifier bits (shift & control)
 13170      are computed from the keyboardMap - if non-nil, these are passed as modifierbits.
 13170      are computed from the keyboardMap - if non-nil, these are passed as modifierbits.
 13171      The non-nil case is the lowlevel entry, where state must include any shift/ctrl information
 13171      The non-nil case is the lowlevel entry, where state must include any shift/ctrl information
 13172      (not very user friendly)"
 13172      (not very user friendly)"
 13173 
 13173 
 13174     'WinWorkstation [warning]: sendKeyOrButtonEvent unimplemented' infoPrintCR.
 13174     super sendKeyOrButtonEvent:typeSymbol x:xPos y:yPos keyOrButton:keySymCodeOrButtonNr state:stateMask toViewId:targetId
 13175     ^ false
 13175 
       
 13176     "Modified: / 06-05-2017 / 11:19:03 / jv"
 13176 ! !
 13177 ! !
 13177 
 13178 
 13178 !WinWorkstation methodsFor:'font stuff'!
 13179 !WinWorkstation methodsFor:'font stuff'!
 13179 
 13180 
 13180 createFontFor:aFontName
 13181 createFontFor:aFontName
 19610     ^ '$Header$'
 19611     ^ '$Header$'
 19611 !
 19612 !
 19612 
 19613 
 19613 version_CVS
 19614 version_CVS
 19614     ^ '$Header$'
 19615     ^ '$Header$'
       
 19616 !
       
 19617 
       
 19618 version_HG
       
 19619 
       
 19620     ^ '$Changeset: <not expanded> $'
 19615 ! !
 19621 ! !
 19616 
 19622 
 19617 
 19623 
 19618 WinWorkstation initialize!
 19624 WinWorkstation initialize!