Git Product home page Git Product logo

gatakawa's Introduction

Gatakawa

My learning of Gtk basics on Haskell.

Inspired by

https://github.com/haskell-gi/haskell-gi https://github.com/haskell-gi/gi-gtk-examples/blob/master/buttonbox/ButtonBox.hs https://github.com/haskell-gi/gi-gtk-examples/blob/master/gtkbuilder/GtkBuilderTest.hs

Translating Gtk documentation

https://github.com/haskell-gi/haskell-gi#translating-from-the-c-api-to-the-haskell-gi-generated-api

Example function

GI.GtkGtk
mainQuitgtk_main_quit

Makes the innermost invocation of the main loop return when it regains control.

mainQuit

https://hackage.haskell.org/package/gi-gtk-3.0.18/docs/GI-Gtk-Functions.html#v:mainQuit

gtk_main_quit

https://developer.gnome.org/gtk3/stable/gtk3-General.html#gtk-main-quit

Example property

GI.GtkGtk
sensitiveGTK_WIDGET_SENSITIVE

sensitive

GTK_WIDGET_SENSITIVE()

https://developer.gnome.org/gtk2/stable/GtkWidget.html#GTK-WIDGET-SENSITIVE:CAPS

Example signal

GI.GtkGtk
onButtonClicked“clicked”

onButtonClicked

https://hackage.haskell.org/package/gi-gtk-3.0.18/docs/GI-Gtk-Objects-Button.html#v:onButtonClicked

The “clicked” signal

https://developer.gnome.org/gtk3/stable/GtkButton.html#GtkButton-clicked

Documentation on the Internet

Gi-Gtk Documentation

Directory listing for gi-gtk-3.0.18 documentation https://hackage.haskell.org/package/gi-gtk-3.0.18/docs/

All index https://hackage.haskell.org/package/gi-gtk-3.0.18/docs/doc-index-All.html

Gtk documentation

This document is for the GTK+ 3 library, version 3.22.26 https://developer.gnome.org/gtk3/stable/

Lots of reference material. https://developer.gnome.org/references

You can use the search button in the top right corner to search the documentation.

Tutorials

Simple C GTK+2 tutorial http://zetcode.com/gui/gtk2/

Python Gtk+3 tutorial http://python-gtk-3-tutorial.readthedocs.io/en/latest/

Working in the REPL

In terminal type stack ghci, it will load ghci REPL in the package context. If you do it in eshell you will get available functions auto-completion.

Typing :browse *Main will give you a list of interesting data that can be searched with Emacs. You can grep though the results by using following example if you are looking for Button related information.

echo ':browse! *Main' | stack ghci | grep Button

Typing Gtk.ma will offer auto-completion for mainquit, pressing Enter will prompt you the correct case.

*Main> Gtk.mainquit

<interactive>:3:1: error:
    Not in scope: ‘Gtk.mainquit’
    Perhaps you meant ‘Gtk.mainQuit’ (imported from GI.Gtk)
    No module named ‘Gtk’ is imported.
*Main>

gatakawa's People

Contributors

bigos avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.