├── tests ├── Info.plist ├── macros.rs └── test.rs ├── .gitmodules ├── src ├── lib.rs ├── _unsafe.rs.patch ├── gl.rs ├── media.rs ├── net.rs ├── odbc.rs ├── propertygrid.rs ├── xrc.rs ├── html.rs ├── _unavailable.rs ├── defs.rs └── cb.rs ├── INSTALL.linux.md ├── .travis.yml ├── wxc ├── wxc_glue_h.patch └── CMakeLists.txt ├── README.md ├── CMakeLists.txt └── LICENSE.txt /tests/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | NSHighResolutionCapable 6 | True 7 | 8 | 9 | -------------------------------------------------------------------------------- /.gitmodules: -------------------------------------------------------------------------------- 1 | [submodule "wxHaskell"] 2 | path = wxHaskell 3 | url = https://github.com/wxHaskell/wxHaskell.git 4 | [submodule "rust-bindgen"] 5 | path = rust-bindgen 6 | url = https://github.com/crabtw/rust-bindgen.git 7 | [submodule "RustCMake"] 8 | path = RustCMake 9 | url = https://github.com/SiegeLord/RustCMake.git 10 | -------------------------------------------------------------------------------- /src/lib.rs: -------------------------------------------------------------------------------- 1 | #![crate_name="wx"] 2 | #![crate_type="lib"] 3 | 4 | #![feature(libc)] 5 | 6 | #![allow(non_camel_case_types)] 7 | #![allow(non_snake_case)] 8 | 9 | extern crate libc; 10 | 11 | pub mod _unavailable; 12 | pub mod _unsafe; 13 | pub mod advanced; 14 | pub mod base; 15 | pub mod core; 16 | pub mod defs; 17 | pub mod gl; 18 | pub mod html; 19 | pub mod media; 20 | pub mod net; 21 | pub mod odbc; 22 | pub mod propertygrid; 23 | pub mod stc; 24 | pub mod xrc; 25 | -------------------------------------------------------------------------------- /INSTALL.linux.md: -------------------------------------------------------------------------------- 1 | # Installation instructions for linux. 2 | 3 | If your distribution is missing, please add it. 4 | 5 | ## arch 6 | 7 | ### Prerequisites 8 | 9 | You will need to install the following packages first: 10 | 11 | * wxgtk2.9 or later 12 | * webkitgtk2 13 | 14 | ### Build the library 15 | 16 | At the project root directory: 17 | 18 | $ mkdir build 19 | $ cd build 20 | $ cmake .. -DwxWidgets_CONFIG_EXECUTABLE=/usr/bin/wx-config-2.9 21 | $ make 22 | 23 | ### Compile and Run the Test program 24 | 25 | At the CMake binary directory: 26 | 27 | $ make test 28 | $ LD_LIBRARY_PATH=./wxc ./test 29 | -------------------------------------------------------------------------------- /tests/macros.rs: -------------------------------------------------------------------------------- 1 | #![macro_use] 2 | 3 | macro_rules! wxApp( 4 | ($f: ident) => ( 5 | #[start] 6 | fn start(argc: isize, argv: *const *const u8) -> isize { 7 | use libc::c_void; 8 | 9 | use wx::base::Closure; 10 | use wx::core::RustApp; 11 | 12 | const NULLPTR: *mut c_void = 0 as *mut c_void; 13 | 14 | let closure = Closure::new($f as *mut c_void, NULLPTR); 15 | let args: Vec<*mut i32> = Vec::new(); 16 | RustApp::initializeC(&closure, args.len() as i32, args.as_ptr() as *mut *mut i8); 17 | 0 18 | } 19 | ) 20 | ); 21 | -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | language: rust 2 | 3 | branches: 4 | only: 5 | - master 6 | - rust-0.9 7 | - rust-0.10 8 | - rust-mac 9 | 10 | env: 11 | global: 12 | - secure: l/QiDLC5/4FiebGhIVjk3XrA6nUQV9xNZUb/a79UOOgUYWJhtg6TR8EOHQ+GvQcTUVn7QJIESIqOg9AcwcdoNY/iqgDiTIdnm+TlSnGD6gKGN4bswmEJqNUjxYFLt61cqfDuYSF7Iiwywm2Ux5iFt1Bbco9k8uMmqGets9zto84= 13 | 14 | before_install: 15 | - yes | sudo apt-key adv --fetch-keys http://repos.codelite.org/CodeLite.asc 16 | - yes | sudo apt-add-repository 'deb http://llvm.org/apt/precise/ llvm-toolchain-precise-3.4 main' 17 | - yes | sudo apt-add-repository 'deb http://ppa.launchpad.net/ubuntu-toolchain-r/test/ubuntu precise main' 18 | - yes | sudo apt-add-repository 'deb http://repos.codelite.org/wx3.0/ubuntu/ precise universe' 19 | - sudo apt-get update 20 | install: 21 | - sudo apt-get install libwxgtk3.0-0-unofficial libwxgtk3.0-dev 22 | - sudo apt-get install --force-yes libclang-3.4-dev 23 | script: 24 | - mkdir -p build 25 | - cd build 26 | - cmake .. 27 | - make 28 | - make doc 29 | -------------------------------------------------------------------------------- /src/_unsafe.rs.patch: -------------------------------------------------------------------------------- 1 | --- src/_unsafe.rs.orig 2015-05-04 02:41:01.000000000 +0900 2 | +++ src/_unsafe.rs 2015-05-04 02:50:58.000000000 +0900 3 | @@ -1,13 +1,7 @@ 4 | /* automatically generated by rust-bindgen */ 5 | 6 | -pub type int8_t = ::libc::c_char; 7 | -pub type int16_t = ::libc::c_short; 8 | -pub type int32_t = ::libc::c_int; 9 | -pub type int64_t = ::libc::c_longlong; 10 | -pub type uint8_t = ::libc::c_uchar; 11 | -pub type uint16_t = ::libc::c_ushort; 12 | -pub type uint32_t = ::libc::c_uint; 13 | -pub type uint64_t = ::libc::c_ulonglong; 14 | +use libc::*; 15 | + 16 | pub type int_least8_t = int8_t; 17 | pub type int_least16_t = int16_t; 18 | pub type int_least32_t = int32_t; 19 | @@ -58,7 +52,6 @@ 20 | pub type __darwin_mbstate_t = __mbstate_t; 21 | pub type __darwin_ptrdiff_t = ::libc::c_long; 22 | pub type __darwin_size_t = ::libc::c_ulong; 23 | -pub type __darwin_va_list = __builtin_va_list; 24 | pub type __darwin_wchar_t = ::libc::c_int; 25 | pub type __darwin_rune_t = __darwin_wchar_t; 26 | pub type __darwin_wint_t = ::libc::c_int; 27 | @@ -240,16 +233,9 @@ 28 | pub type __darwin_pthread_rwlock_t = Struct__opaque_pthread_rwlock_t; 29 | pub type __darwin_pthread_rwlockattr_t = Struct__opaque_pthread_rwlockattr_t; 30 | pub type __darwin_pthread_t = *mut Struct__opaque_pthread_t; 31 | -pub type intptr_t = __darwin_intptr_t; 32 | -pub type uintptr_t = ::libc::c_ulong; 33 | -pub type intmax_t = ::libc::c_long; 34 | -pub type uintmax_t = ::libc::c_ulong; 35 | pub type __darwin_nl_item = ::libc::c_int; 36 | pub type __darwin_wctrans_t = ::libc::c_int; 37 | pub type __darwin_wctype_t = __uint32_t; 38 | -pub type clock_t = __darwin_clock_t; 39 | -pub type size_t = __darwin_size_t; 40 | -pub type time_t = __darwin_time_t; 41 | #[repr(C)] 42 | #[derive(Copy)] 43 | pub struct Struct_timespec { 44 | -------------------------------------------------------------------------------- /tests/test.rs: -------------------------------------------------------------------------------- 1 | #![crate_name = "test"] 2 | 3 | #![feature(libc)] 4 | #![feature(start)] 5 | 6 | extern crate libc; 7 | extern crate wx; 8 | 9 | use libc::c_void; 10 | 11 | use wx::_unsafe::*; 12 | use wx::defs::*; 13 | use wx::base::*; 14 | use wx::core::*; 15 | 16 | mod macros; 17 | 18 | 19 | wxApp!(wx_main); 20 | 21 | extern "C" 22 | fn wx_main() { 23 | let frame = make_frame(); 24 | frame.show(); 25 | frame.raise(); 26 | } 27 | 28 | fn make_frame() -> Frame { 29 | let frame = Frame::new(&Window::null(), ID_ANY, "Hello, wxRust!", -1, -1, -1, -1, DEFAULT_FRAME_STYLE); 30 | let menubar = make_menubar(); 31 | frame.setMenuBar(&menubar); 32 | 33 | make_button(&frame); 34 | 35 | frame 36 | } 37 | 38 | fn make_menubar() -> MenuBar { 39 | let menubar = MenuBar::new(0); 40 | 41 | let fileMenu = Menu::new("", 0); 42 | let fileNew = MenuItem::newEx(ID_ANY, "New", "Create a new file.", 0, &Menu::null()); 43 | fileMenu.appendItem(&fileNew); 44 | 45 | menubar.append(&fileMenu, "File"); 46 | menubar 47 | } 48 | 49 | extern "C" 50 | fn MyButton_clicked(fun: *mut c_void, data: *mut c_void, evt: *mut c_void) { 51 | if evt == 0 as *mut c_void { 52 | // Comes here when the target widget is destroyed. 53 | return; 54 | } 55 | 56 | println!("hello!"); 57 | let parent = Window::from(data); 58 | let msgDlg = MessageDialog::new(&parent, "Pushed!!", "The Button", OK); 59 | msgDlg.showModal(); 60 | } 61 | 62 | fn make_button(parent: &T) -> Button { 63 | let button = Button::new(parent, ID_ANY, "Push me!", 10, 10, 50, 30, 0); 64 | let closure = Closure::new(MyButton_clicked as *mut c_void, parent.ptr()); 65 | unsafe { 66 | button.connect(ID_ANY, ID_ANY, expEVT_COMMAND_BUTTON_CLICKED(), closure.ptr()); 67 | } 68 | 69 | button 70 | } 71 | -------------------------------------------------------------------------------- /wxc/wxc_glue_h.patch: -------------------------------------------------------------------------------- 1 | diff --git a/wxc/src/include/wxc_glue.h b/wxc/src/include/wxc_glue.h 2 | index ff3f8d7..e7ce92c 100644 3 | --- a/wxc/src/include/wxc_glue.h 4 | +++ b/wxc/src/include/wxc_glue.h 5 | @@ -2,9 +2,9 @@ 6 | #define WXC_GLUE_H 7 | 8 | /* $Id: wxc_glue.h,v 1.23 2005/02/25 11:14:58 dleijen Exp $ */ 9 | - 10 | -/* wx/version.h must be included for preprocessing by wxdirect */ 11 | -#include "wx/version.h" 12 | + 13 | +/* wx/version.h must be included for preprocessing by wxdirect */ 14 | +#include "wx/version.h" 15 | 16 | /* Null */ 17 | TClass(wxAcceleratorTable) Null_AcceleratorTable( ); 18 | @@ -2552,12 +2552,12 @@ TClass(wxControl) wxGridCellEditor_GetControl( TSelf(wxGridCellEditor) _obj ); 19 | void wxGridCellEditor_HandleReturn( TSelf(wxGridCellEditor) _obj, TClass(wxEvent) event ); 20 | TBool wxGridCellEditor_IsAcceptedKey( TSelf(wxGridCellEditor) _obj, TClass(wxEvent) event ); 21 | TBool wxGridCellEditor_IsCreated( TSelf(wxGridCellEditor) _obj ); 22 | - 23 | + 24 | #if (wxVERSION_NUMBER >= 2905) 25 | void wxGridCellEditor_PaintBackground( TSelf(wxGridCellEditor) _obj, TClass(wxDC) dc, TRect(x,y,w,h), TClass(wxGridCellAttr) attr ); 26 | #else 27 | void wxGridCellEditor_PaintBackground( TSelf(wxGridCellEditor) _obj, TRect(x,y,w,h), TClass(wxGridCellAttr) attr ); 28 | -#endif 29 | +#endif 30 | 31 | void wxGridCellEditor_Reset( TSelf(wxGridCellEditor) _obj ); 32 | void wxGridCellEditor_SetControl( TSelf(wxGridCellEditor) _obj, TClass(wxControl) control ); 33 | @@ -2793,7 +2793,7 @@ TClass(wxIcon) wxIcon_FromXPM( TSelf(wxIcon) data ); 34 | int wxIcon_GetDepth( TSelf(wxIcon) _obj ); 35 | int wxIcon_GetHeight( TSelf(wxIcon) _obj ); 36 | int wxIcon_GetWidth( TSelf(wxIcon) _obj ); 37 | -TBool wxIcon_IsEqual( TSelf(wxIcon) _obj, TSelf(wxIcon) other ); 38 | +TBool wxIcon_IsEqual( TSelf(wxIcon) _obj, TClass(wxIcon) other ); 39 | int wxIcon_Load( TSelf(wxIcon) _obj, TClass(wxString) name, long type, TSize(width,height) ); 40 | TBool wxIcon_IsOk( TSelf(wxIcon) _obj ); 41 | void wxIcon_SetDepth( TSelf(wxIcon) _obj, int depth ); 42 | @@ -5150,7 +5150,7 @@ TClass(wxStaticText) wxXmlResource_GetStaticText( TSelf(wxWindow) _obj, TClass(w 43 | TClass(wxTextCtrl) wxXmlResource_GetTextCtrl( TSelf(wxWindow) _obj, TClass(wxString) str_id ); 44 | TClass(wxTreeCtrl) wxXmlResource_GetTreeCtrl( TSelf(wxWindow) _obj, TClass(wxString) str_id ); 45 | TBool wxXmlResource_Unload( TSelf(wxXmlResource) _obj, TClass(wxString) filemask ); 46 | -TClass(wxXmlResource) wxXmlResource_Set( TSelf(wxXmlResource) _obj, TSelf(wxXmlResource) res ); 47 | +TClass(wxXmlResource) wxXmlResource_Set( TSelf(wxXmlResource) _obj, TClass(wxXmlResource) res ); 48 | void wxXmlResource_SetDomain( TSelf(wxXmlResource) _obj, TClass(wxString) domain ); 49 | void wxXmlResource_SetFlags( TSelf(wxXmlResource) _obj, int flags ); 50 | 51 | -------------------------------------------------------------------------------- /src/gl.rs: -------------------------------------------------------------------------------- 1 | use libc::*; 2 | use _unsafe::*; 3 | use base::*; 4 | use core::*; 5 | use advanced::*; 6 | 7 | /// Wraps the wxWidgets' [wxGLCanvas](http://docs.wxwidgets.org/3.0/classwx_glc_anvas.html) class. 8 | pub struct GLCanvas { ptr: *mut c_void } 9 | impl GLCanvasMethods for GLCanvas {} 10 | impl ScrolledWindowMethods for GLCanvas {} 11 | impl PanelMethods for GLCanvas {} 12 | impl WindowMethods for GLCanvas {} 13 | impl EvtHandlerMethods for GLCanvas {} 14 | impl ObjectMethods for GLCanvas { fn ptr(&self) -> *mut c_void { self.ptr } } 15 | 16 | impl GLCanvas { 17 | pub fn from(ptr: *mut c_void) -> GLCanvas { GLCanvas { ptr: ptr } } 18 | pub fn null() -> GLCanvas { GLCanvas::from(0 as *mut c_void) } 19 | 20 | pub fn new(parent: &T, windowID: c_int, attributes: *mut c_int, x: c_int, y: c_int, w: c_int, h: c_int, style: c_int, title: &str, palette: &U) -> GLCanvas { 21 | let title = strToString(title); 22 | unsafe { GLCanvas::from(wxGLCanvas_Create(parent.ptr(), windowID, attributes, x, y, w, h, style, title.ptr(), palette.ptr())) } 23 | } 24 | pub fn isDisplaySupported(attributes: *mut c_int) -> c_int { 25 | unsafe { wxGLCanvas_IsDisplaySupported(attributes) } 26 | } 27 | pub fn isExtensionSupported(extension: &str) -> c_int { 28 | let extension = strToString(extension); 29 | unsafe { wxGLCanvas_IsExtensionSupported(extension.ptr()) } 30 | } 31 | } 32 | 33 | /// Methods of the wxWidgets' [wxGLCanvas](http://docs.wxwidgets.org/3.0/classwx_glc_anvas.html) class. 34 | pub trait GLCanvasMethods : ScrolledWindowMethods { 35 | fn setColour(&self, colour: &T) -> c_int { 36 | unsafe { wxGLCanvas_SetColour(self.ptr(), colour.ptr()) } 37 | } 38 | fn setCurrent(&self, ctxt: &T) -> c_int { 39 | unsafe { wxGLCanvas_SetCurrent(self.ptr(), ctxt.ptr()) } 40 | } 41 | fn swapBuffers(&self) -> c_int { 42 | unsafe { wxGLCanvas_SwapBuffers(self.ptr()) } 43 | } 44 | } 45 | 46 | /// Wraps the wxWidgets' [wxGLContext](http://docs.wxwidgets.org/3.0/classwx_glc_ontext.html) class. 47 | pub struct GLContext { ptr: *mut c_void } 48 | impl GLContextMethods for GLContext {} 49 | impl ObjectMethods for GLContext { fn ptr(&self) -> *mut c_void { self.ptr } } 50 | 51 | impl GLContext { 52 | pub fn from(ptr: *mut c_void) -> GLContext { GLContext { ptr: ptr } } 53 | pub fn null() -> GLContext { GLContext::from(0 as *mut c_void) } 54 | 55 | pub fn new(win: &T, other: &U) -> GLContext { 56 | unsafe { GLContext::from(wxGLContext_Create(win.ptr(), other.ptr())) } 57 | } 58 | pub fn newFromNull(win: &T) -> GLContext { 59 | unsafe { GLContext::from(wxGLContext_CreateFromNull(win.ptr())) } 60 | } 61 | } 62 | 63 | /// Methods of the wxWidgets' [wxGLContext](http://docs.wxwidgets.org/3.0/classwx_glc_ontext.html) class. 64 | pub trait GLContextMethods : ObjectMethods { 65 | fn setCurrent(&self, win: &T) -> c_int { 66 | unsafe { wxGLContext_SetCurrent(self.ptr(), win.ptr()) } 67 | } 68 | } 69 | 70 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | **This repo has been abandoned years ago.** [As I (original author) commented here](https://github.com/kenz-gelsoft/wxRust/issues/46#issuecomment-844211608), I'm trying this again with now stable and mature language and solid ecosystem [in the another repo.](https://github.com/kenz-gelsoft/wxRust2) 2 | 3 | April 1st, 2022. 4 | 5 | --- 6 | 7 | # wxRust 8 | 9 | master: [![master build status](https://travis-ci.org/kenz-gelsoft/wxRust.svg?branch=master)](https://travis-ci.org/kenz-gelsoft/wxRust) 10 | / mac(0.10): [![Mac(0.10) build status](https://travis-ci.org/kenz-gelsoft/wxRust.svg?branch=rust-mac)](https://travis-ci.org/kenz-gelsoft/wxRust) 11 | 12 | This is a [Rust](http://www.rust-lang.org/) binding for the [wxWidgets cross platform toolkit](http://www.wxwidgets.org/). 13 | 14 | ## API 15 | 16 | [wxRust API documentation](http://kenz-gelsoft.github.io/wxRust/) 17 | 18 | ## How it works 19 | 20 | The wxRust library is heavily based on the [wxHaskell](http://www.haskell.org/haskellwiki/WxHaskell)'s wxc library. 21 | 22 | The [wxc](https://github.com/wxHaskell/wxHaskell/tree/master/wxc) is a C language binding for the C++ wxWidgets toolkit. 23 | 24 | We utilize the [rust-bindgen](https://github.com/crabtw/rust-bindgen) 25 | [![rust-bindgen build status](https://api.travis-ci.org/crabtw/rust-bindgen.svg?branch=master)](https://travis-ci.org/crabtw/rust-bindgen) 26 | automatic rust binding generator for its [_unsafe](http://kenz-gelsoft.github.io/wxRust/src/wx/Users/kenz/src/wxRust/src/_unsafe.rs.html) low-level binding. 27 | 28 | And we generate an OOP-style high-level binding (other modules than _unsafe) 29 | by [codegen.py code generator](https://github.com/kenz-gelsoft/wxRust/blob/master/src/codegen.py). 30 | 31 | ## Build 32 | 33 | We use [CMake](http://www.cmake.org/) for cross platform build, but Windows platform is not yet tested. 34 | 35 | For Linux build instructions, see [INSTALL.linux.md](INSTALL.linux.md) 36 | 37 | ### Build Prerequisite 38 | 39 | Use following Rust compiler version for your wxRust branch. We're using Servo master's one for main development. 40 | 41 | 42 | 43 | 44 |
wxRust branchSupported Rust compiler version
master master
45 | 46 | Install the wxWidgets 3.0 (2.9.5 or later is required) and CMake as below 47 | (in the case of [Homebrew](http://brew.sh/)): 48 | 49 | brew install wxmac 50 | brew install cmake 51 | 52 | With some tweak you may be able to compile wxRust with a bit older versions (2.9.0 < x < 2.9.4) of wxWidgets. 53 | See issue #21 comments for details. 54 | 55 | ### Build the library 56 | 57 | At the project root directory, 58 | 59 | Checkout git submodules: 60 | 61 | git submodule init # for the first time. 62 | git submodule update 63 | 64 | And generate Makefiles and make: 65 | 66 | mkdir build 67 | cd build 68 | cmake .. 69 | make 70 | 71 | ### Compile and Run the Test program 72 | 73 | At the CMake binary directory: 74 | 75 | make test && ./test 76 | 77 | On Mac, Run as below: 78 | 79 | make Test.app 80 | open ./Test.app # or open in Finder 81 | 82 | ### Generate Documentation 83 | 84 | At the CMake binary directory: 85 | 86 | make doc 87 | 88 | Generates [a rustdoc documentation](http://kenz-gelsoft.github.io/wxRust/) under doc directory. 89 | -------------------------------------------------------------------------------- /src/media.rs: -------------------------------------------------------------------------------- 1 | use libc::*; 2 | use _unsafe::*; 3 | use base::*; 4 | use core::*; 5 | 6 | /// Wraps the wxWidgets' [wxMediaCtrl](http://docs.wxwidgets.org/3.0/classwx_media_ctrl.html) class. 7 | pub struct MediaCtrl { ptr: *mut c_void } 8 | impl MediaCtrlMethods for MediaCtrl {} 9 | impl WindowMethods for MediaCtrl {} 10 | impl EvtHandlerMethods for MediaCtrl {} 11 | impl ObjectMethods for MediaCtrl { fn ptr(&self) -> *mut c_void { self.ptr } } 12 | 13 | impl MediaCtrl { 14 | pub fn from(ptr: *mut c_void) -> MediaCtrl { MediaCtrl { ptr: ptr } } 15 | pub fn null() -> MediaCtrl { MediaCtrl::from(0 as *mut c_void) } 16 | 17 | pub fn new(parent: &T, windowID: c_int, fileName: &str, x: c_int, y: c_int, w: c_int, h: c_int, style: c_long, szBackend: &str, name: &str) -> MediaCtrl { 18 | let fileName = strToString(fileName); 19 | let szBackend = strToString(szBackend); 20 | let name = strToString(name); 21 | unsafe { MediaCtrl::from(wxMediaCtrl_Create(parent.ptr(), windowID, fileName.ptr(), x, y, w, h, style, szBackend.ptr(), name.ptr())) } 22 | } 23 | } 24 | 25 | /// Methods of the wxWidgets' [wxMediaCtrl](http://docs.wxwidgets.org/3.0/classwx_media_ctrl.html) class. 26 | pub trait MediaCtrlMethods : WindowMethods { 27 | fn getPlaybackRate(&self) -> c_double { 28 | unsafe { wxMediaCtrl_GetPlaybackRate(self.ptr()) } 29 | } 30 | fn getVolume(&self) -> c_double { 31 | unsafe { wxMediaCtrl_GetVolume(self.ptr()) } 32 | } 33 | fn getState(&self) -> c_int { 34 | unsafe { wxMediaCtrl_GetState(self.ptr()) } 35 | } 36 | fn length(&self) -> i64 { 37 | unsafe { wxMediaCtrl_Length(self.ptr()) } 38 | } 39 | fn load(&self, fileName: &str) -> c_int { 40 | let fileName = strToString(fileName); 41 | unsafe { wxMediaCtrl_Load(self.ptr(), fileName.ptr()) } 42 | } 43 | fn loadURI(&self, uri: &str) -> c_int { 44 | let uri = strToString(uri); 45 | unsafe { wxMediaCtrl_LoadURI(self.ptr(), uri.ptr()) } 46 | } 47 | fn loadURIWithProxy(&self, uri: &str, proxy: &str) -> c_int { 48 | let uri = strToString(uri); 49 | let proxy = strToString(proxy); 50 | unsafe { wxMediaCtrl_LoadURIWithProxy(self.ptr(), uri.ptr(), proxy.ptr()) } 51 | } 52 | fn pause(&self) -> c_int { 53 | unsafe { wxMediaCtrl_Pause(self.ptr()) } 54 | } 55 | fn play(&self) -> c_int { 56 | unsafe { wxMediaCtrl_Play(self.ptr()) } 57 | } 58 | fn seek(&self, offsetWhere: i64, mode: c_int) -> i64 { 59 | unsafe { wxMediaCtrl_Seek(self.ptr(), offsetWhere, mode) } 60 | } 61 | fn setPlaybackRate(&self, dRate: c_double) -> c_int { 62 | unsafe { wxMediaCtrl_SetPlaybackRate(self.ptr(), dRate) } 63 | } 64 | fn setVolume(&self, dVolume: c_double) -> c_int { 65 | unsafe { wxMediaCtrl_SetVolume(self.ptr(), dVolume) } 66 | } 67 | fn showPlayerControls(&self, flags: c_int) -> c_int { 68 | unsafe { wxMediaCtrl_ShowPlayerControls(self.ptr(), flags) } 69 | } 70 | fn stop(&self) -> c_int { 71 | unsafe { wxMediaCtrl_Stop(self.ptr()) } 72 | } 73 | fn tell(&self) -> i64 { 74 | unsafe { wxMediaCtrl_Tell(self.ptr()) } 75 | } 76 | } 77 | 78 | /// Wraps the wxWidgets' [wxMediaEvent](http://docs.wxwidgets.org/3.0/classwx_media_event.html) class. 79 | pub struct MediaEvent { ptr: *mut c_void } 80 | impl MediaEventMethods for MediaEvent {} 81 | impl NotifyEventMethods for MediaEvent {} 82 | impl CommandEventMethods for MediaEvent {} 83 | impl EventMethods for MediaEvent {} 84 | impl ObjectMethods for MediaEvent { fn ptr(&self) -> *mut c_void { self.ptr } } 85 | 86 | impl MediaEvent { 87 | pub fn from(ptr: *mut c_void) -> MediaEvent { MediaEvent { ptr: ptr } } 88 | pub fn null() -> MediaEvent { MediaEvent::from(0 as *mut c_void) } 89 | 90 | } 91 | 92 | /// Methods of the wxWidgets' [wxMediaEvent](http://docs.wxwidgets.org/3.0/classwx_media_event.html) class. 93 | pub trait MediaEventMethods : NotifyEventMethods { 94 | } 95 | 96 | -------------------------------------------------------------------------------- /CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 2.8) 2 | 3 | list(APPEND CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/RustCMake/cmake") 4 | find_package(rustc) 5 | find_package(rustdoc) 6 | include(Rust) 7 | 8 | set(RUSTC_FLAGS "-L${CMAKE_BINARY_DIR}/lib") 9 | set(RUSTDOC_FLAGS "-L${CMAKE_BINARY_DIR}/lib") 10 | 11 | add_subdirectory(wxc) 12 | 13 | if(APPLE) 14 | set(PATCH_UNSAFE_RS patch -p0 < src/_unsafe.rs.patch) 15 | execute_process( 16 | COMMAND xcode-select --print-path 17 | OUTPUT_VARIABLE XCODE_PATH 18 | OUTPUT_STRIP_TRAILING_WHITESPACE 19 | ) 20 | execute_process( 21 | COMMAND xcrun --show-sdk-path 22 | OUTPUT_VARIABLE OSX_SDK 23 | OUTPUT_STRIP_TRAILING_WHITESPACE 24 | ) 25 | execute_process( 26 | COMMAND rustc --print sysroot 27 | OUTPUT_VARIABLE RUSTC_SYSROOT 28 | OUTPUT_STRIP_TRAILING_WHITESPACE 29 | ) 30 | set(LIBCLANG_PATH ${XCODE_PATH}/Toolchains/XcodeDefault.xctoolchain/usr/lib) 31 | set(BINDGEN_LIBPATH DYLD_FALLBACK_LIBRARY_PATH=${LIBCLANG_PATH}:${RUSTC_SYSROOT}/lib/rustlib/x86_64-apple-darwin/lib) 32 | set(BINDGEN_INCLUDEPATH -I${OSX_SDK}/usr/include) 33 | else(APPLE) 34 | set(PATCH_UNSAFE_RS) 35 | file(GLOB LIBCLANG_PATH1 "/usr/lib/llvm*/lib") 36 | file(GLOB LIBCLANG_PATH2 "/usr/lib64/llvm") 37 | set(LIBCLANG_PATH ${LIBCLANG_PATH1}${LIBCLANG_PATH2}) 38 | set(BINDGEN_LIBPATH LD_LIBRARY_PATH=${LIBCLANG_PATH}) 39 | set(BINDGEN_INCLUDEPATH) 40 | endif(APPLE) 41 | 42 | set(RUSTC_FLAGS ${RUSTC_FLAGS} 43 | -L ${LIBCLANG_PATH} 44 | -L wxc 45 | -L . 46 | ) 47 | set(GENSRC wxHaskell/wxc/src/include) 48 | set(GENSRCS 49 | ${GENSRC}/wxc.h 50 | ) 51 | 52 | add_custom_command( 53 | OUTPUT ${CMAKE_SOURCE_DIR}/rust-bindgen/target/debug/bindgen 54 | COMMAND LIBCLANG_PATH=${LIBCLANG_PATH} cargo build --verbose 55 | DEPENDS 56 | rust-bindgen/src/clang.rs 57 | rust-bindgen/src/clangll.rs 58 | rust-bindgen/src/gen.rs 59 | rust-bindgen/src/lib.rs 60 | rust-bindgen/src/parser.rs 61 | rust-bindgen/src/types.rs 62 | WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/rust-bindgen 63 | ) 64 | 65 | add_custom_command( 66 | OUTPUT ${CMAKE_SOURCE_DIR}/src/_unsafe.rs 67 | COMMAND ${BINDGEN_LIBPATH} ${CMAKE_SOURCE_DIR}/rust-bindgen/target/debug/bindgen 68 | -allow-unknown-types 69 | -x c++ 70 | `wx-config --cppflags` 71 | ${BINDGEN_INCLUDEPATH} 72 | --include stdint.h 73 | --include time.h 74 | ${GENSRCS} 75 | > src/_unsafe.rs.tmp 76 | COMMAND mv src/_unsafe.rs.tmp src/_unsafe.rs 77 | COMMAND ${PATCH_UNSAFE_RS} 78 | DEPENDS ${CMAKE_SOURCE_DIR}/rust-bindgen/target/debug/bindgen ${GENSRCS} 79 | WORKING_DIRECTORY ${CMAKE_SOURCE_DIR} 80 | ) 81 | 82 | add_custom_command( 83 | OUTPUT ${CMAKE_SOURCE_DIR}/src/generated.dummy 84 | COMMAND python src/codegen.py ${GENSRCS} 85 | COMMAND touch src/generated.dummy 86 | DEPENDS src/codegen.py ${GENSRCS} 87 | WORKING_DIRECTORY ${CMAKE_SOURCE_DIR} 88 | ) 89 | 90 | rust_crate(src/lib.rs 91 | TARGET_NAME wxrust 92 | DESTINATION lib 93 | DEPENDS 94 | src/defs.rs 95 | src/_unsafe.rs 96 | src/generated.dummy 97 | wxc 98 | ) 99 | 100 | rust_doc(src/lib.rs 101 | TARGET_NAME doc 102 | DESTINATION doc 103 | DEPENDS src/generated.dummy 104 | ) 105 | 106 | rust_crate(tests/test.rs 107 | TARGET_NAME test_cmd 108 | DEPENDS 109 | tests/macros.rs 110 | ${wxrust_FULL_TARGET} 111 | ) 112 | 113 | # Make Mac OS X App Bundle 114 | if(APPLE) 115 | add_custom_command( 116 | OUTPUT Test.app 117 | COMMAND mkdir -p Test.app/Contents/MacOS 118 | COMMAND cp test Test.app/Contents/MacOS/ 119 | COMMAND cp ${CMAKE_SOURCE_DIR}/tests/Info.plist Test.app/Contents/ 120 | COMMAND touch Test.app 121 | DEPENDS tests/Info.plist ${test_cmd_FULL_TARGET} 122 | ) 123 | add_custom_target(test ALL DEPENDS Test.app) 124 | else(APPLE) 125 | add_custom_target(test ALL DEPENDS ${test_cmd_FULL_TARGET}) 126 | endif(APPLE) 127 | -------------------------------------------------------------------------------- /wxc/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 2.8) 2 | 3 | find_package(wxWidgets REQUIRED all) 4 | include(${wxWidgets_USE_FILE}) 5 | 6 | set(WXCROOT ${PROJECT_SOURCE_DIR}/wxHaskell/wxc/src/) 7 | set(WXCINCLUDE ${WXCROOT}include/) 8 | set(WXCSRC ${WXCROOT}cpp/) 9 | 10 | include_directories( 11 | ${WXCINCLUDE} 12 | ) 13 | 14 | add_definitions( 15 | -DwxcREFUSE_MEDIACTRL 16 | ) 17 | 18 | add_custom_target(patch_wxc_glue_h 19 | patch -N -p1 < ${PROJECT_SOURCE_DIR}/wxc/wxc_glue_h.patch || /usr/bin/true 20 | DEPENDS ${PROJECT_SOURCE_DIR}/wxc/wxc_glue_h.patch 21 | WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}/wxHaskell 22 | ) 23 | 24 | add_library(wxc SHARED 25 | ${WXCSRC}apppath.cpp 26 | ${WXCSRC}dragimage.cpp 27 | ${WXCSRC}eljaccelerator.cpp 28 | ${WXCSRC}eljartprov.cpp 29 | ${WXCSRC}eljbitmap.cpp 30 | ${WXCSRC}eljbrush.cpp 31 | ${WXCSRC}eljbusyinfo.cpp 32 | ${WXCSRC}eljbutton.cpp 33 | ${WXCSRC}eljcalendarctrl.cpp 34 | ${WXCSRC}eljcaret.cpp 35 | ${WXCSRC}eljcheckbox.cpp 36 | ${WXCSRC}eljchecklistbox.cpp 37 | ${WXCSRC}eljchoice.cpp 38 | ${WXCSRC}eljclipboard.cpp 39 | ${WXCSRC}eljcoldata.cpp 40 | ${WXCSRC}eljcolour.cpp 41 | ${WXCSRC}eljcolourdlg.cpp 42 | ${WXCSRC}eljcombobox.cpp 43 | ${WXCSRC}eljconfigbase.cpp 44 | ${WXCSRC}eljcontrol.cpp 45 | ${WXCSRC}eljctxhelp.cpp 46 | ${WXCSRC}eljcursor.cpp 47 | ${WXCSRC}eljdataformat.cpp 48 | ${WXCSRC}eljdatetime.cpp 49 | ${WXCSRC}eljdc.cpp 50 | ${WXCSRC}eljdcsvg.cpp 51 | ${WXCSRC}eljdialog.cpp 52 | ${WXCSRC}eljdirdlg.cpp 53 | ${WXCSRC}eljdnd.cpp 54 | ${WXCSRC}eljdrawing.cpp 55 | ${WXCSRC}eljevent.cpp 56 | ${WXCSRC}eljfiledialog.cpp 57 | ${WXCSRC}eljfilehist.cpp 58 | ${WXCSRC}eljfindrepldlg.cpp 59 | ${WXCSRC}eljfont.cpp 60 | ${WXCSRC}eljfontdata.cpp 61 | ${WXCSRC}eljfontdlg.cpp 62 | ${WXCSRC}eljframe.cpp 63 | ${WXCSRC}eljgauge.cpp 64 | ${WXCSRC}eljgrid.cpp 65 | ${WXCSRC}eljhelpcontroller.cpp 66 | ${WXCSRC}eljicnbndl.cpp 67 | ${WXCSRC}eljicon.cpp 68 | ${WXCSRC}eljimage.cpp 69 | ${WXCSRC}eljimagelist.cpp 70 | ${WXCSRC}eljlayoutconstraints.cpp 71 | ${WXCSRC}eljlistbox.cpp 72 | ${WXCSRC}eljlistctrl.cpp 73 | ${WXCSRC}eljlocale.cpp 74 | ${WXCSRC}eljlog.cpp 75 | ${WXCSRC}eljmask.cpp 76 | ${WXCSRC}eljmdi.cpp 77 | ${WXCSRC}eljmenu.cpp 78 | ${WXCSRC}eljmenubar.cpp 79 | ${WXCSRC}eljmessagedialog.cpp 80 | ${WXCSRC}eljmime.cpp 81 | ${WXCSRC}eljminiframe.cpp 82 | ${WXCSRC}eljnotebook.cpp 83 | ${WXCSRC}eljpalette.cpp 84 | ${WXCSRC}eljpanel.cpp 85 | ${WXCSRC}eljpen.cpp 86 | ${WXCSRC}eljprintdlg.cpp 87 | ${WXCSRC}eljprinting.cpp 88 | ${WXCSRC}eljprocess.cpp 89 | ${WXCSRC}eljradiobox.cpp 90 | ${WXCSRC}eljradiobutton.cpp 91 | ${WXCSRC}eljrc.cpp 92 | ${WXCSRC}eljregion.cpp 93 | ${WXCSRC}eljregioniter.cpp 94 | ${WXCSRC}eljsash.cpp 95 | ${WXCSRC}eljscrollbar.cpp 96 | ${WXCSRC}eljscrolledwindow.cpp 97 | ${WXCSRC}eljsingleinst.cpp 98 | ${WXCSRC}eljsizer.cpp 99 | ${WXCSRC}eljslider.cpp 100 | ${WXCSRC}eljspinctrl.cpp 101 | ${WXCSRC}eljsplitterwindow.cpp 102 | ${WXCSRC}eljstaticbox.cpp 103 | ${WXCSRC}eljstaticline.cpp 104 | ${WXCSRC}eljstatictext.cpp 105 | ${WXCSRC}eljstatusbar.cpp 106 | ${WXCSRC}eljsystemsettings.cpp 107 | ${WXCSRC}eljtextctrl.cpp 108 | ${WXCSRC}eljtimer.cpp 109 | ${WXCSRC}eljtipwnd.cpp 110 | ${WXCSRC}eljtglbtn.cpp 111 | ${WXCSRC}eljtoolbar.cpp 112 | ${WXCSRC}eljvalidator.cpp 113 | ${WXCSRC}eljwindow.cpp 114 | ${WXCSRC}eljwizard.cpp 115 | ${WXCSRC}ewxw_main.cpp 116 | ${WXCSRC}extra.cpp 117 | ${WXCSRC}glcanvas.cpp 118 | ${WXCSRC}graphicscontext.cpp 119 | ${WXCSRC}image.cpp 120 | ${WXCSRC}managed.cpp 121 | ${WXCSRC}mediactrl.cpp 122 | ${WXCSRC}previewframe.cpp 123 | ${WXCSRC}printout.cpp 124 | ${WXCSRC}sckaddr.cpp 125 | ${WXCSRC}socket.cpp 126 | ${WXCSRC}sound.cpp 127 | ${WXCSRC}stc.cpp 128 | ${WXCSRC}std.cpp 129 | ${WXCSRC}taskbaricon.cpp 130 | ${WXCSRC}textstream.cpp 131 | ${WXCSRC}treectrl.cpp 132 | ${WXCSRC}wrapper.cpp 133 | ) 134 | 135 | add_dependencies(wxc 136 | patch_wxc_glue_h 137 | ) 138 | 139 | target_link_libraries(wxc 140 | ${wxWidgets_LIBRARIES} 141 | ) 142 | -------------------------------------------------------------------------------- /src/net.rs: -------------------------------------------------------------------------------- 1 | use libc::*; 2 | use base::*; 3 | use core::*; 4 | 5 | /// Wraps the wxWidgets' [wxFTP](http://docs.wxwidgets.org/3.0/classwx_ftp.html) class. 6 | pub struct FTP { ptr: *mut c_void } 7 | impl FTPMethods for FTP {} 8 | impl ProtocolMethods for FTP {} 9 | impl SocketClientMethods for FTP {} 10 | impl SocketBaseMethods for FTP {} 11 | impl ObjectMethods for FTP { fn ptr(&self) -> *mut c_void { self.ptr } } 12 | 13 | impl FTP { 14 | pub fn from(ptr: *mut c_void) -> FTP { FTP { ptr: ptr } } 15 | pub fn null() -> FTP { FTP::from(0 as *mut c_void) } 16 | 17 | } 18 | 19 | /// Methods of the wxWidgets' [wxFTP](http://docs.wxwidgets.org/3.0/classwx_ftp.html) class. 20 | pub trait FTPMethods : ProtocolMethods { 21 | } 22 | 23 | /// Wraps the wxWidgets' [wxHTTP](http://docs.wxwidgets.org/3.0/classwx_http.html) class. 24 | pub struct HTTP { ptr: *mut c_void } 25 | impl HTTPMethods for HTTP {} 26 | impl ProtocolMethods for HTTP {} 27 | impl SocketClientMethods for HTTP {} 28 | impl SocketBaseMethods for HTTP {} 29 | impl ObjectMethods for HTTP { fn ptr(&self) -> *mut c_void { self.ptr } } 30 | 31 | impl HTTP { 32 | pub fn from(ptr: *mut c_void) -> HTTP { HTTP { ptr: ptr } } 33 | pub fn null() -> HTTP { HTTP::from(0 as *mut c_void) } 34 | 35 | } 36 | 37 | /// Methods of the wxWidgets' [wxHTTP](http://docs.wxwidgets.org/3.0/classwx_http.html) class. 38 | pub trait HTTPMethods : ProtocolMethods { 39 | } 40 | 41 | /// Wraps the wxWidgets' [wxIPV4address](http://docs.wxwidgets.org/3.0/classwx_ipv4_address.html) class. 42 | pub struct IPV4address { ptr: *mut c_void } 43 | impl IPV4addressMethods for IPV4address {} 44 | impl SockAddressMethods for IPV4address {} 45 | impl ObjectMethods for IPV4address { fn ptr(&self) -> *mut c_void { self.ptr } } 46 | 47 | impl IPV4address { 48 | pub fn from(ptr: *mut c_void) -> IPV4address { IPV4address { ptr: ptr } } 49 | pub fn null() -> IPV4address { IPV4address::from(0 as *mut c_void) } 50 | 51 | } 52 | 53 | /// Methods of the wxWidgets' [wxIPV4address](http://docs.wxwidgets.org/3.0/classwx_ipv4_address.html) class. 54 | pub trait IPV4addressMethods : SockAddressMethods { 55 | } 56 | 57 | /// Wraps the wxWidgets' [wxProtocol](http://docs.wxwidgets.org/3.0/classwx_protocol.html) class. 58 | pub struct Protocol { ptr: *mut c_void } 59 | impl ProtocolMethods for Protocol {} 60 | impl SocketClientMethods for Protocol {} 61 | impl SocketBaseMethods for Protocol {} 62 | impl ObjectMethods for Protocol { fn ptr(&self) -> *mut c_void { self.ptr } } 63 | 64 | impl Protocol { 65 | pub fn from(ptr: *mut c_void) -> Protocol { Protocol { ptr: ptr } } 66 | pub fn null() -> Protocol { Protocol::from(0 as *mut c_void) } 67 | 68 | } 69 | 70 | /// Methods of the wxWidgets' [wxProtocol](http://docs.wxwidgets.org/3.0/classwx_protocol.html) class. 71 | pub trait ProtocolMethods : SocketClientMethods { 72 | } 73 | 74 | /// Wraps the wxWidgets' [wxSockAddress](http://docs.wxwidgets.org/3.0/classwx_sock_address.html) class. 75 | pub struct SockAddress { ptr: *mut c_void } 76 | impl SockAddressMethods for SockAddress {} 77 | impl ObjectMethods for SockAddress { fn ptr(&self) -> *mut c_void { self.ptr } } 78 | 79 | impl SockAddress { 80 | pub fn from(ptr: *mut c_void) -> SockAddress { SockAddress { ptr: ptr } } 81 | pub fn null() -> SockAddress { SockAddress::from(0 as *mut c_void) } 82 | 83 | } 84 | 85 | /// Methods of the wxWidgets' [wxSockAddress](http://docs.wxwidgets.org/3.0/classwx_sock_address.html) class. 86 | pub trait SockAddressMethods : ObjectMethods { 87 | } 88 | 89 | /// Wraps the wxWidgets' [wxSocketBase](http://docs.wxwidgets.org/3.0/classwx_socket_base.html) class. 90 | pub struct SocketBase { ptr: *mut c_void } 91 | impl SocketBaseMethods for SocketBase {} 92 | impl ObjectMethods for SocketBase { fn ptr(&self) -> *mut c_void { self.ptr } } 93 | 94 | impl SocketBase { 95 | pub fn from(ptr: *mut c_void) -> SocketBase { SocketBase { ptr: ptr } } 96 | pub fn null() -> SocketBase { SocketBase::from(0 as *mut c_void) } 97 | 98 | } 99 | 100 | /// Methods of the wxWidgets' [wxSocketBase](http://docs.wxwidgets.org/3.0/classwx_socket_base.html) class. 101 | pub trait SocketBaseMethods : ObjectMethods { 102 | } 103 | 104 | /// Wraps the wxWidgets' [wxSocketClient](http://docs.wxwidgets.org/3.0/classwx_socket_client.html) class. 105 | pub struct SocketClient { ptr: *mut c_void } 106 | impl SocketClientMethods for SocketClient {} 107 | impl SocketBaseMethods for SocketClient {} 108 | impl ObjectMethods for SocketClient { fn ptr(&self) -> *mut c_void { self.ptr } } 109 | 110 | impl SocketClient { 111 | pub fn from(ptr: *mut c_void) -> SocketClient { SocketClient { ptr: ptr } } 112 | pub fn null() -> SocketClient { SocketClient::from(0 as *mut c_void) } 113 | 114 | } 115 | 116 | /// Methods of the wxWidgets' [wxSocketClient](http://docs.wxwidgets.org/3.0/classwx_socket_client.html) class. 117 | pub trait SocketClientMethods : SocketBaseMethods { 118 | } 119 | 120 | /// Wraps the wxWidgets' [wxSocketEvent](http://docs.wxwidgets.org/3.0/classwx_socket_event.html) class. 121 | pub struct SocketEvent { ptr: *mut c_void } 122 | impl SocketEventMethods for SocketEvent {} 123 | impl EventMethods for SocketEvent {} 124 | impl ObjectMethods for SocketEvent { fn ptr(&self) -> *mut c_void { self.ptr } } 125 | 126 | impl SocketEvent { 127 | pub fn from(ptr: *mut c_void) -> SocketEvent { SocketEvent { ptr: ptr } } 128 | pub fn null() -> SocketEvent { SocketEvent::from(0 as *mut c_void) } 129 | 130 | } 131 | 132 | /// Methods of the wxWidgets' [wxSocketEvent](http://docs.wxwidgets.org/3.0/classwx_socket_event.html) class. 133 | pub trait SocketEventMethods : EventMethods { 134 | } 135 | 136 | /// Wraps the wxWidgets' [wxSocketInputStream](http://docs.wxwidgets.org/3.0/classwx_socket_input_stream.html) class. 137 | pub struct SocketInputStream { ptr: *mut c_void } 138 | impl SocketInputStreamMethods for SocketInputStream {} 139 | impl InputStreamMethods for SocketInputStream {} 140 | impl StreamBaseMethods for SocketInputStream { fn ptr(&self) -> *mut c_void { self.ptr } } 141 | 142 | impl SocketInputStream { 143 | pub fn from(ptr: *mut c_void) -> SocketInputStream { SocketInputStream { ptr: ptr } } 144 | pub fn null() -> SocketInputStream { SocketInputStream::from(0 as *mut c_void) } 145 | 146 | } 147 | 148 | /// Methods of the wxWidgets' [wxSocketInputStream](http://docs.wxwidgets.org/3.0/classwx_socket_input_stream.html) class. 149 | pub trait SocketInputStreamMethods : InputStreamMethods { 150 | } 151 | 152 | /// Wraps the wxWidgets' [wxSocketOutputStream](http://docs.wxwidgets.org/3.0/classwx_socket_output_stream.html) class. 153 | pub struct SocketOutputStream { ptr: *mut c_void } 154 | impl SocketOutputStreamMethods for SocketOutputStream {} 155 | impl OutputStreamMethods for SocketOutputStream {} 156 | impl StreamBaseMethods for SocketOutputStream { fn ptr(&self) -> *mut c_void { self.ptr } } 157 | 158 | impl SocketOutputStream { 159 | pub fn from(ptr: *mut c_void) -> SocketOutputStream { SocketOutputStream { ptr: ptr } } 160 | pub fn null() -> SocketOutputStream { SocketOutputStream::from(0 as *mut c_void) } 161 | 162 | } 163 | 164 | /// Methods of the wxWidgets' [wxSocketOutputStream](http://docs.wxwidgets.org/3.0/classwx_socket_output_stream.html) class. 165 | pub trait SocketOutputStreamMethods : OutputStreamMethods { 166 | } 167 | 168 | /// Wraps the wxWidgets' [wxSocketServer](http://docs.wxwidgets.org/3.0/classwx_socket_server.html) class. 169 | pub struct SocketServer { ptr: *mut c_void } 170 | impl SocketServerMethods for SocketServer {} 171 | impl SocketBaseMethods for SocketServer {} 172 | impl ObjectMethods for SocketServer { fn ptr(&self) -> *mut c_void { self.ptr } } 173 | 174 | impl SocketServer { 175 | pub fn from(ptr: *mut c_void) -> SocketServer { SocketServer { ptr: ptr } } 176 | pub fn null() -> SocketServer { SocketServer::from(0 as *mut c_void) } 177 | 178 | } 179 | 180 | /// Methods of the wxWidgets' [wxSocketServer](http://docs.wxwidgets.org/3.0/classwx_socket_server.html) class. 181 | pub trait SocketServerMethods : SocketBaseMethods { 182 | } 183 | 184 | /// Wraps the wxWidgets' [wxURL](http://docs.wxwidgets.org/3.0/classwx_url.html) class. 185 | pub struct URL { ptr: *mut c_void } 186 | impl URLMethods for URL {} 187 | impl ObjectMethods for URL { fn ptr(&self) -> *mut c_void { self.ptr } } 188 | 189 | impl URL { 190 | pub fn from(ptr: *mut c_void) -> URL { URL { ptr: ptr } } 191 | pub fn null() -> URL { URL::from(0 as *mut c_void) } 192 | 193 | } 194 | 195 | /// Methods of the wxWidgets' [wxURL](http://docs.wxwidgets.org/3.0/classwx_url.html) class. 196 | pub trait URLMethods : ObjectMethods { 197 | } 198 | 199 | -------------------------------------------------------------------------------- /src/odbc.rs: -------------------------------------------------------------------------------- 1 | use libc::*; 2 | use base::*; 3 | 4 | /// Wraps the wxWidgets' [wxDatabase](http://docs.wxwidgets.org/3.0/classwx_database.html) class. 5 | pub struct Database { ptr: *mut c_void } 6 | impl DatabaseMethods for Database {} 7 | impl ObjectMethods for Database { fn ptr(&self) -> *mut c_void { self.ptr } } 8 | 9 | impl Database { 10 | pub fn from(ptr: *mut c_void) -> Database { Database { ptr: ptr } } 11 | pub fn null() -> Database { Database::from(0 as *mut c_void) } 12 | 13 | } 14 | 15 | /// Methods of the wxWidgets' [wxDatabase](http://docs.wxwidgets.org/3.0/classwx_database.html) class. 16 | pub trait DatabaseMethods : ObjectMethods { 17 | } 18 | 19 | /// Wraps the wxWidgets' [wxDb](http://docs.wxwidgets.org/3.0/classwx_db.html) class. 20 | pub struct Db { ptr: *mut c_void } 21 | impl DbMethods for Db { fn ptr(&self) -> *mut c_void { self.ptr } } 22 | 23 | impl Db { 24 | pub fn from(ptr: *mut c_void) -> Db { Db { ptr: ptr } } 25 | pub fn null() -> Db { Db::from(0 as *mut c_void) } 26 | 27 | } 28 | 29 | /// Methods of the wxWidgets' [wxDb](http://docs.wxwidgets.org/3.0/classwx_db.html) class. 30 | pub trait DbMethods { 31 | fn ptr(&self) -> *mut c_void; 32 | 33 | } 34 | 35 | /// Wraps the wxWidgets' [wxDbColDef](http://docs.wxwidgets.org/3.0/classwx_db_col_def.html) class. 36 | pub struct DbColDef { ptr: *mut c_void } 37 | impl DbColDefMethods for DbColDef { fn ptr(&self) -> *mut c_void { self.ptr } } 38 | 39 | impl DbColDef { 40 | pub fn from(ptr: *mut c_void) -> DbColDef { DbColDef { ptr: ptr } } 41 | pub fn null() -> DbColDef { DbColDef::from(0 as *mut c_void) } 42 | 43 | } 44 | 45 | /// Methods of the wxWidgets' [wxDbColDef](http://docs.wxwidgets.org/3.0/classwx_db_col_def.html) class. 46 | pub trait DbColDefMethods { 47 | fn ptr(&self) -> *mut c_void; 48 | 49 | } 50 | 51 | /// Wraps the wxWidgets' [wxDbColFor](http://docs.wxwidgets.org/3.0/classwx_db_col_for.html) class. 52 | pub struct DbColFor { ptr: *mut c_void } 53 | impl DbColForMethods for DbColFor { fn ptr(&self) -> *mut c_void { self.ptr } } 54 | 55 | impl DbColFor { 56 | pub fn from(ptr: *mut c_void) -> DbColFor { DbColFor { ptr: ptr } } 57 | pub fn null() -> DbColFor { DbColFor::from(0 as *mut c_void) } 58 | 59 | } 60 | 61 | /// Methods of the wxWidgets' [wxDbColFor](http://docs.wxwidgets.org/3.0/classwx_db_col_for.html) class. 62 | pub trait DbColForMethods { 63 | fn ptr(&self) -> *mut c_void; 64 | 65 | } 66 | 67 | /// Wraps the wxWidgets' [wxDbColInf](http://docs.wxwidgets.org/3.0/classwx_db_col_inf.html) class. 68 | pub struct DbColInf { ptr: *mut c_void } 69 | impl DbColInfMethods for DbColInf { fn ptr(&self) -> *mut c_void { self.ptr } } 70 | 71 | impl DbColInf { 72 | pub fn from(ptr: *mut c_void) -> DbColInf { DbColInf { ptr: ptr } } 73 | pub fn null() -> DbColInf { DbColInf::from(0 as *mut c_void) } 74 | 75 | } 76 | 77 | /// Methods of the wxWidgets' [wxDbColInf](http://docs.wxwidgets.org/3.0/classwx_db_col_inf.html) class. 78 | pub trait DbColInfMethods { 79 | fn ptr(&self) -> *mut c_void; 80 | 81 | } 82 | 83 | /// Wraps the wxWidgets' [wxDbConnectInf](http://docs.wxwidgets.org/3.0/classwx_db_connect_inf.html) class. 84 | pub struct DbConnectInf { ptr: *mut c_void } 85 | impl DbConnectInfMethods for DbConnectInf { fn ptr(&self) -> *mut c_void { self.ptr } } 86 | 87 | impl DbConnectInf { 88 | pub fn from(ptr: *mut c_void) -> DbConnectInf { DbConnectInf { ptr: ptr } } 89 | pub fn null() -> DbConnectInf { DbConnectInf::from(0 as *mut c_void) } 90 | 91 | } 92 | 93 | /// Methods of the wxWidgets' [wxDbConnectInf](http://docs.wxwidgets.org/3.0/classwx_db_connect_inf.html) class. 94 | pub trait DbConnectInfMethods { 95 | fn ptr(&self) -> *mut c_void; 96 | 97 | } 98 | 99 | /// Wraps the wxWidgets' [wxDbInf](http://docs.wxwidgets.org/3.0/classwx_db_inf.html) class. 100 | pub struct DbInf { ptr: *mut c_void } 101 | impl DbInfMethods for DbInf { fn ptr(&self) -> *mut c_void { self.ptr } } 102 | 103 | impl DbInf { 104 | pub fn from(ptr: *mut c_void) -> DbInf { DbInf { ptr: ptr } } 105 | pub fn null() -> DbInf { DbInf::from(0 as *mut c_void) } 106 | 107 | } 108 | 109 | /// Methods of the wxWidgets' [wxDbInf](http://docs.wxwidgets.org/3.0/classwx_db_inf.html) class. 110 | pub trait DbInfMethods { 111 | fn ptr(&self) -> *mut c_void; 112 | 113 | } 114 | 115 | /// Wraps the wxWidgets' [wxDbSqlTypeInfo](http://docs.wxwidgets.org/3.0/classwx_db_sql_type_info.html) class. 116 | pub struct DbSqlTypeInfo { ptr: *mut c_void } 117 | impl DbSqlTypeInfoMethods for DbSqlTypeInfo { fn ptr(&self) -> *mut c_void { self.ptr } } 118 | 119 | impl DbSqlTypeInfo { 120 | pub fn from(ptr: *mut c_void) -> DbSqlTypeInfo { DbSqlTypeInfo { ptr: ptr } } 121 | pub fn null() -> DbSqlTypeInfo { DbSqlTypeInfo::from(0 as *mut c_void) } 122 | 123 | } 124 | 125 | /// Methods of the wxWidgets' [wxDbSqlTypeInfo](http://docs.wxwidgets.org/3.0/classwx_db_sql_type_info.html) class. 126 | pub trait DbSqlTypeInfoMethods { 127 | fn ptr(&self) -> *mut c_void; 128 | 129 | } 130 | 131 | /// Wraps the wxWidgets' [wxDbTable](http://docs.wxwidgets.org/3.0/classwx_db_table.html) class. 132 | pub struct DbTable { ptr: *mut c_void } 133 | impl DbTableMethods for DbTable { fn ptr(&self) -> *mut c_void { self.ptr } } 134 | 135 | impl DbTable { 136 | pub fn from(ptr: *mut c_void) -> DbTable { DbTable { ptr: ptr } } 137 | pub fn null() -> DbTable { DbTable::from(0 as *mut c_void) } 138 | 139 | } 140 | 141 | /// Methods of the wxWidgets' [wxDbTable](http://docs.wxwidgets.org/3.0/classwx_db_table.html) class. 142 | pub trait DbTableMethods { 143 | fn ptr(&self) -> *mut c_void; 144 | 145 | } 146 | 147 | /// Wraps the wxWidgets' [wxDbTableInfo](http://docs.wxwidgets.org/3.0/classwx_db_table_info.html) class. 148 | pub struct DbTableInfo { ptr: *mut c_void } 149 | impl DbTableInfoMethods for DbTableInfo { fn ptr(&self) -> *mut c_void { self.ptr } } 150 | 151 | impl DbTableInfo { 152 | pub fn from(ptr: *mut c_void) -> DbTableInfo { DbTableInfo { ptr: ptr } } 153 | pub fn null() -> DbTableInfo { DbTableInfo::from(0 as *mut c_void) } 154 | 155 | } 156 | 157 | /// Methods of the wxWidgets' [wxDbTableInfo](http://docs.wxwidgets.org/3.0/classwx_db_table_info.html) class. 158 | pub trait DbTableInfoMethods { 159 | fn ptr(&self) -> *mut c_void; 160 | 161 | } 162 | 163 | /// Wraps the wxWidgets' [wxQueryCol](http://docs.wxwidgets.org/3.0/classwx_query_col.html) class. 164 | pub struct QueryCol { ptr: *mut c_void } 165 | impl QueryColMethods for QueryCol {} 166 | impl ObjectMethods for QueryCol { fn ptr(&self) -> *mut c_void { self.ptr } } 167 | 168 | impl QueryCol { 169 | pub fn from(ptr: *mut c_void) -> QueryCol { QueryCol { ptr: ptr } } 170 | pub fn null() -> QueryCol { QueryCol::from(0 as *mut c_void) } 171 | 172 | } 173 | 174 | /// Methods of the wxWidgets' [wxQueryCol](http://docs.wxwidgets.org/3.0/classwx_query_col.html) class. 175 | pub trait QueryColMethods : ObjectMethods { 176 | } 177 | 178 | /// Wraps the wxWidgets' [wxQueryField](http://docs.wxwidgets.org/3.0/classwx_query_field.html) class. 179 | pub struct QueryField { ptr: *mut c_void } 180 | impl QueryFieldMethods for QueryField {} 181 | impl ObjectMethods for QueryField { fn ptr(&self) -> *mut c_void { self.ptr } } 182 | 183 | impl QueryField { 184 | pub fn from(ptr: *mut c_void) -> QueryField { QueryField { ptr: ptr } } 185 | pub fn null() -> QueryField { QueryField::from(0 as *mut c_void) } 186 | 187 | } 188 | 189 | /// Methods of the wxWidgets' [wxQueryField](http://docs.wxwidgets.org/3.0/classwx_query_field.html) class. 190 | pub trait QueryFieldMethods : ObjectMethods { 191 | } 192 | 193 | /// Wraps the wxWidgets' [wxRecordSet](http://docs.wxwidgets.org/3.0/classwx_record_set.html) class. 194 | pub struct RecordSet { ptr: *mut c_void } 195 | impl RecordSetMethods for RecordSet {} 196 | impl ObjectMethods for RecordSet { fn ptr(&self) -> *mut c_void { self.ptr } } 197 | 198 | impl RecordSet { 199 | pub fn from(ptr: *mut c_void) -> RecordSet { RecordSet { ptr: ptr } } 200 | pub fn null() -> RecordSet { RecordSet::from(0 as *mut c_void) } 201 | 202 | } 203 | 204 | /// Methods of the wxWidgets' [wxRecordSet](http://docs.wxwidgets.org/3.0/classwx_record_set.html) class. 205 | pub trait RecordSetMethods : ObjectMethods { 206 | } 207 | 208 | /// Wraps the wxWidgets' [wxTablesInUse](http://docs.wxwidgets.org/3.0/classwx_tables_in_use.html) class. 209 | pub struct TablesInUse { ptr: *mut c_void } 210 | impl TablesInUseMethods for TablesInUse {} 211 | impl ObjectMethods for TablesInUse { fn ptr(&self) -> *mut c_void { self.ptr } } 212 | 213 | impl TablesInUse { 214 | pub fn from(ptr: *mut c_void) -> TablesInUse { TablesInUse { ptr: ptr } } 215 | pub fn null() -> TablesInUse { TablesInUse::from(0 as *mut c_void) } 216 | 217 | } 218 | 219 | /// Methods of the wxWidgets' [wxTablesInUse](http://docs.wxwidgets.org/3.0/classwx_tables_in_use.html) class. 220 | pub trait TablesInUseMethods : ObjectMethods { 221 | } 222 | 223 | -------------------------------------------------------------------------------- /src/propertygrid.rs: -------------------------------------------------------------------------------- 1 | use libc::*; 2 | use _unsafe::*; 3 | use base::*; 4 | use core::*; 5 | use advanced::*; 6 | 7 | /// Wraps the wxWidgets' [wxPropertyGrid](http://docs.wxwidgets.org/3.0/classwx_property_grid.html) class. 8 | pub struct PropertyGrid { ptr: *mut c_void } 9 | impl PropertyGridMethods for PropertyGrid {} 10 | impl ControlMethods for PropertyGrid {} 11 | impl WindowMethods for PropertyGrid {} 12 | impl EvtHandlerMethods for PropertyGrid {} 13 | impl ObjectMethods for PropertyGrid { fn ptr(&self) -> *mut c_void { self.ptr } } 14 | 15 | impl PropertyGrid { 16 | pub fn from(ptr: *mut c_void) -> PropertyGrid { PropertyGrid { ptr: ptr } } 17 | pub fn null() -> PropertyGrid { PropertyGrid::from(0 as *mut c_void) } 18 | 19 | pub fn new(_prt: &T, _id: c_int, _lft: c_int, _top: c_int, _wdt: c_int, _hgt: c_int, _stl: c_int) -> PropertyGrid { 20 | unsafe { PropertyGrid::from(wxPropertyGrid_Create(_prt.ptr(), _id, _lft, _top, _wdt, _hgt, _stl)) } 21 | } 22 | } 23 | 24 | /// Methods of the wxWidgets' [wxPropertyGrid](http://docs.wxwidgets.org/3.0/classwx_property_grid.html) class. 25 | pub trait PropertyGridMethods : ControlMethods { 26 | fn append(&self, prop: &T) -> PGProperty { 27 | unsafe { PGProperty::from(wxPropertyGrid_Append(self.ptr(), prop.ptr())) } 28 | } 29 | fn disableProperty(&self, propName: &str) -> c_int { 30 | let propName = strToString(propName); 31 | unsafe { wxPropertyGrid_DisableProperty(self.ptr(), propName.ptr()) } 32 | } 33 | } 34 | 35 | /// Wraps the wxWidgets' [wxPropertyGridEvent](http://docs.wxwidgets.org/3.0/classwx_property_grid_event.html) class. 36 | pub struct PropertyGridEvent { ptr: *mut c_void } 37 | impl PropertyGridEventMethods for PropertyGridEvent {} 38 | impl NotifyEventMethods for PropertyGridEvent {} 39 | impl CommandEventMethods for PropertyGridEvent {} 40 | impl EventMethods for PropertyGridEvent {} 41 | impl ObjectMethods for PropertyGridEvent { fn ptr(&self) -> *mut c_void { self.ptr } } 42 | 43 | impl PropertyGridEvent { 44 | pub fn from(ptr: *mut c_void) -> PropertyGridEvent { PropertyGridEvent { ptr: ptr } } 45 | pub fn null() -> PropertyGridEvent { PropertyGridEvent::from(0 as *mut c_void) } 46 | 47 | } 48 | 49 | /// Methods of the wxWidgets' [wxPropertyGridEvent](http://docs.wxwidgets.org/3.0/classwx_property_grid_event.html) class. 50 | pub trait PropertyGridEventMethods : NotifyEventMethods { 51 | fn hasProperty(&self) -> c_int { 52 | unsafe { wxPropertyGridEvent_HasProperty(self.ptr()) } 53 | } 54 | fn getProperty(&self) -> PGProperty { 55 | unsafe { PGProperty::from(wxPropertyGridEvent_GetProperty(self.ptr())) } 56 | } 57 | } 58 | 59 | /// Wraps the wxWidgets' [wxPGProperty](http://docs.wxwidgets.org/3.0/classwx_pgp_roperty.html) class. 60 | pub struct PGProperty { ptr: *mut c_void } 61 | impl PGPropertyMethods for PGProperty {} 62 | impl ObjectMethods for PGProperty { fn ptr(&self) -> *mut c_void { self.ptr } } 63 | 64 | impl PGProperty { 65 | pub fn from(ptr: *mut c_void) -> PGProperty { PGProperty { ptr: ptr } } 66 | pub fn null() -> PGProperty { PGProperty::from(0 as *mut c_void) } 67 | 68 | } 69 | 70 | /// Methods of the wxWidgets' [wxPGProperty](http://docs.wxwidgets.org/3.0/classwx_pgp_roperty.html) class. 71 | pub trait PGPropertyMethods : ObjectMethods { 72 | fn getLabel(&self) -> String { 73 | unsafe { wxString::from(wxPGProperty_GetLabel(self.ptr())).to_str() } 74 | } 75 | fn getName(&self) -> String { 76 | unsafe { wxString::from(wxPGProperty_GetName(self.ptr())).to_str() } 77 | } 78 | fn getValueAsString(&self) -> String { 79 | unsafe { wxString::from(wxPGProperty_GetValueAsString(self.ptr())).to_str() } 80 | } 81 | fn getValueType(&self) -> String { 82 | unsafe { wxString::from(wxPGProperty_GetValueType(self.ptr())).to_str() } 83 | } 84 | fn setHelpString(&self, helpString: &str) { 85 | let helpString = strToString(helpString); 86 | unsafe { wxPGProperty_SetHelpString(self.ptr(), helpString.ptr()) } 87 | } 88 | } 89 | 90 | /// Wraps the wxWidgets' [wxStringProperty](http://docs.wxwidgets.org/3.0/classwx_string_property.html) class. 91 | pub struct StringProperty { ptr: *mut c_void } 92 | impl StringPropertyMethods for StringProperty {} 93 | impl PGPropertyMethods for StringProperty {} 94 | impl ObjectMethods for StringProperty { fn ptr(&self) -> *mut c_void { self.ptr } } 95 | 96 | impl StringProperty { 97 | pub fn from(ptr: *mut c_void) -> StringProperty { StringProperty { ptr: ptr } } 98 | pub fn null() -> StringProperty { StringProperty::from(0 as *mut c_void) } 99 | 100 | pub fn new(label: &str, name: &str, value: &str) -> StringProperty { 101 | let label = strToString(label); 102 | let name = strToString(name); 103 | let value = strToString(value); 104 | unsafe { StringProperty::from(wxStringProperty_Create(label.ptr(), name.ptr(), value.ptr())) } 105 | } 106 | } 107 | 108 | /// Methods of the wxWidgets' [wxStringProperty](http://docs.wxwidgets.org/3.0/classwx_string_property.html) class. 109 | pub trait StringPropertyMethods : PGPropertyMethods { 110 | } 111 | 112 | /// Wraps the wxWidgets' [wxIntProperty](http://docs.wxwidgets.org/3.0/classwx_int_property.html) class. 113 | pub struct IntProperty { ptr: *mut c_void } 114 | impl IntPropertyMethods for IntProperty {} 115 | impl PGPropertyMethods for IntProperty {} 116 | impl ObjectMethods for IntProperty { fn ptr(&self) -> *mut c_void { self.ptr } } 117 | 118 | impl IntProperty { 119 | pub fn from(ptr: *mut c_void) -> IntProperty { IntProperty { ptr: ptr } } 120 | pub fn null() -> IntProperty { IntProperty::from(0 as *mut c_void) } 121 | 122 | pub fn new(label: &str, name: &str, value: c_int) -> IntProperty { 123 | let label = strToString(label); 124 | let name = strToString(name); 125 | unsafe { IntProperty::from(wxIntProperty_Create(label.ptr(), name.ptr(), value)) } 126 | } 127 | } 128 | 129 | /// Methods of the wxWidgets' [wxIntProperty](http://docs.wxwidgets.org/3.0/classwx_int_property.html) class. 130 | pub trait IntPropertyMethods : PGPropertyMethods { 131 | } 132 | 133 | /// Wraps the wxWidgets' [wxBoolProperty](http://docs.wxwidgets.org/3.0/classwx_bool_property.html) class. 134 | pub struct BoolProperty { ptr: *mut c_void } 135 | impl BoolPropertyMethods for BoolProperty {} 136 | impl PGPropertyMethods for BoolProperty {} 137 | impl ObjectMethods for BoolProperty { fn ptr(&self) -> *mut c_void { self.ptr } } 138 | 139 | impl BoolProperty { 140 | pub fn from(ptr: *mut c_void) -> BoolProperty { BoolProperty { ptr: ptr } } 141 | pub fn null() -> BoolProperty { BoolProperty::from(0 as *mut c_void) } 142 | 143 | pub fn new(label: &str, name: &str, value: c_int) -> BoolProperty { 144 | let label = strToString(label); 145 | let name = strToString(name); 146 | unsafe { BoolProperty::from(wxBoolProperty_Create(label.ptr(), name.ptr(), value)) } 147 | } 148 | } 149 | 150 | /// Methods of the wxWidgets' [wxBoolProperty](http://docs.wxwidgets.org/3.0/classwx_bool_property.html) class. 151 | pub trait BoolPropertyMethods : PGPropertyMethods { 152 | } 153 | 154 | /// Wraps the wxWidgets' [wxFloatProperty](http://docs.wxwidgets.org/3.0/classwx_float_property.html) class. 155 | pub struct FloatProperty { ptr: *mut c_void } 156 | impl FloatPropertyMethods for FloatProperty {} 157 | impl PGPropertyMethods for FloatProperty {} 158 | impl ObjectMethods for FloatProperty { fn ptr(&self) -> *mut c_void { self.ptr } } 159 | 160 | impl FloatProperty { 161 | pub fn from(ptr: *mut c_void) -> FloatProperty { FloatProperty { ptr: ptr } } 162 | pub fn null() -> FloatProperty { FloatProperty::from(0 as *mut c_void) } 163 | 164 | pub fn new(label: &str, name: &str, value: c_float) -> FloatProperty { 165 | let label = strToString(label); 166 | let name = strToString(name); 167 | unsafe { FloatProperty::from(wxFloatProperty_Create(label.ptr(), name.ptr(), value)) } 168 | } 169 | } 170 | 171 | /// Methods of the wxWidgets' [wxFloatProperty](http://docs.wxwidgets.org/3.0/classwx_float_property.html) class. 172 | pub trait FloatPropertyMethods : PGPropertyMethods { 173 | } 174 | 175 | /// Wraps the wxWidgets' [wxDateProperty](http://docs.wxwidgets.org/3.0/classwx_date_property.html) class. 176 | pub struct DateProperty { ptr: *mut c_void } 177 | impl DatePropertyMethods for DateProperty {} 178 | impl PGPropertyMethods for DateProperty {} 179 | impl ObjectMethods for DateProperty { fn ptr(&self) -> *mut c_void { self.ptr } } 180 | 181 | impl DateProperty { 182 | pub fn from(ptr: *mut c_void) -> DateProperty { DateProperty { ptr: ptr } } 183 | pub fn null() -> DateProperty { DateProperty::from(0 as *mut c_void) } 184 | 185 | pub fn new(label: &str, name: &str, value: &T) -> DateProperty { 186 | let label = strToString(label); 187 | let name = strToString(name); 188 | unsafe { DateProperty::from(wxDateProperty_Create(label.ptr(), name.ptr(), value.ptr())) } 189 | } 190 | } 191 | 192 | /// Methods of the wxWidgets' [wxDateProperty](http://docs.wxwidgets.org/3.0/classwx_date_property.html) class. 193 | pub trait DatePropertyMethods : PGPropertyMethods { 194 | } 195 | 196 | /// Wraps the wxWidgets' [wxFileProperty](http://docs.wxwidgets.org/3.0/classwx_file_property.html) class. 197 | pub struct FileProperty { ptr: *mut c_void } 198 | impl FilePropertyMethods for FileProperty {} 199 | impl PGPropertyMethods for FileProperty {} 200 | impl ObjectMethods for FileProperty { fn ptr(&self) -> *mut c_void { self.ptr } } 201 | 202 | impl FileProperty { 203 | pub fn from(ptr: *mut c_void) -> FileProperty { FileProperty { ptr: ptr } } 204 | pub fn null() -> FileProperty { FileProperty::from(0 as *mut c_void) } 205 | 206 | pub fn new(label: &str, name: &str, value: &str) -> FileProperty { 207 | let label = strToString(label); 208 | let name = strToString(name); 209 | let value = strToString(value); 210 | unsafe { FileProperty::from(wxFileProperty_Create(label.ptr(), name.ptr(), value.ptr())) } 211 | } 212 | } 213 | 214 | /// Methods of the wxWidgets' [wxFileProperty](http://docs.wxwidgets.org/3.0/classwx_file_property.html) class. 215 | pub trait FilePropertyMethods : PGPropertyMethods { 216 | } 217 | 218 | /// Wraps the wxWidgets' [wxPropertyCategory](http://docs.wxwidgets.org/3.0/classwx_property_category.html) class. 219 | pub struct PropertyCategory { ptr: *mut c_void } 220 | impl PropertyCategoryMethods for PropertyCategory {} 221 | impl PGPropertyMethods for PropertyCategory {} 222 | impl ObjectMethods for PropertyCategory { fn ptr(&self) -> *mut c_void { self.ptr } } 223 | 224 | impl PropertyCategory { 225 | pub fn from(ptr: *mut c_void) -> PropertyCategory { PropertyCategory { ptr: ptr } } 226 | pub fn null() -> PropertyCategory { PropertyCategory::from(0 as *mut c_void) } 227 | 228 | pub fn new(label: &str) -> PropertyCategory { 229 | let label = strToString(label); 230 | unsafe { PropertyCategory::from(wxPropertyCategory_Create(label.ptr())) } 231 | } 232 | } 233 | 234 | /// Methods of the wxWidgets' [wxPropertyCategory](http://docs.wxwidgets.org/3.0/classwx_property_category.html) class. 235 | pub trait PropertyCategoryMethods : PGPropertyMethods { 236 | } 237 | 238 | -------------------------------------------------------------------------------- /src/xrc.rs: -------------------------------------------------------------------------------- 1 | use libc::*; 2 | use _unsafe::*; 3 | use base::*; 4 | use core::*; 5 | use advanced::*; 6 | use html::*; 7 | use stc::*; 8 | 9 | /// Wraps the wxWidgets' [wxXmlResource](http://docs.wxwidgets.org/3.0/classwx_xml_resource.html) class. 10 | pub struct XmlResource { ptr: *mut c_void } 11 | impl XmlResourceMethods for XmlResource {} 12 | impl ObjectMethods for XmlResource { fn ptr(&self) -> *mut c_void { self.ptr } } 13 | 14 | impl XmlResource { 15 | pub fn from(ptr: *mut c_void) -> XmlResource { XmlResource { ptr: ptr } } 16 | pub fn null() -> XmlResource { XmlResource::from(0 as *mut c_void) } 17 | 18 | pub fn new(flags: c_int) -> XmlResource { 19 | unsafe { XmlResource::from(wxXmlResource_Create(flags)) } 20 | } 21 | pub fn newFromFile(filemask: &str, flags: c_int) -> XmlResource { 22 | let filemask = strToString(filemask); 23 | unsafe { XmlResource::from(wxXmlResource_CreateFromFile(filemask.ptr(), flags)) } 24 | } 25 | pub fn get() -> XmlResource { 26 | unsafe { XmlResource::from(wxXmlResource_Get()) } 27 | } 28 | } 29 | 30 | /// Methods of the wxWidgets' [wxXmlResource](http://docs.wxwidgets.org/3.0/classwx_xml_resource.html) class. 31 | pub trait XmlResourceMethods : ObjectMethods { 32 | fn addHandler(&self, handler: &T) { 33 | unsafe { wxXmlResource_AddHandler(self.ptr(), handler.ptr()) } 34 | } 35 | fn addSubclassFactory(&self, factory: *mut c_void) { 36 | unsafe { wxXmlResource_AddSubclassFactory(self.ptr(), factory) } 37 | } 38 | fn attachUnknownControl(&self, control: &T, parent: &U) -> c_int { 39 | unsafe { wxXmlResource_AttachUnknownControl(self.ptr(), control.ptr(), parent.ptr()) } 40 | } 41 | fn clearHandlers(&self) { 42 | unsafe { wxXmlResource_ClearHandlers(self.ptr()) } 43 | } 44 | fn compareVersion(&self, major: c_int, minor: c_int, release: c_int, revision: c_int) -> c_int { 45 | unsafe { wxXmlResource_CompareVersion(self.ptr(), major, minor, release, revision) } 46 | } 47 | fn getDomain(&self) -> String { 48 | unsafe { wxString::from(wxXmlResource_GetDomain(self.ptr())).to_str() } 49 | } 50 | fn getFlags(&self) -> c_int { 51 | unsafe { wxXmlResource_GetFlags(self.ptr()) } 52 | } 53 | fn getVersion(&self) -> c_long { 54 | unsafe { wxXmlResource_GetVersion(self.ptr()) } 55 | } 56 | fn getXRCID(&self, str_id: &str) -> c_int { 57 | let str_id = strToString(str_id); 58 | unsafe { wxXmlResource_GetXRCID(self.ptr(), str_id.ptr()) } 59 | } 60 | fn initAllHandlers(&self) { 61 | unsafe { wxXmlResource_InitAllHandlers(self.ptr()) } 62 | } 63 | fn insertHandler(&self, handler: &T) { 64 | unsafe { wxXmlResource_InsertHandler(self.ptr(), handler.ptr()) } 65 | } 66 | fn load(&self, filemask: &str) -> c_int { 67 | let filemask = strToString(filemask); 68 | unsafe { wxXmlResource_Load(self.ptr(), filemask.ptr()) } 69 | } 70 | fn loadBitmap(&self, name: &str, _ref: &T) { 71 | let name = strToString(name); 72 | unsafe { wxXmlResource_LoadBitmap(self.ptr(), name.ptr(), _ref.ptr()) } 73 | } 74 | fn loadDialog(&self, parent: &T, name: &str) -> Dialog { 75 | let name = strToString(name); 76 | unsafe { Dialog::from(wxXmlResource_LoadDialog(self.ptr(), parent.ptr(), name.ptr())) } 77 | } 78 | fn loadFrame(&self, parent: &T, name: &str) -> Frame { 79 | let name = strToString(name); 80 | unsafe { Frame::from(wxXmlResource_LoadFrame(self.ptr(), parent.ptr(), name.ptr())) } 81 | } 82 | fn loadIcon(&self, name: &str, _ref: &T) { 83 | let name = strToString(name); 84 | unsafe { wxXmlResource_LoadIcon(self.ptr(), name.ptr(), _ref.ptr()) } 85 | } 86 | fn loadMenu(&self, name: &str) -> Menu { 87 | let name = strToString(name); 88 | unsafe { Menu::from(wxXmlResource_LoadMenu(self.ptr(), name.ptr())) } 89 | } 90 | fn loadMenuBar(&self, parent: &T, name: &str) -> MenuBar { 91 | let name = strToString(name); 92 | unsafe { MenuBar::from(wxXmlResource_LoadMenuBar(self.ptr(), parent.ptr(), name.ptr())) } 93 | } 94 | fn loadPanel(&self, parent: &T, name: &str) -> Panel { 95 | let name = strToString(name); 96 | unsafe { Panel::from(wxXmlResource_LoadPanel(self.ptr(), parent.ptr(), name.ptr())) } 97 | } 98 | fn loadToolBar(&self, parent: &T, name: &str) -> ToolBar { 99 | let name = strToString(name); 100 | unsafe { ToolBar::from(wxXmlResource_LoadToolBar(self.ptr(), parent.ptr(), name.ptr())) } 101 | } 102 | fn getSizer(&self, str_id: &str) -> Sizer { 103 | let str_id = strToString(str_id); 104 | unsafe { Sizer::from(wxXmlResource_GetSizer(self.ptr(), str_id.ptr())) } 105 | } 106 | fn getBoxSizer(&self, str_id: &str) -> BoxSizer { 107 | let str_id = strToString(str_id); 108 | unsafe { BoxSizer::from(wxXmlResource_GetBoxSizer(self.ptr(), str_id.ptr())) } 109 | } 110 | fn getStaticBoxSizer(&self, str_id: &str) -> StaticBoxSizer { 111 | let str_id = strToString(str_id); 112 | unsafe { StaticBoxSizer::from(wxXmlResource_GetStaticBoxSizer(self.ptr(), str_id.ptr())) } 113 | } 114 | fn getGridSizer(&self, str_id: &str) -> GridSizer { 115 | let str_id = strToString(str_id); 116 | unsafe { GridSizer::from(wxXmlResource_GetGridSizer(self.ptr(), str_id.ptr())) } 117 | } 118 | fn getFlexGridSizer(&self, str_id: &str) -> FlexGridSizer { 119 | let str_id = strToString(str_id); 120 | unsafe { FlexGridSizer::from(wxXmlResource_GetFlexGridSizer(self.ptr(), str_id.ptr())) } 121 | } 122 | fn getBitmapButton(&self, str_id: &str) -> BitmapButton { 123 | let str_id = strToString(str_id); 124 | unsafe { BitmapButton::from(wxXmlResource_GetBitmapButton(self.ptr(), str_id.ptr())) } 125 | } 126 | fn getButton(&self, str_id: &str) -> Button { 127 | let str_id = strToString(str_id); 128 | unsafe { Button::from(wxXmlResource_GetButton(self.ptr(), str_id.ptr())) } 129 | } 130 | fn getCalendarCtrl(&self, str_id: &str) -> CalendarCtrl { 131 | let str_id = strToString(str_id); 132 | unsafe { CalendarCtrl::from(wxXmlResource_GetCalendarCtrl(self.ptr(), str_id.ptr())) } 133 | } 134 | fn getCheckBox(&self, str_id: &str) -> CheckBox { 135 | let str_id = strToString(str_id); 136 | unsafe { CheckBox::from(wxXmlResource_GetCheckBox(self.ptr(), str_id.ptr())) } 137 | } 138 | fn getCheckListBox(&self, str_id: &str) -> CheckListBox { 139 | let str_id = strToString(str_id); 140 | unsafe { CheckListBox::from(wxXmlResource_GetCheckListBox(self.ptr(), str_id.ptr())) } 141 | } 142 | fn getChoice(&self, str_id: &str) -> Choice { 143 | let str_id = strToString(str_id); 144 | unsafe { Choice::from(wxXmlResource_GetChoice(self.ptr(), str_id.ptr())) } 145 | } 146 | fn getComboBox(&self, str_id: &str) -> ComboBox { 147 | let str_id = strToString(str_id); 148 | unsafe { ComboBox::from(wxXmlResource_GetComboBox(self.ptr(), str_id.ptr())) } 149 | } 150 | fn getGauge(&self, str_id: &str) -> Gauge { 151 | let str_id = strToString(str_id); 152 | unsafe { Gauge::from(wxXmlResource_GetGauge(self.ptr(), str_id.ptr())) } 153 | } 154 | fn getGrid(&self, str_id: &str) -> Grid { 155 | let str_id = strToString(str_id); 156 | unsafe { Grid::from(wxXmlResource_GetGrid(self.ptr(), str_id.ptr())) } 157 | } 158 | fn getHtmlWindow(&self, str_id: &str) -> HtmlWindow { 159 | let str_id = strToString(str_id); 160 | unsafe { HtmlWindow::from(wxXmlResource_GetHtmlWindow(self.ptr(), str_id.ptr())) } 161 | } 162 | fn getListBox(&self, str_id: &str) -> ListBox { 163 | let str_id = strToString(str_id); 164 | unsafe { ListBox::from(wxXmlResource_GetListBox(self.ptr(), str_id.ptr())) } 165 | } 166 | fn getListCtrl(&self, str_id: &str) -> ListCtrl { 167 | let str_id = strToString(str_id); 168 | unsafe { ListCtrl::from(wxXmlResource_GetListCtrl(self.ptr(), str_id.ptr())) } 169 | } 170 | fn getMDIChildFrame(&self, str_id: &str) -> MDIChildFrame { 171 | let str_id = strToString(str_id); 172 | unsafe { MDIChildFrame::from(wxXmlResource_GetMDIChildFrame(self.ptr(), str_id.ptr())) } 173 | } 174 | fn getMDIParentFrame(&self, str_id: &str) -> MDIParentFrame { 175 | let str_id = strToString(str_id); 176 | unsafe { MDIParentFrame::from(wxXmlResource_GetMDIParentFrame(self.ptr(), str_id.ptr())) } 177 | } 178 | fn getMenu(&self, str_id: &str) -> Menu { 179 | let str_id = strToString(str_id); 180 | unsafe { Menu::from(wxXmlResource_GetMenu(self.ptr(), str_id.ptr())) } 181 | } 182 | fn getMenuBar(&self, str_id: &str) -> MenuBar { 183 | let str_id = strToString(str_id); 184 | unsafe { MenuBar::from(wxXmlResource_GetMenuBar(self.ptr(), str_id.ptr())) } 185 | } 186 | fn getMenuItem(&self, str_id: &str) -> MenuItem { 187 | let str_id = strToString(str_id); 188 | unsafe { MenuItem::from(wxXmlResource_GetMenuItem(self.ptr(), str_id.ptr())) } 189 | } 190 | fn getNotebook(&self, str_id: &str) -> Notebook { 191 | let str_id = strToString(str_id); 192 | unsafe { Notebook::from(wxXmlResource_GetNotebook(self.ptr(), str_id.ptr())) } 193 | } 194 | fn getPanel(&self, str_id: &str) -> Panel { 195 | let str_id = strToString(str_id); 196 | unsafe { Panel::from(wxXmlResource_GetPanel(self.ptr(), str_id.ptr())) } 197 | } 198 | fn getRadioButton(&self, str_id: &str) -> RadioButton { 199 | let str_id = strToString(str_id); 200 | unsafe { RadioButton::from(wxXmlResource_GetRadioButton(self.ptr(), str_id.ptr())) } 201 | } 202 | fn getRadioBox(&self, str_id: &str) -> RadioBox { 203 | let str_id = strToString(str_id); 204 | unsafe { RadioBox::from(wxXmlResource_GetRadioBox(self.ptr(), str_id.ptr())) } 205 | } 206 | fn getScrollBar(&self, str_id: &str) -> ScrollBar { 207 | let str_id = strToString(str_id); 208 | unsafe { ScrollBar::from(wxXmlResource_GetScrollBar(self.ptr(), str_id.ptr())) } 209 | } 210 | fn getScrolledWindow(&self, str_id: &str) -> ScrolledWindow { 211 | let str_id = strToString(str_id); 212 | unsafe { ScrolledWindow::from(wxXmlResource_GetScrolledWindow(self.ptr(), str_id.ptr())) } 213 | } 214 | fn getSlider(&self, str_id: &str) -> Slider { 215 | let str_id = strToString(str_id); 216 | unsafe { Slider::from(wxXmlResource_GetSlider(self.ptr(), str_id.ptr())) } 217 | } 218 | fn getSpinButton(&self, str_id: &str) -> SpinButton { 219 | let str_id = strToString(str_id); 220 | unsafe { SpinButton::from(wxXmlResource_GetSpinButton(self.ptr(), str_id.ptr())) } 221 | } 222 | fn getSpinCtrl(&self, str_id: &str) -> SpinCtrl { 223 | let str_id = strToString(str_id); 224 | unsafe { SpinCtrl::from(wxXmlResource_GetSpinCtrl(self.ptr(), str_id.ptr())) } 225 | } 226 | fn getSplitterWindow(&self, str_id: &str) -> SplitterWindow { 227 | let str_id = strToString(str_id); 228 | unsafe { SplitterWindow::from(wxXmlResource_GetSplitterWindow(self.ptr(), str_id.ptr())) } 229 | } 230 | fn getStaticBitmap(&self, str_id: &str) -> StaticBitmap { 231 | let str_id = strToString(str_id); 232 | unsafe { StaticBitmap::from(wxXmlResource_GetStaticBitmap(self.ptr(), str_id.ptr())) } 233 | } 234 | fn getStaticBox(&self, str_id: &str) -> StaticBox { 235 | let str_id = strToString(str_id); 236 | unsafe { StaticBox::from(wxXmlResource_GetStaticBox(self.ptr(), str_id.ptr())) } 237 | } 238 | fn getStaticLine(&self, str_id: &str) -> StaticLine { 239 | let str_id = strToString(str_id); 240 | unsafe { StaticLine::from(wxXmlResource_GetStaticLine(self.ptr(), str_id.ptr())) } 241 | } 242 | fn getStaticText(&self, str_id: &str) -> StaticText { 243 | let str_id = strToString(str_id); 244 | unsafe { StaticText::from(wxXmlResource_GetStaticText(self.ptr(), str_id.ptr())) } 245 | } 246 | fn getTextCtrl(&self, str_id: &str) -> TextCtrl { 247 | let str_id = strToString(str_id); 248 | unsafe { TextCtrl::from(wxXmlResource_GetTextCtrl(self.ptr(), str_id.ptr())) } 249 | } 250 | fn getTreeCtrl(&self, str_id: &str) -> TreeCtrl { 251 | let str_id = strToString(str_id); 252 | unsafe { TreeCtrl::from(wxXmlResource_GetTreeCtrl(self.ptr(), str_id.ptr())) } 253 | } 254 | fn unload(&self, filemask: &str) -> c_int { 255 | let filemask = strToString(filemask); 256 | unsafe { wxXmlResource_Unload(self.ptr(), filemask.ptr()) } 257 | } 258 | fn set(&self, res: &T) -> XmlResource { 259 | unsafe { XmlResource::from(wxXmlResource_Set(self.ptr(), res.ptr())) } 260 | } 261 | fn setDomain(&self, domain: &str) { 262 | let domain = strToString(domain); 263 | unsafe { wxXmlResource_SetDomain(self.ptr(), domain.ptr()) } 264 | } 265 | fn setFlags(&self, flags: c_int) { 266 | unsafe { wxXmlResource_SetFlags(self.ptr(), flags) } 267 | } 268 | fn getStyledTextCtrl(&self, str_id: &str) -> StyledTextCtrl { 269 | let str_id = strToString(str_id); 270 | unsafe { StyledTextCtrl::from(wxXmlResource_GetStyledTextCtrl(self.ptr(), str_id.ptr())) } 271 | } 272 | } 273 | 274 | -------------------------------------------------------------------------------- /src/html.rs: -------------------------------------------------------------------------------- 1 | use libc::*; 2 | use _unsafe::*; 3 | use base::*; 4 | use core::*; 5 | 6 | /// Wraps the wxWidgets' [wxHtmlCell](http://docs.wxwidgets.org/3.0/classwx_html_cell.html) class. 7 | pub struct HtmlCell { ptr: *mut c_void } 8 | impl HtmlCellMethods for HtmlCell {} 9 | impl ObjectMethods for HtmlCell { fn ptr(&self) -> *mut c_void { self.ptr } } 10 | 11 | impl HtmlCell { 12 | pub fn from(ptr: *mut c_void) -> HtmlCell { HtmlCell { ptr: ptr } } 13 | pub fn null() -> HtmlCell { HtmlCell::from(0 as *mut c_void) } 14 | 15 | } 16 | 17 | /// Methods of the wxWidgets' [wxHtmlCell](http://docs.wxwidgets.org/3.0/classwx_html_cell.html) class. 18 | pub trait HtmlCellMethods : ObjectMethods { 19 | } 20 | 21 | /// Wraps the wxWidgets' [wxHtmlColourCell](http://docs.wxwidgets.org/3.0/classwx_html_colour_cell.html) class. 22 | pub struct HtmlColourCell { ptr: *mut c_void } 23 | impl HtmlColourCellMethods for HtmlColourCell {} 24 | impl HtmlCellMethods for HtmlColourCell {} 25 | impl ObjectMethods for HtmlColourCell { fn ptr(&self) -> *mut c_void { self.ptr } } 26 | 27 | impl HtmlColourCell { 28 | pub fn from(ptr: *mut c_void) -> HtmlColourCell { HtmlColourCell { ptr: ptr } } 29 | pub fn null() -> HtmlColourCell { HtmlColourCell::from(0 as *mut c_void) } 30 | 31 | } 32 | 33 | /// Methods of the wxWidgets' [wxHtmlColourCell](http://docs.wxwidgets.org/3.0/classwx_html_colour_cell.html) class. 34 | pub trait HtmlColourCellMethods : HtmlCellMethods { 35 | } 36 | 37 | /// Wraps the wxWidgets' [wxHtmlContainerCell](http://docs.wxwidgets.org/3.0/classwx_html_container_cell.html) class. 38 | pub struct HtmlContainerCell { ptr: *mut c_void } 39 | impl HtmlContainerCellMethods for HtmlContainerCell {} 40 | impl HtmlCellMethods for HtmlContainerCell {} 41 | impl ObjectMethods for HtmlContainerCell { fn ptr(&self) -> *mut c_void { self.ptr } } 42 | 43 | impl HtmlContainerCell { 44 | pub fn from(ptr: *mut c_void) -> HtmlContainerCell { HtmlContainerCell { ptr: ptr } } 45 | pub fn null() -> HtmlContainerCell { HtmlContainerCell::from(0 as *mut c_void) } 46 | 47 | } 48 | 49 | /// Methods of the wxWidgets' [wxHtmlContainerCell](http://docs.wxwidgets.org/3.0/classwx_html_container_cell.html) class. 50 | pub trait HtmlContainerCellMethods : HtmlCellMethods { 51 | } 52 | 53 | /// Wraps the wxWidgets' [wxHtmlDCRenderer](http://docs.wxwidgets.org/3.0/classwx_html_dcr_enderer.html) class. 54 | pub struct HtmlDCRenderer { ptr: *mut c_void } 55 | impl HtmlDCRendererMethods for HtmlDCRenderer {} 56 | impl ObjectMethods for HtmlDCRenderer { fn ptr(&self) -> *mut c_void { self.ptr } } 57 | 58 | impl HtmlDCRenderer { 59 | pub fn from(ptr: *mut c_void) -> HtmlDCRenderer { HtmlDCRenderer { ptr: ptr } } 60 | pub fn null() -> HtmlDCRenderer { HtmlDCRenderer::from(0 as *mut c_void) } 61 | 62 | } 63 | 64 | /// Methods of the wxWidgets' [wxHtmlDCRenderer](http://docs.wxwidgets.org/3.0/classwx_html_dcr_enderer.html) class. 65 | pub trait HtmlDCRendererMethods : ObjectMethods { 66 | } 67 | 68 | /// Wraps the wxWidgets' [wxHtmlEasyPrinting](http://docs.wxwidgets.org/3.0/classwx_html_easy_printing.html) class. 69 | pub struct HtmlEasyPrinting { ptr: *mut c_void } 70 | impl HtmlEasyPrintingMethods for HtmlEasyPrinting {} 71 | impl ObjectMethods for HtmlEasyPrinting { fn ptr(&self) -> *mut c_void { self.ptr } } 72 | 73 | impl HtmlEasyPrinting { 74 | pub fn from(ptr: *mut c_void) -> HtmlEasyPrinting { HtmlEasyPrinting { ptr: ptr } } 75 | pub fn null() -> HtmlEasyPrinting { HtmlEasyPrinting::from(0 as *mut c_void) } 76 | 77 | } 78 | 79 | /// Methods of the wxWidgets' [wxHtmlEasyPrinting](http://docs.wxwidgets.org/3.0/classwx_html_easy_printing.html) class. 80 | pub trait HtmlEasyPrintingMethods : ObjectMethods { 81 | } 82 | 83 | /// Wraps the wxWidgets' [wxHtmlFilter](http://docs.wxwidgets.org/3.0/classwx_html_filter.html) class. 84 | pub struct HtmlFilter { ptr: *mut c_void } 85 | impl HtmlFilterMethods for HtmlFilter {} 86 | impl ObjectMethods for HtmlFilter { fn ptr(&self) -> *mut c_void { self.ptr } } 87 | 88 | impl HtmlFilter { 89 | pub fn from(ptr: *mut c_void) -> HtmlFilter { HtmlFilter { ptr: ptr } } 90 | pub fn null() -> HtmlFilter { HtmlFilter::from(0 as *mut c_void) } 91 | 92 | } 93 | 94 | /// Methods of the wxWidgets' [wxHtmlFilter](http://docs.wxwidgets.org/3.0/classwx_html_filter.html) class. 95 | pub trait HtmlFilterMethods : ObjectMethods { 96 | } 97 | 98 | /// Wraps the wxWidgets' [wxHtmlHelpController](http://docs.wxwidgets.org/3.0/classwx_html_help_controller.html) class. 99 | pub struct HtmlHelpController { ptr: *mut c_void } 100 | impl HtmlHelpControllerMethods for HtmlHelpController {} 101 | impl HelpControllerBaseMethods for HtmlHelpController {} 102 | impl ObjectMethods for HtmlHelpController { fn ptr(&self) -> *mut c_void { self.ptr } } 103 | 104 | impl HtmlHelpController { 105 | pub fn from(ptr: *mut c_void) -> HtmlHelpController { HtmlHelpController { ptr: ptr } } 106 | pub fn null() -> HtmlHelpController { HtmlHelpController::from(0 as *mut c_void) } 107 | 108 | pub fn new(_style: c_int) -> HtmlHelpController { 109 | unsafe { HtmlHelpController::from(wxHtmlHelpController_Create(_style)) } 110 | } 111 | } 112 | 113 | /// Methods of the wxWidgets' [wxHtmlHelpController](http://docs.wxwidgets.org/3.0/classwx_html_help_controller.html) class. 114 | pub trait HtmlHelpControllerMethods : HelpControllerBaseMethods { 115 | fn addBook(&self, book: *mut c_void, show_wait_msg: c_int) -> c_int { 116 | unsafe { wxHtmlHelpController_AddBook(self.ptr(), book, show_wait_msg) } 117 | } 118 | fn display(&self, x: *mut c_void) -> c_int { 119 | unsafe { wxHtmlHelpController_Display(self.ptr(), x) } 120 | } 121 | fn displayBlock(&self, blockNo: c_int) -> c_int { 122 | unsafe { wxHtmlHelpController_DisplayBlock(self.ptr(), blockNo) } 123 | } 124 | fn displayContents(&self) -> c_int { 125 | unsafe { wxHtmlHelpController_DisplayContents(self.ptr()) } 126 | } 127 | fn displayIndex(&self) -> c_int { 128 | unsafe { wxHtmlHelpController_DisplayIndex(self.ptr()) } 129 | } 130 | fn displayNumber(&self, id: c_int) -> c_int { 131 | unsafe { wxHtmlHelpController_DisplayNumber(self.ptr(), id) } 132 | } 133 | fn displaySection(&self, section: &str) -> c_int { 134 | let section = strToString(section); 135 | unsafe { wxHtmlHelpController_DisplaySection(self.ptr(), section.ptr()) } 136 | } 137 | fn displaySectionNumber(&self, sectionNo: c_int) -> c_int { 138 | unsafe { wxHtmlHelpController_DisplaySectionNumber(self.ptr(), sectionNo) } 139 | } 140 | fn getFrame(&self) -> Frame { 141 | unsafe { Frame::from(wxHtmlHelpController_GetFrame(self.ptr())) } 142 | } 143 | fn getFrameParameters(&self, title: *mut c_void, width: *mut c_int, height: *mut c_int, pos_x: *mut c_int, pos_y: *mut c_int, newFrameEachTime: *mut c_int) -> *mut c_void { 144 | unsafe { wxHtmlHelpController_GetFrameParameters(self.ptr(), title, width, height, pos_x, pos_y, newFrameEachTime) } 145 | } 146 | fn initialize(&self, file: &str) -> c_int { 147 | let file = strToString(file); 148 | unsafe { wxHtmlHelpController_Initialize(self.ptr(), file.ptr()) } 149 | } 150 | fn keywordSearch(&self, keyword: &str) -> c_int { 151 | let keyword = strToString(keyword); 152 | unsafe { wxHtmlHelpController_KeywordSearch(self.ptr(), keyword.ptr()) } 153 | } 154 | fn loadFile(&self, file: &str) -> c_int { 155 | let file = strToString(file); 156 | unsafe { wxHtmlHelpController_LoadFile(self.ptr(), file.ptr()) } 157 | } 158 | fn quit(&self) -> c_int { 159 | unsafe { wxHtmlHelpController_Quit(self.ptr()) } 160 | } 161 | fn readCustomization(&self, cfg: &T, path: &str) { 162 | let path = strToString(path); 163 | unsafe { wxHtmlHelpController_ReadCustomization(self.ptr(), cfg.ptr(), path.ptr()) } 164 | } 165 | fn setFrameParameters(&self, title: *mut c_void, width: c_int, height: c_int, pos_x: c_int, pos_y: c_int, newFrameEachTime: c_int) { 166 | unsafe { wxHtmlHelpController_SetFrameParameters(self.ptr(), title, width, height, pos_x, pos_y, newFrameEachTime) } 167 | } 168 | fn setTempDir(&self, path: &str) { 169 | let path = strToString(path); 170 | unsafe { wxHtmlHelpController_SetTempDir(self.ptr(), path.ptr()) } 171 | } 172 | fn setTitleFormat(&self, format: *mut c_void) { 173 | unsafe { wxHtmlHelpController_SetTitleFormat(self.ptr(), format) } 174 | } 175 | fn setViewer(&self, viewer: &str, flags: c_int) { 176 | let viewer = strToString(viewer); 177 | unsafe { wxHtmlHelpController_SetViewer(self.ptr(), viewer.ptr(), flags) } 178 | } 179 | fn useConfig(&self, config: &T, rootpath: &str) { 180 | let rootpath = strToString(rootpath); 181 | unsafe { wxHtmlHelpController_UseConfig(self.ptr(), config.ptr(), rootpath.ptr()) } 182 | } 183 | fn writeCustomization(&self, cfg: &T, path: &str) { 184 | let path = strToString(path); 185 | unsafe { wxHtmlHelpController_WriteCustomization(self.ptr(), cfg.ptr(), path.ptr()) } 186 | } 187 | } 188 | 189 | /// Wraps the wxWidgets' [wxHtmlHelpData](http://docs.wxwidgets.org/3.0/classwx_html_help_data.html) class. 190 | pub struct HtmlHelpData { ptr: *mut c_void } 191 | impl HtmlHelpDataMethods for HtmlHelpData {} 192 | impl ObjectMethods for HtmlHelpData { fn ptr(&self) -> *mut c_void { self.ptr } } 193 | 194 | impl HtmlHelpData { 195 | pub fn from(ptr: *mut c_void) -> HtmlHelpData { HtmlHelpData { ptr: ptr } } 196 | pub fn null() -> HtmlHelpData { HtmlHelpData::from(0 as *mut c_void) } 197 | 198 | } 199 | 200 | /// Methods of the wxWidgets' [wxHtmlHelpData](http://docs.wxwidgets.org/3.0/classwx_html_help_data.html) class. 201 | pub trait HtmlHelpDataMethods : ObjectMethods { 202 | } 203 | 204 | /// Wraps the wxWidgets' [wxHtmlHelpFrame](http://docs.wxwidgets.org/3.0/classwx_html_help_frame.html) class. 205 | pub struct HtmlHelpFrame { ptr: *mut c_void } 206 | impl HtmlHelpFrameMethods for HtmlHelpFrame {} 207 | impl FrameMethods for HtmlHelpFrame {} 208 | impl TopLevelWindowMethods for HtmlHelpFrame {} 209 | impl WindowMethods for HtmlHelpFrame {} 210 | impl EvtHandlerMethods for HtmlHelpFrame {} 211 | impl ObjectMethods for HtmlHelpFrame { fn ptr(&self) -> *mut c_void { self.ptr } } 212 | 213 | impl HtmlHelpFrame { 214 | pub fn from(ptr: *mut c_void) -> HtmlHelpFrame { HtmlHelpFrame { ptr: ptr } } 215 | pub fn null() -> HtmlHelpFrame { HtmlHelpFrame::from(0 as *mut c_void) } 216 | 217 | } 218 | 219 | /// Methods of the wxWidgets' [wxHtmlHelpFrame](http://docs.wxwidgets.org/3.0/classwx_html_help_frame.html) class. 220 | pub trait HtmlHelpFrameMethods : FrameMethods { 221 | } 222 | 223 | /// Wraps the wxWidgets' [wxHtmlLinkInfo](http://docs.wxwidgets.org/3.0/classwx_html_link_info.html) class. 224 | pub struct HtmlLinkInfo { ptr: *mut c_void } 225 | impl HtmlLinkInfoMethods for HtmlLinkInfo {} 226 | impl ObjectMethods for HtmlLinkInfo { fn ptr(&self) -> *mut c_void { self.ptr } } 227 | 228 | impl HtmlLinkInfo { 229 | pub fn from(ptr: *mut c_void) -> HtmlLinkInfo { HtmlLinkInfo { ptr: ptr } } 230 | pub fn null() -> HtmlLinkInfo { HtmlLinkInfo::from(0 as *mut c_void) } 231 | 232 | } 233 | 234 | /// Methods of the wxWidgets' [wxHtmlLinkInfo](http://docs.wxwidgets.org/3.0/classwx_html_link_info.html) class. 235 | pub trait HtmlLinkInfoMethods : ObjectMethods { 236 | } 237 | 238 | /// Wraps the wxWidgets' [wxHtmlParser](http://docs.wxwidgets.org/3.0/classwx_html_parser.html) class. 239 | pub struct HtmlParser { ptr: *mut c_void } 240 | impl HtmlParserMethods for HtmlParser {} 241 | impl ObjectMethods for HtmlParser { fn ptr(&self) -> *mut c_void { self.ptr } } 242 | 243 | impl HtmlParser { 244 | pub fn from(ptr: *mut c_void) -> HtmlParser { HtmlParser { ptr: ptr } } 245 | pub fn null() -> HtmlParser { HtmlParser::from(0 as *mut c_void) } 246 | 247 | } 248 | 249 | /// Methods of the wxWidgets' [wxHtmlParser](http://docs.wxwidgets.org/3.0/classwx_html_parser.html) class. 250 | pub trait HtmlParserMethods : ObjectMethods { 251 | } 252 | 253 | /// Wraps the wxWidgets' [wxHtmlPrintout](http://docs.wxwidgets.org/3.0/classwx_html_printout.html) class. 254 | pub struct HtmlPrintout { ptr: *mut c_void } 255 | impl HtmlPrintoutMethods for HtmlPrintout {} 256 | impl PrintoutMethods for HtmlPrintout {} 257 | impl ObjectMethods for HtmlPrintout { fn ptr(&self) -> *mut c_void { self.ptr } } 258 | 259 | impl HtmlPrintout { 260 | pub fn from(ptr: *mut c_void) -> HtmlPrintout { HtmlPrintout { ptr: ptr } } 261 | pub fn null() -> HtmlPrintout { HtmlPrintout::from(0 as *mut c_void) } 262 | 263 | } 264 | 265 | /// Methods of the wxWidgets' [wxHtmlPrintout](http://docs.wxwidgets.org/3.0/classwx_html_printout.html) class. 266 | pub trait HtmlPrintoutMethods : PrintoutMethods { 267 | } 268 | 269 | /// Wraps the wxWidgets' [wxHtmlTag](http://docs.wxwidgets.org/3.0/classwx_html_tag.html) class. 270 | pub struct HtmlTag { ptr: *mut c_void } 271 | impl HtmlTagMethods for HtmlTag {} 272 | impl ObjectMethods for HtmlTag { fn ptr(&self) -> *mut c_void { self.ptr } } 273 | 274 | impl HtmlTag { 275 | pub fn from(ptr: *mut c_void) -> HtmlTag { HtmlTag { ptr: ptr } } 276 | pub fn null() -> HtmlTag { HtmlTag::from(0 as *mut c_void) } 277 | 278 | } 279 | 280 | /// Methods of the wxWidgets' [wxHtmlTag](http://docs.wxwidgets.org/3.0/classwx_html_tag.html) class. 281 | pub trait HtmlTagMethods : ObjectMethods { 282 | } 283 | 284 | /// Wraps the wxWidgets' [wxHtmlTagHandler](http://docs.wxwidgets.org/3.0/classwx_html_tag_handler.html) class. 285 | pub struct HtmlTagHandler { ptr: *mut c_void } 286 | impl HtmlTagHandlerMethods for HtmlTagHandler {} 287 | impl ObjectMethods for HtmlTagHandler { fn ptr(&self) -> *mut c_void { self.ptr } } 288 | 289 | impl HtmlTagHandler { 290 | pub fn from(ptr: *mut c_void) -> HtmlTagHandler { HtmlTagHandler { ptr: ptr } } 291 | pub fn null() -> HtmlTagHandler { HtmlTagHandler::from(0 as *mut c_void) } 292 | 293 | } 294 | 295 | /// Methods of the wxWidgets' [wxHtmlTagHandler](http://docs.wxwidgets.org/3.0/classwx_html_tag_handler.html) class. 296 | pub trait HtmlTagHandlerMethods : ObjectMethods { 297 | } 298 | 299 | /// Wraps the wxWidgets' [wxHtmlTagsModule](http://docs.wxwidgets.org/3.0/classwx_html_tags_module.html) class. 300 | pub struct HtmlTagsModule { ptr: *mut c_void } 301 | impl HtmlTagsModuleMethods for HtmlTagsModule {} 302 | impl ModuleMethods for HtmlTagsModule {} 303 | impl ObjectMethods for HtmlTagsModule { fn ptr(&self) -> *mut c_void { self.ptr } } 304 | 305 | impl HtmlTagsModule { 306 | pub fn from(ptr: *mut c_void) -> HtmlTagsModule { HtmlTagsModule { ptr: ptr } } 307 | pub fn null() -> HtmlTagsModule { HtmlTagsModule::from(0 as *mut c_void) } 308 | 309 | } 310 | 311 | /// Methods of the wxWidgets' [wxHtmlTagsModule](http://docs.wxwidgets.org/3.0/classwx_html_tags_module.html) class. 312 | pub trait HtmlTagsModuleMethods : ModuleMethods { 313 | } 314 | 315 | /// Wraps the wxWidgets' [wxHtmlWidgetCell](http://docs.wxwidgets.org/3.0/classwx_html_widget_cell.html) class. 316 | pub struct HtmlWidgetCell { ptr: *mut c_void } 317 | impl HtmlWidgetCellMethods for HtmlWidgetCell {} 318 | impl HtmlCellMethods for HtmlWidgetCell {} 319 | impl ObjectMethods for HtmlWidgetCell { fn ptr(&self) -> *mut c_void { self.ptr } } 320 | 321 | impl HtmlWidgetCell { 322 | pub fn from(ptr: *mut c_void) -> HtmlWidgetCell { HtmlWidgetCell { ptr: ptr } } 323 | pub fn null() -> HtmlWidgetCell { HtmlWidgetCell::from(0 as *mut c_void) } 324 | 325 | } 326 | 327 | /// Methods of the wxWidgets' [wxHtmlWidgetCell](http://docs.wxwidgets.org/3.0/classwx_html_widget_cell.html) class. 328 | pub trait HtmlWidgetCellMethods : HtmlCellMethods { 329 | } 330 | 331 | /// Wraps the wxWidgets' [wxHtmlWinParser](http://docs.wxwidgets.org/3.0/classwx_html_win_parser.html) class. 332 | pub struct HtmlWinParser { ptr: *mut c_void } 333 | impl HtmlWinParserMethods for HtmlWinParser {} 334 | impl HtmlParserMethods for HtmlWinParser {} 335 | impl ObjectMethods for HtmlWinParser { fn ptr(&self) -> *mut c_void { self.ptr } } 336 | 337 | impl HtmlWinParser { 338 | pub fn from(ptr: *mut c_void) -> HtmlWinParser { HtmlWinParser { ptr: ptr } } 339 | pub fn null() -> HtmlWinParser { HtmlWinParser::from(0 as *mut c_void) } 340 | 341 | } 342 | 343 | /// Methods of the wxWidgets' [wxHtmlWinParser](http://docs.wxwidgets.org/3.0/classwx_html_win_parser.html) class. 344 | pub trait HtmlWinParserMethods : HtmlParserMethods { 345 | } 346 | 347 | /// Wraps the wxWidgets' [wxHtmlWinTagHandler](http://docs.wxwidgets.org/3.0/classwx_html_win_tag_handler.html) class. 348 | pub struct HtmlWinTagHandler { ptr: *mut c_void } 349 | impl HtmlWinTagHandlerMethods for HtmlWinTagHandler {} 350 | impl HtmlTagHandlerMethods for HtmlWinTagHandler {} 351 | impl ObjectMethods for HtmlWinTagHandler { fn ptr(&self) -> *mut c_void { self.ptr } } 352 | 353 | impl HtmlWinTagHandler { 354 | pub fn from(ptr: *mut c_void) -> HtmlWinTagHandler { HtmlWinTagHandler { ptr: ptr } } 355 | pub fn null() -> HtmlWinTagHandler { HtmlWinTagHandler::from(0 as *mut c_void) } 356 | 357 | } 358 | 359 | /// Methods of the wxWidgets' [wxHtmlWinTagHandler](http://docs.wxwidgets.org/3.0/classwx_html_win_tag_handler.html) class. 360 | pub trait HtmlWinTagHandlerMethods : HtmlTagHandlerMethods { 361 | } 362 | 363 | /// Wraps the wxWidgets' [wxHtmlWindow](http://docs.wxwidgets.org/3.0/classwx_html_window.html) class. 364 | /// Rather use the wxRust-specific [CHtmlWindow](struct.CHtmlWindow.html) class. 365 | pub struct HtmlWindow { ptr: *mut c_void } 366 | impl HtmlWindowMethods for HtmlWindow {} 367 | impl ScrolledWindowMethods for HtmlWindow {} 368 | impl PanelMethods for HtmlWindow {} 369 | impl WindowMethods for HtmlWindow {} 370 | impl EvtHandlerMethods for HtmlWindow {} 371 | impl ObjectMethods for HtmlWindow { fn ptr(&self) -> *mut c_void { self.ptr } } 372 | 373 | impl HtmlWindow { 374 | pub fn from(ptr: *mut c_void) -> HtmlWindow { HtmlWindow { ptr: ptr } } 375 | pub fn null() -> HtmlWindow { HtmlWindow::from(0 as *mut c_void) } 376 | 377 | pub fn new(_prt: &T, _id: c_int, _lft: c_int, _top: c_int, _wdt: c_int, _hgt: c_int, _stl: c_int, _txt: &str) -> HtmlWindow { 378 | let _txt = strToString(_txt); 379 | unsafe { HtmlWindow::from(wxHtmlWindow_Create(_prt.ptr(), _id, _lft, _top, _wdt, _hgt, _stl, _txt.ptr())) } 380 | } 381 | } 382 | 383 | /// Methods of the wxWidgets' [wxHtmlWindow](http://docs.wxwidgets.org/3.0/classwx_html_window.html) class. 384 | pub trait HtmlWindowMethods : ScrolledWindowMethods { 385 | fn appendToPage(&self, source: &str) -> c_int { 386 | let source = strToString(source); 387 | unsafe { wxHtmlWindow_AppendToPage(self.ptr(), source.ptr()) } 388 | } 389 | fn getInternalRepresentation(&self) -> HtmlContainerCell { 390 | unsafe { HtmlContainerCell::from(wxHtmlWindow_GetInternalRepresentation(self.ptr())) } 391 | } 392 | fn getOpenedAnchor(&self) -> String { 393 | unsafe { wxString::from(wxHtmlWindow_GetOpenedAnchor(self.ptr())).to_str() } 394 | } 395 | fn getOpenedPage(&self) -> String { 396 | unsafe { wxString::from(wxHtmlWindow_GetOpenedPage(self.ptr())).to_str() } 397 | } 398 | fn getOpenedPageTitle(&self) -> String { 399 | unsafe { wxString::from(wxHtmlWindow_GetOpenedPageTitle(self.ptr())).to_str() } 400 | } 401 | fn getRelatedFrame(&self) -> Frame { 402 | unsafe { Frame::from(wxHtmlWindow_GetRelatedFrame(self.ptr())) } 403 | } 404 | fn historyBack(&self) -> c_int { 405 | unsafe { wxHtmlWindow_HistoryBack(self.ptr()) } 406 | } 407 | fn historyCanBack(&self) -> c_int { 408 | unsafe { wxHtmlWindow_HistoryCanBack(self.ptr()) } 409 | } 410 | fn historyCanForward(&self) -> c_int { 411 | unsafe { wxHtmlWindow_HistoryCanForward(self.ptr()) } 412 | } 413 | fn historyClear(&self) { 414 | unsafe { wxHtmlWindow_HistoryClear(self.ptr()) } 415 | } 416 | fn historyForward(&self) -> c_int { 417 | unsafe { wxHtmlWindow_HistoryForward(self.ptr()) } 418 | } 419 | fn loadPage(&self, location: &str) -> c_int { 420 | let location = strToString(location); 421 | unsafe { wxHtmlWindow_LoadPage(self.ptr(), location.ptr()) } 422 | } 423 | fn readCustomization(&self, cfg: &T, path: &str) { 424 | let path = strToString(path); 425 | unsafe { wxHtmlWindow_ReadCustomization(self.ptr(), cfg.ptr(), path.ptr()) } 426 | } 427 | fn setBorders(&self, b: c_int) { 428 | unsafe { wxHtmlWindow_SetBorders(self.ptr(), b) } 429 | } 430 | fn setFonts(&self, normal_face: &str, fixed_face: &str, sizes: *mut c_int) { 431 | let normal_face = strToString(normal_face); 432 | let fixed_face = strToString(fixed_face); 433 | unsafe { wxHtmlWindow_SetFonts(self.ptr(), normal_face.ptr(), fixed_face.ptr(), sizes) } 434 | } 435 | fn setPage(&self, source: &str) { 436 | let source = strToString(source); 437 | unsafe { wxHtmlWindow_SetPage(self.ptr(), source.ptr()) } 438 | } 439 | fn setRelatedFrame(&self, frame: &T, format: &str) { 440 | let format = strToString(format); 441 | unsafe { wxHtmlWindow_SetRelatedFrame(self.ptr(), frame.ptr(), format.ptr()) } 442 | } 443 | fn setRelatedStatusBar(&self, bar: c_int) { 444 | unsafe { wxHtmlWindow_SetRelatedStatusBar(self.ptr(), bar) } 445 | } 446 | fn writeCustomization(&self, cfg: &T, path: &str) { 447 | let path = strToString(path); 448 | unsafe { wxHtmlWindow_WriteCustomization(self.ptr(), cfg.ptr(), path.ptr()) } 449 | } 450 | } 451 | 452 | /// The wxRust-specific derived class of [wxCommandEvent](http://docs.wxwidgets.org/3.0/classwx_command_event.html). 453 | pub struct RustHtmlEvent { ptr: *mut c_void } 454 | impl RustHtmlEventMethods for RustHtmlEvent {} 455 | impl CommandEventMethods for RustHtmlEvent {} 456 | impl EventMethods for RustHtmlEvent {} 457 | impl ObjectMethods for RustHtmlEvent { fn ptr(&self) -> *mut c_void { self.ptr } } 458 | 459 | impl RustHtmlEvent { 460 | pub fn from(ptr: *mut c_void) -> RustHtmlEvent { RustHtmlEvent { ptr: ptr } } 461 | pub fn null() -> RustHtmlEvent { RustHtmlEvent::from(0 as *mut c_void) } 462 | 463 | } 464 | 465 | /// Methods of the wxRust-specific derived class of [wxCommandEvent](http://docs.wxwidgets.org/3.0/classwx_command_event.html). 466 | pub trait RustHtmlEventMethods : CommandEventMethods { 467 | fn getMouseEvent(&self) -> MouseEvent { 468 | unsafe { MouseEvent::from(wxcHtmlEvent_GetMouseEvent(self.ptr())) } 469 | } 470 | fn getHtmlCell(&self) -> HtmlCell { 471 | unsafe { HtmlCell::from(wxcHtmlEvent_GetHtmlCell(self.ptr())) } 472 | } 473 | fn getHtmlCellId(&self) -> String { 474 | unsafe { wxString::from(wxcHtmlEvent_GetHtmlCellId(self.ptr())).to_str() } 475 | } 476 | fn getHref(&self) -> String { 477 | unsafe { wxString::from(wxcHtmlEvent_GetHref(self.ptr())).to_str() } 478 | } 479 | fn getTarget(&self) -> String { 480 | unsafe { wxString::from(wxcHtmlEvent_GetTarget(self.ptr())).to_str() } 481 | } 482 | fn getLogicalPosition(&self) -> Point { 483 | unsafe { Point::from(wxcHtmlEvent_GetLogicalPosition(self.ptr())) } 484 | } 485 | } 486 | 487 | /// The wxRust-specific derived class of [wxHtmlWindow](http://docs.wxwidgets.org/3.0/classwx_html_window.html). 488 | pub struct RustHtmlWindow { ptr: *mut c_void } 489 | impl RustHtmlWindowMethods for RustHtmlWindow {} 490 | impl HtmlWindowMethods for RustHtmlWindow {} 491 | impl ScrolledWindowMethods for RustHtmlWindow {} 492 | impl PanelMethods for RustHtmlWindow {} 493 | impl WindowMethods for RustHtmlWindow {} 494 | impl EvtHandlerMethods for RustHtmlWindow {} 495 | impl ObjectMethods for RustHtmlWindow { fn ptr(&self) -> *mut c_void { self.ptr } } 496 | 497 | impl RustHtmlWindow { 498 | pub fn from(ptr: *mut c_void) -> RustHtmlWindow { RustHtmlWindow { ptr: ptr } } 499 | pub fn null() -> RustHtmlWindow { RustHtmlWindow::from(0 as *mut c_void) } 500 | 501 | pub fn new(_prt: &T, _id: c_int, _lft: c_int, _top: c_int, _wdt: c_int, _hgt: c_int, _stl: c_int, _txt: &str) -> RustHtmlWindow { 502 | let _txt = strToString(_txt); 503 | unsafe { RustHtmlWindow::from(wxcHtmlWindow_Create(_prt.ptr(), _id, _lft, _top, _wdt, _hgt, _stl, _txt.ptr())) } 504 | } 505 | } 506 | 507 | /// Methods of the wxRust-specific derived class of [wxHtmlWindow](http://docs.wxwidgets.org/3.0/classwx_html_window.html). 508 | pub trait RustHtmlWindowMethods : HtmlWindowMethods { 509 | } 510 | 511 | -------------------------------------------------------------------------------- /src/_unavailable.rs: -------------------------------------------------------------------------------- 1 | use libc::*; 2 | use base::*; 3 | use core::*; 4 | 5 | pub struct RustMessageParameters { ptr: *mut c_void } 6 | impl RustMessageParametersMethods for RustMessageParameters { fn ptr(&self) -> *mut c_void { self.ptr } } 7 | 8 | impl RustMessageParameters { 9 | pub fn from(ptr: *mut c_void) -> RustMessageParameters { RustMessageParameters { ptr: ptr } } 10 | pub fn null() -> RustMessageParameters { RustMessageParameters::from(0 as *mut c_void) } 11 | 12 | } 13 | 14 | pub trait RustMessageParametersMethods { 15 | fn ptr(&self) -> *mut c_void; 16 | 17 | } 18 | 19 | /// The wxRust-specific derived class of [wxPlotCurve](http://docs.wxwidgets.org/3.0/classwx_plot_curve.html). 20 | pub struct RustPlotCurve { ptr: *mut c_void } 21 | impl RustPlotCurveMethods for RustPlotCurve {} 22 | impl PlotCurveMethods for RustPlotCurve {} 23 | impl ObjectMethods for RustPlotCurve { fn ptr(&self) -> *mut c_void { self.ptr } } 24 | 25 | impl RustPlotCurve { 26 | pub fn from(ptr: *mut c_void) -> RustPlotCurve { RustPlotCurve { ptr: ptr } } 27 | pub fn null() -> RustPlotCurve { RustPlotCurve::from(0 as *mut c_void) } 28 | 29 | } 30 | 31 | /// Methods of the wxRust-specific derived class of [wxPlotCurve](http://docs.wxwidgets.org/3.0/classwx_plot_curve.html). 32 | pub trait RustPlotCurveMethods : PlotCurveMethods { 33 | } 34 | 35 | /// Wraps the wxWidgets' [wxDynToolInfo](http://docs.wxwidgets.org/3.0/classwx_dyn_tool_info.html) class. 36 | pub struct DynToolInfo { ptr: *mut c_void } 37 | impl DynToolInfoMethods for DynToolInfo {} 38 | impl ToolLayoutItemMethods for DynToolInfo {} 39 | impl ObjectMethods for DynToolInfo { fn ptr(&self) -> *mut c_void { self.ptr } } 40 | 41 | impl DynToolInfo { 42 | pub fn from(ptr: *mut c_void) -> DynToolInfo { DynToolInfo { ptr: ptr } } 43 | pub fn null() -> DynToolInfo { DynToolInfo::from(0 as *mut c_void) } 44 | 45 | } 46 | 47 | /// Methods of the wxWidgets' [wxDynToolInfo](http://docs.wxwidgets.org/3.0/classwx_dyn_tool_info.html) class. 48 | pub trait DynToolInfoMethods : ToolLayoutItemMethods { 49 | } 50 | 51 | /// Wraps the wxWidgets' [wxDynamicSashWindow](http://docs.wxwidgets.org/3.0/classwx_dynamic_sash_window.html) class. 52 | pub struct DynamicSashWindow { ptr: *mut c_void } 53 | impl DynamicSashWindowMethods for DynamicSashWindow {} 54 | impl WindowMethods for DynamicSashWindow {} 55 | impl EvtHandlerMethods for DynamicSashWindow {} 56 | impl ObjectMethods for DynamicSashWindow { fn ptr(&self) -> *mut c_void { self.ptr } } 57 | 58 | impl DynamicSashWindow { 59 | pub fn from(ptr: *mut c_void) -> DynamicSashWindow { DynamicSashWindow { ptr: ptr } } 60 | pub fn null() -> DynamicSashWindow { DynamicSashWindow::from(0 as *mut c_void) } 61 | 62 | } 63 | 64 | /// Methods of the wxWidgets' [wxDynamicSashWindow](http://docs.wxwidgets.org/3.0/classwx_dynamic_sash_window.html) class. 65 | pub trait DynamicSashWindowMethods : WindowMethods { 66 | } 67 | 68 | /// Wraps the wxWidgets' [wxDynamicToolBar](http://docs.wxwidgets.org/3.0/classwx_dynamic_tool_bar.html) class. 69 | pub struct DynamicToolBar { ptr: *mut c_void } 70 | impl DynamicToolBarMethods for DynamicToolBar {} 71 | impl ToolBarBaseMethods for DynamicToolBar {} 72 | impl ControlMethods for DynamicToolBar {} 73 | impl WindowMethods for DynamicToolBar {} 74 | impl EvtHandlerMethods for DynamicToolBar {} 75 | impl ObjectMethods for DynamicToolBar { fn ptr(&self) -> *mut c_void { self.ptr } } 76 | 77 | impl DynamicToolBar { 78 | pub fn from(ptr: *mut c_void) -> DynamicToolBar { DynamicToolBar { ptr: ptr } } 79 | pub fn null() -> DynamicToolBar { DynamicToolBar::from(0 as *mut c_void) } 80 | 81 | } 82 | 83 | /// Methods of the wxWidgets' [wxDynamicToolBar](http://docs.wxwidgets.org/3.0/classwx_dynamic_tool_bar.html) class. 84 | pub trait DynamicToolBarMethods : ToolBarBaseMethods { 85 | } 86 | 87 | /// Wraps the wxWidgets' [wxExpr](http://docs.wxwidgets.org/3.0/classwx_expr.html) class. 88 | pub struct Expr { ptr: *mut c_void } 89 | impl ExprMethods for Expr { fn ptr(&self) -> *mut c_void { self.ptr } } 90 | 91 | impl Expr { 92 | pub fn from(ptr: *mut c_void) -> Expr { Expr { ptr: ptr } } 93 | pub fn null() -> Expr { Expr::from(0 as *mut c_void) } 94 | 95 | } 96 | 97 | /// Methods of the wxWidgets' [wxExpr](http://docs.wxwidgets.org/3.0/classwx_expr.html) class. 98 | pub trait ExprMethods { 99 | fn ptr(&self) -> *mut c_void; 100 | 101 | } 102 | 103 | /// Wraps the wxWidgets' [wxExprDatabase](http://docs.wxwidgets.org/3.0/classwx_expr_database.html) class. 104 | pub struct ExprDatabase { ptr: *mut c_void } 105 | impl ExprDatabaseMethods for ExprDatabase {} 106 | impl ListMethods for ExprDatabase {} 107 | impl ObjectMethods for ExprDatabase { fn ptr(&self) -> *mut c_void { self.ptr } } 108 | 109 | impl ExprDatabase { 110 | pub fn from(ptr: *mut c_void) -> ExprDatabase { ExprDatabase { ptr: ptr } } 111 | pub fn null() -> ExprDatabase { ExprDatabase::from(0 as *mut c_void) } 112 | 113 | } 114 | 115 | /// Methods of the wxWidgets' [wxExprDatabase](http://docs.wxwidgets.org/3.0/classwx_expr_database.html) class. 116 | pub trait ExprDatabaseMethods : ListMethods { 117 | } 118 | 119 | /// Wraps the wxWidgets' [wxFrameLayout](http://docs.wxwidgets.org/3.0/classwx_frame_layout.html) class. 120 | pub struct FrameLayout { ptr: *mut c_void } 121 | impl FrameLayoutMethods for FrameLayout {} 122 | impl EvtHandlerMethods for FrameLayout {} 123 | impl ObjectMethods for FrameLayout { fn ptr(&self) -> *mut c_void { self.ptr } } 124 | 125 | impl FrameLayout { 126 | pub fn from(ptr: *mut c_void) -> FrameLayout { FrameLayout { ptr: ptr } } 127 | pub fn null() -> FrameLayout { FrameLayout::from(0 as *mut c_void) } 128 | 129 | } 130 | 131 | /// Methods of the wxWidgets' [wxFrameLayout](http://docs.wxwidgets.org/3.0/classwx_frame_layout.html) class. 132 | pub trait FrameLayoutMethods : EvtHandlerMethods { 133 | } 134 | 135 | /// Wraps the wxWidgets' [wxHashMap](http://docs.wxwidgets.org/3.0/classwx_hash_map.html) class. 136 | pub struct HashMap { ptr: *mut c_void } 137 | impl HashMapMethods for HashMap { fn ptr(&self) -> *mut c_void { self.ptr } } 138 | 139 | impl HashMap { 140 | pub fn from(ptr: *mut c_void) -> HashMap { HashMap { ptr: ptr } } 141 | pub fn null() -> HashMap { HashMap::from(0 as *mut c_void) } 142 | 143 | } 144 | 145 | /// Methods of the wxWidgets' [wxHashMap](http://docs.wxwidgets.org/3.0/classwx_hash_map.html) class. 146 | pub trait HashMapMethods { 147 | fn ptr(&self) -> *mut c_void; 148 | 149 | } 150 | 151 | /// Wraps the wxWidgets' [wxLEDNumberCtrl](http://docs.wxwidgets.org/3.0/classwx_ledn_umber_ctrl.html) class. 152 | pub struct LEDNumberCtrl { ptr: *mut c_void } 153 | impl LEDNumberCtrlMethods for LEDNumberCtrl {} 154 | impl ControlMethods for LEDNumberCtrl {} 155 | impl WindowMethods for LEDNumberCtrl {} 156 | impl EvtHandlerMethods for LEDNumberCtrl {} 157 | impl ObjectMethods for LEDNumberCtrl { fn ptr(&self) -> *mut c_void { self.ptr } } 158 | 159 | impl LEDNumberCtrl { 160 | pub fn from(ptr: *mut c_void) -> LEDNumberCtrl { LEDNumberCtrl { ptr: ptr } } 161 | pub fn null() -> LEDNumberCtrl { LEDNumberCtrl::from(0 as *mut c_void) } 162 | 163 | } 164 | 165 | /// Methods of the wxWidgets' [wxLEDNumberCtrl](http://docs.wxwidgets.org/3.0/classwx_ledn_umber_ctrl.html) class. 166 | pub trait LEDNumberCtrlMethods : ControlMethods { 167 | } 168 | 169 | /// Wraps the wxWidgets' [wxMBConvFile](http://docs.wxwidgets.org/3.0/classwx_mbc_onv_file.html) class. 170 | pub struct MBConvFile { ptr: *mut c_void } 171 | impl MBConvFileMethods for MBConvFile {} 172 | impl MBConvMethods for MBConvFile { fn ptr(&self) -> *mut c_void { self.ptr } } 173 | 174 | impl MBConvFile { 175 | pub fn from(ptr: *mut c_void) -> MBConvFile { MBConvFile { ptr: ptr } } 176 | pub fn null() -> MBConvFile { MBConvFile::from(0 as *mut c_void) } 177 | 178 | } 179 | 180 | /// Methods of the wxWidgets' [wxMBConvFile](http://docs.wxwidgets.org/3.0/classwx_mbc_onv_file.html) class. 181 | pub trait MBConvFileMethods : MBConvMethods { 182 | } 183 | 184 | /// Wraps the wxWidgets' [wxMultiCellCanvas](http://docs.wxwidgets.org/3.0/classwx_multi_cell_canvas.html) class. 185 | pub struct MultiCellCanvas { ptr: *mut c_void } 186 | impl MultiCellCanvasMethods for MultiCellCanvas {} 187 | impl FlexGridSizerMethods for MultiCellCanvas {} 188 | impl GridSizerMethods for MultiCellCanvas {} 189 | impl SizerMethods for MultiCellCanvas {} 190 | impl ObjectMethods for MultiCellCanvas { fn ptr(&self) -> *mut c_void { self.ptr } } 191 | 192 | impl MultiCellCanvas { 193 | pub fn from(ptr: *mut c_void) -> MultiCellCanvas { MultiCellCanvas { ptr: ptr } } 194 | pub fn null() -> MultiCellCanvas { MultiCellCanvas::from(0 as *mut c_void) } 195 | 196 | } 197 | 198 | /// Methods of the wxWidgets' [wxMultiCellCanvas](http://docs.wxwidgets.org/3.0/classwx_multi_cell_canvas.html) class. 199 | pub trait MultiCellCanvasMethods : FlexGridSizerMethods { 200 | } 201 | 202 | /// Wraps the wxWidgets' [wxMultiCellItemHandle](http://docs.wxwidgets.org/3.0/classwx_multi_cell_item_handle.html) class. 203 | pub struct MultiCellItemHandle { ptr: *mut c_void } 204 | impl MultiCellItemHandleMethods for MultiCellItemHandle {} 205 | impl ObjectMethods for MultiCellItemHandle { fn ptr(&self) -> *mut c_void { self.ptr } } 206 | 207 | impl MultiCellItemHandle { 208 | pub fn from(ptr: *mut c_void) -> MultiCellItemHandle { MultiCellItemHandle { ptr: ptr } } 209 | pub fn null() -> MultiCellItemHandle { MultiCellItemHandle::from(0 as *mut c_void) } 210 | 211 | } 212 | 213 | /// Methods of the wxWidgets' [wxMultiCellItemHandle](http://docs.wxwidgets.org/3.0/classwx_multi_cell_item_handle.html) class. 214 | pub trait MultiCellItemHandleMethods : ObjectMethods { 215 | } 216 | 217 | /// Wraps the wxWidgets' [wxMultiCellSizer](http://docs.wxwidgets.org/3.0/classwx_multi_cell_sizer.html) class. 218 | pub struct MultiCellSizer { ptr: *mut c_void } 219 | impl MultiCellSizerMethods for MultiCellSizer {} 220 | impl SizerMethods for MultiCellSizer {} 221 | impl ObjectMethods for MultiCellSizer { fn ptr(&self) -> *mut c_void { self.ptr } } 222 | 223 | impl MultiCellSizer { 224 | pub fn from(ptr: *mut c_void) -> MultiCellSizer { MultiCellSizer { ptr: ptr } } 225 | pub fn null() -> MultiCellSizer { MultiCellSizer::from(0 as *mut c_void) } 226 | 227 | } 228 | 229 | /// Methods of the wxWidgets' [wxMultiCellSizer](http://docs.wxwidgets.org/3.0/classwx_multi_cell_sizer.html) class. 230 | pub trait MultiCellSizerMethods : SizerMethods { 231 | } 232 | 233 | /// Wraps the wxWidgets' [wxNewBitmapButton](http://docs.wxwidgets.org/3.0/classwx_new_bitmap_button.html) class. 234 | pub struct NewBitmapButton { ptr: *mut c_void } 235 | impl NewBitmapButtonMethods for NewBitmapButton {} 236 | impl PanelMethods for NewBitmapButton {} 237 | impl WindowMethods for NewBitmapButton {} 238 | impl EvtHandlerMethods for NewBitmapButton {} 239 | impl ObjectMethods for NewBitmapButton { fn ptr(&self) -> *mut c_void { self.ptr } } 240 | 241 | impl NewBitmapButton { 242 | pub fn from(ptr: *mut c_void) -> NewBitmapButton { NewBitmapButton { ptr: ptr } } 243 | pub fn null() -> NewBitmapButton { NewBitmapButton::from(0 as *mut c_void) } 244 | 245 | } 246 | 247 | /// Methods of the wxWidgets' [wxNewBitmapButton](http://docs.wxwidgets.org/3.0/classwx_new_bitmap_button.html) class. 248 | pub trait NewBitmapButtonMethods : PanelMethods { 249 | } 250 | 251 | /// Wraps the wxWidgets' [wxPlotCurve](http://docs.wxwidgets.org/3.0/classwx_plot_curve.html) class. 252 | /// Rather use the wxRust-specific [RustPlotCurve](struct.RustPlotCurve.html) class. 253 | pub struct PlotCurve { ptr: *mut c_void } 254 | impl PlotCurveMethods for PlotCurve {} 255 | impl ObjectMethods for PlotCurve { fn ptr(&self) -> *mut c_void { self.ptr } } 256 | 257 | impl PlotCurve { 258 | pub fn from(ptr: *mut c_void) -> PlotCurve { PlotCurve { ptr: ptr } } 259 | pub fn null() -> PlotCurve { PlotCurve::from(0 as *mut c_void) } 260 | 261 | } 262 | 263 | /// Methods of the wxWidgets' [wxPlotCurve](http://docs.wxwidgets.org/3.0/classwx_plot_curve.html) class. 264 | pub trait PlotCurveMethods : ObjectMethods { 265 | } 266 | 267 | /// Wraps the wxWidgets' [wxPlotEvent](http://docs.wxwidgets.org/3.0/classwx_plot_event.html) class. 268 | pub struct PlotEvent { ptr: *mut c_void } 269 | impl PlotEventMethods for PlotEvent {} 270 | impl NotifyEventMethods for PlotEvent {} 271 | impl CommandEventMethods for PlotEvent {} 272 | impl EventMethods for PlotEvent {} 273 | impl ObjectMethods for PlotEvent { fn ptr(&self) -> *mut c_void { self.ptr } } 274 | 275 | impl PlotEvent { 276 | pub fn from(ptr: *mut c_void) -> PlotEvent { PlotEvent { ptr: ptr } } 277 | pub fn null() -> PlotEvent { PlotEvent::from(0 as *mut c_void) } 278 | 279 | } 280 | 281 | /// Methods of the wxWidgets' [wxPlotEvent](http://docs.wxwidgets.org/3.0/classwx_plot_event.html) class. 282 | pub trait PlotEventMethods : NotifyEventMethods { 283 | } 284 | 285 | /// Wraps the wxWidgets' [wxPlotOnOffCurve](http://docs.wxwidgets.org/3.0/classwx_plot_on_off_curve.html) class. 286 | pub struct PlotOnOffCurve { ptr: *mut c_void } 287 | impl PlotOnOffCurveMethods for PlotOnOffCurve {} 288 | impl ObjectMethods for PlotOnOffCurve { fn ptr(&self) -> *mut c_void { self.ptr } } 289 | 290 | impl PlotOnOffCurve { 291 | pub fn from(ptr: *mut c_void) -> PlotOnOffCurve { PlotOnOffCurve { ptr: ptr } } 292 | pub fn null() -> PlotOnOffCurve { PlotOnOffCurve::from(0 as *mut c_void) } 293 | 294 | } 295 | 296 | /// Methods of the wxWidgets' [wxPlotOnOffCurve](http://docs.wxwidgets.org/3.0/classwx_plot_on_off_curve.html) class. 297 | pub trait PlotOnOffCurveMethods : ObjectMethods { 298 | } 299 | 300 | /// Wraps the wxWidgets' [wxPlotWindow](http://docs.wxwidgets.org/3.0/classwx_plot_window.html) class. 301 | pub struct PlotWindow { ptr: *mut c_void } 302 | impl PlotWindowMethods for PlotWindow {} 303 | impl ScrolledWindowMethods for PlotWindow {} 304 | impl PanelMethods for PlotWindow {} 305 | impl WindowMethods for PlotWindow {} 306 | impl EvtHandlerMethods for PlotWindow {} 307 | impl ObjectMethods for PlotWindow { fn ptr(&self) -> *mut c_void { self.ptr } } 308 | 309 | impl PlotWindow { 310 | pub fn from(ptr: *mut c_void) -> PlotWindow { PlotWindow { ptr: ptr } } 311 | pub fn null() -> PlotWindow { PlotWindow::from(0 as *mut c_void) } 312 | 313 | } 314 | 315 | /// Methods of the wxWidgets' [wxPlotWindow](http://docs.wxwidgets.org/3.0/classwx_plot_window.html) class. 316 | pub trait PlotWindowMethods : ScrolledWindowMethods { 317 | } 318 | 319 | /// Wraps the wxWidgets' [wxRemotelyScrolledTreeCtrl](http://docs.wxwidgets.org/3.0/classwx_remotely_scrolled_tree_ctrl.html) class. 320 | pub struct RemotelyScrolledTreeCtrl { ptr: *mut c_void } 321 | impl RemotelyScrolledTreeCtrlMethods for RemotelyScrolledTreeCtrl {} 322 | impl TreeCtrlMethods for RemotelyScrolledTreeCtrl {} 323 | impl ControlMethods for RemotelyScrolledTreeCtrl {} 324 | impl WindowMethods for RemotelyScrolledTreeCtrl {} 325 | impl EvtHandlerMethods for RemotelyScrolledTreeCtrl {} 326 | impl ObjectMethods for RemotelyScrolledTreeCtrl { fn ptr(&self) -> *mut c_void { self.ptr } } 327 | 328 | impl RemotelyScrolledTreeCtrl { 329 | pub fn from(ptr: *mut c_void) -> RemotelyScrolledTreeCtrl { RemotelyScrolledTreeCtrl { ptr: ptr } } 330 | pub fn null() -> RemotelyScrolledTreeCtrl { RemotelyScrolledTreeCtrl::from(0 as *mut c_void) } 331 | 332 | } 333 | 334 | /// Methods of the wxWidgets' [wxRemotelyScrolledTreeCtrl](http://docs.wxwidgets.org/3.0/classwx_remotely_scrolled_tree_ctrl.html) class. 335 | pub trait RemotelyScrolledTreeCtrlMethods : TreeCtrlMethods { 336 | } 337 | 338 | /// Wraps the wxWidgets' [wxSplitterScrolledWindow](http://docs.wxwidgets.org/3.0/classwx_splitter_scrolled_window.html) class. 339 | pub struct SplitterScrolledWindow { ptr: *mut c_void } 340 | impl SplitterScrolledWindowMethods for SplitterScrolledWindow {} 341 | impl ScrolledWindowMethods for SplitterScrolledWindow {} 342 | impl PanelMethods for SplitterScrolledWindow {} 343 | impl WindowMethods for SplitterScrolledWindow {} 344 | impl EvtHandlerMethods for SplitterScrolledWindow {} 345 | impl ObjectMethods for SplitterScrolledWindow { fn ptr(&self) -> *mut c_void { self.ptr } } 346 | 347 | impl SplitterScrolledWindow { 348 | pub fn from(ptr: *mut c_void) -> SplitterScrolledWindow { SplitterScrolledWindow { ptr: ptr } } 349 | pub fn null() -> SplitterScrolledWindow { SplitterScrolledWindow::from(0 as *mut c_void) } 350 | 351 | } 352 | 353 | /// Methods of the wxWidgets' [wxSplitterScrolledWindow](http://docs.wxwidgets.org/3.0/classwx_splitter_scrolled_window.html) class. 354 | pub trait SplitterScrolledWindowMethods : ScrolledWindowMethods { 355 | } 356 | 357 | /// Wraps the wxWidgets' [wxStreamToTextRedirector](http://docs.wxwidgets.org/3.0/classwx_stream_to_text_redirector.html) class. 358 | pub struct StreamToTextRedirector { ptr: *mut c_void } 359 | impl StreamToTextRedirectorMethods for StreamToTextRedirector { fn ptr(&self) -> *mut c_void { self.ptr } } 360 | 361 | impl StreamToTextRedirector { 362 | pub fn from(ptr: *mut c_void) -> StreamToTextRedirector { StreamToTextRedirector { ptr: ptr } } 363 | pub fn null() -> StreamToTextRedirector { StreamToTextRedirector::from(0 as *mut c_void) } 364 | 365 | } 366 | 367 | /// Methods of the wxWidgets' [wxStreamToTextRedirector](http://docs.wxwidgets.org/3.0/classwx_stream_to_text_redirector.html) class. 368 | pub trait StreamToTextRedirectorMethods { 369 | fn ptr(&self) -> *mut c_void; 370 | 371 | } 372 | 373 | /// Wraps the wxWidgets' [wxTabCtrl](http://docs.wxwidgets.org/3.0/classwx_tab_ctrl.html) class. 374 | pub struct TabCtrl { ptr: *mut c_void } 375 | impl TabCtrlMethods for TabCtrl {} 376 | impl ControlMethods for TabCtrl {} 377 | impl WindowMethods for TabCtrl {} 378 | impl EvtHandlerMethods for TabCtrl {} 379 | impl ObjectMethods for TabCtrl { fn ptr(&self) -> *mut c_void { self.ptr } } 380 | 381 | impl TabCtrl { 382 | pub fn from(ptr: *mut c_void) -> TabCtrl { TabCtrl { ptr: ptr } } 383 | pub fn null() -> TabCtrl { TabCtrl::from(0 as *mut c_void) } 384 | 385 | } 386 | 387 | /// Methods of the wxWidgets' [wxTabCtrl](http://docs.wxwidgets.org/3.0/classwx_tab_ctrl.html) class. 388 | pub trait TabCtrlMethods : ControlMethods { 389 | } 390 | 391 | /// Wraps the wxWidgets' [wxTabEvent](http://docs.wxwidgets.org/3.0/classwx_tab_event.html) class. 392 | pub struct TabEvent { ptr: *mut c_void } 393 | impl TabEventMethods for TabEvent {} 394 | impl CommandEventMethods for TabEvent {} 395 | impl EventMethods for TabEvent {} 396 | impl ObjectMethods for TabEvent { fn ptr(&self) -> *mut c_void { self.ptr } } 397 | 398 | impl TabEvent { 399 | pub fn from(ptr: *mut c_void) -> TabEvent { TabEvent { ptr: ptr } } 400 | pub fn null() -> TabEvent { TabEvent::from(0 as *mut c_void) } 401 | 402 | } 403 | 404 | /// Methods of the wxWidgets' [wxTabEvent](http://docs.wxwidgets.org/3.0/classwx_tab_event.html) class. 405 | pub trait TabEventMethods : CommandEventMethods { 406 | } 407 | 408 | /// Wraps the wxWidgets' [wxThinSplitterWindow](http://docs.wxwidgets.org/3.0/classwx_thin_splitter_window.html) class. 409 | pub struct ThinSplitterWindow { ptr: *mut c_void } 410 | impl ThinSplitterWindowMethods for ThinSplitterWindow {} 411 | impl SplitterWindowMethods for ThinSplitterWindow {} 412 | impl WindowMethods for ThinSplitterWindow {} 413 | impl EvtHandlerMethods for ThinSplitterWindow {} 414 | impl ObjectMethods for ThinSplitterWindow { fn ptr(&self) -> *mut c_void { self.ptr } } 415 | 416 | impl ThinSplitterWindow { 417 | pub fn from(ptr: *mut c_void) -> ThinSplitterWindow { ThinSplitterWindow { ptr: ptr } } 418 | pub fn null() -> ThinSplitterWindow { ThinSplitterWindow::from(0 as *mut c_void) } 419 | 420 | } 421 | 422 | /// Methods of the wxWidgets' [wxThinSplitterWindow](http://docs.wxwidgets.org/3.0/classwx_thin_splitter_window.html) class. 423 | pub trait ThinSplitterWindowMethods : SplitterWindowMethods { 424 | } 425 | 426 | /// Wraps the wxWidgets' [wxTimerBase](http://docs.wxwidgets.org/3.0/classwx_timer_base.html) class. 427 | pub struct TimerBase { ptr: *mut c_void } 428 | impl TimerBaseMethods for TimerBase {} 429 | impl ObjectMethods for TimerBase { fn ptr(&self) -> *mut c_void { self.ptr } } 430 | 431 | impl TimerBase { 432 | pub fn from(ptr: *mut c_void) -> TimerBase { TimerBase { ptr: ptr } } 433 | pub fn null() -> TimerBase { TimerBase::from(0 as *mut c_void) } 434 | 435 | } 436 | 437 | /// Methods of the wxWidgets' [wxTimerBase](http://docs.wxwidgets.org/3.0/classwx_timer_base.html) class. 438 | pub trait TimerBaseMethods : ObjectMethods { 439 | } 440 | 441 | /// Wraps the wxWidgets' [wxToolLayoutItem](http://docs.wxwidgets.org/3.0/classwx_tool_layout_item.html) class. 442 | pub struct ToolLayoutItem { ptr: *mut c_void } 443 | impl ToolLayoutItemMethods for ToolLayoutItem {} 444 | impl ObjectMethods for ToolLayoutItem { fn ptr(&self) -> *mut c_void { self.ptr } } 445 | 446 | impl ToolLayoutItem { 447 | pub fn from(ptr: *mut c_void) -> ToolLayoutItem { ToolLayoutItem { ptr: ptr } } 448 | pub fn null() -> ToolLayoutItem { ToolLayoutItem::from(0 as *mut c_void) } 449 | 450 | } 451 | 452 | /// Methods of the wxWidgets' [wxToolLayoutItem](http://docs.wxwidgets.org/3.0/classwx_tool_layout_item.html) class. 453 | pub trait ToolLayoutItemMethods : ObjectMethods { 454 | } 455 | 456 | /// Wraps the wxWidgets' [wxToolWindow](http://docs.wxwidgets.org/3.0/classwx_tool_window.html) class. 457 | pub struct ToolWindow { ptr: *mut c_void } 458 | impl ToolWindowMethods for ToolWindow {} 459 | impl FrameMethods for ToolWindow {} 460 | impl TopLevelWindowMethods for ToolWindow {} 461 | impl WindowMethods for ToolWindow {} 462 | impl EvtHandlerMethods for ToolWindow {} 463 | impl ObjectMethods for ToolWindow { fn ptr(&self) -> *mut c_void { self.ptr } } 464 | 465 | impl ToolWindow { 466 | pub fn from(ptr: *mut c_void) -> ToolWindow { ToolWindow { ptr: ptr } } 467 | pub fn null() -> ToolWindow { ToolWindow::from(0 as *mut c_void) } 468 | 469 | } 470 | 471 | /// Methods of the wxWidgets' [wxToolWindow](http://docs.wxwidgets.org/3.0/classwx_tool_window.html) class. 472 | pub trait ToolWindowMethods : FrameMethods { 473 | } 474 | 475 | /// Wraps the wxWidgets' [wxTreeCompanionWindow](http://docs.wxwidgets.org/3.0/classwx_tree_companion_window.html) class. 476 | pub struct TreeCompanionWindow { ptr: *mut c_void } 477 | impl TreeCompanionWindowMethods for TreeCompanionWindow {} 478 | impl WindowMethods for TreeCompanionWindow {} 479 | impl EvtHandlerMethods for TreeCompanionWindow {} 480 | impl ObjectMethods for TreeCompanionWindow { fn ptr(&self) -> *mut c_void { self.ptr } } 481 | 482 | impl TreeCompanionWindow { 483 | pub fn from(ptr: *mut c_void) -> TreeCompanionWindow { TreeCompanionWindow { ptr: ptr } } 484 | pub fn null() -> TreeCompanionWindow { TreeCompanionWindow::from(0 as *mut c_void) } 485 | 486 | } 487 | 488 | /// Methods of the wxWidgets' [wxTreeCompanionWindow](http://docs.wxwidgets.org/3.0/classwx_tree_companion_window.html) class. 489 | pub trait TreeCompanionWindowMethods : WindowMethods { 490 | } 491 | 492 | /// Wraps the wxWidgets' [wxTreeLayout](http://docs.wxwidgets.org/3.0/classwx_tree_layout.html) class. 493 | pub struct TreeLayout { ptr: *mut c_void } 494 | impl TreeLayoutMethods for TreeLayout {} 495 | impl ObjectMethods for TreeLayout { fn ptr(&self) -> *mut c_void { self.ptr } } 496 | 497 | impl TreeLayout { 498 | pub fn from(ptr: *mut c_void) -> TreeLayout { TreeLayout { ptr: ptr } } 499 | pub fn null() -> TreeLayout { TreeLayout::from(0 as *mut c_void) } 500 | 501 | } 502 | 503 | /// Methods of the wxWidgets' [wxTreeLayout](http://docs.wxwidgets.org/3.0/classwx_tree_layout.html) class. 504 | pub trait TreeLayoutMethods : ObjectMethods { 505 | } 506 | 507 | /// Wraps the wxWidgets' [wxTreeLayoutStored](http://docs.wxwidgets.org/3.0/classwx_tree_layout_stored.html) class. 508 | pub struct TreeLayoutStored { ptr: *mut c_void } 509 | impl TreeLayoutStoredMethods for TreeLayoutStored {} 510 | impl TreeLayoutMethods for TreeLayoutStored {} 511 | impl ObjectMethods for TreeLayoutStored { fn ptr(&self) -> *mut c_void { self.ptr } } 512 | 513 | impl TreeLayoutStored { 514 | pub fn from(ptr: *mut c_void) -> TreeLayoutStored { TreeLayoutStored { ptr: ptr } } 515 | pub fn null() -> TreeLayoutStored { TreeLayoutStored::from(0 as *mut c_void) } 516 | 517 | } 518 | 519 | /// Methods of the wxWidgets' [wxTreeLayoutStored](http://docs.wxwidgets.org/3.0/classwx_tree_layout_stored.html) class. 520 | pub trait TreeLayoutStoredMethods : TreeLayoutMethods { 521 | } 522 | 523 | /// Wraps the wxWidgets' [wxGauge95](http://docs.wxwidgets.org/3.0/classwx_gauge_95.html) class. 524 | pub struct Gauge95 { ptr: *mut c_void } 525 | impl Gauge95Methods for Gauge95 {} 526 | impl GaugeMethods for Gauge95 {} 527 | impl ControlMethods for Gauge95 {} 528 | impl WindowMethods for Gauge95 {} 529 | impl EvtHandlerMethods for Gauge95 {} 530 | impl ObjectMethods for Gauge95 { fn ptr(&self) -> *mut c_void { self.ptr } } 531 | 532 | impl Gauge95 { 533 | pub fn from(ptr: *mut c_void) -> Gauge95 { Gauge95 { ptr: ptr } } 534 | pub fn null() -> Gauge95 { Gauge95::from(0 as *mut c_void) } 535 | 536 | } 537 | 538 | /// Methods of the wxWidgets' [wxGauge95](http://docs.wxwidgets.org/3.0/classwx_gauge_95.html) class. 539 | pub trait Gauge95Methods : GaugeMethods { 540 | } 541 | 542 | /// Wraps the wxWidgets' [wxGaugeMSW](http://docs.wxwidgets.org/3.0/classwx_gauge_msw.html) class. 543 | pub struct GaugeMSW { ptr: *mut c_void } 544 | impl GaugeMSWMethods for GaugeMSW {} 545 | impl GaugeMethods for GaugeMSW {} 546 | impl ControlMethods for GaugeMSW {} 547 | impl WindowMethods for GaugeMSW {} 548 | impl EvtHandlerMethods for GaugeMSW {} 549 | impl ObjectMethods for GaugeMSW { fn ptr(&self) -> *mut c_void { self.ptr } } 550 | 551 | impl GaugeMSW { 552 | pub fn from(ptr: *mut c_void) -> GaugeMSW { GaugeMSW { ptr: ptr } } 553 | pub fn null() -> GaugeMSW { GaugeMSW::from(0 as *mut c_void) } 554 | 555 | } 556 | 557 | /// Methods of the wxWidgets' [wxGaugeMSW](http://docs.wxwidgets.org/3.0/classwx_gauge_msw.html) class. 558 | pub trait GaugeMSWMethods : GaugeMethods { 559 | } 560 | 561 | /// Wraps the wxWidgets' [wxSlider95](http://docs.wxwidgets.org/3.0/classwx_slider_95.html) class. 562 | pub struct Slider95 { ptr: *mut c_void } 563 | impl Slider95Methods for Slider95 {} 564 | impl SliderMethods for Slider95 {} 565 | impl ControlMethods for Slider95 {} 566 | impl WindowMethods for Slider95 {} 567 | impl EvtHandlerMethods for Slider95 {} 568 | impl ObjectMethods for Slider95 { fn ptr(&self) -> *mut c_void { self.ptr } } 569 | 570 | impl Slider95 { 571 | pub fn from(ptr: *mut c_void) -> Slider95 { Slider95 { ptr: ptr } } 572 | pub fn null() -> Slider95 { Slider95::from(0 as *mut c_void) } 573 | 574 | } 575 | 576 | /// Methods of the wxWidgets' [wxSlider95](http://docs.wxwidgets.org/3.0/classwx_slider_95.html) class. 577 | pub trait Slider95Methods : SliderMethods { 578 | } 579 | 580 | /// Wraps the wxWidgets' [wxSliderMSW](http://docs.wxwidgets.org/3.0/classwx_slider_msw.html) class. 581 | pub struct SliderMSW { ptr: *mut c_void } 582 | impl SliderMSWMethods for SliderMSW {} 583 | impl SliderMethods for SliderMSW {} 584 | impl ControlMethods for SliderMSW {} 585 | impl WindowMethods for SliderMSW {} 586 | impl EvtHandlerMethods for SliderMSW {} 587 | impl ObjectMethods for SliderMSW { fn ptr(&self) -> *mut c_void { self.ptr } } 588 | 589 | impl SliderMSW { 590 | pub fn from(ptr: *mut c_void) -> SliderMSW { SliderMSW { ptr: ptr } } 591 | pub fn null() -> SliderMSW { SliderMSW::from(0 as *mut c_void) } 592 | 593 | } 594 | 595 | /// Methods of the wxWidgets' [wxSliderMSW](http://docs.wxwidgets.org/3.0/classwx_slider_msw.html) class. 596 | pub trait SliderMSWMethods : SliderMethods { 597 | } 598 | 599 | -------------------------------------------------------------------------------- /src/defs.rs: -------------------------------------------------------------------------------- 1 | use libc::*; 2 | 3 | // from toplevel.h 4 | 5 | pub const STAY_ON_TOP: c_int = 0x8000; 6 | pub const ICONIZE: c_int = 0x4000; 7 | pub const MINIMIZE: c_int = ICONIZE; 8 | pub const MAXIMIZE: c_int = 0x2000; 9 | pub const CLOSE_BOX: c_int = 0x1000; // == HELP so can't be used with it 10 | 11 | pub const SYSTEM_MENU: c_int = 0x0800; 12 | pub const MINIMIZE_BOX: c_int = 0x0400; 13 | pub const MAXIMIZE_BOX: c_int = 0x0200; 14 | 15 | pub const TINY_CAPTION: c_int = 0x0080; // clashes with NO_DEFAULT 16 | pub const RESIZE_BORDER: c_int = 0x0040; // == CLOSE 17 | 18 | pub const DEFAULT_FRAME_STYLE: c_int = 19 | (SYSTEM_MENU | 20 | RESIZE_BORDER | 21 | MINIMIZE_BOX | 22 | MAXIMIZE_BOX | 23 | CLOSE_BOX | 24 | CAPTION | 25 | CLIP_CHILDREN); 26 | 27 | // manually converted from defs.h 28 | 29 | pub const VSCROLL: c_int = 0x80000000; 30 | pub const HSCROLL: c_int = 0x40000000; 31 | pub const CAPTION: c_int = 0x20000000; 32 | 33 | pub const DOUBLE_BORDER: c_int = BORDER_DOUBLE; 34 | pub const SUNKEN_BORDER: c_int = BORDER_SUNKEN; 35 | pub const RAISED_BORDER: c_int = BORDER_RAISED; 36 | pub const BORDER: c_int = BORDER_SIMPLE; 37 | pub const SIMPLE_BORDER: c_int = BORDER_SIMPLE; 38 | pub const STATIC_BORDER: c_int = BORDER_STATIC; 39 | pub const NO_BORDER: c_int = BORDER_NONE; 40 | 41 | pub const ALWAYS_SHOW_SB: c_int = 0x00800000; 42 | 43 | pub const CLIP_CHILDREN: c_int = 0x00400000; 44 | pub const CLIP_SIBLINGS: c_int = 0x20000000; 45 | 46 | pub const TRANSPARENT_WINDOW: c_int = 0x00100000; 47 | 48 | pub const TAB_TRAVERSAL: c_int = 0x00080000; 49 | 50 | pub const WANTS_CHARS: c_int = 0x00040000; 51 | 52 | pub const RETAINED: c_int = 0x00000000; 53 | pub const BACKINGSTORE: c_int = RETAINED; 54 | 55 | pub const POPUP_WINDOW: c_int = 0x00020000; 56 | 57 | pub const FULL_REPAINT_ON_RESIZE: c_int = 0x00010000; 58 | pub const NO_FULL_REPAINT_ON_RESIZE: c_int = 0; 59 | 60 | pub const WINDOW_STYLE_MASK: c_int = 61 | (VSCROLL|HSCROLL|BORDER_MASK|ALWAYS_SHOW_SB|CLIP_CHILDREN| 62 | CLIP_SIBLINGS|TRANSPARENT_WINDOW|TAB_TRAVERSAL|WANTS_CHARS| 63 | RETAINED|POPUP_WINDOW|FULL_REPAINT_ON_RESIZE); 64 | 65 | pub const WS_EX_VALIDATE_RECURSIVELY: c_int = 0x00000001; 66 | pub const WS_EX_BLOCK_EVENTS: c_int = 0x00000002; 67 | pub const WS_EX_TRANSIENT: c_int = 0x00000004; 68 | pub const WS_EX_THEMED_BACKGROUND: c_int = 0x00000008; 69 | pub const WS_EX_PROCESS_IDLE: c_int = 0x00000010; 70 | pub const WS_EX_PROCESS_UI_UPDATES: c_int = 0x00000020; 71 | 72 | pub const FRAME_EX_METAL: c_int = 0x00000040; 73 | pub const DIALOG_EX_METAL: c_int = 0x00000040; 74 | 75 | pub const WS_EX_CONTEXTHELP: c_int = 0x00000080; 76 | 77 | pub const FRAME_EX_CONTEXTHELP: c_int = WS_EX_CONTEXTHELP; 78 | pub const DIALOG_EX_CONTEXTHELP: c_int = WS_EX_CONTEXTHELP; 79 | 80 | pub const FRAME_DRAWER: c_int = 0x0020; 81 | 82 | pub const FRAME_NO_WINDOW_MENU: c_int = 0x0100; 83 | 84 | pub const MB_DOCKABLE: c_int = 0x0001; 85 | 86 | pub const MENU_TEAROFF: c_int = 0x0001; 87 | 88 | pub const COLOURED: c_int = 0x0800; 89 | pub const FIXED_LENGTH: c_int = 0x0400; 90 | 91 | pub const LB_SORT: c_int = 0x0010; 92 | pub const LB_SINGLE: c_int = 0x0020; 93 | pub const LB_MULTIPLE: c_int = 0x0040; 94 | pub const LB_EXTENDED: c_int = 0x0080; 95 | pub const LB_NEEDED_SB: c_int = 0x0000; 96 | pub const LB_OWNERDRAW: c_int = 0x0100; 97 | pub const LB_ALWAYS_SB: c_int = 0x0200; 98 | pub const LB_NO_SB: c_int = 0x0400; 99 | pub const LB_HSCROLL: c_int = HSCROLL; 100 | pub const LB_INT_HEIGHT: c_int = 0x0800; 101 | 102 | pub const CB_SIMPLE: c_int = 0x0004; 103 | pub const CB_SORT: c_int = 0x0008; 104 | pub const CB_READONLY: c_int = 0x0010; 105 | pub const CB_DROPDOWN: c_int = 0x0020; 106 | 107 | pub const RA_LEFTTORIGHT: c_int = 0x0001; 108 | pub const RA_TOPTOBOTTOM: c_int = 0x0002; 109 | pub const RA_SPECIFY_COLS: c_int = HORIZONTAL; 110 | pub const RA_SPECIFY_ROWS: c_int = VERTICAL; 111 | 112 | pub const RA_HORIZONTAL: c_int = HORIZONTAL; 113 | pub const RA_VERTICAL: c_int = VERTICAL; 114 | 115 | pub const RB_GROUP: c_int = 0x0004; 116 | pub const RB_SINGLE: c_int = 0x0008; 117 | 118 | pub const SB_HORIZONTAL: c_int = HORIZONTAL; 119 | pub const SB_VERTICAL: c_int = VERTICAL; 120 | 121 | pub const SP_HORIZONTAL: c_int = HORIZONTAL; 122 | pub const SP_VERTICAL: c_int = VERTICAL; 123 | pub const SP_ARROW_KEYS: c_int = 0x4000; 124 | pub const SP_WRAP: c_int = 0x8000; 125 | 126 | pub const TC_RIGHTJUSTIFY: c_int = 0x0010; 127 | pub const TC_FIXEDWIDTH: c_int = 0x0020; 128 | pub const TC_TOP: c_int = 0x0000; 129 | pub const TC_LEFT: c_int = 0x0020; 130 | pub const TC_RIGHT: c_int = 0x0040; 131 | pub const TC_BOTTOM: c_int = 0x0080; 132 | pub const TC_MULTILINE: c_int = 0x0200; 133 | pub const TC_OWNERDRAW: c_int = 0x0400; 134 | 135 | pub const BI_EXPAND: c_int = EXPAND; 136 | 137 | pub const LI_HORIZONTAL: c_int = HORIZONTAL; 138 | pub const LI_VERTICAL: c_int = VERTICAL; 139 | 140 | pub const YES: c_int = 0x00000002; 141 | pub const OK: c_int = 0x00000004; 142 | pub const NO: c_int = 0x00000008; 143 | pub const YES_NO: c_int = (YES | NO); 144 | pub const CANCEL: c_int = 0x00000010; 145 | pub const APPLY: c_int = 0x00000020; 146 | pub const CLOSE: c_int = 0x00000040; 147 | 148 | pub const OK_DEFAULT: c_int = 0x00000000; 149 | pub const YES_DEFAULT: c_int = 0x00000000; 150 | pub const NO_DEFAULT: c_int = 0x00000080; 151 | pub const CANCEL_DEFAULT: c_int = 0x80000000; 152 | 153 | pub const ICON_EXCLAMATION: c_int = 0x00000100; 154 | pub const ICON_HAND: c_int = 0x00000200; 155 | pub const ICON_WARNING: c_int = ICON_EXCLAMATION; 156 | pub const ICON_ERROR: c_int = ICON_HAND; 157 | pub const ICON_QUESTION: c_int = 0x00000400; 158 | pub const ICON_INFORMATION: c_int = 0x00000800; 159 | pub const ICON_STOP: c_int = ICON_HAND; 160 | pub const ICON_ASTERISK: c_int = ICON_INFORMATION; 161 | 162 | pub const HELP: c_int = 0x00001000; 163 | pub const FORWARD: c_int = 0x00002000; 164 | pub const BACKWARD: c_int = 0x00004000; 165 | pub const RESET: c_int = 0x00008000; 166 | pub const MORE: c_int = 0x00010000; 167 | pub const SETUP: c_int = 0x00020000; 168 | pub const ICON_NONE: c_int = 0x00040000; 169 | 170 | pub const ICON_MASK: c_int = 171 | (ICON_EXCLAMATION|ICON_HAND|ICON_QUESTION|ICON_INFORMATION|ICON_NONE); 172 | 173 | 174 | // generated from /defs.h 175 | pub const P_ALL: c_int = 0; 176 | pub const P_PID: c_int = 1; 177 | pub const P_PGID: c_int = 2; 178 | pub const DefaultCoord: c_int = -1; 179 | pub const CENTRE: c_int = 1; 180 | pub const CENTER: c_int = 1; 181 | pub const HORIZONTAL: c_int = 4; 182 | pub const VERTICAL: c_int = 8; 183 | pub const BOTH: c_int = 12; 184 | pub const ORIENTATION_MASK: c_int = 12; 185 | pub const LEFT: c_int = 16; 186 | pub const RIGHT: c_int = 32; 187 | pub const UP: c_int = 64; 188 | pub const DOWN: c_int = 128; 189 | pub const TOP: c_int = 64; 190 | pub const BOTTOM: c_int = 128; 191 | pub const NORTH: c_int = 64; 192 | pub const SOUTH: c_int = 128; 193 | pub const WEST: c_int = 16; 194 | pub const EAST: c_int = 32; 195 | pub const ALL: c_int = 240; 196 | pub const DIRECTION_MASK: c_int = 240; 197 | pub const ALIGN_INVALID: c_int = -1; 198 | pub const ALIGN_NOT: c_int = 0; 199 | pub const ALIGN_CENTER_HORIZONTAL: c_int = 256; 200 | pub const ALIGN_CENTRE_HORIZONTAL: c_int = 256; 201 | pub const ALIGN_LEFT: c_int = 0; 202 | pub const ALIGN_TOP: c_int = 0; 203 | pub const ALIGN_RIGHT: c_int = 512; 204 | pub const ALIGN_BOTTOM: c_int = 1024; 205 | pub const ALIGN_CENTER_VERTICAL: c_int = 2048; 206 | pub const ALIGN_CENTRE_VERTICAL: c_int = 2048; 207 | pub const ALIGN_CENTER: c_int = 2304; 208 | pub const ALIGN_CENTRE: c_int = 2304; 209 | pub const ALIGN_MASK: c_int = 3840; 210 | pub const ADJUST_MINSIZE: c_int = 0; 211 | pub const FIXED_MINSIZE: c_int = 32768; 212 | pub const RESERVE_SPACE_EVEN_IF_HIDDEN: c_int = 2; 213 | pub const SIZER_FLAG_BITS_MASK: c_int = 32770; 214 | pub const STRETCH_NOT: c_int = 0; 215 | pub const SHRINK: c_int = 4096; 216 | pub const GROW: c_int = 8192; 217 | pub const EXPAND: c_int = 8192; 218 | pub const SHAPED: c_int = 16384; 219 | pub const TILE: c_int = 49152; 220 | pub const STRETCH_MASK: c_int = 28672; 221 | pub const BORDER_DEFAULT: c_int = 0; 222 | pub const BORDER_NONE: c_int = 2097152; 223 | pub const BORDER_STATIC: c_int = 16777216; 224 | pub const BORDER_SIMPLE: c_int = 33554432; 225 | pub const BORDER_RAISED: c_int = 67108864; 226 | pub const BORDER_SUNKEN: c_int = 134217728; 227 | pub const BORDER_DOUBLE: c_int = 268435456; 228 | pub const BORDER_THEME: c_int = 268435456; 229 | pub const BORDER_MASK: c_int = 522190848; 230 | pub const BG_STYLE_ERASE: c_int = 0; 231 | pub const BG_STYLE_SYSTEM: c_int = 1; 232 | pub const BG_STYLE_PAINT: c_int = 2; 233 | pub const BG_STYLE_TRANSPARENT: c_int = 3; 234 | pub const BG_STYLE_COLOUR: c_int = 4; 235 | pub const BG_STYLE_CUSTOM: c_int = 2; 236 | pub const KEY_NONE: c_int = 0; 237 | pub const KEY_INTEGER: c_int = 1; 238 | pub const KEY_STRING: c_int = 2; 239 | pub const ID_AUTO_LOWEST: c_int = -1000000; 240 | pub const ID_AUTO_HIGHEST: c_int = -2000; 241 | pub const ID_NONE: c_int = -3; 242 | pub const ID_SEPARATOR: c_int = -2; 243 | pub const ID_ANY: c_int = -1; 244 | pub const ID_LOWEST: c_int = 4999; 245 | pub const ID_OPEN: c_int = 5000; 246 | pub const ID_CLOSE: c_int = 5001; 247 | pub const ID_NEW: c_int = 5002; 248 | pub const ID_SAVE: c_int = 5003; 249 | pub const ID_SAVEAS: c_int = 5004; 250 | pub const ID_REVERT: c_int = 5005; 251 | pub const ID_EXIT: c_int = 5006; 252 | pub const ID_UNDO: c_int = 5007; 253 | pub const ID_REDO: c_int = 5008; 254 | pub const ID_HELP: c_int = 5009; 255 | pub const ID_PRINT: c_int = 5010; 256 | pub const ID_PRINT_SETUP: c_int = 5011; 257 | pub const ID_PAGE_SETUP: c_int = 5012; 258 | pub const ID_PREVIEW: c_int = 5013; 259 | pub const ID_ABOUT: c_int = 5014; 260 | pub const ID_HELP_CONTENTS: c_int = 5015; 261 | pub const ID_HELP_INDEX: c_int = 5016; 262 | pub const ID_HELP_SEARCH: c_int = 5017; 263 | pub const ID_HELP_COMMANDS: c_int = 5018; 264 | pub const ID_HELP_PROCEDURES: c_int = 5019; 265 | pub const ID_HELP_CONTEXT: c_int = 5020; 266 | pub const ID_CLOSE_ALL: c_int = 5021; 267 | pub const ID_PREFERENCES: c_int = 5022; 268 | pub const ID_EDIT: c_int = 5030; 269 | pub const ID_CUT: c_int = 5031; 270 | pub const ID_COPY: c_int = 5032; 271 | pub const ID_PASTE: c_int = 5033; 272 | pub const ID_CLEAR: c_int = 5034; 273 | pub const ID_FIND: c_int = 5035; 274 | pub const ID_DUPLICATE: c_int = 5036; 275 | pub const ID_SELECTALL: c_int = 5037; 276 | pub const ID_DELETE: c_int = 5038; 277 | pub const ID_REPLACE: c_int = 5039; 278 | pub const ID_REPLACE_ALL: c_int = 5040; 279 | pub const ID_PROPERTIES: c_int = 5041; 280 | pub const ID_VIEW_DETAILS: c_int = 5042; 281 | pub const ID_VIEW_LARGEICONS: c_int = 5043; 282 | pub const ID_VIEW_SMALLICONS: c_int = 5044; 283 | pub const ID_VIEW_LIST: c_int = 5045; 284 | pub const ID_VIEW_SORTDATE: c_int = 5046; 285 | pub const ID_VIEW_SORTNAME: c_int = 5047; 286 | pub const ID_VIEW_SORTSIZE: c_int = 5048; 287 | pub const ID_VIEW_SORTTYPE: c_int = 5049; 288 | pub const ID_FILE: c_int = 5050; 289 | pub const ID_FILE1: c_int = 5051; 290 | pub const ID_FILE2: c_int = 5052; 291 | pub const ID_FILE3: c_int = 5053; 292 | pub const ID_FILE4: c_int = 5054; 293 | pub const ID_FILE5: c_int = 5055; 294 | pub const ID_FILE6: c_int = 5056; 295 | pub const ID_FILE7: c_int = 5057; 296 | pub const ID_FILE8: c_int = 5058; 297 | pub const ID_FILE9: c_int = 5059; 298 | pub const ID_OK: c_int = 5100; 299 | pub const ID_CANCEL: c_int = 5101; 300 | pub const ID_APPLY: c_int = 5102; 301 | pub const ID_YES: c_int = 5103; 302 | pub const ID_NO: c_int = 5104; 303 | pub const ID_STATIC: c_int = 5105; 304 | pub const ID_FORWARD: c_int = 5106; 305 | pub const ID_BACKWARD: c_int = 5107; 306 | pub const ID_DEFAULT: c_int = 5108; 307 | pub const ID_MORE: c_int = 5109; 308 | pub const ID_SETUP: c_int = 5110; 309 | pub const ID_RESET: c_int = 5111; 310 | pub const ID_CONTEXT_HELP: c_int = 5112; 311 | pub const ID_YESTOALL: c_int = 5113; 312 | pub const ID_NOTOALL: c_int = 5114; 313 | pub const ID_ABORT: c_int = 5115; 314 | pub const ID_RETRY: c_int = 5116; 315 | pub const ID_IGNORE: c_int = 5117; 316 | pub const ID_ADD: c_int = 5118; 317 | pub const ID_REMOVE: c_int = 5119; 318 | pub const ID_UP: c_int = 5120; 319 | pub const ID_DOWN: c_int = 5121; 320 | pub const ID_HOME: c_int = 5122; 321 | pub const ID_REFRESH: c_int = 5123; 322 | pub const ID_STOP: c_int = 5124; 323 | pub const ID_INDEX: c_int = 5125; 324 | pub const ID_BOLD: c_int = 5126; 325 | pub const ID_ITALIC: c_int = 5127; 326 | pub const ID_JUSTIFY_CENTER: c_int = 5128; 327 | pub const ID_JUSTIFY_FILL: c_int = 5129; 328 | pub const ID_JUSTIFY_RIGHT: c_int = 5130; 329 | pub const ID_JUSTIFY_LEFT: c_int = 5131; 330 | pub const ID_UNDERLINE: c_int = 5132; 331 | pub const ID_INDENT: c_int = 5133; 332 | pub const ID_UNINDENT: c_int = 5134; 333 | pub const ID_ZOOM_100: c_int = 5135; 334 | pub const ID_ZOOM_FIT: c_int = 5136; 335 | pub const ID_ZOOM_IN: c_int = 5137; 336 | pub const ID_ZOOM_OUT: c_int = 5138; 337 | pub const ID_UNDELETE: c_int = 5139; 338 | pub const ID_REVERT_TO_SAVED: c_int = 5140; 339 | pub const ID_CDROM: c_int = 5141; 340 | pub const ID_CONVERT: c_int = 5142; 341 | pub const ID_EXECUTE: c_int = 5143; 342 | pub const ID_FLOPPY: c_int = 5144; 343 | pub const ID_HARDDISK: c_int = 5145; 344 | pub const ID_BOTTOM: c_int = 5146; 345 | pub const ID_FIRST: c_int = 5147; 346 | pub const ID_LAST: c_int = 5148; 347 | pub const ID_TOP: c_int = 5149; 348 | pub const ID_INFO: c_int = 5150; 349 | pub const ID_JUMP_TO: c_int = 5151; 350 | pub const ID_NETWORK: c_int = 5152; 351 | pub const ID_SELECT_COLOR: c_int = 5153; 352 | pub const ID_SELECT_FONT: c_int = 5154; 353 | pub const ID_SORT_ASCENDING: c_int = 5155; 354 | pub const ID_SORT_DESCENDING: c_int = 5156; 355 | pub const ID_SPELL_CHECK: c_int = 5157; 356 | pub const ID_STRIKETHROUGH: c_int = 5158; 357 | pub const ID_SYSTEM_MENU: c_int = 5200; 358 | pub const ID_CLOSE_FRAME: c_int = 5201; 359 | pub const ID_MOVE_FRAME: c_int = 5202; 360 | pub const ID_RESIZE_FRAME: c_int = 5203; 361 | pub const ID_MAXIMIZE_FRAME: c_int = 5204; 362 | pub const ID_ICONIZE_FRAME: c_int = 5205; 363 | pub const ID_RESTORE_FRAME: c_int = 5206; 364 | pub const ID_MDI_WINDOW_FIRST: c_int = 5230; 365 | pub const ID_MDI_WINDOW_CASCADE: c_int = 5230; 366 | pub const ID_MDI_WINDOW_TILE_HORZ: c_int = 5231; 367 | pub const ID_MDI_WINDOW_TILE_VERT: c_int = 5232; 368 | pub const ID_MDI_WINDOW_ARRANGE_ICONS: c_int = 5233; 369 | pub const ID_MDI_WINDOW_PREV: c_int = 5234; 370 | pub const ID_MDI_WINDOW_NEXT: c_int = 5235; 371 | pub const ID_MDI_WINDOW_LAST: c_int = 5235; 372 | pub const ID_OSX_MENU_FIRST: c_int = 5250; 373 | pub const ID_OSX_HIDE: c_int = 5250; 374 | pub const ID_OSX_HIDEOTHERS: c_int = 5251; 375 | pub const ID_OSX_SHOWALL: c_int = 5252; 376 | pub const ID_OSX_MENU_LAST: c_int = 5252; 377 | pub const ID_FILEDLGG: c_int = 5900; 378 | pub const ID_FILECTRL: c_int = 5950; 379 | pub const ID_HIGHEST: c_int = 5999; 380 | pub const ITEM_SEPARATOR: c_int = -1; 381 | pub const ITEM_NORMAL: c_int = 0; 382 | pub const ITEM_CHECK: c_int = 1; 383 | pub const ITEM_RADIO: c_int = 2; 384 | pub const ITEM_DROPDOWN: c_int = 3; 385 | pub const ITEM_MAX: c_int = 4; 386 | pub const CHK_UNCHECKED: c_int = 0; 387 | pub const CHK_CHECKED: c_int = 1; 388 | pub const CHK_UNDETERMINED: c_int = 2; 389 | pub const HT_NOWHERE: c_int = 0; 390 | pub const HT_SCROLLBAR_FIRST: c_int = 0; 391 | pub const HT_SCROLLBAR_ARROW_LINE_1: c_int = 1; 392 | pub const HT_SCROLLBAR_ARROW_LINE_2: c_int = 2; 393 | pub const HT_SCROLLBAR_ARROW_PAGE_1: c_int = 3; 394 | pub const HT_SCROLLBAR_ARROW_PAGE_2: c_int = 4; 395 | pub const HT_SCROLLBAR_THUMB: c_int = 5; 396 | pub const HT_SCROLLBAR_BAR_1: c_int = 6; 397 | pub const HT_SCROLLBAR_BAR_2: c_int = 7; 398 | pub const HT_SCROLLBAR_LAST: c_int = 8; 399 | pub const HT_WINDOW_OUTSIDE: c_int = 9; 400 | pub const HT_WINDOW_INSIDE: c_int = 10; 401 | pub const HT_WINDOW_VERT_SCROLLBAR: c_int = 11; 402 | pub const HT_WINDOW_HORZ_SCROLLBAR: c_int = 12; 403 | pub const HT_WINDOW_CORNER: c_int = 13; 404 | pub const HT_MAX: c_int = 14; 405 | pub const HATCHSTYLE_INVALID: c_int = -1; 406 | pub const HATCHSTYLE_FIRST: c_int = 111; 407 | pub const HATCHSTYLE_BDIAGONAL: c_int = 111; 408 | pub const HATCHSTYLE_CROSSDIAG: c_int = 112; 409 | pub const HATCHSTYLE_FDIAGONAL: c_int = 113; 410 | pub const HATCHSTYLE_CROSS: c_int = 114; 411 | pub const HATCHSTYLE_HORIZONTAL: c_int = 115; 412 | pub const HATCHSTYLE_VERTICAL: c_int = 116; 413 | pub const HATCHSTYLE_LAST: c_int = 116; 414 | pub const DEFAULT: c_int = 70; 415 | pub const DECORATIVE: c_int = 71; 416 | pub const ROMAN: c_int = 72; 417 | pub const SCRIPT: c_int = 73; 418 | pub const SWISS: c_int = 74; 419 | pub const MODERN: c_int = 75; 420 | pub const TELETYPE: c_int = 76; 421 | pub const VARIABLE: c_int = 80; 422 | pub const FIXED: c_int = 81; 423 | pub const NORMAL: c_int = 90; 424 | pub const LIGHT: c_int = 91; 425 | pub const BOLD: c_int = 92; 426 | pub const ITALIC: c_int = 93; 427 | pub const SLANT: c_int = 94; 428 | pub const SOLID: c_int = 100; 429 | pub const DOT: c_int = 101; 430 | pub const LONG_DASH: c_int = 102; 431 | pub const SHORT_DASH: c_int = 103; 432 | pub const DOT_DASH: c_int = 104; 433 | pub const USER_DASH: c_int = 105; 434 | pub const TRANSPARENT: c_int = 106; 435 | pub const STIPPLE_MASK_OPAQUE: c_int = 107; 436 | pub const STIPPLE_MASK: c_int = 108; 437 | pub const STIPPLE: c_int = 110; 438 | pub const BDIAGONAL_HATCH: c_int = 111; 439 | pub const CROSSDIAG_HATCH: c_int = 112; 440 | pub const FDIAGONAL_HATCH: c_int = 113; 441 | pub const CROSS_HATCH: c_int = 114; 442 | pub const HORIZONTAL_HATCH: c_int = 115; 443 | pub const VERTICAL_HATCH: c_int = 116; 444 | pub const FIRST_HATCH: c_int = 111; 445 | pub const LAST_HATCH: c_int = 116; 446 | pub const TOOL_TOP: c_int = 1; 447 | pub const TOOL_BOTTOM: c_int = 2; 448 | pub const TOOL_LEFT: c_int = 3; 449 | pub const TOOL_RIGHT: c_int = 4; 450 | pub const DF_INVALID: c_int = 0; 451 | pub const DF_TEXT: c_int = 1; 452 | pub const DF_BITMAP: c_int = 2; 453 | pub const DF_METAFILE: c_int = 3; 454 | pub const DF_SYLK: c_int = 4; 455 | pub const DF_DIF: c_int = 5; 456 | pub const DF_TIFF: c_int = 6; 457 | pub const DF_OEMTEXT: c_int = 7; 458 | pub const DF_DIB: c_int = 8; 459 | pub const DF_PALETTE: c_int = 9; 460 | pub const DF_PENDATA: c_int = 10; 461 | pub const DF_RIFF: c_int = 11; 462 | pub const DF_WAVE: c_int = 12; 463 | pub const DF_UNICODETEXT: c_int = 13; 464 | pub const DF_ENHMETAFILE: c_int = 14; 465 | pub const DF_FILENAME: c_int = 15; 466 | pub const DF_LOCALE: c_int = 16; 467 | pub const DF_PRIVATE: c_int = 20; 468 | pub const DF_HTML: c_int = 30; 469 | pub const DF_MAX: c_int = 31; 470 | pub const K_NONE: c_int = 0; 471 | pub const K_CONTROL_A: c_int = 1; 472 | pub const K_CONTROL_B: c_int = 2; 473 | pub const K_CONTROL_C: c_int = 3; 474 | pub const K_CONTROL_D: c_int = 4; 475 | pub const K_CONTROL_E: c_int = 5; 476 | pub const K_CONTROL_F: c_int = 6; 477 | pub const K_CONTROL_G: c_int = 7; 478 | pub const K_CONTROL_H: c_int = 8; 479 | pub const K_CONTROL_I: c_int = 9; 480 | pub const K_CONTROL_J: c_int = 10; 481 | pub const K_CONTROL_K: c_int = 11; 482 | pub const K_CONTROL_L: c_int = 12; 483 | pub const K_CONTROL_M: c_int = 13; 484 | pub const K_CONTROL_N: c_int = 14; 485 | pub const K_CONTROL_O: c_int = 15; 486 | pub const K_CONTROL_P: c_int = 16; 487 | pub const K_CONTROL_Q: c_int = 17; 488 | pub const K_CONTROL_R: c_int = 18; 489 | pub const K_CONTROL_S: c_int = 19; 490 | pub const K_CONTROL_T: c_int = 20; 491 | pub const K_CONTROL_U: c_int = 21; 492 | pub const K_CONTROL_V: c_int = 22; 493 | pub const K_CONTROL_W: c_int = 23; 494 | pub const K_CONTROL_X: c_int = 24; 495 | pub const K_CONTROL_Y: c_int = 25; 496 | pub const K_CONTROL_Z: c_int = 26; 497 | pub const K_BACK: c_int = 8; 498 | pub const K_TAB: c_int = 9; 499 | pub const K_RETURN: c_int = 13; 500 | pub const K_ESCAPE: c_int = 27; 501 | pub const K_SPACE: c_int = 32; 502 | pub const K_DELETE: c_int = 127; 503 | pub const K_START: c_int = 300; 504 | pub const K_LBUTTON: c_int = 301; 505 | pub const K_RBUTTON: c_int = 302; 506 | pub const K_CANCEL: c_int = 303; 507 | pub const K_MBUTTON: c_int = 304; 508 | pub const K_CLEAR: c_int = 305; 509 | pub const K_SHIFT: c_int = 306; 510 | pub const K_ALT: c_int = 307; 511 | pub const K_CONTROL: c_int = 308; 512 | pub const K_MENU: c_int = 309; 513 | pub const K_PAUSE: c_int = 310; 514 | pub const K_CAPITAL: c_int = 311; 515 | pub const K_END: c_int = 312; 516 | pub const K_HOME: c_int = 313; 517 | pub const K_LEFT: c_int = 314; 518 | pub const K_UP: c_int = 315; 519 | pub const K_RIGHT: c_int = 316; 520 | pub const K_DOWN: c_int = 317; 521 | pub const K_SELECT: c_int = 318; 522 | pub const K_PRINT: c_int = 319; 523 | pub const K_EXECUTE: c_int = 320; 524 | pub const K_SNAPSHOT: c_int = 321; 525 | pub const K_INSERT: c_int = 322; 526 | pub const K_HELP: c_int = 323; 527 | pub const K_NUMPAD0: c_int = 324; 528 | pub const K_NUMPAD1: c_int = 325; 529 | pub const K_NUMPAD2: c_int = 326; 530 | pub const K_NUMPAD3: c_int = 327; 531 | pub const K_NUMPAD4: c_int = 328; 532 | pub const K_NUMPAD5: c_int = 329; 533 | pub const K_NUMPAD6: c_int = 330; 534 | pub const K_NUMPAD7: c_int = 331; 535 | pub const K_NUMPAD8: c_int = 332; 536 | pub const K_NUMPAD9: c_int = 333; 537 | pub const K_MULTIPLY: c_int = 334; 538 | pub const K_ADD: c_int = 335; 539 | pub const K_SEPARATOR: c_int = 336; 540 | pub const K_SUBTRACT: c_int = 337; 541 | pub const K_DECIMAL: c_int = 338; 542 | pub const K_DIVIDE: c_int = 339; 543 | pub const K_F1: c_int = 340; 544 | pub const K_F2: c_int = 341; 545 | pub const K_F3: c_int = 342; 546 | pub const K_F4: c_int = 343; 547 | pub const K_F5: c_int = 344; 548 | pub const K_F6: c_int = 345; 549 | pub const K_F7: c_int = 346; 550 | pub const K_F8: c_int = 347; 551 | pub const K_F9: c_int = 348; 552 | pub const K_F10: c_int = 349; 553 | pub const K_F11: c_int = 350; 554 | pub const K_F12: c_int = 351; 555 | pub const K_F13: c_int = 352; 556 | pub const K_F14: c_int = 353; 557 | pub const K_F15: c_int = 354; 558 | pub const K_F16: c_int = 355; 559 | pub const K_F17: c_int = 356; 560 | pub const K_F18: c_int = 357; 561 | pub const K_F19: c_int = 358; 562 | pub const K_F20: c_int = 359; 563 | pub const K_F21: c_int = 360; 564 | pub const K_F22: c_int = 361; 565 | pub const K_F23: c_int = 362; 566 | pub const K_F24: c_int = 363; 567 | pub const K_NUMLOCK: c_int = 364; 568 | pub const K_SCROLL: c_int = 365; 569 | pub const K_PAGEUP: c_int = 366; 570 | pub const K_PAGEDOWN: c_int = 367; 571 | pub const K_NUMPAD_SPACE: c_int = 368; 572 | pub const K_NUMPAD_TAB: c_int = 369; 573 | pub const K_NUMPAD_ENTER: c_int = 370; 574 | pub const K_NUMPAD_F1: c_int = 371; 575 | pub const K_NUMPAD_F2: c_int = 372; 576 | pub const K_NUMPAD_F3: c_int = 373; 577 | pub const K_NUMPAD_F4: c_int = 374; 578 | pub const K_NUMPAD_HOME: c_int = 375; 579 | pub const K_NUMPAD_LEFT: c_int = 376; 580 | pub const K_NUMPAD_UP: c_int = 377; 581 | pub const K_NUMPAD_RIGHT: c_int = 378; 582 | pub const K_NUMPAD_DOWN: c_int = 379; 583 | pub const K_NUMPAD_PAGEUP: c_int = 380; 584 | pub const K_NUMPAD_PAGEDOWN: c_int = 381; 585 | pub const K_NUMPAD_END: c_int = 382; 586 | pub const K_NUMPAD_BEGIN: c_int = 383; 587 | pub const K_NUMPAD_INSERT: c_int = 384; 588 | pub const K_NUMPAD_DELETE: c_int = 385; 589 | pub const K_NUMPAD_EQUAL: c_int = 386; 590 | pub const K_NUMPAD_MULTIPLY: c_int = 387; 591 | pub const K_NUMPAD_ADD: c_int = 388; 592 | pub const K_NUMPAD_SEPARATOR: c_int = 389; 593 | pub const K_NUMPAD_SUBTRACT: c_int = 390; 594 | pub const K_NUMPAD_DECIMAL: c_int = 391; 595 | pub const K_NUMPAD_DIVIDE: c_int = 392; 596 | pub const K_WINDOWS_LEFT: c_int = 393; 597 | pub const K_WINDOWS_RIGHT: c_int = 394; 598 | pub const K_WINDOWS_MENU: c_int = 395; 599 | pub const K_RAW_CONTROL: c_int = 396; 600 | pub const K_COMMAND: c_int = 308; 601 | pub const K_SPECIAL1: c_int = 193; 602 | pub const K_SPECIAL2: c_int = 194; 603 | pub const K_SPECIAL3: c_int = 195; 604 | pub const K_SPECIAL4: c_int = 196; 605 | pub const K_SPECIAL5: c_int = 197; 606 | pub const K_SPECIAL6: c_int = 198; 607 | pub const K_SPECIAL7: c_int = 199; 608 | pub const K_SPECIAL8: c_int = 200; 609 | pub const K_SPECIAL9: c_int = 201; 610 | pub const K_SPECIAL10: c_int = 202; 611 | pub const K_SPECIAL11: c_int = 203; 612 | pub const K_SPECIAL12: c_int = 204; 613 | pub const K_SPECIAL13: c_int = 205; 614 | pub const K_SPECIAL14: c_int = 206; 615 | pub const K_SPECIAL15: c_int = 207; 616 | pub const K_SPECIAL16: c_int = 208; 617 | pub const K_SPECIAL17: c_int = 209; 618 | pub const K_SPECIAL18: c_int = 210; 619 | pub const K_SPECIAL19: c_int = 211; 620 | pub const K_SPECIAL20: c_int = 212; 621 | pub const MOD_NONE: c_int = 0; 622 | pub const MOD_ALT: c_int = 1; 623 | pub const MOD_CONTROL: c_int = 2; 624 | pub const MOD_ALTGR: c_int = 3; 625 | pub const MOD_SHIFT: c_int = 4; 626 | pub const MOD_META: c_int = 8; 627 | pub const MOD_WIN: c_int = 8; 628 | pub const MOD_RAW_CONTROL: c_int = 16; 629 | pub const MOD_CMD: c_int = 2; 630 | pub const MOD_ALL: c_int = 65535; 631 | pub const PAPER_NONE: c_int = 0; 632 | pub const PAPER_LETTER: c_int = 1; 633 | pub const PAPER_LEGAL: c_int = 2; 634 | pub const PAPER_A4: c_int = 3; 635 | pub const PAPER_CSHEET: c_int = 4; 636 | pub const PAPER_DSHEET: c_int = 5; 637 | pub const PAPER_ESHEET: c_int = 6; 638 | pub const PAPER_LETTERSMALL: c_int = 7; 639 | pub const PAPER_TABLOID: c_int = 8; 640 | pub const PAPER_LEDGER: c_int = 9; 641 | pub const PAPER_STATEMENT: c_int = 10; 642 | pub const PAPER_EXECUTIVE: c_int = 11; 643 | pub const PAPER_A3: c_int = 12; 644 | pub const PAPER_A4SMALL: c_int = 13; 645 | pub const PAPER_A5: c_int = 14; 646 | pub const PAPER_B4: c_int = 15; 647 | pub const PAPER_B5: c_int = 16; 648 | pub const PAPER_FOLIO: c_int = 17; 649 | pub const PAPER_QUARTO: c_int = 18; 650 | pub const PAPER_10X14: c_int = 19; 651 | pub const PAPER_11X17: c_int = 20; 652 | pub const PAPER_NOTE: c_int = 21; 653 | pub const PAPER_ENV_9: c_int = 22; 654 | pub const PAPER_ENV_10: c_int = 23; 655 | pub const PAPER_ENV_11: c_int = 24; 656 | pub const PAPER_ENV_12: c_int = 25; 657 | pub const PAPER_ENV_14: c_int = 26; 658 | pub const PAPER_ENV_DL: c_int = 27; 659 | pub const PAPER_ENV_C5: c_int = 28; 660 | pub const PAPER_ENV_C3: c_int = 29; 661 | pub const PAPER_ENV_C4: c_int = 30; 662 | pub const PAPER_ENV_C6: c_int = 31; 663 | pub const PAPER_ENV_C65: c_int = 32; 664 | pub const PAPER_ENV_B4: c_int = 33; 665 | pub const PAPER_ENV_B5: c_int = 34; 666 | pub const PAPER_ENV_B6: c_int = 35; 667 | pub const PAPER_ENV_ITALY: c_int = 36; 668 | pub const PAPER_ENV_MONARCH: c_int = 37; 669 | pub const PAPER_ENV_PERSONAL: c_int = 38; 670 | pub const PAPER_FANFOLD_US: c_int = 39; 671 | pub const PAPER_FANFOLD_STD_GERMAN: c_int = 40; 672 | pub const PAPER_FANFOLD_LGL_GERMAN: c_int = 41; 673 | pub const PAPER_ISO_B4: c_int = 42; 674 | pub const PAPER_JAPANESE_POSTCARD: c_int = 43; 675 | pub const PAPER_9X11: c_int = 44; 676 | pub const PAPER_10X11: c_int = 45; 677 | pub const PAPER_15X11: c_int = 46; 678 | pub const PAPER_ENV_INVITE: c_int = 47; 679 | pub const PAPER_LETTER_EXTRA: c_int = 48; 680 | pub const PAPER_LEGAL_EXTRA: c_int = 49; 681 | pub const PAPER_TABLOID_EXTRA: c_int = 50; 682 | pub const PAPER_A4_EXTRA: c_int = 51; 683 | pub const PAPER_LETTER_TRANSVERSE: c_int = 52; 684 | pub const PAPER_A4_TRANSVERSE: c_int = 53; 685 | pub const PAPER_LETTER_EXTRA_TRANSVERSE: c_int = 54; 686 | pub const PAPER_A_PLUS: c_int = 55; 687 | pub const PAPER_B_PLUS: c_int = 56; 688 | pub const PAPER_LETTER_PLUS: c_int = 57; 689 | pub const PAPER_A4_PLUS: c_int = 58; 690 | pub const PAPER_A5_TRANSVERSE: c_int = 59; 691 | pub const PAPER_B5_TRANSVERSE: c_int = 60; 692 | pub const PAPER_A3_EXTRA: c_int = 61; 693 | pub const PAPER_A5_EXTRA: c_int = 62; 694 | pub const PAPER_B5_EXTRA: c_int = 63; 695 | pub const PAPER_A2: c_int = 64; 696 | pub const PAPER_A3_TRANSVERSE: c_int = 65; 697 | pub const PAPER_A3_EXTRA_TRANSVERSE: c_int = 66; 698 | pub const PAPER_DBL_JAPANESE_POSTCARD: c_int = 67; 699 | pub const PAPER_A6: c_int = 68; 700 | pub const PAPER_JENV_KAKU2: c_int = 69; 701 | pub const PAPER_JENV_KAKU3: c_int = 70; 702 | pub const PAPER_JENV_CHOU3: c_int = 71; 703 | pub const PAPER_JENV_CHOU4: c_int = 72; 704 | pub const PAPER_LETTER_ROTATED: c_int = 73; 705 | pub const PAPER_A3_ROTATED: c_int = 74; 706 | pub const PAPER_A4_ROTATED: c_int = 75; 707 | pub const PAPER_A5_ROTATED: c_int = 76; 708 | pub const PAPER_B4_JIS_ROTATED: c_int = 77; 709 | pub const PAPER_B5_JIS_ROTATED: c_int = 78; 710 | pub const PAPER_JAPANESE_POSTCARD_ROTATED: c_int = 79; 711 | pub const PAPER_DBL_JAPANESE_POSTCARD_ROTATED: c_int = 80; 712 | pub const PAPER_A6_ROTATED: c_int = 81; 713 | pub const PAPER_JENV_KAKU2_ROTATED: c_int = 82; 714 | pub const PAPER_JENV_KAKU3_ROTATED: c_int = 83; 715 | pub const PAPER_JENV_CHOU3_ROTATED: c_int = 84; 716 | pub const PAPER_JENV_CHOU4_ROTATED: c_int = 85; 717 | pub const PAPER_B6_JIS: c_int = 86; 718 | pub const PAPER_B6_JIS_ROTATED: c_int = 87; 719 | pub const PAPER_12X11: c_int = 88; 720 | pub const PAPER_JENV_YOU4: c_int = 89; 721 | pub const PAPER_JENV_YOU4_ROTATED: c_int = 90; 722 | pub const PAPER_P16K: c_int = 91; 723 | pub const PAPER_P32K: c_int = 92; 724 | pub const PAPER_P32KBIG: c_int = 93; 725 | pub const PAPER_PENV_1: c_int = 94; 726 | pub const PAPER_PENV_2: c_int = 95; 727 | pub const PAPER_PENV_3: c_int = 96; 728 | pub const PAPER_PENV_4: c_int = 97; 729 | pub const PAPER_PENV_5: c_int = 98; 730 | pub const PAPER_PENV_6: c_int = 99; 731 | pub const PAPER_PENV_7: c_int = 100; 732 | pub const PAPER_PENV_8: c_int = 101; 733 | pub const PAPER_PENV_9: c_int = 102; 734 | pub const PAPER_PENV_10: c_int = 103; 735 | pub const PAPER_P16K_ROTATED: c_int = 104; 736 | pub const PAPER_P32K_ROTATED: c_int = 105; 737 | pub const PAPER_P32KBIG_ROTATED: c_int = 106; 738 | pub const PAPER_PENV_1_ROTATED: c_int = 107; 739 | pub const PAPER_PENV_2_ROTATED: c_int = 108; 740 | pub const PAPER_PENV_3_ROTATED: c_int = 109; 741 | pub const PAPER_PENV_4_ROTATED: c_int = 110; 742 | pub const PAPER_PENV_5_ROTATED: c_int = 111; 743 | pub const PAPER_PENV_6_ROTATED: c_int = 112; 744 | pub const PAPER_PENV_7_ROTATED: c_int = 113; 745 | pub const PAPER_PENV_8_ROTATED: c_int = 114; 746 | pub const PAPER_PENV_9_ROTATED: c_int = 115; 747 | pub const PAPER_PENV_10_ROTATED: c_int = 116; 748 | pub const PAPER_A0: c_int = 117; 749 | pub const PAPER_A1: c_int = 118; 750 | pub const PORTRAIT: c_int = 1; 751 | pub const LANDSCAPE: c_int = 2; 752 | pub const DUPLEX_SIMPLEX: c_int = 0; 753 | pub const DUPLEX_HORIZONTAL: c_int = 1; 754 | pub const DUPLEX_VERTICAL: c_int = 2; 755 | pub const PRINT_MODE_NONE: c_int = 0; 756 | pub const PRINT_MODE_PREVIEW: c_int = 1; 757 | pub const PRINT_MODE_FILE: c_int = 2; 758 | pub const PRINT_MODE_PRINTER: c_int = 3; 759 | pub const PRINT_MODE_STREAM: c_int = 4; 760 | pub const UPDATE_UI_NONE: c_int = 0; 761 | pub const UPDATE_UI_RECURSE: c_int = 1; 762 | pub const UPDATE_UI_FROMIDLE: c_int = 2; 763 | -------------------------------------------------------------------------------- /src/cb.rs: -------------------------------------------------------------------------------- 1 | use libc::*; 2 | use _unsafe::*; 3 | use base::*; 4 | use core::*; 5 | use _unavailable::*; 6 | 7 | pub struct CbAntiflickerPlugin { ptr: *mut c_void } 8 | impl CbAntiflickerPluginMethods for CbAntiflickerPlugin {} 9 | impl CbPluginBaseMethods for CbAntiflickerPlugin {} 10 | impl EvtHandlerMethods for CbAntiflickerPlugin {} 11 | impl ObjectMethods for CbAntiflickerPlugin { fn ptr(&self) -> *mut c_void { self.ptr } } 12 | 13 | impl CbAntiflickerPlugin { 14 | pub fn from(ptr: *mut c_void) -> CbAntiflickerPlugin { CbAntiflickerPlugin { ptr: ptr } } 15 | pub fn null() -> CbAntiflickerPlugin { CbAntiflickerPlugin::from(0 as *mut c_void) } 16 | 17 | } 18 | 19 | pub trait CbAntiflickerPluginMethods : CbPluginBaseMethods { 20 | } 21 | 22 | pub struct CbBarDragPlugin { ptr: *mut c_void } 23 | impl CbBarDragPluginMethods for CbBarDragPlugin {} 24 | impl CbPluginBaseMethods for CbBarDragPlugin {} 25 | impl EvtHandlerMethods for CbBarDragPlugin {} 26 | impl ObjectMethods for CbBarDragPlugin { fn ptr(&self) -> *mut c_void { self.ptr } } 27 | 28 | impl CbBarDragPlugin { 29 | pub fn from(ptr: *mut c_void) -> CbBarDragPlugin { CbBarDragPlugin { ptr: ptr } } 30 | pub fn null() -> CbBarDragPlugin { CbBarDragPlugin::from(0 as *mut c_void) } 31 | 32 | } 33 | 34 | pub trait CbBarDragPluginMethods : CbPluginBaseMethods { 35 | } 36 | 37 | pub struct CbBarHintsPlugin { ptr: *mut c_void } 38 | impl CbBarHintsPluginMethods for CbBarHintsPlugin {} 39 | impl CbPluginBaseMethods for CbBarHintsPlugin {} 40 | impl EvtHandlerMethods for CbBarHintsPlugin {} 41 | impl ObjectMethods for CbBarHintsPlugin { fn ptr(&self) -> *mut c_void { self.ptr } } 42 | 43 | impl CbBarHintsPlugin { 44 | pub fn from(ptr: *mut c_void) -> CbBarHintsPlugin { CbBarHintsPlugin { ptr: ptr } } 45 | pub fn null() -> CbBarHintsPlugin { CbBarHintsPlugin::from(0 as *mut c_void) } 46 | 47 | } 48 | 49 | pub trait CbBarHintsPluginMethods : CbPluginBaseMethods { 50 | } 51 | 52 | pub struct CbBarInfo { ptr: *mut c_void } 53 | impl CbBarInfoMethods for CbBarInfo {} 54 | impl ObjectMethods for CbBarInfo { fn ptr(&self) -> *mut c_void { self.ptr } } 55 | 56 | impl CbBarInfo { 57 | pub fn from(ptr: *mut c_void) -> CbBarInfo { CbBarInfo { ptr: ptr } } 58 | pub fn null() -> CbBarInfo { CbBarInfo::from(0 as *mut c_void) } 59 | 60 | } 61 | 62 | pub trait CbBarInfoMethods : ObjectMethods { 63 | } 64 | 65 | pub struct CbBarSpy { ptr: *mut c_void } 66 | impl CbBarSpyMethods for CbBarSpy {} 67 | impl EvtHandlerMethods for CbBarSpy {} 68 | impl ObjectMethods for CbBarSpy { fn ptr(&self) -> *mut c_void { self.ptr } } 69 | 70 | impl CbBarSpy { 71 | pub fn from(ptr: *mut c_void) -> CbBarSpy { CbBarSpy { ptr: ptr } } 72 | pub fn null() -> CbBarSpy { CbBarSpy::from(0 as *mut c_void) } 73 | 74 | } 75 | 76 | pub trait CbBarSpyMethods : EvtHandlerMethods { 77 | } 78 | 79 | pub struct CbCloseBox { ptr: *mut c_void } 80 | impl CbCloseBoxMethods for CbCloseBox {} 81 | impl CbMiniButtonMethods for CbCloseBox {} 82 | impl ObjectMethods for CbCloseBox { fn ptr(&self) -> *mut c_void { self.ptr } } 83 | 84 | impl CbCloseBox { 85 | pub fn from(ptr: *mut c_void) -> CbCloseBox { CbCloseBox { ptr: ptr } } 86 | pub fn null() -> CbCloseBox { CbCloseBox::from(0 as *mut c_void) } 87 | 88 | } 89 | 90 | pub trait CbCloseBoxMethods : CbMiniButtonMethods { 91 | } 92 | 93 | pub struct CbCollapseBox { ptr: *mut c_void } 94 | impl CbCollapseBoxMethods for CbCollapseBox {} 95 | impl CbMiniButtonMethods for CbCollapseBox {} 96 | impl ObjectMethods for CbCollapseBox { fn ptr(&self) -> *mut c_void { self.ptr } } 97 | 98 | impl CbCollapseBox { 99 | pub fn from(ptr: *mut c_void) -> CbCollapseBox { CbCollapseBox { ptr: ptr } } 100 | pub fn null() -> CbCollapseBox { CbCollapseBox::from(0 as *mut c_void) } 101 | 102 | } 103 | 104 | pub trait CbCollapseBoxMethods : CbMiniButtonMethods { 105 | } 106 | 107 | pub struct CbCommonPaneProperties { ptr: *mut c_void } 108 | impl CbCommonPanePropertiesMethods for CbCommonPaneProperties {} 109 | impl ObjectMethods for CbCommonPaneProperties { fn ptr(&self) -> *mut c_void { self.ptr } } 110 | 111 | impl CbCommonPaneProperties { 112 | pub fn from(ptr: *mut c_void) -> CbCommonPaneProperties { CbCommonPaneProperties { ptr: ptr } } 113 | pub fn null() -> CbCommonPaneProperties { CbCommonPaneProperties::from(0 as *mut c_void) } 114 | 115 | } 116 | 117 | pub trait CbCommonPanePropertiesMethods : ObjectMethods { 118 | } 119 | 120 | pub struct CbCustomizeBarEvent { ptr: *mut c_void } 121 | impl CbCustomizeBarEventMethods for CbCustomizeBarEvent {} 122 | impl CbPluginEventMethods for CbCustomizeBarEvent {} 123 | impl EventMethods for CbCustomizeBarEvent {} 124 | impl ObjectMethods for CbCustomizeBarEvent { fn ptr(&self) -> *mut c_void { self.ptr } } 125 | 126 | impl CbCustomizeBarEvent { 127 | pub fn from(ptr: *mut c_void) -> CbCustomizeBarEvent { CbCustomizeBarEvent { ptr: ptr } } 128 | pub fn null() -> CbCustomizeBarEvent { CbCustomizeBarEvent::from(0 as *mut c_void) } 129 | 130 | } 131 | 132 | pub trait CbCustomizeBarEventMethods : CbPluginEventMethods { 133 | } 134 | 135 | pub struct CbCustomizeLayoutEvent { ptr: *mut c_void } 136 | impl CbCustomizeLayoutEventMethods for CbCustomizeLayoutEvent {} 137 | impl CbPluginEventMethods for CbCustomizeLayoutEvent {} 138 | impl EventMethods for CbCustomizeLayoutEvent {} 139 | impl ObjectMethods for CbCustomizeLayoutEvent { fn ptr(&self) -> *mut c_void { self.ptr } } 140 | 141 | impl CbCustomizeLayoutEvent { 142 | pub fn from(ptr: *mut c_void) -> CbCustomizeLayoutEvent { CbCustomizeLayoutEvent { ptr: ptr } } 143 | pub fn null() -> CbCustomizeLayoutEvent { CbCustomizeLayoutEvent::from(0 as *mut c_void) } 144 | 145 | } 146 | 147 | pub trait CbCustomizeLayoutEventMethods : CbPluginEventMethods { 148 | } 149 | 150 | pub struct CbDimHandlerBase { ptr: *mut c_void } 151 | impl CbDimHandlerBaseMethods for CbDimHandlerBase {} 152 | impl ObjectMethods for CbDimHandlerBase { fn ptr(&self) -> *mut c_void { self.ptr } } 153 | 154 | impl CbDimHandlerBase { 155 | pub fn from(ptr: *mut c_void) -> CbDimHandlerBase { CbDimHandlerBase { ptr: ptr } } 156 | pub fn null() -> CbDimHandlerBase { CbDimHandlerBase::from(0 as *mut c_void) } 157 | 158 | } 159 | 160 | pub trait CbDimHandlerBaseMethods : ObjectMethods { 161 | } 162 | 163 | pub struct CbDimInfo { ptr: *mut c_void } 164 | impl CbDimInfoMethods for CbDimInfo {} 165 | impl ObjectMethods for CbDimInfo { fn ptr(&self) -> *mut c_void { self.ptr } } 166 | 167 | impl CbDimInfo { 168 | pub fn from(ptr: *mut c_void) -> CbDimInfo { CbDimInfo { ptr: ptr } } 169 | pub fn null() -> CbDimInfo { CbDimInfo::from(0 as *mut c_void) } 170 | 171 | } 172 | 173 | pub trait CbDimInfoMethods : ObjectMethods { 174 | } 175 | 176 | pub struct CbDockBox { ptr: *mut c_void } 177 | impl CbDockBoxMethods for CbDockBox {} 178 | impl CbMiniButtonMethods for CbDockBox {} 179 | impl ObjectMethods for CbDockBox { fn ptr(&self) -> *mut c_void { self.ptr } } 180 | 181 | impl CbDockBox { 182 | pub fn from(ptr: *mut c_void) -> CbDockBox { CbDockBox { ptr: ptr } } 183 | pub fn null() -> CbDockBox { CbDockBox::from(0 as *mut c_void) } 184 | 185 | } 186 | 187 | pub trait CbDockBoxMethods : CbMiniButtonMethods { 188 | } 189 | 190 | pub struct CbDockPane { ptr: *mut c_void } 191 | impl CbDockPaneMethods for CbDockPane {} 192 | impl ObjectMethods for CbDockPane { fn ptr(&self) -> *mut c_void { self.ptr } } 193 | 194 | impl CbDockPane { 195 | pub fn from(ptr: *mut c_void) -> CbDockPane { CbDockPane { ptr: ptr } } 196 | pub fn null() -> CbDockPane { CbDockPane::from(0 as *mut c_void) } 197 | 198 | } 199 | 200 | pub trait CbDockPaneMethods : ObjectMethods { 201 | } 202 | 203 | pub struct CbDrawBarDecorEvent { ptr: *mut c_void } 204 | impl CbDrawBarDecorEventMethods for CbDrawBarDecorEvent {} 205 | impl CbPluginEventMethods for CbDrawBarDecorEvent {} 206 | impl EventMethods for CbDrawBarDecorEvent {} 207 | impl ObjectMethods for CbDrawBarDecorEvent { fn ptr(&self) -> *mut c_void { self.ptr } } 208 | 209 | impl CbDrawBarDecorEvent { 210 | pub fn from(ptr: *mut c_void) -> CbDrawBarDecorEvent { CbDrawBarDecorEvent { ptr: ptr } } 211 | pub fn null() -> CbDrawBarDecorEvent { CbDrawBarDecorEvent::from(0 as *mut c_void) } 212 | 213 | } 214 | 215 | pub trait CbDrawBarDecorEventMethods : CbPluginEventMethods { 216 | } 217 | 218 | pub struct CbDrawBarHandlesEvent { ptr: *mut c_void } 219 | impl CbDrawBarHandlesEventMethods for CbDrawBarHandlesEvent {} 220 | impl CbPluginEventMethods for CbDrawBarHandlesEvent {} 221 | impl EventMethods for CbDrawBarHandlesEvent {} 222 | impl ObjectMethods for CbDrawBarHandlesEvent { fn ptr(&self) -> *mut c_void { self.ptr } } 223 | 224 | impl CbDrawBarHandlesEvent { 225 | pub fn from(ptr: *mut c_void) -> CbDrawBarHandlesEvent { CbDrawBarHandlesEvent { ptr: ptr } } 226 | pub fn null() -> CbDrawBarHandlesEvent { CbDrawBarHandlesEvent::from(0 as *mut c_void) } 227 | 228 | } 229 | 230 | pub trait CbDrawBarHandlesEventMethods : CbPluginEventMethods { 231 | } 232 | 233 | pub struct CbDrawHintRectEvent { ptr: *mut c_void } 234 | impl CbDrawHintRectEventMethods for CbDrawHintRectEvent {} 235 | impl CbPluginEventMethods for CbDrawHintRectEvent {} 236 | impl EventMethods for CbDrawHintRectEvent {} 237 | impl ObjectMethods for CbDrawHintRectEvent { fn ptr(&self) -> *mut c_void { self.ptr } } 238 | 239 | impl CbDrawHintRectEvent { 240 | pub fn from(ptr: *mut c_void) -> CbDrawHintRectEvent { CbDrawHintRectEvent { ptr: ptr } } 241 | pub fn null() -> CbDrawHintRectEvent { CbDrawHintRectEvent::from(0 as *mut c_void) } 242 | 243 | } 244 | 245 | pub trait CbDrawHintRectEventMethods : CbPluginEventMethods { 246 | } 247 | 248 | pub struct CbDrawPaneBkGroundEvent { ptr: *mut c_void } 249 | impl CbDrawPaneBkGroundEventMethods for CbDrawPaneBkGroundEvent {} 250 | impl CbPluginEventMethods for CbDrawPaneBkGroundEvent {} 251 | impl EventMethods for CbDrawPaneBkGroundEvent {} 252 | impl ObjectMethods for CbDrawPaneBkGroundEvent { fn ptr(&self) -> *mut c_void { self.ptr } } 253 | 254 | impl CbDrawPaneBkGroundEvent { 255 | pub fn from(ptr: *mut c_void) -> CbDrawPaneBkGroundEvent { CbDrawPaneBkGroundEvent { ptr: ptr } } 256 | pub fn null() -> CbDrawPaneBkGroundEvent { CbDrawPaneBkGroundEvent::from(0 as *mut c_void) } 257 | 258 | } 259 | 260 | pub trait CbDrawPaneBkGroundEventMethods : CbPluginEventMethods { 261 | } 262 | 263 | pub struct CbDrawPaneDecorEvent { ptr: *mut c_void } 264 | impl CbDrawPaneDecorEventMethods for CbDrawPaneDecorEvent {} 265 | impl CbPluginEventMethods for CbDrawPaneDecorEvent {} 266 | impl EventMethods for CbDrawPaneDecorEvent {} 267 | impl ObjectMethods for CbDrawPaneDecorEvent { fn ptr(&self) -> *mut c_void { self.ptr } } 268 | 269 | impl CbDrawPaneDecorEvent { 270 | pub fn from(ptr: *mut c_void) -> CbDrawPaneDecorEvent { CbDrawPaneDecorEvent { ptr: ptr } } 271 | pub fn null() -> CbDrawPaneDecorEvent { CbDrawPaneDecorEvent::from(0 as *mut c_void) } 272 | 273 | } 274 | 275 | pub trait CbDrawPaneDecorEventMethods : CbPluginEventMethods { 276 | } 277 | 278 | pub struct CbDrawRowBkGroundEvent { ptr: *mut c_void } 279 | impl CbDrawRowBkGroundEventMethods for CbDrawRowBkGroundEvent {} 280 | impl CbPluginEventMethods for CbDrawRowBkGroundEvent {} 281 | impl EventMethods for CbDrawRowBkGroundEvent {} 282 | impl ObjectMethods for CbDrawRowBkGroundEvent { fn ptr(&self) -> *mut c_void { self.ptr } } 283 | 284 | impl CbDrawRowBkGroundEvent { 285 | pub fn from(ptr: *mut c_void) -> CbDrawRowBkGroundEvent { CbDrawRowBkGroundEvent { ptr: ptr } } 286 | pub fn null() -> CbDrawRowBkGroundEvent { CbDrawRowBkGroundEvent::from(0 as *mut c_void) } 287 | 288 | } 289 | 290 | pub trait CbDrawRowBkGroundEventMethods : CbPluginEventMethods { 291 | } 292 | 293 | pub struct CbDrawRowDecorEvent { ptr: *mut c_void } 294 | impl CbDrawRowDecorEventMethods for CbDrawRowDecorEvent {} 295 | impl CbPluginEventMethods for CbDrawRowDecorEvent {} 296 | impl EventMethods for CbDrawRowDecorEvent {} 297 | impl ObjectMethods for CbDrawRowDecorEvent { fn ptr(&self) -> *mut c_void { self.ptr } } 298 | 299 | impl CbDrawRowDecorEvent { 300 | pub fn from(ptr: *mut c_void) -> CbDrawRowDecorEvent { CbDrawRowDecorEvent { ptr: ptr } } 301 | pub fn null() -> CbDrawRowDecorEvent { CbDrawRowDecorEvent::from(0 as *mut c_void) } 302 | 303 | } 304 | 305 | pub trait CbDrawRowDecorEventMethods : CbPluginEventMethods { 306 | } 307 | 308 | pub struct CbDrawRowHandlesEvent { ptr: *mut c_void } 309 | impl CbDrawRowHandlesEventMethods for CbDrawRowHandlesEvent {} 310 | impl CbPluginEventMethods for CbDrawRowHandlesEvent {} 311 | impl EventMethods for CbDrawRowHandlesEvent {} 312 | impl ObjectMethods for CbDrawRowHandlesEvent { fn ptr(&self) -> *mut c_void { self.ptr } } 313 | 314 | impl CbDrawRowHandlesEvent { 315 | pub fn from(ptr: *mut c_void) -> CbDrawRowHandlesEvent { CbDrawRowHandlesEvent { ptr: ptr } } 316 | pub fn null() -> CbDrawRowHandlesEvent { CbDrawRowHandlesEvent::from(0 as *mut c_void) } 317 | 318 | } 319 | 320 | pub trait CbDrawRowHandlesEventMethods : CbPluginEventMethods { 321 | } 322 | 323 | pub struct CbDynToolBarDimHandler { ptr: *mut c_void } 324 | impl CbDynToolBarDimHandlerMethods for CbDynToolBarDimHandler {} 325 | impl CbDimHandlerBaseMethods for CbDynToolBarDimHandler {} 326 | impl ObjectMethods for CbDynToolBarDimHandler { fn ptr(&self) -> *mut c_void { self.ptr } } 327 | 328 | impl CbDynToolBarDimHandler { 329 | pub fn from(ptr: *mut c_void) -> CbDynToolBarDimHandler { CbDynToolBarDimHandler { ptr: ptr } } 330 | pub fn null() -> CbDynToolBarDimHandler { CbDynToolBarDimHandler::from(0 as *mut c_void) } 331 | 332 | } 333 | 334 | pub trait CbDynToolBarDimHandlerMethods : CbDimHandlerBaseMethods { 335 | } 336 | 337 | pub struct CbFinishDrawInAreaEvent { ptr: *mut c_void } 338 | impl CbFinishDrawInAreaEventMethods for CbFinishDrawInAreaEvent {} 339 | impl CbPluginEventMethods for CbFinishDrawInAreaEvent {} 340 | impl EventMethods for CbFinishDrawInAreaEvent {} 341 | impl ObjectMethods for CbFinishDrawInAreaEvent { fn ptr(&self) -> *mut c_void { self.ptr } } 342 | 343 | impl CbFinishDrawInAreaEvent { 344 | pub fn from(ptr: *mut c_void) -> CbFinishDrawInAreaEvent { CbFinishDrawInAreaEvent { ptr: ptr } } 345 | pub fn null() -> CbFinishDrawInAreaEvent { CbFinishDrawInAreaEvent::from(0 as *mut c_void) } 346 | 347 | } 348 | 349 | pub trait CbFinishDrawInAreaEventMethods : CbPluginEventMethods { 350 | } 351 | 352 | pub struct CbFloatedBarWindow { ptr: *mut c_void } 353 | impl CbFloatedBarWindowMethods for CbFloatedBarWindow {} 354 | impl ToolWindowMethods for CbFloatedBarWindow {} 355 | impl FrameMethods for CbFloatedBarWindow {} 356 | impl TopLevelWindowMethods for CbFloatedBarWindow {} 357 | impl WindowMethods for CbFloatedBarWindow {} 358 | impl EvtHandlerMethods for CbFloatedBarWindow {} 359 | impl ObjectMethods for CbFloatedBarWindow { fn ptr(&self) -> *mut c_void { self.ptr } } 360 | 361 | impl CbFloatedBarWindow { 362 | pub fn from(ptr: *mut c_void) -> CbFloatedBarWindow { CbFloatedBarWindow { ptr: ptr } } 363 | pub fn null() -> CbFloatedBarWindow { CbFloatedBarWindow::from(0 as *mut c_void) } 364 | 365 | } 366 | 367 | pub trait CbFloatedBarWindowMethods : ToolWindowMethods { 368 | } 369 | 370 | pub struct CbGCUpdatesMgr { ptr: *mut c_void } 371 | impl CbGCUpdatesMgrMethods for CbGCUpdatesMgr {} 372 | impl CbSimpleUpdatesMgrMethods for CbGCUpdatesMgr {} 373 | impl CbUpdatesManagerBaseMethods for CbGCUpdatesMgr {} 374 | impl ObjectMethods for CbGCUpdatesMgr { fn ptr(&self) -> *mut c_void { self.ptr } } 375 | 376 | impl CbGCUpdatesMgr { 377 | pub fn from(ptr: *mut c_void) -> CbGCUpdatesMgr { CbGCUpdatesMgr { ptr: ptr } } 378 | pub fn null() -> CbGCUpdatesMgr { CbGCUpdatesMgr::from(0 as *mut c_void) } 379 | 380 | } 381 | 382 | pub trait CbGCUpdatesMgrMethods : CbSimpleUpdatesMgrMethods { 383 | } 384 | 385 | pub struct CbHintAnimationPlugin { ptr: *mut c_void } 386 | impl CbHintAnimationPluginMethods for CbHintAnimationPlugin {} 387 | impl CbPluginBaseMethods for CbHintAnimationPlugin {} 388 | impl EvtHandlerMethods for CbHintAnimationPlugin {} 389 | impl ObjectMethods for CbHintAnimationPlugin { fn ptr(&self) -> *mut c_void { self.ptr } } 390 | 391 | impl CbHintAnimationPlugin { 392 | pub fn from(ptr: *mut c_void) -> CbHintAnimationPlugin { CbHintAnimationPlugin { ptr: ptr } } 393 | pub fn null() -> CbHintAnimationPlugin { CbHintAnimationPlugin::from(0 as *mut c_void) } 394 | 395 | } 396 | 397 | pub trait CbHintAnimationPluginMethods : CbPluginBaseMethods { 398 | } 399 | 400 | pub struct CbInsertBarEvent { ptr: *mut c_void } 401 | impl CbInsertBarEventMethods for CbInsertBarEvent {} 402 | impl CbPluginEventMethods for CbInsertBarEvent {} 403 | impl EventMethods for CbInsertBarEvent {} 404 | impl ObjectMethods for CbInsertBarEvent { fn ptr(&self) -> *mut c_void { self.ptr } } 405 | 406 | impl CbInsertBarEvent { 407 | pub fn from(ptr: *mut c_void) -> CbInsertBarEvent { CbInsertBarEvent { ptr: ptr } } 408 | pub fn null() -> CbInsertBarEvent { CbInsertBarEvent::from(0 as *mut c_void) } 409 | 410 | } 411 | 412 | pub trait CbInsertBarEventMethods : CbPluginEventMethods { 413 | } 414 | 415 | pub struct CbLayoutRowEvent { ptr: *mut c_void } 416 | impl CbLayoutRowEventMethods for CbLayoutRowEvent {} 417 | impl CbPluginEventMethods for CbLayoutRowEvent {} 418 | impl EventMethods for CbLayoutRowEvent {} 419 | impl ObjectMethods for CbLayoutRowEvent { fn ptr(&self) -> *mut c_void { self.ptr } } 420 | 421 | impl CbLayoutRowEvent { 422 | pub fn from(ptr: *mut c_void) -> CbLayoutRowEvent { CbLayoutRowEvent { ptr: ptr } } 423 | pub fn null() -> CbLayoutRowEvent { CbLayoutRowEvent::from(0 as *mut c_void) } 424 | 425 | } 426 | 427 | pub trait CbLayoutRowEventMethods : CbPluginEventMethods { 428 | } 429 | 430 | pub struct CbLeftDClickEvent { ptr: *mut c_void } 431 | impl CbLeftDClickEventMethods for CbLeftDClickEvent {} 432 | impl CbPluginEventMethods for CbLeftDClickEvent {} 433 | impl EventMethods for CbLeftDClickEvent {} 434 | impl ObjectMethods for CbLeftDClickEvent { fn ptr(&self) -> *mut c_void { self.ptr } } 435 | 436 | impl CbLeftDClickEvent { 437 | pub fn from(ptr: *mut c_void) -> CbLeftDClickEvent { CbLeftDClickEvent { ptr: ptr } } 438 | pub fn null() -> CbLeftDClickEvent { CbLeftDClickEvent::from(0 as *mut c_void) } 439 | 440 | } 441 | 442 | pub trait CbLeftDClickEventMethods : CbPluginEventMethods { 443 | } 444 | 445 | pub struct CbLeftDownEvent { ptr: *mut c_void } 446 | impl CbLeftDownEventMethods for CbLeftDownEvent {} 447 | impl CbPluginEventMethods for CbLeftDownEvent {} 448 | impl EventMethods for CbLeftDownEvent {} 449 | impl ObjectMethods for CbLeftDownEvent { fn ptr(&self) -> *mut c_void { self.ptr } } 450 | 451 | impl CbLeftDownEvent { 452 | pub fn from(ptr: *mut c_void) -> CbLeftDownEvent { CbLeftDownEvent { ptr: ptr } } 453 | pub fn null() -> CbLeftDownEvent { CbLeftDownEvent::from(0 as *mut c_void) } 454 | 455 | } 456 | 457 | pub trait CbLeftDownEventMethods : CbPluginEventMethods { 458 | } 459 | 460 | pub struct CbLeftUpEvent { ptr: *mut c_void } 461 | impl CbLeftUpEventMethods for CbLeftUpEvent {} 462 | impl CbPluginEventMethods for CbLeftUpEvent {} 463 | impl EventMethods for CbLeftUpEvent {} 464 | impl ObjectMethods for CbLeftUpEvent { fn ptr(&self) -> *mut c_void { self.ptr } } 465 | 466 | impl CbLeftUpEvent { 467 | pub fn from(ptr: *mut c_void) -> CbLeftUpEvent { CbLeftUpEvent { ptr: ptr } } 468 | pub fn null() -> CbLeftUpEvent { CbLeftUpEvent::from(0 as *mut c_void) } 469 | 470 | } 471 | 472 | pub trait CbLeftUpEventMethods : CbPluginEventMethods { 473 | } 474 | 475 | pub struct CbMiniButton { ptr: *mut c_void } 476 | impl CbMiniButtonMethods for CbMiniButton {} 477 | impl ObjectMethods for CbMiniButton { fn ptr(&self) -> *mut c_void { self.ptr } } 478 | 479 | impl CbMiniButton { 480 | pub fn from(ptr: *mut c_void) -> CbMiniButton { CbMiniButton { ptr: ptr } } 481 | pub fn null() -> CbMiniButton { CbMiniButton::from(0 as *mut c_void) } 482 | 483 | } 484 | 485 | pub trait CbMiniButtonMethods : ObjectMethods { 486 | } 487 | 488 | pub struct CbMotionEvent { ptr: *mut c_void } 489 | impl CbMotionEventMethods for CbMotionEvent {} 490 | impl CbPluginEventMethods for CbMotionEvent {} 491 | impl EventMethods for CbMotionEvent {} 492 | impl ObjectMethods for CbMotionEvent { fn ptr(&self) -> *mut c_void { self.ptr } } 493 | 494 | impl CbMotionEvent { 495 | pub fn from(ptr: *mut c_void) -> CbMotionEvent { CbMotionEvent { ptr: ptr } } 496 | pub fn null() -> CbMotionEvent { CbMotionEvent::from(0 as *mut c_void) } 497 | 498 | } 499 | 500 | pub trait CbMotionEventMethods : CbPluginEventMethods { 501 | } 502 | 503 | pub struct CbPaneDrawPlugin { ptr: *mut c_void } 504 | impl CbPaneDrawPluginMethods for CbPaneDrawPlugin {} 505 | impl CbPluginBaseMethods for CbPaneDrawPlugin {} 506 | impl EvtHandlerMethods for CbPaneDrawPlugin {} 507 | impl ObjectMethods for CbPaneDrawPlugin { fn ptr(&self) -> *mut c_void { self.ptr } } 508 | 509 | impl CbPaneDrawPlugin { 510 | pub fn from(ptr: *mut c_void) -> CbPaneDrawPlugin { CbPaneDrawPlugin { ptr: ptr } } 511 | pub fn null() -> CbPaneDrawPlugin { CbPaneDrawPlugin::from(0 as *mut c_void) } 512 | 513 | } 514 | 515 | pub trait CbPaneDrawPluginMethods : CbPluginBaseMethods { 516 | } 517 | 518 | pub struct CbPluginBase { ptr: *mut c_void } 519 | impl CbPluginBaseMethods for CbPluginBase {} 520 | impl EvtHandlerMethods for CbPluginBase {} 521 | impl ObjectMethods for CbPluginBase { fn ptr(&self) -> *mut c_void { self.ptr } } 522 | 523 | impl CbPluginBase { 524 | pub fn from(ptr: *mut c_void) -> CbPluginBase { CbPluginBase { ptr: ptr } } 525 | pub fn null() -> CbPluginBase { CbPluginBase::from(0 as *mut c_void) } 526 | 527 | } 528 | 529 | pub trait CbPluginBaseMethods : EvtHandlerMethods { 530 | } 531 | 532 | pub struct CbPluginEvent { ptr: *mut c_void } 533 | impl CbPluginEventMethods for CbPluginEvent {} 534 | impl EventMethods for CbPluginEvent {} 535 | impl ObjectMethods for CbPluginEvent { fn ptr(&self) -> *mut c_void { self.ptr } } 536 | 537 | impl CbPluginEvent { 538 | pub fn from(ptr: *mut c_void) -> CbPluginEvent { CbPluginEvent { ptr: ptr } } 539 | pub fn null() -> CbPluginEvent { CbPluginEvent::from(0 as *mut c_void) } 540 | 541 | } 542 | 543 | pub trait CbPluginEventMethods : EventMethods { 544 | } 545 | 546 | pub struct CbRemoveBarEvent { ptr: *mut c_void } 547 | impl CbRemoveBarEventMethods for CbRemoveBarEvent {} 548 | impl CbPluginEventMethods for CbRemoveBarEvent {} 549 | impl EventMethods for CbRemoveBarEvent {} 550 | impl ObjectMethods for CbRemoveBarEvent { fn ptr(&self) -> *mut c_void { self.ptr } } 551 | 552 | impl CbRemoveBarEvent { 553 | pub fn from(ptr: *mut c_void) -> CbRemoveBarEvent { CbRemoveBarEvent { ptr: ptr } } 554 | pub fn null() -> CbRemoveBarEvent { CbRemoveBarEvent::from(0 as *mut c_void) } 555 | 556 | } 557 | 558 | pub trait CbRemoveBarEventMethods : CbPluginEventMethods { 559 | } 560 | 561 | pub struct CbResizeBarEvent { ptr: *mut c_void } 562 | impl CbResizeBarEventMethods for CbResizeBarEvent {} 563 | impl CbPluginEventMethods for CbResizeBarEvent {} 564 | impl EventMethods for CbResizeBarEvent {} 565 | impl ObjectMethods for CbResizeBarEvent { fn ptr(&self) -> *mut c_void { self.ptr } } 566 | 567 | impl CbResizeBarEvent { 568 | pub fn from(ptr: *mut c_void) -> CbResizeBarEvent { CbResizeBarEvent { ptr: ptr } } 569 | pub fn null() -> CbResizeBarEvent { CbResizeBarEvent::from(0 as *mut c_void) } 570 | 571 | } 572 | 573 | pub trait CbResizeBarEventMethods : CbPluginEventMethods { 574 | } 575 | 576 | pub struct CbResizeRowEvent { ptr: *mut c_void } 577 | impl CbResizeRowEventMethods for CbResizeRowEvent {} 578 | impl CbPluginEventMethods for CbResizeRowEvent {} 579 | impl EventMethods for CbResizeRowEvent {} 580 | impl ObjectMethods for CbResizeRowEvent { fn ptr(&self) -> *mut c_void { self.ptr } } 581 | 582 | impl CbResizeRowEvent { 583 | pub fn from(ptr: *mut c_void) -> CbResizeRowEvent { CbResizeRowEvent { ptr: ptr } } 584 | pub fn null() -> CbResizeRowEvent { CbResizeRowEvent::from(0 as *mut c_void) } 585 | 586 | } 587 | 588 | pub trait CbResizeRowEventMethods : CbPluginEventMethods { 589 | } 590 | 591 | pub struct CbRightDownEvent { ptr: *mut c_void } 592 | impl CbRightDownEventMethods for CbRightDownEvent {} 593 | impl CbPluginEventMethods for CbRightDownEvent {} 594 | impl EventMethods for CbRightDownEvent {} 595 | impl ObjectMethods for CbRightDownEvent { fn ptr(&self) -> *mut c_void { self.ptr } } 596 | 597 | impl CbRightDownEvent { 598 | pub fn from(ptr: *mut c_void) -> CbRightDownEvent { CbRightDownEvent { ptr: ptr } } 599 | pub fn null() -> CbRightDownEvent { CbRightDownEvent::from(0 as *mut c_void) } 600 | 601 | } 602 | 603 | pub trait CbRightDownEventMethods : CbPluginEventMethods { 604 | } 605 | 606 | pub struct CbRightUpEvent { ptr: *mut c_void } 607 | impl CbRightUpEventMethods for CbRightUpEvent {} 608 | impl CbPluginEventMethods for CbRightUpEvent {} 609 | impl EventMethods for CbRightUpEvent {} 610 | impl ObjectMethods for CbRightUpEvent { fn ptr(&self) -> *mut c_void { self.ptr } } 611 | 612 | impl CbRightUpEvent { 613 | pub fn from(ptr: *mut c_void) -> CbRightUpEvent { CbRightUpEvent { ptr: ptr } } 614 | pub fn null() -> CbRightUpEvent { CbRightUpEvent::from(0 as *mut c_void) } 615 | 616 | } 617 | 618 | pub trait CbRightUpEventMethods : CbPluginEventMethods { 619 | } 620 | 621 | pub struct CbRowDragPlugin { ptr: *mut c_void } 622 | impl CbRowDragPluginMethods for CbRowDragPlugin {} 623 | impl CbPluginBaseMethods for CbRowDragPlugin {} 624 | impl EvtHandlerMethods for CbRowDragPlugin {} 625 | impl ObjectMethods for CbRowDragPlugin { fn ptr(&self) -> *mut c_void { self.ptr } } 626 | 627 | impl CbRowDragPlugin { 628 | pub fn from(ptr: *mut c_void) -> CbRowDragPlugin { CbRowDragPlugin { ptr: ptr } } 629 | pub fn null() -> CbRowDragPlugin { CbRowDragPlugin::from(0 as *mut c_void) } 630 | 631 | } 632 | 633 | pub trait CbRowDragPluginMethods : CbPluginBaseMethods { 634 | } 635 | 636 | pub struct CbRowInfo { ptr: *mut c_void } 637 | impl CbRowInfoMethods for CbRowInfo {} 638 | impl ObjectMethods for CbRowInfo { fn ptr(&self) -> *mut c_void { self.ptr } } 639 | 640 | impl CbRowInfo { 641 | pub fn from(ptr: *mut c_void) -> CbRowInfo { CbRowInfo { ptr: ptr } } 642 | pub fn null() -> CbRowInfo { CbRowInfo::from(0 as *mut c_void) } 643 | 644 | } 645 | 646 | pub trait CbRowInfoMethods : ObjectMethods { 647 | } 648 | 649 | pub struct CbRowLayoutPlugin { ptr: *mut c_void } 650 | impl CbRowLayoutPluginMethods for CbRowLayoutPlugin {} 651 | impl CbPluginBaseMethods for CbRowLayoutPlugin {} 652 | impl EvtHandlerMethods for CbRowLayoutPlugin {} 653 | impl ObjectMethods for CbRowLayoutPlugin { fn ptr(&self) -> *mut c_void { self.ptr } } 654 | 655 | impl CbRowLayoutPlugin { 656 | pub fn from(ptr: *mut c_void) -> CbRowLayoutPlugin { CbRowLayoutPlugin { ptr: ptr } } 657 | pub fn null() -> CbRowLayoutPlugin { CbRowLayoutPlugin::from(0 as *mut c_void) } 658 | 659 | } 660 | 661 | pub trait CbRowLayoutPluginMethods : CbPluginBaseMethods { 662 | } 663 | 664 | pub struct CbSimpleCustomizationPlugin { ptr: *mut c_void } 665 | impl CbSimpleCustomizationPluginMethods for CbSimpleCustomizationPlugin {} 666 | impl CbPluginBaseMethods for CbSimpleCustomizationPlugin {} 667 | impl EvtHandlerMethods for CbSimpleCustomizationPlugin {} 668 | impl ObjectMethods for CbSimpleCustomizationPlugin { fn ptr(&self) -> *mut c_void { self.ptr } } 669 | 670 | impl CbSimpleCustomizationPlugin { 671 | pub fn from(ptr: *mut c_void) -> CbSimpleCustomizationPlugin { CbSimpleCustomizationPlugin { ptr: ptr } } 672 | pub fn null() -> CbSimpleCustomizationPlugin { CbSimpleCustomizationPlugin::from(0 as *mut c_void) } 673 | 674 | } 675 | 676 | pub trait CbSimpleCustomizationPluginMethods : CbPluginBaseMethods { 677 | } 678 | 679 | pub struct CbSimpleUpdatesMgr { ptr: *mut c_void } 680 | impl CbSimpleUpdatesMgrMethods for CbSimpleUpdatesMgr {} 681 | impl CbUpdatesManagerBaseMethods for CbSimpleUpdatesMgr {} 682 | impl ObjectMethods for CbSimpleUpdatesMgr { fn ptr(&self) -> *mut c_void { self.ptr } } 683 | 684 | impl CbSimpleUpdatesMgr { 685 | pub fn from(ptr: *mut c_void) -> CbSimpleUpdatesMgr { CbSimpleUpdatesMgr { ptr: ptr } } 686 | pub fn null() -> CbSimpleUpdatesMgr { CbSimpleUpdatesMgr::from(0 as *mut c_void) } 687 | 688 | } 689 | 690 | pub trait CbSimpleUpdatesMgrMethods : CbUpdatesManagerBaseMethods { 691 | } 692 | 693 | pub struct CbSizeBarWndEvent { ptr: *mut c_void } 694 | impl CbSizeBarWndEventMethods for CbSizeBarWndEvent {} 695 | impl CbPluginEventMethods for CbSizeBarWndEvent {} 696 | impl EventMethods for CbSizeBarWndEvent {} 697 | impl ObjectMethods for CbSizeBarWndEvent { fn ptr(&self) -> *mut c_void { self.ptr } } 698 | 699 | impl CbSizeBarWndEvent { 700 | pub fn from(ptr: *mut c_void) -> CbSizeBarWndEvent { CbSizeBarWndEvent { ptr: ptr } } 701 | pub fn null() -> CbSizeBarWndEvent { CbSizeBarWndEvent::from(0 as *mut c_void) } 702 | 703 | } 704 | 705 | pub trait CbSizeBarWndEventMethods : CbPluginEventMethods { 706 | } 707 | 708 | pub struct CbStartBarDraggingEvent { ptr: *mut c_void } 709 | impl CbStartBarDraggingEventMethods for CbStartBarDraggingEvent {} 710 | impl CbPluginEventMethods for CbStartBarDraggingEvent {} 711 | impl EventMethods for CbStartBarDraggingEvent {} 712 | impl ObjectMethods for CbStartBarDraggingEvent { fn ptr(&self) -> *mut c_void { self.ptr } } 713 | 714 | impl CbStartBarDraggingEvent { 715 | pub fn from(ptr: *mut c_void) -> CbStartBarDraggingEvent { CbStartBarDraggingEvent { ptr: ptr } } 716 | pub fn null() -> CbStartBarDraggingEvent { CbStartBarDraggingEvent::from(0 as *mut c_void) } 717 | 718 | } 719 | 720 | pub trait CbStartBarDraggingEventMethods : CbPluginEventMethods { 721 | } 722 | 723 | pub struct CbStartDrawInAreaEvent { ptr: *mut c_void } 724 | impl CbStartDrawInAreaEventMethods for CbStartDrawInAreaEvent {} 725 | impl CbPluginEventMethods for CbStartDrawInAreaEvent {} 726 | impl EventMethods for CbStartDrawInAreaEvent {} 727 | impl ObjectMethods for CbStartDrawInAreaEvent { fn ptr(&self) -> *mut c_void { self.ptr } } 728 | 729 | impl CbStartDrawInAreaEvent { 730 | pub fn from(ptr: *mut c_void) -> CbStartDrawInAreaEvent { CbStartDrawInAreaEvent { ptr: ptr } } 731 | pub fn null() -> CbStartDrawInAreaEvent { CbStartDrawInAreaEvent::from(0 as *mut c_void) } 732 | 733 | } 734 | 735 | pub trait CbStartDrawInAreaEventMethods : CbPluginEventMethods { 736 | } 737 | 738 | pub struct CbUpdatesManagerBase { ptr: *mut c_void } 739 | impl CbUpdatesManagerBaseMethods for CbUpdatesManagerBase {} 740 | impl ObjectMethods for CbUpdatesManagerBase { fn ptr(&self) -> *mut c_void { self.ptr } } 741 | 742 | impl CbUpdatesManagerBase { 743 | pub fn from(ptr: *mut c_void) -> CbUpdatesManagerBase { CbUpdatesManagerBase { ptr: ptr } } 744 | pub fn null() -> CbUpdatesManagerBase { CbUpdatesManagerBase::from(0 as *mut c_void) } 745 | 746 | } 747 | 748 | pub trait CbUpdatesManagerBaseMethods : ObjectMethods { 749 | } 750 | 751 | -------------------------------------------------------------------------------- /LICENSE.txt: -------------------------------------------------------------------------------- 1 | ---------------------------------------------------------------------- 2 | PREAMBLE 3 | 4 | The wxRust libraries are distributed under the wxWindows library 5 | license. The documentation is subject to the wxWidgets documentation 6 | license. 7 | 8 | See "http://www.wxwidgets.org/newlicen.htm" for the legal description 9 | of the license, which is also included in this document. 10 | 11 | The wxWindows library licence is essentially the L-GPL (Library General 12 | Public Licence), with an exception stating that derived works in binary 13 | form may be distributed on the user's own terms. This means that it is 14 | possible to create commercial software with this library without paying 15 | royalties or disclosing source code. This is a solution that satisfies 16 | those who wish to produce GPL'ed software using wxRust, and also 17 | those producing proprietary software. 18 | 19 | This library is distributed in the hope that it will be useful, but 20 | WITHOUT ANY WARRANTY; without even the implied warranty of 21 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the wxWidgets 22 | library license for more details. 23 | 24 | 25 | ---------------------------------------------------------------------- 26 | WXWINDOWS LIBRARY LICENCE 27 | TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 28 | 29 | This library is free software; you can redistribute it and/or modify it 30 | under the terms of the GNU Library General Public Licence as published by 31 | the Free Software Foundation; either version 2 of the Licence, or (at 32 | your option) any later version. 33 | 34 | This library is distributed in the hope that it will be useful, but 35 | WITHOUT ANY WARRANTY; without even the implied warranty of 36 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library 37 | General Public Licence for more details. 38 | 39 | You should have received a copy of the GNU Library General Public Licence 40 | along with this software, usually in a file named COPYING.LIB. If not, 41 | write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, 42 | Boston, MA 02111-1307 USA. 43 | 44 | EXCEPTION NOTICE 45 | 46 | 1. As a special exception, the copyright holders of this library give 47 | permission for additional uses of the text contained in this release of 48 | the library as licenced under the wxWindows Library Licence, applying 49 | either version 3 of the Licence, or (at your option) any later version of 50 | the Licence as published by the copyright holders of version 3 of the 51 | Licence document. 52 | 53 | 2. The exception is that you may use, copy, link, modify and distribute 54 | under the user's own terms, binary object code versions of works based 55 | on the Library. 56 | 57 | 3. If you copy code from files distributed under the terms of the GNU 58 | General Public Licence or the GNU Library General Public Licence into a 59 | copy of this library, as this licence permits, the exception does not 60 | apply to the code that you add in this way. To avoid misleading anyone as 61 | to the status of such modified files, you must delete this exception 62 | notice from such code and/or adjust the licensing conditions notice 63 | accordingly. 64 | 65 | 4. If you write modifications of your own for this library, it is your 66 | choice whether to permit this exception to apply to your modifications. 67 | If you do not wish that, you must delete the exception notice from such 68 | code and/or adjust the licensing conditions notice accordingly. 69 | 70 | 71 | ---------------------------------------------------------------------- 72 | GNU LESSER GENERAL PUBLIC LICENSE 73 | Version 2.1, February 1999 74 | 75 | Copyright (C) 1991, 1999 Free Software Foundation, Inc. 76 | 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 77 | Everyone is permitted to copy and distribute verbatim copies 78 | of this license document, but changing it is not allowed. 79 | 80 | [This is the first released version of the Lesser GPL. It also counts 81 | as the successor of the GNU Library Public License, version 2, hence 82 | the version number 2.1.] 83 | 84 | Preamble 85 | 86 | The licenses for most software are designed to take away your 87 | freedom to share and change it. By contrast, the GNU General Public 88 | Licenses are intended to guarantee your freedom to share and change 89 | free software--to make sure the software is free for all its users. 90 | 91 | This license, the Lesser General Public License, applies to some 92 | specially designated software packages--typically libraries--of the 93 | Free Software Foundation and other authors who decide to use it. You 94 | can use it too, but we suggest you first think carefully about whether 95 | this license or the ordinary General Public License is the better 96 | strategy to use in any particular case, based on the explanations below. 97 | 98 | When we speak of free software, we are referring to freedom of use, 99 | not price. Our General Public Licenses are designed to make sure that 100 | you have the freedom to distribute copies of free software (and charge 101 | for this service if you wish); that you receive source code or can get 102 | it if you want it; that you can change the software and use pieces of 103 | it in new free programs; and that you are informed that you can do 104 | these things. 105 | 106 | To protect your rights, we need to make restrictions that forbid 107 | distributors to deny you these rights or to ask you to surrender these 108 | rights. These restrictions translate to certain responsibilities for 109 | you if you distribute copies of the library or if you modify it. 110 | 111 | For example, if you distribute copies of the library, whether gratis 112 | or for a fee, you must give the recipients all the rights that we gave 113 | you. You must make sure that they, too, receive or can get the source 114 | code. If you link other code with the library, you must provide 115 | complete object files to the recipients, so that they can relink them 116 | with the library after making changes to the library and recompiling 117 | it. And you must show them these terms so they know their rights. 118 | 119 | We protect your rights with a two-step method: (1) we copyright the 120 | library, and (2) we offer you this license, which gives you legal 121 | permission to copy, distribute and/or modify the library. 122 | 123 | To protect each distributor, we want to make it very clear that 124 | there is no warranty for the free library. Also, if the library is 125 | modified by someone else and passed on, the recipients should know 126 | that what they have is not the original version, so that the original 127 | author's reputation will not be affected by problems that might be 128 | introduced by others. 129 | 130 | Finally, software patents pose a constant threat to the existence of 131 | any free program. We wish to make sure that a company cannot 132 | effectively restrict the users of a free program by obtaining a 133 | restrictive license from a patent holder. Therefore, we insist that 134 | any patent license obtained for a version of the library must be 135 | consistent with the full freedom of use specified in this license. 136 | 137 | Most GNU software, including some libraries, is covered by the 138 | ordinary GNU General Public License. This license, the GNU Lesser 139 | General Public License, applies to certain designated libraries, and 140 | is quite different from the ordinary General Public License. We use 141 | this license for certain libraries in order to permit linking those 142 | libraries into non-free programs. 143 | 144 | When a program is linked with a library, whether statically or using 145 | a shared library, the combination of the two is legally speaking a 146 | combined work, a derivative of the original library. The ordinary 147 | General Public License therefore permits such linking only if the 148 | entire combination fits its criteria of freedom. The Lesser General 149 | Public License permits more lax criteria for linking other code with 150 | the library. 151 | 152 | We call this license the "Lesser" General Public License because it 153 | does Less to protect the user's freedom than the ordinary General 154 | Public License. It also provides other free software developers Less 155 | of an advantage over competing non-free programs. These disadvantages 156 | are the reason we use the ordinary General Public License for many 157 | libraries. However, the Lesser license provides advantages in certain 158 | special circumstances. 159 | 160 | For example, on rare occasions, there may be a special need to 161 | encourage the widest possible use of a certain library, so that it becomes 162 | a de-facto standard. To achieve this, non-free programs must be 163 | allowed to use the library. A more frequent case is that a free 164 | library does the same job as widely used non-free libraries. In this 165 | case, there is little to gain by limiting the free library to free 166 | software only, so we use the Lesser General Public License. 167 | 168 | In other cases, permission to use a particular library in non-free 169 | programs enables a greater number of people to use a large body of 170 | free software. For example, permission to use the GNU C Library in 171 | non-free programs enables many more people to use the whole GNU 172 | operating system, as well as its variant, the GNU/Linux operating 173 | system. 174 | 175 | Although the Lesser General Public License is Less protective of the 176 | users' freedom, it does ensure that the user of a program that is 177 | linked with the Library has the freedom and the wherewithal to run 178 | that program using a modified version of the Library. 179 | 180 | The precise terms and conditions for copying, distribution and 181 | modification follow. Pay close attention to the difference between a 182 | "work based on the library" and a "work that uses the library". The 183 | former contains code derived from the library, whereas the latter must 184 | be combined with the library in order to run. 185 | 186 | GNU LESSER GENERAL PUBLIC LICENSE 187 | TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 188 | 189 | 0. This License Agreement applies to any software library or other 190 | program which contains a notice placed by the copyright holder or 191 | other authorized party saying it may be distributed under the terms of 192 | this Lesser General Public License (also called "this License"). 193 | Each licensee is addressed as "you". 194 | 195 | A "library" means a collection of software functions and/or data 196 | prepared so as to be conveniently linked with application programs 197 | (which use some of those functions and data) to form executables. 198 | 199 | The "Library", below, refers to any such software library or work 200 | which has been distributed under these terms. A "work based on the 201 | Library" means either the Library or any derivative work under 202 | copyright law: that is to say, a work containing the Library or a 203 | portion of it, either verbatim or with modifications and/or translated 204 | straightforwardly into another language. (Hereinafter, translation is 205 | included without limitation in the term "modification".) 206 | 207 | "Source code" for a work means the preferred form of the work for 208 | making modifications to it. For a library, complete source code means 209 | all the source code for all modules it contains, plus any associated 210 | interface definition files, plus the scripts used to control compilation 211 | and installation of the library. 212 | 213 | Activities other than copying, distribution and modification are not 214 | covered by this License; they are outside its scope. The act of 215 | running a program using the Library is not restricted, and output from 216 | such a program is covered only if its contents constitute a work based 217 | on the Library (independent of the use of the Library in a tool for 218 | writing it). Whether that is true depends on what the Library does 219 | and what the program that uses the Library does. 220 | 221 | 1. You may copy and distribute verbatim copies of the Library's 222 | complete source code as you receive it, in any medium, provided that 223 | you conspicuously and appropriately publish on each copy an 224 | appropriate copyright notice and disclaimer of warranty; keep intact 225 | all the notices that refer to this License and to the absence of any 226 | warranty; and distribute a copy of this License along with the 227 | Library. 228 | 229 | You may charge a fee for the physical act of transferring a copy, 230 | and you may at your option offer warranty protection in exchange for a 231 | fee. 232 | 233 | 2. You may modify your copy or copies of the Library or any portion 234 | of it, thus forming a work based on the Library, and copy and 235 | distribute such modifications or work under the terms of Section 1 236 | above, provided that you also meet all of these conditions: 237 | 238 | a) The modified work must itself be a software library. 239 | 240 | b) You must cause the files modified to carry prominent notices 241 | stating that you changed the files and the date of any change. 242 | 243 | c) You must cause the whole of the work to be licensed at no 244 | charge to all third parties under the terms of this License. 245 | 246 | d) If a facility in the modified Library refers to a function or a 247 | table of data to be supplied by an application program that uses 248 | the facility, other than as an argument passed when the facility 249 | is invoked, then you must make a good faith effort to ensure that, 250 | in the event an application does not supply such function or 251 | table, the facility still operates, and performs whatever part of 252 | its purpose remains meaningful. 253 | 254 | (For example, a function in a library to compute square roots has 255 | a purpose that is entirely well-defined independent of the 256 | application. Therefore, Subsection 2d requires that any 257 | application-supplied function or table used by this function must 258 | be optional: if the application does not supply it, the square 259 | root function must still compute square roots.) 260 | 261 | These requirements apply to the modified work as a whole. If 262 | identifiable sections of that work are not derived from the Library, 263 | and can be reasonably considered independent and separate works in 264 | themselves, then this License, and its terms, do not apply to those 265 | sections when you distribute them as separate works. But when you 266 | distribute the same sections as part of a whole which is a work based 267 | on the Library, the distribution of the whole must be on the terms of 268 | this License, whose permissions for other licensees extend to the 269 | entire whole, and thus to each and every part regardless of who wrote 270 | it. 271 | 272 | Thus, it is not the intent of this section to claim rights or contest 273 | your rights to work written entirely by you; rather, the intent is to 274 | exercise the right to control the distribution of derivative or 275 | collective works based on the Library. 276 | 277 | In addition, mere aggregation of another work not based on the Library 278 | with the Library (or with a work based on the Library) on a volume of 279 | a storage or distribution medium does not bring the other work under 280 | the scope of this License. 281 | 282 | 3. You may opt to apply the terms of the ordinary GNU General Public 283 | License instead of this License to a given copy of the Library. To do 284 | this, you must alter all the notices that refer to this License, so 285 | that they refer to the ordinary GNU General Public License, version 2, 286 | instead of to this License. (If a newer version than version 2 of the 287 | ordinary GNU General Public License has appeared, then you can specify 288 | that version instead if you wish.) Do not make any other change in 289 | these notices. 290 | 291 | Once this change is made in a given copy, it is irreversible for 292 | that copy, so the ordinary GNU General Public License applies to all 293 | subsequent copies and derivative works made from that copy. 294 | 295 | This option is useful when you wish to copy part of the code of 296 | the Library into a program that is not a library. 297 | 298 | 4. You may copy and distribute the Library (or a portion or 299 | derivative of it, under Section 2) in object code or executable form 300 | under the terms of Sections 1 and 2 above provided that you accompany 301 | it with the complete corresponding machine-readable source code, which 302 | must be distributed under the terms of Sections 1 and 2 above on a 303 | medium customarily used for software interchange. 304 | 305 | If distribution of object code is made by offering access to copy 306 | from a designated place, then offering equivalent access to copy the 307 | source code from the same place satisfies the requirement to 308 | distribute the source code, even though third parties are not 309 | compelled to copy the source along with the object code. 310 | 311 | 5. A program that contains no derivative of any portion of the 312 | Library, but is designed to work with the Library by being compiled or 313 | linked with it, is called a "work that uses the Library". Such a 314 | work, in isolation, is not a derivative work of the Library, and 315 | therefore falls outside the scope of this License. 316 | 317 | However, linking a "work that uses the Library" with the Library 318 | creates an executable that is a derivative of the Library (because it 319 | contains portions of the Library), rather than a "work that uses the 320 | library". The executable is therefore covered by this License. 321 | Section 6 states terms for distribution of such executables. 322 | 323 | When a "work that uses the Library" uses material from a header file 324 | that is part of the Library, the object code for the work may be a 325 | derivative work of the Library even though the source code is not. 326 | Whether this is true is especially significant if the work can be 327 | linked without the Library, or if the work is itself a library. The 328 | threshold for this to be true is not precisely defined by law. 329 | 330 | If such an object file uses only numerical parameters, data 331 | structure layouts and accessors, and small macros and small inline 332 | functions (ten lines or less in length), then the use of the object 333 | file is unrestricted, regardless of whether it is legally a derivative 334 | work. (Executables containing this object code plus portions of the 335 | Library will still fall under Section 6.) 336 | 337 | Otherwise, if the work is a derivative of the Library, you may 338 | distribute the object code for the work under the terms of Section 6. 339 | Any executables containing that work also fall under Section 6, 340 | whether or not they are linked directly with the Library itself. 341 | 342 | 6. As an exception to the Sections above, you may also combine or 343 | link a "work that uses the Library" with the Library to produce a 344 | work containing portions of the Library, and distribute that work 345 | under terms of your choice, provided that the terms permit 346 | modification of the work for the customer's own use and reverse 347 | engineering for debugging such modifications. 348 | 349 | You must give prominent notice with each copy of the work that the 350 | Library is used in it and that the Library and its use are covered by 351 | this License. You must supply a copy of this License. If the work 352 | during execution displays copyright notices, you must include the 353 | copyright notice for the Library among them, as well as a reference 354 | directing the user to the copy of this License. Also, you must do one 355 | of these things: 356 | 357 | a) Accompany the work with the complete corresponding 358 | machine-readable source code for the Library including whatever 359 | changes were used in the work (which must be distributed under 360 | Sections 1 and 2 above); and, if the work is an executable linked 361 | with the Library, with the complete machine-readable "work that 362 | uses the Library", as object code and/or source code, so that the 363 | user can modify the Library and then relink to produce a modified 364 | executable containing the modified Library. (It is understood 365 | that the user who changes the contents of definitions files in the 366 | Library will not necessarily be able to recompile the application 367 | to use the modified definitions.) 368 | 369 | b) Use a suitable shared library mechanism for linking with the 370 | Library. A suitable mechanism is one that (1) uses at run time a 371 | copy of the library already present on the user's computer system, 372 | rather than copying library functions into the executable, and (2) 373 | will operate properly with a modified version of the library, if 374 | the user installs one, as long as the modified version is 375 | interface-compatible with the version that the work was made with. 376 | 377 | c) Accompany the work with a written offer, valid for at 378 | least three years, to give the same user the materials 379 | specified in Subsection 6a, above, for a charge no more 380 | than the cost of performing this distribution. 381 | 382 | d) If distribution of the work is made by offering access to copy 383 | from a designated place, offer equivalent access to copy the above 384 | specified materials from the same place. 385 | 386 | e) Verify that the user has already received a copy of these 387 | materials or that you have already sent this user a copy. 388 | 389 | For an executable, the required form of the "work that uses the 390 | Library" must include any data and utility programs needed for 391 | reproducing the executable from it. However, as a special exception, 392 | the materials to be distributed need not include anything that is 393 | normally distributed (in either source or binary form) with the major 394 | components (compiler, kernel, and so on) of the operating system on 395 | which the executable runs, unless that component itself accompanies 396 | the executable. 397 | 398 | It may happen that this requirement contradicts the license 399 | restrictions of other proprietary libraries that do not normally 400 | accompany the operating system. Such a contradiction means you cannot 401 | use both them and the Library together in an executable that you 402 | distribute. 403 | 404 | 7. You may place library facilities that are a work based on the 405 | Library side-by-side in a single library together with other library 406 | facilities not covered by this License, and distribute such a combined 407 | library, provided that the separate distribution of the work based on 408 | the Library and of the other library facilities is otherwise 409 | permitted, and provided that you do these two things: 410 | 411 | a) Accompany the combined library with a copy of the same work 412 | based on the Library, uncombined with any other library 413 | facilities. This must be distributed under the terms of the 414 | Sections above. 415 | 416 | b) Give prominent notice with the combined library of the fact 417 | that part of it is a work based on the Library, and explaining 418 | where to find the accompanying uncombined form of the same work. 419 | 420 | 8. You may not copy, modify, sublicense, link with, or distribute 421 | the Library except as expressly provided under this License. Any 422 | attempt otherwise to copy, modify, sublicense, link with, or 423 | distribute the Library is void, and will automatically terminate your 424 | rights under this License. However, parties who have received copies, 425 | or rights, from you under this License will not have their licenses 426 | terminated so long as such parties remain in full compliance. 427 | 428 | 9. You are not required to accept this License, since you have not 429 | signed it. However, nothing else grants you permission to modify or 430 | distribute the Library or its derivative works. These actions are 431 | prohibited by law if you do not accept this License. Therefore, by 432 | modifying or distributing the Library (or any work based on the 433 | Library), you indicate your acceptance of this License to do so, and 434 | all its terms and conditions for copying, distributing or modifying 435 | the Library or works based on it. 436 | 437 | 10. Each time you redistribute the Library (or any work based on the 438 | Library), the recipient automatically receives a license from the 439 | original licensor to copy, distribute, link with or modify the Library 440 | subject to these terms and conditions. You may not impose any further 441 | restrictions on the recipients' exercise of the rights granted herein. 442 | You are not responsible for enforcing compliance by third parties with 443 | this License. 444 | 445 | 11. If, as a consequence of a court judgment or allegation of patent 446 | infringement or for any other reason (not limited to patent issues), 447 | conditions are imposed on you (whether by court order, agreement or 448 | otherwise) that contradict the conditions of this License, they do not 449 | excuse you from the conditions of this License. If you cannot 450 | distribute so as to satisfy simultaneously your obligations under this 451 | License and any other pertinent obligations, then as a consequence you 452 | may not distribute the Library at all. For example, if a patent 453 | license would not permit royalty-free redistribution of the Library by 454 | all those who receive copies directly or indirectly through you, then 455 | the only way you could satisfy both it and this License would be to 456 | refrain entirely from distribution of the Library. 457 | 458 | If any portion of this section is held invalid or unenforceable under any 459 | particular circumstance, the balance of the section is intended to apply, 460 | and the section as a whole is intended to apply in other circumstances. 461 | 462 | It is not the purpose of this section to induce you to infringe any 463 | patents or other property right claims or to contest validity of any 464 | such claims; this section has the sole purpose of protecting the 465 | integrity of the free software distribution system which is 466 | implemented by public license practices. Many people have made 467 | generous contributions to the wide range of software distributed 468 | through that system in reliance on consistent application of that 469 | system; it is up to the author/donor to decide if he or she is willing 470 | to distribute software through any other system and a licensee cannot 471 | impose that choice. 472 | 473 | This section is intended to make thoroughly clear what is believed to 474 | be a consequence of the rest of this License. 475 | 476 | 12. If the distribution and/or use of the Library is restricted in 477 | certain countries either by patents or by copyrighted interfaces, the 478 | original copyright holder who places the Library under this License may add 479 | an explicit geographical distribution limitation excluding those countries, 480 | so that distribution is permitted only in or among countries not thus 481 | excluded. In such case, this License incorporates the limitation as if 482 | written in the body of this License. 483 | 484 | 13. The Free Software Foundation may publish revised and/or new 485 | versions of the Lesser General Public License from time to time. 486 | Such new versions will be similar in spirit to the present version, 487 | but may differ in detail to address new problems or concerns. 488 | 489 | Each version is given a distinguishing version number. If the Library 490 | specifies a version number of this License which applies to it and 491 | "any later version", you have the option of following the terms and 492 | conditions either of that version or of any later version published by 493 | the Free Software Foundation. If the Library does not specify a 494 | license version number, you may choose any version ever published by 495 | the Free Software Foundation. 496 | 497 | 14. If you wish to incorporate parts of the Library into other free 498 | programs whose distribution conditions are incompatible with these, 499 | write to the author to ask for permission. For software which is 500 | copyrighted by the Free Software Foundation, write to the Free 501 | Software Foundation; we sometimes make exceptions for this. Our 502 | decision will be guided by the two goals of preserving the free status 503 | of all derivatives of our free software and of promoting the sharing 504 | and reuse of software generally. 505 | 506 | NO WARRANTY 507 | 508 | 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO 509 | WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW. 510 | EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR 511 | OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY 512 | KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE 513 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 514 | PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE 515 | LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME 516 | THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 517 | 518 | 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN 519 | WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY 520 | AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU 521 | FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR 522 | CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE 523 | LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING 524 | RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A 525 | FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF 526 | SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH 527 | DAMAGES. 528 | 529 | END OF TERMS AND CONDITIONS 530 | 531 | How to Apply These Terms to Your New Libraries 532 | 533 | If you develop a new library, and you want it to be of the greatest 534 | possible use to the public, we recommend making it free software that 535 | everyone can redistribute and change. You can do so by permitting 536 | redistribution under these terms (or, alternatively, under the terms of the 537 | ordinary General Public License). 538 | 539 | To apply these terms, attach the following notices to the library. It is 540 | safest to attach them to the start of each source file to most effectively 541 | convey the exclusion of warranty; and each file should have at least the 542 | "copyright" line and a pointer to where the full notice is found. 543 | 544 | 545 | Copyright (C) 546 | 547 | This library is free software; you can redistribute it and/or 548 | modify it under the terms of the GNU Lesser General Public 549 | License as published by the Free Software Foundation; either 550 | version 2.1 of the License, or (at your option) any later version. 551 | 552 | This library is distributed in the hope that it will be useful, 553 | but WITHOUT ANY WARRANTY; without even the implied warranty of 554 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 555 | Lesser General Public License for more details. 556 | 557 | You should have received a copy of the GNU Lesser General Public 558 | License along with this library; if not, write to the Free Software 559 | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 560 | 561 | Also add information on how to contact you by electronic and paper mail. 562 | 563 | You should also get your employer (if you work as a programmer) or your 564 | school, if any, to sign a "copyright disclaimer" for the library, if 565 | necessary. Here is a sample; alter the names: 566 | 567 | Yoyodyne, Inc., hereby disclaims all copyright interest in the 568 | library `Frob' (a library for tweaking knobs) written by James Random Hacker. 569 | 570 | , 1 April 1990 571 | Ty Coon, President of Vice 572 | 573 | That's all there is to it! --------------------------------------------------------------------------------