From d490e14ebbb93b5f23f9f9906acfb5cb51dc77f1 Mon Sep 17 00:00:00 2001 From: Camil Staps Date: Wed, 23 Oct 2019 11:22:15 +0200 Subject: Add GtkDialog and GtkSpinner functionality --- src/Gtk/Widgets.dcl | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) (limited to 'src/Gtk/Widgets.dcl') diff --git a/src/Gtk/Widgets.dcl b/src/Gtk/Widgets.dcl index 0335874..eb6c2d0 100644 --- a/src/Gtk/Widgets.dcl +++ b/src/Gtk/Widgets.dcl @@ -6,10 +6,11 @@ from System.FilePath import :: FilePath from System._Pointer import :: Pointer from Gtk.State import :: GtkM +from Gtk.Tune import class tune from Gtk.Types import :: GtkCSSClass, :: GtkDirection, :: GtkExpand, - :: GtkFileChooserAction, :: GtkLabel, :: GtkMargins, :: GtkOrientation, - :: GtkPanedHandleWidth, :: GtkResize, :: GtkResponse, :: GtkShrink, - :: GtkStylePriority + :: GtkFileChooserAction, :: GtkLabel, :: GtkMargins, :: GtkModal, + :: GtkOrientation, :: GtkPanedHandleWidth, :: GtkResize, :: GtkResponse, + :: GtkShrink, :: GtkStylePriority class ptr a where @@ -42,8 +43,13 @@ instance gtkContainer GtkDialog instance gtkDialog GtkDialog instance ptr GtkDialog +instance tune d GtkModal | gtkDialog d + +newDialog :: !GtkWindow -> GtkM GtkDialog runDialog :: !d -> GtkM GtkResponse | gtkDialog d +getContentArea :: !d -> GtkBox | gtkDialog d + getFileWithDialog :: !GtkWindow !GtkFileChooserAction !(Maybe String) -> GtkM (Maybe FilePath) :: GtkFrame @@ -91,6 +97,13 @@ instance gtkContainer GtkScrolledWindow newScrolledWindow :: GtkM GtkScrolledWindow +:: GtkSpinner :== Pointer +instance gtkWidget GtkSpinner + +newSpinner :: GtkM GtkSpinner +startSpinner :: !GtkSpinner -> GtkM GtkSpinner +stopSpinner :: !GtkSpinner -> GtkM GtkSpinner + :: GtkTextBuffer insertAtCursor :: !String !GtkTextBuffer -> GtkM () -- cgit v1.2.3