Skip to content

Minimum versions #127

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Oct 21, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,5 @@ _site
.sass-cache
Gemfile.lock
**.DS_Store
.bundle
vendor
1 change: 1 addition & 0 deletions _config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ exclude:
- README.md
- "Gemfile*"
- "*.sh"
- vendor

# Build settings
markdown: kramdown
15 changes: 14 additions & 1 deletion css/main.scss
Original file line number Diff line number Diff line change
Expand Up @@ -61,4 +61,17 @@ div.footer > div {
width: 33.3%;
text-align: center;
min-height: 5px;
}
}

table {
width: 100%;
text-align: left;
border-collapse: collapse;
}
th {
text-align: center;
}
th, td {
border: 1px solid #ddd;
padding: 2px 8px;
}
27 changes: 22 additions & 5 deletions index.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ layout: wide
<div class="intro-col-wrapper">
<div class="intro-col intro-col-1" markdown="1">

### [Rust] bindings for [GTK+ 3][GTK], [Cairo], [GtkSourceView] and other [GLib]-compatible libraries
## [Rust] bindings for [GTK+ 3][GTK], [Cairo], [GtkSourceView] and other [GLib]-compatible libraries

[![GTK screenshot](gtk.png)](gtk.png)

Expand Down Expand Up @@ -33,11 +33,26 @@ layout: wide
</div>
</div>

| Crate | Minimum supported version |
|-------|---------------------------|
| [atk](https://crates.io/crates/atk) | 2.30 |
| [cairo](https://crates.io/crates/cairo) | 1.14 |
| [gdk](https://crates.io/crates/gdk) | 3.16 |
| [gdk-pixbuf](https://crates.io/crates/gdk-pixbuf) | 2.32 |
| [gio](https://crates.io/crates/gio) | 2.44 |
| [glib](https://crates.io/crates/glib) | 2.44 |
| [gtk](https://crates.io/crates/gtk) | 3.16 |
| [pango](https://crates.io/crates/pango) | 1.38 |
| [pangocairo](https://crates.io/crates/pangocairo) | 1.0 |
| [sourceview](https://crates.io/crates/sourceview) | 3.0 |
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reminds me that we should do gtksourceview 4 bindings (still gtk 3 version though). Shouldn't really use gtksourceview 3 in any applications anymore.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please open an issue about it somewhere. :)


<div style="display:block;margin-top:16px"></div>

## Using

Prepare your system: [Requirements](http://gtk-rs.org/docs-src/requirements.html)
First, prepare your system by taking a look at the [requirements](http://gtk-rs.org/docs-src/requirements.html).

Include `gtk` and `gio` in your `Cargo.toml` and set the minimal GTK version required by your project:
Then include `gtk` and `gio` in your `Cargo.toml` and set the minimal GTK version required by your project:
{% assign gtk = site.data.crates | where: "name", "gtk" %}

~~~toml
Expand Down Expand Up @@ -68,8 +83,10 @@ Create an application, etc.
use gtk::{Application, ApplicationWindow, Button};

fn main() {
let application = Application::new(Some("com.github.gtk-rs.examples.basic"), Default::default())
.expect("failed to initialize GTK application");
let application = Application::new(
Some("com.github.gtk-rs.examples.basic"),
Default::default(),
).expect("failed to initialize GTK application");

application.connect_activate(|app| {
let window = ApplicationWindow::new(app);
Expand Down