Index

Package: Clipboard

Description

package Gtk.Clipboard is
---------------------------------------------------------------------------- -- Copyright (C) 1998-2000 E. Briot, J. Brobecker and A. Charlet -- Copyright (C) 2000-2014, AdaCore -- -- This library is free software; you can redistribute it and/or modify it -- under terms of the GNU General Public License as published by the Free -- Software Foundation; either version 3, or (at your option) any later -- version. This library is distributed in the hope that it will be useful, -- but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHAN- -- TABILITY or FITNESS FOR A PARTICULAR PURPOSE. -- -- As a special exception under Section 7 of GPL version 3, you are granted -- additional permissions described in the GCC Runtime Library Exception, -- version 3.1, as published by the Free Software Foundation. -- -- You should have received a copy of the GNU General Public License and -- a copy of the GCC Runtime Library Exception along with this program; -- see the files COPYING3 and COPYING.RUNTIME respectively. If not, see -- <http://www.gnu.org/licenses/>. -- -- ----------------------------------------------------------------------------

Packages

Request_Contents_User_Data (generic)

Request_Image_User_Data (generic)

Request_Rich_Text_User_Data (generic)

Request_Targets_User_Data (generic)

Request_Text_User_Data (generic)

Request_Uris_User_Data (generic)

Classes

Gtk_Clipboard_Record

type Gtk_Clipboard_Record is new GObject_Record with null record;

Ancestors:

Primitive operations:

Glib.Object.Deallocate (Inherited)
Glib.Object.Get_Type (Inherited)
Glib.Object.Notify (Inherited)
Glib.Object.Ref (Inherited)
Glib.Object.Ref_Sink (Inherited)
Glib.Object.Unref (Inherited)
On_Owner_Change
On_Owner_Change
Request_Contents
Request_Image
Request_Rich_Text
Request_Targets
Request_Text
Request_Uris
Set_Can_Store
Wait_For_Contents
Wait_For_Image
Wait_For_Targets
Wait_For_Text
Wait_For_Uris
Wait_Is_Image_Available
Wait_Is_Rich_Text_Available
Wait_Is_Target_Available
Wait_Is_Text_Available
Wait_Is_Uris_Available

Types

Gtk_Clipboard

type Gtk_Clipboard is access all Gtk_Clipboard_Record'Class;

Gtk_Clipboard_Received_Func

type Gtk_Clipboard_Received_Func is access procedure
     (Clipboard      : not null access Gtk_Clipboard_Record'Class;
      Selection_Data : Gtk.Selection_Data.Gtk_Selection_Data);
A function to be called when the results of Gtk.Clipboard.Request_Contents are received, or when the request fails. "clipboard": the Gtk.Clipboard.Gtk_Clipboard "selection_data": a Gtk.Selection_Data.Gtk_Selection_Data containing the data was received. If retrieving the data failed, then then length field of Selection_Data will be negative.

Gtk_Clipboard_Image_Received_Func

type Gtk_Clipboard_Image_Received_Func is access procedure
     (Clipboard : not null access Gtk_Clipboard_Record'Class;
      Pixbuf    : not null access Gdk.Pixbuf.Gdk_Pixbuf_Record'Class);
A function to be called when the results of Gtk.Clipboard.Request_Image are received, or when the request fails. Since: gtk+ 2.6 "clipboard": the Gtk.Clipboard.Gtk_Clipboard "pixbuf": the received image

Gtk_Clipboard_Rich_Text_Received_Func

type Gtk_Clipboard_Rich_Text_Received_Func is access procedure
     (Clipboard : not null access Gtk_Clipboard_Record'Class;
      Format    : Gdk.Types.Gdk_Atom;
      Text      : in out Guint8;
      Length    : Gsize);

Gtk_Clipboard_Targets_Received_Func

type Gtk_Clipboard_Targets_Received_Func is access procedure
     (Clipboard : not null access Gtk_Clipboard_Record'Class;
      Atoms     : in out Gdk.Types.Gdk_Atom;
      N_Atoms   : Gint);
A function to be called when the results of Gtk.Clipboard.Request_Targets are received, or when the request fails. Since: gtk+ 2.4 "clipboard": the Gtk.Clipboard.Gtk_Clipboard "atoms": the supported targets, as array of Gdk.Types.Gdk_Atom, or null if retrieving the data failed. "n_atoms": the length of the Atoms array.

Gtk_Clipboard_Text_Received_Func

type Gtk_Clipboard_Text_Received_Func is access procedure
     (Clipboard : not null access Gtk_Clipboard_Record'Class;
      Text      : UTF8_String);
A function to be called when the results of Gtk.Clipboard.Request_Text are received, or when the request fails. "clipboard": the Gtk.Clipboard.Gtk_Clipboard "text": the text received, as a UTF-8 encoded string, or null if retrieving the data failed.

Gtk_Clipboard_Urireceived_Func

type Gtk_Clipboard_Urireceived_Func is access procedure
     (Clipboard : not null access Gtk_Clipboard_Record'Class;
      Uris      : GNAT.Strings.String_List);

Cb_Gtk_Clipboard_Gdk_Event_Void

type Cb_Gtk_Clipboard_Gdk_Event_Void is not null access procedure
     (Self   : access Gtk_Clipboard_Record'Class;
      Object : Gdk.Event.Gdk_Event);

Cb_GObject_Gdk_Event_Void

type Cb_GObject_Gdk_Event_Void is not null access procedure
     (Self   : access Glib.Object.GObject_Record'Class;
      Object : Gdk.Event.Gdk_Event);

Constants & Global variables

Signal_Owner_Change (Glib.Signal_Name)

Signal_Owner_Change : constant Glib.Signal_Name := "owner-change";

Subprograms & Entries

Get_Type

function Get_Type return Glib.GType;

Clear

procedure Clear 
(Clipboard: not null access Gtk_Clipboard_Record);

Get_Display

function Get_Display 
(Clipboard: not null access Gtk_Clipboard_Record) return Gdk.Display.Gdk_Display;

Get_Owner

function Get_Owner 
(Clipboard: not null access Gtk_Clipboard_Record) return Glib.Object.GObject;

Request_Contents

procedure Request_Contents 
(Clipboard: not null access Gtk_Clipboard_Record;
Target: Gdk.Types.Gdk_Atom;
Callback: Gtk_Clipboard_Received_Func);

Request_Image

procedure Request_Image 
(Clipboard: not null access Gtk_Clipboard_Record;
Callback: Gtk_Clipboard_Image_Received_Func);

Request_Rich_Text

procedure Request_Rich_Text 
(Clipboard: not null access Gtk_Clipboard_Record;
Buffer: not null access Glib.Object.GObject_Record'Class;
Callback: Gtk_Clipboard_Rich_Text_Received_Func);

Request_Targets

procedure Request_Targets 
(Clipboard: not null access Gtk_Clipboard_Record;
Callback: Gtk_Clipboard_Targets_Received_Func);

Request_Text

procedure Request_Text 
(Clipboard: not null access Gtk_Clipboard_Record;
Callback: Gtk_Clipboard_Text_Received_Func);

Request_Uris

procedure Request_Uris 
(Clipboard: not null access Gtk_Clipboard_Record;
Callback: Gtk_Clipboard_Urireceived_Func);

Set_Can_Store

procedure Set_Can_Store 
(Clipboard: not null access Gtk_Clipboard_Record;
Targets: Gtk.Target_List.Target_Entry_Array;
N_Targets: Gint);

Set_Image

procedure Set_Image 
(Clipboard: not null access Gtk_Clipboard_Record;
Pixbuf: not null access Gdk.Pixbuf.Gdk_Pixbuf_Record'Class);

Set_Text

procedure Set_Text 
(Clipboard: not null access Gtk_Clipboard_Record;
Text: UTF8_String);

Store

procedure Store 
(Clipboard: not null access Gtk_Clipboard_Record);

Wait_For_Contents

function Wait_For_Contents 
(Clipboard: not null access Gtk_Clipboard_Record;
Target: Gdk.Types.Gdk_Atom) return Gtk.Selection_Data.Gtk_Selection_Data;

Wait_For_Image

function Wait_For_Image 
(Clipboard: not null access Gtk_Clipboard_Record) return Gdk.Pixbuf.Gdk_Pixbuf;

Wait_For_Text

function Wait_For_Text 
(Clipboard: not null access Gtk_Clipboard_Record) return UTF8_String;

Wait_For_Uris

function Wait_For_Uris 
(Clipboard: not null access Gtk_Clipboard_Record) return GNAT.Strings.String_List;

Wait_Is_Image_Available

function Wait_Is_Image_Available 
(Clipboard: not null access Gtk_Clipboard_Record) return Boolean;

Wait_Is_Rich_Text_Available

function Wait_Is_Rich_Text_Available 
(Clipboard: not null access Gtk_Clipboard_Record;
Buffer: not null access Glib.Object.GObject_Record'Class) return Boolean;

Wait_Is_Target_Available

function Wait_Is_Target_Available 
(Clipboard: not null access Gtk_Clipboard_Record;
Target: Gdk.Types.Gdk_Atom) return Boolean;

Wait_Is_Text_Available

function Wait_Is_Text_Available 
(Clipboard: not null access Gtk_Clipboard_Record) return Boolean;

Wait_Is_Uris_Available

function Wait_Is_Uris_Available 
(Clipboard: not null access Gtk_Clipboard_Record) return Boolean;

Wait_For_Targets

function Wait_For_Targets 
(Clipboard: not null access Gtk_Clipboard_Record) return Gdk.Types.Gdk_Atom_Array;
Returns a list of targets that are present on the clipboard, or an empty array if there aren't any targets available. This function waits for the data to be received using the main loop, so events, timeouts, etc, may be dispatched during the wait.

Get

function Get 
(Selection: Gdk.Types.Gdk_Atom := Gdk.Types.Gdk_None) return Gtk_Clipboard;

Get_For_Display

function Get_For_Display 
(Display: not null access Gdk.Display.Gdk_Display_Record'Class;
Selection: Gdk.Types.Gdk_Atom := Gdk.Types.Gdk_None) return Gtk_Clipboard;

On_Owner_Change

procedure On_Owner_Change 
(Self: not null access Gtk_Clipboard_Record;
Call: Cb_Gtk_Clipboard_Gdk_Event_Void;
After: Boolean := False);

On_Owner_Change

procedure On_Owner_Change 
(Self: not null access Gtk_Clipboard_Record;
Call: Cb_GObject_Gdk_Event_Void;
Slot: not null access Glib.Object.GObject_Record'Class;
After: Boolean := False);