PhoshDragSurface

PhoshDragSurface — A drgable layer surface

Functions

Properties

guint drag-handle Read / Write
PhoshDragSurfaceDragMode drag-mode Read / Write
PhoshDragSurfaceState drag-state Read
guint exclusive Read / Write
gpointer layer-shell-effects Read / Write / Construct Only
int margin-folded Read / Write
int margin-unfolded Read / Write
double threshold Read / Write

Signals

Types and Values

Object Hierarchy

    GEnum
    ├── PhoshDragSurfaceDragMode
    ╰── PhoshDragSurfaceState
    GObject
    ╰── GInitiallyUnowned
        ╰── GtkWidget
            ╰── GtkContainer
                ╰── GtkBin
                    ╰── GtkWindow
                        ╰── PhoshLayerSurface
                            ╰── PhoshDragSurface
                                ├── PhoshHome
                                ╰── PhoshTopPanel

Implemented Interfaces

PhoshDragSurface implements AtkImplementorIface and GtkBuildable.

Description

A layer surface that can be dragged in ne direction via gestures.

See PhoshTopPanel for a usage example. Note that you need to update folded/unfolded margins on the PhoshLayerSurface's configured event to adjust it to the proper sizes.

Functions

phosh_drag_surface_set_margin ()

void
phosh_drag_surface_set_margin (PhoshDragSurface *self,
                               int margin_folded,
                               int margin_unfolded);

phosh_drag_surface_get_threshold ()

float
phosh_drag_surface_get_threshold (PhoshDragSurface *self);

phosh_drag_surface_set_threshold ()

void
phosh_drag_surface_set_threshold (PhoshDragSurface *self,
                                  double threshold);

phosh_drag_surface_get_drag_state ()

PhoshDragSurfaceState
phosh_drag_surface_get_drag_state (PhoshDragSurface *self);

phosh_drag_surface_set_drag_state ()

void
phosh_drag_surface_set_drag_state (PhoshDragSurface *self,
                                   PhoshDragSurfaceState state);

phosh_drag_surface_set_exclusive ()

void
phosh_drag_surface_set_exclusive (PhoshDragSurface *self,
                                  guint exclusive);

phosh_drag_surface_get_drag_mode ()

PhoshDragSurfaceDragMode
phosh_drag_surface_get_drag_mode (PhoshDragSurface *self);

phosh_drag_surface_set_drag_mode ()

void
phosh_drag_surface_set_drag_mode (PhoshDragSurface *self,
                                  PhoshDragSurfaceDragMode mode);

phosh_drag_surface_get_drag_handle ()

guint
phosh_drag_surface_get_drag_handle (PhoshDragSurface *self);

phosh_drag_surface_set_drag_handle ()

void
phosh_drag_surface_set_drag_handle (PhoshDragSurface *self,
                                    guint handle);

Types and Values

PHOSH_TYPE_DRAG_SURFACE

#define PHOSH_TYPE_DRAG_SURFACE (phosh_drag_surface_get_type ())

enum PhoshDragSurfaceState

The state of the drag surface.

Members

PHOSH_DRAG_SURFACE_STATE_FOLDED

Surface is folded.

 

PHOSH_DRAG_SURFACE_STATE_UNFOLDED

Surface is unfolded.

 

PHOSH_DRAG_SURFACE_STATE_DRAGGED

Surface is being dragged.

 

enum PhoshDragSurfaceDragMode

The drag mode of the drag surface. Specifies how and where the surface is draggable.

Members

PHOSH_DRAG_SURFACE_DRAG_MODE_FULL

Full surface is draggable

 

PHOSH_DRAG_SURFACE_DRAG_MODE_HANDLE

Handle area is draggable.

 

PHOSH_DRAG_SURFACE_DRAG_MODE_NONE

Surface is not draggable.

 

struct PhoshDragSurfaceClass

struct PhoshDragSurfaceClass {
  PhoshLayerSurfaceClass parent_class;

  void                   (*dragged) (PhoshDragSurface *self, int margin);
};

Members

dragged ()

invoked when a surface is being dragged

 

PhoshDragSurface

typedef struct _PhoshDragSurface PhoshDragSurface;

Property Details

The “drag-handle” property

  “drag-handle”              guint

Owner: PhoshDragSurface

Flags: Read / Write

Default value: 0


The “drag-mode” property

  “drag-mode”                PhoshDragSurfaceDragMode

Owner: PhoshDragSurface

Flags: Read / Write

Default value: PHOSH_DRAG_SURFACE_DRAG_MODE_FULL


The “drag-state” property

  “drag-state”               PhoshDragSurfaceState

Owner: PhoshDragSurface

Flags: Read

Default value: PHOSH_DRAG_SURFACE_STATE_FOLDED


The “exclusive” property

  “exclusive”                guint

Owner: PhoshDragSurface

Flags: Read / Write

Default value: 0


The “layer-shell-effects” property

  “layer-shell-effects”      gpointer

Owner: PhoshDragSurface

Flags: Read / Write / Construct Only


The “margin-folded” property

  “margin-folded”            int

Owner: PhoshDragSurface

Flags: Read / Write

Default value: 0


The “margin-unfolded” property

  “margin-unfolded”          int

Owner: PhoshDragSurface

Flags: Read / Write

Default value: 0


The “threshold” property

  “threshold”                double

Owner: PhoshDragSurface

Flags: Read / Write

Allowed values: >= G_MINDOUBLE

Default value: 1

Signal Details

The “dragged” signal

void
user_function (PhoshDragSurface *phoshdragsurface,
               int               arg1,
               gpointer          user_data)

Flags: Run Last