From 88d995112219ca3339be12776757ef564cb04f8d Mon Sep 17 00:00:00 2001 From: Dan Gudmundsson Date: Thu, 10 Nov 2011 12:30:25 +0100 Subject: [wx] Add wxSystemOptions Needed on mac --- lib/wx/src/gen/wxSystemOptions.erl | 87 ++++++++++++++++++++++++++++++++++++++ lib/wx/src/gen/wxe_debug.hrl | 46 +++++++++++--------- lib/wx/src/gen/wxe_funcs.hrl | 46 +++++++++++--------- 3 files changed, 139 insertions(+), 40 deletions(-) create mode 100644 lib/wx/src/gen/wxSystemOptions.erl (limited to 'lib/wx/src/gen') diff --git a/lib/wx/src/gen/wxSystemOptions.erl b/lib/wx/src/gen/wxSystemOptions.erl new file mode 100644 index 0000000000..d5e504632b --- /dev/null +++ b/lib/wx/src/gen/wxSystemOptions.erl @@ -0,0 +1,87 @@ +%% +%% %CopyrightBegin% +%% +%% Copyright Ericsson AB 2008-2011. All Rights Reserved. +%% +%% The contents of this file are subject to the Erlang Public License, +%% Version 1.1, (the "License"); you may not use this file except in +%% compliance with the License. You should have received a copy of the +%% Erlang Public License along with this software. If not, it can be +%% retrieved online at http://www.erlang.org/. +%% +%% Software distributed under the License is distributed on an "AS IS" +%% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See +%% the License for the specific language governing rights and limitations +%% under the License. +%% +%% %CopyrightEnd% +%% This file is generated DO NOT EDIT + +%% @doc See external documentation: wxSystemOptions. +%% @type wxSystemOptions(). 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(wxSystemOptions). +-include("wxe.hrl"). +-export([getOption/1,getOptionInt/1,hasOption/1,isFalse/1,setOption/2]). + +%% inherited exports +-export([parent_class/1]). + +%% @hidden +parent_class(_Class) -> erlang:error({badtype, ?MODULE}). + +%% @spec (Name::string()) -> string() +%% @doc See external documentation. +getOption(Name) + when is_list(Name) -> + Name_UC = unicode:characters_to_binary([Name,0]), + wxe_util:call(?wxSystemOptions_GetOption, + <<(byte_size(Name_UC)):32/?UI,(Name_UC)/binary, 0:(((8- ((4+byte_size(Name_UC)) band 16#7)) band 16#7))/unit:8>>). + +%% @spec (Name::string()) -> integer() +%% @doc See external documentation. +getOptionInt(Name) + when is_list(Name) -> + Name_UC = unicode:characters_to_binary([Name,0]), + wxe_util:call(?wxSystemOptions_GetOptionInt, + <<(byte_size(Name_UC)):32/?UI,(Name_UC)/binary, 0:(((8- ((4+byte_size(Name_UC)) band 16#7)) band 16#7))/unit:8>>). + +%% @spec (Name::string()) -> bool() +%% @doc See external documentation. +hasOption(Name) + when is_list(Name) -> + Name_UC = unicode:characters_to_binary([Name,0]), + wxe_util:call(?wxSystemOptions_HasOption, + <<(byte_size(Name_UC)):32/?UI,(Name_UC)/binary, 0:(((8- ((4+byte_size(Name_UC)) band 16#7)) band 16#7))/unit:8>>). + +%% @spec (Name::string()) -> bool() +%% @doc See external documentation. +isFalse(Name) + when is_list(Name) -> + Name_UC = unicode:characters_to_binary([Name,0]), + wxe_util:call(?wxSystemOptions_IsFalse, + <<(byte_size(Name_UC)):32/?UI,(Name_UC)/binary, 0:(((8- ((4+byte_size(Name_UC)) band 16#7)) band 16#7))/unit:8>>). + +%% @spec (Name::string(),X::integer()|string()) -> ok +%% @doc See external documentation. +%%
Alternatives: +%%

+%% setOption(Name::string(), Value::integer()) -> ok +%%

+%%

+%% setOption(Name::string(), Value::string()) -> ok +%%

