aboutsummaryrefslogtreecommitdiffstats
path: root/lib/wx/src/gen/wxDisplay.erl
blob: b6a2bf22ac0d167eb832ee831a97f663ffe0262d (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
%%
%% %CopyrightBegin%
%%
%% Copyright Ericsson AB 2008-2018. All Rights Reserved.
%%
%% Licensed under the Apache License, Version 2.0 (the "License");
%% you may not use this file except in compliance with the License.
%% You may obtain a copy of the License at
%%
%%     http://www.apache.org/licenses/LICENSE-2.0
%%
%% Unless required by applicable law or agreed to in writing, software
%% distributed under the License is distributed on an "AS IS" BASIS,
%% WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
%% See the License for the specific language governing permissions and
%% limitations under the License.
%%
%% %CopyrightEnd%
%% This file is generated DO NOT EDIT

%% @doc See external documentation: <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxdisplay.html">wxDisplay</a>.
%% @type wxDisplay().  An object reference, The representation is internal
%% and can be changed without notice. It can't be used for comparsion
%% stored on disc or distributed for use on other nodes.

-module(wxDisplay).
-include("wxe.hrl").
-export([destroy/1,getClientArea/1,getCount/0,getFromPoint/1,getFromWindow/1,
  getGeometry/1,getName/1,getPPI/1,isOk/1,isPrimary/1,new/0,new/1]).

%% inherited exports
-export([parent_class/1]).

-export_type([wxDisplay/0]).
%% @hidden
parent_class(_Class) -> erlang:error({badtype, ?MODULE}).

-type wxDisplay() :: wx:wx_object().
%% @equiv new([])
-spec new() -> wxDisplay().

new() ->
  new([]).

%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxdisplay.html#wxdisplaywxdisplay">external documentation</a>.
-spec new([Option]) -> wxDisplay() when
	Option :: {'n', integer()}.
new(Options)
 when is_list(Options) ->
  MOpts = fun({n, N}, Acc) -> [<<1:32/?UI,N:32/?UI>>|Acc];
          (BadOpt, _) -> erlang:error({badoption, BadOpt}) end,
  BinOpt = list_to_binary(lists:foldl(MOpts, [<<0:32>>], Options)),
  wxe_util:construct(?wxDisplay_new,
  <<BinOpt/binary>>).

%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxdisplay.html#wxdisplayisok">external documentation</a>.
-spec isOk(This) -> boolean() when
	This::wxDisplay().
isOk(#wx_ref{type=ThisT,ref=ThisRef}) ->
  ?CLASS(ThisT,wxDisplay),
  wxe_util:call(?wxDisplay_IsOk,
  <<ThisRef:32/?UI>>).

%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxdisplay.html#wxdisplaygetclientarea">external documentation</a>.
-spec getClientArea(This) -> {X::integer(), Y::integer(), W::integer(), H::integer()} when
	This::wxDisplay().
getClientArea(#wx_ref{type=ThisT,ref=ThisRef}) ->
  ?CLASS(ThisT,wxDisplay),
  wxe_util:call(?wxDisplay_GetClientArea,
  <<ThisRef:32/?UI>>).

%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxdisplay.html#wxdisplaygetgeometry">external documentation</a>.
-spec getGeometry(This) -> {X::integer(), Y::integer(), W::integer(), H::integer()} when
	This::wxDisplay().
getGeometry(#wx_ref{type=ThisT,ref=ThisRef}) ->
  ?CLASS(ThisT,wxDisplay),
  wxe_util:call(?wxDisplay_GetGeometry,
  <<ThisRef:32/?UI>>).

%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxdisplay.html#wxdisplaygetname">external documentation</a>.
-spec getName(This) -> unicode:charlist() when
	This::wxDisplay().
getName(#wx_ref{type=ThisT,ref=ThisRef}) ->
  ?CLASS(ThisT,wxDisplay),
  wxe_util:call(?wxDisplay_GetName,
  <<ThisRef:32/?UI>>).

%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxdisplay.html#wxdisplayisprimary">external documentation</a>.
-spec isPrimary(This) -> boolean() when
	This::wxDisplay().
isPrimary(#wx_ref{type=ThisT,ref=ThisRef}) ->
  ?CLASS(ThisT,wxDisplay),
  wxe_util:call(?wxDisplay_IsPrimary,
  <<ThisRef:32/?UI>>).

%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxdisplay.html#wxdisplaygetcount">external documentation</a>.
-spec getCount() -> integer().
getCount() ->
  wxe_util:call(?wxDisplay_GetCount,
  <<>>).

%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxdisplay.html#wxdisplaygetfrompoint">external documentation</a>.
-spec getFromPoint(Pt) -> integer() when
	Pt::{X::integer(), Y::integer()}.
getFromPoint({PtX,PtY})
 when is_integer(PtX),is_integer(PtY) ->
  wxe_util:call(?wxDisplay_GetFromPoint,
  <<PtX:32/?UI,PtY:32/?UI>>).

%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxdisplay.html#wxdisplaygetfromwindow">external documentation</a>.
-spec getFromWindow(Window) -> integer() when
	Window::wxWindow:wxWindow().
getFromWindow(#wx_ref{type=WindowT,ref=WindowRef}) ->
  ?CLASS(WindowT,wxWindow),
  wxe_util:call(?wxDisplay_GetFromWindow,
  <<WindowRef:32/?UI>>).

%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxdisplay.html#wxdisplaygetppi">external documentation</a>.
-spec getPPI(This) -> {W::integer(), H::integer()} when
	This::wxDisplay().
getPPI(#wx_ref{type=ThisT,ref=ThisRef}) ->
  ?CLASS(ThisT,wxDisplay),
  wxe_util:call(?wxDisplay_GetPPI,
  <<ThisRef:32/?UI>>).

%% @doc Destroys this object, do not use object again
-spec destroy(This::wxDisplay()) -> 'ok'.
destroy(Obj=#wx_ref{type=Type}) ->
  ?CLASS(Type,wxDisplay),
  wxe_util:destroy(?wxDisplay_destruct,Obj),
  ok.