| 1 | // Copyright (c) 2013-2014 Conformal Systems <[email protected]> |
| 2 | // |
| 3 | // This file originated from: http://opensource.conformal.com/ |
| 4 | // |
| 5 | // Permission to use, copy, modify, and distribute this software for any |
| 6 | // purpose with or without fee is hereby granted, provided that the above |
| 7 | // copyright notice and this permission notice appear in all copies. |
| 8 | // |
| 9 | // THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES |
| 10 | // WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF |
| 11 | // MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR |
| 12 | // ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES |
| 13 | // WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN |
| 14 | // ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF |
| 15 | // OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. |
| 16 | |
| 17 | // This file includes wrappers for symbols deprecated beginning with GTK 3.10, |
| 18 | // and should only be included in a build targeted intended to target GTK |
| 19 | // 3.8 or earlier. To target an earlier build build, use the build tag |
| 20 | // gtk_MAJOR_MINOR. For example, to target GTK 3.8, run |
| 21 | // 'go build -tags gtk_3_8'. |
| 22 | // +build gtk_3_6 gtk_3_8 gtk_deprecated |
| 23 | |
| 24 | package gdk |
| 25 | |
| 26 | // #include <gdk/gdk.h> |
| 27 | import "C" |
| 28 | |
| 29 | // GetNScreens is a wrapper around gdk_display_get_n_screens(). |
| 30 | func (v *Display) GetNScreens() int { |
| 31 | c := C.gdk_display_get_n_screens(v.native()) |
| 32 | return int(c) |
| 33 | } |