+setOption(Name,Value) + when is_list(Name),is_integer(Value) -> + Name_UC = unicode:characters_to_binary([Name,0]), + wxe_util:cast(?wxSystemOptions_SetOption_2_0, + <<(byte_size(Name_UC)):32/?UI,(Name_UC)/binary, 0:(((8- ((4+byte_size(Name_UC)) band 16#7)) band 16#7))/unit:8,Value:32/?UI>>); +setOption(Name,Value) + when is_list(Name),is_list(Value) -> + Name_UC = unicode:characters_to_binary([Name,0]), + Value_UC = unicode:characters_to_binary([Value,0]), + wxe_util:cast(?wxSystemOptions_SetOption_2_1, + <<(byte_size(Name_UC)):32/?UI,(Name_UC)/binary, 0:(((8- ((4+byte_size(Name_UC)) band 16#7)) band 16#7))/unit:8,(byte_size(Value_UC)):32/?UI,(Value_UC)/binary, 0:(((8- ((4+byte_size(Value_UC)) band 16#7)) band 16#7))/unit:8>>). + diff --git a/lib/wx/src/gen/wxe_debug.hrl b/lib/wx/src/gen/wxe_debug.hrl index 960f67a1f6..4224c54200 100644 --- a/lib/wx/src/gen/wxe_debug.hrl +++ b/lib/wx/src/gen/wxe_debug.hrl @@ -3273,26 +3273,32 @@ wxdebug_table() -> {3489, {wxSystemSettings, getFont, 1}}, {3490, {wxSystemSettings, getMetric, 2}}, {3491, {wxSystemSettings, getScreenType, 0}}, - {3492, {wxAuiNotebookEvent, setSelection, 1}}, - {3493, {wxAuiNotebookEvent, getSelection, 0}}, - {3494, {wxAuiNotebookEvent, setOldSelection, 1}}, - {3495, {wxAuiNotebookEvent, getOldSelection, 0}}, - {3496, {wxAuiNotebookEvent, setDragSource, 1}}, - {3497, {wxAuiNotebookEvent, getDragSource, 0}}, - {3498, {wxAuiManagerEvent, setManager, 1}}, - {3499, {wxAuiManagerEvent, getManager, 0}}, - {3500, {wxAuiManagerEvent, setPane, 1}}, - {3501, {wxAuiManagerEvent, getPane, 0}}, - {3502, {wxAuiManagerEvent, setButton, 1}}, - {3503, {wxAuiManagerEvent, getButton, 0}}, - {3504, {wxAuiManagerEvent, setDC, 1}}, - {3505, {wxAuiManagerEvent, getDC, 0}}, - {3506, {wxAuiManagerEvent, veto, 1}}, - {3507, {wxAuiManagerEvent, getVeto, 0}}, - {3508, {wxAuiManagerEvent, setCanVeto, 1}}, - {3509, {wxAuiManagerEvent, canVeto, 0}}, - {3510, {wxLogNull, new, 0}}, - {3511, {wxLogNull, 'Destroy', undefined}}, + {3492, {wxSystemOptions, getOption, 1}}, + {3493, {wxSystemOptions, getOptionInt, 1}}, + {3494, {wxSystemOptions, hasOption, 1}}, + {3495, {wxSystemOptions, isFalse, 1}}, + {3496, {wxSystemOptions, setOption_2_1, 2}}, + {3497, {wxSystemOptions, setOption_2_0, 2}}, + {3498, {wxAuiNotebookEvent, setSelection, 1}}, + {3499, {wxAuiNotebookEvent, getSelection, 0}}, + {3500, {wxAuiNotebookEvent, setOldSelection, 1}}, + {3501, {wxAuiNotebookEvent, getOldSelection, 0}}, + {3502, {wxAuiNotebookEvent, setDragSource, 1}}, + {3503, {wxAuiNotebookEvent, getDragSource, 0}}, + {3504, {wxAuiManagerEvent, setManager, 1}}, + {3505, {wxAuiManagerEvent, getManager, 0}}, + {3506, {wxAuiManagerEvent, setPane, 1}}, + {3507, {wxAuiManagerEvent, getPane, 0}}, + {3508, {wxAuiManagerEvent, setButton, 1}}, + {3509, {wxAuiManagerEvent, getButton, 0}}, + {3510, {wxAuiManagerEvent, setDC, 1}}, + {3511, {wxAuiManagerEvent, getDC, 0}}, + {3512, {wxAuiManagerEvent, veto, 1}}, + {3513, {wxAuiManagerEvent, getVeto, 0}}, + {3514, {wxAuiManagerEvent, setCanVeto, 1}}, + {3515, {wxAuiManagerEvent, canVeto, 0}}, + {3516, {wxLogNull, new, 0}}, + {3517, {wxLogNull, 'Destroy', undefined}}, {-1, {mod, func, -1}} ]. diff --git a/lib/wx/src/gen/wxe_funcs.hrl b/lib/wx/src/gen/wxe_funcs.hrl index af74caaa25..55cbee5572 100644 --- a/lib/wx/src/gen/wxe_funcs.hrl +++ b/lib/wx/src/gen/wxe_funcs.hrl @@ -3270,23 +3270,29 @@ -define(wxSystemSettings_GetFont, 3489). -define(wxSystemSettings_GetMetric, 3490). -define(wxSystemSettings_GetScreenType, 3491). --define(wxAuiNotebookEvent_SetSelection, 3492). --define(wxAuiNotebookEvent_GetSelection, 3493). --define(wxAuiNotebookEvent_SetOldSelection, 3494). --define(wxAuiNotebookEvent_GetOldSelection, 3495). --define(wxAuiNotebookEvent_SetDragSource, 3496). --define(wxAuiNotebookEvent_GetDragSource, 3497). --define(wxAuiManagerEvent_SetManager, 3498). --define(wxAuiManagerEvent_GetManager, 3499). --define(wxAuiManagerEvent_SetPane, 3500). --define(wxAuiManagerEvent_GetPane, 3501). --define(wxAuiManagerEvent_SetButton, 3502). --define(wxAuiManagerEvent_GetButton, 3503). --define(wxAuiManagerEvent_SetDC, 3504). --define(wxAuiManagerEvent_GetDC, 3505). --define(wxAuiManagerEvent_Veto, 3506). --define(wxAuiManagerEvent_GetVeto, 3507). --define(wxAuiManagerEvent_SetCanVeto, 3508). --define(wxAuiManagerEvent_CanVeto, 3509). --define(wxLogNull_new, 3510). --define(wxLogNull_destroy, 3511). +-define(wxSystemOptions_GetOption, 3492). +-define(wxSystemOptions_GetOptionInt, 3493). +-define(wxSystemOptions_HasOption, 3494). +-define(wxSystemOptions_IsFalse, 3495). +-define(wxSystemOptions_SetOption_2_1, 3496). +-define(wxSystemOptions_SetOption_2_0, 3497). +-define(wxAuiNotebookEvent_SetSelection, 3498). +-define(wxAuiNotebookEvent_GetSelection, 3499). +-define(wxAuiNotebookEvent_SetOldSelection, 3500). +-define(wxAuiNotebookEvent_GetOldSelection, 3501). +-define(wxAuiNotebookEvent_SetDragSource, 3502). +-define(wxAuiNotebookEvent_GetDragSource, 3503). +-define(wxAuiManagerEvent_SetManager, 3504). +-define(wxAuiManagerEvent_GetManager, 3505). +-define(wxAuiManagerEvent_SetPane, 3506). +-define(wxAuiManagerEvent_GetPane, 3507). +-define(wxAuiManagerEvent_SetButton, 3508). +-define(wxAuiManagerEvent_GetButton, 3509). +-define(wxAuiManagerEvent_SetDC, 3510). +-define(wxAuiManagerEvent_GetDC, 3511). +-define(wxAuiManagerEvent_Veto, 3512). +-define(wxAuiManagerEvent_GetVeto, 3513). +-define(wxAuiManagerEvent_SetCanVeto, 3514). +-define(wxAuiManagerEvent_CanVeto, 3515). +-define(wxLogNull_new, 3516). +-define(wxLogNull_destroy, 3517). -- cgit v1.2.3