Gdk.Window_Attr

Entities

Subtypes

Constants

Subprograms

Description

<group>Gdk, the low-level API</group>

Destroy

procedure Destroy (Window_Attr : in out Gdk_Window_Attr)
Parameters
Window_Attr

Gdk_New

procedure Gdk_New
  (Window_Attr       : out Gdk_Window_Attr;
   Title             : Glib.UTF8_String := "";
   Event_Mask        : Gdk.Event.Gdk_Event_Mask := 0;
   X, Y              : Glib.Gint := 0;
   Width             : Glib.Gint := 0;
   Height            : Glib.Gint := 0;
   Wclass            : Gdk.Window.Gdk_Window_Class :=
     Gdk.Window.Input_Output;
   Visual            : Gdk.Visual.Gdk_Visual := null;
   Window_Type       : Gdk.Window.Gdk_Window_Type :=
     Gdk.Window.Window_Root;
   Cursor            : Gdk.Gdk_Cursor := null;
   Wmclass_Name      : String := "";
   Wmclass_Class     : String := "";
   Override_Redirect : Boolean := True)

Creates a new Gdk_Window_Attr structure. It is your responsability to free the visual, colormap, cursor,... field when they are no longer needed.

Parameters
Window_Attr
Title
Event_Mask
X
Y
Width
Height
Wclass
Visual
Window_Type
Cursor
Wmclass_Name
Wmclass_Class
Override_Redirect

Gdk_Window_Attr

subtype Gdk_Window_Attr is Gdk.Gdk_Window_Attr;

This record describes the initial attributes for a window. Most of them can be changed later on, but it is more efficient to set them right from the start. You usually need to do the following when initializing such a structure: Window_Attr.Visual := Get_Visual (Window); Window_Attr.Colormap := Get_Colormap (Window); Window_Attr.Event_Mask := Get_Events (Window) or Exposure_Mask;

Get_Cursor

function Get_Cursor
  (Window_Attr : Gdk_Window_Attr)
   return Gdk.Gdk_Cursor
Parameters
Window_Attr
Return Value

Get_Event_Mask

function Get_Event_Mask
  (Window_Attr : Gdk_Window_Attr) return Gdk.Event.Gdk_Event_Mask
Parameters
Window_Attr
Return Value

Get_Height

function Get_Height (Window_Attr : Gdk_Window_Attr) return Glib.Gint
Parameters
Window_Attr
Return Value

Get_Override_Redirect

function Get_Override_Redirect
  (Window_Attr : Gdk_Window_Attr) return Boolean

An override redirect window is not under the control of the window manager. This means it won't have a titlebar, won't be minimizable, etc. It will be entirely under the control of the application. The window manager can't see the override redirect window at all.

Override redirect should only be used for short-lived temporary windows, such as popup menus. #GtkMenu uses an override redirect window in its implementation, for example

Parameters
Window_Attr
Return Value

Get_Title

function Get_Title (Window_Attr : Gdk_Window_Attr) return Glib.UTF8_String
Parameters
Window_Attr
Return Value

Get_Visual

function Get_Visual
  (Window_Attr : Gdk_Window_Attr) return Gdk.Visual.Gdk_Visual
Parameters
Window_Attr
Return Value

Get_Width

function Get_Width (Window_Attr : Gdk_Window_Attr) return Glib.Gint
Parameters
Window_Attr
Return Value

Get_Window_Class

function Get_Window_Class
  (Window_Attr : Gdk_Window_Attr) return Gdk.Window.Gdk_Window_Class
Parameters
Window_Attr
Return Value

Get_Window_Type

function Get_Window_Type
  (Window_Attr : Gdk_Window_Attr) return Gdk.Window.Gdk_Window_Type
Parameters
Window_Attr
Return Value

Get_Wmclass_Class

function Get_Wmclass_Class (Window_Attr : Gdk_Window_Attr) return String
Parameters
Window_Attr
Return Value

Get_Wmclass_Name

function Get_Wmclass_Name (Window_Attr : Gdk_Window_Attr) return String
Parameters
Window_Attr
Return Value

Get_X

function Get_X (Window_Attr : Gdk_Window_Attr) return Glib.Gint
Parameters
Window_Attr
Return Value

Get_Y

function Get_Y (Window_Attr : Gdk_Window_Attr) return Glib.Gint
Parameters
Window_Attr
Return Value

Null_Window_Attr

Null_Window_Attr : constant Gdk_Window_Attr;

This record describes the initial attributes for a window. Most of them can be changed later on, but it is more efficient to set them right from the start. You usually need to do the following when initializing such a structure: Window_Attr.Visual := Get_Visual (Window); Window_Attr.Colormap := Get_Colormap (Window); Window_Attr.Event_Mask := Get_Events (Window) or Exposure_Mask;

Set_Cursor

procedure Set_Cursor
  (Window_Attr : Gdk_Window_Attr;
   Cursor      : Gdk.Gdk_Cursor)
Parameters
Window_Attr
Cursor

Set_Event_Mask

procedure Set_Event_Mask
  (Window_Attr : Gdk_Window_Attr;
   Event_Mask  : Gdk.Event.Gdk_Event_Mask)
Parameters
Window_Attr
Event_Mask

Set_Height

procedure Set_Height
  (Window_Attr : Gdk_Window_Attr;
   Height      : Glib.Gint)
Parameters
Window_Attr
Height

Set_Override_Redirect

procedure Set_Override_Redirect
  (Window_Attr       : Gdk_Window_Attr;
   Override_Redirect : Boolean)

An override redirect window is not under the control of the window manager. This means it won't have a titlebar, won't be minimizable, etc. It will be entirely under the control of the application. The window manager can't see the override redirect window at all.

Override redirect should only be used for short-lived temporary windows, such as popup menus. #GtkMenu uses an override redirect window in its implementation, for example

Parameters
Window_Attr
Override_Redirect

Set_Title

procedure Set_Title
  (Window_Attr : Gdk_Window_Attr;
   Title       : Glib.UTF8_String)
Parameters
Window_Attr
Title

Set_Visual

procedure Set_Visual
  (Window_Attr : Gdk_Window_Attr;
   Visual      : Gdk.Visual.Gdk_Visual)
Parameters
Window_Attr
Visual

Set_Width

procedure Set_Width
  (Window_Attr : Gdk_Window_Attr;
   Width       : Glib.Gint)
Parameters
Window_Attr
Width

Set_Window_Class

procedure Set_Window_Class
  (Window_Attr : Gdk_Window_Attr;
   Wclass      : Gdk.Window.Gdk_Window_Class)
Parameters
Window_Attr
Wclass

Set_Window_Type

procedure Set_Window_Type
  (Window_Attr : Gdk_Window_Attr;
   Window_Type : Gdk.Window.Gdk_Window_Type)
Parameters
Window_Attr
Window_Type

Set_Wmclass_Class

procedure Set_Wmclass_Class
  (Window_Attr   : Gdk_Window_Attr;
   Wmclass_Class : String)
Parameters
Window_Attr
Wmclass_Class

Set_Wmclass_Name

procedure Set_Wmclass_Name
  (Window_Attr  : Gdk_Window_Attr;
   Wmclass_Name : String)
Parameters
Window_Attr
Wmclass_Name

Set_X

procedure Set_X
  (Window_Attr : Gdk_Window_Attr;
   X           : Glib.Gint)
Parameters
Window_Attr
X

Set_Y

procedure Set_Y
  (Window_Attr : Gdk_Window_Attr;
   Y           : Glib.Gint)
Parameters
Window_Attr
Y