|
@@ -9,6 +9,7 @@ import "C"
|
|
|
|
|
|
import "runtime"
|
|
|
import "unsafe"
|
|
|
+import "fmt"
|
|
|
|
|
|
|
|
|
|
|
@@ -352,6 +353,20 @@ func GetMonitorInfo(index int) *MonitorInfo {
|
|
|
return nil
|
|
|
}
|
|
|
|
|
|
+func (mi * MonitorInfo) String() string {
|
|
|
+ return fmt.Sprintf("%d %d %d %d", mi.X1(), mi.Y1(), mi.X2(), mi.Y2())
|
|
|
+}
|
|
|
+
|
|
|
+
|
|
|
+func GetAllMonitorInfo() []*MonitorInfo {
|
|
|
+ count := NumVideoAdapters();
|
|
|
+ info := make([]*MonitorInfo, count)
|
|
|
+ for i := 0 ; i < count; i ++ {
|
|
|
+ info[i] = GetMonitorInfo(i)
|
|
|
+ }
|
|
|
+ return info
|
|
|
+}
|
|
|
+
|
|
|
|
|
|
func NewDisplayAdapter() int {
|
|
|
return int(C.al_get_new_display_adapter())
|