3253cf2ced
* NEW: Update with the new gb.desktop.x11 syntax. [GB.DESKTOP.X11] * NEW: X11.SetProperty and X11.GetProperty window argument is now first, and is not optional anymore. You have to specify X11.RootWindow explicitely. * NEW: The global X11 event handler 'Desktop_Change' is now named 'X11_PropertyNotify'. * NEW: The global X11 event handler 'Desktop_Window' is now named 'X11_ConfigureNotify'. [GB.QT4] * NEW: The Frame container now has all arrangement properties. [GB.GTK] * NEW: The Frame container now has all arrangement properties. git-svn-id: svn://localhost/gambas/trunk@6269 867c0c6c-44f3-4631-809d-bfa615b0a4ec
99 lines
1.6 KiB
Plaintext
99 lines
1.6 KiB
Plaintext
' Gambas class file
|
|
|
|
Export
|
|
|
|
Property Read X As Integer
|
|
Property Read Y As Integer
|
|
Property Read Width As Integer
|
|
Property Read Height As Integer
|
|
Property Read Index As Integer
|
|
Property Name As String
|
|
|
|
Private $aGeom As Integer[]
|
|
Private $iIndex As Integer
|
|
Private $sName As String
|
|
|
|
Public Sub Refresh()
|
|
|
|
Dim aDim As Integer[]
|
|
Dim aName As String[]
|
|
Dim iInd As Integer
|
|
|
|
aDim = X11.GetWindowProperty(X11.RootWindow, Atom["_NET_WORKAREA"])
|
|
iInd = $iIndex * 4
|
|
Try $aGeom = [aDim[iInd], aDim[iInd + 1], aDim[iInd + 2], aDim[iInd + 3]]
|
|
|
|
aName = X11.GetWindowProperty(X11.RootWindow, Atom["_NET_DESKTOP_NAMES"])
|
|
Try $sName = aName[$iIndex]
|
|
|
|
End
|
|
|
|
|
|
Public Sub _new(iIndex As Integer)
|
|
|
|
$iIndex = iIndex
|
|
Refresh
|
|
|
|
End
|
|
|
|
|
|
' Private Function Width_Read() As Integer
|
|
'
|
|
' Return $iWidth
|
|
'
|
|
' End
|
|
'
|
|
' Private Function Height_Read() As Integer
|
|
'
|
|
' Return $iHeight
|
|
'
|
|
' End
|
|
|
|
Private Function Index_Read() As Integer
|
|
|
|
Return $iIndex
|
|
|
|
End
|
|
|
|
Private Function Name_Read() As String
|
|
|
|
Return $sName
|
|
|
|
End
|
|
|
|
Private Sub Name_Write(Value As String)
|
|
|
|
Dim aName As String[]
|
|
|
|
$sName = Value
|
|
|
|
aName = X11.GetWindowProperty(X11.RootWindow, Atom["_NET_DESKTOP_NAMES"])
|
|
Try aName[$iIndex] = $sName
|
|
X11.SetWindowProperty(X11.RootWindow, Atom["_NET_DESKTOP_NAMES"], Atom["UTF8_STRING"], aName)
|
|
|
|
End
|
|
|
|
Private Function X_Read() As Integer
|
|
|
|
Try Return $aGeom[0]
|
|
|
|
End
|
|
|
|
Private Function Y_Read() As Integer
|
|
|
|
Try Return $aGeom[1]
|
|
|
|
End
|
|
|
|
Private Function Width_Read() As Integer
|
|
|
|
Try Return $aGeom[2]
|
|
|
|
End
|
|
|
|
Private Function Height_Read() As Integer
|
|
|
|
Try Return $aGeom[3]
|
|
|
|
End
|