diff options
author | Dan Gudmundsson <[email protected]> | 2016-03-30 09:48:30 +0200 |
---|---|---|
committer | Dan Gudmundsson <[email protected]> | 2016-04-22 09:17:40 +0200 |
commit | a3a5bcab69695b7bfe8a77f4c1b245a1b58fb5fb (patch) | |
tree | 803fc2446613b3f32dbcd81ce4b65b42564fb685 /lib/wx/src/wx.erl | |
parent | e0a67398ad3d034e1afe59585a5f82af6981c1eb (diff) | |
download | otp-a3a5bcab69695b7bfe8a77f4c1b245a1b58fb5fb.tar.gz otp-a3a5bcab69695b7bfe8a77f4c1b245a1b58fb5fb.tar.bz2 otp-a3a5bcab69695b7bfe8a77f4c1b245a1b58fb5fb.zip |
wx: add object set/check funcions
Needed functionality, to avoid abusing opauqe objects.
Diffstat (limited to 'lib/wx/src/wx.erl')
-rw-r--r-- | lib/wx/src/wx.erl | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/wx/src/wx.erl b/lib/wx/src/wx.erl index a1a9344316..6498b58cda 100644 --- a/lib/wx/src/wx.erl +++ b/lib/wx/src/wx.erl @@ -66,7 +66,7 @@ get_env/0,set_env/1, debug/1, batch/1,foreach/2,map/2,foldl/3,foldr/3, getObjectType/1, typeCast/2, - null/0, is_null/1]). + null/0, is_null/1, equal/2]). -export([create_memory/1, get_memory_bin/1, retain_memory/1, release_memory/1]). @@ -153,6 +153,10 @@ null() -> -spec is_null(wx_object()) -> boolean(). is_null(#wx_ref{ref=NULL}) -> NULL =:= 0. +%% @doc Returns true if both arguments references the same object, false otherwise +-spec equal(wx_object(), wx_object()) -> boolean(). +equal(#wx_ref{ref=Ref1}, #wx_ref{ref=Ref2}) -> Ref1 =:= Ref2. + %% @doc Returns the object type -spec getObjectType(wx_object()) -> atom(). getObjectType(#wx_ref{type=Type}) -> |