Back to index

indicator-appmenu  12.10.0
Classes | Defines | Typedefs | Functions
hudsource.h File Reference
#include "huditem.h"
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  _HudSourceInterface

Defines

#define HUD_TYPE_SOURCE   (hud_source_get_type ())
#define HUD_SOURCE(inst)
#define HUD_IS_SOURCE(inst)
#define HUD_SOURCE_GET_IFACE(inst)

Typedefs

typedef struct _HudSourceInterface
typedef struct _HudSource

Functions

GType hud_source_get_type (void)
void hud_source_use (HudSource *source)
 hud_source_use: ; a #HudSource
void hud_source_unuse (HudSource *source)
 hud_source_unuse: ; a #HudSource
void hud_source_search (HudSource *source, GPtrArray *results_array, HudTokenList *search_tokens)
 hud_source_search: : a #HudSource : (element-type HudResult): array to append results to : the search string
void hud_source_changed (HudSource *source)
 hud_source_changed: : a #HudSource

Define Documentation

#define HUD_IS_SOURCE (   inst)
Value:
(G_TYPE_CHECK_INSTANCE_TYPE ((inst),                     \
                                                             HUD_TYPE_SOURCE))

Definition at line 27 of file hudsource.h.

#define HUD_SOURCE (   inst)
Value:
(G_TYPE_CHECK_INSTANCE_CAST ((inst),                     \
                                                             HUD_TYPE_SOURCE, HudSource))

Definition at line 25 of file hudsource.h.

#define HUD_SOURCE_GET_IFACE (   inst)
Value:
(G_TYPE_INSTANCE_GET_INTERFACE ((inst),                  \
                                                             HUD_TYPE_SOURCE, HudSourceInterface))

Definition at line 29 of file hudsource.h.

Definition at line 24 of file hudsource.h.


Typedef Documentation

typedef struct _HudSource

Definition at line 33 of file hudsource.h.

typedef struct _HudSourceInterface

Definition at line 32 of file hudsource.h.


Function Documentation

void hud_source_changed ( HudSource *  source)

hud_source_changed: : a #HudSource

Signals that may have changed (ie: emits the "changed" signal).

This function should only ever be called by implementations of

HudSource.

Definition at line 168 of file hudsource.c.

{
  g_debug ("%s %p changed", G_OBJECT_TYPE_NAME (source), source);

  g_signal_emit (source, hud_source_changed_signal, 0);
}

Here is the caller graph for this function:

GType hud_source_get_type ( void  )
void hud_source_search ( HudSource *  source,
GPtrArray *  results_array,
HudTokenList *  search_string 
)

hud_source_search: : a #HudSource : (element-type HudResult): array to append results to : the search string

Searches for #HudItems in that potentially match and creates #HudResults for them, appending them to .

will emit a ::changed signal if the results of calling this function may have changed, at which point you should call it again.

Definition at line 147 of file hudsource.c.

{
  g_debug ("search on %s %p", G_OBJECT_TYPE_NAME (source), source);

  HUD_SOURCE_GET_IFACE (source)
    ->search (source, results_array, search_string);
}

Here is the caller graph for this function:

void hud_source_unuse ( HudSource *  source)

hud_source_unuse: ; a #HudSource

Reverses the effect of a previous call to hud_source_use().

The source maintains a use count. You must call hud_source_unuse() for as many times as you called hud_source_use().

Definition at line 123 of file hudsource.c.

{
  g_return_if_fail (HUD_IS_SOURCE (source));

  g_debug ("unuse on %s %p", G_OBJECT_TYPE_NAME (source), source);

  HUD_SOURCE_GET_IFACE (source)
    ->unuse (source);
}

Here is the caller graph for this function:

void hud_source_use ( HudSource *  source)

hud_source_use: ; a #HudSource

Mark a #HudSource as "in use" (ie: actively being queried).

The source maintains a use count. You must call hud_source_unuse() for as many times as you called hud_source_use().

The source may not emit change signals unless it is marked as being used (although it is free to ignore this hint and emit them anyway). Some data in the source may also be out of date. It is therefore recommended that calls to hud_source_search() be preceeded by a call to this function.

Definition at line 103 of file hudsource.c.

{
  g_return_if_fail (HUD_IS_SOURCE (source));

  g_debug ("use on %s %p", G_OBJECT_TYPE_NAME (source), source);

  HUD_SOURCE_GET_IFACE (source)
    ->use (source);
}

Here is the caller graph for this function: