summaryrefslogtreecommitdiff
path: root/lib/wx/src/gen/wxColourData.erl
diff options
context:
space:
mode:
authorDan Gudmundsson <dgud@Dan.localdomain>2020-08-26 10:16:52 +0200
committerDan Gudmundsson <dgud@erlang.org>2020-12-21 11:51:41 +0100
commit2d41154f6b2cd7413c97af69a45862b472625d5f (patch)
tree5564d4c151d5ad1280d2a0d97c14bdb9551ade7a /lib/wx/src/gen/wxColourData.erl
parent31c707f5e8345a0dfb9fa677c76177e8308fcf60 (diff)
downloaderlang-2d41154f6b2cd7413c97af69a45862b472625d5f.tar.gz
Rewrite wx, use wxWidgets 3 as base and use nif interface
Complete overhaul of wx. Use nif interface instead of erlang driver interface. Use wxWidgets interface files as base for doxygen and code generation. This upgrades the base to 3.1.4. Change the interface files so we can generate code that is backward as compatible as possible. Compatibility with the old 2.8 API Reduce incompatibility with the old API as much as possible. Changes to the old API include: wxNotebookEvent have been replaced by the wxBookctrlEvent (NOTE) wxWindowDC default creators have been removed wxClientDC default creators have been removed wxPaintDC default creators have been removed wxWindow:setVirtualSizeHints(..) have been deprecated wxWindow:makeModal(..) have been deprecated wxWindow:makeModal(..) have been deprecated wxToolBar add/insertTool without label have been deprecated wxStyledTextCtrl some functions have changed args from boolean to int wxSizerItem:new() Some args have become options Removed depr wxSizerItem:setWindow() use assignWindow Removed depr wxSizerItem:setSpacer() use assignSpacer Removed depr wxSizerItem:setSpacer() use assignSpacer Removed depr wxSizerItem:setSizer() use assignSizer wxMenu append/insert/prepend have changed return value and lost IsCheckable argument wxListCtrl:setItem/4 changed return value wxListCtrl:setItem/4 changed return value wxImage::convertToGreyscale opts incompatible wxGridSizer::wxGridSizer opts incompatible wxGrid API have many changes wxGraphicsRenderer:create*GradientBrush(..) uses GradientStops now wxGraphicsRenderer:createPen(..) have been removed wxGraphicsRenderer:create*GradientBrush(..) uses GradientStops now wxGLCanvas API is incompatible wxFlexGridSizer::wxFlexGridSizer opts incompatible wxDisplay::wxDisplay opts incompatible wxCalendarDateAttr:new(ColText [,OptList]) have been removed wxBitmapButton:[g|s]etBitmapSelected have been removed
Diffstat (limited to 'lib/wx/src/gen/wxColourData.erl')
-rw-r--r--lib/wx/src/gen/wxColourData.erl53
1 files changed, 21 insertions, 32 deletions
diff --git a/lib/wx/src/gen/wxColourData.erl b/lib/wx/src/gen/wxColourData.erl
index 92586688f6..02c2f68c64 100644
--- a/lib/wx/src/gen/wxColourData.erl
+++ b/lib/wx/src/gen/wxColourData.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2008-2016. All Rights Reserved.
+%% Copyright Ericsson AB 2008-2020. 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.
@@ -25,8 +25,8 @@
-module(wxColourData).
-include("wxe.hrl").
--export([destroy/1,getChooseFull/1,getColour/1,getCustomColour/2,new/0,new/1,
- setChooseFull/2,setColour/2,setCustomColour/3]).
+-export([destroy/1,getChooseFull/1,getColour/1,getCustomColour/2,new/0,setChooseFull/2,
+ setColour/2,setCustomColour/3]).
%% inherited exports
-export([parent_class/1]).
@@ -39,72 +39,61 @@ parent_class(_Class) -> erlang:error({badtype, ?MODULE}).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxcolourdata.html#wxcolourdatawxcolourdata">external documentation</a>.
-spec new() -> wxColourData().
new() ->
- wxe_util:construct(?wxColourData_new_0,
- <<>>).
-
-%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxcolourdata.html#wxcolourdatawxcolourdata">external documentation</a>.
--spec new(Data) -> wxColourData() when
- Data::wxColourData().
-new(#wx_ref{type=DataT,ref=DataRef}) ->
- ?CLASS(DataT,wxColourData),
- wxe_util:construct(?wxColourData_new_1,
- <<DataRef:32/?UI>>).
+ wxe_util:queue_cmd(?get_env(), ?wxColourData_new),
+ wxe_util:rec(?wxColourData_new).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxcolourdata.html#wxcolourdatagetchoosefull">external documentation</a>.
-spec getChooseFull(This) -> boolean() when
This::wxColourData().
-getChooseFull(#wx_ref{type=ThisT,ref=ThisRef}) ->
+getChooseFull(#wx_ref{type=ThisT}=This) ->
?CLASS(ThisT,wxColourData),
- wxe_util:call(?wxColourData_GetChooseFull,
- <<ThisRef:32/?UI>>).
+ wxe_util:queue_cmd(This,?get_env(),?wxColourData_GetChooseFull),
+ wxe_util:rec(?wxColourData_GetChooseFull).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxcolourdata.html#wxcolourdatagetcolour">external documentation</a>.
-spec getColour(This) -> wx:wx_colour4() when
This::wxColourData().
-getColour(#wx_ref{type=ThisT,ref=ThisRef}) ->
+getColour(#wx_ref{type=ThisT}=This) ->
?CLASS(ThisT,wxColourData),
- wxe_util:call(?wxColourData_GetColour,
- <<ThisRef:32/?UI>>).
+ wxe_util:queue_cmd(This,?get_env(),?wxColourData_GetColour),
+ wxe_util:rec(?wxColourData_GetColour).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxcolourdata.html#wxcolourdatagetcustomcolour">external documentation</a>.
-spec getCustomColour(This, I) -> wx:wx_colour4() when
This::wxColourData(), I::integer().
-getCustomColour(#wx_ref{type=ThisT,ref=ThisRef},I)
+getCustomColour(#wx_ref{type=ThisT}=This,I)
when is_integer(I) ->
?CLASS(ThisT,wxColourData),
- wxe_util:call(?wxColourData_GetCustomColour,
- <<ThisRef:32/?UI,I:32/?UI>>).
+ wxe_util:queue_cmd(This,I,?get_env(),?wxColourData_GetCustomColour),
+ wxe_util:rec(?wxColourData_GetCustomColour).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxcolourdata.html#wxcolourdatasetchoosefull">external documentation</a>.
-spec setChooseFull(This, Flag) -> 'ok' when
This::wxColourData(), Flag::boolean().
-setChooseFull(#wx_ref{type=ThisT,ref=ThisRef},Flag)
+setChooseFull(#wx_ref{type=ThisT}=This,Flag)
when is_boolean(Flag) ->
?CLASS(ThisT,wxColourData),
- wxe_util:cast(?wxColourData_SetChooseFull,
- <<ThisRef:32/?UI,(wxe_util:from_bool(Flag)):32/?UI>>).
+ wxe_util:queue_cmd(This,Flag,?get_env(),?wxColourData_SetChooseFull).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxcolourdata.html#wxcolourdatasetcolour">external documentation</a>.
-spec setColour(This, Colour) -> 'ok' when
This::wxColourData(), Colour::wx:wx_colour().
-setColour(#wx_ref{type=ThisT,ref=ThisRef},Colour)
+setColour(#wx_ref{type=ThisT}=This,Colour)
when tuple_size(Colour) =:= 3; tuple_size(Colour) =:= 4 ->
?CLASS(ThisT,wxColourData),
- wxe_util:cast(?wxColourData_SetColour,
- <<ThisRef:32/?UI,(wxe_util:colour_bin(Colour)):16/binary>>).
+ wxe_util:queue_cmd(This,wxe_util:color(Colour),?get_env(),?wxColourData_SetColour).
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxcolourdata.html#wxcolourdatasetcustomcolour">external documentation</a>.
-spec setCustomColour(This, I, Colour) -> 'ok' when
This::wxColourData(), I::integer(), Colour::wx:wx_colour().
-setCustomColour(#wx_ref{type=ThisT,ref=ThisRef},I,Colour)
+setCustomColour(#wx_ref{type=ThisT}=This,I,Colour)
when is_integer(I),tuple_size(Colour) =:= 3; tuple_size(Colour) =:= 4 ->
?CLASS(ThisT,wxColourData),
- wxe_util:cast(?wxColourData_SetCustomColour,
- <<ThisRef:32/?UI,I:32/?UI,(wxe_util:colour_bin(Colour)):16/binary>>).
+ wxe_util:queue_cmd(This,I,wxe_util:color(Colour),?get_env(),?wxColourData_SetCustomColour).
%% @doc Destroys this object, do not use object again
-spec destroy(This::wxColourData()) -> 'ok'.
destroy(Obj=#wx_ref{type=Type}) ->
?CLASS(Type,wxColourData),
- wxe_util:destroy(?DESTROY_OBJECT,Obj),
+ wxe_util:queue_cmd(Obj, ?get_env(), ?DESTROY_OBJECT),
ok.